public class GenericXBeePacket extends XBeeAPIPacket
XBeeAPIPacket
NO_FRAME_ID
Constructor and Description |
---|
GenericXBeePacket(byte[] rfData)
Class constructor.
|
Modifier and Type | Method and Description |
---|---|
static GenericXBeePacket |
createPacket(byte[] payload)
Creates a new
GenericXBeePacket from the given payload. |
byte[] |
getRFData()
Returns the XBee RF Data of the packet.
|
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 XBee RF Data.
|
checkFrameID, getAPIData, getFrameID, getFrameType, getFrameTypeValue, getPacketData, setFrameID
generateByteArray, generateByteArrayEscaped, getChecksum, getPacketLength, getParameters, parsePacket, parsePacket, toPrettyString, toString
public GenericXBeePacket(byte[] rfData)
rfData
- The XBee RF Data.public static GenericXBeePacket createPacket(byte[] payload)
GenericXBeePacket
from the given payload.payload
- The API frame payload. It must start with the frame type
corresponding to a Generic packet (0xFF
).
The byte array must be in OperatingMode.API
mode.IllegalArgumentException
- if payload[0] != APIFrameType.GENERIC.getValue()
or
if payload.length <
.NullPointerException
- if payload == null
.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
- The new XBee RF Data.© Copyright 2014–2014 Digi International Inc. All rights reserved.