Class: GetDeviceInfoReply
- Defined in:
- lib/telegrams/commands/system/replies/get_device_info_reply.rb
Constant Summary
Constants inherited from Reply
Reply::COMMAND_TYPE, Reply::STATUS_MESSAGES, Reply::SUCCESS
Instance Attribute Summary collapse
-
#bt_address ⇒ Object
readonly
Returns the value of attribute bt_address.
-
#free_user_flash_memory_bytes ⇒ Object
readonly
Returns the value of attribute free_user_flash_memory_bytes.
-
#nxt_brick_name ⇒ Object
readonly
Returns the value of attribute nxt_brick_name.
-
#signal_strength ⇒ Object
readonly
Returns the value of attribute signal_strength.
Attributes inherited from Reply
#command, #message_bytes, #status, #status_description, #type
Attributes inherited from Telegram
Instance Method Summary collapse
-
#initialize(bytes) ⇒ GetDeviceInfoReply
constructor
A new instance of GetDeviceInfoReply.
Methods inherited from Reply
Methods inherited from Telegram
Constructor Details
#initialize(bytes) ⇒ GetDeviceInfoReply
Returns a new instance of GetDeviceInfoReply.
7 8 9 10 11 12 13 14 15 |
# File 'lib/telegrams/commands/system/replies/get_device_info_reply.rb', line 7 def initialize(bytes) super raise ArgumentError, "must be a GetDeviceInfoReply (0x9B)" unless bytes[1] == 0x9B @nxt_brick_name = parse_brick_name(bytes) @bt_address = parse_bt_address(bytes) @signal_strength = parse_signal_strength(bytes) @free_user_flash_memory_bytes = parse_free_user_flash_memory(bytes) end |
Instance Attribute Details
#bt_address ⇒ Object (readonly)
Returns the value of attribute bt_address.
4 5 6 |
# File 'lib/telegrams/commands/system/replies/get_device_info_reply.rb', line 4 def bt_address @bt_address end |
#free_user_flash_memory_bytes ⇒ Object (readonly)
Returns the value of attribute free_user_flash_memory_bytes.
4 5 6 |
# File 'lib/telegrams/commands/system/replies/get_device_info_reply.rb', line 4 def free_user_flash_memory_bytes @free_user_flash_memory_bytes end |
#nxt_brick_name ⇒ Object (readonly)
Returns the value of attribute nxt_brick_name.
4 5 6 |
# File 'lib/telegrams/commands/system/replies/get_device_info_reply.rb', line 4 def nxt_brick_name @nxt_brick_name end |
#signal_strength ⇒ Object (readonly)
Returns the value of attribute signal_strength.
4 5 6 |
# File 'lib/telegrams/commands/system/replies/get_device_info_reply.rb', line 4 def signal_strength @signal_strength end |