public class IODataSampleRxIndicatorPacket extends XBeeAPIPacket
When the module receives an IO sample frame from a remote device, it sends the sample out the UART using this frame type (when AO=0). Only modules running API firmware will send IO samples out the UART.
Among received data, some options can also be received indicating transmission parameters.
XBeeReceiveOptions
,
XBeeAPIPacket
NO_FRAME_ID
Constructor and Description |
---|
IODataSampleRxIndicatorPacket(XBee64BitAddress sourceAddress64,
XBee16BitAddress sourceAddress16,
int receiveOptions,
byte[] rfData)
Class constructor.
|
Modifier and Type | Method and Description |
---|---|
static IODataSampleRxIndicatorPacket |
createPacket(byte[] payload)
Creates a new
IODataSampleRxIndicatorPacket 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.
|
IOSample |
getIOSample()
Returns the IO sample corresponding to the data contained in the packet.
|
int |
getReceiveOptions()
Returns the receive options.
|
byte[] |
getRFData()
Returns the received RF data.
|
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 IODataSampleRxIndicatorPacket(XBee64BitAddress sourceAddress64, XBee16BitAddress sourceAddress16, int receiveOptions, byte[] rfData)
IODataSampleRxIndicatorPacket
object with the given parameters.sourceAddress64
- 64-bit address of the sender.sourceAddress16
- 16-bit address of the sender.receiveOptions
- Receive options.rfData
- Received RF data.IllegalArgumentException
- if receiveOptions < 0
or
if receiveOptions > 255
or
if rfData.length < 5
.NullPointerException
- if sourceAddress64 == null
or
if sourceAddress16 == null
.XBeeReceiveOptions
,
XBee16BitAddress
,
XBee64BitAddress
public static IODataSampleRxIndicatorPacket createPacket(byte[] payload)
IODataSampleRxIndicatorPacket
object from the
given payload.payload
- The API frame payload. It must start with the frame type
corresponding to a IO Data Sample RX Indicator packet (0x92
).
The byte array must be in OperatingMode.API
mode.IllegalArgumentException
- if payload[0] != APIFrameType.IO_DATA_SAMPLE_RX_INDICATOR.getValue()
or
if payload.length <
or
if receiveOptions < 0
or
if receiveOptions > 255
or
if rfData.length < 5
.NullPointerException
- if payload == null
.public XBee16BitAddress get16bitSourceAddress()
XBee16BitAddress
public XBee64BitAddress get64bitSourceAddress()
XBee64BitAddress
public LinkedHashMap<String,String> getAPIPacketParameters()
XBeeAPIPacket
public IOSample getIOSample()
IOSample
public int getReceiveOptions()
XBeeReceiveOptions
public byte[] getRFData()
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.