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;
};
xbee_conTypeGet() allows you to retrieve the type of the connection that was provided when calling xbee_conNew().
#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));