XBee API operation library for mbed
Address Class Reference
XBee address class for both S1 and S2 hardware. More...
#include <Address.h>
Inherited by ExplicitAddress.
Public Member Functions | |
Address () | |
Create empty address : 0x00000000 0x00000000 0x0000 this is the default ZigBee Coordinatior. | |
Address (const unsigned char *address64, const unsigned char *NET16) | |
Create address from existing byte aray value : 8 bytes of ieee + 2 bytes network. | |
Address (const unsigned char *addr) | |
Create address from existing byte array value ( 8 bytes of IEEE address + 2 bytes 16 bit network address) | |
Address (long serialNumberHigh, long serialNumberLow, int networkAddress) | |
Create address from number value. | |
unsigned long | getSerialNumberHigh () |
Get the first 4 bytes of IEEE address. | |
unsigned long | getSerialNumberLow () |
Get the last 4 bytes of IEEE address. | |
unsigned int | getNetworkAddress () |
Get the 16 bit network address. | |
void | setSerialNumberHigh (long SerialNumberHigh) |
Set the first 4 bytes of IEEE address. | |
void | setSerialNumberLow (long SerialNumberLow) |
Set the last 4 bytes of IEEE address. | |
void | setNetworkAddress (int NetworkAddress) |
Set the 16 bit network address. | |
const unsigned char * | getAddressValue () |
Convert the device address to 10 bytes array. | |
Static Public Attributes | |
static Address * | BROADCAST_ZIGBEE = new Address(0x00000000, 0x0000FFFF, 0xFFFE) |
Get the ZigBee broadcast address. | |
static Address * | BROADCAST_XBEE = new Address(0x00000000, 0x00000000, 0xFFFF) |
Get the XBee broadcast address. | |
Protected Attributes | |
unsigned char | value [10] |
total 10 bytes (IEEE 64 bits + 16 bits networ address) | |
Friends | |
bool | operator== (const Address &a, const Address &b) |
Compare two XBee addresses and check if both point to the same device. | |
bool | operator!= (const Address &a, const Address &b) |
Compare two XBee addresses and check if both point to the same device. |
Detailed Description
XBee address class for both S1 and S2 hardware.
Definition at line 7 of file Address.h.
Constructor & Destructor Documentation
Address | ( | ) |
Create empty address : 0x00000000 0x00000000 0x0000 this is the default ZigBee Coordinatior.
Definition at line 6 of file Address.cpp.
Address | ( | const unsigned char * | address64, |
const unsigned char * | NET16 | ||
) |
Create address from existing byte aray value : 8 bytes of ieee + 2 bytes network.
- Parameters:
-
address64 8 bytes of IEEE address NET16 value 2 bytes network address
Definition at line 8 of file Address.cpp.
Address | ( | const unsigned char * | addr ) |
Create address from existing byte array value ( 8 bytes of IEEE address + 2 bytes 16 bit network address)
- Parameters:
-
addr 10 bytes leong : (0-7 bytes for IEEE address, 8-9 bytes for 16 bit network address)
Definition at line 19 of file Address.cpp.
Address | ( | long | serialNumberHigh, |
long | serialNumberLow, | ||
int | networkAddress | ||
) |
Create address from number value.
- Parameters:
-
serialNumberHigh first four byts of IEEE address and this can be retrieved by 'SH' command (eg. 0x0013A200) serialNumberLow last four byts of IEEE address and this can be retrieved by 'SL' command. networkAddress a dynamic allocated value for XBee module, 0x0000 is reserved for the coordinator, and this can be retrieved by 'MY' command.
Definition at line 25 of file Address.cpp.
Member Function Documentation
const unsigned char * getAddressValue | ( | ) |
Convert the device address to 10 bytes array.
- Returns:
- IEEE 64 bit address follow by 16 bit network address
Definition at line 69 of file Address.cpp.
unsigned int getNetworkAddress | ( | ) |
Get the 16 bit network address.
Definition at line 42 of file Address.cpp.
unsigned long getSerialNumberHigh | ( | ) |
Get the first 4 bytes of IEEE address.
Definition at line 32 of file Address.cpp.
unsigned long getSerialNumberLow | ( | ) |
Get the last 4 bytes of IEEE address.
Definition at line 37 of file Address.cpp.
void setNetworkAddress | ( | int | NetworkAddress ) |
Set the 16 bit network address.
Definition at line 63 of file Address.cpp.
void setSerialNumberHigh | ( | long | SerialNumberHigh ) |
Set the first 4 bytes of IEEE address.
Definition at line 47 of file Address.cpp.
void setSerialNumberLow | ( | long | SerialNumberLow ) |
Set the last 4 bytes of IEEE address.
Definition at line 55 of file Address.cpp.
Friends And Related Function Documentation
Compare two XBee addresses and check if both point to the same device.
Definition at line 82 of file Address.cpp.
Compare two XBee addresses and check if both point to the same device.
Definition at line 74 of file Address.cpp.
Field Documentation
Address * BROADCAST_XBEE = new Address(0x00000000, 0x00000000, 0xFFFF) [static] |
Address * BROADCAST_ZIGBEE = new Address(0x00000000, 0x0000FFFF, 0xFFFE) [static] |
Generated on Tue Jul 12 2022 11:17:05 by 1.7.2