class XBee::Frames::ExplicitAddressingCommand

This frame is similar to Transmit Request (0x10), but it also requires you to specify the application- layer addressing fields: endpoints, cluster ID, and profile ID.

This frame causes the device to send payload data as an RF packet to a specific destination, using specific source and destination endpoints, cluster ID, and profile ID.

You can set the broadcast radius from 0 up to NH to 0xFF. If set to 0, the value of NH specifies the broadcast radius (recommended). This parameter is only used for broadcast transmissions.

You can read the maximum number of payload bytes with the NP command.

Constants

OPTIONS

Attributes

broadcast_radius[RW]
cluster_id[RW]
data[RW]
destination_endpoint[RW]
profile_id[RW]
source_endpoint[RW]
transmission_options[RW]

Public Class Methods

new(packet: nil) click to toggle source
Calls superclass method XBee::Frames::AddressedFrame::new
# File lib/xbee/frames/explicit_addressing_command.rb, line 47
def initialize(packet: nil)
        super

        if @parse_bytes
                @source_endpoint = @parse_bytes.shift
                @destination_endpoint = @parse_bytes.shift
                @cluster_id = @parse_bytes.shift 2
                @profile_id = @parse_bytes.shift 2
                @broadcast_radius = @parse_bytes.shift
                @transmission_options = @parse_bytes.shift
                @data = @parse_bytes
                @parse_bytes = []
        end
end

Public Instance Methods

bytes() click to toggle source
Calls superclass method XBee::Frames::AddressedFrame#bytes
# File lib/xbee/frames/explicit_addressing_command.rb, line 63
def bytes
        super + [options || 0x00] + (data || [])
end