XBEE_DATAGET(3)

NAME
xbee_dataGet, xbee_dataSet

SYNOPSIS
#include <xbee.h>

xbee_err xbee_dataSet(struct xbee *xbee, void *newData, void **oldData);

xbee_err xbee_dataGet(struct xbee *xbee, void **curData);

DESCRIPTION
xbee_dataSet() allows you to associate any data you wish with a libxbee instance. This data will then be avaliable from anywhere that you have access to the instance, and works identically to the functions xbee_conDataSet(3)and xbee_conDataGet(3).

xbee indicates which instance you would like to use, and newData indicates the data you wish to associate.

The oldData parameter allows you to retrieve the data that was assigned before you assigned new data. If it is NULL then the data will not be returned.

The xbee_dataGet() function allows you to retrieve the current data, without assigning new data to the instance.

  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 my_struct my_info;
/* initialize xbee, using xbee_setup() */
/* keep scope in mind! if this function returns, the pointer will be invalid */
if (xbee_dataSet(xbee, &my_info, NULL) != XBEE_ENONE) return;

AUTHOR
Attie Grande <attie@attie.co.uk>

SEE ALSO
libxbee(3), xbee_setup(3)