tinkerforge 2.1.28 → 2.1.29

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 (148) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tinkerforge/brick_dc.rb +2 -2
  3. data/lib/tinkerforge/brick_hat.rb +2 -2
  4. data/lib/tinkerforge/brick_hat_zero.rb +2 -2
  5. data/lib/tinkerforge/brick_imu.rb +2 -2
  6. data/lib/tinkerforge/brick_imu_v2.rb +2 -2
  7. data/lib/tinkerforge/brick_master.rb +2 -2
  8. data/lib/tinkerforge/brick_red.rb +2 -2
  9. data/lib/tinkerforge/brick_servo.rb +2 -2
  10. data/lib/tinkerforge/brick_silent_stepper.rb +2 -2
  11. data/lib/tinkerforge/brick_stepper.rb +2 -2
  12. data/lib/tinkerforge/bricklet_accelerometer.rb +2 -2
  13. data/lib/tinkerforge/bricklet_accelerometer_v2.rb +2 -2
  14. data/lib/tinkerforge/bricklet_air_quality.rb +2 -2
  15. data/lib/tinkerforge/bricklet_ambient_light.rb +2 -2
  16. data/lib/tinkerforge/bricklet_ambient_light_v2.rb +7 -4
  17. data/lib/tinkerforge/bricklet_ambient_light_v3.rb +7 -4
  18. data/lib/tinkerforge/bricklet_analog_in.rb +2 -2
  19. data/lib/tinkerforge/bricklet_analog_in_v2.rb +2 -2
  20. data/lib/tinkerforge/bricklet_analog_in_v3.rb +2 -2
  21. data/lib/tinkerforge/bricklet_analog_out.rb +2 -2
  22. data/lib/tinkerforge/bricklet_analog_out_v2.rb +2 -2
  23. data/lib/tinkerforge/bricklet_analog_out_v3.rb +2 -2
  24. data/lib/tinkerforge/bricklet_barometer.rb +2 -2
  25. data/lib/tinkerforge/bricklet_barometer_v2.rb +2 -2
  26. data/lib/tinkerforge/bricklet_can.rb +2 -2
  27. data/lib/tinkerforge/bricklet_can_v2.rb +2 -2
  28. data/lib/tinkerforge/bricklet_co2.rb +2 -2
  29. data/lib/tinkerforge/bricklet_co2_v2.rb +2 -2
  30. data/lib/tinkerforge/bricklet_color.rb +2 -2
  31. data/lib/tinkerforge/bricklet_color_v2.rb +2 -2
  32. data/lib/tinkerforge/bricklet_compass.rb +2 -2
  33. data/lib/tinkerforge/bricklet_current12.rb +2 -2
  34. data/lib/tinkerforge/bricklet_current25.rb +2 -2
  35. data/lib/tinkerforge/bricklet_dc_v2.rb +521 -0
  36. data/lib/tinkerforge/bricklet_distance_ir.rb +2 -2
  37. data/lib/tinkerforge/bricklet_distance_ir_v2.rb +2 -2
  38. data/lib/tinkerforge/bricklet_distance_us.rb +2 -2
  39. data/lib/tinkerforge/bricklet_distance_us_v2.rb +2 -2
  40. data/lib/tinkerforge/bricklet_dmx.rb +2 -2
  41. data/lib/tinkerforge/bricklet_dual_button.rb +2 -2
  42. data/lib/tinkerforge/bricklet_dual_button_v2.rb +2 -2
  43. data/lib/tinkerforge/bricklet_dual_relay.rb +2 -2
  44. data/lib/tinkerforge/bricklet_dust_detector.rb +2 -2
  45. data/lib/tinkerforge/bricklet_e_paper_296x128.rb +2 -2
  46. data/lib/tinkerforge/bricklet_energy_monitor.rb +2 -2
  47. data/lib/tinkerforge/bricklet_gps.rb +2 -2
  48. data/lib/tinkerforge/bricklet_gps_v2.rb +2 -2
  49. data/lib/tinkerforge/bricklet_hall_effect.rb +2 -2
  50. data/lib/tinkerforge/bricklet_hall_effect_v2.rb +2 -2
  51. data/lib/tinkerforge/bricklet_humidity.rb +2 -2
  52. data/lib/tinkerforge/bricklet_humidity_v2.rb +2 -2
  53. data/lib/tinkerforge/bricklet_imu_v3.rb +2 -2
  54. data/lib/tinkerforge/bricklet_industrial_analog_out.rb +2 -2
  55. data/lib/tinkerforge/bricklet_industrial_analog_out_v2.rb +2 -2
  56. data/lib/tinkerforge/bricklet_industrial_counter.rb +2 -2
  57. data/lib/tinkerforge/bricklet_industrial_digital_in_4.rb +2 -2
  58. data/lib/tinkerforge/bricklet_industrial_digital_in_4_v2.rb +2 -2
  59. data/lib/tinkerforge/bricklet_industrial_digital_out_4.rb +2 -2
  60. data/lib/tinkerforge/bricklet_industrial_digital_out_4_v2.rb +2 -2
  61. data/lib/tinkerforge/bricklet_industrial_dual_0_20ma.rb +2 -2
  62. data/lib/tinkerforge/bricklet_industrial_dual_0_20ma_v2.rb +2 -2
  63. data/lib/tinkerforge/bricklet_industrial_dual_ac_relay.rb +2 -2
  64. data/lib/tinkerforge/bricklet_industrial_dual_analog_in.rb +2 -2
  65. data/lib/tinkerforge/bricklet_industrial_dual_analog_in_v2.rb +2 -2
  66. data/lib/tinkerforge/bricklet_industrial_dual_relay.rb +2 -2
  67. data/lib/tinkerforge/bricklet_industrial_ptc.rb +475 -0
  68. data/lib/tinkerforge/bricklet_industrial_quad_relay.rb +2 -2
  69. data/lib/tinkerforge/bricklet_industrial_quad_relay_v2.rb +2 -2
  70. data/lib/tinkerforge/bricklet_io16.rb +2 -2
  71. data/lib/tinkerforge/bricklet_io16_v2.rb +2 -2
  72. data/lib/tinkerforge/bricklet_io4.rb +2 -2
  73. data/lib/tinkerforge/bricklet_io4_v2.rb +2 -2
  74. data/lib/tinkerforge/bricklet_isolator.rb +2 -2
  75. data/lib/tinkerforge/bricklet_joystick.rb +2 -2
  76. data/lib/tinkerforge/bricklet_joystick_v2.rb +2 -2
  77. data/lib/tinkerforge/bricklet_laser_range_finder.rb +2 -2
  78. data/lib/tinkerforge/bricklet_laser_range_finder_v2.rb +2 -2
  79. data/lib/tinkerforge/bricklet_lcd_128x64.rb +2 -2
  80. data/lib/tinkerforge/bricklet_lcd_16x2.rb +2 -2
  81. data/lib/tinkerforge/bricklet_lcd_20x4.rb +2 -2
  82. data/lib/tinkerforge/bricklet_led_strip.rb +2 -2
  83. data/lib/tinkerforge/bricklet_led_strip_v2.rb +2 -2
  84. data/lib/tinkerforge/bricklet_line.rb +2 -2
  85. data/lib/tinkerforge/bricklet_linear_poti.rb +2 -2
  86. data/lib/tinkerforge/bricklet_linear_poti_v2.rb +2 -2
  87. data/lib/tinkerforge/bricklet_load_cell.rb +2 -2
  88. data/lib/tinkerforge/bricklet_load_cell_v2.rb +2 -2
  89. data/lib/tinkerforge/bricklet_moisture.rb +2 -2
  90. data/lib/tinkerforge/bricklet_motion_detector.rb +2 -2
  91. data/lib/tinkerforge/bricklet_motion_detector_v2.rb +2 -5
  92. data/lib/tinkerforge/bricklet_motorized_linear_poti.rb +2 -2
  93. data/lib/tinkerforge/bricklet_multi_touch.rb +2 -2
  94. data/lib/tinkerforge/bricklet_multi_touch_v2.rb +2 -2
  95. data/lib/tinkerforge/bricklet_nfc.rb +2 -2
  96. data/lib/tinkerforge/bricklet_nfc_rfid.rb +2 -2
  97. data/lib/tinkerforge/bricklet_oled_128x64.rb +2 -2
  98. data/lib/tinkerforge/bricklet_oled_128x64_v2.rb +2 -2
  99. data/lib/tinkerforge/bricklet_oled_64x48.rb +2 -2
  100. data/lib/tinkerforge/bricklet_one_wire.rb +2 -2
  101. data/lib/tinkerforge/bricklet_outdoor_weather.rb +2 -2
  102. data/lib/tinkerforge/bricklet_particulate_matter.rb +2 -2
  103. data/lib/tinkerforge/bricklet_performance_dc.rb +9 -3
  104. data/lib/tinkerforge/bricklet_piezo_buzzer.rb +2 -2
  105. data/lib/tinkerforge/bricklet_piezo_speaker.rb +2 -2
  106. data/lib/tinkerforge/bricklet_piezo_speaker_v2.rb +2 -2
  107. data/lib/tinkerforge/bricklet_ptc.rb +2 -2
  108. data/lib/tinkerforge/bricklet_ptc_v2.rb +2 -2
  109. data/lib/tinkerforge/bricklet_real_time_clock.rb +2 -2
  110. data/lib/tinkerforge/bricklet_real_time_clock_v2.rb +2 -2
  111. data/lib/tinkerforge/bricklet_remote_switch.rb +2 -2
  112. data/lib/tinkerforge/bricklet_remote_switch_v2.rb +2 -2
  113. data/lib/tinkerforge/bricklet_rgb_led.rb +2 -2
  114. data/lib/tinkerforge/bricklet_rgb_led_button.rb +2 -2
  115. data/lib/tinkerforge/bricklet_rgb_led_matrix.rb +2 -2
  116. data/lib/tinkerforge/bricklet_rgb_led_v2.rb +2 -2
  117. data/lib/tinkerforge/bricklet_rotary_encoder.rb +2 -2
  118. data/lib/tinkerforge/bricklet_rotary_encoder_v2.rb +2 -2
  119. data/lib/tinkerforge/bricklet_rotary_poti.rb +2 -2
  120. data/lib/tinkerforge/bricklet_rotary_poti_v2.rb +2 -2
  121. data/lib/tinkerforge/bricklet_rs232.rb +2 -2
  122. data/lib/tinkerforge/bricklet_rs232_v2.rb +2 -2
  123. data/lib/tinkerforge/bricklet_rs485.rb +2 -2
  124. data/lib/tinkerforge/bricklet_segment_display_4x7.rb +2 -2
  125. data/lib/tinkerforge/bricklet_segment_display_4x7_v2.rb +2 -2
  126. data/lib/tinkerforge/bricklet_servo_v2.rb +2 -2
  127. data/lib/tinkerforge/bricklet_silent_stepper_v2.rb +1024 -0
  128. data/lib/tinkerforge/bricklet_solid_state_relay.rb +2 -2
  129. data/lib/tinkerforge/bricklet_solid_state_relay_v2.rb +2 -2
  130. data/lib/tinkerforge/bricklet_sound_intensity.rb +2 -2
  131. data/lib/tinkerforge/bricklet_sound_pressure_level.rb +2 -2
  132. data/lib/tinkerforge/bricklet_temperature.rb +2 -2
  133. data/lib/tinkerforge/bricklet_temperature_ir.rb +2 -2
  134. data/lib/tinkerforge/bricklet_temperature_ir_v2.rb +2 -2
  135. data/lib/tinkerforge/bricklet_temperature_v2.rb +2 -2
  136. data/lib/tinkerforge/bricklet_thermal_imaging.rb +2 -2
  137. data/lib/tinkerforge/bricklet_thermocouple.rb +2 -2
  138. data/lib/tinkerforge/bricklet_thermocouple_v2.rb +2 -2
  139. data/lib/tinkerforge/bricklet_tilt.rb +2 -2
  140. data/lib/tinkerforge/bricklet_uv_light.rb +2 -2
  141. data/lib/tinkerforge/bricklet_uv_light_v2.rb +2 -2
  142. data/lib/tinkerforge/bricklet_voltage.rb +2 -2
  143. data/lib/tinkerforge/bricklet_voltage_current.rb +2 -2
  144. data/lib/tinkerforge/bricklet_voltage_current_v2.rb +2 -2
  145. data/lib/tinkerforge/bricklet_xmc1400_breakout.rb +2 -2
  146. data/lib/tinkerforge/device_display_names.rb +6 -3
  147. data/lib/tinkerforge/version.rb +1 -1
  148. metadata +5 -2
@@ -1,8 +1,8 @@
1
1
  # -*- ruby encoding: utf-8 -*-
2
2
  #############################################################
3
- # This file was automatically generated on 2021-01-15. #
3
+ # This file was automatically generated on 2021-05-06. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.28 #
5
+ # Ruby Bindings Version 2.1.29 #
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 2021-01-15. #
3
+ # This file was automatically generated on 2021-05-06. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.28 #
5
+ # Ruby Bindings Version 2.1.29 #
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 2021-01-15. #
3
+ # This file was automatically generated on 2021-05-06. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.28 #
5
+ # Ruby Bindings Version 2.1.29 #
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 2021-01-15. #
3
+ # This file was automatically generated on 2021-05-06. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.28 #
5
+ # Ruby Bindings Version 2.1.29 #
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 2021-01-15. #
3
+ # This file was automatically generated on 2021-05-06. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.28 #
5
+ # Ruby Bindings Version 2.1.29 #
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 2021-01-15. #
3
+ # This file was automatically generated on 2021-05-06. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.28 #
5
+ # Ruby Bindings Version 2.1.29 #
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 2021-01-15. #
3
+ # This file was automatically generated on 2021-05-06. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.28 #
5
+ # Ruby Bindings Version 2.1.29 #
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 2021-01-15. #
3
+ # This file was automatically generated on 2021-05-06. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.28 #
5
+ # Ruby Bindings Version 2.1.29 #
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 2021-01-15. #
3
+ # This file was automatically generated on 2021-05-06. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.28 #
5
+ # Ruby Bindings Version 2.1.29 #
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 2021-01-15. #
3
+ # This file was automatically generated on 2021-05-06. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.28 #
5
+ # Ruby Bindings Version 2.1.29 #
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 2021-01-15. #
3
+ # This file was automatically generated on 2021-05-06. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.28 #
5
+ # Ruby Bindings Version 2.1.29 #
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 2021-01-15. #
3
+ # This file was automatically generated on 2021-05-06. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.28 #
5
+ # Ruby Bindings Version 2.1.29 #
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 2021-01-15. #
3
+ # This file was automatically generated on 2021-05-06. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.28 #
5
+ # Ruby Bindings Version 2.1.29 #
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 2021-01-15. #
3
+ # This file was automatically generated on 2021-05-06. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.28 #
5
+ # Ruby Bindings Version 2.1.29 #
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 2021-01-15. #
3
+ # This file was automatically generated on 2021-05-06. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.28 #
5
+ # Ruby Bindings Version 2.1.29 #
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 2021-01-15. #
3
+ # This file was automatically generated on 2021-05-06. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.28 #
5
+ # Ruby Bindings Version 2.1.29 #
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 2021-01-15. #
3
+ # This file was automatically generated on 2021-05-06. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.28 #
5
+ # Ruby Bindings Version 2.1.29 #
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 2021-01-15. #
3
+ # This file was automatically generated on 2021-05-06. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.28 #
5
+ # Ruby Bindings Version 2.1.29 #
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 2021-01-15. #
3
+ # This file was automatically generated on 2021-05-06. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.28 #
5
+ # Ruby Bindings Version 2.1.29 #
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 2021-01-15. #
3
+ # This file was automatically generated on 2021-05-06. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.28 #
5
+ # Ruby Bindings Version 2.1.29 #
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 2021-01-15. #
3
+ # This file was automatically generated on 2021-05-06. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.28 #
5
+ # Ruby Bindings Version 2.1.29 #
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 2021-01-15. #
3
+ # This file was automatically generated on 2021-05-06. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.28 #
5
+ # Ruby Bindings Version 2.1.29 #
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 2021-01-15. #
3
+ # This file was automatically generated on 2021-05-06. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.28 #
5
+ # Ruby Bindings Version 2.1.29 #
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 2021-01-15. #
3
+ # This file was automatically generated on 2021-05-06. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.28 #
5
+ # Ruby Bindings Version 2.1.29 #
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 2021-01-15. #
3
+ # This file was automatically generated on 2021-05-06. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.28 #
5
+ # Ruby Bindings Version 2.1.29 #
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 2021-01-15. #
3
+ # This file was automatically generated on 2021-05-06. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.28 #
5
+ # Ruby Bindings Version 2.1.29 #
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 2021-01-15. #
3
+ # This file was automatically generated on 2021-05-06. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.28 #
5
+ # Ruby Bindings Version 2.1.29 #
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 2021-01-15. #
3
+ # This file was automatically generated on 2021-05-06. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.28 #
5
+ # Ruby Bindings Version 2.1.29 #
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 2021-01-15. #
3
+ # This file was automatically generated on 2021-05-06. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.28 #
5
+ # Ruby Bindings Version 2.1.29 #
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 2021-01-15. #
3
+ # This file was automatically generated on 2021-05-06. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.28 #
5
+ # Ruby Bindings Version 2.1.29 #
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 2021-01-15. #
3
+ # This file was automatically generated on 2021-05-06. #
4
4
  # #
5
- # Ruby Bindings Version 2.1.28 #
5
+ # Ruby Bindings Version 2.1.29 #
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 #
@@ -0,0 +1,475 @@
1
+ # -*- ruby encoding: utf-8 -*-
2
+ #############################################################
3
+ # This file was automatically generated on 2021-05-06. #
4
+ # #
5
+ # Ruby Bindings Version 2.1.29 #
6
+ # #
7
+ # If you have a bugfix for this file and want to commit it, #
8
+ # please fix the bug in the generator. You can find a link #
9
+ # to the generators git repository on tinkerforge.com #
10
+ #############################################################
11
+
12
+ require_relative './ip_connection'
13
+
14
+ module Tinkerforge
15
+ # Reads temperatures from Pt100 und Pt1000 sensors
16
+ class BrickletIndustrialPTC < Device
17
+ DEVICE_IDENTIFIER = 2164 # :nodoc:
18
+ DEVICE_DISPLAY_NAME = 'Industrial PTC Bricklet' # :nodoc:
19
+
20
+ # This callback is triggered periodically according to the configuration set by
21
+ # BrickletIndustrialPTC#set_temperature_callback_configuration.
22
+ #
23
+ # The parameter is the same as BrickletIndustrialPTC#get_temperature.
24
+ CALLBACK_TEMPERATURE = 4
25
+
26
+ # This callback is triggered periodically according to the configuration set by
27
+ # BrickletIndustrialPTC#set_resistance_callback_configuration.
28
+ #
29
+ # The parameter is the same as BrickletIndustrialPTC#get_resistance.
30
+ CALLBACK_RESISTANCE = 8
31
+
32
+ # This callback is triggered periodically according to the configuration set by
33
+ # BrickletIndustrialPTC#set_sensor_connected_callback_configuration.
34
+ #
35
+ # The parameter is the same as BrickletIndustrialPTC#is_sensor_connected.
36
+ CALLBACK_SENSOR_CONNECTED = 18
37
+
38
+ FUNCTION_GET_TEMPERATURE = 1 # :nodoc:
39
+ FUNCTION_SET_TEMPERATURE_CALLBACK_CONFIGURATION = 2 # :nodoc:
40
+ FUNCTION_GET_TEMPERATURE_CALLBACK_CONFIGURATION = 3 # :nodoc:
41
+ FUNCTION_GET_RESISTANCE = 5 # :nodoc:
42
+ FUNCTION_SET_RESISTANCE_CALLBACK_CONFIGURATION = 6 # :nodoc:
43
+ FUNCTION_GET_RESISTANCE_CALLBACK_CONFIGURATION = 7 # :nodoc:
44
+ FUNCTION_SET_NOISE_REJECTION_FILTER = 9 # :nodoc:
45
+ FUNCTION_GET_NOISE_REJECTION_FILTER = 10 # :nodoc:
46
+ FUNCTION_IS_SENSOR_CONNECTED = 11 # :nodoc:
47
+ FUNCTION_SET_WIRE_MODE = 12 # :nodoc:
48
+ FUNCTION_GET_WIRE_MODE = 13 # :nodoc:
49
+ FUNCTION_SET_MOVING_AVERAGE_CONFIGURATION = 14 # :nodoc:
50
+ FUNCTION_GET_MOVING_AVERAGE_CONFIGURATION = 15 # :nodoc:
51
+ FUNCTION_SET_SENSOR_CONNECTED_CALLBACK_CONFIGURATION = 16 # :nodoc:
52
+ FUNCTION_GET_SENSOR_CONNECTED_CALLBACK_CONFIGURATION = 17 # :nodoc:
53
+ FUNCTION_GET_SPITFP_ERROR_COUNT = 234 # :nodoc:
54
+ FUNCTION_SET_BOOTLOADER_MODE = 235 # :nodoc:
55
+ FUNCTION_GET_BOOTLOADER_MODE = 236 # :nodoc:
56
+ FUNCTION_SET_WRITE_FIRMWARE_POINTER = 237 # :nodoc:
57
+ FUNCTION_WRITE_FIRMWARE = 238 # :nodoc:
58
+ FUNCTION_SET_STATUS_LED_CONFIG = 239 # :nodoc:
59
+ FUNCTION_GET_STATUS_LED_CONFIG = 240 # :nodoc:
60
+ FUNCTION_GET_CHIP_TEMPERATURE = 242 # :nodoc:
61
+ FUNCTION_RESET = 243 # :nodoc:
62
+ FUNCTION_WRITE_UID = 248 # :nodoc:
63
+ FUNCTION_READ_UID = 249 # :nodoc:
64
+ FUNCTION_GET_IDENTITY = 255 # :nodoc:
65
+
66
+ THRESHOLD_OPTION_OFF = 'x' # :nodoc:
67
+ THRESHOLD_OPTION_OUTSIDE = 'o' # :nodoc:
68
+ THRESHOLD_OPTION_INSIDE = 'i' # :nodoc:
69
+ THRESHOLD_OPTION_SMALLER = '<' # :nodoc:
70
+ THRESHOLD_OPTION_GREATER = '>' # :nodoc:
71
+ FILTER_OPTION_50HZ = 0 # :nodoc:
72
+ FILTER_OPTION_60HZ = 1 # :nodoc:
73
+ WIRE_MODE_2 = 2 # :nodoc:
74
+ WIRE_MODE_3 = 3 # :nodoc:
75
+ WIRE_MODE_4 = 4 # :nodoc:
76
+ BOOTLOADER_MODE_BOOTLOADER = 0 # :nodoc:
77
+ BOOTLOADER_MODE_FIRMWARE = 1 # :nodoc:
78
+ BOOTLOADER_MODE_BOOTLOADER_WAIT_FOR_REBOOT = 2 # :nodoc:
79
+ BOOTLOADER_MODE_FIRMWARE_WAIT_FOR_REBOOT = 3 # :nodoc:
80
+ BOOTLOADER_MODE_FIRMWARE_WAIT_FOR_ERASE_AND_REBOOT = 4 # :nodoc:
81
+ BOOTLOADER_STATUS_OK = 0 # :nodoc:
82
+ BOOTLOADER_STATUS_INVALID_MODE = 1 # :nodoc:
83
+ BOOTLOADER_STATUS_NO_CHANGE = 2 # :nodoc:
84
+ BOOTLOADER_STATUS_ENTRY_FUNCTION_NOT_PRESENT = 3 # :nodoc:
85
+ BOOTLOADER_STATUS_DEVICE_IDENTIFIER_INCORRECT = 4 # :nodoc:
86
+ BOOTLOADER_STATUS_CRC_MISMATCH = 5 # :nodoc:
87
+ STATUS_LED_CONFIG_OFF = 0 # :nodoc:
88
+ STATUS_LED_CONFIG_ON = 1 # :nodoc:
89
+ STATUS_LED_CONFIG_SHOW_HEARTBEAT = 2 # :nodoc:
90
+ STATUS_LED_CONFIG_SHOW_STATUS = 3 # :nodoc:
91
+
92
+ # Creates an object with the unique device ID <tt>uid</tt> and adds it to
93
+ # the IP Connection <tt>ipcon</tt>.
94
+ def initialize(uid, ipcon)
95
+ super uid, ipcon, DEVICE_IDENTIFIER, DEVICE_DISPLAY_NAME
96
+
97
+ @api_version = [2, 0, 0]
98
+
99
+ @response_expected[FUNCTION_GET_TEMPERATURE] = RESPONSE_EXPECTED_ALWAYS_TRUE
100
+ @response_expected[FUNCTION_SET_TEMPERATURE_CALLBACK_CONFIGURATION] = RESPONSE_EXPECTED_TRUE
101
+ @response_expected[FUNCTION_GET_TEMPERATURE_CALLBACK_CONFIGURATION] = RESPONSE_EXPECTED_ALWAYS_TRUE
102
+ @response_expected[FUNCTION_GET_RESISTANCE] = RESPONSE_EXPECTED_ALWAYS_TRUE
103
+ @response_expected[FUNCTION_SET_RESISTANCE_CALLBACK_CONFIGURATION] = RESPONSE_EXPECTED_TRUE
104
+ @response_expected[FUNCTION_GET_RESISTANCE_CALLBACK_CONFIGURATION] = RESPONSE_EXPECTED_ALWAYS_TRUE
105
+ @response_expected[FUNCTION_SET_NOISE_REJECTION_FILTER] = RESPONSE_EXPECTED_FALSE
106
+ @response_expected[FUNCTION_GET_NOISE_REJECTION_FILTER] = RESPONSE_EXPECTED_ALWAYS_TRUE
107
+ @response_expected[FUNCTION_IS_SENSOR_CONNECTED] = RESPONSE_EXPECTED_ALWAYS_TRUE
108
+ @response_expected[FUNCTION_SET_WIRE_MODE] = RESPONSE_EXPECTED_FALSE
109
+ @response_expected[FUNCTION_GET_WIRE_MODE] = RESPONSE_EXPECTED_ALWAYS_TRUE
110
+ @response_expected[FUNCTION_SET_MOVING_AVERAGE_CONFIGURATION] = RESPONSE_EXPECTED_FALSE
111
+ @response_expected[FUNCTION_GET_MOVING_AVERAGE_CONFIGURATION] = RESPONSE_EXPECTED_ALWAYS_TRUE
112
+ @response_expected[FUNCTION_SET_SENSOR_CONNECTED_CALLBACK_CONFIGURATION] = RESPONSE_EXPECTED_TRUE
113
+ @response_expected[FUNCTION_GET_SENSOR_CONNECTED_CALLBACK_CONFIGURATION] = RESPONSE_EXPECTED_ALWAYS_TRUE
114
+ @response_expected[FUNCTION_GET_SPITFP_ERROR_COUNT] = RESPONSE_EXPECTED_ALWAYS_TRUE
115
+ @response_expected[FUNCTION_SET_BOOTLOADER_MODE] = RESPONSE_EXPECTED_ALWAYS_TRUE
116
+ @response_expected[FUNCTION_GET_BOOTLOADER_MODE] = RESPONSE_EXPECTED_ALWAYS_TRUE
117
+ @response_expected[FUNCTION_SET_WRITE_FIRMWARE_POINTER] = RESPONSE_EXPECTED_FALSE
118
+ @response_expected[FUNCTION_WRITE_FIRMWARE] = RESPONSE_EXPECTED_ALWAYS_TRUE
119
+ @response_expected[FUNCTION_SET_STATUS_LED_CONFIG] = RESPONSE_EXPECTED_FALSE
120
+ @response_expected[FUNCTION_GET_STATUS_LED_CONFIG] = RESPONSE_EXPECTED_ALWAYS_TRUE
121
+ @response_expected[FUNCTION_GET_CHIP_TEMPERATURE] = RESPONSE_EXPECTED_ALWAYS_TRUE
122
+ @response_expected[FUNCTION_RESET] = RESPONSE_EXPECTED_FALSE
123
+ @response_expected[FUNCTION_WRITE_UID] = RESPONSE_EXPECTED_FALSE
124
+ @response_expected[FUNCTION_READ_UID] = RESPONSE_EXPECTED_ALWAYS_TRUE
125
+ @response_expected[FUNCTION_GET_IDENTITY] = RESPONSE_EXPECTED_ALWAYS_TRUE
126
+
127
+ @callback_formats[CALLBACK_TEMPERATURE] = [12, 'l']
128
+ @callback_formats[CALLBACK_RESISTANCE] = [12, 'l']
129
+ @callback_formats[CALLBACK_SENSOR_CONNECTED] = [9, '?']
130
+
131
+ @ipcon.add_device self
132
+ end
133
+
134
+ # Returns the temperature of the connected sensor.
135
+ #
136
+ #
137
+ # If you want to get the value periodically, it is recommended to use the
138
+ # CALLBACK_TEMPERATURE callback. You can set the callback configuration
139
+ # with BrickletIndustrialPTC#set_temperature_callback_configuration.
140
+ def get_temperature
141
+ check_validity
142
+
143
+ send_request FUNCTION_GET_TEMPERATURE, [], '', 12, 'l'
144
+ end
145
+
146
+ # The period is the period with which the CALLBACK_TEMPERATURE callback is triggered
147
+ # periodically. A value of 0 turns the callback off.
148
+ #
149
+ # If the `value has to change`-parameter is set to true, the callback is only
150
+ # triggered after the value has changed. If the value didn't change
151
+ # within the period, the callback is triggered immediately on change.
152
+ #
153
+ # If it is set to false, the callback is continuously triggered with the period,
154
+ # independent of the value.
155
+ #
156
+ # It is furthermore possible to constrain the callback with thresholds.
157
+ #
158
+ # The `option`-parameter together with min/max sets a threshold for the CALLBACK_TEMPERATURE callback.
159
+ #
160
+ # The following options are possible:
161
+ #
162
+ # "Option", "Description"
163
+ #
164
+ # "'x'", "Threshold is turned off"
165
+ # "'o'", "Threshold is triggered when the value is *outside* the min and max values"
166
+ # "'i'", "Threshold is triggered when the value is *inside* or equal to the min and max values"
167
+ # "'<'", "Threshold is triggered when the value is smaller than the min value (max is ignored)"
168
+ # "'>'", "Threshold is triggered when the value is greater than the min value (max is ignored)"
169
+ #
170
+ # If the option is set to 'x' (threshold turned off) the callback is triggered with the fixed period.
171
+ def set_temperature_callback_configuration(period, value_has_to_change, option, min, max)
172
+ check_validity
173
+
174
+ send_request FUNCTION_SET_TEMPERATURE_CALLBACK_CONFIGURATION, [period, value_has_to_change, option, min, max], 'L ? k l l', 8, ''
175
+ end
176
+
177
+ # Returns the callback configuration as set by BrickletIndustrialPTC#set_temperature_callback_configuration.
178
+ def get_temperature_callback_configuration
179
+ check_validity
180
+
181
+ send_request FUNCTION_GET_TEMPERATURE_CALLBACK_CONFIGURATION, [], '', 22, 'L ? k l l'
182
+ end
183
+
184
+ # Returns the value as measured by the MAX31865 precision delta-sigma ADC.
185
+ #
186
+ # The value can be converted with the following formulas:
187
+ #
188
+ # * Pt100: resistance = (value * 390) / 32768
189
+ # * Pt1000: resistance = (value * 3900) / 32768
190
+ #
191
+ #
192
+ # If you want to get the value periodically, it is recommended to use the
193
+ # CALLBACK_RESISTANCE callback. You can set the callback configuration
194
+ # with BrickletIndustrialPTC#set_resistance_callback_configuration.
195
+ def get_resistance
196
+ check_validity
197
+
198
+ send_request FUNCTION_GET_RESISTANCE, [], '', 12, 'l'
199
+ end
200
+
201
+ # The period is the period with which the CALLBACK_RESISTANCE callback is triggered
202
+ # periodically. A value of 0 turns the callback off.
203
+ #
204
+ # If the `value has to change`-parameter is set to true, the callback is only
205
+ # triggered after the value has changed. If the value didn't change
206
+ # within the period, the callback is triggered immediately on change.
207
+ #
208
+ # If it is set to false, the callback is continuously triggered with the period,
209
+ # independent of the value.
210
+ #
211
+ # It is furthermore possible to constrain the callback with thresholds.
212
+ #
213
+ # The `option`-parameter together with min/max sets a threshold for the CALLBACK_RESISTANCE callback.
214
+ #
215
+ # The following options are possible:
216
+ #
217
+ # "Option", "Description"
218
+ #
219
+ # "'x'", "Threshold is turned off"
220
+ # "'o'", "Threshold is triggered when the value is *outside* the min and max values"
221
+ # "'i'", "Threshold is triggered when the value is *inside* or equal to the min and max values"
222
+ # "'<'", "Threshold is triggered when the value is smaller than the min value (max is ignored)"
223
+ # "'>'", "Threshold is triggered when the value is greater than the min value (max is ignored)"
224
+ #
225
+ # If the option is set to 'x' (threshold turned off) the callback is triggered with the fixed period.
226
+ def set_resistance_callback_configuration(period, value_has_to_change, option, min, max)
227
+ check_validity
228
+
229
+ send_request FUNCTION_SET_RESISTANCE_CALLBACK_CONFIGURATION, [period, value_has_to_change, option, min, max], 'L ? k l l', 8, ''
230
+ end
231
+
232
+ # Returns the callback configuration as set by BrickletIndustrialPTC#set_resistance_callback_configuration.
233
+ def get_resistance_callback_configuration
234
+ check_validity
235
+
236
+ send_request FUNCTION_GET_RESISTANCE_CALLBACK_CONFIGURATION, [], '', 22, 'L ? k l l'
237
+ end
238
+
239
+ # Sets the noise rejection filter to either 50Hz (0) or 60Hz (1).
240
+ # Noise from 50Hz or 60Hz power sources (including
241
+ # harmonics of the AC power's fundamental frequency) is
242
+ # attenuated by 82dB.
243
+ def set_noise_rejection_filter(filter)
244
+ check_validity
245
+
246
+ send_request FUNCTION_SET_NOISE_REJECTION_FILTER, [filter], 'C', 8, ''
247
+ end
248
+
249
+ # Returns the noise rejection filter option as set by
250
+ # BrickletIndustrialPTC#set_noise_rejection_filter
251
+ def get_noise_rejection_filter
252
+ check_validity
253
+
254
+ send_request FUNCTION_GET_NOISE_REJECTION_FILTER, [], '', 9, 'C'
255
+ end
256
+
257
+ # Returns *true* if the sensor is connected correctly.
258
+ #
259
+ # If this function
260
+ # returns *false*, there is either no Pt100 or Pt1000 sensor connected,
261
+ # the sensor is connected incorrectly or the sensor itself is faulty.
262
+ #
263
+ # If you want to get the status automatically, it is recommended to use the
264
+ # CALLBACK_SENSOR_CONNECTED callback. You can set the callback configuration
265
+ # with BrickletIndustrialPTC#set_sensor_connected_callback_configuration.
266
+ def is_sensor_connected
267
+ check_validity
268
+
269
+ send_request FUNCTION_IS_SENSOR_CONNECTED, [], '', 9, '?'
270
+ end
271
+
272
+ # Sets the wire mode of the sensor. Possible values are 2, 3 and 4 which
273
+ # correspond to 2-, 3- and 4-wire sensors. The value has to match the jumper
274
+ # configuration on the Bricklet.
275
+ def set_wire_mode(mode)
276
+ check_validity
277
+
278
+ send_request FUNCTION_SET_WIRE_MODE, [mode], 'C', 8, ''
279
+ end
280
+
281
+ # Returns the wire mode as set by BrickletIndustrialPTC#set_wire_mode
282
+ def get_wire_mode
283
+ check_validity
284
+
285
+ send_request FUNCTION_GET_WIRE_MODE, [], '', 9, 'C'
286
+ end
287
+
288
+ # Sets the length of a `moving averaging <https://en.wikipedia.org/wiki/Moving_average>`__
289
+ # for the resistance and temperature.
290
+ #
291
+ # Setting the length to 1 will turn the averaging off. With less
292
+ # averaging, there is more noise on the data.
293
+ #
294
+ # New data is gathered every 20ms. With a moving average of length 1000 the resulting
295
+ # averaging window has a length of 20s. If you want to do long term measurements the longest
296
+ # moving average will give the cleanest results.
297
+ #
298
+ # The default values match the non-changeable averaging settings of the old PTC Bricklet 1.0
299
+ def set_moving_average_configuration(moving_average_length_resistance, moving_average_length_temperature)
300
+ check_validity
301
+
302
+ send_request FUNCTION_SET_MOVING_AVERAGE_CONFIGURATION, [moving_average_length_resistance, moving_average_length_temperature], 'S S', 8, ''
303
+ end
304
+
305
+ # Returns the moving average configuration as set by BrickletIndustrialPTC#set_moving_average_configuration.
306
+ def get_moving_average_configuration
307
+ check_validity
308
+
309
+ send_request FUNCTION_GET_MOVING_AVERAGE_CONFIGURATION, [], '', 12, 'S S'
310
+ end
311
+
312
+ # If you enable this callback, the CALLBACK_SENSOR_CONNECTED callback is triggered
313
+ # every time a Pt sensor is connected/disconnected.
314
+ def set_sensor_connected_callback_configuration(enabled)
315
+ check_validity
316
+
317
+ send_request FUNCTION_SET_SENSOR_CONNECTED_CALLBACK_CONFIGURATION, [enabled], '?', 8, ''
318
+ end
319
+
320
+ # Returns the configuration as set by BrickletIndustrialPTC#set_sensor_connected_callback_configuration.
321
+ def get_sensor_connected_callback_configuration
322
+ check_validity
323
+
324
+ send_request FUNCTION_GET_SENSOR_CONNECTED_CALLBACK_CONFIGURATION, [], '', 9, '?'
325
+ end
326
+
327
+ # Returns the error count for the communication between Brick and Bricklet.
328
+ #
329
+ # The errors are divided into
330
+ #
331
+ # * ACK checksum errors,
332
+ # * message checksum errors,
333
+ # * framing errors and
334
+ # * overflow errors.
335
+ #
336
+ # The errors counts are for errors that occur on the Bricklet side. All
337
+ # Bricks have a similar function that returns the errors on the Brick side.
338
+ def get_spitfp_error_count
339
+ check_validity
340
+
341
+ send_request FUNCTION_GET_SPITFP_ERROR_COUNT, [], '', 24, 'L L L L'
342
+ end
343
+
344
+ # Sets the bootloader mode and returns the status after the requested
345
+ # mode change was instigated.
346
+ #
347
+ # You can change from bootloader mode to firmware mode and vice versa. A change
348
+ # from bootloader mode to firmware mode will only take place if the entry function,
349
+ # device identifier and CRC are present and correct.
350
+ #
351
+ # This function is used by Brick Viewer during flashing. It should not be
352
+ # necessary to call it in a normal user program.
353
+ def set_bootloader_mode(mode)
354
+ check_validity
355
+
356
+ send_request FUNCTION_SET_BOOTLOADER_MODE, [mode], 'C', 9, 'C'
357
+ end
358
+
359
+ # Returns the current bootloader mode, see BrickletIndustrialPTC#set_bootloader_mode.
360
+ def get_bootloader_mode
361
+ check_validity
362
+
363
+ send_request FUNCTION_GET_BOOTLOADER_MODE, [], '', 9, 'C'
364
+ end
365
+
366
+ # Sets the firmware pointer for BrickletIndustrialPTC#write_firmware. The pointer has
367
+ # to be increased by chunks of size 64. The data is written to flash
368
+ # every 4 chunks (which equals to one page of size 256).
369
+ #
370
+ # This function is used by Brick Viewer during flashing. It should not be
371
+ # necessary to call it in a normal user program.
372
+ def set_write_firmware_pointer(pointer)
373
+ check_validity
374
+
375
+ send_request FUNCTION_SET_WRITE_FIRMWARE_POINTER, [pointer], 'L', 8, ''
376
+ end
377
+
378
+ # Writes 64 Bytes of firmware at the position as written by
379
+ # BrickletIndustrialPTC#set_write_firmware_pointer before. The firmware is written
380
+ # to flash every 4 chunks.
381
+ #
382
+ # You can only write firmware in bootloader mode.
383
+ #
384
+ # This function is used by Brick Viewer during flashing. It should not be
385
+ # necessary to call it in a normal user program.
386
+ def write_firmware(data)
387
+ check_validity
388
+
389
+ send_request FUNCTION_WRITE_FIRMWARE, [data], 'C64', 9, 'C'
390
+ end
391
+
392
+ # Sets the status LED configuration. By default the LED shows
393
+ # communication traffic between Brick and Bricklet, it flickers once
394
+ # for every 10 received data packets.
395
+ #
396
+ # You can also turn the LED permanently on/off or show a heartbeat.
397
+ #
398
+ # If the Bricklet is in bootloader mode, the LED is will show heartbeat by default.
399
+ def set_status_led_config(config)
400
+ check_validity
401
+
402
+ send_request FUNCTION_SET_STATUS_LED_CONFIG, [config], 'C', 8, ''
403
+ end
404
+
405
+ # Returns the configuration as set by BrickletIndustrialPTC#set_status_led_config
406
+ def get_status_led_config
407
+ check_validity
408
+
409
+ send_request FUNCTION_GET_STATUS_LED_CONFIG, [], '', 9, 'C'
410
+ end
411
+
412
+ # Returns the temperature as measured inside the microcontroller. The
413
+ # value returned is not the ambient temperature!
414
+ #
415
+ # The temperature is only proportional to the real temperature and it has bad
416
+ # accuracy. Practically it is only useful as an indicator for
417
+ # temperature changes.
418
+ def get_chip_temperature
419
+ check_validity
420
+
421
+ send_request FUNCTION_GET_CHIP_TEMPERATURE, [], '', 10, 's'
422
+ end
423
+
424
+ # Calling this function will reset the Bricklet. All configurations
425
+ # will be lost.
426
+ #
427
+ # After a reset you have to create new device objects,
428
+ # calling functions on the existing ones will result in
429
+ # undefined behavior!
430
+ def reset
431
+ check_validity
432
+
433
+ send_request FUNCTION_RESET, [], '', 8, ''
434
+ end
435
+
436
+ # Writes a new UID into flash. If you want to set a new UID
437
+ # you have to decode the Base58 encoded UID string into an
438
+ # integer first.
439
+ #
440
+ # We recommend that you use Brick Viewer to change the UID.
441
+ def write_uid(uid)
442
+ check_validity
443
+
444
+ send_request FUNCTION_WRITE_UID, [uid], 'L', 8, ''
445
+ end
446
+
447
+ # Returns the current UID as an integer. Encode as
448
+ # Base58 to get the usual string version.
449
+ def read_uid
450
+ check_validity
451
+
452
+ send_request FUNCTION_READ_UID, [], '', 12, 'L'
453
+ end
454
+
455
+ # Returns the UID, the UID where the Bricklet is connected to,
456
+ # the position, the hardware and firmware version as well as the
457
+ # device identifier.
458
+ #
459
+ # The position can be 'a', 'b', 'c', 'd', 'e', 'f', 'g' or 'h' (Bricklet Port).
460
+ # A Bricklet connected to an :ref:`Isolator Bricklet <isolator_bricklet>` is always at
461
+ # position 'z'.
462
+ #
463
+ # The device identifier numbers can be found :ref:`here <device_identifier>`.
464
+ # |device_identifier_constant|
465
+ def get_identity
466
+ send_request FUNCTION_GET_IDENTITY, [], '', 33, 'Z8 Z8 k C3 C3 S'
467
+ end
468
+
469
+ # Registers a callback with ID <tt>id</tt> to the block <tt>block</tt>.
470
+ def register_callback(id, &block)
471
+ callback = block
472
+ @registered_callbacks[id] = callback
473
+ end
474
+ end
475
+ end