public class RX64Packet extends XBeeAPIPacket
When the module receives an RF packet, it is sent out the UART using this message type.
This packet is the response to TX (transmit) 64 Request packets.
TX64Packet
,
XBeeAPIPacket
NO_FRAME_ID
Constructor and Description |
---|
RX64Packet(XBee64BitAddress sourceAddress64,
int rssi,
int receiveOptions,
byte[] rfData)
Class constructor.
|
Modifier and Type | Method and Description |
---|---|
static RX64Packet |
createPacket(byte[] payload)
Creates a new
RX64Packet object from the given payload. |
XBee64BitAddress |
get64bitSourceAddress()
Returns the 64-bit sender/source address.
|
LinkedHashMap<String,String> |
getAPIPacketParameters()
Returns a map with the XBee packet parameters and their values.
|
int |
getReceiveOptions()
Returns the receive options bitfield.
|
byte[] |
getRFData()
Returns the received RF data.
|
int |
getRSSI()
Returns the Received Signal Strength Indicator (RSSI).
|
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 RX64Packet(XBee64BitAddress sourceAddress64, int rssi, int receiveOptions, byte[] rfData)
RX64Packet
object with
the given parameters.sourceAddress64
- 64-bit address of the sender.rssi
- Received signal strength indicator.receiveOptions
- Bitfield indicating the receive options.rfData
- Received RF data.IllegalArgumentException
- if rssi < 0
or
if rssi > 100
or
if receiveOptions < 0
or
if receiveOptions > 255
.NullPointerException
- if sourceAddress64 == null
.XBeeReceiveOptions
,
XBee64BitAddress
public static RX64Packet createPacket(byte[] payload)
RX64Packet
object from the given payload.payload
- The API frame payload. It must start with the frame type
corresponding to a RX64 packet (0x80
).
The byte array must be in OperatingMode.API
mode.IllegalArgumentException
- if payload[0] != APIFrameType.RX_64.getValue()
or
if payload.length <
or
if rssi < 0
or
if rssi > 100
or
if receiveOptions < 0
or
if receiveOptions > 255
.NullPointerException
- if payload == null
.public XBee64BitAddress get64bitSourceAddress()
XBee64BitAddress
public LinkedHashMap<String,String> getAPIPacketParameters()
XBeeAPIPacket
public int getReceiveOptions()
XBeeReceiveOptions
public byte[] getRFData()
public int getRSSI()
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–2014 Digi International Inc. All rights reserved.