tinkerforge 2.1.23 → 2.1.24
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.
- checksums.yaml +4 -4
- data/lib/tinkerforge/brick_dc.rb +2 -2
- data/lib/tinkerforge/brick_hat.rb +45 -4
- data/lib/tinkerforge/brick_hat_zero.rb +69 -3
- data/lib/tinkerforge/brick_imu.rb +8 -10
- data/lib/tinkerforge/brick_imu_v2.rb +12 -14
- data/lib/tinkerforge/brick_master.rb +6 -14
- data/lib/tinkerforge/brick_red.rb +2 -2
- data/lib/tinkerforge/brick_servo.rb +2 -2
- data/lib/tinkerforge/brick_silent_stepper.rb +3 -3
- data/lib/tinkerforge/brick_stepper.rb +3 -3
- data/lib/tinkerforge/bricklet_accelerometer.rb +7 -16
- data/lib/tinkerforge/bricklet_accelerometer_v2.rb +18 -24
- data/lib/tinkerforge/bricklet_air_quality.rb +13 -23
- data/lib/tinkerforge/bricklet_ambient_light.rb +14 -27
- data/lib/tinkerforge/bricklet_ambient_light_v2.rb +4 -8
- data/lib/tinkerforge/bricklet_ambient_light_v3.rb +3 -5
- data/lib/tinkerforge/bricklet_analog_in.rb +6 -22
- data/lib/tinkerforge/bricklet_analog_in_v2.rb +6 -22
- data/lib/tinkerforge/bricklet_analog_in_v3.rb +4 -9
- data/lib/tinkerforge/bricklet_analog_out.rb +5 -9
- data/lib/tinkerforge/bricklet_analog_out_v2.rb +4 -4
- data/lib/tinkerforge/bricklet_analog_out_v3.rb +4 -4
- data/lib/tinkerforge/bricklet_barometer.rb +10 -33
- data/lib/tinkerforge/bricklet_barometer_v2.rb +13 -32
- data/lib/tinkerforge/bricklet_can.rb +3 -7
- data/lib/tinkerforge/bricklet_can_v2.rb +8 -40
- data/lib/tinkerforge/bricklet_co2.rb +5 -13
- data/lib/tinkerforge/bricklet_co2_v2.rb +24 -24
- data/lib/tinkerforge/bricklet_color.rb +9 -22
- data/lib/tinkerforge/bricklet_color_v2.rb +7 -16
- data/lib/tinkerforge/bricklet_compass.rb +6 -12
- data/lib/tinkerforge/bricklet_current12.rb +6 -18
- data/lib/tinkerforge/bricklet_current25.rb +6 -18
- data/lib/tinkerforge/bricklet_distance_ir.rb +6 -17
- data/lib/tinkerforge/bricklet_distance_ir_v2.rb +5 -16
- data/lib/tinkerforge/bricklet_distance_us.rb +6 -16
- data/lib/tinkerforge/bricklet_distance_us_v2.rb +4 -10
- data/lib/tinkerforge/bricklet_dmx.rb +7 -16
- data/lib/tinkerforge/bricklet_dual_button.rb +2 -4
- data/lib/tinkerforge/bricklet_dual_button_v2.rb +3 -7
- data/lib/tinkerforge/bricklet_dual_relay.rb +3 -5
- data/lib/tinkerforge/bricklet_dust_detector.rb +6 -16
- data/lib/tinkerforge/bricklet_e_paper_296x128.rb +30 -33
- data/lib/tinkerforge/bricklet_energy_monitor.rb +11 -15
- data/lib/tinkerforge/bricklet_gps.rb +11 -24
- data/lib/tinkerforge/bricklet_gps_v2.rb +10 -28
- data/lib/tinkerforge/bricklet_hall_effect.rb +3 -7
- data/lib/tinkerforge/bricklet_hall_effect_v2.rb +8 -19
- data/lib/tinkerforge/bricklet_humidity.rb +6 -19
- data/lib/tinkerforge/bricklet_humidity_v2.rb +6 -20
- data/lib/tinkerforge/bricklet_industrial_analog_out.rb +6 -6
- data/lib/tinkerforge/bricklet_industrial_analog_out_v2.rb +6 -13
- data/lib/tinkerforge/bricklet_industrial_counter.rb +4 -22
- data/lib/tinkerforge/bricklet_industrial_digital_in_4.rb +9 -9
- data/lib/tinkerforge/bricklet_industrial_digital_in_4_v2.rb +5 -13
- data/lib/tinkerforge/bricklet_industrial_digital_out_4.rb +3 -3
- data/lib/tinkerforge/bricklet_industrial_digital_out_4_v2.rb +5 -8
- data/lib/tinkerforge/bricklet_industrial_dual_0_20ma.rb +6 -15
- data/lib/tinkerforge/bricklet_industrial_dual_0_20ma_v2.rb +4 -16
- data/lib/tinkerforge/bricklet_industrial_dual_analog_in.rb +5 -13
- data/lib/tinkerforge/bricklet_industrial_dual_analog_in_v2.rb +4 -11
- data/lib/tinkerforge/bricklet_industrial_dual_relay.rb +5 -7
- data/lib/tinkerforge/bricklet_industrial_quad_relay.rb +3 -3
- data/lib/tinkerforge/bricklet_industrial_quad_relay_v2.rb +3 -5
- data/lib/tinkerforge/bricklet_io16.rb +5 -13
- data/lib/tinkerforge/bricklet_io16_v2.rb +6 -16
- data/lib/tinkerforge/bricklet_io4.rb +4 -10
- data/lib/tinkerforge/bricklet_io4_v2.rb +16 -23
- data/lib/tinkerforge/bricklet_isolator.rb +44 -11
- data/lib/tinkerforge/bricklet_joystick.rb +7 -19
- data/lib/tinkerforge/bricklet_joystick_v2.rb +6 -11
- data/lib/tinkerforge/bricklet_laser_range_finder.rb +8 -29
- data/lib/tinkerforge/bricklet_laser_range_finder_v2.rb +6 -17
- data/lib/tinkerforge/bricklet_lcd_128x64.rb +30 -63
- data/lib/tinkerforge/bricklet_lcd_16x2.rb +7 -9
- data/lib/tinkerforge/bricklet_lcd_20x4.rb +4 -8
- data/lib/tinkerforge/bricklet_led_strip.rb +12 -27
- data/lib/tinkerforge/bricklet_led_strip_v2.rb +17 -4
- data/lib/tinkerforge/bricklet_line.rb +4 -10
- data/lib/tinkerforge/bricklet_linear_poti.rb +5 -16
- data/lib/tinkerforge/bricklet_linear_poti_v2.rb +3 -5
- data/lib/tinkerforge/bricklet_load_cell.rb +6 -19
- data/lib/tinkerforge/bricklet_load_cell_v2.rb +4 -13
- data/lib/tinkerforge/bricklet_moisture.rb +6 -16
- data/lib/tinkerforge/bricklet_motion_detector.rb +2 -2
- data/lib/tinkerforge/bricklet_motion_detector_v2.rb +3 -7
- data/lib/tinkerforge/bricklet_motorized_linear_poti.rb +3 -7
- data/lib/tinkerforge/bricklet_multi_touch.rb +2 -6
- data/lib/tinkerforge/bricklet_multi_touch_v2.rb +3 -13
- data/lib/tinkerforge/bricklet_nfc.rb +6 -20
- data/lib/tinkerforge/bricklet_nfc_rfid.rb +2 -2
- data/lib/tinkerforge/bricklet_oled_128x64.rb +4 -8
- data/lib/tinkerforge/bricklet_oled_128x64_v2.rb +12 -18
- data/lib/tinkerforge/bricklet_oled_64x48.rb +4 -8
- data/lib/tinkerforge/bricklet_one_wire.rb +2 -2
- data/lib/tinkerforge/bricklet_outdoor_weather.rb +16 -16
- data/lib/tinkerforge/bricklet_particulate_matter.rb +13 -9
- data/lib/tinkerforge/bricklet_piezo_buzzer.rb +3 -6
- data/lib/tinkerforge/bricklet_piezo_speaker.rb +3 -11
- data/lib/tinkerforge/bricklet_piezo_speaker_v2.rb +8 -18
- data/lib/tinkerforge/bricklet_ptc.rb +5 -11
- data/lib/tinkerforge/bricklet_ptc_v2.rb +4 -8
- data/lib/tinkerforge/bricklet_real_time_clock.rb +3 -5
- data/lib/tinkerforge/bricklet_real_time_clock_v2.rb +3 -5
- data/lib/tinkerforge/bricklet_remote_switch.rb +2 -2
- data/lib/tinkerforge/bricklet_remote_switch_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_rgb_led.rb +2 -2
- data/lib/tinkerforge/bricklet_rgb_led_button.rb +2 -2
- data/lib/tinkerforge/bricklet_rgb_led_matrix.rb +2 -2
- data/lib/tinkerforge/bricklet_rgb_led_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_rotary_encoder.rb +4 -8
- data/lib/tinkerforge/bricklet_rotary_encoder_v2.rb +3 -5
- data/lib/tinkerforge/bricklet_rotary_poti.rb +5 -11
- data/lib/tinkerforge/bricklet_rotary_poti_v2.rb +3 -5
- data/lib/tinkerforge/bricklet_rs232.rb +2 -2
- data/lib/tinkerforge/bricklet_rs232_v2.rb +6 -5
- data/lib/tinkerforge/bricklet_rs485.rb +30 -71
- data/lib/tinkerforge/bricklet_segment_display_4x7.rb +2 -2
- data/lib/tinkerforge/bricklet_segment_display_4x7_v2.rb +3 -3
- data/lib/tinkerforge/bricklet_solid_state_relay.rb +2 -2
- data/lib/tinkerforge/bricklet_solid_state_relay_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_sound_intensity.rb +4 -8
- data/lib/tinkerforge/bricklet_sound_pressure_level.rb +8 -12
- data/lib/tinkerforge/bricklet_temperature.rb +6 -14
- data/lib/tinkerforge/bricklet_temperature_ir.rb +7 -26
- data/lib/tinkerforge/bricklet_temperature_ir_v2.rb +6 -19
- data/lib/tinkerforge/bricklet_temperature_v2.rb +4 -8
- data/lib/tinkerforge/bricklet_thermal_imaging.rb +16 -26
- data/lib/tinkerforge/bricklet_thermocouple.rb +4 -8
- data/lib/tinkerforge/bricklet_thermocouple_v2.rb +3 -5
- data/lib/tinkerforge/bricklet_tilt.rb +2 -2
- data/lib/tinkerforge/bricklet_uv_light.rb +4 -8
- data/lib/tinkerforge/bricklet_uv_light_v2.rb +5 -11
- data/lib/tinkerforge/bricklet_voltage.rb +5 -11
- data/lib/tinkerforge/bricklet_voltage_current.rb +6 -14
- data/lib/tinkerforge/bricklet_voltage_current_v2.rb +5 -11
- data/lib/tinkerforge/bricklet_xmc1400_breakout.rb +4 -8
- data/lib/tinkerforge/ip_connection.rb +3 -0
- data/lib/tinkerforge/version.rb +1 -1
- metadata +2 -2
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-11-25. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.24 #
|
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 #
|
@@ -140,7 +140,7 @@ module Tinkerforge
|
|
140
140
|
send_request FUNCTION_GET_TEMPERATURE, [], '', 4, 'l'
|
141
141
|
end
|
142
142
|
|
143
|
-
# The period
|
143
|
+
# The period is the period with which the CALLBACK_TEMPERATURE callback is triggered
|
144
144
|
# periodically. A value of 0 turns the callback off.
|
145
145
|
#
|
146
146
|
# If the `value has to change`-parameter is set to true, the callback is only
|
@@ -165,8 +165,6 @@ module Tinkerforge
|
|
165
165
|
# "'>'", "Threshold is triggered when the value is greater than the min value (max is ignored)"
|
166
166
|
#
|
167
167
|
# If the option is set to 'x' (threshold turned off) the callback is triggered with the fixed period.
|
168
|
-
#
|
169
|
-
# The default value is (0, false, 'x', 0, 0).
|
170
168
|
def set_temperature_callback_configuration(period, value_has_to_change, option, min, max)
|
171
169
|
send_request FUNCTION_SET_TEMPERATURE_CALLBACK_CONFIGURATION, [period, value_has_to_change, option, min, max], 'L ? k l l', 0, ''
|
172
170
|
end
|
@@ -191,7 +189,7 @@ module Tinkerforge
|
|
191
189
|
send_request FUNCTION_GET_RESISTANCE, [], '', 4, 'l'
|
192
190
|
end
|
193
191
|
|
194
|
-
# The period
|
192
|
+
# The period is the period with which the CALLBACK_RESISTANCE callback is triggered
|
195
193
|
# periodically. A value of 0 turns the callback off.
|
196
194
|
#
|
197
195
|
# If the `value has to change`-parameter is set to true, the callback is only
|
@@ -216,8 +214,6 @@ module Tinkerforge
|
|
216
214
|
# "'>'", "Threshold is triggered when the value is greater than the min value (max is ignored)"
|
217
215
|
#
|
218
216
|
# If the option is set to 'x' (threshold turned off) the callback is triggered with the fixed period.
|
219
|
-
#
|
220
|
-
# The default value is (0, false, 'x', 0, 0).
|
221
217
|
def set_resistance_callback_configuration(period, value_has_to_change, option, min, max)
|
222
218
|
send_request FUNCTION_SET_RESISTANCE_CALLBACK_CONFIGURATION, [period, value_has_to_change, option, min, max], 'L ? k l l', 0, ''
|
223
219
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-11-25. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.24 #
|
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 #
|
@@ -147,14 +147,12 @@ module Tinkerforge
|
|
147
147
|
send_request FUNCTION_GET_OFFSET, [], '', 1, 'c'
|
148
148
|
end
|
149
149
|
|
150
|
-
# Sets the period
|
150
|
+
# Sets the period with which the CALLBACK_DATE_TIME callback is triggered
|
151
151
|
# periodically. A value of 0 turns the callback off.
|
152
152
|
#
|
153
153
|
# The CALLBACK_DATE_TIME Callback is only triggered if the date or time changed
|
154
154
|
# since the last triggering.
|
155
155
|
#
|
156
|
-
# The default value is 0.
|
157
|
-
#
|
158
156
|
# .. versionadded:: 2.0.1$nbsp;(Plugin)
|
159
157
|
def set_date_time_callback_period(period)
|
160
158
|
send_request FUNCTION_SET_DATE_TIME_CALLBACK_PERIOD, [period], 'L', 0, ''
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-11-25. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.24 #
|
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 #
|
@@ -180,10 +180,8 @@ module Tinkerforge
|
|
180
180
|
send_request FUNCTION_GET_OFFSET, [], '', 1, 'c'
|
181
181
|
end
|
182
182
|
|
183
|
-
# Sets the period
|
183
|
+
# Sets the period with which the CALLBACK_DATE_TIME callback is triggered
|
184
184
|
# periodically. A value of 0 turns the callback off.
|
185
|
-
#
|
186
|
-
# The default value is 0.
|
187
185
|
def set_date_time_callback_configuration(period)
|
188
186
|
send_request FUNCTION_SET_DATE_TIME_CALLBACK_CONFIGURATION, [period], 'L', 0, ''
|
189
187
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-11-25. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.24 #
|
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 #
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-11-25. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.24 #
|
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 #
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-11-25. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.24 #
|
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 #
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-11-25. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.24 #
|
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 #
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-11-25. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.24 #
|
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 #
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-11-25. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.24 #
|
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 #
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-11-25. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.24 #
|
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 #
|
@@ -89,13 +89,11 @@ module Tinkerforge
|
|
89
89
|
send_request FUNCTION_GET_COUNT, [reset], '?', 4, 'l'
|
90
90
|
end
|
91
91
|
|
92
|
-
# Sets the period
|
92
|
+
# Sets the period with which the CALLBACK_COUNT callback is triggered
|
93
93
|
# periodically. A value of 0 turns the callback off.
|
94
94
|
#
|
95
95
|
# The CALLBACK_COUNT callback is only triggered if the count has changed since the
|
96
96
|
# last triggering.
|
97
|
-
#
|
98
|
-
# The default value is 0.
|
99
97
|
def set_count_callback_period(period)
|
100
98
|
send_request FUNCTION_SET_COUNT_CALLBACK_PERIOD, [period], 'L', 0, ''
|
101
99
|
end
|
@@ -127,7 +125,7 @@ module Tinkerforge
|
|
127
125
|
send_request FUNCTION_GET_COUNT_CALLBACK_THRESHOLD, [], '', 9, 'k l l'
|
128
126
|
end
|
129
127
|
|
130
|
-
# Sets the period
|
128
|
+
# Sets the period with which the threshold callback
|
131
129
|
#
|
132
130
|
# * CALLBACK_COUNT_REACHED
|
133
131
|
#
|
@@ -136,8 +134,6 @@ module Tinkerforge
|
|
136
134
|
# * BrickletRotaryEncoder#set_count_callback_threshold
|
137
135
|
#
|
138
136
|
# keeps being reached.
|
139
|
-
#
|
140
|
-
# The default value is 100.
|
141
137
|
def set_debounce_period(debounce)
|
142
138
|
send_request FUNCTION_SET_DEBOUNCE_PERIOD, [debounce], 'L', 0, ''
|
143
139
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-11-25. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.24 #
|
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 #
|
@@ -112,7 +112,7 @@ module Tinkerforge
|
|
112
112
|
send_request FUNCTION_GET_COUNT, [reset], '?', 4, 'l'
|
113
113
|
end
|
114
114
|
|
115
|
-
# The period
|
115
|
+
# The period is the period with which the CALLBACK_COUNT callback is triggered
|
116
116
|
# periodically. A value of 0 turns the callback off.
|
117
117
|
#
|
118
118
|
# If the `value has to change`-parameter is set to true, the callback is only
|
@@ -137,8 +137,6 @@ module Tinkerforge
|
|
137
137
|
# "'>'", "Threshold is triggered when the value is greater than the min value (max is ignored)"
|
138
138
|
#
|
139
139
|
# If the option is set to 'x' (threshold turned off) the callback is triggered with the fixed period.
|
140
|
-
#
|
141
|
-
# The default value is (0, false, 'x', 0, 0).
|
142
140
|
def set_count_callback_configuration(period, value_has_to_change, option, min, max)
|
143
141
|
send_request FUNCTION_SET_COUNT_CALLBACK_CONFIGURATION, [period, value_has_to_change, option, min, max], 'L ? k l l', 0, ''
|
144
142
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-11-25. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.24 #
|
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 #
|
@@ -121,13 +121,11 @@ module Tinkerforge
|
|
121
121
|
send_request FUNCTION_GET_ANALOG_VALUE, [], '', 2, 'S'
|
122
122
|
end
|
123
123
|
|
124
|
-
# Sets the period
|
124
|
+
# Sets the period with which the CALLBACK_POSITION callback is triggered
|
125
125
|
# periodically. A value of 0 turns the callback off.
|
126
126
|
#
|
127
127
|
# The CALLBACK_POSITION callback is only triggered if the position has changed since
|
128
128
|
# the last triggering.
|
129
|
-
#
|
130
|
-
# The default value is 0.
|
131
129
|
def set_position_callback_period(period)
|
132
130
|
send_request FUNCTION_SET_POSITION_CALLBACK_PERIOD, [period], 'L', 0, ''
|
133
131
|
end
|
@@ -137,13 +135,11 @@ module Tinkerforge
|
|
137
135
|
send_request FUNCTION_GET_POSITION_CALLBACK_PERIOD, [], '', 4, 'L'
|
138
136
|
end
|
139
137
|
|
140
|
-
# Sets the period
|
138
|
+
# Sets the period with which the CALLBACK_ANALOG_VALUE callback is triggered
|
141
139
|
# periodically. A value of 0 turns the callback off.
|
142
140
|
#
|
143
141
|
# The CALLBACK_ANALOG_VALUE callback is only triggered if the analog value has
|
144
142
|
# changed since the last triggering.
|
145
|
-
#
|
146
|
-
# The default value is 0.
|
147
143
|
def set_analog_value_callback_period(period)
|
148
144
|
send_request FUNCTION_SET_ANALOG_VALUE_CALLBACK_PERIOD, [period], 'L', 0, ''
|
149
145
|
end
|
@@ -197,7 +193,7 @@ module Tinkerforge
|
|
197
193
|
send_request FUNCTION_GET_ANALOG_VALUE_CALLBACK_THRESHOLD, [], '', 5, 'k S S'
|
198
194
|
end
|
199
195
|
|
200
|
-
# Sets the period
|
196
|
+
# Sets the period with which the threshold callbacks
|
201
197
|
#
|
202
198
|
# * CALLBACK_POSITION_REACHED,
|
203
199
|
# * CALLBACK_ANALOG_VALUE_REACHED
|
@@ -208,8 +204,6 @@ module Tinkerforge
|
|
208
204
|
# * BrickletRotaryPoti#set_analog_value_callback_threshold
|
209
205
|
#
|
210
206
|
# keep being reached.
|
211
|
-
#
|
212
|
-
# The default value is 100.
|
213
207
|
def set_debounce_period(debounce)
|
214
208
|
send_request FUNCTION_SET_DEBOUNCE_PERIOD, [debounce], 'L', 0, ''
|
215
209
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-11-25. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.24 #
|
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,7 +96,7 @@ module Tinkerforge
|
|
96
96
|
send_request FUNCTION_GET_POSITION, [], '', 2, 's'
|
97
97
|
end
|
98
98
|
|
99
|
-
# The period
|
99
|
+
# The period is the period with which the CALLBACK_POSITION callback is triggered
|
100
100
|
# periodically. A value of 0 turns the callback off.
|
101
101
|
#
|
102
102
|
# If the `value has to change`-parameter is set to true, the callback is only
|
@@ -121,8 +121,6 @@ module Tinkerforge
|
|
121
121
|
# "'>'", "Threshold is triggered when the value is greater than the min value (max is ignored)"
|
122
122
|
#
|
123
123
|
# If the option is set to 'x' (threshold turned off) the callback is triggered with the fixed period.
|
124
|
-
#
|
125
|
-
# The default value is (0, false, 'x', 0, 0).
|
126
124
|
def set_position_callback_configuration(period, value_has_to_change, option, min, max)
|
127
125
|
send_request FUNCTION_SET_POSITION_CALLBACK_CONFIGURATION, [period, value_has_to_change, option, min, max], 'L ? k s s', 0, ''
|
128
126
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-11-25. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.24 #
|
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 #
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-11-25. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.24 #
|
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 #
|
@@ -15,9 +15,7 @@ module Tinkerforge
|
|
15
15
|
DEVICE_IDENTIFIER = 2108 # :nodoc:
|
16
16
|
DEVICE_DISPLAY_NAME = 'RS232 Bricklet 2.0' # :nodoc:
|
17
17
|
|
18
|
-
#
|
19
|
-
#
|
20
|
-
# To enable this callback, use BrickletRS232V2#enable_read_callback.
|
18
|
+
# See CALLBACK_READ
|
21
19
|
CALLBACK_READ_LOW_LEVEL = 12
|
22
20
|
|
23
21
|
# This callback is called if a new error occurs. It returns
|
@@ -27,6 +25,9 @@ module Tinkerforge
|
|
27
25
|
# This callback is called if new data is available.
|
28
26
|
#
|
29
27
|
# To enable this callback, use BrickletRS232V2#enable_read_callback.
|
28
|
+
#
|
29
|
+
# .. note::
|
30
|
+
# If reconstructing the value fails, the callback is triggered with nil for message.
|
30
31
|
CALLBACK_READ = -12
|
31
32
|
|
32
33
|
FUNCTION_WRITE_LOW_LEVEL = 1 # :nodoc:
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-11-25. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.24 #
|
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 #
|
@@ -15,9 +15,7 @@ module Tinkerforge
|
|
15
15
|
DEVICE_IDENTIFIER = 277 # :nodoc:
|
16
16
|
DEVICE_DISPLAY_NAME = 'RS485 Bricklet' # :nodoc:
|
17
17
|
|
18
|
-
#
|
19
|
-
#
|
20
|
-
# To enable this callback, use BrickletRS485#enable_read_callback.
|
18
|
+
# See CALLBACK_READ
|
21
19
|
CALLBACK_READ_LOW_LEVEL = 41
|
22
20
|
|
23
21
|
# This callback is called if a new error occurs. It returns
|
@@ -33,19 +31,7 @@ module Tinkerforge
|
|
33
31
|
# To send a response of this request use BrickletRS485#modbus_slave_answer_read_coils_request.
|
34
32
|
CALLBACK_MODBUS_SLAVE_READ_COILS_REQUEST = 43
|
35
33
|
|
36
|
-
#
|
37
|
-
# valid response of a request to read coils.
|
38
|
-
#
|
39
|
-
# The parameters are request ID
|
40
|
-
# of the request, exception code of the response and the data as received by the
|
41
|
-
# response.
|
42
|
-
#
|
43
|
-
# Any non-zero exception code indicates a problem. If the exception code
|
44
|
-
# is greater than 0 then the number represents a Modbus exception code. If it is
|
45
|
-
# less than 0 then it represents other errors. For example, -1 indicates that
|
46
|
-
# the request timed out or that the master did not receive any valid response of the
|
47
|
-
# request within the master request timeout period as set by
|
48
|
-
# BrickletRS485#set_modbus_configuration.
|
34
|
+
# See CALLBACK_MODBUS_MASTER_READ_COILS_RESPONSE
|
49
35
|
CALLBACK_MODBUS_MASTER_READ_COILS_RESPONSE_LOW_LEVEL = 44
|
50
36
|
|
51
37
|
# This callback is called only in Modbus slave mode when the slave receives a
|
@@ -57,19 +43,7 @@ module Tinkerforge
|
|
57
43
|
# To send a response of this request use BrickletRS485#modbus_slave_answer_read_holding_registers_request.
|
58
44
|
CALLBACK_MODBUS_SLAVE_READ_HOLDING_REGISTERS_REQUEST = 45
|
59
45
|
|
60
|
-
#
|
61
|
-
# valid response of a request to read holding registers.
|
62
|
-
#
|
63
|
-
# The parameters are
|
64
|
-
# request ID of the request, exception code of the response and the data as received
|
65
|
-
# by the response.
|
66
|
-
#
|
67
|
-
# Any non-zero exception code indicates a problem. If the exception
|
68
|
-
# code is greater than 0 then the number represents a Modbus exception code. If
|
69
|
-
# it is less than 0 then it represents other errors. For example, -1 indicates that
|
70
|
-
# the request timed out or that the master did not receive any valid response of the
|
71
|
-
# request within the master request timeout period as set by
|
72
|
-
# BrickletRS485#set_modbus_configuration.
|
46
|
+
# See CALLBACK_MODBUS_MASTER_READ_HOLDING_REGISTERS_RESPONSE
|
73
47
|
CALLBACK_MODBUS_MASTER_READ_HOLDING_REGISTERS_RESPONSE_LOW_LEVEL = 46
|
74
48
|
|
75
49
|
# This callback is called only in Modbus slave mode when the slave receives a
|
@@ -118,13 +92,7 @@ module Tinkerforge
|
|
118
92
|
# timeout period as set by BrickletRS485#set_modbus_configuration.
|
119
93
|
CALLBACK_MODBUS_MASTER_WRITE_SINGLE_REGISTER_RESPONSE = 50
|
120
94
|
|
121
|
-
#
|
122
|
-
# valid request from a Modbus master to write multiple coils. The parameters
|
123
|
-
# are request ID of the request, the number of the first coil and the data to be written as
|
124
|
-
# received by the request. The number of the first coil is called starting address for backwards compatibility reasons.
|
125
|
-
# It is not an address, but instead a coil number in the range of 1 to 65536.
|
126
|
-
#
|
127
|
-
# To send a response of this request use BrickletRS485#modbus_slave_answer_write_multiple_coils_request.
|
95
|
+
# See CALLBACK_MODBUS_SLAVE_WRITE_MULTIPLE_COILS_REQUEST
|
128
96
|
CALLBACK_MODBUS_SLAVE_WRITE_MULTIPLE_COILS_REQUEST_LOW_LEVEL = 51
|
129
97
|
|
130
98
|
# This callback is called only in Modbus master mode when the master receives a
|
@@ -141,13 +109,7 @@ module Tinkerforge
|
|
141
109
|
# timeout period as set by BrickletRS485#set_modbus_configuration.
|
142
110
|
CALLBACK_MODBUS_MASTER_WRITE_MULTIPLE_COILS_RESPONSE = 52
|
143
111
|
|
144
|
-
#
|
145
|
-
# valid request from a Modbus master to write multiple holding registers. The parameters
|
146
|
-
# are request ID of the request, the number of the first holding register and the data to be written as
|
147
|
-
# received by the request. The number of the first holding register is called starting address for backwards compatibility reasons.
|
148
|
-
# It is not an address, but instead a holding register number in the range of 1 to 65536. The prefix digit 4 (for holding register) is omitted.
|
149
|
-
#
|
150
|
-
# To send a response of this request use BrickletRS485#modbus_slave_answer_write_multiple_registers_request.
|
112
|
+
# See CALLBACK_MODBUS_SLAVE_WRITE_MULTIPLE_REGISTERS_REQUEST
|
151
113
|
CALLBACK_MODBUS_SLAVE_WRITE_MULTIPLE_REGISTERS_REQUEST_LOW_LEVEL = 53
|
152
114
|
|
153
115
|
# This callback is called only in Modbus master mode when the master receives a
|
@@ -173,19 +135,7 @@ module Tinkerforge
|
|
173
135
|
# To send a response of this request use BrickletRS485#modbus_slave_answer_read_discrete_inputs_request.
|
174
136
|
CALLBACK_MODBUS_SLAVE_READ_DISCRETE_INPUTS_REQUEST = 55
|
175
137
|
|
176
|
-
#
|
177
|
-
# valid response of a request to read discrete inputs.
|
178
|
-
#
|
179
|
-
# The parameters are
|
180
|
-
# request ID of the request, exception code of the response and the data as received
|
181
|
-
# by the response.
|
182
|
-
#
|
183
|
-
# Any non-zero exception code indicates a problem. If the exception
|
184
|
-
# code is greater than 0 then the number represents a Modbus exception code. If
|
185
|
-
# it is less than 0 then it represents other errors. For example, -1 indicates that
|
186
|
-
# the request timedout or that the master did not receive any valid response of the
|
187
|
-
# request within the master request timeout period as set by
|
188
|
-
# BrickletRS485#set_modbus_configuration.
|
138
|
+
# See CALLBACK_MODBUS_MASTER_READ_DISCRETE_INPUTS_RESPONSE
|
189
139
|
CALLBACK_MODBUS_MASTER_READ_DISCRETE_INPUTS_RESPONSE_LOW_LEVEL = 56
|
190
140
|
|
191
141
|
# This callback is called only in Modbus slave mode when the slave receives a
|
@@ -197,24 +147,15 @@ module Tinkerforge
|
|
197
147
|
# To send a response of this request use BrickletRS485#modbus_slave_answer_read_input_registers_request.
|
198
148
|
CALLBACK_MODBUS_SLAVE_READ_INPUT_REGISTERS_REQUEST = 57
|
199
149
|
|
200
|
-
#
|
201
|
-
# valid response of a request to read input registers.
|
202
|
-
#
|
203
|
-
# The parameters are
|
204
|
-
# request ID of the request, exception code of the response and the data as received
|
205
|
-
# by the response.
|
206
|
-
#
|
207
|
-
# Any non-zero exception code indicates a problem. If the exception
|
208
|
-
# code is greater than 0 then the number represents a Modbus exception code. If
|
209
|
-
# it is less than 0 then it represents other errors. For example, -1 indicates that
|
210
|
-
# the request timedout or that the master did not receive any valid response of the
|
211
|
-
# request within the master request timeout period as set by
|
212
|
-
# BrickletRS485#set_modbus_configuration.
|
150
|
+
# See CALLBACK_MODBUS_MASTER_READ_INPUT_REGISTERS_RESPONSE
|
213
151
|
CALLBACK_MODBUS_MASTER_READ_INPUT_REGISTERS_RESPONSE_LOW_LEVEL = 58
|
214
152
|
|
215
153
|
# This callback is called if new data is available.
|
216
154
|
#
|
217
155
|
# To enable this callback, use BrickletRS485#enable_read_callback.
|
156
|
+
#
|
157
|
+
# .. note::
|
158
|
+
# If reconstructing the value fails, the callback is triggered with nil for message.
|
218
159
|
CALLBACK_READ = -41
|
219
160
|
|
220
161
|
# This callback is called only in Modbus master mode when the master receives a
|
@@ -230,6 +171,9 @@ module Tinkerforge
|
|
230
171
|
# the request timed out or that the master did not receive any valid response of the
|
231
172
|
# request within the master request timeout period as set by
|
232
173
|
# BrickletRS485#set_modbus_configuration.
|
174
|
+
#
|
175
|
+
# .. note::
|
176
|
+
# If reconstructing the value fails, the callback is triggered with nil for coils.
|
233
177
|
CALLBACK_MODBUS_MASTER_READ_COILS_RESPONSE = -44
|
234
178
|
|
235
179
|
# This callback is called only in Modbus master mode when the master receives a
|
@@ -245,6 +189,9 @@ module Tinkerforge
|
|
245
189
|
# the request timed out or that the master did not receive any valid response of the
|
246
190
|
# request within the master request timeout period as set by
|
247
191
|
# BrickletRS485#set_modbus_configuration.
|
192
|
+
#
|
193
|
+
# .. note::
|
194
|
+
# If reconstructing the value fails, the callback is triggered with nil for holding_registers.
|
248
195
|
CALLBACK_MODBUS_MASTER_READ_HOLDING_REGISTERS_RESPONSE = -46
|
249
196
|
|
250
197
|
# This callback is called only in Modbus slave mode when the slave receives a
|
@@ -254,6 +201,9 @@ module Tinkerforge
|
|
254
201
|
# It is not an address, but instead a coil number in the range of 1 to 65536.
|
255
202
|
#
|
256
203
|
# To send a response of this request use BrickletRS485#modbus_slave_answer_write_multiple_coils_request.
|
204
|
+
#
|
205
|
+
# .. note::
|
206
|
+
# If reconstructing the value fails, the callback is triggered with nil for coils.
|
257
207
|
CALLBACK_MODBUS_SLAVE_WRITE_MULTIPLE_COILS_REQUEST = -51
|
258
208
|
|
259
209
|
# This callback is called only in Modbus slave mode when the slave receives a
|
@@ -263,6 +213,9 @@ module Tinkerforge
|
|
263
213
|
# It is not an address, but instead a holding register number in the range of 1 to 65536. The prefix digit 4 (for holding register) is omitted.
|
264
214
|
#
|
265
215
|
# To send a response of this request use BrickletRS485#modbus_slave_answer_write_multiple_registers_request.
|
216
|
+
#
|
217
|
+
# .. note::
|
218
|
+
# If reconstructing the value fails, the callback is triggered with nil for registers.
|
266
219
|
CALLBACK_MODBUS_SLAVE_WRITE_MULTIPLE_REGISTERS_REQUEST = -53
|
267
220
|
|
268
221
|
# This callback is called only in Modbus master mode when the master receives a
|
@@ -278,6 +231,9 @@ module Tinkerforge
|
|
278
231
|
# the request timedout or that the master did not receive any valid response of the
|
279
232
|
# request within the master request timeout period as set by
|
280
233
|
# BrickletRS485#set_modbus_configuration.
|
234
|
+
#
|
235
|
+
# .. note::
|
236
|
+
# If reconstructing the value fails, the callback is triggered with nil for discrete_inputs.
|
281
237
|
CALLBACK_MODBUS_MASTER_READ_DISCRETE_INPUTS_RESPONSE = -56
|
282
238
|
|
283
239
|
# This callback is called only in Modbus master mode when the master receives a
|
@@ -293,6 +249,9 @@ module Tinkerforge
|
|
293
249
|
# the request timedout or that the master did not receive any valid response of the
|
294
250
|
# request within the master request timeout period as set by
|
295
251
|
# BrickletRS485#set_modbus_configuration.
|
252
|
+
#
|
253
|
+
# .. note::
|
254
|
+
# If reconstructing the value fails, the callback is triggered with nil for input_registers.
|
296
255
|
CALLBACK_MODBUS_MASTER_READ_INPUT_REGISTERS_RESPONSE = -58
|
297
256
|
|
298
257
|
FUNCTION_WRITE_LOW_LEVEL = 1 # :nodoc:
|