ZCL library
4.3
ZCL library to manage a Zigbee network
|
The ZCL library allows facilitating the development of application which interfaces with the Cleode UBee™ dongle.
It provides services for the following functionalities:
The ZCL library is a dynamic library written in C++. It is useful in a multi-thread environment.
The developper never has to release the objects instantiated by the library.
It works on the following operating systems:
The library also contains a connector to interface with Java via JNI for Windows, Linux or Mac OSX operating systems.
The best way of implementing the ZCL library is to compile and to execute the "testZCL.cpp" file supplied with the CD.
This source file allows to understand by the example the use of the ZCL library.
It is a console application which shows in a simple way the use of the ZCL library.
The example in Java is a graphic application which displays in a table Zigbee nodes discovered on the network and below the notifications received from these Zigbee nodes.
It is possible to change the description of location by double-clicking in the corresponding field and by validating by the "Return" key.
A double-click on the field "ModelIdentifier" of a ZPlug sends a "Toggle" command which allows to change the state of the ZPlug.
Copy the "licence.lic" file in the "test" directory.
Contact the support of CLEODE in case of problem.
Copy the "testZCL.cpp" file in the "test" directory.
Copy the "zcl.dll" and "zcl.lib" files compiled by MSVC-x32 in the "test" directory.
cl /I..\Includes /EHsc /FeTestZCL.exe testZCL.cpp zcl.lib
Copy the "zcl.dll" file compiled by GCC-x32 in the "test" directory.
g++ -I..\Includes -Wall -L. -lzcl -o TestZCL.exe testZCL.cpp
Copy the "zcl.dll" file compiled by GCC-x32 in the "test" directory.
g++ -I..\Includes -Wall -Wl,--enable-auto-import -o TestZCL.exe testZCL.cpp -L. -lzcl\n
or
g++ -I..\Includes -Wall -static-libgcc -static-libstdc++ -Wl,--enable-auto-import -o TestZCL.exe testZCL.cpp -L. -lzcl
Check on "Device Manager (Port COM et LPT)" dialog box, the presence of the UBee dongle as an "FDTI" USB Serial Port.
TestZCL.exe
If the UBee dongle is detected, the message below will be displayed :
Ubee Started Tap 'q' to quit the program, 'h' for help
Otherwise, it will be the one below :
Ubee NOT Started Tap 'q' to quit the program, 'h' for help
Push the switch on the UBee to allow ZRC and ZPlug to join the network for testing the whole of ZCL commands.
Contact the support of CLEODE in case of problem.
Copy the "testZCL.cpp", "run.sh" and "libzcl.so" (compiled by GCC-x32) files in the "test" directory.
g++ -I..\Includes -Wall -o TestZCL testZCL.cpp -L. -lzcl -lpthread
Check by the "dmesg" command that the UBee dongle is linked to a ttyUSBx.
./run.sh
If the UBee dongle is detected, the message below will be displayed :
Ubee Started Tap 'q' to quit the program, 'h' for help
Otherwise, it will be the one below :
Ubee NOT Started Tap 'q' to quit the program, 'h' for help
Push the switch on the UBee to allow ZRC and ZPlug to join the network for testing the whole of ZCL commands.
Contact the support of CLEODE in case of problem.
Copy the "testZCL.cpp", "run.sh" and "libzcl.dylib" (compiled by GCC-x64) files in the "test" directory.
g++ -m64 -I../Includes -Wall -o TestZCL testZCL.cpp -L. -lzcl -lpthread
Check by the "dmesg" command that the UBee dongle is linked to a tty.usbserial.
./run.sh
If the UBee dongle is detected, the message below will be displayed :
Ubee Started Tap 'q' to quit the program, 'h' for help
Otherwise, it will be the one below :
Ubee NOT Started Tap 'q' to quit the program, 'h' for help
Push the switch on the UBee to allow ZRC and ZPlug to join the network for testing the whole of ZCL commands.
Contact the support of CLEODE in case of problem.
Copy the "TestZCL.java" file in the "test" directory.
Copy the "zcl-connector.jar" and "zcl.dll" (compiled by MSVC or GCC) files in the "test" directory.
javac -cp zcl-connector.jar TestZCL.java
Copy the "zcl-connector.jar" and "libzcl.so" files in the "test" directory.
javac -cp zcl-connector.jar TestZCL.java
Copy the "zcl-connector.jar" and "libzcl.dylib" files in the "test" directory.
javac -cp zcl-connector.jar TestZCL.java
Check on "Device Manager (Port COM et LPT)" dialog box, the presence of the UBee dongle as an "FDTI" USB Serial Port.
Check by the "dmesg" command that the UBee dongle is linked to a ttyUSBx.
Check by the "dmesg" command that the UBee dongle is linked to a tty.usbserial.
java -cp .;zcl-connector.jar TestZCL
java -Djava.library.path=. -cp .:zcl-connector.jar TestZCL
Push the switch on the UBee to allow ZRC and ZPlug to join the network for testing the whole of ZCL commands.