com.digi.xbee.api.packet.raw

## Class TXStatusPacket

- java.lang.Object
- - com.digi.xbee.api.packet.XBeePacket
  - - com.digi.xbee.api.packet.XBeeAPIPacket
    - - com.digi.xbee.api.packet.raw.TXStatusPacket

-     public class TXStatusPacket
      extends XBeeAPIPacket

  This class represents a TX (Transmit) Status packet. Packet is built using the parameters of the constructor or providing a valid API payload.

  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.

  See Also:
    `TX16Packet`, `TX64Packet`, `XBeeAPIPacket`

- - ### Field Summary

    - ### Fields inherited from class com.digi.xbee.api.packet.XBeeAPIPacket

      `NO_FRAME_ID`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TXStatusPacket(int frameID, XBeeTransmitStatus transmitStatus)` Class constructor.

  - ### Method Summary

    Methods
    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` | `needsAPIFrameID()` Returns whether the API packet needs API Frame ID or not.

    - ### Methods inherited from class com.digi.xbee.api.packet.XBeeAPIPacket

      `checkFrameID, getAPIData, getFrameID, getFrameType, getFrameTypeValue, getPacketData, isBroadcast, setFrameID`

    - ### Methods inherited from class com.digi.xbee.api.packet.XBeePacket

      `generateByteArray, generateByteArrayEscaped, getChecksum, getPacketLength, getParameters, parsePacket, parsePacket, toPrettyString, toString`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### TXStatusPacket

          public TXStatusPacket(int frameID,
                        XBeeTransmitStatus transmitStatus)

      Class constructor. Instantiates a new `TXStatusPacket` object with the given parameters.
      Parameters:
        `frameID` - Packet frame ID.
        `transmitStatus` - Transmit status.
      Throws:
        `IllegalArgumentException` - if `frameID < 0` or if `frameID > 255`.
        `NullPointerException` - if `transmitStatus == null`.
      See Also:
        `XBeeTransmitStatus`

  - ### Method Detail

    - #### createPacket

          public static TXStatusPacket createPacket(byte[] payload)

      Creates a new `TXStatusPacket` object from the given payload.
      Parameters:
        `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.
      Returns:
        Parsed TX status packet.
      Throws:
        `IllegalArgumentException` - if `payload[0] != APIFrameType.TX_STATUS.getValue()` or if `payload.length <` or if `frameID < 0` or if `frameID > 255`.
        `NullPointerException` - if `payload == null`.

    - #### getAPIPacketParameters

          public LinkedHashMap<String,String> getAPIPacketParameters()

      Description copied from class: `XBeeAPIPacket`
      Returns a map with the XBee packet parameters and their values.
      Returns:
        A sorted map containing the XBee packet parameters with their values.

    - #### getTransmitStatus

          public XBeeTransmitStatus getTransmitStatus()

      Returns the transmit status.
      Returns:
        Transmit status.
      See Also:
        `XBeeTransmitStatus`

    - #### needsAPIFrameID

          public boolean needsAPIFrameID()

      Description copied from class: `XBeeAPIPacket`
      Returns whether the API packet needs API Frame ID or not.
      Specified by:
        `needsAPIFrameID` in class `XBeeAPIPacket`
      Returns:
        `true` if the packet needs API Frame ID, `false` otherwise.

© Copyright 2014–2014 Digi International Inc. All rights reserved.