tinkerforge 2.1.13 → 2.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. data/lib/tinkerforge/brick_dc.rb +122 -34
  2. data/lib/tinkerforge/brick_imu.rb +135 -49
  3. data/lib/tinkerforge/brick_imu_v2.rb +137 -54
  4. data/lib/tinkerforge/brick_master.rb +206 -120
  5. data/lib/tinkerforge/brick_red.rb +64 -69
  6. data/lib/tinkerforge/brick_servo.rb +133 -44
  7. data/lib/tinkerforge/brick_silent_stepper.rb +151 -65
  8. data/lib/tinkerforge/brick_stepper.rb +139 -51
  9. data/lib/tinkerforge/bricklet_accelerometer.rb +17 -18
  10. data/lib/tinkerforge/bricklet_ambient_light.rb +16 -19
  11. data/lib/tinkerforge/bricklet_ambient_light_v2.rb +13 -14
  12. data/lib/tinkerforge/bricklet_analog_in.rb +20 -23
  13. data/lib/tinkerforge/bricklet_analog_in_v2.rb +18 -21
  14. data/lib/tinkerforge/bricklet_analog_out.rb +8 -7
  15. data/lib/tinkerforge/bricklet_analog_out_v2.rb +7 -6
  16. data/lib/tinkerforge/bricklet_barometer.rb +21 -24
  17. data/lib/tinkerforge/bricklet_can.rb +14 -14
  18. data/lib/tinkerforge/bricklet_co2.rb +11 -12
  19. data/lib/tinkerforge/bricklet_color.rb +22 -25
  20. data/lib/tinkerforge/bricklet_current12.rb +18 -22
  21. data/lib/tinkerforge/bricklet_current25.rb +18 -22
  22. data/lib/tinkerforge/bricklet_distance_ir.rb +18 -21
  23. data/lib/tinkerforge/bricklet_distance_us.rb +13 -14
  24. data/lib/tinkerforge/bricklet_dual_button.rb +8 -8
  25. data/lib/tinkerforge/bricklet_dual_relay.rb +9 -9
  26. data/lib/tinkerforge/bricklet_dust_detector.rb +13 -14
  27. data/lib/tinkerforge/bricklet_gps.rb +21 -25
  28. data/lib/tinkerforge/bricklet_gps_v2.rb +56 -41
  29. data/lib/tinkerforge/bricklet_hall_effect.rb +13 -13
  30. data/lib/tinkerforge/bricklet_humidity.rb +16 -19
  31. data/lib/tinkerforge/bricklet_industrial_analog_out.rb +13 -12
  32. data/lib/tinkerforge/bricklet_industrial_digital_in_4.rb +15 -15
  33. data/lib/tinkerforge/bricklet_industrial_digital_out_4.rb +12 -12
  34. data/lib/tinkerforge/bricklet_industrial_dual_0_20ma.rb +13 -14
  35. data/lib/tinkerforge/bricklet_industrial_dual_analog_in.rb +16 -17
  36. data/lib/tinkerforge/bricklet_industrial_quad_relay.rb +12 -12
  37. data/lib/tinkerforge/bricklet_io16.rb +18 -19
  38. data/lib/tinkerforge/bricklet_io4.rb +18 -19
  39. data/lib/tinkerforge/bricklet_joystick.rb +18 -23
  40. data/lib/tinkerforge/bricklet_laser_range_finder.rb +26 -29
  41. data/lib/tinkerforge/bricklet_lcd_16x2.rb +14 -15
  42. data/lib/tinkerforge/bricklet_lcd_20x4.rb +18 -19
  43. data/lib/tinkerforge/bricklet_led_strip.rb +20 -20
  44. data/lib/tinkerforge/bricklet_line.rb +11 -12
  45. data/lib/tinkerforge/bricklet_linear_poti.rb +16 -19
  46. data/lib/tinkerforge/bricklet_load_cell.rb +20 -21
  47. data/lib/tinkerforge/bricklet_moisture.rb +13 -14
  48. data/lib/tinkerforge/bricklet_motion_detector.rb +7 -8
  49. data/lib/tinkerforge/bricklet_multi_touch.rb +10 -10
  50. data/lib/tinkerforge/bricklet_nfc_rfid.rb +11 -11
  51. data/lib/tinkerforge/bricklet_oled_128x64.rb +10 -9
  52. data/lib/tinkerforge/bricklet_oled_64x48.rb +10 -9
  53. data/lib/tinkerforge/bricklet_piezo_buzzer.rb +6 -7
  54. data/lib/tinkerforge/bricklet_piezo_speaker.rb +7 -8
  55. data/lib/tinkerforge/bricklet_ptc.rb +23 -26
  56. data/lib/tinkerforge/bricklet_real_time_clock.rb +13 -14
  57. data/lib/tinkerforge/bricklet_remote_switch.rb +12 -12
  58. data/lib/tinkerforge/bricklet_rgb_led.rb +6 -5
  59. data/lib/tinkerforge/bricklet_rotary_encoder.rb +12 -15
  60. data/lib/tinkerforge/bricklet_rotary_poti.rb +16 -19
  61. data/lib/tinkerforge/bricklet_rs232.rb +12 -13
  62. data/lib/tinkerforge/bricklet_rs485.rb +1373 -0
  63. data/lib/tinkerforge/bricklet_segment_display_4x7.rb +8 -8
  64. data/lib/tinkerforge/bricklet_solid_state_relay.rb +8 -8
  65. data/lib/tinkerforge/bricklet_sound_intensity.rb +11 -12
  66. data/lib/tinkerforge/bricklet_temperature.rb +13 -14
  67. data/lib/tinkerforge/bricklet_temperature_ir.rb +18 -21
  68. data/lib/tinkerforge/bricklet_thermocouple.rb +14 -16
  69. data/lib/tinkerforge/bricklet_tilt.rb +8 -8
  70. data/lib/tinkerforge/bricklet_uv_light.rb +11 -12
  71. data/lib/tinkerforge/bricklet_voltage.rb +16 -19
  72. data/lib/tinkerforge/bricklet_voltage_current.rb +25 -30
  73. data/lib/tinkerforge/ip_connection.rb +207 -138
  74. data/lib/tinkerforge/version.rb +1 -1
  75. metadata +3 -2
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2017-05-11. #
3
+ # This file was automatically generated on 2017-07-27. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.13 #
5
+ # Ruby Bindings Version 2.1.14 #
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 #
@@ -86,16 +86,13 @@ module Tinkerforge
86
86
  @response_expected[FUNCTION_GET_ANALOG_VALUE_CALLBACK_THRESHOLD] = RESPONSE_EXPECTED_ALWAYS_TRUE
87
87
  @response_expected[FUNCTION_SET_DEBOUNCE_PERIOD] = RESPONSE_EXPECTED_TRUE
88
88
  @response_expected[FUNCTION_GET_DEBOUNCE_PERIOD] = RESPONSE_EXPECTED_ALWAYS_TRUE
89
- @response_expected[CALLBACK_ILLUMINANCE] = RESPONSE_EXPECTED_ALWAYS_FALSE
90
- @response_expected[CALLBACK_ANALOG_VALUE] = RESPONSE_EXPECTED_ALWAYS_FALSE
91
- @response_expected[CALLBACK_ILLUMINANCE_REACHED] = RESPONSE_EXPECTED_ALWAYS_FALSE
92
- @response_expected[CALLBACK_ANALOG_VALUE_REACHED] = RESPONSE_EXPECTED_ALWAYS_FALSE
93
89
  @response_expected[FUNCTION_GET_IDENTITY] = RESPONSE_EXPECTED_ALWAYS_TRUE
94
90
 
95
91
  @callback_formats[CALLBACK_ILLUMINANCE] = 'S'
96
92
  @callback_formats[CALLBACK_ANALOG_VALUE] = 'S'
97
93
  @callback_formats[CALLBACK_ILLUMINANCE_REACHED] = 'S'
98
94
  @callback_formats[CALLBACK_ANALOG_VALUE_REACHED] = 'S'
95
+
99
96
  end
100
97
 
101
98
  # Returns the illuminance of the ambient light sensor. The value
@@ -106,7 +103,7 @@ module Tinkerforge
106
103
  # CALLBACK_ILLUMINANCE callback and set the period with
107
104
  # BrickletAmbientLight#set_illuminance_callback_period.
108
105
  def get_illuminance
109
- send_request(FUNCTION_GET_ILLUMINANCE, [], '', 2, 'S')
106
+ send_request FUNCTION_GET_ILLUMINANCE, [], '', 2, 'S'
110
107
  end
111
108
 
112
109
  # Returns the value as read by a 12-bit analog-to-digital converter.
@@ -126,7 +123,7 @@ module Tinkerforge
126
123
  # CALLBACK_ANALOG_VALUE callback and set the period with
127
124
  # BrickletAmbientLight#set_analog_value_callback_period.
128
125
  def get_analog_value
129
- send_request(FUNCTION_GET_ANALOG_VALUE, [], '', 2, 'S')
126
+ send_request FUNCTION_GET_ANALOG_VALUE, [], '', 2, 'S'
130
127
  end
131
128
 
132
129
  # Sets the period in ms with which the CALLBACK_ILLUMINANCE callback is triggered
@@ -137,12 +134,12 @@ module Tinkerforge
137
134
  #
138
135
  # The default value is 0.
139
136
  def set_illuminance_callback_period(period)
140
- send_request(FUNCTION_SET_ILLUMINANCE_CALLBACK_PERIOD, [period], 'L', 0, '')
137
+ send_request FUNCTION_SET_ILLUMINANCE_CALLBACK_PERIOD, [period], 'L', 0, ''
141
138
  end
142
139
 
143
140
  # Returns the period as set by BrickletAmbientLight#set_illuminance_callback_period.
144
141
  def get_illuminance_callback_period
145
- send_request(FUNCTION_GET_ILLUMINANCE_CALLBACK_PERIOD, [], '', 4, 'L')
142
+ send_request FUNCTION_GET_ILLUMINANCE_CALLBACK_PERIOD, [], '', 4, 'L'
146
143
  end
147
144
 
148
145
  # Sets the period in ms with which the CALLBACK_ANALOG_VALUE callback is triggered
@@ -153,12 +150,12 @@ module Tinkerforge
153
150
  #
154
151
  # The default value is 0.
155
152
  def set_analog_value_callback_period(period)
156
- send_request(FUNCTION_SET_ANALOG_VALUE_CALLBACK_PERIOD, [period], 'L', 0, '')
153
+ send_request FUNCTION_SET_ANALOG_VALUE_CALLBACK_PERIOD, [period], 'L', 0, ''
157
154
  end
158
155
 
159
156
  # Returns the period as set by BrickletAmbientLight#set_analog_value_callback_period.
160
157
  def get_analog_value_callback_period
161
- send_request(FUNCTION_GET_ANALOG_VALUE_CALLBACK_PERIOD, [], '', 4, 'L')
158
+ send_request FUNCTION_GET_ANALOG_VALUE_CALLBACK_PERIOD, [], '', 4, 'L'
162
159
  end
163
160
 
164
161
  # Sets the thresholds for the CALLBACK_ILLUMINANCE_REACHED callback.
@@ -175,12 +172,12 @@ module Tinkerforge
175
172
  #
176
173
  # The default value is ('x', 0, 0).
177
174
  def set_illuminance_callback_threshold(option, min, max)
178
- send_request(FUNCTION_SET_ILLUMINANCE_CALLBACK_THRESHOLD, [option, min, max], 'k S S', 0, '')
175
+ send_request FUNCTION_SET_ILLUMINANCE_CALLBACK_THRESHOLD, [option, min, max], 'k S S', 0, ''
179
176
  end
180
177
 
181
178
  # Returns the threshold as set by BrickletAmbientLight#set_illuminance_callback_threshold.
182
179
  def get_illuminance_callback_threshold
183
- send_request(FUNCTION_GET_ILLUMINANCE_CALLBACK_THRESHOLD, [], '', 5, 'k S S')
180
+ send_request FUNCTION_GET_ILLUMINANCE_CALLBACK_THRESHOLD, [], '', 5, 'k S S'
184
181
  end
185
182
 
186
183
  # Sets the thresholds for the CALLBACK_ANALOG_VALUE_REACHED callback.
@@ -197,12 +194,12 @@ module Tinkerforge
197
194
  #
198
195
  # The default value is ('x', 0, 0).
199
196
  def set_analog_value_callback_threshold(option, min, max)
200
- send_request(FUNCTION_SET_ANALOG_VALUE_CALLBACK_THRESHOLD, [option, min, max], 'k S S', 0, '')
197
+ send_request FUNCTION_SET_ANALOG_VALUE_CALLBACK_THRESHOLD, [option, min, max], 'k S S', 0, ''
201
198
  end
202
199
 
203
200
  # Returns the threshold as set by BrickletAmbientLight#set_analog_value_callback_threshold.
204
201
  def get_analog_value_callback_threshold
205
- send_request(FUNCTION_GET_ANALOG_VALUE_CALLBACK_THRESHOLD, [], '', 5, 'k S S')
202
+ send_request FUNCTION_GET_ANALOG_VALUE_CALLBACK_THRESHOLD, [], '', 5, 'k S S'
206
203
  end
207
204
 
208
205
  # Sets the period in ms with which the threshold callbacks
@@ -219,12 +216,12 @@ module Tinkerforge
219
216
  #
220
217
  # The default value is 100.
221
218
  def set_debounce_period(debounce)
222
- send_request(FUNCTION_SET_DEBOUNCE_PERIOD, [debounce], 'L', 0, '')
219
+ send_request FUNCTION_SET_DEBOUNCE_PERIOD, [debounce], 'L', 0, ''
223
220
  end
224
221
 
225
222
  # Returns the debounce period as set by BrickletAmbientLight#set_debounce_period.
226
223
  def get_debounce_period
227
- send_request(FUNCTION_GET_DEBOUNCE_PERIOD, [], '', 4, 'L')
224
+ send_request FUNCTION_GET_DEBOUNCE_PERIOD, [], '', 4, 'L'
228
225
  end
229
226
 
230
227
  # Returns the UID, the UID where the Bricklet is connected to,
@@ -236,7 +233,7 @@ module Tinkerforge
236
233
  # The device identifier numbers can be found :ref:`here <device_identifier>`.
237
234
  # |device_identifier_constant|
238
235
  def get_identity
239
- send_request(FUNCTION_GET_IDENTITY, [], '', 25, 'Z8 Z8 k C3 C3 S')
236
+ send_request FUNCTION_GET_IDENTITY, [], '', 25, 'Z8 Z8 k C3 C3 S'
240
237
  end
241
238
 
242
239
  # Registers a callback with ID <tt>id</tt> to the block <tt>block</tt>.
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2017-05-11. #
3
+ # This file was automatically generated on 2017-07-27. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.13 #
5
+ # Ruby Bindings Version 2.1.14 #
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 #
@@ -79,12 +79,11 @@ module Tinkerforge
79
79
  @response_expected[FUNCTION_GET_DEBOUNCE_PERIOD] = RESPONSE_EXPECTED_ALWAYS_TRUE
80
80
  @response_expected[FUNCTION_SET_CONFIGURATION] = RESPONSE_EXPECTED_FALSE
81
81
  @response_expected[FUNCTION_GET_CONFIGURATION] = RESPONSE_EXPECTED_ALWAYS_TRUE
82
- @response_expected[CALLBACK_ILLUMINANCE] = RESPONSE_EXPECTED_ALWAYS_FALSE
83
- @response_expected[CALLBACK_ILLUMINANCE_REACHED] = RESPONSE_EXPECTED_ALWAYS_FALSE
84
82
  @response_expected[FUNCTION_GET_IDENTITY] = RESPONSE_EXPECTED_ALWAYS_TRUE
85
83
 
86
84
  @callback_formats[CALLBACK_ILLUMINANCE] = 'L'
87
85
  @callback_formats[CALLBACK_ILLUMINANCE_REACHED] = 'L'
86
+
88
87
  end
89
88
 
90
89
  # Returns the illuminance of the ambient light sensor. The measurement range goes
@@ -100,7 +99,7 @@ module Tinkerforge
100
99
  # CALLBACK_ILLUMINANCE callback and set the period with
101
100
  # BrickletAmbientLightV2#set_illuminance_callback_period.
102
101
  def get_illuminance
103
- send_request(FUNCTION_GET_ILLUMINANCE, [], '', 4, 'L')
102
+ send_request FUNCTION_GET_ILLUMINANCE, [], '', 4, 'L'
104
103
  end
105
104
 
106
105
  # Sets the period in ms with which the CALLBACK_ILLUMINANCE callback is triggered
@@ -111,12 +110,12 @@ module Tinkerforge
111
110
  #
112
111
  # The default value is 0.
113
112
  def set_illuminance_callback_period(period)
114
- send_request(FUNCTION_SET_ILLUMINANCE_CALLBACK_PERIOD, [period], 'L', 0, '')
113
+ send_request FUNCTION_SET_ILLUMINANCE_CALLBACK_PERIOD, [period], 'L', 0, ''
115
114
  end
116
115
 
117
116
  # Returns the period as set by BrickletAmbientLightV2#set_illuminance_callback_period.
118
117
  def get_illuminance_callback_period
119
- send_request(FUNCTION_GET_ILLUMINANCE_CALLBACK_PERIOD, [], '', 4, 'L')
118
+ send_request FUNCTION_GET_ILLUMINANCE_CALLBACK_PERIOD, [], '', 4, 'L'
120
119
  end
121
120
 
122
121
  # Sets the thresholds for the CALLBACK_ILLUMINANCE_REACHED callback.
@@ -133,12 +132,12 @@ module Tinkerforge
133
132
  #
134
133
  # The default value is ('x', 0, 0).
135
134
  def set_illuminance_callback_threshold(option, min, max)
136
- send_request(FUNCTION_SET_ILLUMINANCE_CALLBACK_THRESHOLD, [option, min, max], 'k L L', 0, '')
135
+ send_request FUNCTION_SET_ILLUMINANCE_CALLBACK_THRESHOLD, [option, min, max], 'k L L', 0, ''
137
136
  end
138
137
 
139
138
  # Returns the threshold as set by BrickletAmbientLightV2#set_illuminance_callback_threshold.
140
139
  def get_illuminance_callback_threshold
141
- send_request(FUNCTION_GET_ILLUMINANCE_CALLBACK_THRESHOLD, [], '', 9, 'k L L')
140
+ send_request FUNCTION_GET_ILLUMINANCE_CALLBACK_THRESHOLD, [], '', 9, 'k L L'
142
141
  end
143
142
 
144
143
  # Sets the period in ms with which the threshold callbacks
@@ -153,12 +152,12 @@ module Tinkerforge
153
152
  #
154
153
  # The default value is 100.
155
154
  def set_debounce_period(debounce)
156
- send_request(FUNCTION_SET_DEBOUNCE_PERIOD, [debounce], 'L', 0, '')
155
+ send_request FUNCTION_SET_DEBOUNCE_PERIOD, [debounce], 'L', 0, ''
157
156
  end
158
157
 
159
158
  # Returns the debounce period as set by BrickletAmbientLightV2#set_debounce_period.
160
159
  def get_debounce_period
161
- send_request(FUNCTION_GET_DEBOUNCE_PERIOD, [], '', 4, 'L')
160
+ send_request FUNCTION_GET_DEBOUNCE_PERIOD, [], '', 4, 'L'
162
161
  end
163
162
 
164
163
  # Sets the configuration. It is possible to configure an illuminance range
@@ -187,12 +186,12 @@ module Tinkerforge
187
186
  #
188
187
  # The default values are 0-8000lux illuminance range and 200ms integration time.
189
188
  def set_configuration(illuminance_range, integration_time)
190
- send_request(FUNCTION_SET_CONFIGURATION, [illuminance_range, integration_time], 'C C', 0, '')
189
+ send_request FUNCTION_SET_CONFIGURATION, [illuminance_range, integration_time], 'C C', 0, ''
191
190
  end
192
191
 
193
192
  # Returns the configuration as set by BrickletAmbientLightV2#set_configuration.
194
193
  def get_configuration
195
- send_request(FUNCTION_GET_CONFIGURATION, [], '', 2, 'C C')
194
+ send_request FUNCTION_GET_CONFIGURATION, [], '', 2, 'C C'
196
195
  end
197
196
 
198
197
  # Returns the UID, the UID where the Bricklet is connected to,
@@ -204,7 +203,7 @@ module Tinkerforge
204
203
  # The device identifier numbers can be found :ref:`here <device_identifier>`.
205
204
  # |device_identifier_constant|
206
205
  def get_identity
207
- send_request(FUNCTION_GET_IDENTITY, [], '', 25, 'Z8 Z8 k C3 C3 S')
206
+ send_request FUNCTION_GET_IDENTITY, [], '', 25, 'Z8 Z8 k C3 C3 S'
208
207
  end
209
208
 
210
209
  # Registers a callback with ID <tt>id</tt> to the block <tt>block</tt>.
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2017-05-11. #
3
+ # This file was automatically generated on 2017-07-27. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.13 #
5
+ # Ruby Bindings Version 2.1.14 #
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 #
@@ -96,10 +96,6 @@ module Tinkerforge
96
96
  @response_expected[FUNCTION_GET_ANALOG_VALUE_CALLBACK_THRESHOLD] = RESPONSE_EXPECTED_ALWAYS_TRUE
97
97
  @response_expected[FUNCTION_SET_DEBOUNCE_PERIOD] = RESPONSE_EXPECTED_TRUE
98
98
  @response_expected[FUNCTION_GET_DEBOUNCE_PERIOD] = RESPONSE_EXPECTED_ALWAYS_TRUE
99
- @response_expected[CALLBACK_VOLTAGE] = RESPONSE_EXPECTED_ALWAYS_FALSE
100
- @response_expected[CALLBACK_ANALOG_VALUE] = RESPONSE_EXPECTED_ALWAYS_FALSE
101
- @response_expected[CALLBACK_VOLTAGE_REACHED] = RESPONSE_EXPECTED_ALWAYS_FALSE
102
- @response_expected[CALLBACK_ANALOG_VALUE_REACHED] = RESPONSE_EXPECTED_ALWAYS_FALSE
103
99
  @response_expected[FUNCTION_SET_RANGE] = RESPONSE_EXPECTED_FALSE
104
100
  @response_expected[FUNCTION_GET_RANGE] = RESPONSE_EXPECTED_ALWAYS_TRUE
105
101
  @response_expected[FUNCTION_SET_AVERAGING] = RESPONSE_EXPECTED_FALSE
@@ -110,6 +106,7 @@ module Tinkerforge
110
106
  @callback_formats[CALLBACK_ANALOG_VALUE] = 'S'
111
107
  @callback_formats[CALLBACK_VOLTAGE_REACHED] = 'S'
112
108
  @callback_formats[CALLBACK_ANALOG_VALUE_REACHED] = 'S'
109
+
113
110
  end
114
111
 
115
112
  # Returns the voltage of the sensor. The value is in mV and
@@ -120,7 +117,7 @@ module Tinkerforge
120
117
  # CALLBACK_VOLTAGE callback and set the period with
121
118
  # BrickletAnalogIn#set_voltage_callback_period.
122
119
  def get_voltage
123
- send_request(FUNCTION_GET_VOLTAGE, [], '', 2, 'S')
120
+ send_request FUNCTION_GET_VOLTAGE, [], '', 2, 'S'
124
121
  end
125
122
 
126
123
  # Returns the value as read by a 12-bit analog-to-digital converter.
@@ -136,7 +133,7 @@ module Tinkerforge
136
133
  # CALLBACK_ANALOG_VALUE callback and set the period with
137
134
  # BrickletAnalogIn#set_analog_value_callback_period.
138
135
  def get_analog_value
139
- send_request(FUNCTION_GET_ANALOG_VALUE, [], '', 2, 'S')
136
+ send_request FUNCTION_GET_ANALOG_VALUE, [], '', 2, 'S'
140
137
  end
141
138
 
142
139
  # Sets the period in ms with which the CALLBACK_VOLTAGE callback is triggered
@@ -147,12 +144,12 @@ module Tinkerforge
147
144
  #
148
145
  # The default value is 0.
149
146
  def set_voltage_callback_period(period)
150
- send_request(FUNCTION_SET_VOLTAGE_CALLBACK_PERIOD, [period], 'L', 0, '')
147
+ send_request FUNCTION_SET_VOLTAGE_CALLBACK_PERIOD, [period], 'L', 0, ''
151
148
  end
152
149
 
153
150
  # Returns the period as set by BrickletAnalogIn#set_voltage_callback_period.
154
151
  def get_voltage_callback_period
155
- send_request(FUNCTION_GET_VOLTAGE_CALLBACK_PERIOD, [], '', 4, 'L')
152
+ send_request FUNCTION_GET_VOLTAGE_CALLBACK_PERIOD, [], '', 4, 'L'
156
153
  end
157
154
 
158
155
  # Sets the period in ms with which the CALLBACK_ANALOG_VALUE callback is triggered
@@ -163,12 +160,12 @@ module Tinkerforge
163
160
  #
164
161
  # The default value is 0.
165
162
  def set_analog_value_callback_period(period)
166
- send_request(FUNCTION_SET_ANALOG_VALUE_CALLBACK_PERIOD, [period], 'L', 0, '')
163
+ send_request FUNCTION_SET_ANALOG_VALUE_CALLBACK_PERIOD, [period], 'L', 0, ''
167
164
  end
168
165
 
169
166
  # Returns the period as set by BrickletAnalogIn#set_analog_value_callback_period.
170
167
  def get_analog_value_callback_period
171
- send_request(FUNCTION_GET_ANALOG_VALUE_CALLBACK_PERIOD, [], '', 4, 'L')
168
+ send_request FUNCTION_GET_ANALOG_VALUE_CALLBACK_PERIOD, [], '', 4, 'L'
172
169
  end
173
170
 
174
171
  # Sets the thresholds for the CALLBACK_VOLTAGE_REACHED callback.
@@ -185,12 +182,12 @@ module Tinkerforge
185
182
  #
186
183
  # The default value is ('x', 0, 0).
187
184
  def set_voltage_callback_threshold(option, min, max)
188
- send_request(FUNCTION_SET_VOLTAGE_CALLBACK_THRESHOLD, [option, min, max], 'k S S', 0, '')
185
+ send_request FUNCTION_SET_VOLTAGE_CALLBACK_THRESHOLD, [option, min, max], 'k S S', 0, ''
189
186
  end
190
187
 
191
188
  # Returns the threshold as set by BrickletAnalogIn#set_voltage_callback_threshold.
192
189
  def get_voltage_callback_threshold
193
- send_request(FUNCTION_GET_VOLTAGE_CALLBACK_THRESHOLD, [], '', 5, 'k S S')
190
+ send_request FUNCTION_GET_VOLTAGE_CALLBACK_THRESHOLD, [], '', 5, 'k S S'
194
191
  end
195
192
 
196
193
  # Sets the thresholds for the CALLBACK_ANALOG_VALUE_REACHED callback.
@@ -207,12 +204,12 @@ module Tinkerforge
207
204
  #
208
205
  # The default value is ('x', 0, 0).
209
206
  def set_analog_value_callback_threshold(option, min, max)
210
- send_request(FUNCTION_SET_ANALOG_VALUE_CALLBACK_THRESHOLD, [option, min, max], 'k S S', 0, '')
207
+ send_request FUNCTION_SET_ANALOG_VALUE_CALLBACK_THRESHOLD, [option, min, max], 'k S S', 0, ''
211
208
  end
212
209
 
213
210
  # Returns the threshold as set by BrickletAnalogIn#set_analog_value_callback_threshold.
214
211
  def get_analog_value_callback_threshold
215
- send_request(FUNCTION_GET_ANALOG_VALUE_CALLBACK_THRESHOLD, [], '', 5, 'k S S')
212
+ send_request FUNCTION_GET_ANALOG_VALUE_CALLBACK_THRESHOLD, [], '', 5, 'k S S'
216
213
  end
217
214
 
218
215
  # Sets the period in ms with which the threshold callbacks
@@ -229,12 +226,12 @@ module Tinkerforge
229
226
  #
230
227
  # The default value is 100.
231
228
  def set_debounce_period(debounce)
232
- send_request(FUNCTION_SET_DEBOUNCE_PERIOD, [debounce], 'L', 0, '')
229
+ send_request FUNCTION_SET_DEBOUNCE_PERIOD, [debounce], 'L', 0, ''
233
230
  end
234
231
 
235
232
  # Returns the debounce period as set by BrickletAnalogIn#set_debounce_period.
236
233
  def get_debounce_period
237
- send_request(FUNCTION_GET_DEBOUNCE_PERIOD, [], '', 4, 'L')
234
+ send_request FUNCTION_GET_DEBOUNCE_PERIOD, [], '', 4, 'L'
238
235
  end
239
236
 
240
237
  # Sets the measurement range. Possible ranges:
@@ -250,14 +247,14 @@ module Tinkerforge
250
247
  #
251
248
  # .. versionadded:: 2.0.1$nbsp;(Plugin)
252
249
  def set_range(range)
253
- send_request(FUNCTION_SET_RANGE, [range], 'C', 0, '')
250
+ send_request FUNCTION_SET_RANGE, [range], 'C', 0, ''
254
251
  end
255
252
 
256
253
  # Returns the measurement range as set by BrickletAnalogIn#set_range.
257
254
  #
258
255
  # .. versionadded:: 2.0.1$nbsp;(Plugin)
259
256
  def get_range
260
- send_request(FUNCTION_GET_RANGE, [], '', 1, 'C')
257
+ send_request FUNCTION_GET_RANGE, [], '', 1, 'C'
261
258
  end
262
259
 
263
260
  # Set the length of a averaging for the voltage value.
@@ -270,14 +267,14 @@ module Tinkerforge
270
267
  #
271
268
  # .. versionadded:: 2.0.3$nbsp;(Plugin)
272
269
  def set_averaging(average)
273
- send_request(FUNCTION_SET_AVERAGING, [average], 'C', 0, '')
270
+ send_request FUNCTION_SET_AVERAGING, [average], 'C', 0, ''
274
271
  end
275
272
 
276
273
  # Returns the averaging configuration as set by BrickletAnalogIn#set_averaging.
277
274
  #
278
275
  # .. versionadded:: 2.0.3$nbsp;(Plugin)
279
276
  def get_averaging
280
- send_request(FUNCTION_GET_AVERAGING, [], '', 1, 'C')
277
+ send_request FUNCTION_GET_AVERAGING, [], '', 1, 'C'
281
278
  end
282
279
 
283
280
  # Returns the UID, the UID where the Bricklet is connected to,
@@ -289,7 +286,7 @@ module Tinkerforge
289
286
  # The device identifier numbers can be found :ref:`here <device_identifier>`.
290
287
  # |device_identifier_constant|
291
288
  def get_identity
292
- send_request(FUNCTION_GET_IDENTITY, [], '', 25, 'Z8 Z8 k C3 C3 S')
289
+ send_request FUNCTION_GET_IDENTITY, [], '', 25, 'Z8 Z8 k C3 C3 S'
293
290
  end
294
291
 
295
292
  # Registers a callback with ID <tt>id</tt> to the block <tt>block</tt>.
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2017-05-11. #
3
+ # This file was automatically generated on 2017-07-27. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.13 #
5
+ # Ruby Bindings Version 2.1.14 #
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 #
@@ -90,16 +90,13 @@ module Tinkerforge
90
90
  @response_expected[FUNCTION_GET_DEBOUNCE_PERIOD] = RESPONSE_EXPECTED_ALWAYS_TRUE
91
91
  @response_expected[FUNCTION_SET_MOVING_AVERAGE] = RESPONSE_EXPECTED_FALSE
92
92
  @response_expected[FUNCTION_GET_MOVING_AVERAGE] = RESPONSE_EXPECTED_ALWAYS_TRUE
93
- @response_expected[CALLBACK_VOLTAGE] = RESPONSE_EXPECTED_ALWAYS_FALSE
94
- @response_expected[CALLBACK_ANALOG_VALUE] = RESPONSE_EXPECTED_ALWAYS_FALSE
95
- @response_expected[CALLBACK_VOLTAGE_REACHED] = RESPONSE_EXPECTED_ALWAYS_FALSE
96
- @response_expected[CALLBACK_ANALOG_VALUE_REACHED] = RESPONSE_EXPECTED_ALWAYS_FALSE
97
93
  @response_expected[FUNCTION_GET_IDENTITY] = RESPONSE_EXPECTED_ALWAYS_TRUE
98
94
 
99
95
  @callback_formats[CALLBACK_VOLTAGE] = 'S'
100
96
  @callback_formats[CALLBACK_ANALOG_VALUE] = 'S'
101
97
  @callback_formats[CALLBACK_VOLTAGE_REACHED] = 'S'
102
98
  @callback_formats[CALLBACK_ANALOG_VALUE_REACHED] = 'S'
99
+
103
100
  end
104
101
 
105
102
  # Returns the measured voltage. The value is in mV and
@@ -109,7 +106,7 @@ module Tinkerforge
109
106
  # CALLBACK_VOLTAGE callback and set the period with
110
107
  # BrickletAnalogInV2#set_voltage_callback_period.
111
108
  def get_voltage
112
- send_request(FUNCTION_GET_VOLTAGE, [], '', 2, 'S')
109
+ send_request FUNCTION_GET_VOLTAGE, [], '', 2, 'S'
113
110
  end
114
111
 
115
112
  # Returns the value as read by a 12-bit analog-to-digital converter.
@@ -119,7 +116,7 @@ module Tinkerforge
119
116
  # CALLBACK_ANALOG_VALUE callback and set the period with
120
117
  # BrickletAnalogInV2#set_analog_value_callback_period.
121
118
  def get_analog_value
122
- send_request(FUNCTION_GET_ANALOG_VALUE, [], '', 2, 'S')
119
+ send_request FUNCTION_GET_ANALOG_VALUE, [], '', 2, 'S'
123
120
  end
124
121
 
125
122
  # Sets the period in ms with which the CALLBACK_VOLTAGE callback is triggered
@@ -130,12 +127,12 @@ module Tinkerforge
130
127
  #
131
128
  # The default value is 0.
132
129
  def set_voltage_callback_period(period)
133
- send_request(FUNCTION_SET_VOLTAGE_CALLBACK_PERIOD, [period], 'L', 0, '')
130
+ send_request FUNCTION_SET_VOLTAGE_CALLBACK_PERIOD, [period], 'L', 0, ''
134
131
  end
135
132
 
136
133
  # Returns the period as set by BrickletAnalogInV2#set_voltage_callback_period.
137
134
  def get_voltage_callback_period
138
- send_request(FUNCTION_GET_VOLTAGE_CALLBACK_PERIOD, [], '', 4, 'L')
135
+ send_request FUNCTION_GET_VOLTAGE_CALLBACK_PERIOD, [], '', 4, 'L'
139
136
  end
140
137
 
141
138
  # Sets the period in ms with which the CALLBACK_ANALOG_VALUE callback is triggered
@@ -146,12 +143,12 @@ module Tinkerforge
146
143
  #
147
144
  # The default value is 0.
148
145
  def set_analog_value_callback_period(period)
149
- send_request(FUNCTION_SET_ANALOG_VALUE_CALLBACK_PERIOD, [period], 'L', 0, '')
146
+ send_request FUNCTION_SET_ANALOG_VALUE_CALLBACK_PERIOD, [period], 'L', 0, ''
150
147
  end
151
148
 
152
149
  # Returns the period as set by BrickletAnalogInV2#set_analog_value_callback_period.
153
150
  def get_analog_value_callback_period
154
- send_request(FUNCTION_GET_ANALOG_VALUE_CALLBACK_PERIOD, [], '', 4, 'L')
151
+ send_request FUNCTION_GET_ANALOG_VALUE_CALLBACK_PERIOD, [], '', 4, 'L'
155
152
  end
156
153
 
157
154
  # Sets the thresholds for the CALLBACK_VOLTAGE_REACHED callback.
@@ -168,12 +165,12 @@ module Tinkerforge
168
165
  #
169
166
  # The default value is ('x', 0, 0).
170
167
  def set_voltage_callback_threshold(option, min, max)
171
- send_request(FUNCTION_SET_VOLTAGE_CALLBACK_THRESHOLD, [option, min, max], 'k S S', 0, '')
168
+ send_request FUNCTION_SET_VOLTAGE_CALLBACK_THRESHOLD, [option, min, max], 'k S S', 0, ''
172
169
  end
173
170
 
174
171
  # Returns the threshold as set by BrickletAnalogInV2#set_voltage_callback_threshold.
175
172
  def get_voltage_callback_threshold
176
- send_request(FUNCTION_GET_VOLTAGE_CALLBACK_THRESHOLD, [], '', 5, 'k S S')
173
+ send_request FUNCTION_GET_VOLTAGE_CALLBACK_THRESHOLD, [], '', 5, 'k S S'
177
174
  end
178
175
 
179
176
  # Sets the thresholds for the CALLBACK_ANALOG_VALUE_REACHED callback.
@@ -190,12 +187,12 @@ module Tinkerforge
190
187
  #
191
188
  # The default value is ('x', 0, 0).
192
189
  def set_analog_value_callback_threshold(option, min, max)
193
- send_request(FUNCTION_SET_ANALOG_VALUE_CALLBACK_THRESHOLD, [option, min, max], 'k S S', 0, '')
190
+ send_request FUNCTION_SET_ANALOG_VALUE_CALLBACK_THRESHOLD, [option, min, max], 'k S S', 0, ''
194
191
  end
195
192
 
196
193
  # Returns the threshold as set by BrickletAnalogInV2#set_analog_value_callback_threshold.
197
194
  def get_analog_value_callback_threshold
198
- send_request(FUNCTION_GET_ANALOG_VALUE_CALLBACK_THRESHOLD, [], '', 5, 'k S S')
195
+ send_request FUNCTION_GET_ANALOG_VALUE_CALLBACK_THRESHOLD, [], '', 5, 'k S S'
199
196
  end
200
197
 
201
198
  # Sets the period in ms with which the threshold callbacks
@@ -212,12 +209,12 @@ module Tinkerforge
212
209
  #
213
210
  # The default value is 100.
214
211
  def set_debounce_period(debounce)
215
- send_request(FUNCTION_SET_DEBOUNCE_PERIOD, [debounce], 'L', 0, '')
212
+ send_request FUNCTION_SET_DEBOUNCE_PERIOD, [debounce], 'L', 0, ''
216
213
  end
217
214
 
218
215
  # Returns the debounce period as set by BrickletAnalogInV2#set_debounce_period.
219
216
  def get_debounce_period
220
- send_request(FUNCTION_GET_DEBOUNCE_PERIOD, [], '', 4, 'L')
217
+ send_request FUNCTION_GET_DEBOUNCE_PERIOD, [], '', 4, 'L'
221
218
  end
222
219
 
223
220
  # Sets the length of a `moving averaging <https://en.wikipedia.org/wiki/Moving_average>`__
@@ -230,12 +227,12 @@ module Tinkerforge
230
227
  #
231
228
  # The default value is 50.
232
229
  def set_moving_average(average)
233
- send_request(FUNCTION_SET_MOVING_AVERAGE, [average], 'C', 0, '')
230
+ send_request FUNCTION_SET_MOVING_AVERAGE, [average], 'C', 0, ''
234
231
  end
235
232
 
236
233
  # Returns the length of the moving average as set by BrickletAnalogInV2#set_moving_average.
237
234
  def get_moving_average
238
- send_request(FUNCTION_GET_MOVING_AVERAGE, [], '', 1, 'C')
235
+ send_request FUNCTION_GET_MOVING_AVERAGE, [], '', 1, 'C'
239
236
  end
240
237
 
241
238
  # Returns the UID, the UID where the Bricklet is connected to,
@@ -247,7 +244,7 @@ module Tinkerforge
247
244
  # The device identifier numbers can be found :ref:`here <device_identifier>`.
248
245
  # |device_identifier_constant|
249
246
  def get_identity
250
- send_request(FUNCTION_GET_IDENTITY, [], '', 25, 'Z8 Z8 k C3 C3 S')
247
+ send_request FUNCTION_GET_IDENTITY, [], '', 25, 'Z8 Z8 k C3 C3 S'
251
248
  end
252
249
 
253
250
  # Registers a callback with ID <tt>id</tt> to the block <tt>block</tt>.
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2017-05-11. #
3
+ # This file was automatically generated on 2017-07-27. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.13 #
5
+ # Ruby Bindings Version 2.1.14 #
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 #
@@ -39,6 +39,7 @@ module Tinkerforge
39
39
  @response_expected[FUNCTION_GET_MODE] = RESPONSE_EXPECTED_ALWAYS_TRUE
40
40
  @response_expected[FUNCTION_GET_IDENTITY] = RESPONSE_EXPECTED_ALWAYS_TRUE
41
41
 
42
+
42
43
  end
43
44
 
44
45
  # Sets the voltage in mV. The possible range is 0V to 5V (0-5000).
@@ -46,12 +47,12 @@ module Tinkerforge
46
47
  #
47
48
  # The default value is 0 (with mode 1).
48
49
  def set_voltage(voltage)
49
- send_request(FUNCTION_SET_VOLTAGE, [voltage], 'S', 0, '')
50
+ send_request FUNCTION_SET_VOLTAGE, [voltage], 'S', 0, ''
50
51
  end
51
52
 
52
53
  # Returns the voltage as set by BrickletAnalogOut#set_voltage.
53
54
  def get_voltage
54
- send_request(FUNCTION_GET_VOLTAGE, [], '', 2, 'S')
55
+ send_request FUNCTION_GET_VOLTAGE, [], '', 2, 'S'
55
56
  end
56
57
 
57
58
  # Sets the mode of the analog value. Possible modes:
@@ -66,12 +67,12 @@ module Tinkerforge
66
67
  #
67
68
  # The default mode is 1.
68
69
  def set_mode(mode)
69
- send_request(FUNCTION_SET_MODE, [mode], 'C', 0, '')
70
+ send_request FUNCTION_SET_MODE, [mode], 'C', 0, ''
70
71
  end
71
72
 
72
73
  # Returns the mode as set by BrickletAnalogOut#set_mode.
73
74
  def get_mode
74
- send_request(FUNCTION_GET_MODE, [], '', 1, 'C')
75
+ send_request FUNCTION_GET_MODE, [], '', 1, 'C'
75
76
  end
76
77
 
77
78
  # Returns the UID, the UID where the Bricklet is connected to,
@@ -83,7 +84,7 @@ module Tinkerforge
83
84
  # The device identifier numbers can be found :ref:`here <device_identifier>`.
84
85
  # |device_identifier_constant|
85
86
  def get_identity
86
- send_request(FUNCTION_GET_IDENTITY, [], '', 25, 'Z8 Z8 k C3 C3 S')
87
+ send_request FUNCTION_GET_IDENTITY, [], '', 25, 'Z8 Z8 k C3 C3 S'
87
88
  end
88
89
 
89
90
  end
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2017-05-11. #
3
+ # This file was automatically generated on 2017-07-27. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.13 #
5
+ # Ruby Bindings Version 2.1.14 #
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 #
@@ -33,21 +33,22 @@ module Tinkerforge
33
33
  @response_expected[FUNCTION_GET_INPUT_VOLTAGE] = RESPONSE_EXPECTED_ALWAYS_TRUE
34
34
  @response_expected[FUNCTION_GET_IDENTITY] = RESPONSE_EXPECTED_ALWAYS_TRUE
35
35
 
36
+
36
37
  end
37
38
 
38
39
  # Sets the voltage in mV. The possible range is 0V to 12V (0-12000).
39
40
  def set_output_voltage(voltage)
40
- send_request(FUNCTION_SET_OUTPUT_VOLTAGE, [voltage], 'S', 0, '')
41
+ send_request FUNCTION_SET_OUTPUT_VOLTAGE, [voltage], 'S', 0, ''
41
42
  end
42
43
 
43
44
  # Returns the voltage as set by BrickletAnalogOutV2#set_output_voltage.
44
45
  def get_output_voltage
45
- send_request(FUNCTION_GET_OUTPUT_VOLTAGE, [], '', 2, 'S')
46
+ send_request FUNCTION_GET_OUTPUT_VOLTAGE, [], '', 2, 'S'
46
47
  end
47
48
 
48
49
  # Returns the input voltage in mV.
49
50
  def get_input_voltage
50
- send_request(FUNCTION_GET_INPUT_VOLTAGE, [], '', 2, 'S')
51
+ send_request FUNCTION_GET_INPUT_VOLTAGE, [], '', 2, 'S'
51
52
  end
52
53
 
53
54
  # Returns the UID, the UID where the Bricklet is connected to,
@@ -59,7 +60,7 @@ module Tinkerforge
59
60
  # The device identifier numbers can be found :ref:`here <device_identifier>`.
60
61
  # |device_identifier_constant|
61
62
  def get_identity
62
- send_request(FUNCTION_GET_IDENTITY, [], '', 25, 'Z8 Z8 k C3 C3 S')
63
+ send_request FUNCTION_GET_IDENTITY, [], '', 25, 'Z8 Z8 k C3 C3 S'
63
64
  end
64
65
 
65
66
  end