Class: XBee::Frames::ATCommand
- Inherits:
-
IdentifiedFrame
- Object
- Frame
- IdentifiedFrame
- XBee::Frames::ATCommand
- Defined in:
- lib/xbee/frames/at_command.rb
Overview
Use this frame to query or set device parameters on the local device. This API command applies changes after running the command. You can query parameter values by sending the 0x08 AT Command frame with no parameter value field (the two-byte AT command is immediately followed by the frame checksum).
Direct Known Subclasses
Instance Attribute Summary collapse
-
#command_bytes ⇒ Object
Returns the value of attribute command_bytes.
-
#parameter_bytes ⇒ Object
attr_accessor :command.
Attributes inherited from IdentifiedFrame
Attributes inherited from Frame
Instance Method Summary collapse
- #bytes ⇒ Object
-
#initialize(packet: nil) ⇒ ATCommand
constructor
A new instance of ATCommand.
Methods inherited from Frame
api_id, from_packet, #to_packet
Constructor Details
#initialize(packet: nil) ⇒ ATCommand
Returns a new instance of ATCommand.
19 20 21 22 23 24 25 26 27 |
# File 'lib/xbee/frames/at_command.rb', line 19 def initialize(packet: nil) super if @parse_bytes @command_bytes = @parse_bytes.shift 2 @parameter_bytes = @parse_bytes @parse_bytes = [] end end |
Instance Attribute Details
#command_bytes ⇒ Object
Returns the value of attribute command_bytes.
13 14 15 |
# File 'lib/xbee/frames/at_command.rb', line 13 def command_bytes @command_bytes end |
#parameter_bytes ⇒ Object
attr_accessor :command
15 16 17 |
# File 'lib/xbee/frames/at_command.rb', line 15 def parameter_bytes @parameter_bytes end |
Instance Method Details
#bytes ⇒ Object
30 31 32 |
# File 'lib/xbee/frames/at_command.rb', line 30 def bytes super + command_bytes + (parameter_bytes || []) end |