ZCL library
4.3
ZCL library to manage a Zigbee network
|
This Class defines the services for sending and receiving ZCL commands. More...
#include <zcl.h>
Public Types | |
enum | NodeEvent { EVENT_CREATE = 1, EVENT_UPDATE = 2, EVENT_DELETE = 3 } |
Enumeration constant of node events used in the registerCallback method. | |
enum | Reason { UNKNOWN = 0, ANNOUNCE = 1, DISCOVER = 2, MODEL_ID = 3, BINDINGS = 4, BIND_CMD = 5, PARENT = 6, CHILDREN = 7, LEAVE = 8, RESET = 9, UNPLUG = 10, STOP = 11, NAME = 12 } |
Enumeration constant of Node event reasons. | |
enum | UbeeEvent { UBEE_STARTED = 1, UBEE_RELEASED = 2, UBEE_STOPPED = 3, UBEE_WAITING_BOOT = 4 } |
Enumeration constant of UBee events used in the startUbee method. | |
Static Public Member Functions | |
static bool | startUbee (void(*pCallback)(UbeeEvent event), const char *portname=NULL) |
Start the ZCL Api and try to communicate with UBee. | |
static bool | stopUbee () |
Stop the ZCL Api and close the communication with UBee. | |
static bool | isUbeeStarted () |
Return true if the UBee is started. | |
static void | resetUbee (bool nwkParams=false) |
Reset the UBee with or without the network parameters. | |
static void | resetNetwork () |
Reset the network. | |
static void | openAssociation (dbyte duration) |
Open/Stop the association on the UBee for a duration. | |
static std::string | getCoordinator () |
Get the IEEE address of the coordinator detected. | |
static std::string | readNetworkParameters () |
Read the the network parameters from the non-volatile flash. | |
static bool | writeNetworkParameters (std::string xmlParameters) |
Write the network parameters in the non-volatile flash and Reset the Coordinator. | |
static dbyte | getNetworkChannel () |
Get the logical channel occupied by the network. | |
static bool | updateNetworkChannel (dbyte channel) |
Update the logical channel of the Zigbee network. | |
static void | setNetworkChannel (dbyte channel) |
Set the logical channel occupied by the network. | |
static dbyte | getNetworkPanId () |
Get the Pan ID of the network. | |
static void | setNetworkPanId (dbyte panId) |
Set the Pan ID of the network. | |
static bool | loadUbeeFirmware (void(*pCallback)(int percent, void *param), const char *filename, void *param=NULL) |
Load the firmware of the UBee. | |
static bool | registerCallback (void(*pCallback)(zcl::NodeEvent event, const ZNode &node, zcl::Reason)) |
Register the callback for receiving the node events. | |
static void | unregisterCallback () |
Unregister the callback for receiving the node events. | |
static bool | subscribe (NotificationListener *listener, dbyte nwkAddr=ZNode::BROADCAST_NWK_ADDR) |
Subscribe a listener of the notification events for the specified node by its network address. | |
static bool | unsubscribe (NotificationListener *listener, dbyte nwkAddr=ZNode::BROADCAST_NWK_ADDR) |
Unsubscribe a listener from the notification events for the specified node by its network address. | |
static bool | subscribe (RequestListener *listener, dbyte nwkAddr=ZNode::BROADCAST_NWK_ADDR) |
Subscribe a listener of the received requests for the specified node by its network address. | |
static bool | unsubscribe (RequestListener *listener, dbyte nwkAddr=ZNode::BROADCAST_NWK_ADDR) |
Unsubscribe a listener from the received requests for the specified node by its network address. | |
static bool | unsubscribeAll () |
Unsubscribe all listeners from the notification events. | |
static int | getNodesCount () |
Return the count of nodes known by the coordinator. | |
static const ZNode * | getNodes (int &size) |
Get all nodes known by the coordinator. | |
static const ZNode * | getGhostNodes (int &size) |
Get all ghost nodes discovered by the coordinator. | |
static const ZNode * | searchNode (dbyte nwkAddr) |
Search a node by its network address. | |
static const ZNode * | searchNode (const ZIEEEAddress &ieeeAddr) |
Search a node by its IEEE address. | |
static byte | sendReadAttributesCommand (ResponseListener *listener, dbyte nwkAddr, byte epNumber, dbyte clusterId, const Attribute attributes[], int size) |
Send a Read Attributes command to a Zigbee node via the coordinator. | |
static byte | sendReadAttributesCommand (ResponseListener *listener, int manufacturerCode, dbyte nwkAddr, byte epNumber, dbyte clusterId, const Attribute attributes[], int size) |
Send a Read Attributes command to a Zigbee node on a manufacturer specific cluster via the coordinator. | |
static byte | sendWriteAttributesCommand (ResponseListener *listener, dbyte nwkAddr, byte epNumber, dbyte clusterId, const WriteAttribute attributes[], int size) |
Send a Write Attributes command to a Zigbee node via the coordinator. | |
static byte | sendWriteAttributesCommand (ResponseListener *listener, int manufacturerCode, dbyte nwkAddr, byte epNumber, dbyte clusterId, const WriteAttribute attributes[], int size) |
Send a Write Attributes command to a Zigbee node on a manufacturer specific cluster via the coordinator. | |
static byte | sendDiscoverAttributesCommand (ResponseListener *listener, dbyte nwkAddr, byte epNumber, dbyte clusterId, dbyte attrIdentifier, byte maxAttributes) |
Send a Discover Attributes command to a Zigbee node via the coordinator. | |
static byte | sendDiscoverAttributesCommand (ResponseListener *listener, int manufacturerCode, dbyte nwkAddr, byte epNumber, dbyte clusterId, dbyte attrIdentifier, byte maxAttributes) |
Send a Discover Attributes command to a Zigbee node on a manufacturer specific cluster via the coordinator. | |
static byte | sendReadReportingConfigurationCommand (ResponseListener *listener, dbyte nwkAddr, byte epNumber, dbyte clusterId, const ReadReportingConfigAttribute attributes[], int size) |
Send a Read Reporting Configuration command to a Zigbee node via the coordinator. | |
static byte | sendReadReportingConfigurationCommand (ResponseListener *listener, int manufacturerCode, dbyte nwkAddr, byte epNumber, dbyte clusterId, const ReadReportingConfigAttribute attributes[], int size) |
Send a Read Reporting Configuration command to a Zigbee node on a manufacturer specific cluster via the coordinator. | |
static byte | sendConfigureReportingCommand (ResponseListener *listener, dbyte nwkAddr, byte epNumber, dbyte clusterId, const ReportingConfigurationAttribute attributes[], int size) |
Send a Configure Reporting command to a Zigbee node via the coordinator. | |
static byte | sendConfigureReportingCommand (ResponseListener *listener, int manufacturerCode, dbyte nwkAddr, byte epNumber, dbyte clusterId, const ReportingConfigurationAttribute attributes[], int size) |
Send a Configure Reporting command to a Zigbee node on a manufacturer specific cluster via the coordinator. | |
static byte | sendClusterSpecificCommand (dbyte nwkAddr, byte epNumber, dbyte clusterId, byte command, const byte payload[], int length) |
Send a Cluster Specific command to a Zigbee node via the coordinator (No response is returned). | |
static byte | sendClusterSpecificCommand (int manufacturerCode, dbyte nwkAddr, byte epNumber, dbyte clusterId, byte command, const byte payload[], int length) |
Send a Cluster Specific command to a Zigbee node on a manufacturer specific cluster via the coordinator (No response is returned). | |
static byte | sendClusterSpecificCommandExt (dbyte nwkAddr, byte epNumber, dbyte clusterId, byte command, const ClusterSpecCmdAttribute attributes[], int size) |
Send a Cluster Specific command to a Zigbee node via the coordinator (No response is returned). | |
static byte | sendClusterSpecificCommandExt (int manufacturerCode, dbyte nwkAddr, byte epNumber, dbyte clusterId, byte command, const ClusterSpecCmdAttribute attributes[], int size) |
Send a Cluster Specific command to a Zigbee node on a manufacturer specific cluster via the coordinator (No response is returned). | |
static byte | sendClusterSpecificCommand (ResponseListener *listener, dbyte nwkAddr, byte epNumber, dbyte clusterId, byte command, const byte payload[], int length) |
Send a Cluster Specific command to a Zigbee node via the coordinator (A response is returned). | |
static byte | sendClusterSpecificCommand (ResponseListener *listener, int manufacturerCode, dbyte nwkAddr, byte epNumber, dbyte clusterId, byte command, const byte payload[], int length) |
Send a Cluster Specific command to a Zigbee node on a manufacturer specific cluster via the coordinator (A response is returned). | |
static byte | sendClusterSpecificCommandExt (ResponseListener *listener, dbyte nwkAddr, byte epNumber, dbyte clusterId, byte command, const ClusterSpecCmdAttribute attributes[], int size) |
Send a Cluster Specific command to a Zigbee node via the coordinator (A response is returned). | |
static byte | sendClusterSpecificCommandExt (ResponseListener *listener, int manufacturerCode, dbyte nwkAddr, byte epNumber, dbyte clusterId, byte command, const ClusterSpecCmdAttribute attributes[], int size) |
Send a Cluster Specific command to a Zigbee node on a manufacturer specific cluster via the coordinator (A response is returned). | |
static byte | sendZCLFrameCommand (ResponseListener *listener, dbyte nwkAddr, byte epNumber, dbyte clusterId, const ZCLFrame &frame) |
Send a ZCL frame to a Zigbee node via the coordinator. | |
static byte | sendZCLFrameCommand (dbyte nwkAddr, byte epNumber, dbyte clusterId, const ZCLFrame &frame) |
Send a ZCL frame to a Zigbee node via the coordinator. | |
static bool | sendBindRequest (ResponseListener *listener, dbyte nwkAddr, const ZIEEEAddress &srcIeeeAddr, byte srcEpNumber, dbyte clusterId, const ZIEEEAddress &dstIeeeAddr, byte dstEpNumber) |
Send a request to bind the cluster of the source end point with a destination end point. | |
static bool | sendBindRequest (ResponseListener *listener, dbyte nwkAddr, const byte srcIeeeAddr[8], byte srcEpNumber, dbyte clusterId, const byte dstIeeeAddr[8], byte dstEpNumber) |
Send a request to bind the cluster of the source end point with a destination end point. | |
static bool | sendBindRequest (ResponseListener *listener, dbyte nwkAddr, const ZIEEEAddress &srcIeeeAddr, byte srcEpNumber, dbyte clusterId, dbyte dstGroupAddr) |
Send a request to bind the cluster of the source end point with a group address. | |
static bool | sendBindRequest (ResponseListener *listener, dbyte nwkAddr, const byte srcIeeeAddr[8], byte srcEpNumber, dbyte clusterId, dbyte dstGroupAddr) |
Send a request to bind the cluster of the source end point with a group address. | |
static bool | sendUnbindRequest (ResponseListener *listener, dbyte nwkAddr, const ZIEEEAddress &srcIeeeAddr, byte srcEpNumber, dbyte clusterId, const ZIEEEAddress &dstIeeeAddr, byte dstEpNumber) |
Send a request to unbind the cluster of the source end point with a destination end point. | |
static bool | sendUnbindRequest (ResponseListener *listener, dbyte nwkAddr, const byte srcIeeeAddr[8], byte srcEpNumber, dbyte clusterId, const byte dstIeeeAddr[8], byte dstEpNumber) |
Send a request to unbind the cluster of the source end point with a destination end point. | |
static bool | sendUnbindRequest (ResponseListener *listener, dbyte nwkAddr, const ZIEEEAddress &srcIeeeAddr, byte srcEpNumber, dbyte clusterId, dbyte dstGroupAddr) |
Send a request to unbind the cluster of the source end point with a group address. | |
static bool | sendUnbindRequest (ResponseListener *listener, dbyte nwkAddr, const byte srcIeeeAddr[8], byte srcEpNumber, dbyte clusterId, dbyte dstGroupAddr) |
Send a request to unbind the cluster of the source end point with a group address. | |
static bool | sendBindingsListRequest (ResponseListener *listener, const dbyte nwkAddrs[], int size) |
Send a request to retrieve/refresh the cluster bindings of the specified devices. | |
static bool | sendLeaveNetworkRequest (dbyte nwkAddr) |
Send a request to force a Zigbee node to leave the network. | |
static bool | initAuthorizedDevices (const ZIEEEAddress addrs[], int size) |
Initialize the IEEE addresses of devices authorized to enter the Zigbee network. | |
static bool | clearAuthorizedDevices () |
Clear the IEEE addresses of devices authorized to enter the Zigbee network. | |
static bool | addAuthorizedDevice (const ZIEEEAddress &ieeeAddr) |
Add the IEEE address of a device authorized to enter the Zigbee network. | |
static bool | removeAuthorizedDevice (const ZIEEEAddress &ieeeAddr) |
Remove the IEEE address of a device authorized to enter the Zigbee network. | |
static const ZIEEEAddress * | getAllAuthorizedDevices (int &size) |
Get the the IEEE addresses of devices authorized to enter the Zigbee network. | |
static int | getAuthorizedDevicesCount () |
Get the count of the devices authorized to enter the Zigbee network. | |
static bool | containsAuthorizedDevice (const ZIEEEAddress &ieeeAddr) |
Return true if the device defined by its IEEE address is authorized to enter the Zigbee network. | |
static void | setLicensePath (const char *path) |
Set the license path for finding the license file. | |
static void | setLicenseKey (const char *key) |
Set the license key by programmation. | |
static bool | isLicenseValid () |
Return true if the license is valid. | |
static void | setDebugTrace (bool displayed) |
Set the displaying of debug traces. | |
static const char * | getVersion () |
Get the version of ZCL library. |
This Class defines the services for sending and receiving ZCL commands.
static bool zcl::addAuthorizedDevice | ( | const ZIEEEAddress & | ieeeAddr | ) | [static] |
Add the IEEE address of a device authorized to enter the Zigbee network.
ieeeAddr | the IEEE address of the authorized device. |
static bool zcl::clearAuthorizedDevices | ( | ) | [static] |
Clear the IEEE addresses of devices authorized to enter the Zigbee network.
static bool zcl::containsAuthorizedDevice | ( | const ZIEEEAddress & | ieeeAddr | ) | [static] |
Return true if the device defined by its IEEE address is authorized to enter the Zigbee network.
ieeeAddr | the IEEE address of the authorized device. |
static const ZIEEEAddress* zcl::getAllAuthorizedDevices | ( | int & | size | ) | [static] |
Get the the IEEE addresses of devices authorized to enter the Zigbee network.
[out] | size | the returned array size. |
static int zcl::getAuthorizedDevicesCount | ( | ) | [static] |
Get the count of the devices authorized to enter the Zigbee network.
static std::string zcl::getCoordinator | ( | ) | [static] |
Get the IEEE address of the coordinator detected.
static const ZNode* zcl::getGhostNodes | ( | int & | size | ) | [static] |
Get all ghost nodes discovered by the coordinator.
[out] | size | the returned array size. |
static dbyte zcl::getNetworkChannel | ( | ) | [static] |
Get the logical channel occupied by the network.
The returned channel is included between 11 and 26.
static dbyte zcl::getNetworkPanId | ( | ) | [static] |
Get the Pan ID of the network.
The returned Pan ID is included between 0x0000 to 0xffff. the value 0x0000 means the Pan ID is not configured. the value 0xffff means the Pan ID is chosen by UBee.
static const ZNode* zcl::getNodes | ( | int & | size | ) | [static] |
Get all nodes known by the coordinator.
[out] | size | the returned array size. |
static int zcl::getNodesCount | ( | ) | [static] |
Return the count of nodes known by the coordinator.
static const char* zcl::getVersion | ( | ) | [static] |
Get the version of ZCL library.
static bool zcl::initAuthorizedDevices | ( | const ZIEEEAddress | addrs[], |
int | size | ||
) | [static] |
Initialize the IEEE addresses of devices authorized to enter the Zigbee network.
addrs | an array of IEEE addresses. |
size | the IEEE addresses array size. |
static bool zcl::isLicenseValid | ( | ) | [static] |
Return true if the license is valid.
static bool zcl::isUbeeStarted | ( | ) | [static] |
Return true if the UBee is started.
static bool zcl::loadUbeeFirmware | ( | void(*)(int percent, void *param) | pCallback, |
const char * | filename, | ||
void * | param = NULL |
||
) | [static] |
Load the firmware of the UBee.
pCallback | callback for receiving the progress state. |
filename | the HEX file containing the firmware. |
param | pointer directly passed in the callback. (can be used to pass the instance which receives the progress state) |
static void zcl::openAssociation | ( | dbyte | duration | ) | [static] |
Open/Stop the association on the UBee for a duration.
duration | the number of seconds, or 0 to stop the association. |
static std::string zcl::readNetworkParameters | ( | ) | [static] |
Read the the network parameters from the non-volatile flash.
static bool zcl::registerCallback | ( | void(*)(zcl::NodeEvent event, const ZNode &node, zcl::Reason) | pCallback | ) | [static] |
Register the callback for receiving the node events.
pCallback | the pointer of callback function. |
static bool zcl::removeAuthorizedDevice | ( | const ZIEEEAddress & | ieeeAddr | ) | [static] |
Remove the IEEE address of a device authorized to enter the Zigbee network.
Force the device to leave the network if it is present in the network.
ieeeAddr | the IEEE address of the authorized device. |
static void zcl::resetUbee | ( | bool | nwkParams = false | ) | [static] |
Reset the UBee with or without the network parameters.
if the option 'nwkParams' is true then reset also the network parameters.
nwkParams | if true then reset also the network parameters. |
static const ZNode* zcl::searchNode | ( | dbyte | nwkAddr | ) | [static] |
Search a node by its network address.
nwkAddr | the network address of the searched node. |
static const ZNode* zcl::searchNode | ( | const ZIEEEAddress & | ieeeAddr | ) | [static] |
Search a node by its IEEE address.
ieeeAddr | the IEEE address of the searched node. |
static bool zcl::sendBindingsListRequest | ( | ResponseListener * | listener, |
const dbyte | nwkAddrs[], | ||
int | size | ||
) | [static] |
Send a request to retrieve/refresh the cluster bindings of the specified devices.
The list of bindings contained in the ZNode is updated on the response.
listener | the listener for receiving the response. |
nwkAddrs | an array of node network addresses. |
size | the network addresses array size. |
static bool zcl::sendBindRequest | ( | ResponseListener * | listener, |
dbyte | nwkAddr, | ||
const ZIEEEAddress & | srcIeeeAddr, | ||
byte | srcEpNumber, | ||
dbyte | clusterId, | ||
const ZIEEEAddress & | dstIeeeAddr, | ||
byte | dstEpNumber | ||
) | [static] |
Send a request to bind the cluster of the source end point with a destination end point.
listener | the listener for receiving the response. |
nwkAddr | the network address of the Zigbee node. |
srcIeeeAddr | the IEEE address of the source device. |
srcEpNumber | the source end point number. |
clusterId | the cluster identifier. |
dstIeeeAddr | the IEEE address of the destination device. |
dstEpNumber | the destination end point number. |
static bool zcl::sendBindRequest | ( | ResponseListener * | listener, |
dbyte | nwkAddr, | ||
const byte | srcIeeeAddr[8], | ||
byte | srcEpNumber, | ||
dbyte | clusterId, | ||
const byte | dstIeeeAddr[8], | ||
byte | dstEpNumber | ||
) | [static] |
Send a request to bind the cluster of the source end point with a destination end point.
listener | the listener for receiving the response. |
nwkAddr | the network address of the Zigbee node. |
srcIeeeAddr | the IEEE address of the source device. |
srcEpNumber | the source end point number. |
clusterId | the cluster identifier. |
dstIeeeAddr | the IEEE address of the destination device. |
dstEpNumber | the destination end point number. |
static bool zcl::sendBindRequest | ( | ResponseListener * | listener, |
dbyte | nwkAddr, | ||
const ZIEEEAddress & | srcIeeeAddr, | ||
byte | srcEpNumber, | ||
dbyte | clusterId, | ||
dbyte | dstGroupAddr | ||
) | [static] |
Send a request to bind the cluster of the source end point with a group address.
listener | the listener for receiving the response. |
nwkAddr | the network address of the Zigbee node. |
srcIeeeAddr | the IEEE address of the source device. |
srcEpNumber | the source end point number. |
clusterId | the cluster identifier. |
dstGroupAddr | the group address of the destination devices. |
static bool zcl::sendBindRequest | ( | ResponseListener * | listener, |
dbyte | nwkAddr, | ||
const byte | srcIeeeAddr[8], | ||
byte | srcEpNumber, | ||
dbyte | clusterId, | ||
dbyte | dstGroupAddr | ||
) | [static] |
Send a request to bind the cluster of the source end point with a group address.
listener | the listener for receiving the response. |
nwkAddr | the network address of the Zigbee node. |
srcIeeeAddr | the IEEE address of the source device. |
srcEpNumber | the source end point number. |
clusterId | the cluster identifier. |
dstGroupAddr | the group address of the destination devices. |
static byte zcl::sendClusterSpecificCommand | ( | dbyte | nwkAddr, |
byte | epNumber, | ||
dbyte | clusterId, | ||
byte | command, | ||
const byte | payload[], | ||
int | length | ||
) | [static] |
Send a Cluster Specific command to a Zigbee node via the coordinator (No response is returned).
The payload is filled by an array of bytes.
nwkAddr | the network address of the Zigbee node. |
epNumber | the end point number. |
clusterId | the cluster identifier. |
command | the cluster specific command. |
payload | the payload if exist or NULL. |
length | the payload array length. |
static byte zcl::sendClusterSpecificCommand | ( | int | manufacturerCode, |
dbyte | nwkAddr, | ||
byte | epNumber, | ||
dbyte | clusterId, | ||
byte | command, | ||
const byte | payload[], | ||
int | length | ||
) | [static] |
Send a Cluster Specific command to a Zigbee node on a manufacturer specific cluster via the coordinator (No response is returned).
The manufacturer code must be included between 0x0000 and 0xffff, otherwise the manufacturer code will be not present in the ZCLFrame.
The payload is filled by an array of bytes.
manufacturerCode | the manufacturer code to insert in the ZCLFrame. |
nwkAddr | the network address of the Zigbee node. |
epNumber | the end point number. |
clusterId | the cluster identifier. |
command | the cluster specific command. |
payload | the payload if exist or NULL. |
length | the payload array length. |
static byte zcl::sendClusterSpecificCommand | ( | ResponseListener * | listener, |
dbyte | nwkAddr, | ||
byte | epNumber, | ||
dbyte | clusterId, | ||
byte | command, | ||
const byte | payload[], | ||
int | length | ||
) | [static] |
Send a Cluster Specific command to a Zigbee node via the coordinator (A response is returned).
The payload is filled by an array of bytes.
listener | listener for receiving the response. |
nwkAddr | the network address of the Zigbee node. |
epNumber | the end point number. |
clusterId | the cluster identifier. |
command | the cluster specific command. |
payload | the payload if exist or NULL. |
length | the payload array length. |
static byte zcl::sendClusterSpecificCommand | ( | ResponseListener * | listener, |
int | manufacturerCode, | ||
dbyte | nwkAddr, | ||
byte | epNumber, | ||
dbyte | clusterId, | ||
byte | command, | ||
const byte | payload[], | ||
int | length | ||
) | [static] |
Send a Cluster Specific command to a Zigbee node on a manufacturer specific cluster via the coordinator (A response is returned).
The manufacturer code must be included between 0x0000 and 0xffff, otherwise the manufacturer code will be not present in the ZCLFrame.
The payload is filled by an array of bytes.
listener | listener for receiving the response. |
nwkAddr | the network address of the Zigbee node. |
manufacturerCode | the manufacturer code to insert in the ZCLFrame. |
epNumber | the end point number. |
clusterId | the cluster identifier. |
command | the cluster specific command. |
payload | the payload if exist or NULL. |
length | the payload array length. |
static byte zcl::sendClusterSpecificCommandExt | ( | dbyte | nwkAddr, |
byte | epNumber, | ||
dbyte | clusterId, | ||
byte | command, | ||
const ClusterSpecCmdAttribute | attributes[], | ||
int | size | ||
) | [static] |
Send a Cluster Specific command to a Zigbee node via the coordinator (No response is returned).
The payload is filled by an array of Cluster Specific attributes.
The order of the added Cluster Specific attributes determines the order in the payload.
nwkAddr | the network address of the Zigbee node. |
epNumber | the end point number. |
clusterId | the cluster identifier. |
command | the cluster specific command. |
attributes | the Cluster Specific attributes which composes the payload or NULL if none. |
size | the attributes array size. |
static byte zcl::sendClusterSpecificCommandExt | ( | int | manufacturerCode, |
dbyte | nwkAddr, | ||
byte | epNumber, | ||
dbyte | clusterId, | ||
byte | command, | ||
const ClusterSpecCmdAttribute | attributes[], | ||
int | size | ||
) | [static] |
Send a Cluster Specific command to a Zigbee node on a manufacturer specific cluster via the coordinator (No response is returned).
The manufacturer code must be included between 0x0000 and 0xffff, otherwise the manufacturer code will be not present in the ZCLFrame.
The payload is filled by an array of Cluster Specific attributes.
The order of the added Cluster Specific attributes determines the order in the payload.
manufacturerCode | the manufacturer code to insert in the ZCLFrame. |
nwkAddr | the network address of the Zigbee node. |
epNumber | the end point number. |
clusterId | the cluster identifier. |
command | the cluster specific command. |
attributes | the Cluster Specific attributes which composes the payload or NULL if none. |
size | the attributes array size. |
static byte zcl::sendClusterSpecificCommandExt | ( | ResponseListener * | listener, |
dbyte | nwkAddr, | ||
byte | epNumber, | ||
dbyte | clusterId, | ||
byte | command, | ||
const ClusterSpecCmdAttribute | attributes[], | ||
int | size | ||
) | [static] |
Send a Cluster Specific command to a Zigbee node via the coordinator (A response is returned).
The payload is filled by an array of Cluster Specific attributes.
The order of the added Cluster Specific attributes determines the order in the payload.
listener | listener for receiving the response. |
nwkAddr | the network address of the Zigbee node. |
epNumber | the end point number. |
clusterId | the cluster identifier. |
command | the cluster specific command. |
attributes | the Cluster Specific attributes which composes the payload or NULL if none. |
size | the attributes array size. |
static byte zcl::sendClusterSpecificCommandExt | ( | ResponseListener * | listener, |
int | manufacturerCode, | ||
dbyte | nwkAddr, | ||
byte | epNumber, | ||
dbyte | clusterId, | ||
byte | command, | ||
const ClusterSpecCmdAttribute | attributes[], | ||
int | size | ||
) | [static] |
Send a Cluster Specific command to a Zigbee node on a manufacturer specific cluster via the coordinator (A response is returned).
The manufacturer code must be included between 0x0000 and 0xffff, otherwise the manufacturer code will be not present in the ZCLFrame.
The payload is filled by an array of Cluster Specific attributes.
The order of the added Cluster Specific attributes determines the order in the payload.
listener | listener for receiving the response. |
manufacturerCode | the manufacturer code to insert in the ZCLFrame. |
nwkAddr | the network address of the Zigbee node. |
epNumber | the end point number. |
clusterId | the cluster identifier. |
command | the cluster specific command. |
attributes | the Cluster Specific attributes which composes the payload or NULL if none. |
size | the attributes array size. |
static byte zcl::sendConfigureReportingCommand | ( | ResponseListener * | listener, |
dbyte | nwkAddr, | ||
byte | epNumber, | ||
dbyte | clusterId, | ||
const ReportingConfigurationAttribute | attributes[], | ||
int | size | ||
) | [static] |
Send a Configure Reporting command to a Zigbee node via the coordinator.
listener | listener for receiving the response. |
nwkAddr | the network address of the Zigbee node. |
epNumber | the end point number. |
clusterId | the cluster identifier. |
attributes | the attributes to write the reporting configuration. |
size | the attributes array size. |
static byte zcl::sendConfigureReportingCommand | ( | ResponseListener * | listener, |
int | manufacturerCode, | ||
dbyte | nwkAddr, | ||
byte | epNumber, | ||
dbyte | clusterId, | ||
const ReportingConfigurationAttribute | attributes[], | ||
int | size | ||
) | [static] |
Send a Configure Reporting command to a Zigbee node on a manufacturer specific cluster via the coordinator.
listener | listener for receiving the response. |
manufacturerCode | the manufacturer code to insert in the ZCLFrame. |
nwkAddr | the network address of the Zigbee node. |
epNumber | the end point number. |
clusterId | the cluster identifier. |
attributes | the attributes to write the reporting configuration. |
size | the attributes array size. |
static byte zcl::sendDiscoverAttributesCommand | ( | ResponseListener * | listener, |
dbyte | nwkAddr, | ||
byte | epNumber, | ||
dbyte | clusterId, | ||
dbyte | attrIdentifier, | ||
byte | maxAttributes | ||
) | [static] |
Send a Discover Attributes command to a Zigbee node via the coordinator.
listener | listener for receiving the response. |
nwkAddr | the network address of the Zigbee node. |
epNumber | the end point number. |
clusterId | the cluster identifier. |
attrIdentifier | the first attribute identifier to begin. |
maxAttributes | the maximum attributes to discover. |
static byte zcl::sendDiscoverAttributesCommand | ( | ResponseListener * | listener, |
int | manufacturerCode, | ||
dbyte | nwkAddr, | ||
byte | epNumber, | ||
dbyte | clusterId, | ||
dbyte | attrIdentifier, | ||
byte | maxAttributes | ||
) | [static] |
Send a Discover Attributes command to a Zigbee node on a manufacturer specific cluster via the coordinator.
listener | listener for receiving the response. |
manufacturerCode | the manufacturer code to insert in the ZCLFrame. |
nwkAddr | the network address of the Zigbee node. |
epNumber | the end point number. |
clusterId | the cluster identifier. |
attrIdentifier | the first attribute identifier to begin. |
maxAttributes | the maximum attributes to discover. |
static bool zcl::sendLeaveNetworkRequest | ( | dbyte | nwkAddr | ) | [static] |
Send a request to force a Zigbee node to leave the network.
If the node has a child router, nothing is done.
nwkAddr | the network address of the Zigbee node. |
static byte zcl::sendReadAttributesCommand | ( | ResponseListener * | listener, |
dbyte | nwkAddr, | ||
byte | epNumber, | ||
dbyte | clusterId, | ||
const Attribute | attributes[], | ||
int | size | ||
) | [static] |
Send a Read Attributes command to a Zigbee node via the coordinator.
listener | listener for receiving the response. |
nwkAddr | the network address of the Zigbee node. |
epNumber | the end point number. |
clusterId | the cluster identifier. |
attributes | the attributes to read. |
size | the attributes array size. |
static byte zcl::sendReadAttributesCommand | ( | ResponseListener * | listener, |
int | manufacturerCode, | ||
dbyte | nwkAddr, | ||
byte | epNumber, | ||
dbyte | clusterId, | ||
const Attribute | attributes[], | ||
int | size | ||
) | [static] |
Send a Read Attributes command to a Zigbee node on a manufacturer specific cluster via the coordinator.
listener | listener for receiving the response. |
manufacturerCode | the manufacturer code to insert in the ZCLFrame. |
nwkAddr | the network address of the Zigbee node. |
epNumber | the end point number. |
clusterId | the cluster identifier. |
attributes | the attributes to read. |
size | the attributes array size. |
static byte zcl::sendReadReportingConfigurationCommand | ( | ResponseListener * | listener, |
dbyte | nwkAddr, | ||
byte | epNumber, | ||
dbyte | clusterId, | ||
const ReadReportingConfigAttribute | attributes[], | ||
int | size | ||
) | [static] |
Send a Read Reporting Configuration command to a Zigbee node via the coordinator.
listener | listener for receiving the response. |
nwkAddr | the network address of the Zigbee node. |
epNumber | the end point number. |
clusterId | the cluster identifier. |
attributes | the attributes to read the reporting configuration. |
size | the attributes array size. |
static byte zcl::sendReadReportingConfigurationCommand | ( | ResponseListener * | listener, |
int | manufacturerCode, | ||
dbyte | nwkAddr, | ||
byte | epNumber, | ||
dbyte | clusterId, | ||
const ReadReportingConfigAttribute | attributes[], | ||
int | size | ||
) | [static] |
Send a Read Reporting Configuration command to a Zigbee node on a manufacturer specific cluster via the coordinator.
listener | listener for receiving the response. |
manufacturerCode | the manufacturer code to insert in the ZCLFrame. |
nwkAddr | the network address of the Zigbee node. |
epNumber | the end point number. |
clusterId | the cluster identifier. |
attributes | the attributes to read the reporting configuration. |
size | the attributes array size. |
static bool zcl::sendUnbindRequest | ( | ResponseListener * | listener, |
dbyte | nwkAddr, | ||
const ZIEEEAddress & | srcIeeeAddr, | ||
byte | srcEpNumber, | ||
dbyte | clusterId, | ||
const ZIEEEAddress & | dstIeeeAddr, | ||
byte | dstEpNumber | ||
) | [static] |
Send a request to unbind the cluster of the source end point with a destination end point.
listener | the listener for receiving the response. |
nwkAddr | the network address of the Zigbee node. |
srcIeeeAddr | the IEEE address of the source device. |
srcEpNumber | the source end point number. |
clusterId | the cluster identifier. |
dstIeeeAddr | the IEEE address of the destination device. |
dstEpNumber | the destination end point number. |
static bool zcl::sendUnbindRequest | ( | ResponseListener * | listener, |
dbyte | nwkAddr, | ||
const byte | srcIeeeAddr[8], | ||
byte | srcEpNumber, | ||
dbyte | clusterId, | ||
const byte | dstIeeeAddr[8], | ||
byte | dstEpNumber | ||
) | [static] |
Send a request to unbind the cluster of the source end point with a destination end point.
listener | the listener for receiving the response. |
nwkAddr | the network address of the Zigbee node. |
srcIeeeAddr | the IEEE address of the source device. |
srcEpNumber | the source end point number. |
clusterId | the cluster identifier. |
dstIeeeAddr | the IEEE address of the destination device. |
dstEpNumber | the destination end point number. |
static bool zcl::sendUnbindRequest | ( | ResponseListener * | listener, |
dbyte | nwkAddr, | ||
const ZIEEEAddress & | srcIeeeAddr, | ||
byte | srcEpNumber, | ||
dbyte | clusterId, | ||
dbyte | dstGroupAddr | ||
) | [static] |
Send a request to unbind the cluster of the source end point with a group address.
listener | the listener for receiving the response. |
nwkAddr | the network address of the Zigbee node. |
srcIeeeAddr | the IEEE address of the source device. |
srcEpNumber | the source end point number. |
clusterId | the cluster identifier. |
dstGroupAddr | the group address of the destination devices. |
static bool zcl::sendUnbindRequest | ( | ResponseListener * | listener, |
dbyte | nwkAddr, | ||
const byte | srcIeeeAddr[8], | ||
byte | srcEpNumber, | ||
dbyte | clusterId, | ||
dbyte | dstGroupAddr | ||
) | [static] |
Send a request to unbind the cluster of the source end point with a group address.
listener | the listener for receiving the response. |
nwkAddr | the network address of the Zigbee node. |
srcIeeeAddr | the IEEE address of the source device. |
srcEpNumber | the source end point number. |
clusterId | the cluster identifier. |
dstGroupAddr | the group address of the destination devices. |
static byte zcl::sendWriteAttributesCommand | ( | ResponseListener * | listener, |
dbyte | nwkAddr, | ||
byte | epNumber, | ||
dbyte | clusterId, | ||
const WriteAttribute | attributes[], | ||
int | size | ||
) | [static] |
Send a Write Attributes command to a Zigbee node via the coordinator.
listener | listener for receiving the response. |
nwkAddr | the network address of the Zigbee node. |
epNumber | the end point number. |
clusterId | the cluster identifier. |
attributes | the attributes to write. |
size | the attributes array size. |
static byte zcl::sendWriteAttributesCommand | ( | ResponseListener * | listener, |
int | manufacturerCode, | ||
dbyte | nwkAddr, | ||
byte | epNumber, | ||
dbyte | clusterId, | ||
const WriteAttribute | attributes[], | ||
int | size | ||
) | [static] |
Send a Write Attributes command to a Zigbee node on a manufacturer specific cluster via the coordinator.
listener | listener for receiving the response. |
manufacturerCode | the manufacturer code to insert in the ZCLFrame. |
nwkAddr | the network address of the Zigbee node. |
epNumber | the end point number. |
clusterId | the cluster identifier. |
attributes | the attributes to write. |
size | the attributes array size. |
static byte zcl::sendZCLFrameCommand | ( | ResponseListener * | listener, |
dbyte | nwkAddr, | ||
byte | epNumber, | ||
dbyte | clusterId, | ||
const ZCLFrame & | frame | ||
) | [static] |
Send a ZCL frame to a Zigbee node via the coordinator.
listener | listener for receiving the response. |
nwkAddr | the network address of the Zigbee node. |
epNumber | the end point number. |
clusterId | the cluster identifier. |
frame | the ZCL frame. |
static byte zcl::sendZCLFrameCommand | ( | dbyte | nwkAddr, |
byte | epNumber, | ||
dbyte | clusterId, | ||
const ZCLFrame & | frame | ||
) | [static] |
Send a ZCL frame to a Zigbee node via the coordinator.
The ResponseStatus field of the frame control will be set to RESPONSE_NOT_RETURNED.
nwkAddr | the network address of the Zigbee node. |
epNumber | the end point number. |
clusterId | the cluster identifier. |
frame | the ZCL frame. |
static void zcl::setDebugTrace | ( | bool | displayed | ) | [static] |
Set the displaying of debug traces.
displayed | true if displayed (false by default). |
static void zcl::setLicenseKey | ( | const char * | key | ) | [static] |
Set the license key by programmation.
key | the license key. |
static void zcl::setLicensePath | ( | const char * | path | ) | [static] |
Set the license path for finding the license file.
For Windows
zcl::setLicensePath("C:/Tmp") ou zcl::setLicensePath("C:\\Tmp")
For Linux
zcl::setLicensePath("/home/tmp")
path | the path of the license file. |
static void zcl::setNetworkChannel | ( | dbyte | channel | ) | [static] |
Set the logical channel occupied by the network.
A reset of UBee with network parameters is necessary to take account the configuration. No more Zigbee node will be associated with the coordinator. The channel have to be included between 10 and 26. The value of 10 corresponds to all channels. It means that the UBee chooses the channel to be occupied among 16 channels.
channel | the logical channel. |
static void zcl::setNetworkPanId | ( | dbyte | panId | ) | [static] |
Set the Pan ID of the network.
A reset of UBee with network parameters is necessary to take account the configuration. The Pan ID have to be include between 0x0001 to 0xffff. the value 0xffff means the Pan ID is chosen by UBee.
panId | the Pan ID. |
static bool zcl::startUbee | ( | void(*)(UbeeEvent event) | pCallback, |
const char * | portname = NULL |
||
) | [static] |
Start the ZCL Api and try to communicate with UBee.
pCallback | the pointer of callback function which receives the UBee events. |
portname | the serial port name or NULL for an automatic detection of UBee. |
static bool zcl::stopUbee | ( | ) | [static] |
Stop the ZCL Api and close the communication with UBee.
static bool zcl::subscribe | ( | NotificationListener * | listener, |
dbyte | nwkAddr = ZNode::BROADCAST_NWK_ADDR |
||
) | [static] |
Subscribe a listener of the notification events for the specified node by its network address.
Thus it is not possible to subcribe for all nodes and for a specific node in same time.
listener | the listener of the notification events. |
nwkAddr | the network address of the node or BROADCAST_NWK_ADDR for all nodes. |
static bool zcl::subscribe | ( | RequestListener * | listener, |
dbyte | nwkAddr = ZNode::BROADCAST_NWK_ADDR |
||
) | [static] |
Subscribe a listener of the received requests for the specified node by its network address.
Thus it is not possible to subcribe for all nodes and for a specific node in same time.
listener | the listener of the received requests. |
nwkAddr | the network address of the node or BROADCAST_NWK_ADDR for all nodes. |
static bool zcl::unsubscribe | ( | NotificationListener * | listener, |
dbyte | nwkAddr = ZNode::BROADCAST_NWK_ADDR |
||
) | [static] |
Unsubscribe a listener from the notification events for the specified node by its network address.
listener | the listener of the notification events. |
nwkAddr | the network address of the node or BROADCAST_NWK_ADDR for all nodes. |
static bool zcl::unsubscribe | ( | RequestListener * | listener, |
dbyte | nwkAddr = ZNode::BROADCAST_NWK_ADDR |
||
) | [static] |
Unsubscribe a listener from the received requests for the specified node by its network address.
listener | the listener of the received requests. |
nwkAddr | the network address of the node or BROADCAST_NWK_ADDR for all nodes. |
static bool zcl::unsubscribeAll | ( | ) | [static] |
Unsubscribe all listeners from the notification events.
static bool zcl::updateNetworkChannel | ( | dbyte | channel | ) | [static] |
Update the logical channel of the Zigbee network.
All Zigbee node is going to change channel by remaining associated to the coordinator. The channel have to be included between 11 and 26.
channel | the channel. |
static bool zcl::writeNetworkParameters | ( | std::string | xmlParameters | ) | [static] |
Write the network parameters in the non-volatile flash and Reset the Coordinator.
xmlParameters | the network parameters as an Xml string. |