class Tinkerforge::BrickDaemon
internal
Public Class Methods
new(uid, ipcon)
click to toggle source
Creates an object with the unique device ID uid
and adds it to the IP Connection ipcon
.
Calls superclass method
Tinkerforge::Device::new
# File lib/tinkerforge/ip_connection.rb, line 533 def initialize(uid, ipcon) super uid, ipcon, 0, 'Brick Daemon' @api_version = [2, 0, 0] @response_expected[FUNCTION_GET_AUTHENTICATION_NONCE] = RESPONSE_EXPECTED_ALWAYS_TRUE @response_expected[FUNCTION_AUTHENTICATE] = RESPONSE_EXPECTED_TRUE @ipcon.add_device self end
Public Instance Methods
authenticate(client_nonce, digest)
click to toggle source
# File lib/tinkerforge/ip_connection.rb, line 548 def authenticate(client_nonce, digest) send_request FUNCTION_AUTHENTICATE, [client_nonce, digest], 'C4 C20', 0, '' end
get_authentication_nonce()
click to toggle source
# File lib/tinkerforge/ip_connection.rb, line 544 def get_authentication_nonce send_request FUNCTION_GET_AUTHENTICATION_NONCE, [], '', 12, 'C4' end