public class TX64Packet extends XBeeAPIPacket
A TX Request message will cause the module to transmit data as an RF Packet.
XBeeAPIPacket
NO_FRAME_ID
Constructor and Description |
---|
TX64Packet(int frameID,
XBee64BitAddress destAddress64,
int transmitOptions,
byte[] rfData)
Class constructor.
|
Modifier and Type | Method and Description |
---|---|
static TX64Packet |
createPacket(byte[] payload)
Creates a new
TX64Packet object from the given payload. |
XBee64BitAddress |
get64bitDestinationAddress()
Returns the 64-bit destination address.
|
LinkedHashMap<String,String> |
getAPIPacketParameters()
Returns a map with the XBee packet parameters and their values.
|
byte[] |
getRFData()
Returns the RF Data to send.
|
int |
getTransmitOptions()
Returns the transmit options bitfield.
|
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 RF data to send.
|
checkFrameID, getAPIData, getFrameID, getFrameType, getFrameTypeValue, getPacketData, setFrameID
generateByteArray, generateByteArrayEscaped, getChecksum, getPacketLength, getParameters, parsePacket, parsePacket, toPrettyString, toString
public TX64Packet(int frameID, XBee64BitAddress destAddress64, int transmitOptions, byte[] rfData)
TX64Packet
object with
the given parameters.frameID
- Frame ID.destAddress64
- 64-bit address of the destination device.transmitOptions
- Bitfield of supported transmission options.rfData
- RF Data that is sent to the destination device.IllegalArgumentException
- if frameID < 0
or
if frameID > 255
or
if transmitOptions < 0
or
if transmitOptions > 255
.NullPointerException
- if destAddress64 == null
.XBeeTransmitOptions
,
XBee64BitAddress
public static TX64Packet createPacket(byte[] payload)
TX64Packet
object from the given payload.payload
- The API frame payload. It must start with the frame type
corresponding to a TX64 Request packet (0x00
).
The byte array must be in OperatingMode.API
mode.IllegalArgumentException
- if payload[0] != APIFrameType.TX_64.getValue()
or
if payload.length <
or
if frameID < 0
or
if frameID > 255
or
if transmitOptions < 0
or
if transmitOptions > 255
.NullPointerException
- if payload == null
.public XBee64BitAddress get64bitDestinationAddress()
XBee64BitAddress
public LinkedHashMap<String,String> getAPIPacketParameters()
XBeeAPIPacket
public byte[] getRFData()
public int getTransmitOptions()
XBeeTransmitOptions
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
- RF Data to send.© Copyright 2014–2014 Digi International Inc. All rights reserved.