Class: XBee::Frames::RemoteATCommandRequest
- Inherits:
-
AddressedFrame
- Object
- Frame
- IdentifiedFrame
- AddressedFrame
- XBee::Frames::RemoteATCommandRequest
- Defined in:
- lib/xbee/frames/remote_at_command_request.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).
Constant Summary collapse
- OPTIONS =
{ 0x01 => :disable_ack, 0x40 => :extended_transmission_timeout, }.freeze
Instance Attribute Summary collapse
-
#at_command ⇒ Object
Returns the value of attribute at_command.
-
#command_parameter ⇒ Object
Returns the value of attribute command_parameter.
-
#remote_command_options ⇒ Object
Returns the value of attribute remote_command_options.
Attributes inherited from AddressedFrame
Attributes inherited from IdentifiedFrame
Attributes inherited from Frame
Instance Method Summary collapse
- #bytes ⇒ Object
-
#initialize(packet: nil) ⇒ RemoteATCommandRequest
constructor
A new instance of RemoteATCommandRequest.
Methods inherited from Frame
api_id, from_packet, #to_packet
Constructor Details
#initialize(packet: nil) ⇒ RemoteATCommandRequest
Returns a new instance of RemoteATCommandRequest.
23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/xbee/frames/remote_at_command_request.rb', line 23 def initialize(packet: nil) @address16 = Address16::BROADCAST super if @parse_bytes @remote_command_options = @parse_bytes.shift @at_command = @parse_bytes.shift 2 @command_parameter = @parse_bytes @parse_bytes = [] end end |
Instance Attribute Details
#at_command ⇒ Object
Returns the value of attribute at_command.
18 19 20 |
# File 'lib/xbee/frames/remote_at_command_request.rb', line 18 def at_command @at_command end |
#command_parameter ⇒ Object
Returns the value of attribute command_parameter.
19 20 21 |
# File 'lib/xbee/frames/remote_at_command_request.rb', line 19 def command_parameter @command_parameter end |
#remote_command_options ⇒ Object
Returns the value of attribute remote_command_options.
20 21 22 |
# File 'lib/xbee/frames/remote_at_command_request.rb', line 20 def @remote_command_options end |
Instance Method Details
#bytes ⇒ Object
48 49 50 |
# File 'lib/xbee/frames/remote_at_command_request.rb', line 48 def bytes super + [ || 0x00] + (at_command || [0] * 2) + (command_parameter || []) end |