The code generation is implemented and working. It can be currently used to send and receive ZCL commands directly through ZigBeeApi. The definition file is about half way done and it should be easy to add missing messages as they are needed:
/**
* Sends ZCL command message without waiting for response.
* @param commandMessage the command message
* @throws ZigBeeNetworkManagerException if exception occurs in sending
*/
public void sendCommand(final ZclCommandMessage commandMessage) throws ZigBeeNetworkManagerException {
zclCommandTransmitter.sendCommand(commandMessage);
}
/**
* Adds ZCL command listener.
* @param commandListener the command listener
*/
public void addCommandListener(final ZclCommandListener commandListener) {
this.zclCommandTransmitter.addCommandListener(commandListener);
}
/**
* Removes ZCL command listener.
* @param commandListener the command listener
*/
public void removeCommandListener(final ZclCommandListener commandListener) {
this.zclCommandTransmitter.removeCommandListener(commandListener);
}
Example log about receiving IAS Zone / Zone Status Change Notification:
ZigBee API starting up ... [OK]
There are 4 known devices in the network.
ZigBee console ready.
Node added: XX:XX:XX:XX:XX:XX:XX:XX (#0)
Node discovered: XX:XX:XX:XX:XX:XX:XX:XX (#0)
Received: Zone Status Change Notification XXXX.1 -> 0.2 {Zone Status=50, Extended Status=0}
-Tommi