XBEE_PKTVALIDATE(3)

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)