#include <xbee.h> struct xbee_conAddress { unsigned char addr16_enabled; unsigned char addr16[2]; unsigned char addr64_enabled; unsigned char addr64[8]; unsigned char endpoints_enabled; unsigned char endpoint_local; unsigned char endpoint_remote; unsigned char cluster_enabled; unsigned short cluster_id; unsigned char profile_enabled; unsigned short profile_id; };
The data is ordered with the MSB of the address, in the first byte of the array.
E.g: the 64-bit address 0x0013A200 0x40081826 would be initialized like so:
memset(&address, 0, sizeof(address)); address.addr64_enabled = 1; address.addr64[0] = 0x00; address.addr64[1] = 0x13; address.addr64[2] = 0xA2; address.addr64[3] = 0x00; address.addr64[4] = 0x40; address.addr64[5] = 0x08; address.addr64[6] = 0x18; address.addr64[7] = 0x26;
Endpoints are a feature of XBee Series 2 ZNet and ZigBee modules that are not present with XBee Series 1 modules.