XBEE_PKTVALIDATE
Section: Linux Programmer's Manual (3)
Updated: 04-Mar-2012
Index
Return to Main Contents
NAME
xbee_pktValidate, xbee_pktFree
SYNOPSIS
#include <xbee.h>
xbee_err xbee_pktValidate(struct xbee_pkt *pkt);
xbee_err xbee_pktFree(struct xbee_pkt *pkt);
DESCRIPTION
These functions allow you to confirm your handle points to a valid libxbee packet, and free the memory associated with a packet.
Return Value
On success these functions will return XBEE_ENONE, otherwise an error number from
enum xbee_errors (as specified in <xbee.h>)
EXAMPLE
#include <xbee.h>
struct xbee *xbee;
struct xbee_con *con;
struct xbee_pkt *pkt;
/* initialize xbee, using xbee_setup() */
/* initialize con, using xbee_conNew() */
/* receive some data */
if (xbee_conRx(con, &pkt, NULL) != XBEE_ENONE) return;
if (xbee_pktValidate(pkt) != XBEE_ENONE) return;
/* use the packet's contents */
if (xbee_pktFree(pkt) != XBEE_ENONE) return;
AUTHOR
Attie Grande <attie@attie.co.uk>
SEE ALSO
libxbee(3),
xbee_setup(3),
xbee_conNew(3),
xbee_conRx(3)
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- Return Value
-
- EXAMPLE
-
- AUTHOR
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 13:52:19 GMT, August 11, 2019