xbee_err xbee_pktDataGet(struct xbee_pkt *pkt, const char *key, int id, int index, void **retData);
xbee_err xbee_pktAnalogGet(struct xbee_pkt *pkt, int channel, int index, int *retVal);
xbee_err xbee_pktDigitalGet(struct xbee_pkt *pkt, int channel, int index, int *retVal);
xbee_pktDataGet() will search the packet's dataItems (see xbee_pkt(3) for more) for a named key. The id and index are used to give a 2D-esque layout to the key. However if id is given as -1, then it is ignored, and the first 'column' is used. This allows for similar data - e.g: analog samples - to be stored using a single key, with differing channel numbers (id's).
xbee_pktAnalogGet(w,x,y,&z) is nearly synonymous with xbee_pktDataGet(w,analog,x,y,&z), though due to internal magic, it is strongly recommended that you use xbee_pktAnalogGet().
Similarly, xbee_pktDigitalGet(w,x,y,&z) is nearly synonymous with xbee_pktDataGet(w,digital,x,y,&z).
The list is keyed - <xbee mode>:<connection type>
"Address (64-bit)" - the raw 64-bit address
"Address" - a struct xbee_conAddress containing the full address information. This is not stored within the packet's data field
"NI" - the node identifier
#include <xbee.h> struct xbee *xbee; struct xbee_con *con; struct xbee_pkt *pkt; int value; /* initialize xbee, using xbee_setup() */ /* initialize con, using xbee_conNew() to an I/O connection */ /* receive a packet with analog I/O data, using xbee_conRx() */ if (xbee_pktAnalogGet(pkt, 3, 0, &value) != XBEE_ENONE) return; /* 'value' now contains the ADC value from the A3 pin */