public class RX16IOPacket extends XBeeAPIPacket
I/O data is sent out the UART using an API frame.
XBeeAPIPacketNO_FRAME_ID| Constructor and Description |
|---|
RX16IOPacket(XBee16BitAddress sourceAddress16,
int rssi,
int receiveOptions,
byte[] rfData)
Class constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static RX16IOPacket |
createPacket(byte[] payload)
Creates a new
RX16IOPacket object from the given payload. |
XBee16BitAddress |
get16bitSourceAddress()
Returns the 16-bit sender/source address.
|
LinkedHashMap<String,String> |
getAPIPacketParameters()
Returns a map with the XBee packet parameters and their values.
|
IOSample |
getIOSample()
Returns the IO sample corresponding to the data contained in the packet.
|
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, setFrameIDgenerateByteArray, generateByteArrayEscaped, getChecksum, getPacketLength, getParameters, parsePacket, parsePacket, toPrettyString, toStringpublic RX16IOPacket(XBee16BitAddress sourceAddress16, int rssi, int receiveOptions, byte[] rfData)
RX16IOPacket object with
the given parameters.sourceAddress16 - 16-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 or
if rfData.length < 5.NullPointerException - if sourceAddress16 == null.XBeeReceiveOptions,
XBee16BitAddresspublic static RX16IOPacket createPacket(byte[] payload)
RX16IOPacket object from the given payload.payload - The API frame payload. It must start with the frame type
corresponding to a RX16 Address IO packet (0x83).
The byte array must be in OperatingMode.API mode.IllegalArgumentException - if payload[0] != APIFrameType.RX_16.getValue() or
if payload.length < or
if rssi < 0 or
if rssi > 100 or
if receiveOptions < 0 or
if receiveOptions > 255 or
if rfData.length < 5.NullPointerException - if payload == null.public XBee16BitAddress get16bitSourceAddress()
XBee16BitAddresspublic LinkedHashMap<String,String> getAPIPacketParameters()
XBeeAPIPacketpublic IOSample getIOSample()
null if the packet has not
any data or if the sample could not be generated correctly.IOSamplepublic int getReceiveOptions()
XBeeReceiveOptionspublic byte[] getRFData()
public int getRSSI()
public boolean isBroadcast()
XBeeAPIPacketisBroadcast in class XBeeAPIPackettrue if the packet is a broadcast packet, false
otherwise.public boolean needsAPIFrameID()
XBeeAPIPacketneedsAPIFrameID in class XBeeAPIPackettrue 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.