ZCL library  4.3
ZCL library to manage a Zigbee network
ZNode Class Reference

This class defines a Zigbee node. More...

#include <ZNode.h>

List of all members.

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.
ZNodeoperator= (const ZNode &other)
 Redefinition of the affectation Operator.
dbyte getNwkAddr () const
 Get the network address of this Zigbee node.
const ZIEEEAddressgetIEEEAddress () 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 ZEndPointgetEndPoint (byte number) const
 Get the End Point specified by its number.
const ZEndPointgetEndPoints (int &size) const
 Get all End Points of this Zigbee node.
const ZEndPointaddEndPoint (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 ZBindinggetBindings (int &size) const
 Get all Bindings of this Zigbee node.
const ZBindingaddBinding (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).

Detailed Description

This class defines a Zigbee node.


Member Function Documentation

const ZBinding* ZNode::addBinding ( const ZBinding binding)

Add a Binding in this Zigbee node.

A clone is done.

Parameters:
bindingthe Binding to be added.
Returns:
the Binding added.
void ZNode::addChildNwkAddr ( dbyte  nwkAddr)

Add a child network address in this Zigbee node.

Parameters:
nwkAddrthe network address of the child.
const ZEndPoint* ZNode::addEndPoint ( const ZEndPoint endPoint)

Add an End Point in this Zigbee node.

A clone is done.

Parameters:
endPointthe End Point to be added.
Returns:
the End Point added.
int ZNode::getAppVersion ( ) const

Get the application version of this Zigbee node.

Returns:
the application version.
const ZBinding* ZNode::getBindings ( int &  size) const

Get all Bindings of this Zigbee node.

Parameters:
[out]sizethe returned array size.
Returns:
the array of Bindings, or NULL if none.
int ZNode::getChildrenCount ( ) const

Return the count of children of this Zigbee node.

Returns:
the children count.
const dbyte* ZNode::getChildrenNwkAddr ( int &  size) const

Get all children network addresses of this Zigbee node.

Parameters:
[out]sizethe returned array size.
Returns:
the array of children network addresses, or NULL if none.
DeviceType ZNode::getDeviceType ( ) const

Get the device type of this Zigbee node.

Returns:
the device type.
const ZEndPoint* ZNode::getEndPoint ( byte  number) const

Get the End Point specified by its number.

Parameters:
numberthe End Point number.
Returns:
the End Point specified by its number, or NULL if none.
const ZEndPoint* ZNode::getEndPoints ( int &  size) const

Get all End Points of this Zigbee node.

Parameters:
[out]sizethe returned array size.
Returns:
the array of End Points, or NULL if none.
byte ZNode::getEpByInCluster ( dbyte  inClusterId) const

Return the number of the first end point containing the Out cluster specified by its identifier.

Parameters:
inClusterIdthe In cluster identifier.
Returns:
the End Point number or 0 if none.
byte ZNode::getEpByOutCluster ( dbyte  outClusterId) const

Return the first end point number containing the In cluster specified by its identifier.

Parameters:
outClusterIdthe Out cluster identifier.
Returns:
the End Point number or 0 if none.
const byte* ZNode::getIEEEAddr ( ) const

Get the IEEE address of this Zigbee node.

Deprecated:
use getIEEEAddress().toBytes()
Returns:
the IEEE address as array of 8 bytes.
const ZIEEEAddress& ZNode::getIEEEAddress ( ) const

Get the IEEE address of this Zigbee node.

Returns:
the IEEE address as array of 8 bytes.
int ZNode::getLinkQuality ( ) const

Get the link quality of this Zigbee node.

Returns:
the link quality.
int ZNode::getManufacturerCode ( ) const

Get the manufacturer code of this Zigbee node if exists.

Returns:
the manufacturer code.
const char* ZNode::getModelId ( ) const

Get the model identifier of this Zigbee node.

Deprecated:
use getModelIdentifier().c_str()
Returns:
the model identifier as string.
std::string ZNode::getModelIdentifier ( ) const

Get the model identifier of this Zigbee node.

Returns:
the model identifier as string.
std::string ZNode::getName ( ) const

Get the name of this Zigbee node.

Returns:
the name as string.
dbyte ZNode::getNwkAddr ( ) const

Get the network address of this Zigbee node.

Returns:
the network address.
dbyte ZNode::getParentNwkAddr ( ) const

Get the network address of the parent of this Zigbee node.

Returns:
the network address, or ZNode::INVALID_NWK_ADDR.
bool ZNode::isNwkAddrOfChild ( dbyte  nwkAddr) const

Return true if the network address is the one of a child of this Zigbee node.

Parameters:
nwkAddrthe network address of a node.
Returns:
true if that is a network address of a child.
void ZNode::setAppVersion ( int  version)

Set the application version of this Zigbee node.

Parameters:
versionthe application version.
void ZNode::setDeviceType ( DeviceType  deviceType)

Set the device type of this Zigbee node.

Parameters:
deviceTypethe device type.
void ZNode::setIEEEAddr ( const byte  ieeeAddr[8])

Set the IEEE address of this Zigbee node.

Parameters:
ieeeAddr: the IEEE address as array of 8 bytes.
void ZNode::setIEEEAddress ( const ZIEEEAddress ieeeAddr)

Set the IEEE address of this Zigbee node.

Parameters:
ieeeAddr: the IEEE address as array of 8 bytes.
void ZNode::setLinkQuality ( int  quality)

Set the link quality of this Zigbee node.

Parameters:
qualitythe link quality.
void ZNode::setManufacturerCode ( int  manufCode)

Set the manufacturer code of this Zigbee node.

Parameters:
manufCodethe manufacturer code.
void ZNode::setModelId ( const char *  modelId)

Set the model identifier of this Zigbee node.

Parameters:
modelIdthe model identifier as string.
void ZNode::setName ( const char *  name)

Set the name of this Zigbee node.

Parameters:
namethe name as string.
void ZNode::setParentNwkAddr ( dbyte  nwkAddr)

Set the network address of the parent of this Zigbee node.

Parameters:
nwkAddrthe network address of the parent.
virtual const std::string ZNode::toString ( ) const [virtual]

Return the description of the Zigbee node as String.

Returns:
the description as String.

The documentation for this class was generated from the following file: