Class: XBee::Frame::ExplicitRxIndicator

Inherits:
ReceivedFrame show all
Defined in:
lib/apimode/frame/explicit_rx_indicator.rb

Overview

ZigBee Explicit Rx Indicator (0x91) (AO=1)

Instance Attribute Summary collapse

Attributes inherited from Base

#cmd_data, #frame_id

Instance Method Summary collapse

Methods inherited from Base

#_dump, #data, #length

Constructor Details

#initialize(data = nil) ⇒ ExplicitRxIndicator

Returns a new instance of ExplicitRxIndicator.



9
10
11
# File 'lib/apimode/frame/explicit_rx_indicator.rb', line 9

def initialize(data = nil)
  super(data) && (yield self if block_given?)
end

Instance Attribute Details

#cluster_idObject

Returns the value of attribute cluster_id.



7
8
9
# File 'lib/apimode/frame/explicit_rx_indicator.rb', line 7

def cluster_id
  @cluster_id
end

#destination_endpointObject

Returns the value of attribute destination_endpoint.



7
8
9
# File 'lib/apimode/frame/explicit_rx_indicator.rb', line 7

def destination_endpoint
  @destination_endpoint
end

#profile_idObject

Returns the value of attribute profile_id.



7
8
9
# File 'lib/apimode/frame/explicit_rx_indicator.rb', line 7

def profile_id
  @profile_id
end

#receive_optionsObject

Returns the value of attribute receive_options.



7
8
9
# File 'lib/apimode/frame/explicit_rx_indicator.rb', line 7

def receive_options
  @receive_options
end

#received_dataObject

Returns the value of attribute received_data.



7
8
9
# File 'lib/apimode/frame/explicit_rx_indicator.rb', line 7

def received_data
  @received_data
end

#source_addressObject

Returns the value of attribute source_address.



7
8
9
# File 'lib/apimode/frame/explicit_rx_indicator.rb', line 7

def source_address
  @source_address
end

#source_endpointObject

Returns the value of attribute source_endpoint.



7
8
9
# File 'lib/apimode/frame/explicit_rx_indicator.rb', line 7

def source_endpoint
  @source_endpoint
end

#source_networkObject

Returns the value of attribute source_network.



7
8
9
# File 'lib/apimode/frame/explicit_rx_indicator.rb', line 7

def source_network
  @source_network
end

Instance Method Details

#api_identifierObject



6
# File 'lib/apimode/frame/explicit_rx_indicator.rb', line 6

def api_identifier ; 0x91 ; end

#cmd_data=(data_string) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/apimode/frame/explicit_rx_indicator.rb', line 13

def cmd_data=(data_string)
  # We need to read in the 64-bit source_address in two 32-bit parts.
  src_high = src_low = 0
  src_high, src_low, self.source_network, self.source_endpoint, self.destination_endpoint, self.cluster_id, self.profile_id, self.receive_options, self.received_data = data_string.unpack("NNnCCnnCa*")
  self.source_address = src_high << 32 | src_low
  @cmd_data = data_string
end