public class TXStatusPacket extends XBeeAPIPacket
When a TX Request is completed, the module sends a TX Status message. This message will indicate if the packet was transmitted successfully or if there was a failure.
TX16Packet,
TX64Packet,
XBeeAPIPacketNO_FRAME_ID| Constructor and Description |
|---|
TXStatusPacket(int frameID,
XBeeTransmitStatus transmitStatus)
Class constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static TXStatusPacket |
createPacket(byte[] payload)
Creates a new
TXStatusPacket object from the given payload. |
LinkedHashMap<String,String> |
getAPIPacketParameters()
Returns a map with the XBee packet parameters and their values.
|
XBeeTransmitStatus |
getTransmitStatus()
Returns the transmit status.
|
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.
|
checkFrameID, getAPIData, getFrameID, getFrameType, getFrameTypeValue, getPacketData, setFrameIDgenerateByteArray, generateByteArrayEscaped, getChecksum, getPacketLength, getParameters, parsePacket, parsePacket, toPrettyString, toStringpublic TXStatusPacket(int frameID, XBeeTransmitStatus transmitStatus)
TXStatusPacket object
with the given parameters.frameID - Packet frame ID.transmitStatus - Transmit status.IllegalArgumentException - if frameID < 0 or
if frameID > 255.NullPointerException - if transmitStatus == null.XBeeTransmitStatuspublic static TXStatusPacket createPacket(byte[] payload)
TXStatusPacket object from the given payload.payload - The API frame payload. It must start with the frame type
corresponding to a TX Status packet (0x89).
The byte array must be in OperatingMode.API mode.IllegalArgumentException - if payload[0] != APIFrameType.TX_STATUS.getValue() or
if payload.length < or
if frameID < 0 or
if frameID > 255.NullPointerException - if payload == null.public LinkedHashMap<String,String> getAPIPacketParameters()
XBeeAPIPacketpublic XBeeTransmitStatus getTransmitStatus()
XBeeTransmitStatuspublic 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.© Copyright 2014?2015 Digi International Inc. All rights reserved.