ZCL library
4.3
ZCL library to manage a Zigbee network
|
This class defines a Zigbee node. More...
#include <ZNode.h>
Public Types | |
enum | DeviceType { COORDINATOR = 0, ROUTER = 1, END_DEVICE = 2 } |
Enumeration constant of device types for a Zigbee node. | |
enum | NwkAddr { COORDINATOR_NWK_ADDR = 0x0000, INVALID_NWK_ADDR = 0xfffe, BROADCAST_ROUTERS = 0xfffc, BROADCAST_RX_ON = 0xfffd, BROADCAST_NWK_ADDR = 0xffff } |
Enumeration constant of network addresses for a Zigbee node. | |
Public Member Functions | |
ZNode (dbyte nwkAddr=INVALID_NWK_ADDR) | |
Constructor. | |
ZNode (const ZNode &other) | |
Redefinition of the copy-Constructor. | |
virtual | ~ZNode () |
Destructor. | |
ZNode & | operator= (const ZNode &other) |
Redefinition of the affectation Operator. | |
dbyte | getNwkAddr () const |
Get the network address of this Zigbee node. | |
const ZIEEEAddress & | getIEEEAddress () const |
Get the IEEE address of this Zigbee node. | |
const byte * | getIEEEAddr () const |
Get the IEEE address of this Zigbee node. | |
void | setIEEEAddress (const ZIEEEAddress &ieeeAddr) |
Set the IEEE address of this Zigbee node. | |
void | setIEEEAddr (const byte ieeeAddr[8]) |
Set the IEEE address of this Zigbee node. | |
const char * | getModelId () const |
Get the model identifier of this Zigbee node. | |
std::string | getModelIdentifier () const |
Get the model identifier of this Zigbee node. | |
void | setModelId (const char *modelId) |
Set the model identifier of this Zigbee node. | |
std::string | getName () const |
Get the name of this Zigbee node. | |
void | setName (const char *name) |
Set the name of this Zigbee node. | |
dbyte | getParentNwkAddr () const |
Get the network address of the parent of this Zigbee node. | |
void | setParentNwkAddr (dbyte nwkAddr) |
Set the network address of the parent of this Zigbee node. | |
int | getAppVersion () const |
Get the application version of this Zigbee node. | |
void | setAppVersion (int version) |
Set the application version of this Zigbee node. | |
int | getManufacturerCode () const |
Get the manufacturer code of this Zigbee node if exists. | |
void | setManufacturerCode (int manufCode) |
Set the manufacturer code of this Zigbee node. | |
int | getLinkQuality () const |
Get the link quality of this Zigbee node. | |
void | setLinkQuality (int quality) |
Set the link quality of this Zigbee node. | |
DeviceType | getDeviceType () const |
Get the device type of this Zigbee node. | |
void | setDeviceType (DeviceType deviceType) |
Set the device type of this Zigbee node. | |
int | getChildrenCount () const |
Return the count of children of this Zigbee node. | |
const dbyte * | getChildrenNwkAddr (int &size) const |
Get all children network addresses of this Zigbee node. | |
bool | isNwkAddrOfChild (dbyte nwkAddr) const |
Return true if the network address is the one of a child of this Zigbee node. | |
void | addChildNwkAddr (dbyte nwkAddr) |
Add a child network address in this Zigbee node. | |
const ZEndPoint * | getEndPoint (byte number) const |
Get the End Point specified by its number. | |
const ZEndPoint * | getEndPoints (int &size) const |
Get all End Points of this Zigbee node. | |
const ZEndPoint * | addEndPoint (const ZEndPoint &endPoint) |
Add an End Point in this Zigbee node. | |
byte | getEpByInCluster (dbyte inClusterId) const |
Return the number of the first end point containing the Out cluster specified by its identifier. | |
byte | getEpByOutCluster (dbyte outClusterId) const |
Return the first end point number containing the In cluster specified by its identifier. | |
const ZBinding * | getBindings (int &size) const |
Get all Bindings of this Zigbee node. | |
const ZBinding * | addBinding (const ZBinding &binding) |
Add a Binding in this Zigbee node. | |
virtual const std::string | toString () const |
Return the description of the Zigbee node as String. | |
void | removeAllChildren () |
Remove all children (only for internal use). | |
void | removeAllEndPoints () |
Remove all End Points (only for internal use). | |
void | removeAllBindings () |
Remove all bindings (only for internal use). |
This class defines a Zigbee node.
Add a Binding in this Zigbee node.
A clone is done.
binding | the Binding to be added. |
void ZNode::addChildNwkAddr | ( | dbyte | nwkAddr | ) |
Add a child network address in this Zigbee node.
nwkAddr | the network address of the child. |
Add an End Point in this Zigbee node.
A clone is done.
endPoint | the End Point to be added. |
int ZNode::getAppVersion | ( | ) | const |
Get the application version of this Zigbee node.
const ZBinding* ZNode::getBindings | ( | int & | size | ) | const |
Get all Bindings of this Zigbee node.
[out] | size | the returned array size. |
int ZNode::getChildrenCount | ( | ) | const |
Return the count of children of this Zigbee node.
const dbyte* ZNode::getChildrenNwkAddr | ( | int & | size | ) | const |
Get all children network addresses of this Zigbee node.
[out] | size | the returned array size. |
DeviceType ZNode::getDeviceType | ( | ) | const |
Get the device type of this Zigbee node.
const ZEndPoint* ZNode::getEndPoint | ( | byte | number | ) | const |
Get the End Point specified by its number.
number | the End Point number. |
const ZEndPoint* ZNode::getEndPoints | ( | int & | size | ) | const |
Get all End Points of this Zigbee node.
[out] | size | the returned array size. |
byte ZNode::getEpByInCluster | ( | dbyte | inClusterId | ) | const |
Return the number of the first end point containing the Out cluster specified by its identifier.
inClusterId | the In cluster identifier. |
byte ZNode::getEpByOutCluster | ( | dbyte | outClusterId | ) | const |
Return the first end point number containing the In cluster specified by its identifier.
outClusterId | the Out cluster identifier. |
const byte* ZNode::getIEEEAddr | ( | ) | const |
Get the IEEE address of this Zigbee node.
const ZIEEEAddress& ZNode::getIEEEAddress | ( | ) | const |
Get the IEEE address of this Zigbee node.
int ZNode::getLinkQuality | ( | ) | const |
Get the link quality of this Zigbee node.
int ZNode::getManufacturerCode | ( | ) | const |
Get the manufacturer code of this Zigbee node if exists.
const char* ZNode::getModelId | ( | ) | const |
Get the model identifier of this Zigbee node.
std::string ZNode::getModelIdentifier | ( | ) | const |
Get the model identifier of this Zigbee node.
std::string ZNode::getName | ( | ) | const |
Get the name of this Zigbee node.
dbyte ZNode::getNwkAddr | ( | ) | const |
Get the network address of this Zigbee node.
dbyte ZNode::getParentNwkAddr | ( | ) | const |
Get the network address of the parent of this Zigbee node.
bool ZNode::isNwkAddrOfChild | ( | dbyte | nwkAddr | ) | const |
Return true if the network address is the one of a child of this Zigbee node.
nwkAddr | the network address of a node. |
void ZNode::setAppVersion | ( | int | version | ) |
Set the application version of this Zigbee node.
version | the application version. |
void ZNode::setDeviceType | ( | DeviceType | deviceType | ) |
Set the device type of this Zigbee node.
deviceType | the device type. |
void ZNode::setIEEEAddr | ( | const byte | ieeeAddr[8] | ) |
Set the IEEE address of this Zigbee node.
ieeeAddr | : the IEEE address as array of 8 bytes. |
void ZNode::setIEEEAddress | ( | const ZIEEEAddress & | ieeeAddr | ) |
Set the IEEE address of this Zigbee node.
ieeeAddr | : the IEEE address as array of 8 bytes. |
void ZNode::setLinkQuality | ( | int | quality | ) |
Set the link quality of this Zigbee node.
quality | the link quality. |
void ZNode::setManufacturerCode | ( | int | manufCode | ) |
Set the manufacturer code of this Zigbee node.
manufCode | the manufacturer code. |
void ZNode::setModelId | ( | const char * | modelId | ) |
Set the model identifier of this Zigbee node.
modelId | the model identifier as string. |
void ZNode::setName | ( | const char * | name | ) |
Set the name of this Zigbee node.
name | the name as string. |
void ZNode::setParentNwkAddr | ( | dbyte | nwkAddr | ) |
Set the network address of the parent of this Zigbee node.
nwkAddr | the network address of the parent. |
virtual const std::string ZNode::toString | ( | ) | const [virtual] |
Return the description of the Zigbee node as String.