Class: XBeeRuby::TxRequest
- Defined in:
- lib/xbee-ruby/tx_request.rb
Instance Attribute Summary collapse
-
#address16 ⇒ Object
readonly
Returns the value of attribute address16.
-
#address64 ⇒ Object
readonly
Returns the value of attribute address64.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#radius ⇒ Object
readonly
Returns the value of attribute radius.
Attributes inherited from Request
Instance Method Summary collapse
- #frame_data ⇒ Object
-
#initialize(address64, data, opt = {}) ⇒ TxRequest
constructor
A new instance of TxRequest.
Methods inherited from Request
Constructor Details
#initialize(address64, data, opt = {}) ⇒ TxRequest
Returns a new instance of TxRequest.
23 24 25 26 27 28 29 30 31 |
# File 'lib/xbee-ruby/tx_request.rb', line 23 def initialize address64, data, opt = {} super 0x10 @address64 = address64 @data = data @frame_id = Request.next_frame_id @address16 = opt[:address16] || Address16::BROADCAST @options = opt[:options] || 0 @radius = opt[:radius] || 0 end |
Instance Attribute Details
#address16 ⇒ Object (readonly)
Returns the value of attribute address16.
18 19 20 |
# File 'lib/xbee-ruby/tx_request.rb', line 18 def address16 @address16 end |
#address64 ⇒ Object (readonly)
Returns the value of attribute address64.
17 18 19 |
# File 'lib/xbee-ruby/tx_request.rb', line 17 def address64 @address64 end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
19 20 21 |
# File 'lib/xbee-ruby/tx_request.rb', line 19 def data @data end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
20 21 22 |
# File 'lib/xbee-ruby/tx_request.rb', line 20 def @options end |
#radius ⇒ Object (readonly)
Returns the value of attribute radius.
21 22 23 |
# File 'lib/xbee-ruby/tx_request.rb', line 21 def radius @radius end |
Instance Method Details
#frame_data ⇒ Object
33 34 35 |
# File 'lib/xbee-ruby/tx_request.rb', line 33 def frame_data @address64.to_a + @address16.to_a + [@radius, @options] + @data end |