Class: EIBConnection

Inherits:
Object
  • Object
show all
Defined in:
lib/ansible/knx/EIBConnection.rb

Constant Summary collapse

IMG_UNKNOWN_ERROR =
0
IMG_UNRECOG_FORMAT =
1
IMG_INVALID_FORMAT =
2
IMG_NO_BCUTYPE =
3
IMG_UNKNOWN_BCUTYPE =
4
IMG_NO_CODE =
5
IMG_NO_SIZE =
6
IMG_LODATA_OVERFLOW =
7
IMG_HIDATA_OVERFLOW =
8
IMG_TEXT_OVERFLOW =
9
IMG_NO_ADDRESS =
10
IMG_WRONG_SIZE =
11
IMG_IMAGE_LOADABLE =
12
IMG_NO_DEVICE_CONNECTION =
13
IMG_MASK_READ_FAILED =
14
IMG_WRONG_MASK_VERSION =
15
IMG_CLEAR_ERROR =
16
IMG_RESET_ADDR_TAB =
17
IMG_LOAD_HEADER =
18
IMG_LOAD_MAIN =
19
IMG_ZERO_RAM =
20
IMG_FINALIZE_ADDR_TAB =
21
IMG_PREPARE_RUN =
22
IMG_RESTART =
23
IMG_LOADED =
24
IMG_NO_START =
25
IMG_WRONG_ADDRTAB =
26
IMG_ADDRTAB_OVERFLOW =
27
IMG_OVERLAP_ASSOCTAB =
28
IMG_OVERLAP_TEXT =
29
IMG_NEGATIV_TEXT_SIZE =
30
IMG_OVERLAP_PARAM =
31
IMG_OVERLAP_EEPROM =
32
IMG_OBJTAB_OVERFLOW =
33
IMG_WRONG_LOADCTL =
34
IMG_UNLOAD_ADDR =
35
IMG_UNLOAD_ASSOC =
36
IMG_UNLOAD_PROG =
37
IMG_LOAD_ADDR =
38
IMG_WRITE_ADDR =
39
IMG_SET_ADDR =
40
IMG_FINISH_ADDR =
41
IMG_LOAD_ASSOC =
42
IMG_WRITE_ASSOC =
43
IMG_SET_ASSOC =
44
IMG_FINISH_ASSOC =
45
IMG_LOAD_PROG =
46
IMG_ALLOC_LORAM =
47
IMG_ALLOC_HIRAM =
48
IMG_ALLOC_INIT =
49
IMG_ALLOC_RO =
50
IMG_ALLOC_EEPROM =
51
IMG_ALLOC_PARAM =
52
IMG_SET_PROG =
53
IMG_SET_TASK_PTR =
54
IMG_SET_OBJ =
55
IMG_SET_TASK2 =
56
IMG_FINISH_PROC =
57
IMG_WRONG_CHECKLIM =
58
IMG_INVALID_KEY =
59
IMG_AUTHORIZATION_FAILED =
60
IMG_KEY_WRITE =
61

Instance Method Summary collapse

Constructor Details

#initializeEIBConnection

Returns a new instance of EIBConnection.



69
70
71
72
73
74
75
76
# File 'lib/ansible/knx/EIBConnection.rb', line 69

def initialize()
  @data = []
  @readlen = 0
  @datalen = 0
  @fd = nil
  @errno = 0
  @__complete = nil
end

Instance Method Details

#__EIB_Cache_Clear_CompleteObject



401
402
403
404
405
406
407
408
409
410
411
412
# File 'lib/ansible/knx/EIBConnection.rb', line 401

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

#__EIB_Cache_Disable_CompleteObject



437
438
439
440
441
442
443
444
445
446
447
448
# File 'lib/ansible/knx/EIBConnection.rb', line 437

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

#__EIB_Cache_Enable_CompleteObject



473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
# File 'lib/ansible/knx/EIBConnection.rb', line 473

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

#__EIB_Cache_LastUpdates_CompleteObject



657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
# File 'lib/ansible/knx/EIBConnection.rb', line 657

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

#__EIB_Cache_Read_CompleteObject



513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
# File 'lib/ansible/knx/EIBConnection.rb', line 513

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

#__EIB_Cache_Read_Sync_CompleteObject



565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
# File 'lib/ansible/knx/EIBConnection.rb', line 565

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

#__EIB_Cache_Remove_CompleteObject



619
620
621
622
623
624
625
626
627
628
629
630
# File 'lib/ansible/knx/EIBConnection.rb', line 619

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

#__EIB_CheckRequest(block) ⇒ Object



191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
# File 'lib/ansible/knx/EIBConnection.rb', line 191

def __EIB_CheckRequest(block)
  puts "__EIB_CheckRequest(block=#{block})" if $DEBUG
  if @fd == nil
    @errno = Errno::ECONNRESET
    return -1
  end
  if @readlen == 0
    @head = []
    @data = []
  end
  if @readlen < 2
    maxlen = 2-@readlen
    result = block ? @fd.recv(maxlen) : @fd.recv_nonblock(maxlen)
    raise Errno::ECONNRESET if block and (result.length == 0)
    puts "__EIB_CheckRequest received #{result.length} bytes: #{result.inspect})" if $DEBUG
    if result.length > 0
      @head.concat(result.split('').collect{|c| c.unpack('c')[0]})
    end
    puts "__EIB_CheckRequest @head after recv. = #{@head.inspect})" if $DEBUG
    @readlen += result.length
  end
  if @readlen < 2
    return 0
  end
  @datalen = (@head[0] << 8) | @head[1]
  if @readlen < @datalen + 2
    maxlen = @datalen + 2 -@readlen
    result = block ? @fd.recv(maxlen) : @fd.recv_nonblock(maxlen)
    raise Errno::ECONNRESET if block and (result.length == 0)
    puts "__EIB_CheckRequest received #{result.length} bytes: #{result.inspect})" if $DEBUG
    if result.length > 0
      @data.concat(result.split('').collect{|c| c.unpack('c')[0]})
	puts "__EIB_CheckRequest @data after recv. = #{@data.inspect})" if $DEBUG
    end
    @readlen += result.length
  end #if
  return 0      
end

#__EIB_GetRequestObject



178
179
180
181
182
183
184
185
186
187
188
189
# File 'lib/ansible/knx/EIBConnection.rb', line 178

def __EIB_GetRequest()
  puts "__EIB_GetRequest()" if $DEBUG
   while true
    if __EIB_CheckRequest(true) == -1
      return -1
    end
    if @readlen >= 2 and @readlen >= @datalen + 2
      @readlen = 0
      return 0
    end
  end
end

#__EIB_LoadImage_CompleteObject



702
703
704
705
706
707
708
709
710
711
712
713
# File 'lib/ansible/knx/EIBConnection.rb', line 702

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

#__EIB_M_GetMaskVersion_CompleteObject



1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
# File 'lib/ansible/knx/EIBConnection.rb', line 1523

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

#__EIB_M_Progmode_Off_CompleteObject



1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
# File 'lib/ansible/knx/EIBConnection.rb', line 1561

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

#__EIB_M_Progmode_On_CompleteObject



1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
# File 'lib/ansible/knx/EIBConnection.rb', line 1600

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

#__EIB_M_Progmode_Status_CompleteObject



1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
# File 'lib/ansible/knx/EIBConnection.rb', line 1639

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

#__EIB_M_Progmode_Toggle_CompleteObject



1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
# File 'lib/ansible/knx/EIBConnection.rb', line 1678

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

#__EIB_M_ReadIndividualAddresses_CompleteObject



1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
# File 'lib/ansible/knx/EIBConnection.rb', line 1717

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

#__EIB_M_WriteIndividualAddress_CompleteObject



1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
# File 'lib/ansible/knx/EIBConnection.rb', line 1755

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

#__EIB_MC_Authorize_CompleteObject



744
745
746
747
748
749
750
751
752
753
754
755
# File 'lib/ansible/knx/EIBConnection.rb', line 744

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

#__EIB_MC_Connect_CompleteObject



785
786
787
788
789
790
791
792
793
794
795
796
# File 'lib/ansible/knx/EIBConnection.rb', line 785

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

#__EIB_MC_GetMaskVersion_CompleteObject



861
862
863
864
865
866
867
868
869
870
871
872
# File 'lib/ansible/knx/EIBConnection.rb', line 861

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

#__EIB_MC_GetPEIType_CompleteObject



897
898
899
900
901
902
903
904
905
906
907
908
# File 'lib/ansible/knx/EIBConnection.rb', line 897

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

#__EIB_MC_Individual_Open_CompleteObject



823
824
825
826
827
828
829
830
831
832
833
834
# File 'lib/ansible/knx/EIBConnection.rb', line 823

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

#__EIB_MC_Progmode_Off_CompleteObject



933
934
935
936
937
938
939
940
941
942
943
944
# File 'lib/ansible/knx/EIBConnection.rb', line 933

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

#__EIB_MC_Progmode_On_CompleteObject



970
971
972
973
974
975
976
977
978
979
980
981
# File 'lib/ansible/knx/EIBConnection.rb', line 970

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

#__EIB_MC_Progmode_Status_CompleteObject



1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
# File 'lib/ansible/knx/EIBConnection.rb', line 1007

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

#__EIB_MC_Progmode_Toggle_CompleteObject



1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
# File 'lib/ansible/knx/EIBConnection.rb', line 1044

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

#__EIB_MC_PropertyDesc_CompleteObject



1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
# File 'lib/ansible/knx/EIBConnection.rb', line 1081

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

#__EIB_MC_PropertyRead_CompleteObject



1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
# File 'lib/ansible/knx/EIBConnection.rb', line 1131

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

#__EIB_MC_PropertyScan_CompleteObject



1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
# File 'lib/ansible/knx/EIBConnection.rb', line 1174

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

#__EIB_MC_PropertyWrite_CompleteObject



1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
# File 'lib/ansible/knx/EIBConnection.rb', line 1212

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

#__EIB_MC_Read_CompleteObject



1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
# File 'lib/ansible/knx/EIBConnection.rb', line 1303

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

#__EIB_MC_ReadADC_CompleteObject



1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
# File 'lib/ansible/knx/EIBConnection.rb', line 1261

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

#__EIB_MC_Restart_CompleteObject



1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
# File 'lib/ansible/knx/EIBConnection.rb', line 1345

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

#__EIB_MC_SetKey_CompleteObject



1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
# File 'lib/ansible/knx/EIBConnection.rb', line 1381

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

#__EIB_MC_Write_CompleteObject



1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
# File 'lib/ansible/knx/EIBConnection.rb', line 1427

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

#__EIB_MC_Write_Plain_CompleteObject



1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
# File 'lib/ansible/knx/EIBConnection.rb', line 1477

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

#__EIB_SendRequest(data) ⇒ Object



142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
# File 'lib/ansible/knx/EIBConnection.rb', line 142

def __EIB_SendRequest(data)
  if @fd == nil
    @errno = Errno::ECONNRESET
    return -1
  end
  if data.length < 2 or data.length > 0xffff
    @errno = Errno::EINVAL
    return -1
  end
  data = [ (data.length>>8)&0xff, (data.length)&0xff ] + data
  #puts "__EIB_SendRequest(data=#{data.inspect} length=#{data.length})" if $DEBUG
  result = data.pack("C*")
  @fd.send(result, 0)
  #puts "__EIB_SendRequest sent #{result.length} bytes: #{result.hexdump}" if $DEBUG
  return 0
end

#__EIBGetAPDU_CompleteObject



230
231
232
233
234
235
236
237
238
239
240
241
242
# File 'lib/ansible/knx/EIBConnection.rb', line 230

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

#__EIBGetAPDU_Src_CompleteObject



261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
# File 'lib/ansible/knx/EIBConnection.rb', line 261

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

#__EIBGetBusmonitorPacket_CompleteObject



296
297
298
299
300
301
302
303
304
305
306
307
308
# File 'lib/ansible/knx/EIBConnection.rb', line 296

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

#__EIBGetGroup_Src_CompleteObject



327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
# File 'lib/ansible/knx/EIBConnection.rb', line 327

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

#__EIBGetTPDU_CompleteObject



366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
# File 'lib/ansible/knx/EIBConnection.rb', line 366

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

#__EIBOpen_GroupSocket_CompleteObject



1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
# File 'lib/ansible/knx/EIBConnection.rb', line 1885

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

#__EIBOpenBusmonitor_CompleteObject



1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
# File 'lib/ansible/knx/EIBConnection.rb', line 1805

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

#__EIBOpenBusmonitorText_CompleteObject



1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
# File 'lib/ansible/knx/EIBConnection.rb', line 1845

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

#__EIBOpenT_Broadcast_CompleteObject



1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
# File 'lib/ansible/knx/EIBConnection.rb', line 1926

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

#__EIBOpenT_Connection_CompleteObject



1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
# File 'lib/ansible/knx/EIBConnection.rb', line 1967

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

#__EIBOpenT_Group_CompleteObject



2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
# File 'lib/ansible/knx/EIBConnection.rb', line 2005

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

#__EIBOpenT_Individual_CompleteObject



2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
# File 'lib/ansible/knx/EIBConnection.rb', line 2048

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

#__EIBOpenT_TPDU_CompleteObject



2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
# File 'lib/ansible/knx/EIBConnection.rb', line 2091

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

#__EIBOpenVBusmonitor_CompleteObject



2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
# File 'lib/ansible/knx/EIBConnection.rb', line 2129

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

#__EIBOpenVBusmonitorText_CompleteObject



2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
# File 'lib/ansible/knx/EIBConnection.rb', line 2169

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

#__EIBReset_CompleteObject



2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
# File 'lib/ansible/knx/EIBConnection.rb', line 2209

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

#EIB_Cache_ClearObject



429
430
431
432
433
434
435
# File 'lib/ansible/knx/EIBConnection.rb', line 429

def EIB_Cache_Clear()
  puts "EIB_Cache_Clear()" if $DEBUG
  if EIB_Cache_Clear_async() == -1
    return -1
  end
  return EIBComplete()
end

#EIB_Cache_Clear_asyncObject



415
416
417
418
419
420
421
422
423
424
425
426
427
# File 'lib/ansible/knx/EIBConnection.rb', line 415

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

#EIB_Cache_DisableObject



465
466
467
468
469
470
471
# File 'lib/ansible/knx/EIBConnection.rb', line 465

def EIB_Cache_Disable()
  puts "EIB_Cache_Disable()" if $DEBUG
  if EIB_Cache_Disable_async() == -1
    return -1
  end
  return EIBComplete()
end

#EIB_Cache_Disable_asyncObject



451
452
453
454
455
456
457
458
459
460
461
462
463
# File 'lib/ansible/knx/EIBConnection.rb', line 451

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

#EIB_Cache_EnableObject



505
506
507
508
509
510
511
# File 'lib/ansible/knx/EIBConnection.rb', line 505

def EIB_Cache_Enable()
  puts "EIB_Cache_Enable()" if $DEBUG
  if EIB_Cache_Enable_async() == -1
    return -1
  end
  return EIBComplete()
end

#EIB_Cache_Enable_asyncObject



491
492
493
494
495
496
497
498
499
500
501
502
503
# File 'lib/ansible/knx/EIBConnection.rb', line 491

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

#EIB_Cache_LastUpdates(start, timeout, buf, ende) ⇒ Object



694
695
696
697
698
699
700
# File 'lib/ansible/knx/EIBConnection.rb', line 694

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

#EIB_Cache_LastUpdates_async(start, timeout, buf, ende) ⇒ Object



675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
# File 'lib/ansible/knx/EIBConnection.rb', line 675

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

#EIB_Cache_Read(dst, src, buf) ⇒ Object



557
558
559
560
561
562
563
# File 'lib/ansible/knx/EIBConnection.rb', line 557

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

#EIB_Cache_Read_async(dst, src, buf) ⇒ Object



539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
# File 'lib/ansible/knx/EIBConnection.rb', line 539

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

#EIB_Cache_Read_Sync(dst, src, buf, age) ⇒ Object



611
612
613
614
615
616
617
# File 'lib/ansible/knx/EIBConnection.rb', line 611

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

#EIB_Cache_Read_Sync_async(dst, src, buf, age) ⇒ Object



591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
# File 'lib/ansible/knx/EIBConnection.rb', line 591

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

#EIB_Cache_Remove(dest) ⇒ Object



649
650
651
652
653
654
655
# File 'lib/ansible/knx/EIBConnection.rb', line 649

def EIB_Cache_Remove(dest)
  puts "EIB_Cache_Remove()" if $DEBUG
  if EIB_Cache_Remove_async(dest) == -1
    return -1
  end
  return EIBComplete()
end

#EIB_Cache_Remove_async(dest) ⇒ Object



633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
# File 'lib/ansible/knx/EIBConnection.rb', line 633

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

#EIB_LoadImage(image) ⇒ Object



736
737
738
739
740
741
742
# File 'lib/ansible/knx/EIBConnection.rb', line 736

def EIB_LoadImage(image)
  puts "EIB_LoadImage()" if $DEBUG
  if EIB_LoadImage_async(image) == -1
    return -1
  end
  return EIBComplete()
end

#EIB_LoadImage_async(image) ⇒ Object



716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
# File 'lib/ansible/knx/EIBConnection.rb', line 716

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

#EIB_M_GetMaskVersion(dest) ⇒ Object



1553
1554
1555
1556
1557
1558
1559
# File 'lib/ansible/knx/EIBConnection.rb', line 1553

def EIB_M_GetMaskVersion(dest)
  puts "EIB_M_GetMaskVersion()" if $DEBUG
  if EIB_M_GetMaskVersion_async(dest) == -1
    return -1
  end
  return EIBComplete()
end

#EIB_M_GetMaskVersion_async(dest) ⇒ Object



1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
# File 'lib/ansible/knx/EIBConnection.rb', line 1537

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

#EIB_M_Progmode_Off(dest) ⇒ Object



1592
1593
1594
1595
1596
1597
1598
# File 'lib/ansible/knx/EIBConnection.rb', line 1592

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

#EIB_M_Progmode_Off_async(dest) ⇒ Object



1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
# File 'lib/ansible/knx/EIBConnection.rb', line 1575

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

#EIB_M_Progmode_On(dest) ⇒ Object



1631
1632
1633
1634
1635
1636
1637
# File 'lib/ansible/knx/EIBConnection.rb', line 1631

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

#EIB_M_Progmode_On_async(dest) ⇒ Object



1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
# File 'lib/ansible/knx/EIBConnection.rb', line 1614

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

#EIB_M_Progmode_Status(dest) ⇒ Object



1670
1671
1672
1673
1674
1675
1676
# File 'lib/ansible/knx/EIBConnection.rb', line 1670

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

#EIB_M_Progmode_Status_async(dest) ⇒ Object



1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
# File 'lib/ansible/knx/EIBConnection.rb', line 1653

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

#EIB_M_Progmode_Toggle(dest) ⇒ Object



1709
1710
1711
1712
1713
1714
1715
# File 'lib/ansible/knx/EIBConnection.rb', line 1709

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

#EIB_M_Progmode_Toggle_async(dest) ⇒ Object



1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
# File 'lib/ansible/knx/EIBConnection.rb', line 1692

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

#EIB_M_ReadIndividualAddresses(buf) ⇒ Object



1747
1748
1749
1750
1751
1752
1753
# File 'lib/ansible/knx/EIBConnection.rb', line 1747

def EIB_M_ReadIndividualAddresses(buf)
  puts "EIB_M_ReadIndividualAddresses()" if $DEBUG
  if EIB_M_ReadIndividualAddresses_async(buf) == -1
    return -1
  end
  return EIBComplete()
end

#EIB_M_ReadIndividualAddresses_async(buf) ⇒ Object



1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
# File 'lib/ansible/knx/EIBConnection.rb', line 1732

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

#EIB_M_WriteIndividualAddress(dest) ⇒ Object



1797
1798
1799
1800
1801
1802
1803
# File 'lib/ansible/knx/EIBConnection.rb', line 1797

def EIB_M_WriteIndividualAddress(dest)
  puts "EIB_M_WriteIndividualAddress()" if $DEBUG
  if EIB_M_WriteIndividualAddress_async(dest) == -1
    return -1
  end
  return EIBComplete()
end

#EIB_M_WriteIndividualAddress_async(dest) ⇒ Object



1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
# File 'lib/ansible/knx/EIBConnection.rb', line 1781

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

#EIB_MC_Authorize(key) ⇒ Object



777
778
779
780
781
782
783
# File 'lib/ansible/knx/EIBConnection.rb', line 777

def EIB_MC_Authorize(key)
  puts "EIB_MC_Authorize()" if $DEBUG
  if EIB_MC_Authorize_async(key) == -1
    return -1
  end
  return EIBComplete()
end

#EIB_MC_Authorize_async(key) ⇒ Object



758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
# File 'lib/ansible/knx/EIBConnection.rb', line 758

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

#EIB_MC_Connect(dest) ⇒ Object



815
816
817
818
819
820
821
# File 'lib/ansible/knx/EIBConnection.rb', line 815

def EIB_MC_Connect(dest)
  puts "EIB_MC_Connect()" if $DEBUG
  if EIB_MC_Connect_async(dest) == -1
    return -1
  end
  return EIBComplete()
end

#EIB_MC_Connect_async(dest) ⇒ Object



799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
# File 'lib/ansible/knx/EIBConnection.rb', line 799

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

#EIB_MC_GetMaskVersionObject



889
890
891
892
893
894
895
# File 'lib/ansible/knx/EIBConnection.rb', line 889

def EIB_MC_GetMaskVersion()
  puts "EIB_MC_GetMaskVersion()" if $DEBUG
  if EIB_MC_GetMaskVersion_async() == -1
    return -1
  end
  return EIBComplete()
end

#EIB_MC_GetMaskVersion_asyncObject



875
876
877
878
879
880
881
882
883
884
885
886
887
# File 'lib/ansible/knx/EIBConnection.rb', line 875

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

#EIB_MC_GetPEITypeObject



925
926
927
928
929
930
931
# File 'lib/ansible/knx/EIBConnection.rb', line 925

def EIB_MC_GetPEIType()
  puts "EIB_MC_GetPEIType()" if $DEBUG
  if EIB_MC_GetPEIType_async() == -1
    return -1
  end
  return EIBComplete()
end

#EIB_MC_GetPEIType_asyncObject



911
912
913
914
915
916
917
918
919
920
921
922
923
# File 'lib/ansible/knx/EIBConnection.rb', line 911

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

#EIB_MC_Individual_Open(dest) ⇒ Object



853
854
855
856
857
858
859
# File 'lib/ansible/knx/EIBConnection.rb', line 853

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

#EIB_MC_Individual_Open_async(dest) ⇒ Object



837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
# File 'lib/ansible/knx/EIBConnection.rb', line 837

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

#EIB_MC_Progmode_OffObject



962
963
964
965
966
967
968
# File 'lib/ansible/knx/EIBConnection.rb', line 962

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

#EIB_MC_Progmode_Off_asyncObject



947
948
949
950
951
952
953
954
955
956
957
958
959
960
# File 'lib/ansible/knx/EIBConnection.rb', line 947

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

#EIB_MC_Progmode_OnObject



999
1000
1001
1002
1003
1004
1005
# File 'lib/ansible/knx/EIBConnection.rb', line 999

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

#EIB_MC_Progmode_On_asyncObject



984
985
986
987
988
989
990
991
992
993
994
995
996
997
# File 'lib/ansible/knx/EIBConnection.rb', line 984

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

#EIB_MC_Progmode_StatusObject



1036
1037
1038
1039
1040
1041
1042
# File 'lib/ansible/knx/EIBConnection.rb', line 1036

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

#EIB_MC_Progmode_Status_asyncObject



1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
# File 'lib/ansible/knx/EIBConnection.rb', line 1021

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

#EIB_MC_Progmode_ToggleObject



1073
1074
1075
1076
1077
1078
1079
# File 'lib/ansible/knx/EIBConnection.rb', line 1073

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

#EIB_MC_Progmode_Toggle_asyncObject



1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
# File 'lib/ansible/knx/EIBConnection.rb', line 1058

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

#EIB_MC_PropertyDesc(obj, propertyno, proptype, max_nr_of_elem, access) ⇒ Object



1123
1124
1125
1126
1127
1128
1129
# File 'lib/ansible/knx/EIBConnection.rb', line 1123

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

#EIB_MC_PropertyDesc_async(obj, propertyno, proptype, max_nr_of_elem, access) ⇒ Object



1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
# File 'lib/ansible/knx/EIBConnection.rb', line 1104

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

#EIB_MC_PropertyRead(obj, propertyno, start, nr_of_elem, buf) ⇒ Object



1166
1167
1168
1169
1170
1171
1172
# File 'lib/ansible/knx/EIBConnection.rb', line 1166

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

#EIB_MC_PropertyRead_async(obj, propertyno, start, nr_of_elem, buf) ⇒ Object



1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
# File 'lib/ansible/knx/EIBConnection.rb', line 1146

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

#EIB_MC_PropertyScan(buf) ⇒ Object



1204
1205
1206
1207
1208
1209
1210
# File 'lib/ansible/knx/EIBConnection.rb', line 1204

def EIB_MC_PropertyScan(buf)
  puts "EIB_MC_PropertyScan()" if $DEBUG
  if EIB_MC_PropertyScan_async(buf) == -1
    return -1
  end
  return EIBComplete()
end

#EIB_MC_PropertyScan_async(buf) ⇒ Object



1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
# File 'lib/ansible/knx/EIBConnection.rb', line 1189

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

#EIB_MC_PropertyWrite(obj, propertyno, start, nr_of_elem, buf, res) ⇒ Object



1253
1254
1255
1256
1257
1258
1259
# File 'lib/ansible/knx/EIBConnection.rb', line 1253

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

#EIB_MC_PropertyWrite_async(obj, propertyno, start, nr_of_elem, buf, res) ⇒ Object



1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
# File 'lib/ansible/knx/EIBConnection.rb', line 1227

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

#EIB_MC_Read(addr, buf_len, buf) ⇒ Object



1337
1338
1339
1340
1341
1342
1343
# File 'lib/ansible/knx/EIBConnection.rb', line 1337

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

#EIB_MC_Read_async(addr, buf_len, buf) ⇒ Object



1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
# File 'lib/ansible/knx/EIBConnection.rb', line 1318

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

#EIB_MC_ReadADC(channel, count, val) ⇒ Object



1295
1296
1297
1298
1299
1300
1301
# File 'lib/ansible/knx/EIBConnection.rb', line 1295

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

#EIB_MC_ReadADC_async(channel, count, val) ⇒ Object



1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
# File 'lib/ansible/knx/EIBConnection.rb', line 1278

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

#EIB_MC_RestartObject



1373
1374
1375
1376
1377
1378
1379
# File 'lib/ansible/knx/EIBConnection.rb', line 1373

def EIB_MC_Restart()
  puts "EIB_MC_Restart()" if $DEBUG
  if EIB_MC_Restart_async() == -1
    return -1
  end
  return EIBComplete()
end

#EIB_MC_Restart_asyncObject



1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
# File 'lib/ansible/knx/EIBConnection.rb', line 1359

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

#EIB_MC_SetKey(key, level) ⇒ Object



1419
1420
1421
1422
1423
1424
1425
# File 'lib/ansible/knx/EIBConnection.rb', line 1419

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

#EIB_MC_SetKey_async(key, level) ⇒ Object



1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
# File 'lib/ansible/knx/EIBConnection.rb', line 1399

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

#EIB_MC_Write(addr, buf) ⇒ Object



1469
1470
1471
1472
1473
1474
1475
# File 'lib/ansible/knx/EIBConnection.rb', line 1469

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

#EIB_MC_Write_async(addr, buf) ⇒ Object



1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
# File 'lib/ansible/knx/EIBConnection.rb', line 1445

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

#EIB_MC_Write_Plain(addr, buf) ⇒ Object



1515
1516
1517
1518
1519
1520
1521
# File 'lib/ansible/knx/EIBConnection.rb', line 1515

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

#EIB_MC_Write_Plain_async(addr, buf) ⇒ Object



1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
# File 'lib/ansible/knx/EIBConnection.rb', line 1491

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

#EIB_Poll_CompleteObject



167
168
169
170
171
172
173
174
175
176
# File 'lib/ansible/knx/EIBConnection.rb', line 167

def EIB_Poll_Complete()
  puts "__EIB_Poll_Complete()" if $DEBUG
  if __EIB_CheckRequest(false) == -1
    return -1
  end
  if @readlen < 2 or (@readlen >= 2 and @readlen < @datalen + 2)
    return 0
  end
  return 1
end

#EIB_Poll_FDObject



159
160
161
162
163
164
165
# File 'lib/ansible/knx/EIBConnection.rb', line 159

def EIB_Poll_FD()
  if @fd == nil
    @errno = Errno::EINVAL
    return -1
  end
  return @fd
end

#EIBCloseObject



127
128
129
130
131
132
133
134
# File 'lib/ansible/knx/EIBConnection.rb', line 127

def EIBClose()
  if @fd == nil
    @errno = Errno::EINVAL
    return -1
  end
  @fd.close()
  @fd = nil
end

#EIBClose_syncObject



136
137
138
139
140
# File 'lib/ansible/knx/EIBConnection.rb', line 136

def EIBClose_sync()
  puts "EIBClose_sync()" if $DEBUG
  EIBReset()
  return EIBClose()
end

#EIBCompleteObject



119
120
121
122
123
124
125
# File 'lib/ansible/knx/EIBConnection.rb', line 119

def EIBComplete()
  if @__complete == nil
    @errno = Errno::EINVAL
    return -1
  end
  return @__complete
end

#EIBGetAPDU(buf) ⇒ Object



253
254
255
256
257
258
259
# File 'lib/ansible/knx/EIBConnection.rb', line 253

def EIBGetAPDU(buf)
  puts "EIBGetAPDU()" if $DEBUG
  if EIBGetAPDU_async(buf) == -1
    return -1
  end
  return EIBComplete()
end

#EIBGetAPDU_async(buf) ⇒ Object



245
246
247
248
249
250
251
# File 'lib/ansible/knx/EIBConnection.rb', line 245

def EIBGetAPDU_async(buf)
  puts "EIBGetAPDU_async()" if $DEBUG
  ibuf = [0] * 2;
  @buf = buf
  @__complete = __EIBGetAPDU_Complete()
  return 0
end

#EIBGetAPDU_Src(buf, src) ⇒ Object



288
289
290
291
292
293
294
# File 'lib/ansible/knx/EIBConnection.rb', line 288

def EIBGetAPDU_Src(buf, src)
  puts "EIBGetAPDU_Src()" if $DEBUG
  if EIBGetAPDU_Src_async(buf, src) == -1
    return -1
  end
  return EIBComplete()
end

#EIBGetAPDU_Src_async(buf, src) ⇒ Object



279
280
281
282
283
284
285
286
# File 'lib/ansible/knx/EIBConnection.rb', line 279

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

#EIBGetBusmonitorPacket(buf) ⇒ Object



319
320
321
322
323
324
325
# File 'lib/ansible/knx/EIBConnection.rb', line 319

def EIBGetBusmonitorPacket(buf)
  puts "EIBGetBusmonitorPacket()" if $DEBUG
  if EIBGetBusmonitorPacket_async(buf) == -1
    return -1
  end
  return EIBComplete()
end

#EIBGetBusmonitorPacket_async(buf) ⇒ Object



311
312
313
314
315
316
317
# File 'lib/ansible/knx/EIBConnection.rb', line 311

def EIBGetBusmonitorPacket_async(buf)
  puts "EIBGetBusmonitorPacket_async()" if $DEBUG
  ibuf = [0] * 2;
  @buf = buf
  @__complete = __EIBGetBusmonitorPacket_Complete()
  return 0
end

#EIBGetGroup_Src(buf, src, dest) ⇒ Object



358
359
360
361
362
363
364
# File 'lib/ansible/knx/EIBConnection.rb', line 358

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

#EIBGetGroup_Src_async(buf, src, dest) ⇒ Object



348
349
350
351
352
353
354
355
356
# File 'lib/ansible/knx/EIBConnection.rb', line 348

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

#EIBGetTPDU(buf, src) ⇒ Object



393
394
395
396
397
398
399
# File 'lib/ansible/knx/EIBConnection.rb', line 393

def EIBGetTPDU(buf, src)
  puts "EIBGetTPDU()" if $DEBUG
  if EIBGetTPDU_async(buf, src) == -1
    return -1
  end
  return EIBComplete()
end

#EIBGetTPDU_async(buf, src) ⇒ Object



384
385
386
387
388
389
390
391
# File 'lib/ansible/knx/EIBConnection.rb', line 384

def EIBGetTPDU_async(buf, src)
  puts "EIBGetTPDU_async()" if $DEBUG
  ibuf = [0] * 2;
  @buf = buf
  @ptr5 = src
  @__complete = __EIBGetTPDU_Complete()
  return 0
end

#EIBOpen_GroupSocket(write_only) ⇒ Object



1918
1919
1920
1921
1922
1923
1924
# File 'lib/ansible/knx/EIBConnection.rb', line 1918

def EIBOpen_GroupSocket(write_only)
  puts "EIBOpen_GroupSocket()" if $DEBUG
  if EIBOpen_GroupSocket_async(write_only) == -1
    return -1
  end
  return EIBComplete()
end

#EIBOpen_GroupSocket_async(write_only) ⇒ Object



1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
# File 'lib/ansible/knx/EIBConnection.rb', line 1899

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

#EIBOpenBusmonitorObject



1837
1838
1839
1840
1841
1842
1843
# File 'lib/ansible/knx/EIBConnection.rb', line 1837

def EIBOpenBusmonitor()
  puts "EIBOpenBusmonitor()" if $DEBUG
  if EIBOpenBusmonitor_async() == -1
    return -1
  end
  return EIBComplete()
end

#EIBOpenBusmonitor_asyncObject



1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
# File 'lib/ansible/knx/EIBConnection.rb', line 1823

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

#EIBOpenBusmonitorTextObject



1877
1878
1879
1880
1881
1882
1883
# File 'lib/ansible/knx/EIBConnection.rb', line 1877

def EIBOpenBusmonitorText()
  puts "EIBOpenBusmonitorText()" if $DEBUG
  if EIBOpenBusmonitorText_async() == -1
    return -1
  end
  return EIBComplete()
end

#EIBOpenBusmonitorText_asyncObject



1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
# File 'lib/ansible/knx/EIBConnection.rb', line 1863

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

#EIBOpenT_Broadcast(write_only) ⇒ Object



1959
1960
1961
1962
1963
1964
1965
# File 'lib/ansible/knx/EIBConnection.rb', line 1959

def EIBOpenT_Broadcast(write_only)
  puts "EIBOpenT_Broadcast()" if $DEBUG
  if EIBOpenT_Broadcast_async(write_only) == -1
    return -1
  end
  return EIBComplete()
end

#EIBOpenT_Broadcast_async(write_only) ⇒ Object



1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
# File 'lib/ansible/knx/EIBConnection.rb', line 1940

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

#EIBOpenT_Connection(dest) ⇒ Object



1997
1998
1999
2000
2001
2002
2003
# File 'lib/ansible/knx/EIBConnection.rb', line 1997

def EIBOpenT_Connection(dest)
  puts "EIBOpenT_Connection()" if $DEBUG
  if EIBOpenT_Connection_async(dest) == -1
    return -1
  end
  return EIBComplete()
end

#EIBOpenT_Connection_async(dest) ⇒ Object



1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
# File 'lib/ansible/knx/EIBConnection.rb', line 1981

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

#EIBOpenT_Group(dest, write_only) ⇒ Object



2040
2041
2042
2043
2044
2045
2046
# File 'lib/ansible/knx/EIBConnection.rb', line 2040

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

#EIBOpenT_Group_async(dest, write_only) ⇒ Object



2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
# File 'lib/ansible/knx/EIBConnection.rb', line 2019

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

#EIBOpenT_Individual(dest, write_only) ⇒ Object



2083
2084
2085
2086
2087
2088
2089
# File 'lib/ansible/knx/EIBConnection.rb', line 2083

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

#EIBOpenT_Individual_async(dest, write_only) ⇒ Object



2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
# File 'lib/ansible/knx/EIBConnection.rb', line 2062

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

#EIBOpenT_TPDU(src) ⇒ Object



2121
2122
2123
2124
2125
2126
2127
# File 'lib/ansible/knx/EIBConnection.rb', line 2121

def EIBOpenT_TPDU(src)
  puts "EIBOpenT_TPDU()" if $DEBUG
  if EIBOpenT_TPDU_async(src) == -1
    return -1
  end
  return EIBComplete()
end

#EIBOpenT_TPDU_async(src) ⇒ Object



2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
# File 'lib/ansible/knx/EIBConnection.rb', line 2105

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

#EIBOpenVBusmonitorObject



2161
2162
2163
2164
2165
2166
2167
# File 'lib/ansible/knx/EIBConnection.rb', line 2161

def EIBOpenVBusmonitor()
  puts "EIBOpenVBusmonitor()" if $DEBUG
  if EIBOpenVBusmonitor_async() == -1
    return -1
  end
  return EIBComplete()
end

#EIBOpenVBusmonitor_asyncObject



2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
# File 'lib/ansible/knx/EIBConnection.rb', line 2147

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

#EIBOpenVBusmonitorTextObject



2201
2202
2203
2204
2205
2206
2207
# File 'lib/ansible/knx/EIBConnection.rb', line 2201

def EIBOpenVBusmonitorText()
  puts "EIBOpenVBusmonitorText()" if $DEBUG
  if EIBOpenVBusmonitorText_async() == -1
    return -1
  end
  return EIBComplete()
end

#EIBOpenVBusmonitorText_asyncObject



2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
# File 'lib/ansible/knx/EIBConnection.rb', line 2187

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

#EIBResetObject



2237
2238
2239
2240
2241
2242
2243
# File 'lib/ansible/knx/EIBConnection.rb', line 2237

def EIBReset()
  puts "EIBReset()" if $DEBUG
  if EIBReset_async() == -1
    return -1
  end
  return EIBComplete()
end

#EIBReset_asyncObject



2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
# File 'lib/ansible/knx/EIBConnection.rb', line 2223

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

#EIBSendAPDU(data) ⇒ Object



2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
# File 'lib/ansible/knx/EIBConnection.rb', line 2245

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

#EIBSendGroup(dest, data) ⇒ Object



2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
# File 'lib/ansible/knx/EIBConnection.rb', line 2265

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

#EIBSendTPDU(dest, data) ⇒ Object



2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
# File 'lib/ansible/knx/EIBConnection.rb', line 2287

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

#EIBSocketLocal(path) ⇒ Object



78
79
80
81
82
83
84
85
86
87
88
89
# File 'lib/ansible/knx/EIBConnection.rb', line 78

def EIBSocketLocal(path)
  puts "EIBSocketLocal(path=#{path})" if $DEBUG
  if @fd != nil
    @errno = Errno::EUSERS
    return -1
  end
  fd = UNIXSocket.new(path)
  @data = []
  @readlen = 0
  @fd = fd
  return 0
end

#EIBSocketRemote(host, port = 6720) ⇒ Object



91
92
93
94
95
96
97
98
99
100
101
102
# File 'lib/ansible/knx/EIBConnection.rb', line 91

def EIBSocketRemote(host, port = 6720)
  puts "EIBSocketURL(host=#{host} port=#{port})" if $DEBUG
  if @fd != nil
    @errno = Errno::EUSERS
    return -1
  end
  fd = TCPSocket.new(host, port)
  @data = []
  @readlen = 0
  @fd = fd
  return 0
end

#EIBSocketURL(url) ⇒ Object



104
105
106
107
108
109
110
111
112
113
114
115
116
117
# File 'lib/ansible/knx/EIBConnection.rb', line 104

def EIBSocketURL(url)
  if url.start_with?('local:')
    return EIBSocketLocal(url[6..-1])
  end
  if url.start_with?('ip:')
    parts=url.split(':')
    if (parts.length == 2)
      parts << "6720"
    end
    return EIBSocketRemote(parts[1], parts[2].to_i)
  end
  @errno = Errno::EINVAL
  return -1
end