# XBeePacket Struct Reference
[XBee]

Representation of an XBee packet. More...

## Data Fields
uint8 | apiId
| the API ID for this packet that subsequent response/status messages can refer to.
uint8 | crc
| The checksum for this packet - mostly used internally by XBee_SendPacket() and XBee_GetPacket().
uint8 * | dataPtr
| A pointer into the packet structure itself.
int | rxState
| Used internally by XBee_GetPacket() to keep track of the parse state.
int | length
| The length of a packet - only useful after a successful call to XBee_GetPacket().
int | index
| Used internally by XBee_GetPacket() to keep track of the current length.
XBee_TX64 | tx64
| TX 64 packet.
XBee_TX16 | tx16
| TX 16 packet.
XBee_TXStatus | txStatus
| TX status packet.
XBee_RX64 | rx64
| RX 64 packet.
XBee_RX16 | rx16
| RX 16 packet.
XBee_ATCommand | atCommand
| AT Command packet.
XBee_ATCommandResponse | atResponse
| AT Command Response packet.
XBee_IO64 | io64
| IO 64 packet.
XBee_IO16 | io16
| IO 16 packet.

## Detailed Description

Representation of an XBee packet.

The XBeePacket structure consists of an API ID, indicating the kind of packet it is, as well as providing the structure for that particular packet. Only one packet type will be valid at a time, as indicated by the apiId:

Example

      XBeePacket* xbp;
      if( xbp->apiId == XBEE_IO16 )
      {
        int signalStrength = xbp->io16.rssi;
        // and so on...
      }

See XBeeApiId for a list of valid API IDs.

Definition at line 212 of file xbee.h.

## Field Documentation

uint8 XBeePacket::apiId

the API ID for this packet that subsequent response/status messages can refer to.

Definition at line 214 of file xbee.h.

XBee_ATCommand XBeePacket::atCommand

AT Command packet.

Definition at line 223 of file xbee.h.

XBee_ATCommandResponse XBeePacket::atResponse

AT Command Response packet.

Definition at line 224 of file xbee.h.

uint8 XBeePacket::crc

The checksum for this packet - mostly used internally by XBee_SendPacket() and XBee_GetPacket().

Definition at line 229 of file xbee.h.

uint8* XBeePacket::dataPtr

A pointer into the packet structure itself.

Definition at line 230 of file xbee.h.

int XBeePacket::index

Used internally by XBee_GetPacket() to keep track of the current length.

Definition at line 233 of file xbee.h.

XBee_IO16 XBeePacket::io16

IO 16 packet.

Definition at line 226 of file xbee.h.

XBee_IO64 XBeePacket::io64

IO 64 packet.

Definition at line 225 of file xbee.h.

int XBeePacket::length

The length of a packet - only useful after a successful call to XBee_GetPacket().

Definition at line 232 of file xbee.h.

XBee_RX16 XBeePacket::rx16

RX 16 packet.

Definition at line 222 of file xbee.h.

XBee_RX64 XBeePacket::rx64

RX 64 packet.

Definition at line 221 of file xbee.h.

int XBeePacket::rxState

Used internally by XBee_GetPacket() to keep track of the parse state.

Definition at line 231 of file xbee.h.

XBee_TX16 XBeePacket::tx16

TX 16 packet.

Definition at line 219 of file xbee.h.

XBee_TX64 XBeePacket::tx64

TX 64 packet.

Definition at line 218 of file xbee.h.

XBee_TXStatus XBeePacket::txStatus

TX status packet.

Definition at line 220 of file xbee.h.