XBEE_CONINFOGET
Section: Linux Programmer's Manual (3)
Updated: 31-Mar-2013
Index
Return to Main Contents
NAME
xbee_conInfoGet, xbee_conInfo
SYNOPSIS
#include <xbee.h>
xbee_err xbee_conInfoGet(struct xbee_con *con, struct xbee_conInfo *info);
xbee_err xbee_conTypeGet(struct xbee_con *con, char **type);
struct xbee_conInfo {
int countRx;
int countTx;
time_t lastRxTime;
};
DESCRIPTION
xbee_conInfoGet()
provides you with access to the statistical information stored with the connection.
info
should be pre-allocated storage to receive the
struct xbee_conInfo.
xbee_conTypeGet()
allows you to retrieve the type of the connection that was provided when calling
xbee_conNew().
Return Value
On success this function 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_conInfo info;
/* initialize xbee, using xbee_setup() */
/* initialize con, using xbee_conNew() */
if (xbee_conInfoGet(con, &info) != XBEE_ENONE) return;
printf("Tx count: %d\n", info.countTx);
printf("Rx count: %d\n", info.countRx);
printf("Last Rx was at: %s\n", ctime(&info.lastRxTime));
AUTHOR
Attie Grande <attie@attie.co.uk>
SEE ALSO
libxbee(3),
xbee_setup(3),
xbee_conNew(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