com.digi.xbee.api.packet.common

## Class TransmitStatusPacket

- java.lang.Object
- - com.digi.xbee.api.packet.XBeePacket
  - - com.digi.xbee.api.packet.XBeeAPIPacket
    - - com.digi.xbee.api.packet.common.TransmitStatusPacket

-     public class TransmitStatusPacket
      extends XBeeAPIPacket

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

  When a Transmit Request is completed, the module sends a Transmit Status message. This message will indicate if the packet was transmitted successfully or if there was a failure.

  This packet is the response to standard and explicit transmit requests.

  See Also:
    `TransmitPacket`

- - ### Field Summary

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

      `NO_FRAME_ID`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TransmitStatusPacket(int frameID, XBee16BitAddress destAddress16, int tranmistRetryCount, XBeeTransmitStatus transmitStatus, XBeeDiscoveryStatus discoveryStatus)` Class constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static TransmitStatusPacket` | `createPacket(byte[] payload)` Creates a new `TransmitStatusPacket` object from the given payload.
    `XBee16BitAddress` | `get16bitDestinationAddress()` Returns the 16-bit destination address.
    `LinkedHashMap<String,String>` | `getAPIPacketParameters()` Returns a map with the XBee packet parameters and their values.
    `XBeeDiscoveryStatus` | `getDiscoveryStatus()` Returns the discovery status.
    `int` | `getTransmitRetryCount()` Returns the transmit retry count.
    `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

    - #### TransmitStatusPacket

          public TransmitStatusPacket(int frameID,
                              XBee16BitAddress destAddress16,
                              int tranmistRetryCount,
                              XBeeTransmitStatus transmitStatus,
                              XBeeDiscoveryStatus discoveryStatus)

      Class constructor. Instantiates a new `TransmitStatusPacket` object with the given parameters.
      Parameters:
        `frameID` - Frame ID.
        `destAddress16` - 16-bit Network address the packet was delivered to.
        `tranmistRetryCount` - The number of application transmission retries that took place.
        `transmitStatus` - Transmit status.
        `discoveryStatus` - Discovery status.
      Throws:
        `IllegalArgumentException` - if `frameID < 0` or if `frameID > 255` or if `tranmistRetryCount < 0` or if `tranmistRetryCount > 255`.
        `NullPointerException` - if `destAddress16 == null` or if `transmitStatus == null` or if `discoveryStatus == null`.
      See Also:
        `XBeeDiscoveryStatus`, `XBeeTransmitStatus`, `XBee16BitAddress`

  - ### Method Detail

    - #### createPacket

          public static TransmitStatusPacket createPacket(byte[] payload)

      Creates a new `TransmitStatusPacket` object from the given payload.
      Parameters:
        `payload` - The API frame payload. It must start with the frame type corresponding to a Transmit Status packet (`0x8B`). The byte array must be in `OperatingMode.API` mode.
      Returns:
        Parsed Transmit Status packet.
      Throws:
        `IllegalArgumentException` - if `payload[0] != APIFrameType.TRANSMIT_STATUS.getValue()` or if `payload.length <` or if `frameID < 0` or if `frameID > 255` or if `tranmistRetryCount < 0` or if `tranmistRetryCount > 255`.
        `NullPointerException` - if `payload == null`.

    - #### get16bitDestinationAddress

          public XBee16BitAddress get16bitDestinationAddress()

      Returns the 16-bit destination address.
      Returns:
        The 16-bit destination address.
      See Also:
        `XBee16BitAddress`

    - #### 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.

    - #### getDiscoveryStatus

          public XBeeDiscoveryStatus getDiscoveryStatus()

      Returns the discovery status.
      Returns:
        Discovery status.
      See Also:
        `XBeeDiscoveryStatus`

    - #### getTransmitRetryCount

          public int getTransmitRetryCount()

      Returns the transmit retry count.
      Returns:
        Transmit retry count.

    - #### 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.