tinkerforge 2.1.24 → 2.1.25

Sign up to get free protection for your applications and to get access to all the features.
Files changed (142) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tinkerforge/brick_dc.rb +155 -74
  3. data/lib/tinkerforge/brick_hat.rb +70 -30
  4. data/lib/tinkerforge/brick_hat_zero.rb +56 -22
  5. data/lib/tinkerforge/brick_imu.rb +184 -77
  6. data/lib/tinkerforge/brick_imu_v2.rb +208 -105
  7. data/lib/tinkerforge/brick_master.rb +484 -182
  8. data/lib/tinkerforge/brick_red.rb +197 -74
  9. data/lib/tinkerforge/brick_servo.rb +185 -101
  10. data/lib/tinkerforge/brick_silent_stepper.rb +246 -166
  11. data/lib/tinkerforge/brick_stepper.rb +210 -98
  12. data/lib/tinkerforge/bricklet_accelerometer.rb +58 -23
  13. data/lib/tinkerforge/bricklet_accelerometer_v2.rb +105 -54
  14. data/lib/tinkerforge/bricklet_air_quality.rb +117 -59
  15. data/lib/tinkerforge/bricklet_ambient_light.rb +51 -21
  16. data/lib/tinkerforge/bricklet_ambient_light_v2.rb +40 -22
  17. data/lib/tinkerforge/bricklet_ambient_light_v3.rb +61 -25
  18. data/lib/tinkerforge/bricklet_analog_in.rb +63 -25
  19. data/lib/tinkerforge/bricklet_analog_in_v2.rb +57 -23
  20. data/lib/tinkerforge/bricklet_analog_in_v3.rb +67 -25
  21. data/lib/tinkerforge/bricklet_analog_out.rb +23 -9
  22. data/lib/tinkerforge/bricklet_analog_out_v2.rb +20 -8
  23. data/lib/tinkerforge/bricklet_analog_out_v3.rb +54 -20
  24. data/lib/tinkerforge/bricklet_barometer.rb +66 -26
  25. data/lib/tinkerforge/bricklet_barometer_v2.rb +99 -37
  26. data/lib/tinkerforge/bricklet_can.rb +83 -18
  27. data/lib/tinkerforge/bricklet_can_v2.rb +172 -38
  28. data/lib/tinkerforge/bricklet_co2.rb +34 -14
  29. data/lib/tinkerforge/bricklet_co2_v2.rb +97 -37
  30. data/lib/tinkerforge/bricklet_color.rb +69 -27
  31. data/lib/tinkerforge/bricklet_color_v2.rb +87 -33
  32. data/lib/tinkerforge/bricklet_compass.rb +78 -30
  33. data/lib/tinkerforge/bricklet_current12.rb +58 -24
  34. data/lib/tinkerforge/bricklet_current25.rb +58 -24
  35. data/lib/tinkerforge/bricklet_distance_ir.rb +57 -23
  36. data/lib/tinkerforge/bricklet_distance_ir_v2.rb +83 -31
  37. data/lib/tinkerforge/bricklet_distance_us.rb +40 -16
  38. data/lib/tinkerforge/bricklet_distance_us_v2.rb +67 -25
  39. data/lib/tinkerforge/bricklet_dmx.rb +88 -34
  40. data/lib/tinkerforge/bricklet_dual_button.rb +24 -10
  41. data/lib/tinkerforge/bricklet_dual_button_v2.rb +64 -24
  42. data/lib/tinkerforge/bricklet_dual_relay.rb +27 -11
  43. data/lib/tinkerforge/bricklet_dust_detector.rb +40 -16
  44. data/lib/tinkerforge/bricklet_e_paper_296x128.rb +88 -32
  45. data/lib/tinkerforge/bricklet_energy_monitor.rb +73 -27
  46. data/lib/tinkerforge/bricklet_gps.rb +64 -26
  47. data/lib/tinkerforge/bricklet_gps_v2.rb +117 -47
  48. data/lib/tinkerforge/bricklet_hall_effect.rb +43 -23
  49. data/lib/tinkerforge/bricklet_hall_effect_v2.rb +71 -27
  50. data/lib/tinkerforge/bricklet_humidity.rb +51 -21
  51. data/lib/tinkerforge/bricklet_humidity_v2.rb +83 -31
  52. data/lib/tinkerforge/bricklet_industrial_analog_out.rb +38 -14
  53. data/lib/tinkerforge/bricklet_industrial_analog_out_v2.rb +81 -29
  54. data/lib/tinkerforge/bricklet_industrial_counter.rb +101 -39
  55. data/lib/tinkerforge/bricklet_industrial_digital_in_4.rb +45 -17
  56. data/lib/tinkerforge/bricklet_industrial_digital_in_4_v2.rb +77 -29
  57. data/lib/tinkerforge/bricklet_industrial_digital_out_4.rb +36 -14
  58. data/lib/tinkerforge/bricklet_industrial_digital_out_4_v2.rb +73 -27
  59. data/lib/tinkerforge/bricklet_industrial_dual_0_20ma.rb +40 -16
  60. data/lib/tinkerforge/bricklet_industrial_dual_0_20ma_v2.rb +79 -29
  61. data/lib/tinkerforge/bricklet_industrial_dual_analog_in.rb +49 -19
  62. data/lib/tinkerforge/bricklet_industrial_dual_analog_in_v2.rb +82 -30
  63. data/lib/tinkerforge/bricklet_industrial_dual_relay.rb +61 -23
  64. data/lib/tinkerforge/bricklet_industrial_quad_relay.rb +36 -14
  65. data/lib/tinkerforge/bricklet_industrial_quad_relay_v2.rb +67 -25
  66. data/lib/tinkerforge/bricklet_io16.rb +55 -21
  67. data/lib/tinkerforge/bricklet_io16_v2.rb +90 -34
  68. data/lib/tinkerforge/bricklet_io4.rb +55 -23
  69. data/lib/tinkerforge/bricklet_io4_v2.rb +96 -36
  70. data/lib/tinkerforge/bricklet_isolator.rb +72 -28
  71. data/lib/tinkerforge/bricklet_joystick.rb +59 -25
  72. data/lib/tinkerforge/bricklet_joystick_v2.rb +68 -26
  73. data/lib/tinkerforge/bricklet_laser_range_finder.rb +82 -32
  74. data/lib/tinkerforge/bricklet_laser_range_finder_v2.rb +96 -36
  75. data/lib/tinkerforge/bricklet_lcd_128x64.rb +192 -70
  76. data/lib/tinkerforge/bricklet_lcd_16x2.rb +45 -18
  77. data/lib/tinkerforge/bricklet_lcd_20x4.rb +58 -23
  78. data/lib/tinkerforge/bricklet_led_strip.rb +60 -22
  79. data/lib/tinkerforge/bricklet_led_strip_v2.rb +91 -46
  80. data/lib/tinkerforge/bricklet_line.rb +34 -14
  81. data/lib/tinkerforge/bricklet_linear_poti.rb +51 -21
  82. data/lib/tinkerforge/bricklet_linear_poti_v2.rb +55 -21
  83. data/lib/tinkerforge/bricklet_load_cell.rb +61 -23
  84. data/lib/tinkerforge/bricklet_load_cell_v2.rb +80 -30
  85. data/lib/tinkerforge/bricklet_moisture.rb +40 -16
  86. data/lib/tinkerforge/bricklet_motion_detector.rb +22 -10
  87. data/lib/tinkerforge/bricklet_motion_detector_v2.rb +62 -24
  88. data/lib/tinkerforge/bricklet_motorized_linear_poti.rb +71 -27
  89. data/lib/tinkerforge/bricklet_multi_touch.rb +31 -13
  90. data/lib/tinkerforge/bricklet_multi_touch_v2.rb +76 -28
  91. data/lib/tinkerforge/bricklet_nfc.rb +123 -58
  92. data/lib/tinkerforge/bricklet_nfc_rfid.rb +33 -13
  93. data/lib/tinkerforge/bricklet_oled_128x64.rb +29 -11
  94. data/lib/tinkerforge/bricklet_oled_128x64_v2.rb +66 -24
  95. data/lib/tinkerforge/bricklet_oled_64x48.rb +29 -11
  96. data/lib/tinkerforge/bricklet_one_wire.rb +66 -24
  97. data/lib/tinkerforge/bricklet_outdoor_weather.rb +71 -27
  98. data/lib/tinkerforge/bricklet_particulate_matter.rb +75 -30
  99. data/lib/tinkerforge/bricklet_piezo_buzzer.rb +19 -9
  100. data/lib/tinkerforge/bricklet_piezo_speaker.rb +22 -10
  101. data/lib/tinkerforge/bricklet_piezo_speaker_v2.rb +80 -42
  102. data/lib/tinkerforge/bricklet_ptc.rb +74 -42
  103. data/lib/tinkerforge/bricklet_ptc_v2.rb +95 -48
  104. data/lib/tinkerforge/bricklet_real_time_clock.rb +45 -33
  105. data/lib/tinkerforge/bricklet_real_time_clock_v2.rb +78 -44
  106. data/lib/tinkerforge/bricklet_remote_switch.rb +39 -29
  107. data/lib/tinkerforge/bricklet_remote_switch_v2.rb +87 -49
  108. data/lib/tinkerforge/bricklet_rgb_led.rb +18 -8
  109. data/lib/tinkerforge/bricklet_rgb_led_button.rb +62 -30
  110. data/lib/tinkerforge/bricklet_rgb_led_matrix.rb +79 -33
  111. data/lib/tinkerforge/bricklet_rgb_led_v2.rb +52 -20
  112. data/lib/tinkerforge/bricklet_rotary_encoder.rb +39 -19
  113. data/lib/tinkerforge/bricklet_rotary_encoder_v2.rb +60 -24
  114. data/lib/tinkerforge/bricklet_rotary_poti.rb +53 -28
  115. data/lib/tinkerforge/bricklet_rotary_poti_v2.rb +57 -23
  116. data/lib/tinkerforge/bricklet_rs232.rb +90 -28
  117. data/lib/tinkerforge/bricklet_rs232_v2.rb +118 -44
  118. data/lib/tinkerforge/bricklet_rs485.rb +223 -95
  119. data/lib/tinkerforge/bricklet_segment_display_4x7.rb +25 -14
  120. data/lib/tinkerforge/bricklet_segment_display_4x7_v2.rb +75 -35
  121. data/lib/tinkerforge/bricklet_solid_state_relay.rb +25 -13
  122. data/lib/tinkerforge/bricklet_solid_state_relay_v2.rb +59 -25
  123. data/lib/tinkerforge/bricklet_sound_intensity.rb +35 -18
  124. data/lib/tinkerforge/bricklet_sound_pressure_level.rb +72 -31
  125. data/lib/tinkerforge/bricklet_temperature.rb +40 -16
  126. data/lib/tinkerforge/bricklet_temperature_ir.rb +57 -23
  127. data/lib/tinkerforge/bricklet_temperature_ir_v2.rb +71 -27
  128. data/lib/tinkerforge/bricklet_temperature_v2.rb +61 -25
  129. data/lib/tinkerforge/bricklet_thermal_imaging.rb +105 -44
  130. data/lib/tinkerforge/bricklet_thermocouple.rb +45 -24
  131. data/lib/tinkerforge/bricklet_thermocouple_v2.rb +65 -27
  132. data/lib/tinkerforge/bricklet_tilt.rb +24 -10
  133. data/lib/tinkerforge/bricklet_uv_light.rb +36 -18
  134. data/lib/tinkerforge/bricklet_uv_light_v2.rb +85 -37
  135. data/lib/tinkerforge/bricklet_voltage.rb +52 -28
  136. data/lib/tinkerforge/bricklet_voltage_current.rb +91 -73
  137. data/lib/tinkerforge/bricklet_voltage_current_v2.rb +90 -68
  138. data/lib/tinkerforge/bricklet_xmc1400_breakout.rb +80 -30
  139. data/lib/tinkerforge/device_display_names.rb +163 -0
  140. data/lib/tinkerforge/ip_connection.rb +151 -32
  141. data/lib/tinkerforge/version.rb +1 -1
  142. metadata +3 -2
@@ -1,14 +1,16 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2019-11-25. #
3
+ # This file was automatically generated on 2020-04-07. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.24 #
5
+ # Ruby Bindings Version 2.1.25 #
6
6
  # #
7
7
  # If you have a bugfix for this file and want to commit it, #
8
8
  # please fix the bug in the generator. You can find a link #
9
9
  # to the generators git repository on tinkerforge.com #
10
10
  #############################################################
11
11
 
12
+ require_relative './ip_connection'
13
+
12
14
  module Tinkerforge
13
15
  # Generates configurable DC voltage and current, 0V to 10V and 4mA to 20mA
14
16
  class BrickletIndustrialAnalogOut < Device
@@ -35,7 +37,7 @@ module Tinkerforge
35
37
  # Creates an object with the unique device ID <tt>uid</tt> and adds it to
36
38
  # the IP Connection <tt>ipcon</tt>.
37
39
  def initialize(uid, ipcon)
38
- super uid, ipcon
40
+ super uid, ipcon, DEVICE_IDENTIFIER, DEVICE_DISPLAY_NAME
39
41
 
40
42
  @api_version = [2, 0, 0]
41
43
 
@@ -51,25 +53,32 @@ module Tinkerforge
51
53
  @response_expected[FUNCTION_GET_IDENTITY] = RESPONSE_EXPECTED_ALWAYS_TRUE
52
54
 
53
55
 
56
+ @ipcon.add_device self
54
57
  end
55
58
 
56
59
  # Enables the output of voltage and current.
57
60
  #
58
61
  # The default is disabled.
59
62
  def enable
60
- send_request FUNCTION_ENABLE, [], '', 0, ''
63
+ check_validity
64
+
65
+ send_request FUNCTION_ENABLE, [], '', 8, ''
61
66
  end
62
67
 
63
68
  # Disables the output of voltage and current.
64
69
  #
65
70
  # The default is disabled.
66
71
  def disable
67
- send_request FUNCTION_DISABLE, [], '', 0, ''
72
+ check_validity
73
+
74
+ send_request FUNCTION_DISABLE, [], '', 8, ''
68
75
  end
69
76
 
70
77
  # Returns *true* if output of voltage and current is enabled, *false* otherwise.
71
78
  def is_enabled
72
- send_request FUNCTION_IS_ENABLED, [], '', 1, '?'
79
+ check_validity
80
+
81
+ send_request FUNCTION_IS_ENABLED, [], '', 9, '?'
73
82
  end
74
83
 
75
84
  # Sets the output voltage.
@@ -77,12 +86,16 @@ module Tinkerforge
77
86
  # The output voltage and output current are linked. Changing the output voltage
78
87
  # also changes the output current.
79
88
  def set_voltage(voltage)
80
- send_request FUNCTION_SET_VOLTAGE, [voltage], 'S', 0, ''
89
+ check_validity
90
+
91
+ send_request FUNCTION_SET_VOLTAGE, [voltage], 'S', 8, ''
81
92
  end
82
93
 
83
94
  # Returns the voltage as set by BrickletIndustrialAnalogOut#set_voltage.
84
95
  def get_voltage
85
- send_request FUNCTION_GET_VOLTAGE, [], '', 2, 'S'
96
+ check_validity
97
+
98
+ send_request FUNCTION_GET_VOLTAGE, [], '', 10, 'S'
86
99
  end
87
100
 
88
101
  # Sets the output current.
@@ -90,12 +103,16 @@ module Tinkerforge
90
103
  # The output current and output voltage are linked. Changing the output current
91
104
  # also changes the output voltage.
92
105
  def set_current(current)
93
- send_request FUNCTION_SET_CURRENT, [current], 'S', 0, ''
106
+ check_validity
107
+
108
+ send_request FUNCTION_SET_CURRENT, [current], 'S', 8, ''
94
109
  end
95
110
 
96
111
  # Returns the current as set by BrickletIndustrialAnalogOut#set_current.
97
112
  def get_current
98
- send_request FUNCTION_GET_CURRENT, [], '', 2, 'S'
113
+ check_validity
114
+
115
+ send_request FUNCTION_GET_CURRENT, [], '', 10, 'S'
99
116
  end
100
117
 
101
118
  # Configures the voltage and current range.
@@ -114,24 +131,31 @@ module Tinkerforge
114
131
  # The resolution will always be 12 bit. This means, that the
115
132
  # precision is higher with a smaller range.
116
133
  def set_configuration(voltage_range, current_range)
117
- send_request FUNCTION_SET_CONFIGURATION, [voltage_range, current_range], 'C C', 0, ''
134
+ check_validity
135
+
136
+ send_request FUNCTION_SET_CONFIGURATION, [voltage_range, current_range], 'C C', 8, ''
118
137
  end
119
138
 
120
139
  # Returns the configuration as set by BrickletIndustrialAnalogOut#set_configuration.
121
140
  def get_configuration
122
- send_request FUNCTION_GET_CONFIGURATION, [], '', 2, 'C C'
141
+ check_validity
142
+
143
+ send_request FUNCTION_GET_CONFIGURATION, [], '', 10, 'C C'
123
144
  end
124
145
 
125
146
  # Returns the UID, the UID where the Bricklet is connected to,
126
147
  # the position, the hardware and firmware version as well as the
127
148
  # device identifier.
128
149
  #
129
- # The position can be 'a', 'b', 'c' or 'd'.
150
+ # The position can be 'a', 'b', 'c', 'd', 'e', 'f', 'g' or 'h' (Bricklet Port).
151
+ # The Raspberry Pi HAT (Zero) Brick is always at position 'i' and the Bricklet
152
+ # connected to an :ref:`Isolator Bricklet <isolator_bricklet>` is always as
153
+ # position 'z'.
130
154
  #
131
155
  # The device identifier numbers can be found :ref:`here <device_identifier>`.
132
156
  # |device_identifier_constant|
133
157
  def get_identity
134
- send_request FUNCTION_GET_IDENTITY, [], '', 25, 'Z8 Z8 k C3 C3 S'
158
+ send_request FUNCTION_GET_IDENTITY, [], '', 33, 'Z8 Z8 k C3 C3 S'
135
159
  end
136
160
 
137
161
  end
@@ -1,14 +1,16 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2019-11-25. #
3
+ # This file was automatically generated on 2020-04-07. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.24 #
5
+ # Ruby Bindings Version 2.1.25 #
6
6
  # #
7
7
  # If you have a bugfix for this file and want to commit it, #
8
8
  # please fix the bug in the generator. You can find a link #
9
9
  # to the generators git repository on tinkerforge.com #
10
10
  #############################################################
11
11
 
12
+ require_relative './ip_connection'
13
+
12
14
  module Tinkerforge
13
15
  # Generates configurable DC voltage and current, 0V to 10V and 4mA to 20mA
14
16
  class BrickletIndustrialAnalogOutV2 < Device
@@ -70,7 +72,7 @@ module Tinkerforge
70
72
  # Creates an object with the unique device ID <tt>uid</tt> and adds it to
71
73
  # the IP Connection <tt>ipcon</tt>.
72
74
  def initialize(uid, ipcon)
73
- super uid, ipcon
75
+ super uid, ipcon, DEVICE_IDENTIFIER, DEVICE_DISPLAY_NAME
74
76
 
75
77
  @api_version = [2, 0, 0]
76
78
 
@@ -100,16 +102,21 @@ module Tinkerforge
100
102
  @response_expected[FUNCTION_GET_IDENTITY] = RESPONSE_EXPECTED_ALWAYS_TRUE
101
103
 
102
104
 
105
+ @ipcon.add_device self
103
106
  end
104
107
 
105
108
  # Enables/disables the output of voltage and current.
106
109
  def set_enabled(enabled)
107
- send_request FUNCTION_SET_ENABLED, [enabled], '?', 0, ''
110
+ check_validity
111
+
112
+ send_request FUNCTION_SET_ENABLED, [enabled], '?', 8, ''
108
113
  end
109
114
 
110
115
  # Returns *true* if output of voltage and current is enabled, *false* otherwise.
111
116
  def get_enabled
112
- send_request FUNCTION_GET_ENABLED, [], '', 1, '?'
117
+ check_validity
118
+
119
+ send_request FUNCTION_GET_ENABLED, [], '', 9, '?'
113
120
  end
114
121
 
115
122
  # Sets the output voltage.
@@ -117,12 +124,16 @@ module Tinkerforge
117
124
  # The output voltage and output current are linked. Changing the output voltage
118
125
  # also changes the output current.
119
126
  def set_voltage(voltage)
120
- send_request FUNCTION_SET_VOLTAGE, [voltage], 'S', 0, ''
127
+ check_validity
128
+
129
+ send_request FUNCTION_SET_VOLTAGE, [voltage], 'S', 8, ''
121
130
  end
122
131
 
123
132
  # Returns the voltage as set by BrickletIndustrialAnalogOutV2#set_voltage.
124
133
  def get_voltage
125
- send_request FUNCTION_GET_VOLTAGE, [], '', 2, 'S'
134
+ check_validity
135
+
136
+ send_request FUNCTION_GET_VOLTAGE, [], '', 10, 'S'
126
137
  end
127
138
 
128
139
  # Sets the output current.
@@ -130,12 +141,16 @@ module Tinkerforge
130
141
  # The output current and output voltage are linked. Changing the output current
131
142
  # also changes the output voltage.
132
143
  def set_current(current)
133
- send_request FUNCTION_SET_CURRENT, [current], 'S', 0, ''
144
+ check_validity
145
+
146
+ send_request FUNCTION_SET_CURRENT, [current], 'S', 8, ''
134
147
  end
135
148
 
136
149
  # Returns the current as set by BrickletIndustrialAnalogOutV2#set_current.
137
150
  def get_current
138
- send_request FUNCTION_GET_CURRENT, [], '', 2, 'S'
151
+ check_validity
152
+
153
+ send_request FUNCTION_GET_CURRENT, [], '', 10, 'S'
139
154
  end
140
155
 
141
156
  # Configures the voltage and current range.
@@ -154,12 +169,16 @@ module Tinkerforge
154
169
  # The resolution will always be 12 bit. This means, that the
155
170
  # precision is higher with a smaller range.
156
171
  def set_configuration(voltage_range, current_range)
157
- send_request FUNCTION_SET_CONFIGURATION, [voltage_range, current_range], 'C C', 0, ''
172
+ check_validity
173
+
174
+ send_request FUNCTION_SET_CONFIGURATION, [voltage_range, current_range], 'C C', 8, ''
158
175
  end
159
176
 
160
177
  # Returns the configuration as set by BrickletIndustrialAnalogOutV2#set_configuration.
161
178
  def get_configuration
162
- send_request FUNCTION_GET_CONFIGURATION, [], '', 2, 'C C'
179
+ check_validity
180
+
181
+ send_request FUNCTION_GET_CONFIGURATION, [], '', 10, 'C C'
163
182
  end
164
183
 
165
184
  # You can turn the Out LED off, on or show a
@@ -169,12 +188,16 @@ module Tinkerforge
169
188
  #
170
189
  # You can configure the channel status behavior with BrickletIndustrialAnalogOutV2#set_out_led_status_config.
171
190
  def set_out_led_config(config)
172
- send_request FUNCTION_SET_OUT_LED_CONFIG, [config], 'C', 0, ''
191
+ check_validity
192
+
193
+ send_request FUNCTION_SET_OUT_LED_CONFIG, [config], 'C', 8, ''
173
194
  end
174
195
 
175
196
  # Returns the Out LED configuration as set by BrickletIndustrialAnalogOutV2#set_out_led_config
176
197
  def get_out_led_config
177
- send_request FUNCTION_GET_OUT_LED_CONFIG, [], '', 1, 'C'
198
+ check_validity
199
+
200
+ send_request FUNCTION_GET_OUT_LED_CONFIG, [], '', 9, 'C'
178
201
  end
179
202
 
180
203
  # Sets the Out LED status config. This config is used if the Out LED is
@@ -199,12 +222,16 @@ module Tinkerforge
199
222
  # If the min value is greater than the max value, the LED brightness is scaled the
200
223
  # other way around.
201
224
  def set_out_led_status_config(min, max, config)
202
- send_request FUNCTION_SET_OUT_LED_STATUS_CONFIG, [min, max, config], 'S S C', 0, ''
225
+ check_validity
226
+
227
+ send_request FUNCTION_SET_OUT_LED_STATUS_CONFIG, [min, max, config], 'S S C', 8, ''
203
228
  end
204
229
 
205
230
  # Returns the Out LED status configuration as set by BrickletIndustrialAnalogOutV2#set_out_led_status_config.
206
231
  def get_out_led_status_config
207
- send_request FUNCTION_GET_OUT_LED_STATUS_CONFIG, [], '', 5, 'S S C'
232
+ check_validity
233
+
234
+ send_request FUNCTION_GET_OUT_LED_STATUS_CONFIG, [], '', 13, 'S S C'
208
235
  end
209
236
 
210
237
  # Returns the error count for the communication between Brick and Bricklet.
@@ -219,7 +246,9 @@ module Tinkerforge
219
246
  # The errors counts are for errors that occur on the Bricklet side. All
220
247
  # Bricks have a similar function that returns the errors on the Brick side.
221
248
  def get_spitfp_error_count
222
- send_request FUNCTION_GET_SPITFP_ERROR_COUNT, [], '', 16, 'L L L L'
249
+ check_validity
250
+
251
+ send_request FUNCTION_GET_SPITFP_ERROR_COUNT, [], '', 24, 'L L L L'
223
252
  end
224
253
 
225
254
  # Sets the bootloader mode and returns the status after the requested
@@ -232,12 +261,16 @@ module Tinkerforge
232
261
  # This function is used by Brick Viewer during flashing. It should not be
233
262
  # necessary to call it in a normal user program.
234
263
  def set_bootloader_mode(mode)
235
- send_request FUNCTION_SET_BOOTLOADER_MODE, [mode], 'C', 1, 'C'
264
+ check_validity
265
+
266
+ send_request FUNCTION_SET_BOOTLOADER_MODE, [mode], 'C', 9, 'C'
236
267
  end
237
268
 
238
269
  # Returns the current bootloader mode, see BrickletIndustrialAnalogOutV2#set_bootloader_mode.
239
270
  def get_bootloader_mode
240
- send_request FUNCTION_GET_BOOTLOADER_MODE, [], '', 1, 'C'
271
+ check_validity
272
+
273
+ send_request FUNCTION_GET_BOOTLOADER_MODE, [], '', 9, 'C'
241
274
  end
242
275
 
243
276
  # Sets the firmware pointer for BrickletIndustrialAnalogOutV2#write_firmware. The pointer has
@@ -247,7 +280,9 @@ module Tinkerforge
247
280
  # This function is used by Brick Viewer during flashing. It should not be
248
281
  # necessary to call it in a normal user program.
249
282
  def set_write_firmware_pointer(pointer)
250
- send_request FUNCTION_SET_WRITE_FIRMWARE_POINTER, [pointer], 'L', 0, ''
283
+ check_validity
284
+
285
+ send_request FUNCTION_SET_WRITE_FIRMWARE_POINTER, [pointer], 'L', 8, ''
251
286
  end
252
287
 
253
288
  # Writes 64 Bytes of firmware at the position as written by
@@ -259,7 +294,9 @@ module Tinkerforge
259
294
  # This function is used by Brick Viewer during flashing. It should not be
260
295
  # necessary to call it in a normal user program.
261
296
  def write_firmware(data)
262
- send_request FUNCTION_WRITE_FIRMWARE, [data], 'C64', 1, 'C'
297
+ check_validity
298
+
299
+ send_request FUNCTION_WRITE_FIRMWARE, [data], 'C64', 9, 'C'
263
300
  end
264
301
 
265
302
  # Sets the status LED configuration. By default the LED shows
@@ -270,22 +307,28 @@ module Tinkerforge
270
307
  #
271
308
  # If the Bricklet is in bootloader mode, the LED is will show heartbeat by default.
272
309
  def set_status_led_config(config)
273
- send_request FUNCTION_SET_STATUS_LED_CONFIG, [config], 'C', 0, ''
310
+ check_validity
311
+
312
+ send_request FUNCTION_SET_STATUS_LED_CONFIG, [config], 'C', 8, ''
274
313
  end
275
314
 
276
315
  # Returns the configuration as set by BrickletIndustrialAnalogOutV2#set_status_led_config
277
316
  def get_status_led_config
278
- send_request FUNCTION_GET_STATUS_LED_CONFIG, [], '', 1, 'C'
317
+ check_validity
318
+
319
+ send_request FUNCTION_GET_STATUS_LED_CONFIG, [], '', 9, 'C'
279
320
  end
280
321
 
281
- # Returns the temperature in °C as measured inside the microcontroller. The
322
+ # Returns the temperature as measured inside the microcontroller. The
282
323
  # value returned is not the ambient temperature!
283
324
  #
284
325
  # The temperature is only proportional to the real temperature and it has bad
285
326
  # accuracy. Practically it is only useful as an indicator for
286
327
  # temperature changes.
287
328
  def get_chip_temperature
288
- send_request FUNCTION_GET_CHIP_TEMPERATURE, [], '', 2, 's'
329
+ check_validity
330
+
331
+ send_request FUNCTION_GET_CHIP_TEMPERATURE, [], '', 10, 's'
289
332
  end
290
333
 
291
334
  # Calling this function will reset the Bricklet. All configurations
@@ -295,7 +338,9 @@ module Tinkerforge
295
338
  # calling functions on the existing ones will result in
296
339
  # undefined behavior!
297
340
  def reset
298
- send_request FUNCTION_RESET, [], '', 0, ''
341
+ check_validity
342
+
343
+ send_request FUNCTION_RESET, [], '', 8, ''
299
344
  end
300
345
 
301
346
  # Writes a new UID into flash. If you want to set a new UID
@@ -304,25 +349,32 @@ module Tinkerforge
304
349
  #
305
350
  # We recommend that you use Brick Viewer to change the UID.
306
351
  def write_uid(uid)
307
- send_request FUNCTION_WRITE_UID, [uid], 'L', 0, ''
352
+ check_validity
353
+
354
+ send_request FUNCTION_WRITE_UID, [uid], 'L', 8, ''
308
355
  end
309
356
 
310
357
  # Returns the current UID as an integer. Encode as
311
358
  # Base58 to get the usual string version.
312
359
  def read_uid
313
- send_request FUNCTION_READ_UID, [], '', 4, 'L'
360
+ check_validity
361
+
362
+ send_request FUNCTION_READ_UID, [], '', 12, 'L'
314
363
  end
315
364
 
316
365
  # Returns the UID, the UID where the Bricklet is connected to,
317
366
  # the position, the hardware and firmware version as well as the
318
367
  # device identifier.
319
368
  #
320
- # The position can be 'a', 'b', 'c' or 'd'.
369
+ # The position can be 'a', 'b', 'c', 'd', 'e', 'f', 'g' or 'h' (Bricklet Port).
370
+ # The Raspberry Pi HAT (Zero) Brick is always at position 'i' and the Bricklet
371
+ # connected to an :ref:`Isolator Bricklet <isolator_bricklet>` is always as
372
+ # position 'z'.
321
373
  #
322
374
  # The device identifier numbers can be found :ref:`here <device_identifier>`.
323
375
  # |device_identifier_constant|
324
376
  def get_identity
325
- send_request FUNCTION_GET_IDENTITY, [], '', 25, 'Z8 Z8 k C3 C3 S'
377
+ send_request FUNCTION_GET_IDENTITY, [], '', 33, 'Z8 Z8 k C3 C3 S'
326
378
  end
327
379
 
328
380
  end
@@ -1,14 +1,16 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2019-11-25. #
3
+ # This file was automatically generated on 2020-04-07. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.24 #
5
+ # Ruby Bindings Version 2.1.25 #
6
6
  # #
7
7
  # If you have a bugfix for this file and want to commit it, #
8
8
  # please fix the bug in the generator. You can find a link #
9
9
  # to the generators git repository on tinkerforge.com #
10
10
  #############################################################
11
11
 
12
+ require_relative './ip_connection'
13
+
12
14
  module Tinkerforge
13
15
  # 4 channel counter up to 4MHz
14
16
  class BrickletIndustrialCounter < Device
@@ -117,7 +119,7 @@ module Tinkerforge
117
119
  # Creates an object with the unique device ID <tt>uid</tt> and adds it to
118
120
  # the IP Connection <tt>ipcon</tt>.
119
121
  def initialize(uid, ipcon)
120
- super uid, ipcon
122
+ super uid, ipcon, DEVICE_IDENTIFIER, DEVICE_DISPLAY_NAME
121
123
 
122
124
  @api_version = [2, 0, 0]
123
125
 
@@ -152,45 +154,58 @@ module Tinkerforge
152
154
  @response_expected[FUNCTION_READ_UID] = RESPONSE_EXPECTED_ALWAYS_TRUE
153
155
  @response_expected[FUNCTION_GET_IDENTITY] = RESPONSE_EXPECTED_ALWAYS_TRUE
154
156
 
155
- @callback_formats[CALLBACK_ALL_COUNTER] = 'q4'
156
- @callback_formats[CALLBACK_ALL_SIGNAL_DATA] = 'S4 Q4 L4 ?4'
157
+ @callback_formats[CALLBACK_ALL_COUNTER] = [40, 'q4']
158
+ @callback_formats[CALLBACK_ALL_SIGNAL_DATA] = [65, 'S4 Q4 L4 ?4']
157
159
 
160
+ @ipcon.add_device self
158
161
  end
159
162
 
160
163
  # Returns the current counter value for the given channel.
161
164
  def get_counter(channel)
162
- send_request FUNCTION_GET_COUNTER, [channel], 'C', 8, 'q'
165
+ check_validity
166
+
167
+ send_request FUNCTION_GET_COUNTER, [channel], 'C', 16, 'q'
163
168
  end
164
169
 
165
170
  # Returns the current counter values for all four channels.
166
171
  def get_all_counter
167
- send_request FUNCTION_GET_ALL_COUNTER, [], '', 32, 'q4'
172
+ check_validity
173
+
174
+ send_request FUNCTION_GET_ALL_COUNTER, [], '', 40, 'q4'
168
175
  end
169
176
 
170
177
  # Sets the counter value for the given channel.
171
178
  #
172
179
  # The default value for the counters on startup is 0.
173
180
  def set_counter(channel, counter)
174
- send_request FUNCTION_SET_COUNTER, [channel, counter], 'C q', 0, ''
181
+ check_validity
182
+
183
+ send_request FUNCTION_SET_COUNTER, [channel, counter], 'C q', 8, ''
175
184
  end
176
185
 
177
186
  # Sets the counter values for all four channels.
178
187
  #
179
188
  # The default value for the counters on startup is 0.
180
189
  def set_all_counter(counter)
181
- send_request FUNCTION_SET_ALL_COUNTER, [counter], 'q4', 0, ''
190
+ check_validity
191
+
192
+ send_request FUNCTION_SET_ALL_COUNTER, [counter], 'q4', 8, ''
182
193
  end
183
194
 
184
195
  # Returns the signal data (duty cycle, period, frequency and value) for the
185
196
  # given channel.
186
197
  def get_signal_data(channel)
187
- send_request FUNCTION_GET_SIGNAL_DATA, [channel], 'C', 15, 'S Q L ?'
198
+ check_validity
199
+
200
+ send_request FUNCTION_GET_SIGNAL_DATA, [channel], 'C', 23, 'S Q L ?'
188
201
  end
189
202
 
190
203
  # Returns the signal data (duty cycle, period, frequency and value) for all four
191
204
  # channels.
192
205
  def get_all_signal_data
193
- send_request FUNCTION_GET_ALL_SIGNAL_DATA, [], '', 60, 'S4 Q4 L4 ?4'
206
+ check_validity
207
+
208
+ send_request FUNCTION_GET_ALL_SIGNAL_DATA, [], '', 65, 'S4 Q4 L4 ?4'
194
209
  end
195
210
 
196
211
  # Activates/deactivates the counter of the given channel.
@@ -199,7 +214,9 @@ module Tinkerforge
199
214
  #
200
215
  # By default all channels are activated.
201
216
  def set_counter_active(channel, active)
202
- send_request FUNCTION_SET_COUNTER_ACTIVE, [channel, active], 'C ?', 0, ''
217
+ check_validity
218
+
219
+ send_request FUNCTION_SET_COUNTER_ACTIVE, [channel, active], 'C ?', 8, ''
203
220
  end
204
221
 
205
222
  # Activates/deactivates the counter of all four channels.
@@ -208,21 +225,27 @@ module Tinkerforge
208
225
  #
209
226
  # By default all channels are activated.
210
227
  def set_all_counter_active(active)
211
- send_request FUNCTION_SET_ALL_COUNTER_ACTIVE, [active], '?4', 0, ''
228
+ check_validity
229
+
230
+ send_request FUNCTION_SET_ALL_COUNTER_ACTIVE, [active], '?4', 8, ''
212
231
  end
213
232
 
214
233
  # Returns the activation state of the given channel.
215
234
  #
216
235
  # true = activated, false = deactivated.
217
236
  def get_counter_active(channel)
218
- send_request FUNCTION_GET_COUNTER_ACTIVE, [channel], 'C', 1, '?'
237
+ check_validity
238
+
239
+ send_request FUNCTION_GET_COUNTER_ACTIVE, [channel], 'C', 9, '?'
219
240
  end
220
241
 
221
242
  # Returns the activation state of all four channels.
222
243
  #
223
244
  # true = activated, false = deactivated.
224
245
  def get_all_counter_active
225
- send_request FUNCTION_GET_ALL_COUNTER_ACTIVE, [], '', 4, '?4'
246
+ check_validity
247
+
248
+ send_request FUNCTION_GET_ALL_COUNTER_ACTIVE, [], '', 9, '?4'
226
249
  end
227
250
 
228
251
  # Sets the counter configuration for the given channel.
@@ -240,12 +263,16 @@ module Tinkerforge
240
263
  # `here <https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Industrial_Counter.html#duty-cycle-prescaler-and-frequency-integration-time>`__
241
264
  # for details.
242
265
  def set_counter_configuration(channel, count_edge, count_direction, duty_cycle_prescaler, frequency_integration_time)
243
- send_request FUNCTION_SET_COUNTER_CONFIGURATION, [channel, count_edge, count_direction, duty_cycle_prescaler, frequency_integration_time], 'C C C C C', 0, ''
266
+ check_validity
267
+
268
+ send_request FUNCTION_SET_COUNTER_CONFIGURATION, [channel, count_edge, count_direction, duty_cycle_prescaler, frequency_integration_time], 'C C C C C', 8, ''
244
269
  end
245
270
 
246
271
  # Returns the counter configuration as set by BrickletIndustrialCounter#set_counter_configuration.
247
272
  def get_counter_configuration(channel)
248
- send_request FUNCTION_GET_COUNTER_CONFIGURATION, [channel], 'C', 4, 'C C C C'
273
+ check_validity
274
+
275
+ send_request FUNCTION_GET_COUNTER_CONFIGURATION, [channel], 'C', 12, 'C C C C'
249
276
  end
250
277
 
251
278
  # The period is the period with which the CALLBACK_ALL_COUNTER
@@ -258,13 +285,17 @@ module Tinkerforge
258
285
  # If it is set to false, the callback is continuously triggered with the period,
259
286
  # independent of the value.
260
287
  def set_all_counter_callback_configuration(period, value_has_to_change)
261
- send_request FUNCTION_SET_ALL_COUNTER_CALLBACK_CONFIGURATION, [period, value_has_to_change], 'L ?', 0, ''
288
+ check_validity
289
+
290
+ send_request FUNCTION_SET_ALL_COUNTER_CALLBACK_CONFIGURATION, [period, value_has_to_change], 'L ?', 8, ''
262
291
  end
263
292
 
264
293
  # Returns the callback configuration as set by
265
294
  # BrickletIndustrialCounter#set_all_counter_callback_configuration.
266
295
  def get_all_counter_callback_configuration
267
- send_request FUNCTION_GET_ALL_COUNTER_CALLBACK_CONFIGURATION, [], '', 5, 'L ?'
296
+ check_validity
297
+
298
+ send_request FUNCTION_GET_ALL_COUNTER_CALLBACK_CONFIGURATION, [], '', 13, 'L ?'
268
299
  end
269
300
 
270
301
  # The period is the period with which the CALLBACK_ALL_SIGNAL_DATA
@@ -277,27 +308,33 @@ module Tinkerforge
277
308
  # If it is set to false, the callback is continuously triggered with the period,
278
309
  # independent of the value.
279
310
  def set_all_signal_data_callback_configuration(period, value_has_to_change)
280
- send_request FUNCTION_SET_ALL_SIGNAL_DATA_CALLBACK_CONFIGURATION, [period, value_has_to_change], 'L ?', 0, ''
311
+ check_validity
312
+
313
+ send_request FUNCTION_SET_ALL_SIGNAL_DATA_CALLBACK_CONFIGURATION, [period, value_has_to_change], 'L ?', 8, ''
281
314
  end
282
315
 
283
316
  # Returns the callback configuration as set by
284
317
  # BrickletIndustrialCounter#set_all_signal_data_callback_configuration.
285
318
  def get_all_signal_data_callback_configuration
286
- send_request FUNCTION_GET_ALL_SIGNAL_DATA_CALLBACK_CONFIGURATION, [], '', 5, 'L ?'
319
+ check_validity
320
+
321
+ send_request FUNCTION_GET_ALL_SIGNAL_DATA_CALLBACK_CONFIGURATION, [], '', 13, 'L ?'
287
322
  end
288
323
 
289
324
  # Each channel has a corresponding LED. You can turn the LED off, on or show a
290
325
  # heartbeat. You can also set the LED to "Channel Status". In this mode the
291
326
  # LED is on if the channel is high and off otherwise.
292
- #
293
- # By default all channel LEDs are configured as "Channel Status".
294
327
  def set_channel_led_config(channel, config)
295
- send_request FUNCTION_SET_CHANNEL_LED_CONFIG, [channel, config], 'C C', 0, ''
328
+ check_validity
329
+
330
+ send_request FUNCTION_SET_CHANNEL_LED_CONFIG, [channel, config], 'C C', 8, ''
296
331
  end
297
332
 
298
333
  # Returns the channel LED configuration as set by BrickletIndustrialCounter#set_channel_led_config
299
334
  def get_channel_led_config(channel)
300
- send_request FUNCTION_GET_CHANNEL_LED_CONFIG, [channel], 'C', 1, 'C'
335
+ check_validity
336
+
337
+ send_request FUNCTION_GET_CHANNEL_LED_CONFIG, [channel], 'C', 9, 'C'
301
338
  end
302
339
 
303
340
  # Returns the error count for the communication between Brick and Bricklet.
@@ -312,7 +349,9 @@ module Tinkerforge
312
349
  # The errors counts are for errors that occur on the Bricklet side. All
313
350
  # Bricks have a similar function that returns the errors on the Brick side.
314
351
  def get_spitfp_error_count
315
- send_request FUNCTION_GET_SPITFP_ERROR_COUNT, [], '', 16, 'L L L L'
352
+ check_validity
353
+
354
+ send_request FUNCTION_GET_SPITFP_ERROR_COUNT, [], '', 24, 'L L L L'
316
355
  end
317
356
 
318
357
  # Sets the bootloader mode and returns the status after the requested
@@ -325,12 +364,16 @@ module Tinkerforge
325
364
  # This function is used by Brick Viewer during flashing. It should not be
326
365
  # necessary to call it in a normal user program.
327
366
  def set_bootloader_mode(mode)
328
- send_request FUNCTION_SET_BOOTLOADER_MODE, [mode], 'C', 1, 'C'
367
+ check_validity
368
+
369
+ send_request FUNCTION_SET_BOOTLOADER_MODE, [mode], 'C', 9, 'C'
329
370
  end
330
371
 
331
372
  # Returns the current bootloader mode, see BrickletIndustrialCounter#set_bootloader_mode.
332
373
  def get_bootloader_mode
333
- send_request FUNCTION_GET_BOOTLOADER_MODE, [], '', 1, 'C'
374
+ check_validity
375
+
376
+ send_request FUNCTION_GET_BOOTLOADER_MODE, [], '', 9, 'C'
334
377
  end
335
378
 
336
379
  # Sets the firmware pointer for BrickletIndustrialCounter#write_firmware. The pointer has
@@ -340,7 +383,9 @@ module Tinkerforge
340
383
  # This function is used by Brick Viewer during flashing. It should not be
341
384
  # necessary to call it in a normal user program.
342
385
  def set_write_firmware_pointer(pointer)
343
- send_request FUNCTION_SET_WRITE_FIRMWARE_POINTER, [pointer], 'L', 0, ''
386
+ check_validity
387
+
388
+ send_request FUNCTION_SET_WRITE_FIRMWARE_POINTER, [pointer], 'L', 8, ''
344
389
  end
345
390
 
346
391
  # Writes 64 Bytes of firmware at the position as written by
@@ -352,7 +397,9 @@ module Tinkerforge
352
397
  # This function is used by Brick Viewer during flashing. It should not be
353
398
  # necessary to call it in a normal user program.
354
399
  def write_firmware(data)
355
- send_request FUNCTION_WRITE_FIRMWARE, [data], 'C64', 1, 'C'
400
+ check_validity
401
+
402
+ send_request FUNCTION_WRITE_FIRMWARE, [data], 'C64', 9, 'C'
356
403
  end
357
404
 
358
405
  # Sets the status LED configuration. By default the LED shows
@@ -363,22 +410,28 @@ module Tinkerforge
363
410
  #
364
411
  # If the Bricklet is in bootloader mode, the LED is will show heartbeat by default.
365
412
  def set_status_led_config(config)
366
- send_request FUNCTION_SET_STATUS_LED_CONFIG, [config], 'C', 0, ''
413
+ check_validity
414
+
415
+ send_request FUNCTION_SET_STATUS_LED_CONFIG, [config], 'C', 8, ''
367
416
  end
368
417
 
369
418
  # Returns the configuration as set by BrickletIndustrialCounter#set_status_led_config
370
419
  def get_status_led_config
371
- send_request FUNCTION_GET_STATUS_LED_CONFIG, [], '', 1, 'C'
420
+ check_validity
421
+
422
+ send_request FUNCTION_GET_STATUS_LED_CONFIG, [], '', 9, 'C'
372
423
  end
373
424
 
374
- # Returns the temperature in °C as measured inside the microcontroller. The
425
+ # Returns the temperature as measured inside the microcontroller. The
375
426
  # value returned is not the ambient temperature!
376
427
  #
377
428
  # The temperature is only proportional to the real temperature and it has bad
378
429
  # accuracy. Practically it is only useful as an indicator for
379
430
  # temperature changes.
380
431
  def get_chip_temperature
381
- send_request FUNCTION_GET_CHIP_TEMPERATURE, [], '', 2, 's'
432
+ check_validity
433
+
434
+ send_request FUNCTION_GET_CHIP_TEMPERATURE, [], '', 10, 's'
382
435
  end
383
436
 
384
437
  # Calling this function will reset the Bricklet. All configurations
@@ -388,7 +441,9 @@ module Tinkerforge
388
441
  # calling functions on the existing ones will result in
389
442
  # undefined behavior!
390
443
  def reset
391
- send_request FUNCTION_RESET, [], '', 0, ''
444
+ check_validity
445
+
446
+ send_request FUNCTION_RESET, [], '', 8, ''
392
447
  end
393
448
 
394
449
  # Writes a new UID into flash. If you want to set a new UID
@@ -397,25 +452,32 @@ module Tinkerforge
397
452
  #
398
453
  # We recommend that you use Brick Viewer to change the UID.
399
454
  def write_uid(uid)
400
- send_request FUNCTION_WRITE_UID, [uid], 'L', 0, ''
455
+ check_validity
456
+
457
+ send_request FUNCTION_WRITE_UID, [uid], 'L', 8, ''
401
458
  end
402
459
 
403
460
  # Returns the current UID as an integer. Encode as
404
461
  # Base58 to get the usual string version.
405
462
  def read_uid
406
- send_request FUNCTION_READ_UID, [], '', 4, 'L'
463
+ check_validity
464
+
465
+ send_request FUNCTION_READ_UID, [], '', 12, 'L'
407
466
  end
408
467
 
409
468
  # Returns the UID, the UID where the Bricklet is connected to,
410
469
  # the position, the hardware and firmware version as well as the
411
470
  # device identifier.
412
471
  #
413
- # The position can be 'a', 'b', 'c' or 'd'.
472
+ # The position can be 'a', 'b', 'c', 'd', 'e', 'f', 'g' or 'h' (Bricklet Port).
473
+ # The Raspberry Pi HAT (Zero) Brick is always at position 'i' and the Bricklet
474
+ # connected to an :ref:`Isolator Bricklet <isolator_bricklet>` is always as
475
+ # position 'z'.
414
476
  #
415
477
  # The device identifier numbers can be found :ref:`here <device_identifier>`.
416
478
  # |device_identifier_constant|
417
479
  def get_identity
418
- send_request FUNCTION_GET_IDENTITY, [], '', 25, 'Z8 Z8 k C3 C3 S'
480
+ send_request FUNCTION_GET_IDENTITY, [], '', 33, 'Z8 Z8 k C3 C3 S'
419
481
  end
420
482
 
421
483
  # Registers a callback with ID <tt>id</tt> to the block <tt>block</tt>.