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
,
XBeeAPIPacket
NO_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, setFrameID
generateByteArray, generateByteArrayEscaped, getChecksum, getPacketLength, getParameters, parsePacket, parsePacket, toPrettyString, toString
public 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
.XBeeTransmitStatus
public 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()
XBeeAPIPacket
public XBeeTransmitStatus getTransmitStatus()
XBeeTransmitStatus
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.© Copyright 2014–2014 Digi International Inc. All rights reserved.