Class: XBee::Frames::NodeIdentificationIndicator

Inherits:
UnidentifiedAddressedFrame show all
Defined in:
lib/xbee/frames/node_identification_indicator.rb

Instance Attribute Summary collapse

Attributes inherited from UnidentifiedAddressedFrame

#address16, #address64

Attributes inherited from Frame

#packet

Instance Method Summary collapse

Methods inherited from UnidentifiedAddressedFrame

#bytes

Methods inherited from Frame

api_id, #bytes, from_packet, #to_packet

Constructor Details

#initialize(packet: nil) ⇒ NodeIdentificationIndicator

Returns a new instance of NodeIdentificationIndicator.



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/xbee/frames/node_identification_indicator.rb', line 21

def initialize(packet: nil)
	super

	if @parse_bytes
		@options = @parse_bytes.shift
		@source_address16 = Address16.new *@parse_bytes.shift(2)
		@source_address64 = Address64.new *@parse_bytes.shift(8)
		@identifier = @parse_bytes.shift 2
		@parent_address16 = Address16.new *@parse_bytes.shift(2)
		@device_type = @parse_bytes.shift
		@source_event = @parse_bytes.shift
		@profile_id = Bytes.unsigned_int_from_array @parse_bytes.shift(2)
		@manufacturer_id = Bytes.unsigned_int_from_array @parse_bytes.shift(2)
	end
end

Instance Attribute Details

#device_typeObject

Returns the value of attribute device_type.



15
16
17
# File 'lib/xbee/frames/node_identification_indicator.rb', line 15

def device_type
  @device_type
end

#identifierObject

Returns the value of attribute identifier.



14
15
16
# File 'lib/xbee/frames/node_identification_indicator.rb', line 14

def identifier
  @identifier
end

#manufacturer_idObject

Returns the value of attribute manufacturer_id.



18
19
20
# File 'lib/xbee/frames/node_identification_indicator.rb', line 18

def manufacturer_id
  @manufacturer_id
end

#optionsObject

Returns the value of attribute options.



10
11
12
# File 'lib/xbee/frames/node_identification_indicator.rb', line 10

def options
  @options
end

#parent_address16Object

Returns the value of attribute parent_address16.



13
14
15
# File 'lib/xbee/frames/node_identification_indicator.rb', line 13

def parent_address16
  @parent_address16
end

#profile_idObject

Returns the value of attribute profile_id.



17
18
19
# File 'lib/xbee/frames/node_identification_indicator.rb', line 17

def profile_id
  @profile_id
end

#source_address16Object

Returns the value of attribute source_address16.



11
12
13
# File 'lib/xbee/frames/node_identification_indicator.rb', line 11

def source_address16
  @source_address16
end

#source_address64Object

Returns the value of attribute source_address64.



12
13
14
# File 'lib/xbee/frames/node_identification_indicator.rb', line 12

def source_address64
  @source_address64
end

#source_eventObject

Returns the value of attribute source_event.



16
17
18
# File 'lib/xbee/frames/node_identification_indicator.rb', line 16

def source_event
  @source_event
end