tinkerforge 2.1.13 → 2.1.14
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/tinkerforge/brick_dc.rb +122 -34
- data/lib/tinkerforge/brick_imu.rb +135 -49
- data/lib/tinkerforge/brick_imu_v2.rb +137 -54
- data/lib/tinkerforge/brick_master.rb +206 -120
- data/lib/tinkerforge/brick_red.rb +64 -69
- data/lib/tinkerforge/brick_servo.rb +133 -44
- data/lib/tinkerforge/brick_silent_stepper.rb +151 -65
- data/lib/tinkerforge/brick_stepper.rb +139 -51
- data/lib/tinkerforge/bricklet_accelerometer.rb +17 -18
- data/lib/tinkerforge/bricklet_ambient_light.rb +16 -19
- data/lib/tinkerforge/bricklet_ambient_light_v2.rb +13 -14
- data/lib/tinkerforge/bricklet_analog_in.rb +20 -23
- data/lib/tinkerforge/bricklet_analog_in_v2.rb +18 -21
- data/lib/tinkerforge/bricklet_analog_out.rb +8 -7
- data/lib/tinkerforge/bricklet_analog_out_v2.rb +7 -6
- data/lib/tinkerforge/bricklet_barometer.rb +21 -24
- data/lib/tinkerforge/bricklet_can.rb +14 -14
- data/lib/tinkerforge/bricklet_co2.rb +11 -12
- data/lib/tinkerforge/bricklet_color.rb +22 -25
- data/lib/tinkerforge/bricklet_current12.rb +18 -22
- data/lib/tinkerforge/bricklet_current25.rb +18 -22
- data/lib/tinkerforge/bricklet_distance_ir.rb +18 -21
- data/lib/tinkerforge/bricklet_distance_us.rb +13 -14
- data/lib/tinkerforge/bricklet_dual_button.rb +8 -8
- data/lib/tinkerforge/bricklet_dual_relay.rb +9 -9
- data/lib/tinkerforge/bricklet_dust_detector.rb +13 -14
- data/lib/tinkerforge/bricklet_gps.rb +21 -25
- data/lib/tinkerforge/bricklet_gps_v2.rb +56 -41
- data/lib/tinkerforge/bricklet_hall_effect.rb +13 -13
- data/lib/tinkerforge/bricklet_humidity.rb +16 -19
- data/lib/tinkerforge/bricklet_industrial_analog_out.rb +13 -12
- data/lib/tinkerforge/bricklet_industrial_digital_in_4.rb +15 -15
- data/lib/tinkerforge/bricklet_industrial_digital_out_4.rb +12 -12
- data/lib/tinkerforge/bricklet_industrial_dual_0_20ma.rb +13 -14
- data/lib/tinkerforge/bricklet_industrial_dual_analog_in.rb +16 -17
- data/lib/tinkerforge/bricklet_industrial_quad_relay.rb +12 -12
- data/lib/tinkerforge/bricklet_io16.rb +18 -19
- data/lib/tinkerforge/bricklet_io4.rb +18 -19
- data/lib/tinkerforge/bricklet_joystick.rb +18 -23
- data/lib/tinkerforge/bricklet_laser_range_finder.rb +26 -29
- data/lib/tinkerforge/bricklet_lcd_16x2.rb +14 -15
- data/lib/tinkerforge/bricklet_lcd_20x4.rb +18 -19
- data/lib/tinkerforge/bricklet_led_strip.rb +20 -20
- data/lib/tinkerforge/bricklet_line.rb +11 -12
- data/lib/tinkerforge/bricklet_linear_poti.rb +16 -19
- data/lib/tinkerforge/bricklet_load_cell.rb +20 -21
- data/lib/tinkerforge/bricklet_moisture.rb +13 -14
- data/lib/tinkerforge/bricklet_motion_detector.rb +7 -8
- data/lib/tinkerforge/bricklet_multi_touch.rb +10 -10
- data/lib/tinkerforge/bricklet_nfc_rfid.rb +11 -11
- data/lib/tinkerforge/bricklet_oled_128x64.rb +10 -9
- data/lib/tinkerforge/bricklet_oled_64x48.rb +10 -9
- data/lib/tinkerforge/bricklet_piezo_buzzer.rb +6 -7
- data/lib/tinkerforge/bricklet_piezo_speaker.rb +7 -8
- data/lib/tinkerforge/bricklet_ptc.rb +23 -26
- data/lib/tinkerforge/bricklet_real_time_clock.rb +13 -14
- data/lib/tinkerforge/bricklet_remote_switch.rb +12 -12
- data/lib/tinkerforge/bricklet_rgb_led.rb +6 -5
- data/lib/tinkerforge/bricklet_rotary_encoder.rb +12 -15
- data/lib/tinkerforge/bricklet_rotary_poti.rb +16 -19
- data/lib/tinkerforge/bricklet_rs232.rb +12 -13
- data/lib/tinkerforge/bricklet_rs485.rb +1373 -0
- data/lib/tinkerforge/bricklet_segment_display_4x7.rb +8 -8
- data/lib/tinkerforge/bricklet_solid_state_relay.rb +8 -8
- data/lib/tinkerforge/bricklet_sound_intensity.rb +11 -12
- data/lib/tinkerforge/bricklet_temperature.rb +13 -14
- data/lib/tinkerforge/bricklet_temperature_ir.rb +18 -21
- data/lib/tinkerforge/bricklet_thermocouple.rb +14 -16
- data/lib/tinkerforge/bricklet_tilt.rb +8 -8
- data/lib/tinkerforge/bricklet_uv_light.rb +11 -12
- data/lib/tinkerforge/bricklet_voltage.rb +16 -19
- data/lib/tinkerforge/bricklet_voltage_current.rb +25 -30
- data/lib/tinkerforge/ip_connection.rb +207 -138
- data/lib/tinkerforge/version.rb +1 -1
- metadata +3 -2
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2017-
|
3
|
+
# This file was automatically generated on 2017-07-27. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
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 #
|
@@ -181,7 +181,12 @@ module Tinkerforge
|
|
181
181
|
FUNCTION_GET_WIFI2_MESH_COMMON_STATUS = 108 # :nodoc:
|
182
182
|
FUNCTION_GET_WIFI2_MESH_CLIENT_STATUS = 109 # :nodoc:
|
183
183
|
FUNCTION_GET_WIFI2_MESH_AP_STATUS = 110 # :nodoc:
|
184
|
+
FUNCTION_SET_SPITFP_BAUDRATE_CONFIG = 231 # :nodoc:
|
185
|
+
FUNCTION_GET_SPITFP_BAUDRATE_CONFIG = 232 # :nodoc:
|
184
186
|
FUNCTION_GET_SEND_TIMEOUT_COUNT = 233 # :nodoc:
|
187
|
+
FUNCTION_SET_SPITFP_BAUDRATE = 234 # :nodoc:
|
188
|
+
FUNCTION_GET_SPITFP_BAUDRATE = 235 # :nodoc:
|
189
|
+
FUNCTION_GET_SPITFP_ERROR_COUNT = 237 # :nodoc:
|
185
190
|
FUNCTION_ENABLE_STATUS_LED = 238 # :nodoc:
|
186
191
|
FUNCTION_DISABLE_STATUS_LED = 239 # :nodoc:
|
187
192
|
FUNCTION_IS_STATUS_LED_ENABLED = 240 # :nodoc:
|
@@ -343,12 +348,6 @@ module Tinkerforge
|
|
343
348
|
@response_expected[FUNCTION_GET_USB_VOLTAGE_CALLBACK_THRESHOLD] = RESPONSE_EXPECTED_ALWAYS_TRUE
|
344
349
|
@response_expected[FUNCTION_SET_DEBOUNCE_PERIOD] = RESPONSE_EXPECTED_TRUE
|
345
350
|
@response_expected[FUNCTION_GET_DEBOUNCE_PERIOD] = RESPONSE_EXPECTED_ALWAYS_TRUE
|
346
|
-
@response_expected[CALLBACK_STACK_CURRENT] = RESPONSE_EXPECTED_ALWAYS_FALSE
|
347
|
-
@response_expected[CALLBACK_STACK_VOLTAGE] = RESPONSE_EXPECTED_ALWAYS_FALSE
|
348
|
-
@response_expected[CALLBACK_USB_VOLTAGE] = RESPONSE_EXPECTED_ALWAYS_FALSE
|
349
|
-
@response_expected[CALLBACK_STACK_CURRENT_REACHED] = RESPONSE_EXPECTED_ALWAYS_FALSE
|
350
|
-
@response_expected[CALLBACK_STACK_VOLTAGE_REACHED] = RESPONSE_EXPECTED_ALWAYS_FALSE
|
351
|
-
@response_expected[CALLBACK_USB_VOLTAGE_REACHED] = RESPONSE_EXPECTED_ALWAYS_FALSE
|
352
351
|
@response_expected[FUNCTION_IS_ETHERNET_PRESENT] = RESPONSE_EXPECTED_ALWAYS_TRUE
|
353
352
|
@response_expected[FUNCTION_SET_ETHERNET_CONFIGURATION] = RESPONSE_EXPECTED_FALSE
|
354
353
|
@response_expected[FUNCTION_GET_ETHERNET_CONFIGURATION] = RESPONSE_EXPECTED_ALWAYS_TRUE
|
@@ -395,7 +394,12 @@ module Tinkerforge
|
|
395
394
|
@response_expected[FUNCTION_GET_WIFI2_MESH_COMMON_STATUS] = RESPONSE_EXPECTED_ALWAYS_TRUE
|
396
395
|
@response_expected[FUNCTION_GET_WIFI2_MESH_CLIENT_STATUS] = RESPONSE_EXPECTED_ALWAYS_TRUE
|
397
396
|
@response_expected[FUNCTION_GET_WIFI2_MESH_AP_STATUS] = RESPONSE_EXPECTED_ALWAYS_TRUE
|
397
|
+
@response_expected[FUNCTION_SET_SPITFP_BAUDRATE_CONFIG] = RESPONSE_EXPECTED_FALSE
|
398
|
+
@response_expected[FUNCTION_GET_SPITFP_BAUDRATE_CONFIG] = RESPONSE_EXPECTED_ALWAYS_TRUE
|
398
399
|
@response_expected[FUNCTION_GET_SEND_TIMEOUT_COUNT] = RESPONSE_EXPECTED_ALWAYS_TRUE
|
400
|
+
@response_expected[FUNCTION_SET_SPITFP_BAUDRATE] = RESPONSE_EXPECTED_FALSE
|
401
|
+
@response_expected[FUNCTION_GET_SPITFP_BAUDRATE] = RESPONSE_EXPECTED_ALWAYS_TRUE
|
402
|
+
@response_expected[FUNCTION_GET_SPITFP_ERROR_COUNT] = RESPONSE_EXPECTED_ALWAYS_TRUE
|
399
403
|
@response_expected[FUNCTION_ENABLE_STATUS_LED] = RESPONSE_EXPECTED_FALSE
|
400
404
|
@response_expected[FUNCTION_DISABLE_STATUS_LED] = RESPONSE_EXPECTED_FALSE
|
401
405
|
@response_expected[FUNCTION_IS_STATUS_LED_ENABLED] = RESPONSE_EXPECTED_ALWAYS_TRUE
|
@@ -410,20 +414,21 @@ module Tinkerforge
|
|
410
414
|
@callback_formats[CALLBACK_STACK_CURRENT_REACHED] = 'S'
|
411
415
|
@callback_formats[CALLBACK_STACK_VOLTAGE_REACHED] = 'S'
|
412
416
|
@callback_formats[CALLBACK_USB_VOLTAGE_REACHED] = 'S'
|
417
|
+
|
413
418
|
end
|
414
419
|
|
415
420
|
# Returns the stack voltage in mV. The stack voltage is the
|
416
421
|
# voltage that is supplied via the stack, i.e. it is given by a
|
417
422
|
# Step-Down or Step-Up Power Supply.
|
418
423
|
def get_stack_voltage
|
419
|
-
send_request
|
424
|
+
send_request FUNCTION_GET_STACK_VOLTAGE, [], '', 2, 'S'
|
420
425
|
end
|
421
426
|
|
422
427
|
# Returns the stack current in mA. The stack current is the
|
423
428
|
# current that is drawn via the stack, i.e. it is given by a
|
424
429
|
# Step-Down or Step-Up Power Supply.
|
425
430
|
def get_stack_current
|
426
|
-
send_request
|
431
|
+
send_request FUNCTION_GET_STACK_CURRENT, [], '', 2, 'S'
|
427
432
|
end
|
428
433
|
|
429
434
|
# Writes the extension type to the EEPROM of a specified extension.
|
@@ -443,17 +448,17 @@ module Tinkerforge
|
|
443
448
|
# The extension type is already set when bought and it can be set with the
|
444
449
|
# Brick Viewer, it is unlikely that you need this function.
|
445
450
|
def set_extension_type(extension, exttype)
|
446
|
-
send_request
|
451
|
+
send_request FUNCTION_SET_EXTENSION_TYPE, [extension, exttype], 'C L', 0, ''
|
447
452
|
end
|
448
453
|
|
449
454
|
# Returns the type for a given extension as set by BrickMaster#set_extension_type.
|
450
455
|
def get_extension_type(extension)
|
451
|
-
send_request
|
456
|
+
send_request FUNCTION_GET_EXTENSION_TYPE, [extension], 'C', 4, 'L'
|
452
457
|
end
|
453
458
|
|
454
459
|
# Returns *true* if a Chibi Extension is available to be used by the Master Brick.
|
455
460
|
def is_chibi_present
|
456
|
-
send_request
|
461
|
+
send_request FUNCTION_IS_CHIBI_PRESENT, [], '', 1, '?'
|
457
462
|
end
|
458
463
|
|
459
464
|
# Sets the address (1-255) belonging to the Chibi Extension.
|
@@ -462,12 +467,12 @@ module Tinkerforge
|
|
462
467
|
# saved in the EEPROM of the Chibi Extension, it does not
|
463
468
|
# have to be set on every startup.
|
464
469
|
def set_chibi_address(address)
|
465
|
-
send_request
|
470
|
+
send_request FUNCTION_SET_CHIBI_ADDRESS, [address], 'C', 0, ''
|
466
471
|
end
|
467
472
|
|
468
473
|
# Returns the address as set by BrickMaster#set_chibi_address.
|
469
474
|
def get_chibi_address
|
470
|
-
send_request
|
475
|
+
send_request FUNCTION_GET_CHIBI_ADDRESS, [], '', 1, 'C'
|
471
476
|
end
|
472
477
|
|
473
478
|
# Sets the address (1-255) of the Chibi Master. This address is used if the
|
@@ -477,12 +482,12 @@ module Tinkerforge
|
|
477
482
|
# saved in the EEPROM of the Chibi Extension, it does not
|
478
483
|
# have to be set on every startup.
|
479
484
|
def set_chibi_master_address(address)
|
480
|
-
send_request
|
485
|
+
send_request FUNCTION_SET_CHIBI_MASTER_ADDRESS, [address], 'C', 0, ''
|
481
486
|
end
|
482
487
|
|
483
488
|
# Returns the address as set by BrickMaster#set_chibi_master_address.
|
484
489
|
def get_chibi_master_address
|
485
|
-
send_request
|
490
|
+
send_request FUNCTION_GET_CHIBI_MASTER_ADDRESS, [], '', 1, 'C'
|
486
491
|
end
|
487
492
|
|
488
493
|
# Sets up to 254 slave addresses. Valid addresses are in range 1-255. 0 has a
|
@@ -501,19 +506,19 @@ module Tinkerforge
|
|
501
506
|
# The slave addresses will be saved in the EEPROM of the Chibi Extension, they
|
502
507
|
# don't have to be set on every startup.
|
503
508
|
def set_chibi_slave_address(num, address)
|
504
|
-
send_request
|
509
|
+
send_request FUNCTION_SET_CHIBI_SLAVE_ADDRESS, [num, address], 'C C', 0, ''
|
505
510
|
end
|
506
511
|
|
507
512
|
# Returns the slave address for a given num as set by
|
508
513
|
# BrickMaster#set_chibi_slave_address.
|
509
514
|
def get_chibi_slave_address(num)
|
510
|
-
send_request
|
515
|
+
send_request FUNCTION_GET_CHIBI_SLAVE_ADDRESS, [num], 'C', 1, 'C'
|
511
516
|
end
|
512
517
|
|
513
518
|
# Returns the signal strength in dBm. The signal strength updates every time a
|
514
519
|
# packet is received.
|
515
520
|
def get_chibi_signal_strength
|
516
|
-
send_request
|
521
|
+
send_request FUNCTION_GET_CHIBI_SIGNAL_STRENGTH, [], '', 1, 'C'
|
517
522
|
end
|
518
523
|
|
519
524
|
# Returns underrun, CRC error, no ACK and overflow error counts of the Chibi
|
@@ -521,7 +526,7 @@ module Tinkerforge
|
|
521
526
|
# distance between two Chibi stacks is becoming too big or there are
|
522
527
|
# interferences.
|
523
528
|
def get_chibi_error_log
|
524
|
-
send_request
|
529
|
+
send_request FUNCTION_GET_CHIBI_ERROR_LOG, [], '', 8, 'S S S S'
|
525
530
|
end
|
526
531
|
|
527
532
|
# Sets the Chibi frequency range for the Chibi Extension. Possible values are:
|
@@ -537,12 +542,12 @@ module Tinkerforge
|
|
537
542
|
# saved in the EEPROM of the Chibi Extension, it does not
|
538
543
|
# have to be set on every startup.
|
539
544
|
def set_chibi_frequency(frequency)
|
540
|
-
send_request
|
545
|
+
send_request FUNCTION_SET_CHIBI_FREQUENCY, [frequency], 'C', 0, ''
|
541
546
|
end
|
542
547
|
|
543
548
|
# Returns the frequency value as set by BrickMaster#set_chibi_frequency.
|
544
549
|
def get_chibi_frequency
|
545
|
-
send_request
|
550
|
+
send_request FUNCTION_GET_CHIBI_FREQUENCY, [], '', 1, 'C'
|
546
551
|
end
|
547
552
|
|
548
553
|
# Sets the channel used by the Chibi Extension. Possible channels are
|
@@ -559,17 +564,17 @@ module Tinkerforge
|
|
559
564
|
# saved in the EEPROM of the Chibi Extension, it does not
|
560
565
|
# have to be set on every startup.
|
561
566
|
def set_chibi_channel(channel)
|
562
|
-
send_request
|
567
|
+
send_request FUNCTION_SET_CHIBI_CHANNEL, [channel], 'C', 0, ''
|
563
568
|
end
|
564
569
|
|
565
570
|
# Returns the channel as set by BrickMaster#set_chibi_channel.
|
566
571
|
def get_chibi_channel
|
567
|
-
send_request
|
572
|
+
send_request FUNCTION_GET_CHIBI_CHANNEL, [], '', 1, 'C'
|
568
573
|
end
|
569
574
|
|
570
575
|
# Returns *true* if a RS485 Extension is available to be used by the Master Brick.
|
571
576
|
def is_rs485_present
|
572
|
-
send_request
|
577
|
+
send_request FUNCTION_IS_RS485_PRESENT, [], '', 1, '?'
|
573
578
|
end
|
574
579
|
|
575
580
|
# Sets the address (0-255) belonging to the RS485 Extension.
|
@@ -581,12 +586,12 @@ module Tinkerforge
|
|
581
586
|
# saved in the EEPROM of the RS485 Extension, it does not
|
582
587
|
# have to be set on every startup.
|
583
588
|
def set_rs485_address(address)
|
584
|
-
send_request
|
589
|
+
send_request FUNCTION_SET_RS485_ADDRESS, [address], 'C', 0, ''
|
585
590
|
end
|
586
591
|
|
587
592
|
# Returns the address as set by BrickMaster#set_rs485_address.
|
588
593
|
def get_rs485_address
|
589
|
-
send_request
|
594
|
+
send_request FUNCTION_GET_RS485_ADDRESS, [], '', 1, 'C'
|
590
595
|
end
|
591
596
|
|
592
597
|
# Sets up to 255 slave addresses. Valid addresses are in range 1-255. 0 has a
|
@@ -605,13 +610,13 @@ module Tinkerforge
|
|
605
610
|
# The slave addresses will be saved in the EEPROM of the Chibi Extension, they
|
606
611
|
# don't have to be set on every startup.
|
607
612
|
def set_rs485_slave_address(num, address)
|
608
|
-
send_request
|
613
|
+
send_request FUNCTION_SET_RS485_SLAVE_ADDRESS, [num, address], 'C C', 0, ''
|
609
614
|
end
|
610
615
|
|
611
616
|
# Returns the slave address for a given ``num`` as set by
|
612
617
|
# BrickMaster#set_rs485_slave_address.
|
613
618
|
def get_rs485_slave_address(num)
|
614
|
-
send_request
|
619
|
+
send_request FUNCTION_GET_RS485_SLAVE_ADDRESS, [num], 'C', 1, 'C'
|
615
620
|
end
|
616
621
|
|
617
622
|
# Returns CRC error counts of the RS485 communication.
|
@@ -619,7 +624,7 @@ module Tinkerforge
|
|
619
624
|
# between the RS485 nodes is too big or there is some kind of
|
620
625
|
# interference.
|
621
626
|
def get_rs485_error_log
|
622
|
-
send_request
|
627
|
+
send_request FUNCTION_GET_RS485_ERROR_LOG, [], '', 2, 'S'
|
623
628
|
end
|
624
629
|
|
625
630
|
# Sets the configuration of the RS485 Extension. Speed is given in baud. The
|
@@ -635,17 +640,17 @@ module Tinkerforge
|
|
635
640
|
# The values are stored in the EEPROM and only applied on startup. That means
|
636
641
|
# you have to restart the Master Brick after configuration.
|
637
642
|
def set_rs485_configuration(speed, parity, stopbits)
|
638
|
-
send_request
|
643
|
+
send_request FUNCTION_SET_RS485_CONFIGURATION, [speed, parity, stopbits], 'L k C', 0, ''
|
639
644
|
end
|
640
645
|
|
641
646
|
# Returns the configuration as set by BrickMaster#set_rs485_configuration.
|
642
647
|
def get_rs485_configuration
|
643
|
-
send_request
|
648
|
+
send_request FUNCTION_GET_RS485_CONFIGURATION, [], '', 6, 'L k C'
|
644
649
|
end
|
645
650
|
|
646
651
|
# Returns *true* if a WIFI Extension is available to be used by the Master Brick.
|
647
652
|
def is_wifi_present
|
648
|
-
send_request
|
653
|
+
send_request FUNCTION_IS_WIFI_PRESENT, [], '', 1, '?'
|
649
654
|
end
|
650
655
|
|
651
656
|
# Sets the configuration of the WIFI Extension. The ``ssid`` can have a max length
|
@@ -674,12 +679,12 @@ module Tinkerforge
|
|
674
679
|
#
|
675
680
|
# It is recommended to use the Brick Viewer to set the WIFI configuration.
|
676
681
|
def set_wifi_configuration(ssid, connection, ip, subnet_mask, gateway, port)
|
677
|
-
send_request
|
682
|
+
send_request FUNCTION_SET_WIFI_CONFIGURATION, [ssid, connection, ip, subnet_mask, gateway, port], 'Z32 C C4 C4 C4 S', 0, ''
|
678
683
|
end
|
679
684
|
|
680
685
|
# Returns the configuration as set by BrickMaster#set_wifi_configuration.
|
681
686
|
def get_wifi_configuration
|
682
|
-
send_request
|
687
|
+
send_request FUNCTION_GET_WIFI_CONFIGURATION, [], '', 47, 'Z32 C C4 C4 C4 S'
|
683
688
|
end
|
684
689
|
|
685
690
|
# Sets the encryption of the WIFI Extension. The first parameter is the
|
@@ -722,7 +727,7 @@ module Tinkerforge
|
|
722
727
|
#
|
723
728
|
# It is recommended to use the Brick Viewer to set the Wi-Fi encryption.
|
724
729
|
def set_wifi_encryption(encryption, key, key_index, eap_options, ca_certificate_length, client_certificate_length, private_key_length)
|
725
|
-
send_request
|
730
|
+
send_request FUNCTION_SET_WIFI_ENCRYPTION, [encryption, key, key_index, eap_options, ca_certificate_length, client_certificate_length, private_key_length], 'C Z50 C C S S S', 0, ''
|
726
731
|
end
|
727
732
|
|
728
733
|
# Returns the encryption as set by BrickMaster#set_wifi_encryption.
|
@@ -730,7 +735,7 @@ module Tinkerforge
|
|
730
735
|
# .. note::
|
731
736
|
# Since Master Brick Firmware version 2.4.4 the key is not returned anymore.
|
732
737
|
def get_wifi_encryption
|
733
|
-
send_request
|
738
|
+
send_request FUNCTION_GET_WIFI_ENCRYPTION, [], '', 59, 'C Z50 C C S S S'
|
734
739
|
end
|
735
740
|
|
736
741
|
# Returns the status of the WIFI Extension. The ``state`` is updated automatically,
|
@@ -747,7 +752,7 @@ module Tinkerforge
|
|
747
752
|
# "3", "Error"
|
748
753
|
# "255", "Not initialized yet"
|
749
754
|
def get_wifi_status
|
750
|
-
send_request
|
755
|
+
send_request FUNCTION_GET_WIFI_STATUS, [], '', 36, 'C6 C6 C s C4 C4 C4 L L C'
|
751
756
|
end
|
752
757
|
|
753
758
|
# Refreshes the Wi-Fi status (see BrickMaster#get_wifi_status). To read the status
|
@@ -757,7 +762,7 @@ module Tinkerforge
|
|
757
762
|
# until the stack with attached WIFI Extension reacts again after this
|
758
763
|
# function is called.
|
759
764
|
def refresh_wifi_status
|
760
|
-
send_request
|
765
|
+
send_request FUNCTION_REFRESH_WIFI_STATUS, [], '', 0, ''
|
761
766
|
end
|
762
767
|
|
763
768
|
# This function is used to set the certificate as well as password and username
|
@@ -779,12 +784,12 @@ module Tinkerforge
|
|
779
784
|
# It is recommended to use the Brick Viewer to set the certificate, username
|
780
785
|
# and password.
|
781
786
|
def set_wifi_certificate(index, data, data_length)
|
782
|
-
send_request
|
787
|
+
send_request FUNCTION_SET_WIFI_CERTIFICATE, [index, data, data_length], 'S C32 C', 0, ''
|
783
788
|
end
|
784
789
|
|
785
790
|
# Returns the certificate for a given index as set by BrickMaster#set_wifi_certificate.
|
786
791
|
def get_wifi_certificate(index)
|
787
|
-
send_request
|
792
|
+
send_request FUNCTION_GET_WIFI_CERTIFICATE, [index], 'S', 33, 'C32 C'
|
788
793
|
end
|
789
794
|
|
790
795
|
# Sets the power mode of the WIFI Extension. Possible modes are:
|
@@ -796,12 +801,12 @@ module Tinkerforge
|
|
796
801
|
#
|
797
802
|
# The default value is 0 (Full Speed).
|
798
803
|
def set_wifi_power_mode(mode)
|
799
|
-
send_request
|
804
|
+
send_request FUNCTION_SET_WIFI_POWER_MODE, [mode], 'C', 0, ''
|
800
805
|
end
|
801
806
|
|
802
807
|
# Returns the power mode as set by BrickMaster#set_wifi_power_mode.
|
803
808
|
def get_wifi_power_mode
|
804
|
-
send_request
|
809
|
+
send_request FUNCTION_GET_WIFI_POWER_MODE, [], '', 1, 'C'
|
805
810
|
end
|
806
811
|
|
807
812
|
# Returns informations about the Wi-Fi receive buffer. The Wi-Fi
|
@@ -819,7 +824,7 @@ module Tinkerforge
|
|
819
824
|
# Try to not send more then 50 messages at a time without any kind of
|
820
825
|
# break between them.
|
821
826
|
def get_wifi_buffer_info
|
822
|
-
send_request
|
827
|
+
send_request FUNCTION_GET_WIFI_BUFFER_INFO, [], '', 8, 'L S S'
|
823
828
|
end
|
824
829
|
|
825
830
|
# Sets the regulatory domain of the WIFI Extension. Possible domains are:
|
@@ -832,17 +837,17 @@ module Tinkerforge
|
|
832
837
|
#
|
833
838
|
# The default value is 1 (ETSI).
|
834
839
|
def set_wifi_regulatory_domain(domain)
|
835
|
-
send_request
|
840
|
+
send_request FUNCTION_SET_WIFI_REGULATORY_DOMAIN, [domain], 'C', 0, ''
|
836
841
|
end
|
837
842
|
|
838
843
|
# Returns the regulatory domain as set by BrickMaster#set_wifi_regulatory_domain.
|
839
844
|
def get_wifi_regulatory_domain
|
840
|
-
send_request
|
845
|
+
send_request FUNCTION_GET_WIFI_REGULATORY_DOMAIN, [], '', 1, 'C'
|
841
846
|
end
|
842
847
|
|
843
848
|
# Returns the USB voltage in mV. Does not work with hardware version 2.1.
|
844
849
|
def get_usb_voltage
|
845
|
-
send_request
|
850
|
+
send_request FUNCTION_GET_USB_VOLTAGE, [], '', 2, 'S'
|
846
851
|
end
|
847
852
|
|
848
853
|
# Sets a long Wi-Fi key (up to 63 chars, at least 8 chars) for WPA encryption.
|
@@ -855,7 +860,7 @@ module Tinkerforge
|
|
855
860
|
#
|
856
861
|
# .. versionadded:: 2.0.2$nbsp;(Firmware)
|
857
862
|
def set_long_wifi_key(key)
|
858
|
-
send_request
|
863
|
+
send_request FUNCTION_SET_LONG_WIFI_KEY, [key], 'Z64', 0, ''
|
859
864
|
end
|
860
865
|
|
861
866
|
# Returns the encryption key as set by BrickMaster#set_long_wifi_key.
|
@@ -865,7 +870,7 @@ module Tinkerforge
|
|
865
870
|
#
|
866
871
|
# .. versionadded:: 2.0.2$nbsp;(Firmware)
|
867
872
|
def get_long_wifi_key
|
868
|
-
send_request
|
873
|
+
send_request FUNCTION_GET_LONG_WIFI_KEY, [], '', 64, 'Z64'
|
869
874
|
end
|
870
875
|
|
871
876
|
# Sets the hostname of the WIFI Extension. The hostname will be displayed
|
@@ -875,7 +880,7 @@ module Tinkerforge
|
|
875
880
|
#
|
876
881
|
# .. versionadded:: 2.0.5$nbsp;(Firmware)
|
877
882
|
def set_wifi_hostname(hostname)
|
878
|
-
send_request
|
883
|
+
send_request FUNCTION_SET_WIFI_HOSTNAME, [hostname], 'Z16', 0, ''
|
879
884
|
end
|
880
885
|
|
881
886
|
# Returns the hostname as set by BrickMaster#set_wifi_hostname.
|
@@ -884,7 +889,7 @@ module Tinkerforge
|
|
884
889
|
#
|
885
890
|
# .. versionadded:: 2.0.5$nbsp;(Firmware)
|
886
891
|
def get_wifi_hostname
|
887
|
-
send_request
|
892
|
+
send_request FUNCTION_GET_WIFI_HOSTNAME, [], '', 16, 'Z16'
|
888
893
|
end
|
889
894
|
|
890
895
|
# Sets the period in ms with which the CALLBACK_STACK_CURRENT callback is triggered
|
@@ -897,14 +902,14 @@ module Tinkerforge
|
|
897
902
|
#
|
898
903
|
# .. versionadded:: 2.0.5$nbsp;(Firmware)
|
899
904
|
def set_stack_current_callback_period(period)
|
900
|
-
send_request
|
905
|
+
send_request FUNCTION_SET_STACK_CURRENT_CALLBACK_PERIOD, [period], 'L', 0, ''
|
901
906
|
end
|
902
907
|
|
903
908
|
# Returns the period as set by BrickMaster#set_stack_current_callback_period.
|
904
909
|
#
|
905
910
|
# .. versionadded:: 2.0.5$nbsp;(Firmware)
|
906
911
|
def get_stack_current_callback_period
|
907
|
-
send_request
|
912
|
+
send_request FUNCTION_GET_STACK_CURRENT_CALLBACK_PERIOD, [], '', 4, 'L'
|
908
913
|
end
|
909
914
|
|
910
915
|
# Sets the period in ms with which the CALLBACK_STACK_VOLTAGE callback is triggered
|
@@ -917,14 +922,14 @@ module Tinkerforge
|
|
917
922
|
#
|
918
923
|
# .. versionadded:: 2.0.5$nbsp;(Firmware)
|
919
924
|
def set_stack_voltage_callback_period(period)
|
920
|
-
send_request
|
925
|
+
send_request FUNCTION_SET_STACK_VOLTAGE_CALLBACK_PERIOD, [period], 'L', 0, ''
|
921
926
|
end
|
922
927
|
|
923
928
|
# Returns the period as set by BrickMaster#set_stack_voltage_callback_period.
|
924
929
|
#
|
925
930
|
# .. versionadded:: 2.0.5$nbsp;(Firmware)
|
926
931
|
def get_stack_voltage_callback_period
|
927
|
-
send_request
|
932
|
+
send_request FUNCTION_GET_STACK_VOLTAGE_CALLBACK_PERIOD, [], '', 4, 'L'
|
928
933
|
end
|
929
934
|
|
930
935
|
# Sets the period in ms with which the CALLBACK_USB_VOLTAGE callback is triggered
|
@@ -937,14 +942,14 @@ module Tinkerforge
|
|
937
942
|
#
|
938
943
|
# .. versionadded:: 2.0.5$nbsp;(Firmware)
|
939
944
|
def set_usb_voltage_callback_period(period)
|
940
|
-
send_request
|
945
|
+
send_request FUNCTION_SET_USB_VOLTAGE_CALLBACK_PERIOD, [period], 'L', 0, ''
|
941
946
|
end
|
942
947
|
|
943
948
|
# Returns the period as set by BrickMaster#set_usb_voltage_callback_period.
|
944
949
|
#
|
945
950
|
# .. versionadded:: 2.0.5$nbsp;(Firmware)
|
946
951
|
def get_usb_voltage_callback_period
|
947
|
-
send_request
|
952
|
+
send_request FUNCTION_GET_USB_VOLTAGE_CALLBACK_PERIOD, [], '', 4, 'L'
|
948
953
|
end
|
949
954
|
|
950
955
|
# Sets the thresholds for the CALLBACK_STACK_CURRENT_REACHED callback.
|
@@ -963,14 +968,14 @@ module Tinkerforge
|
|
963
968
|
#
|
964
969
|
# .. versionadded:: 2.0.5$nbsp;(Firmware)
|
965
970
|
def set_stack_current_callback_threshold(option, min, max)
|
966
|
-
send_request
|
971
|
+
send_request FUNCTION_SET_STACK_CURRENT_CALLBACK_THRESHOLD, [option, min, max], 'k S S', 0, ''
|
967
972
|
end
|
968
973
|
|
969
974
|
# Returns the threshold as set by BrickMaster#set_stack_current_callback_threshold.
|
970
975
|
#
|
971
976
|
# .. versionadded:: 2.0.5$nbsp;(Firmware)
|
972
977
|
def get_stack_current_callback_threshold
|
973
|
-
send_request
|
978
|
+
send_request FUNCTION_GET_STACK_CURRENT_CALLBACK_THRESHOLD, [], '', 5, 'k S S'
|
974
979
|
end
|
975
980
|
|
976
981
|
# Sets the thresholds for the CALLBACK_STACK_VOLTAGE_REACHED callback.
|
@@ -989,14 +994,14 @@ module Tinkerforge
|
|
989
994
|
#
|
990
995
|
# .. versionadded:: 2.0.5$nbsp;(Firmware)
|
991
996
|
def set_stack_voltage_callback_threshold(option, min, max)
|
992
|
-
send_request
|
997
|
+
send_request FUNCTION_SET_STACK_VOLTAGE_CALLBACK_THRESHOLD, [option, min, max], 'k S S', 0, ''
|
993
998
|
end
|
994
999
|
|
995
1000
|
# Returns the threshold as set by BrickMaster#set_stack_voltage_callback_threshold.
|
996
1001
|
#
|
997
1002
|
# .. versionadded:: 2.0.5$nbsp;(Firmware)
|
998
1003
|
def get_stack_voltage_callback_threshold
|
999
|
-
send_request
|
1004
|
+
send_request FUNCTION_GET_STACK_VOLTAGE_CALLBACK_THRESHOLD, [], '', 5, 'k S S'
|
1000
1005
|
end
|
1001
1006
|
|
1002
1007
|
# Sets the thresholds for the CALLBACK_USB_VOLTAGE_REACHED callback.
|
@@ -1015,14 +1020,14 @@ module Tinkerforge
|
|
1015
1020
|
#
|
1016
1021
|
# .. versionadded:: 2.0.5$nbsp;(Firmware)
|
1017
1022
|
def set_usb_voltage_callback_threshold(option, min, max)
|
1018
|
-
send_request
|
1023
|
+
send_request FUNCTION_SET_USB_VOLTAGE_CALLBACK_THRESHOLD, [option, min, max], 'k S S', 0, ''
|
1019
1024
|
end
|
1020
1025
|
|
1021
1026
|
# Returns the threshold as set by BrickMaster#set_usb_voltage_callback_threshold.
|
1022
1027
|
#
|
1023
1028
|
# .. versionadded:: 2.0.5$nbsp;(Firmware)
|
1024
1029
|
def get_usb_voltage_callback_threshold
|
1025
|
-
send_request
|
1030
|
+
send_request FUNCTION_GET_USB_VOLTAGE_CALLBACK_THRESHOLD, [], '', 5, 'k S S'
|
1026
1031
|
end
|
1027
1032
|
|
1028
1033
|
# Sets the period in ms with which the threshold callbacks
|
@@ -1043,14 +1048,14 @@ module Tinkerforge
|
|
1043
1048
|
#
|
1044
1049
|
# .. versionadded:: 2.0.5$nbsp;(Firmware)
|
1045
1050
|
def set_debounce_period(debounce)
|
1046
|
-
send_request
|
1051
|
+
send_request FUNCTION_SET_DEBOUNCE_PERIOD, [debounce], 'L', 0, ''
|
1047
1052
|
end
|
1048
1053
|
|
1049
1054
|
# Returns the debounce period as set by BrickMaster#set_debounce_period.
|
1050
1055
|
#
|
1051
1056
|
# .. versionadded:: 2.0.5$nbsp;(Firmware)
|
1052
1057
|
def get_debounce_period
|
1053
|
-
send_request
|
1058
|
+
send_request FUNCTION_GET_DEBOUNCE_PERIOD, [], '', 4, 'L'
|
1054
1059
|
end
|
1055
1060
|
|
1056
1061
|
# Returns *true* if a Ethernet Extension is available to be used by the Master
|
@@ -1058,7 +1063,7 @@ module Tinkerforge
|
|
1058
1063
|
#
|
1059
1064
|
# .. versionadded:: 2.1.0$nbsp;(Firmware)
|
1060
1065
|
def is_ethernet_present
|
1061
|
-
send_request
|
1066
|
+
send_request FUNCTION_IS_ETHERNET_PRESENT, [], '', 1, '?'
|
1062
1067
|
end
|
1063
1068
|
|
1064
1069
|
# Sets the configuration of the Ethernet Extension. Possible values for
|
@@ -1085,14 +1090,14 @@ module Tinkerforge
|
|
1085
1090
|
#
|
1086
1091
|
# .. versionadded:: 2.1.0$nbsp;(Firmware)
|
1087
1092
|
def set_ethernet_configuration(connection, ip, subnet_mask, gateway, port)
|
1088
|
-
send_request
|
1093
|
+
send_request FUNCTION_SET_ETHERNET_CONFIGURATION, [connection, ip, subnet_mask, gateway, port], 'C C4 C4 C4 S', 0, ''
|
1089
1094
|
end
|
1090
1095
|
|
1091
1096
|
# Returns the configuration as set by BrickMaster#set_ethernet_configuration.
|
1092
1097
|
#
|
1093
1098
|
# .. versionadded:: 2.1.0$nbsp;(Firmware)
|
1094
1099
|
def get_ethernet_configuration
|
1095
|
-
send_request
|
1100
|
+
send_request FUNCTION_GET_ETHERNET_CONFIGURATION, [], '', 15, 'C C4 C4 C4 S'
|
1096
1101
|
end
|
1097
1102
|
|
1098
1103
|
# Returns the status of the Ethernet Extension.
|
@@ -1107,7 +1112,7 @@ module Tinkerforge
|
|
1107
1112
|
#
|
1108
1113
|
# .. versionadded:: 2.1.0$nbsp;(Firmware)
|
1109
1114
|
def get_ethernet_status
|
1110
|
-
send_request
|
1115
|
+
send_request FUNCTION_GET_ETHERNET_STATUS, [], '', 58, 'C6 C4 C4 C4 L L Z32'
|
1111
1116
|
end
|
1112
1117
|
|
1113
1118
|
# Sets the hostname of the Ethernet Extension. The hostname will be displayed
|
@@ -1119,7 +1124,7 @@ module Tinkerforge
|
|
1119
1124
|
#
|
1120
1125
|
# .. versionadded:: 2.1.0$nbsp;(Firmware)
|
1121
1126
|
def set_ethernet_hostname(hostname)
|
1122
|
-
send_request
|
1127
|
+
send_request FUNCTION_SET_ETHERNET_HOSTNAME, [hostname], 'Z32', 0, ''
|
1123
1128
|
end
|
1124
1129
|
|
1125
1130
|
# Sets the MAC address of the Ethernet Extension. The Ethernet Extension should
|
@@ -1130,7 +1135,7 @@ module Tinkerforge
|
|
1130
1135
|
#
|
1131
1136
|
# .. versionadded:: 2.1.0$nbsp;(Firmware)
|
1132
1137
|
def set_ethernet_mac_address(mac_address)
|
1133
|
-
send_request
|
1138
|
+
send_request FUNCTION_SET_ETHERNET_MAC_ADDRESS, [mac_address], 'C6', 0, ''
|
1134
1139
|
end
|
1135
1140
|
|
1136
1141
|
# Sets the Ethernet WebSocket configuration. The first parameter sets the number of socket
|
@@ -1150,14 +1155,14 @@ module Tinkerforge
|
|
1150
1155
|
#
|
1151
1156
|
# .. versionadded:: 2.2.0$nbsp;(Firmware)
|
1152
1157
|
def set_ethernet_websocket_configuration(sockets, port)
|
1153
|
-
send_request
|
1158
|
+
send_request FUNCTION_SET_ETHERNET_WEBSOCKET_CONFIGURATION, [sockets, port], 'C S', 0, ''
|
1154
1159
|
end
|
1155
1160
|
|
1156
1161
|
# Returns the configuration as set by BrickMaster#set_ethernet_configuration.
|
1157
1162
|
#
|
1158
1163
|
# .. versionadded:: 2.2.0$nbsp;(Firmware)
|
1159
1164
|
def get_ethernet_websocket_configuration
|
1160
|
-
send_request
|
1165
|
+
send_request FUNCTION_GET_ETHERNET_WEBSOCKET_CONFIGURATION, [], '', 3, 'C S'
|
1161
1166
|
end
|
1162
1167
|
|
1163
1168
|
# Sets the Ethernet authentication secret. The secret can be a string of up to 64
|
@@ -1175,7 +1180,7 @@ module Tinkerforge
|
|
1175
1180
|
#
|
1176
1181
|
# .. versionadded:: 2.2.0$nbsp;(Firmware)
|
1177
1182
|
def set_ethernet_authentication_secret(secret)
|
1178
|
-
send_request
|
1183
|
+
send_request FUNCTION_SET_ETHERNET_AUTHENTICATION_SECRET, [secret], 'Z64', 0, ''
|
1179
1184
|
end
|
1180
1185
|
|
1181
1186
|
# Returns the authentication secret as set by
|
@@ -1183,7 +1188,7 @@ module Tinkerforge
|
|
1183
1188
|
#
|
1184
1189
|
# .. versionadded:: 2.2.0$nbsp;(Firmware)
|
1185
1190
|
def get_ethernet_authentication_secret
|
1186
|
-
send_request
|
1191
|
+
send_request FUNCTION_GET_ETHERNET_AUTHENTICATION_SECRET, [], '', 64, 'Z64'
|
1187
1192
|
end
|
1188
1193
|
|
1189
1194
|
# Sets the WIFI authentication secret. The secret can be a string of up to 64
|
@@ -1201,7 +1206,7 @@ module Tinkerforge
|
|
1201
1206
|
#
|
1202
1207
|
# .. versionadded:: 2.2.0$nbsp;(Firmware)
|
1203
1208
|
def set_wifi_authentication_secret(secret)
|
1204
|
-
send_request
|
1209
|
+
send_request FUNCTION_SET_WIFI_AUTHENTICATION_SECRET, [secret], 'Z64', 0, ''
|
1205
1210
|
end
|
1206
1211
|
|
1207
1212
|
# Returns the authentication secret as set by
|
@@ -1209,14 +1214,14 @@ module Tinkerforge
|
|
1209
1214
|
#
|
1210
1215
|
# .. versionadded:: 2.2.0$nbsp;(Firmware)
|
1211
1216
|
def get_wifi_authentication_secret
|
1212
|
-
send_request
|
1217
|
+
send_request FUNCTION_GET_WIFI_AUTHENTICATION_SECRET, [], '', 64, 'Z64'
|
1213
1218
|
end
|
1214
1219
|
|
1215
1220
|
# Returns the type of the connection over which this function was called.
|
1216
1221
|
#
|
1217
1222
|
# .. versionadded:: 2.4.0$nbsp;(Firmware)
|
1218
1223
|
def get_connection_type
|
1219
|
-
send_request
|
1224
|
+
send_request FUNCTION_GET_CONNECTION_TYPE, [], '', 1, 'C'
|
1220
1225
|
end
|
1221
1226
|
|
1222
1227
|
# Returns *true* if a WIFI Extension 2.0 is available to be used by the Master
|
@@ -1224,7 +1229,7 @@ module Tinkerforge
|
|
1224
1229
|
#
|
1225
1230
|
# .. versionadded:: 2.4.0$nbsp;(Firmware)
|
1226
1231
|
def is_wifi2_present
|
1227
|
-
send_request
|
1232
|
+
send_request FUNCTION_IS_WIFI2_PRESENT, [], '', 1, '?'
|
1228
1233
|
end
|
1229
1234
|
|
1230
1235
|
# Starts the bootloader of the WIFI Extension 2.0. Returns 0 on success.
|
@@ -1240,7 +1245,7 @@ module Tinkerforge
|
|
1240
1245
|
#
|
1241
1246
|
# .. versionadded:: 2.4.0$nbsp;(Firmware)
|
1242
1247
|
def start_wifi2_bootloader
|
1243
|
-
send_request
|
1248
|
+
send_request FUNCTION_START_WIFI2_BOOTLOADER, [], '', 1, 'c'
|
1244
1249
|
end
|
1245
1250
|
|
1246
1251
|
# Writes up to 60 bytes (number of bytes to be written specified by ``length``)
|
@@ -1255,7 +1260,7 @@ module Tinkerforge
|
|
1255
1260
|
#
|
1256
1261
|
# .. versionadded:: 2.4.0$nbsp;(Firmware)
|
1257
1262
|
def write_wifi2_serial_port(data, length)
|
1258
|
-
send_request
|
1263
|
+
send_request FUNCTION_WRITE_WIFI2_SERIAL_PORT, [data, length], 'C60 C', 1, 'c'
|
1259
1264
|
end
|
1260
1265
|
|
1261
1266
|
# Reads up to 60 bytes (number of bytes to be read specified by ``length``)
|
@@ -1270,7 +1275,7 @@ module Tinkerforge
|
|
1270
1275
|
#
|
1271
1276
|
# .. versionadded:: 2.4.0$nbsp;(Firmware)
|
1272
1277
|
def read_wifi2_serial_port(length)
|
1273
|
-
send_request
|
1278
|
+
send_request FUNCTION_READ_WIFI2_SERIAL_PORT, [length], 'C', 61, 'C60 C'
|
1274
1279
|
end
|
1275
1280
|
|
1276
1281
|
# Sets the WIFI authentication secret. The secret can be a string of up to 64
|
@@ -1288,7 +1293,7 @@ module Tinkerforge
|
|
1288
1293
|
#
|
1289
1294
|
# .. versionadded:: 2.4.0$nbsp;(Firmware)
|
1290
1295
|
def set_wifi2_authentication_secret(secret)
|
1291
|
-
send_request
|
1296
|
+
send_request FUNCTION_SET_WIFI2_AUTHENTICATION_SECRET, [secret], 'Z64', 0, ''
|
1292
1297
|
end
|
1293
1298
|
|
1294
1299
|
# Returns the WIFI authentication secret as set by
|
@@ -1296,7 +1301,7 @@ module Tinkerforge
|
|
1296
1301
|
#
|
1297
1302
|
# .. versionadded:: 2.4.0$nbsp;(Firmware)
|
1298
1303
|
def get_wifi2_authentication_secret
|
1299
|
-
send_request
|
1304
|
+
send_request FUNCTION_GET_WIFI2_AUTHENTICATION_SECRET, [], '', 64, 'Z64'
|
1300
1305
|
end
|
1301
1306
|
|
1302
1307
|
# Sets the general configuration of the WIFI Extension 2.0.
|
@@ -1331,21 +1336,21 @@ module Tinkerforge
|
|
1331
1336
|
#
|
1332
1337
|
# .. versionadded:: 2.4.0$nbsp;(Firmware)
|
1333
1338
|
def set_wifi2_configuration(port, websocket_port, website_port, phy_mode, sleep_mode, website)
|
1334
|
-
send_request
|
1339
|
+
send_request FUNCTION_SET_WIFI2_CONFIGURATION, [port, websocket_port, website_port, phy_mode, sleep_mode, website], 'S S S C C C', 0, ''
|
1335
1340
|
end
|
1336
1341
|
|
1337
1342
|
# Returns the general configuration as set by BrickMaster#set_wifi2_configuration.
|
1338
1343
|
#
|
1339
1344
|
# .. versionadded:: 2.4.0$nbsp;(Firmware)
|
1340
1345
|
def get_wifi2_configuration
|
1341
|
-
send_request
|
1346
|
+
send_request FUNCTION_GET_WIFI2_CONFIGURATION, [], '', 9, 'S S S C C C'
|
1342
1347
|
end
|
1343
1348
|
|
1344
1349
|
# Returns the client and access point status of the WIFI Extension 2.0.
|
1345
1350
|
#
|
1346
1351
|
# .. versionadded:: 2.4.0$nbsp;(Firmware)
|
1347
1352
|
def get_wifi2_status
|
1348
|
-
send_request
|
1353
|
+
send_request FUNCTION_GET_WIFI2_STATUS, [], '', 57, '? C C4 C4 C4 C6 L L c ? C4 C4 C4 C6 L L C'
|
1349
1354
|
end
|
1350
1355
|
|
1351
1356
|
# Sets the client specific configuration of the WIFI Extension 2.0.
|
@@ -1378,14 +1383,14 @@ module Tinkerforge
|
|
1378
1383
|
#
|
1379
1384
|
# .. versionadded:: 2.4.0$nbsp;(Firmware)
|
1380
1385
|
def set_wifi2_client_configuration(enable, ssid, ip, subnet_mask, gateway, mac_address, bssid)
|
1381
|
-
send_request
|
1386
|
+
send_request FUNCTION_SET_WIFI2_CLIENT_CONFIGURATION, [enable, ssid, ip, subnet_mask, gateway, mac_address, bssid], '? Z32 C4 C4 C4 C6 C6', 0, ''
|
1382
1387
|
end
|
1383
1388
|
|
1384
1389
|
# Returns the client configuration as set by BrickMaster#set_wifi2_client_configuration.
|
1385
1390
|
#
|
1386
1391
|
# .. versionadded:: 2.4.0$nbsp;(Firmware)
|
1387
1392
|
def get_wifi2_client_configuration
|
1388
|
-
send_request
|
1393
|
+
send_request FUNCTION_GET_WIFI2_CLIENT_CONFIGURATION, [], '', 57, '? Z32 C4 C4 C4 C6 C6'
|
1389
1394
|
end
|
1390
1395
|
|
1391
1396
|
# Sets the client hostname (up to 32 characters) of the WIFI Extension 2.0. The
|
@@ -1400,14 +1405,14 @@ module Tinkerforge
|
|
1400
1405
|
#
|
1401
1406
|
# .. versionadded:: 2.4.0$nbsp;(Firmware)
|
1402
1407
|
def set_wifi2_client_hostname(hostname)
|
1403
|
-
send_request
|
1408
|
+
send_request FUNCTION_SET_WIFI2_CLIENT_HOSTNAME, [hostname], 'Z32', 0, ''
|
1404
1409
|
end
|
1405
1410
|
|
1406
1411
|
# Returns the client hostname as set by BrickMaster#set_wifi2_client_hostname.
|
1407
1412
|
#
|
1408
1413
|
# .. versionadded:: 2.4.0$nbsp;(Firmware)
|
1409
1414
|
def get_wifi2_client_hostname
|
1410
|
-
send_request
|
1415
|
+
send_request FUNCTION_GET_WIFI2_CLIENT_HOSTNAME, [], '', 32, 'Z32'
|
1411
1416
|
end
|
1412
1417
|
|
1413
1418
|
# Sets the client password (up to 63 chars) for WPA/WPA2 encryption.
|
@@ -1420,7 +1425,7 @@ module Tinkerforge
|
|
1420
1425
|
#
|
1421
1426
|
# .. versionadded:: 2.4.0$nbsp;(Firmware)
|
1422
1427
|
def set_wifi2_client_password(password)
|
1423
|
-
send_request
|
1428
|
+
send_request FUNCTION_SET_WIFI2_CLIENT_PASSWORD, [password], 'Z64', 0, ''
|
1424
1429
|
end
|
1425
1430
|
|
1426
1431
|
# Returns the client password as set by BrickMaster#set_wifi2_client_password.
|
@@ -1431,7 +1436,7 @@ module Tinkerforge
|
|
1431
1436
|
#
|
1432
1437
|
# .. versionadded:: 2.4.0$nbsp;(Firmware)
|
1433
1438
|
def get_wifi2_client_password
|
1434
|
-
send_request
|
1439
|
+
send_request FUNCTION_GET_WIFI2_CLIENT_PASSWORD, [], '', 64, 'Z64'
|
1435
1440
|
end
|
1436
1441
|
|
1437
1442
|
# Sets the access point specific configuration of the WIFI Extension 2.0.
|
@@ -1469,14 +1474,14 @@ module Tinkerforge
|
|
1469
1474
|
#
|
1470
1475
|
# .. versionadded:: 2.4.0$nbsp;(Firmware)
|
1471
1476
|
def set_wifi2_ap_configuration(enable, ssid, ip, subnet_mask, gateway, encryption, hidden, channel, mac_address)
|
1472
|
-
send_request
|
1477
|
+
send_request FUNCTION_SET_WIFI2_AP_CONFIGURATION, [enable, ssid, ip, subnet_mask, gateway, encryption, hidden, channel, mac_address], '? Z32 C4 C4 C4 C ? C C6', 0, ''
|
1473
1478
|
end
|
1474
1479
|
|
1475
1480
|
# Returns the access point configuration as set by BrickMaster#set_wifi2_ap_configuration.
|
1476
1481
|
#
|
1477
1482
|
# .. versionadded:: 2.4.0$nbsp;(Firmware)
|
1478
1483
|
def get_wifi2_ap_configuration
|
1479
|
-
send_request
|
1484
|
+
send_request FUNCTION_GET_WIFI2_AP_CONFIGURATION, [], '', 54, '? Z32 C4 C4 C4 C ? C C6'
|
1480
1485
|
end
|
1481
1486
|
|
1482
1487
|
# Sets the access point password (up to 63 chars) for the configured encryption
|
@@ -1490,7 +1495,7 @@ module Tinkerforge
|
|
1490
1495
|
#
|
1491
1496
|
# .. versionadded:: 2.4.0$nbsp;(Firmware)
|
1492
1497
|
def set_wifi2_ap_password(password)
|
1493
|
-
send_request
|
1498
|
+
send_request FUNCTION_SET_WIFI2_AP_PASSWORD, [password], 'Z64', 0, ''
|
1494
1499
|
end
|
1495
1500
|
|
1496
1501
|
# Returns the access point password as set by BrickMaster#set_wifi2_ap_password.
|
@@ -1501,7 +1506,7 @@ module Tinkerforge
|
|
1501
1506
|
#
|
1502
1507
|
# .. versionadded:: 2.4.0$nbsp;(Firmware)
|
1503
1508
|
def get_wifi2_ap_password
|
1504
|
-
send_request
|
1509
|
+
send_request FUNCTION_GET_WIFI2_AP_PASSWORD, [], '', 64, 'Z64'
|
1505
1510
|
end
|
1506
1511
|
|
1507
1512
|
# All configuration functions for the WIFI Extension 2.0 do not change the
|
@@ -1513,35 +1518,35 @@ module Tinkerforge
|
|
1513
1518
|
#
|
1514
1519
|
# .. versionadded:: 2.4.0$nbsp;(Firmware)
|
1515
1520
|
def save_wifi2_configuration
|
1516
|
-
send_request
|
1521
|
+
send_request FUNCTION_SAVE_WIFI2_CONFIGURATION, [], '', 1, 'C'
|
1517
1522
|
end
|
1518
1523
|
|
1519
1524
|
# Returns the current version of the WIFI Extension 2.0 firmware (major, minor, revision).
|
1520
1525
|
#
|
1521
1526
|
# .. versionadded:: 2.4.0$nbsp;(Firmware)
|
1522
1527
|
def get_wifi2_firmware_version
|
1523
|
-
send_request
|
1528
|
+
send_request FUNCTION_GET_WIFI2_FIRMWARE_VERSION, [], '', 3, 'C3'
|
1524
1529
|
end
|
1525
1530
|
|
1526
1531
|
# Turns the green status LED of the WIFI Extension 2.0 on.
|
1527
1532
|
#
|
1528
1533
|
# .. versionadded:: 2.4.0$nbsp;(Firmware)
|
1529
1534
|
def enable_wifi2_status_led
|
1530
|
-
send_request
|
1535
|
+
send_request FUNCTION_ENABLE_WIFI2_STATUS_LED, [], '', 0, ''
|
1531
1536
|
end
|
1532
1537
|
|
1533
1538
|
# Turns the green status LED of the WIFI Extension 2.0 off.
|
1534
1539
|
#
|
1535
1540
|
# .. versionadded:: 2.4.0$nbsp;(Firmware)
|
1536
1541
|
def disable_wifi2_status_led
|
1537
|
-
send_request
|
1542
|
+
send_request FUNCTION_DISABLE_WIFI2_STATUS_LED, [], '', 0, ''
|
1538
1543
|
end
|
1539
1544
|
|
1540
1545
|
# Returns *true* if the green status LED of the WIFI Extension 2.0 is turned on.
|
1541
1546
|
#
|
1542
1547
|
# .. versionadded:: 2.4.0$nbsp;(Firmware)
|
1543
1548
|
def is_wifi2_status_led_enabled
|
1544
|
-
send_request
|
1549
|
+
send_request FUNCTION_IS_WIFI2_STATUS_LED_ENABLED, [], '', 1, '?'
|
1545
1550
|
end
|
1546
1551
|
|
1547
1552
|
# Requires WIFI Extension 2.0 firmware 2.1.0.
|
@@ -1578,7 +1583,7 @@ module Tinkerforge
|
|
1578
1583
|
#
|
1579
1584
|
# .. versionadded:: 2.4.2$nbsp;(Firmware)
|
1580
1585
|
def set_wifi2_mesh_configuration(enable, root_ip, root_subnet_mask, root_gateway, router_bssid, group_id, group_ssid_prefix, gateway_ip, gateway_port)
|
1581
|
-
send_request
|
1586
|
+
send_request FUNCTION_SET_WIFI2_MESH_CONFIGURATION, [enable, root_ip, root_subnet_mask, root_gateway, router_bssid, group_id, group_ssid_prefix, gateway_ip, gateway_port], '? C4 C4 C4 C6 C6 Z16 C4 S', 0, ''
|
1582
1587
|
end
|
1583
1588
|
|
1584
1589
|
# Requires WIFI Extension 2.0 firmware 2.1.0.
|
@@ -1587,7 +1592,7 @@ module Tinkerforge
|
|
1587
1592
|
#
|
1588
1593
|
# .. versionadded:: 2.4.2$nbsp;(Firmware)
|
1589
1594
|
def get_wifi2_mesh_configuration
|
1590
|
-
send_request
|
1595
|
+
send_request FUNCTION_GET_WIFI2_MESH_CONFIGURATION, [], '', 47, '? C4 C4 C4 C6 C6 Z16 C4 S'
|
1591
1596
|
end
|
1592
1597
|
|
1593
1598
|
# Requires WIFI Extension 2.0 firmware 2.1.0.
|
@@ -1607,7 +1612,7 @@ module Tinkerforge
|
|
1607
1612
|
#
|
1608
1613
|
# .. versionadded:: 2.4.2$nbsp;(Firmware)
|
1609
1614
|
def set_wifi2_mesh_router_ssid(ssid)
|
1610
|
-
send_request
|
1615
|
+
send_request FUNCTION_SET_WIFI2_MESH_ROUTER_SSID, [ssid], 'Z32', 0, ''
|
1611
1616
|
end
|
1612
1617
|
|
1613
1618
|
# Requires WIFI Extension 2.0 firmware 2.1.0.
|
@@ -1616,7 +1621,7 @@ module Tinkerforge
|
|
1616
1621
|
#
|
1617
1622
|
# .. versionadded:: 2.4.2$nbsp;(Firmware)
|
1618
1623
|
def get_wifi2_mesh_router_ssid
|
1619
|
-
send_request
|
1624
|
+
send_request FUNCTION_GET_WIFI2_MESH_ROUTER_SSID, [], '', 32, 'Z32'
|
1620
1625
|
end
|
1621
1626
|
|
1622
1627
|
# Requires WIFI Extension 2.0 firmware 2.1.0.
|
@@ -1632,7 +1637,7 @@ module Tinkerforge
|
|
1632
1637
|
#
|
1633
1638
|
# .. versionadded:: 2.4.2$nbsp;(Firmware)
|
1634
1639
|
def set_wifi2_mesh_router_password(password)
|
1635
|
-
send_request
|
1640
|
+
send_request FUNCTION_SET_WIFI2_MESH_ROUTER_PASSWORD, [password], 'Z64', 0, ''
|
1636
1641
|
end
|
1637
1642
|
|
1638
1643
|
# Requires WIFI Extension 2.0 firmware 2.1.0.
|
@@ -1641,7 +1646,7 @@ module Tinkerforge
|
|
1641
1646
|
#
|
1642
1647
|
# .. versionadded:: 2.4.2$nbsp;(Firmware)
|
1643
1648
|
def get_wifi2_mesh_router_password
|
1644
|
-
send_request
|
1649
|
+
send_request FUNCTION_GET_WIFI2_MESH_ROUTER_PASSWORD, [], '', 64, 'Z64'
|
1645
1650
|
end
|
1646
1651
|
|
1647
1652
|
# Requires WIFI Extension 2.0 firmware 2.1.0.
|
@@ -1650,7 +1655,7 @@ module Tinkerforge
|
|
1650
1655
|
#
|
1651
1656
|
# .. versionadded:: 2.4.2$nbsp;(Firmware)
|
1652
1657
|
def get_wifi2_mesh_common_status
|
1653
|
-
send_request
|
1658
|
+
send_request FUNCTION_GET_WIFI2_MESH_COMMON_STATUS, [], '', 13, 'C ? ? S L L'
|
1654
1659
|
end
|
1655
1660
|
|
1656
1661
|
# Requires WIFI Extension 2.0 firmware 2.1.0.
|
@@ -1659,7 +1664,7 @@ module Tinkerforge
|
|
1659
1664
|
#
|
1660
1665
|
# .. versionadded:: 2.4.2$nbsp;(Firmware)
|
1661
1666
|
def get_wifi2_mesh_client_status
|
1662
|
-
send_request
|
1667
|
+
send_request FUNCTION_GET_WIFI2_MESH_CLIENT_STATUS, [], '', 50, 'Z32 C4 C4 C4 C6'
|
1663
1668
|
end
|
1664
1669
|
|
1665
1670
|
# Requires WIFI Extension 2.0 firmware 2.1.0.
|
@@ -1668,7 +1673,42 @@ module Tinkerforge
|
|
1668
1673
|
#
|
1669
1674
|
# .. versionadded:: 2.4.2$nbsp;(Firmware)
|
1670
1675
|
def get_wifi2_mesh_ap_status
|
1671
|
-
send_request
|
1676
|
+
send_request FUNCTION_GET_WIFI2_MESH_AP_STATUS, [], '', 50, 'Z32 C4 C4 C4 C6'
|
1677
|
+
end
|
1678
|
+
|
1679
|
+
# The SPITF protocol can be used with a dynamic baudrate. If the dynamic baudrate is
|
1680
|
+
# enabled, the Brick will try to adapt the baudrate for the communication
|
1681
|
+
# between Bricks and Bricklets according to the amount of data that is transferred.
|
1682
|
+
#
|
1683
|
+
# The baudrate will be increased exponetially if lots of data is send/receieved and
|
1684
|
+
# decreased linearly if little data is send/received.
|
1685
|
+
#
|
1686
|
+
# This lowers the baudrate in applications where little data is transferred (e.g.
|
1687
|
+
# a weather station) and increases the robustness. If there is lots of data to transfer
|
1688
|
+
# (e.g. Thermal Imaging Bricklet) it automatically increases the baudrate as needed.
|
1689
|
+
#
|
1690
|
+
# In cases where some data has to transferred as fast as possible every few seconds
|
1691
|
+
# (e.g. RS485 Bricklet with a high baudrate but small payload) you may want to turn
|
1692
|
+
# the dynamic baudrate off to get the highest possible performance.
|
1693
|
+
#
|
1694
|
+
# The maximum value of the baudrate can be set per port with the function
|
1695
|
+
# BrickMaster#set_spitfp_baudrate. If the dynamic baudrate is disabled, the baudrate
|
1696
|
+
# as set by BrickMaster#set_spitfp_baudrate will be used statically.
|
1697
|
+
#
|
1698
|
+
# The minimum dynamic baudrate has a value range of 400000 to 2000000 baud.
|
1699
|
+
#
|
1700
|
+
# By default dynamic baudrate is enabled and the minimum dynamic baudrate is 400000.
|
1701
|
+
#
|
1702
|
+
# .. versionadded:: 2.4.6$nbsp;(Firmware)
|
1703
|
+
def set_spitfp_baudrate_config(enable_dynamic_baudrate, minimum_dynamic_baudrate)
|
1704
|
+
send_request FUNCTION_SET_SPITFP_BAUDRATE_CONFIG, [enable_dynamic_baudrate, minimum_dynamic_baudrate], '? L', 0, ''
|
1705
|
+
end
|
1706
|
+
|
1707
|
+
# Returns the baudrate config, see BrickMaster#set_spitfp_baudrate_config.
|
1708
|
+
#
|
1709
|
+
# .. versionadded:: 2.4.6$nbsp;(Firmware)
|
1710
|
+
def get_spitfp_baudrate_config
|
1711
|
+
send_request FUNCTION_GET_SPITFP_BAUDRATE_CONFIG, [], '', 5, '? L'
|
1672
1712
|
end
|
1673
1713
|
|
1674
1714
|
# Returns the timeout count for the different communication methods.
|
@@ -1680,7 +1720,53 @@ module Tinkerforge
|
|
1680
1720
|
#
|
1681
1721
|
# .. versionadded:: 2.4.3$nbsp;(Firmware)
|
1682
1722
|
def get_send_timeout_count(communication_method)
|
1683
|
-
send_request
|
1723
|
+
send_request FUNCTION_GET_SEND_TIMEOUT_COUNT, [communication_method], 'C', 4, 'L'
|
1724
|
+
end
|
1725
|
+
|
1726
|
+
# Sets the baudrate for a specific Bricklet port ('a' - 'd'). The
|
1727
|
+
# baudrate can be in the range 400000 to 2000000.
|
1728
|
+
#
|
1729
|
+
# If you want to increase the throughput of Bricklets you can increase
|
1730
|
+
# the baudrate. If you get a high error count because of high
|
1731
|
+
# interference (see BrickMaster#get_spitfp_error_count) you can decrease the
|
1732
|
+
# baudrate.
|
1733
|
+
#
|
1734
|
+
# If the dynamic baudrate feature is enabled, the baudrate set by this
|
1735
|
+
# function corresponds to the maximum baudrate (see BrickMaster#set_spitfp_baudrate_config).
|
1736
|
+
#
|
1737
|
+
# Regulatory testing is done with the default baudrate. If CE compatability
|
1738
|
+
# or similar is necessary in you applications we recommend to not change
|
1739
|
+
# the baudrate.
|
1740
|
+
#
|
1741
|
+
# The default baudrate for all ports is 1400000.
|
1742
|
+
#
|
1743
|
+
# .. versionadded:: 2.4.3$nbsp;(Firmware)
|
1744
|
+
def set_spitfp_baudrate(bricklet_port, baudrate)
|
1745
|
+
send_request FUNCTION_SET_SPITFP_BAUDRATE, [bricklet_port, baudrate], 'k L', 0, ''
|
1746
|
+
end
|
1747
|
+
|
1748
|
+
# Returns the baudrate for a given Bricklet port, see BrickMaster#set_spitfp_baudrate.
|
1749
|
+
#
|
1750
|
+
# .. versionadded:: 2.4.3$nbsp;(Firmware)
|
1751
|
+
def get_spitfp_baudrate(bricklet_port)
|
1752
|
+
send_request FUNCTION_GET_SPITFP_BAUDRATE, [bricklet_port], 'k', 4, 'L'
|
1753
|
+
end
|
1754
|
+
|
1755
|
+
# Returns the error count for the communication between Brick and Bricklet.
|
1756
|
+
#
|
1757
|
+
# The errors are divided into
|
1758
|
+
#
|
1759
|
+
# * ACK checksum errors,
|
1760
|
+
# * message checksum errors,
|
1761
|
+
# * frameing errors and
|
1762
|
+
# * overflow errors.
|
1763
|
+
#
|
1764
|
+
# The errors counts are for errors that occur on the Brick side. All
|
1765
|
+
# Bricklets have a similar function that returns the errors on the Bricklet side.
|
1766
|
+
#
|
1767
|
+
# .. versionadded:: 2.4.3$nbsp;(Firmware)
|
1768
|
+
def get_spitfp_error_count(bricklet_port)
|
1769
|
+
send_request FUNCTION_GET_SPITFP_ERROR_COUNT, [bricklet_port], 'k', 16, 'L L L L'
|
1684
1770
|
end
|
1685
1771
|
|
1686
1772
|
# Enables the status LED.
|
@@ -1692,7 +1778,7 @@ module Tinkerforge
|
|
1692
1778
|
#
|
1693
1779
|
# .. versionadded:: 2.3.2$nbsp;(Firmware)
|
1694
1780
|
def enable_status_led
|
1695
|
-
send_request
|
1781
|
+
send_request FUNCTION_ENABLE_STATUS_LED, [], '', 0, ''
|
1696
1782
|
end
|
1697
1783
|
|
1698
1784
|
# Disables the status LED.
|
@@ -1704,14 +1790,14 @@ module Tinkerforge
|
|
1704
1790
|
#
|
1705
1791
|
# .. versionadded:: 2.3.2$nbsp;(Firmware)
|
1706
1792
|
def disable_status_led
|
1707
|
-
send_request
|
1793
|
+
send_request FUNCTION_DISABLE_STATUS_LED, [], '', 0, ''
|
1708
1794
|
end
|
1709
1795
|
|
1710
1796
|
# Returns *true* if the status LED is enabled, *false* otherwise.
|
1711
1797
|
#
|
1712
1798
|
# .. versionadded:: 2.3.2$nbsp;(Firmware)
|
1713
1799
|
def is_status_led_enabled
|
1714
|
-
send_request
|
1800
|
+
send_request FUNCTION_IS_STATUS_LED_ENABLED, [], '', 1, '?'
|
1715
1801
|
end
|
1716
1802
|
|
1717
1803
|
# Returns the firmware and protocol version and the name of the Bricklet for a
|
@@ -1720,7 +1806,7 @@ module Tinkerforge
|
|
1720
1806
|
# This functions sole purpose is to allow automatic flashing of v1.x.y Bricklet
|
1721
1807
|
# plugins.
|
1722
1808
|
def get_protocol1_bricklet_name(port)
|
1723
|
-
send_request
|
1809
|
+
send_request FUNCTION_GET_PROTOCOL1_BRICKLET_NAME, [port], 'k', 44, 'C C3 Z40'
|
1724
1810
|
end
|
1725
1811
|
|
1726
1812
|
# Returns the temperature in °C/10 as measured inside the microcontroller. The
|
@@ -1730,7 +1816,7 @@ module Tinkerforge
|
|
1730
1816
|
# accuracy of +-15%. Practically it is only useful as an indicator for
|
1731
1817
|
# temperature changes.
|
1732
1818
|
def get_chip_temperature
|
1733
|
-
send_request
|
1819
|
+
send_request FUNCTION_GET_CHIP_TEMPERATURE, [], '', 2, 's'
|
1734
1820
|
end
|
1735
1821
|
|
1736
1822
|
# Calling this function will reset the Brick. Calling this function
|
@@ -1740,7 +1826,7 @@ module Tinkerforge
|
|
1740
1826
|
# calling functions on the existing ones will result in
|
1741
1827
|
# undefined behavior!
|
1742
1828
|
def reset
|
1743
|
-
send_request
|
1829
|
+
send_request FUNCTION_RESET, [], '', 0, ''
|
1744
1830
|
end
|
1745
1831
|
|
1746
1832
|
# Returns the UID, the UID where the Brick is connected to,
|
@@ -1752,7 +1838,7 @@ module Tinkerforge
|
|
1752
1838
|
# The device identifier numbers can be found :ref:`here <device_identifier>`.
|
1753
1839
|
# |device_identifier_constant|
|
1754
1840
|
def get_identity
|
1755
|
-
send_request
|
1841
|
+
send_request FUNCTION_GET_IDENTITY, [], '', 25, 'Z8 Z8 k C3 C3 S'
|
1756
1842
|
end
|
1757
1843
|
|
1758
1844
|
# Registers a callback with ID <tt>id</tt> to the block <tt>block</tt>.
|