XBEE_PKT
Section: Linux Programmer's Manual (3)
Updated: 04-Mar-2012
Index
Return to Main Contents
NAME
xbee_pkt
SYNOPSIS
#include <xbee.h>
struct xbee_pkt {
struct xbee *xbee;
struct xbee_con *con;
const char *conType;
unsigned char status;
unsigned char options;
unsigned char rssi; /* print as "RSSI: -%d - only valid for XBee 1 */
unsigned char apiIdentifier;
unsigned char frameId;
struct timespec timestamp;
struct xbee_conAddress address;
unsigned char atCommand[2];
void *dataItems; /* do NOT access this item */
int dataLen;
unsigned char data[1];
};
DESCRIPTION
The
xbee_pkt
structure provides access to the information contained within a packet.
- xbee
-
provides a handle to the related libxbee instance
- con
-
provides a handle to the related libxbee connection
- status
-
provides the returned status information. This is not populated for all connection types, but is populated for
Local AT, Remote AT
and possibly others (refer to the XBee datasheet for more information).
- options
-
like
status,
this field isn't populated for every connection type, but is populated for
Data and I/O
(refer to the XBee datasheet for more information).
- rssi
-
this field contains the 'Received Signal Strength Indication' value.
If populated, this can be printed like so:
printf("RSSI: -%d dBm\n", pkt->rssi);
- apiIdentifier
-
contains the API Identifier for the XBee message type that was handled
- frameId
-
contains the Frame ID provided by the received message
- atCommand
-
this is only populated for AT connection types, and contains the 2 character AT command.
- dataItems
-
you should not dereference this pointer, it is for internal use
only.
To access data, use
xbee_pktDataGet(3)
and its variations.
- dataLen
-
this indicates the length of the
data
field.
- data
-
this contains the body of the packet. This can contain
zero
bytes, and libxbee will nul terminate it, so that data may be treated as a string (using
printf(3)
for example).
AUTHOR
Attie Grande <attie@attie.co.uk>
SEE ALSO
libxbee(3),
xbee_setup(3),
xbee_conNew(3),
xbee_conRx(3),
xbee_pktFree(3)
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- AUTHOR
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 13:52:18 GMT, August 11, 2019