Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
2080 lines (1873 sloc) 50.9 KB
def __EIBGetAPDU_Complete()
puts "__EIBGetAPDU_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 37 or @data.length < 2
@errno = Errno::ECONNRESET
return -1
end
@buf.buffer = @data[2..-1]
return @buf.buffer.length
end
def EIBGetAPDU_async(buf)
puts "EIBGetAPDU_async()" if $DEBUG
ibuf = [0] * 2;
@buf = buf
@__complete = __EIBGetAPDU_Complete()
return 0
end
def EIBGetAPDU(buf)
puts "EIBGetAPDU()" if $DEBUG
if EIBGetAPDU_async(buf) == -1
return -1
end
return EIBComplete()
end
def __EIBGetAPDU_Src_Complete()
puts "__EIBGetAPDU_Src_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 37 or @data.length < 4
@errno = Errno::ECONNRESET
return -1
end
if @ptr5 != nil
@ptr5.data = (((@data[2])<<8)|(@data[2+1]))
end
@buf.buffer = @data[4..-1]
return @buf.buffer.length
end
def EIBGetAPDU_Src_async(buf, src)
puts "EIBGetAPDU_Src_async()" if $DEBUG
ibuf = [0] * 2;
@buf = buf
@ptr5 = src
@__complete = __EIBGetAPDU_Src_Complete()
return 0
end
def EIBGetAPDU_Src(buf, src)
puts "EIBGetAPDU_Src()" if $DEBUG
if EIBGetAPDU_Src_async(buf, src) == -1
return -1
end
return EIBComplete()
end
def __EIBGetBusmonitorPacket_Complete()
puts "__EIBGetBusmonitorPacket_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 20 or @data.length < 2
@errno = Errno::ECONNRESET
return -1
end
@buf.buffer = @data[2..-1]
return @buf.buffer.length
end
def EIBGetBusmonitorPacket_async(buf)
puts "EIBGetBusmonitorPacket_async()" if $DEBUG
ibuf = [0] * 2;
@buf = buf
@__complete = __EIBGetBusmonitorPacket_Complete()
return 0
end
def EIBGetBusmonitorPacket(buf)
puts "EIBGetBusmonitorPacket()" if $DEBUG
if EIBGetBusmonitorPacket_async(buf) == -1
return -1
end
return EIBComplete()
end
def __EIBGetGroup_Src_Complete()
puts "__EIBGetGroup_Src_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 39 or @data.length < 6
@errno = Errno::ECONNRESET
return -1
end
if @ptr5 != nil
@ptr5.data = (((@data[2])<<8)|(@data[2+1]))
end
if @ptr6 != nil
@ptr6.data = (((@data[4])<<8)|(@data[4+1]))
end
@buf.buffer = @data[6..-1]
return @buf.buffer.length
end
def EIBGetGroup_Src_async(buf, src, dest)
puts "EIBGetGroup_Src_async()" if $DEBUG
ibuf = [0] * 2;
@buf = buf
@ptr5 = src
@ptr6 = dest
@__complete = __EIBGetGroup_Src_Complete()
return 0
end
def EIBGetGroup_Src(buf, src, dest)
puts "EIBGetGroup_Src()" if $DEBUG
if EIBGetGroup_Src_async(buf, src, dest) == -1
return -1
end
return EIBComplete()
end
def __EIBGetTPDU_Complete()
puts "__EIBGetTPDU_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 37 or @data.length < 4
@errno = Errno::ECONNRESET
return -1
end
if @ptr5 != nil
@ptr5.data = (((@data[2])<<8)|(@data[2+1]))
end
@buf.buffer = @data[4..-1]
return @buf.buffer.length
end
def EIBGetTPDU_async(buf, src)
puts "EIBGetTPDU_async()" if $DEBUG
ibuf = [0] * 2;
@buf = buf
@ptr5 = src
@__complete = __EIBGetTPDU_Complete()
return 0
end
def EIBGetTPDU(buf, src)
puts "EIBGetTPDU()" if $DEBUG
if EIBGetTPDU_async(buf, src) == -1
return -1
end
return EIBComplete()
end
def __EIB_Cache_Clear_Complete()
puts "__EIB_Cache_Clear_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 114 or @data.length < 2
@errno = Errno::ECONNRESET
return -1
end
return 0
end
def EIB_Cache_Clear_async()
puts "EIB_Cache_Clear_async()" if $DEBUG
ibuf = [0] * 2;
ibuf[0] = 0
ibuf[1] = 114
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIB_Cache_Clear_Complete()
return 0
end
def EIB_Cache_Clear()
puts "EIB_Cache_Clear()" if $DEBUG
if EIB_Cache_Clear_async() == -1
return -1
end
return EIBComplete()
end
def __EIB_Cache_Disable_Complete()
puts "__EIB_Cache_Disable_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 113 or @data.length < 2
@errno = Errno::ECONNRESET
return -1
end
return 0
end
def EIB_Cache_Disable_async()
puts "EIB_Cache_Disable_async()" if $DEBUG
ibuf = [0] * 2;
ibuf[0] = 0
ibuf[1] = 113
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIB_Cache_Disable_Complete()
return 0
end
def EIB_Cache_Disable()
puts "EIB_Cache_Disable()" if $DEBUG
if EIB_Cache_Disable_async() == -1
return -1
end
return EIBComplete()
end
def __EIB_Cache_Enable_Complete()
puts "__EIB_Cache_Enable_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 1
@errno = Errno::EBUSY
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 112 or @data.length < 2
@errno = Errno::ECONNRESET
return -1
end
return 0
end
def EIB_Cache_Enable_async()
puts "EIB_Cache_Enable_async()" if $DEBUG
ibuf = [0] * 2;
ibuf[0] = 0
ibuf[1] = 112
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIB_Cache_Enable_Complete()
return 0
end
def EIB_Cache_Enable()
puts "EIB_Cache_Enable()" if $DEBUG
if EIB_Cache_Enable_async() == -1
return -1
end
return EIBComplete()
end
def __EIB_Cache_Read_Complete()
puts "__EIB_Cache_Read_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 117 or @data.length < 2
@errno = Errno::ECONNRESET
return -1
end
if (((@data[4])<<8)|(@data[4+1])) == 0
@errno = Errno::ENODEV
return -1
end
if @data.length <= 6
@errno = Errno::ENOENT
return -1
end
if @ptr5 != nil
@ptr5.data = (((@data[2])<<8)|(@data[2+1]))
end
@buf.buffer = @data[6..-1]
return @buf.buffer.length
end
def EIB_Cache_Read_async(dst, src, buf)
puts "EIB_Cache_Read_async()" if $DEBUG
ibuf = [0] * 4;
@buf = buf
@ptr5 = src
ibuf[2] = ((dst>>8)&0xff)
ibuf[3] = ((dst)&0xff)
ibuf[0] = 0
ibuf[1] = 117
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIB_Cache_Read_Complete()
return 0
end
def EIB_Cache_Read(dst, src, buf)
puts "EIB_Cache_Read()" if $DEBUG
if EIB_Cache_Read_async(dst, src, buf) == -1
return -1
end
return EIBComplete()
end
def __EIB_Cache_Read_Sync_Complete()
puts "__EIB_Cache_Read_Sync_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 116 or @data.length < 2
@errno = Errno::ECONNRESET
return -1
end
if (((@data[4])<<8)|(@data[4+1])) == 0
@errno = Errno::ENODEV
return -1
end
if @data.length <= 6
@errno = Errno::ENOENT
return -1
end
if @ptr5 != nil
@ptr5.data = (((@data[2])<<8)|(@data[2+1]))
end
@buf.buffer = @data[6..-1]
return @buf.buffer.length
end
def EIB_Cache_Read_Sync_async(dst, src, buf, age)
puts "EIB_Cache_Read_Sync_async()" if $DEBUG
ibuf = [0] * 6;
@buf = buf
@ptr5 = src
ibuf[2] = ((dst>>8)&0xff)
ibuf[3] = ((dst)&0xff)
ibuf[4] = ((age>>8)&0xff)
ibuf[5] = ((age)&0xff)
ibuf[0] = 0
ibuf[1] = 116
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIB_Cache_Read_Sync_Complete()
return 0
end
def EIB_Cache_Read_Sync(dst, src, buf, age)
puts "EIB_Cache_Read_Sync()" if $DEBUG
if EIB_Cache_Read_Sync_async(dst, src, buf, age) == -1
return -1
end
return EIBComplete()
end
def __EIB_Cache_Remove_Complete()
puts "__EIB_Cache_Remove_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 115 or @data.length < 2
@errno = Errno::ECONNRESET
return -1
end
return 0
end
def EIB_Cache_Remove_async(dest)
puts "EIB_Cache_Remove_async()" if $DEBUG
ibuf = [0] * 4;
ibuf[2] = ((dest>>8)&0xff)
ibuf[3] = ((dest)&0xff)
ibuf[0] = 0
ibuf[1] = 115
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIB_Cache_Remove_Complete()
return 0
end
def EIB_Cache_Remove(dest)
puts "EIB_Cache_Remove()" if $DEBUG
if EIB_Cache_Remove_async(dest) == -1
return -1
end
return EIBComplete()
end
def __EIB_Cache_LastUpdates_Complete()
puts "__EIB_Cache_LastUpdates_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 118 or @data.length < 2
@errno = Errno::ECONNRESET
return -1
end
if @ptr4 != nil
@ptr4.data = (((@data[2])<<8)|(@data[2+1]))
end
@buf.buffer = @data[4..-1]
return @buf.buffer.length
end
def EIB_Cache_LastUpdates_async(start, timeout, buf, ende)
puts "EIB_Cache_LastUpdates_async()" if $DEBUG
ibuf = [0] * 5;
@buf = buf
@ptr4 = ende
ibuf[2] = ((start>>8)&0xff)
ibuf[3] = ((start)&0xff)
ibuf[4] = ((timeout)&0xff)
ibuf[0] = 0
ibuf[1] = 118
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIB_Cache_LastUpdates_Complete()
return 0
end
def EIB_Cache_LastUpdates(start, timeout, buf, ende)
puts "EIB_Cache_LastUpdates()" if $DEBUG
if EIB_Cache_LastUpdates_async(start, timeout, buf, ende) == -1
return -1
end
return EIBComplete()
end
def __EIB_LoadImage_Complete()
puts "__EIB_LoadImage_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 99 or @data.length < 4
@errno = Errno::ECONNRESET
return -1
end
return (((@data[2])<<8)|(@data[2+1]))
end
def EIB_LoadImage_async(image)
puts "EIB_LoadImage_async()" if $DEBUG
ibuf = [0] * 2;
if image.length < 0
@errno = Errno::EINVAL
return -1
end
@sendlen = image.length
ibuf.concat(image)
ibuf[0] = 0
ibuf[1] = 99
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIB_LoadImage_Complete()
return 0
end
def EIB_LoadImage(image)
puts "EIB_LoadImage()" if $DEBUG
if EIB_LoadImage_async(image) == -1
return -1
end
return EIBComplete()
end
def __EIB_MC_Authorize_Complete()
puts "__EIB_MC_Authorize_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 87 or @data.length < 3
@errno = Errno::ECONNRESET
return -1
end
return @data[2]
end
def EIB_MC_Authorize_async(key)
puts "EIB_MC_Authorize_async()" if $DEBUG
ibuf = [0] * 6;
if key.length != 4
@errno = Errno::EINVAL
return -1
end
ibuf[2..6] = key
ibuf[0] = 0
ibuf[1] = 87
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIB_MC_Authorize_Complete()
return 0
end
def EIB_MC_Authorize(key)
puts "EIB_MC_Authorize()" if $DEBUG
if EIB_MC_Authorize_async(key) == -1
return -1
end
return EIBComplete()
end
def __EIB_MC_Connect_Complete()
puts "__EIB_MC_Connect_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 80 or @data.length < 2
@errno = Errno::ECONNRESET
return -1
end
return 0
end
def EIB_MC_Connect_async(dest)
puts "EIB_MC_Connect_async()" if $DEBUG
ibuf = [0] * 4;
ibuf[2] = ((dest>>8)&0xff)
ibuf[3] = ((dest)&0xff)
ibuf[0] = 0
ibuf[1] = 80
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIB_MC_Connect_Complete()
return 0
end
def EIB_MC_Connect(dest)
puts "EIB_MC_Connect()" if $DEBUG
if EIB_MC_Connect_async(dest) == -1
return -1
end
return EIBComplete()
end
def __EIB_MC_Individual_Open_Complete()
puts "__EIB_MC_Individual_Open_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 73 or @data.length < 2
@errno = Errno::ECONNRESET
return -1
end
return 0
end
def EIB_MC_Individual_Open_async(dest)
puts "EIB_MC_Individual_Open_async()" if $DEBUG
ibuf = [0] * 4;
ibuf[2] = ((dest>>8)&0xff)
ibuf[3] = ((dest)&0xff)
ibuf[0] = 0
ibuf[1] = 73
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIB_MC_Individual_Open_Complete()
return 0
end
def EIB_MC_Individual_Open(dest)
puts "EIB_MC_Individual_Open()" if $DEBUG
if EIB_MC_Individual_Open_async(dest) == -1
return -1
end
return EIBComplete()
end
def __EIB_MC_GetMaskVersion_Complete()
puts "__EIB_MC_GetMaskVersion_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 89 or @data.length < 4
@errno = Errno::ECONNRESET
return -1
end
return (((@data[2])<<8)|(@data[2+1]))
end
def EIB_MC_GetMaskVersion_async()
puts "EIB_MC_GetMaskVersion_async()" if $DEBUG
ibuf = [0] * 2;
ibuf[0] = 0
ibuf[1] = 89
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIB_MC_GetMaskVersion_Complete()
return 0
end
def EIB_MC_GetMaskVersion()
puts "EIB_MC_GetMaskVersion()" if $DEBUG
if EIB_MC_GetMaskVersion_async() == -1
return -1
end
return EIBComplete()
end
def __EIB_MC_GetPEIType_Complete()
puts "__EIB_MC_GetPEIType_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 85 or @data.length < 4
@errno = Errno::ECONNRESET
return -1
end
return (((@data[2])<<8)|(@data[2+1]))
end
def EIB_MC_GetPEIType_async()
puts "EIB_MC_GetPEIType_async()" if $DEBUG
ibuf = [0] * 2;
ibuf[0] = 0
ibuf[1] = 85
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIB_MC_GetPEIType_Complete()
return 0
end
def EIB_MC_GetPEIType()
puts "EIB_MC_GetPEIType()" if $DEBUG
if EIB_MC_GetPEIType_async() == -1
return -1
end
return EIBComplete()
end
def __EIB_MC_Progmode_Off_Complete()
puts "__EIB_MC_Progmode_Off_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 96 or @data.length < 2
@errno = Errno::ECONNRESET
return -1
end
return 0
end
def EIB_MC_Progmode_Off_async()
puts "EIB_MC_Progmode_Off_async()" if $DEBUG
ibuf = [0] * 3;
ibuf[2] = ((0)&0xff)
ibuf[0] = 0
ibuf[1] = 96
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIB_MC_Progmode_Off_Complete()
return 0
end
def EIB_MC_Progmode_Off()
puts "EIB_MC_Progmode_Off()" if $DEBUG
if EIB_MC_Progmode_Off_async() == -1
return -1
end
return EIBComplete()
end
def __EIB_MC_Progmode_On_Complete()
puts "__EIB_MC_Progmode_On_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 96 or @data.length < 2
@errno = Errno::ECONNRESET
return -1
end
return 0
end
def EIB_MC_Progmode_On_async()
puts "EIB_MC_Progmode_On_async()" if $DEBUG
ibuf = [0] * 3;
ibuf[2] = ((1)&0xff)
ibuf[0] = 0
ibuf[1] = 96
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIB_MC_Progmode_On_Complete()
return 0
end
def EIB_MC_Progmode_On()
puts "EIB_MC_Progmode_On()" if $DEBUG
if EIB_MC_Progmode_On_async() == -1
return -1
end
return EIBComplete()
end
def __EIB_MC_Progmode_Status_Complete()
puts "__EIB_MC_Progmode_Status_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 96 or @data.length < 3
@errno = Errno::ECONNRESET
return -1
end
return @data[2]
end
def EIB_MC_Progmode_Status_async()
puts "EIB_MC_Progmode_Status_async()" if $DEBUG
ibuf = [0] * 3;
ibuf[2] = ((3)&0xff)
ibuf[0] = 0
ibuf[1] = 96
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIB_MC_Progmode_Status_Complete()
return 0
end
def EIB_MC_Progmode_Status()
puts "EIB_MC_Progmode_Status()" if $DEBUG
if EIB_MC_Progmode_Status_async() == -1
return -1
end
return EIBComplete()
end
def __EIB_MC_Progmode_Toggle_Complete()
puts "__EIB_MC_Progmode_Toggle_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 96 or @data.length < 2
@errno = Errno::ECONNRESET
return -1
end
return 0
end
def EIB_MC_Progmode_Toggle_async()
puts "EIB_MC_Progmode_Toggle_async()" if $DEBUG
ibuf = [0] * 3;
ibuf[2] = ((2)&0xff)
ibuf[0] = 0
ibuf[1] = 96
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIB_MC_Progmode_Toggle_Complete()
return 0
end
def EIB_MC_Progmode_Toggle()
puts "EIB_MC_Progmode_Toggle()" if $DEBUG
if EIB_MC_Progmode_Toggle_async() == -1
return -1
end
return EIBComplete()
end
def __EIB_MC_PropertyDesc_Complete()
puts "__EIB_MC_PropertyDesc_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 97 or @data.length < 6
@errno = Errno::ECONNRESET
return -1
end
if @ptr2 != nil
@ptr2.data = @data[2]
end
if @ptr4 != nil
@ptr4.data = (((@data[3])<<8)|(@data[3+1]))
end
if @ptr3 != nil
@ptr3.data = @data[5]
end
return 0
end
def EIB_MC_PropertyDesc_async(obj, propertyno, proptype, max_nr_of_elem, access)
puts "EIB_MC_PropertyDesc_async()" if $DEBUG
ibuf = [0] * 4;
@ptr2 = proptype
@ptr4 = max_nr_of_elem
@ptr3 = access
ibuf[2] = ((obj)&0xff)
ibuf[3] = ((propertyno)&0xff)
ibuf[0] = 0
ibuf[1] = 97
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIB_MC_PropertyDesc_Complete()
return 0
end
def EIB_MC_PropertyDesc(obj, propertyno, proptype, max_nr_of_elem, access)
puts "EIB_MC_PropertyDesc()" if $DEBUG
if EIB_MC_PropertyDesc_async(obj, propertyno, proptype, max_nr_of_elem, access) == -1
return -1
end
return EIBComplete()
end
def __EIB_MC_PropertyRead_Complete()
puts "__EIB_MC_PropertyRead_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 83 or @data.length < 2
@errno = Errno::ECONNRESET
return -1
end
@buf.buffer = @data[2..-1]
return @buf.buffer.length
end
def EIB_MC_PropertyRead_async(obj, propertyno, start, nr_of_elem, buf)
puts "EIB_MC_PropertyRead_async()" if $DEBUG
ibuf = [0] * 7;
@buf = buf
ibuf[2] = ((obj)&0xff)
ibuf[3] = ((propertyno)&0xff)
ibuf[4] = ((start>>8)&0xff)
ibuf[5] = ((start)&0xff)
ibuf[6] = ((nr_of_elem)&0xff)
ibuf[0] = 0
ibuf[1] = 83
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIB_MC_PropertyRead_Complete()
return 0
end
def EIB_MC_PropertyRead(obj, propertyno, start, nr_of_elem, buf)
puts "EIB_MC_PropertyRead()" if $DEBUG
if EIB_MC_PropertyRead_async(obj, propertyno, start, nr_of_elem, buf) == -1
return -1
end
return EIBComplete()
end
def __EIB_MC_PropertyScan_Complete()
puts "__EIB_MC_PropertyScan_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 98 or @data.length < 2
@errno = Errno::ECONNRESET
return -1
end
@buf.buffer = @data[2..-1]
return @buf.buffer.length
end
def EIB_MC_PropertyScan_async(buf)
puts "EIB_MC_PropertyScan_async()" if $DEBUG
ibuf = [0] * 2;
@buf = buf
ibuf[0] = 0
ibuf[1] = 98
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIB_MC_PropertyScan_Complete()
return 0
end
def EIB_MC_PropertyScan(buf)
puts "EIB_MC_PropertyScan()" if $DEBUG
if EIB_MC_PropertyScan_async(buf) == -1
return -1
end
return EIBComplete()
end
def __EIB_MC_PropertyWrite_Complete()
puts "__EIB_MC_PropertyWrite_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 84 or @data.length < 2
@errno = Errno::ECONNRESET
return -1
end
@buf.buffer = @data[2..-1]
return @buf.buffer.length
end
def EIB_MC_PropertyWrite_async(obj, propertyno, start, nr_of_elem, buf, res)
puts "EIB_MC_PropertyWrite_async()" if $DEBUG
ibuf = [0] * 7;
ibuf[2] = ((obj)&0xff)
ibuf[3] = ((propertyno)&0xff)
ibuf[4] = ((start>>8)&0xff)
ibuf[5] = ((start)&0xff)
ibuf[6] = ((nr_of_elem)&0xff)
if buf.length < 0
@errno = Errno::EINVAL
return -1
end
@sendlen = buf.length
ibuf.concat(buf)
@buf = res
ibuf[0] = 0
ibuf[1] = 84
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIB_MC_PropertyWrite_Complete()
return 0
end
def EIB_MC_PropertyWrite(obj, propertyno, start, nr_of_elem, buf, res)
puts "EIB_MC_PropertyWrite()" if $DEBUG
if EIB_MC_PropertyWrite_async(obj, propertyno, start, nr_of_elem, buf, res) == -1
return -1
end
return EIBComplete()
end
def __EIB_MC_ReadADC_Complete()
puts "__EIB_MC_ReadADC_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 86 or @data.length < 4
@errno = Errno::ECONNRESET
return -1
end
if @ptr1 != nil
@ptr1.data = (((@data[2])<<8)|(@data[2+1]))
end
return 0
end
def EIB_MC_ReadADC_async(channel, count, val)
puts "EIB_MC_ReadADC_async()" if $DEBUG
ibuf = [0] * 4;
@ptr1 = val
ibuf[2] = ((channel)&0xff)
ibuf[3] = ((count)&0xff)
ibuf[0] = 0
ibuf[1] = 86
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIB_MC_ReadADC_Complete()
return 0
end
def EIB_MC_ReadADC(channel, count, val)
puts "EIB_MC_ReadADC()" if $DEBUG
if EIB_MC_ReadADC_async(channel, count, val) == -1
return -1
end
return EIBComplete()
end
def __EIB_MC_Read_Complete()
puts "__EIB_MC_Read_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 81 or @data.length < 2
@errno = Errno::ECONNRESET
return -1
end
@buf.buffer = @data[2..-1]
return @buf.buffer.length
end
def EIB_MC_Read_async(addr, buf_len, buf)
puts "EIB_MC_Read_async()" if $DEBUG
ibuf = [0] * 6;
@buf = buf
ibuf[2] = ((addr>>8)&0xff)
ibuf[3] = ((addr)&0xff)
ibuf[4] = ((buf_len>>8)&0xff)
ibuf[5] = ((buf_len)&0xff)
ibuf[0] = 0
ibuf[1] = 81
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIB_MC_Read_Complete()
return 0
end
def EIB_MC_Read(addr, buf_len, buf)
puts "EIB_MC_Read()" if $DEBUG
if EIB_MC_Read_async(addr, buf_len, buf) == -1
return -1
end
return EIBComplete()
end
def __EIB_MC_Restart_Complete()
puts "__EIB_MC_Restart_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 90 or @data.length < 2
@errno = Errno::ECONNRESET
return -1
end
return 0
end
def EIB_MC_Restart_async()
puts "EIB_MC_Restart_async()" if $DEBUG
ibuf = [0] * 2;
ibuf[0] = 0
ibuf[1] = 90
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIB_MC_Restart_Complete()
return 0
end
def EIB_MC_Restart()
puts "EIB_MC_Restart()" if $DEBUG
if EIB_MC_Restart_async() == -1
return -1
end
return EIBComplete()
end
def __EIB_MC_SetKey_Complete()
puts "__EIB_MC_SetKey_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 2
@errno = Errno::EPERM
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 88 or @data.length < 2
@errno = Errno::ECONNRESET
return -1
end
return 0
end
def EIB_MC_SetKey_async(key, level)
puts "EIB_MC_SetKey_async()" if $DEBUG
ibuf = [0] * 7;
if key.length != 4
@errno = Errno::EINVAL
return -1
end
ibuf[2..6] = key
ibuf[6] = ((level)&0xff)
ibuf[0] = 0
ibuf[1] = 88
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIB_MC_SetKey_Complete()
return 0
end
def EIB_MC_SetKey(key, level)
puts "EIB_MC_SetKey()" if $DEBUG
if EIB_MC_SetKey_async(key, level) == -1
return -1
end
return EIBComplete()
end
def __EIB_MC_Write_Complete()
puts "__EIB_MC_Write_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 68
@errno = Errno::EIO
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 82 or @data.length < 2
@errno = Errno::ECONNRESET
return -1
end
return @sendlen
end
def EIB_MC_Write_async(addr, buf)
puts "EIB_MC_Write_async()" if $DEBUG
ibuf = [0] * 6;
ibuf[2] = ((addr>>8)&0xff)
ibuf[3] = ((addr)&0xff)
ibuf[4] = (((buf.length)>>8)&0xff)
ibuf[5] = (((buf.length))&0xff)
if buf.length < 0
@errno = Errno::EINVAL
return -1
end
@sendlen = buf.length
ibuf.concat(buf)
ibuf[0] = 0
ibuf[1] = 82
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIB_MC_Write_Complete()
return 0
end
def EIB_MC_Write(addr, buf)
puts "EIB_MC_Write()" if $DEBUG
if EIB_MC_Write_async(addr, buf) == -1
return -1
end
return EIBComplete()
end
def __EIB_MC_Write_Plain_Complete()
puts "__EIB_MC_Write_Plain_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 91 or @data.length < 2
@errno = Errno::ECONNRESET
return -1
end
return @sendlen
end
def EIB_MC_Write_Plain_async(addr, buf)
puts "EIB_MC_Write_Plain_async()" if $DEBUG
ibuf = [0] * 6;
ibuf[2] = ((addr>>8)&0xff)
ibuf[3] = ((addr)&0xff)
ibuf[4] = (((buf.length)>>8)&0xff)
ibuf[5] = (((buf.length))&0xff)
if buf.length < 0
@errno = Errno::EINVAL
return -1
end
@sendlen = buf.length
ibuf.concat(buf)
ibuf[0] = 0
ibuf[1] = 91
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIB_MC_Write_Plain_Complete()
return 0
end
def EIB_MC_Write_Plain(addr, buf)
puts "EIB_MC_Write_Plain()" if $DEBUG
if EIB_MC_Write_Plain_async(addr, buf) == -1
return -1
end
return EIBComplete()
end
def __EIB_M_GetMaskVersion_Complete()
puts "__EIB_M_GetMaskVersion_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 49 or @data.length < 4
@errno = Errno::ECONNRESET
return -1
end
return (((@data[2])<<8)|(@data[2+1]))
end
def EIB_M_GetMaskVersion_async(dest)
puts "EIB_M_GetMaskVersion_async()" if $DEBUG
ibuf = [0] * 4;
ibuf[2] = ((dest>>8)&0xff)
ibuf[3] = ((dest)&0xff)
ibuf[0] = 0
ibuf[1] = 49
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIB_M_GetMaskVersion_Complete()
return 0
end
def EIB_M_GetMaskVersion(dest)
puts "EIB_M_GetMaskVersion()" if $DEBUG
if EIB_M_GetMaskVersion_async(dest) == -1
return -1
end
return EIBComplete()
end
def __EIB_M_Progmode_Off_Complete()
puts "__EIB_M_Progmode_Off_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 48 or @data.length < 2
@errno = Errno::ECONNRESET
return -1
end
return 0
end
def EIB_M_Progmode_Off_async(dest)
puts "EIB_M_Progmode_Off_async()" if $DEBUG
ibuf = [0] * 5;
ibuf[2] = ((dest>>8)&0xff)
ibuf[3] = ((dest)&0xff)
ibuf[4] = ((0)&0xff)
ibuf[0] = 0
ibuf[1] = 48
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIB_M_Progmode_Off_Complete()
return 0
end
def EIB_M_Progmode_Off(dest)
puts "EIB_M_Progmode_Off()" if $DEBUG
if EIB_M_Progmode_Off_async(dest) == -1
return -1
end
return EIBComplete()
end
def __EIB_M_Progmode_On_Complete()
puts "__EIB_M_Progmode_On_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 48 or @data.length < 2
@errno = Errno::ECONNRESET
return -1
end
return 0
end
def EIB_M_Progmode_On_async(dest)
puts "EIB_M_Progmode_On_async()" if $DEBUG
ibuf = [0] * 5;
ibuf[2] = ((dest>>8)&0xff)
ibuf[3] = ((dest)&0xff)
ibuf[4] = ((1)&0xff)
ibuf[0] = 0
ibuf[1] = 48
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIB_M_Progmode_On_Complete()
return 0
end
def EIB_M_Progmode_On(dest)
puts "EIB_M_Progmode_On()" if $DEBUG
if EIB_M_Progmode_On_async(dest) == -1
return -1
end
return EIBComplete()
end
def __EIB_M_Progmode_Status_Complete()
puts "__EIB_M_Progmode_Status_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 48 or @data.length < 3
@errno = Errno::ECONNRESET
return -1
end
return @data[2]
end
def EIB_M_Progmode_Status_async(dest)
puts "EIB_M_Progmode_Status_async()" if $DEBUG
ibuf = [0] * 5;
ibuf[2] = ((dest>>8)&0xff)
ibuf[3] = ((dest)&0xff)
ibuf[4] = ((3)&0xff)
ibuf[0] = 0
ibuf[1] = 48
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIB_M_Progmode_Status_Complete()
return 0
end
def EIB_M_Progmode_Status(dest)
puts "EIB_M_Progmode_Status()" if $DEBUG
if EIB_M_Progmode_Status_async(dest) == -1
return -1
end
return EIBComplete()
end
def __EIB_M_Progmode_Toggle_Complete()
puts "__EIB_M_Progmode_Toggle_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 48 or @data.length < 2
@errno = Errno::ECONNRESET
return -1
end
return 0
end
def EIB_M_Progmode_Toggle_async(dest)
puts "EIB_M_Progmode_Toggle_async()" if $DEBUG
ibuf = [0] * 5;
ibuf[2] = ((dest>>8)&0xff)
ibuf[3] = ((dest)&0xff)
ibuf[4] = ((2)&0xff)
ibuf[0] = 0
ibuf[1] = 48
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIB_M_Progmode_Toggle_Complete()
return 0
end
def EIB_M_Progmode_Toggle(dest)
puts "EIB_M_Progmode_Toggle()" if $DEBUG
if EIB_M_Progmode_Toggle_async(dest) == -1
return -1
end
return EIBComplete()
end
def __EIB_M_ReadIndividualAddresses_Complete()
puts "__EIB_M_ReadIndividualAddresses_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 50 or @data.length < 2
@errno = Errno::ECONNRESET
return -1
end
@buf.buffer = @data[2..-1]
return @buf.buffer.length
end
def EIB_M_ReadIndividualAddresses_async(buf)
puts "EIB_M_ReadIndividualAddresses_async()" if $DEBUG
ibuf = [0] * 2;
@buf = buf
ibuf[0] = 0
ibuf[1] = 50
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIB_M_ReadIndividualAddresses_Complete()
return 0
end
def EIB_M_ReadIndividualAddresses(buf)
puts "EIB_M_ReadIndividualAddresses()" if $DEBUG
if EIB_M_ReadIndividualAddresses_async(buf) == -1
return -1
end
return EIBComplete()
end
def __EIB_M_WriteIndividualAddress_Complete()
puts "__EIB_M_WriteIndividualAddress_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 65
@errno = Errno::EADDRINUSE
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 67
@errno = Errno::ETIMEDOUT
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 66
@errno = Errno::EADDRNOTAVAIL
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 64 or @data.length < 2
@errno = Errno::ECONNRESET
return -1
end
return 0
end
def EIB_M_WriteIndividualAddress_async(dest)
puts "EIB_M_WriteIndividualAddress_async()" if $DEBUG
ibuf = [0] * 4;
ibuf[2] = ((dest>>8)&0xff)
ibuf[3] = ((dest)&0xff)
ibuf[0] = 0
ibuf[1] = 64
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIB_M_WriteIndividualAddress_Complete()
return 0
end
def EIB_M_WriteIndividualAddress(dest)
puts "EIB_M_WriteIndividualAddress()" if $DEBUG
if EIB_M_WriteIndividualAddress_async(dest) == -1
return -1
end
return EIBComplete()
end
def __EIBOpenBusmonitor_Complete()
puts "__EIBOpenBusmonitor_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 1
@errno = Errno::EBUSY
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 16 or @data.length < 2
@errno = Errno::ECONNRESET
return -1
end
return 0
end
def EIBOpenBusmonitor_async()
puts "EIBOpenBusmonitor_async()" if $DEBUG
ibuf = [0] * 2;
ibuf[0] = 0
ibuf[1] = 16
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIBOpenBusmonitor_Complete()
return 0
end
def EIBOpenBusmonitor()
puts "EIBOpenBusmonitor()" if $DEBUG
if EIBOpenBusmonitor_async() == -1
return -1
end
return EIBComplete()
end
def __EIBOpenBusmonitorText_Complete()
puts "__EIBOpenBusmonitorText_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 1
@errno = Errno::EBUSY
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 17 or @data.length < 2
@errno = Errno::ECONNRESET
return -1
end
return 0
end
def EIBOpenBusmonitorText_async()
puts "EIBOpenBusmonitorText_async()" if $DEBUG
ibuf = [0] * 2;
ibuf[0] = 0
ibuf[1] = 17
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIBOpenBusmonitorText_Complete()
return 0
end
def EIBOpenBusmonitorText()
puts "EIBOpenBusmonitorText()" if $DEBUG
if EIBOpenBusmonitorText_async() == -1
return -1
end
return EIBComplete()
end
def __EIBOpen_GroupSocket_Complete()
puts "__EIBOpen_GroupSocket_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 38 or @data.length < 2
@errno = Errno::ECONNRESET
return -1
end
return 0
end
def EIBOpen_GroupSocket_async(write_only)
puts "EIBOpen_GroupSocket_async()" if $DEBUG
ibuf = [0] * 5;
if write_only != 0
ibuf[4] = 0xff
else
ibuf[4] = 0x00
end
ibuf[0] = 0
ibuf[1] = 38
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIBOpen_GroupSocket_Complete()
return 0
end
def EIBOpen_GroupSocket(write_only)
puts "EIBOpen_GroupSocket()" if $DEBUG
if EIBOpen_GroupSocket_async(write_only) == -1
return -1
end
return EIBComplete()
end
def __EIBOpenT_Broadcast_Complete()
puts "__EIBOpenT_Broadcast_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 35 or @data.length < 2
@errno = Errno::ECONNRESET
return -1
end
return 0
end
def EIBOpenT_Broadcast_async(write_only)
puts "EIBOpenT_Broadcast_async()" if $DEBUG
ibuf = [0] * 5;
if write_only != 0
ibuf[4] = 0xff
else
ibuf[4] = 0x00
end
ibuf[0] = 0
ibuf[1] = 35
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIBOpenT_Broadcast_Complete()
return 0
end
def EIBOpenT_Broadcast(write_only)
puts "EIBOpenT_Broadcast()" if $DEBUG
if EIBOpenT_Broadcast_async(write_only) == -1
return -1
end
return EIBComplete()
end
def __EIBOpenT_Connection_Complete()
puts "__EIBOpenT_Connection_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 32 or @data.length < 2
@errno = Errno::ECONNRESET
return -1
end
return 0
end
def EIBOpenT_Connection_async(dest)
puts "EIBOpenT_Connection_async()" if $DEBUG
ibuf = [0] * 5;
ibuf[2] = ((dest>>8)&0xff)
ibuf[3] = ((dest)&0xff)
ibuf[0] = 0
ibuf[1] = 32
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIBOpenT_Connection_Complete()
return 0
end
def EIBOpenT_Connection(dest)
puts "EIBOpenT_Connection()" if $DEBUG
if EIBOpenT_Connection_async(dest) == -1
return -1
end
return EIBComplete()
end
def __EIBOpenT_Group_Complete()
puts "__EIBOpenT_Group_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 34 or @data.length < 2
@errno = Errno::ECONNRESET
return -1
end
return 0
end
def EIBOpenT_Group_async(dest, write_only)
puts "EIBOpenT_Group_async()" if $DEBUG
ibuf = [0] * 5;
ibuf[2] = ((dest>>8)&0xff)
ibuf[3] = ((dest)&0xff)
if write_only != 0
ibuf[4] = 0xff
else
ibuf[4] = 0x00
end
ibuf[0] = 0
ibuf[1] = 34
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIBOpenT_Group_Complete()
return 0
end
def EIBOpenT_Group(dest, write_only)
puts "EIBOpenT_Group()" if $DEBUG
if EIBOpenT_Group_async(dest, write_only) == -1
return -1
end
return EIBComplete()
end
def __EIBOpenT_Individual_Complete()
puts "__EIBOpenT_Individual_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 33 or @data.length < 2
@errno = Errno::ECONNRESET
return -1
end
return 0
end
def EIBOpenT_Individual_async(dest, write_only)
puts "EIBOpenT_Individual_async()" if $DEBUG
ibuf = [0] * 5;
ibuf[2] = ((dest>>8)&0xff)
ibuf[3] = ((dest)&0xff)
if write_only != 0
ibuf[4] = 0xff
else
ibuf[4] = 0x00
end
ibuf[0] = 0
ibuf[1] = 33
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIBOpenT_Individual_Complete()
return 0
end
def EIBOpenT_Individual(dest, write_only)
puts "EIBOpenT_Individual()" if $DEBUG
if EIBOpenT_Individual_async(dest, write_only) == -1
return -1
end
return EIBComplete()
end
def __EIBOpenT_TPDU_Complete()
puts "__EIBOpenT_TPDU_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 36 or @data.length < 2
@errno = Errno::ECONNRESET
return -1
end
return 0
end
def EIBOpenT_TPDU_async(src)
puts "EIBOpenT_TPDU_async()" if $DEBUG
ibuf = [0] * 5;
ibuf[2] = ((src>>8)&0xff)
ibuf[3] = ((src)&0xff)
ibuf[0] = 0
ibuf[1] = 36
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIBOpenT_TPDU_Complete()
return 0
end
def EIBOpenT_TPDU(src)
puts "EIBOpenT_TPDU()" if $DEBUG
if EIBOpenT_TPDU_async(src) == -1
return -1
end
return EIBComplete()
end
def __EIBOpenVBusmonitor_Complete()
puts "__EIBOpenVBusmonitor_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 1
@errno = Errno::EBUSY
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 18 or @data.length < 2
@errno = Errno::ECONNRESET
return -1
end
return 0
end
def EIBOpenVBusmonitor_async()
puts "EIBOpenVBusmonitor_async()" if $DEBUG
ibuf = [0] * 2;
ibuf[0] = 0
ibuf[1] = 18
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIBOpenVBusmonitor_Complete()
return 0
end
def EIBOpenVBusmonitor()
puts "EIBOpenVBusmonitor()" if $DEBUG
if EIBOpenVBusmonitor_async() == -1
return -1
end
return EIBComplete()
end
def __EIBOpenVBusmonitorText_Complete()
puts "__EIBOpenVBusmonitorText_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 1
@errno = Errno::EBUSY
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 19 or @data.length < 2
@errno = Errno::ECONNRESET
return -1
end
return 0
end
def EIBOpenVBusmonitorText_async()
puts "EIBOpenVBusmonitorText_async()" if $DEBUG
ibuf = [0] * 2;
ibuf[0] = 0
ibuf[1] = 19
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIBOpenVBusmonitorText_Complete()
return 0
end
def EIBOpenVBusmonitorText()
puts "EIBOpenVBusmonitorText()" if $DEBUG
if EIBOpenVBusmonitorText_async() == -1
return -1
end
return EIBComplete()
end
def __EIBReset_Complete()
puts "__EIBReset_Complete()" if $DEBUG
@__complete = nil
if __EIB_GetRequest() == -1
return -1
end
if (((@data[0])<<8)|(@data[0+1])) != 4 or @data.length < 2
@errno = Errno::ECONNRESET
return -1
end
return 0
end
def EIBReset_async()
puts "EIBReset_async()" if $DEBUG
ibuf = [0] * 2;
ibuf[0] = 0
ibuf[1] = 4
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
@__complete = __EIBReset_Complete()
return 0
end
def EIBReset()
puts "EIBReset()" if $DEBUG
if EIBReset_async() == -1
return -1
end
return EIBComplete()
end
def EIBSendAPDU(data)
puts "EIBSendAPDU()" if $DEBUG
ibuf = [0] * 2;
if data.length < 2
@errno = Errno::EINVAL
return -1
end
@sendlen = data.length
ibuf.concat(data)
ibuf[0] = 0
ibuf[1] = 37
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
return @sendlen
end
def EIBSendGroup(dest, data)
puts "EIBSendGroup()" if $DEBUG
ibuf = [0] * 4;
ibuf[2] = ((dest>>8)&0xff)
ibuf[3] = ((dest)&0xff)
if data.length < 2
@errno = Errno::EINVAL
return -1
end
@sendlen = data.length
ibuf.concat(data)
ibuf[0] = 0
ibuf[1] = 39
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
return @sendlen
end
def EIBSendTPDU(dest, data)
puts "EIBSendTPDU()" if $DEBUG
ibuf = [0] * 4;
ibuf[2] = ((dest>>8)&0xff)
ibuf[3] = ((dest)&0xff)
if data.length < 2
@errno = Errno::EINVAL
return -1
end
@sendlen = data.length
ibuf.concat(data)
ibuf[0] = 0
ibuf[1] = 37
md = caller[0].match(/`(\w*)'/); clr = md and md[1] or caller[0]
puts("#{clr} calling __EIB_SendRequest, ibuf=#{ibuf.inspect}") if $DEBUG
if __EIB_SendRequest(ibuf) == -1
return -1
end
return @sendlen
end