public class ExplicitRxIndicatorPacket extends XBeeAPIPacket
When the modem receives an RF packet it is sent out the UART using this message type (when AO=1).
This packet is received when external devices send explicit addressing packets to this module.
Among received data, some options can also be received indicating transmission parameters.
Modifier and Type | Field and Description |
---|---|
static int |
DATA_CLUSTER |
static int |
DATA_ENDPOINT |
static int |
DIGI_PROFILE |
NO_FRAME_ID
Constructor and Description |
---|
ExplicitRxIndicatorPacket(XBee64BitAddress sourceAddress64,
XBee16BitAddress sourceAddress16,
int sourceEndpoint,
int destEndpoint,
int clusterID,
int profileID,
int receiveOptions,
byte[] rfData)
Class constructor.
|
Modifier and Type | Method and Description |
---|---|
static ExplicitRxIndicatorPacket |
createPacket(byte[] payload)
Creates a new
ExplicitRxIndicatorPacket object from the given
payload. |
XBee16BitAddress |
get16BitSourceAddress()
Returns the 16 bit sender/source address.
|
XBee64BitAddress |
get64BitSourceAddress()
Returns the 64 bit sender/source address.
|
LinkedHashMap<String,String> |
getAPIPacketParameters()
Returns a map with the XBee packet parameters and their values.
|
byte[] |
getAPIPacketSpecificData()
Returns the XBee API packet specific data.
|
int |
getClusterID()
Returns the cluster ID used in the transmission.
|
int |
getDestinationEndpoint()
Returns the destination endpoint of the transmission.
|
int |
getProfileID()
Returns the profile ID used in the transmission.
|
int |
getReceiveOptions()
Returns the receive options bitfield.
|
byte[] |
getRFData()
Returns the received RF data.
|
int |
getSourceEndpoint()
Returns the source endpoint of the transmission.
|
boolean |
isBroadcast()
Returns whether or not the packet is a broadcast packet.
|
boolean |
needsAPIFrameID()
Returns whether the API packet needs API Frame ID or not.
|
void |
setRFData(byte[] rfData)
Sets the received RF data.
|
checkFrameID, getAPIData, getFrameID, getFrameType, getFrameTypeValue, getPacketData, setFrameID
generateByteArray, generateByteArrayEscaped, getChecksum, getPacketLength, getParameters, parsePacket, parsePacket, toPrettyString, toString
public static final int DATA_CLUSTER
public static final int DATA_ENDPOINT
public static final int DIGI_PROFILE
public ExplicitRxIndicatorPacket(XBee64BitAddress sourceAddress64, XBee16BitAddress sourceAddress16, int sourceEndpoint, int destEndpoint, int clusterID, int profileID, int receiveOptions, byte[] rfData)
ExplicitRxIndicatorPacket
object with the given parameters.sourceAddress64
- 64-bit address of the sender device.sourceAddress16
- 16-bit address of the sender device.sourceEndpoint
- Endpoint of the source that initiated the
transmission.destEndpoint
- Endpoint of the destination the message was
addressed to.clusterID
- Cluster ID the packet was addressed to.profileID
- Profile ID the packet was addressed to.receiveOptions
- BitField of receive options.rfData
- Received RF data.IllegalArgumentException
- if sourceEndpoint < 0
or
if sourceEndpoint > 255
or
if destEndpoint < 0
or
if destEndpoint > 255
or
if clusterID < 0
or
if clusterID > 65535
or
if profileID < 0
or
if profileID > 65535
or
if receiveOptions < 0
or
if receiveOptions > 255
.NullPointerException
- if sourceAddress64 == null
or
if sourceAddress16 == null
.XBeeReceiveOptions
,
XBee16BitAddress
,
XBee64BitAddress
public static ExplicitRxIndicatorPacket createPacket(byte[] payload)
ExplicitRxIndicatorPacket
object from the given
payload.payload
- The API frame payload. It must start with the frame type
corresponding to an Explicit RX Indicator packet
(0x91
).
The byte array must be in OperatingMode.API
mode.IllegalArgumentException
- if payload[0] != APIFrameType.EXPLICIT_RX_INDICATOR.getValue()
or
if payload.length <
or
if sourceEndpoint < 0
or
if sourceEndpoint > 255
or
if destEndpoint < 0
or
if destEndpoint > 255
or
if clusterID < 0
or
if clusterID > 65535
or
if profileID < 0
or
if profileID > 65535
or
if transmitOptions < 0
or
if transmitOptions > 255
.NullPointerException
- if payload == null
.public XBee16BitAddress get16BitSourceAddress()
XBee16BitAddress
public XBee64BitAddress get64BitSourceAddress()
XBee64BitAddress
public LinkedHashMap<String,String> getAPIPacketParameters()
XBeeAPIPacket
public byte[] getAPIPacketSpecificData()
XBeeAPIPacket
This does not include the frame ID if it is needed.
public int getClusterID()
public int getDestinationEndpoint()
public int getProfileID()
public int getReceiveOptions()
XBeeReceiveOptions
public byte[] getRFData()
public int getSourceEndpoint()
public boolean isBroadcast()
XBeeAPIPacket
isBroadcast
in class XBeeAPIPacket
true
if the packet is a broadcast packet, false
otherwise.public boolean needsAPIFrameID()
XBeeAPIPacket
needsAPIFrameID
in class XBeeAPIPacket
true
if the packet needs API Frame ID, false
otherwise.public void setRFData(byte[] rfData)
rfData
- Received RF data.© Copyright 2014?2015 Digi International Inc. All rights reserved.