Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GreenPower cluster #676

Merged
merged 1 commit into from Jul 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -43,6 +43,7 @@ The following clusters are currently supported -:
| 0015 | COMMISSIONING | This cluster provides attributes and commands pertaining to the commissioning and management of ZigBee devices operating in a network. |
| 0019 | OTA_UPGRADE | The cluster provides a standard way to upgrade devices in the network via OTA messages. Thus the upgrade process MAY be performed between two devices from different manufacturers. Devices are required to have application bootloader and additional memory space in order to successfully implement the cluster. |
| 0020 | POLL_CONTROL | This cluster provides a mechanism for the management of an end device’s MAC Data Request rate. For the purposes of this cluster, the term “poll” always refers to the sending of a MAC Data Request from the end device to the end device’s parent. This cluster can be used for instance by a configuration device to make an end device responsive for a certain period of time so that the device can be managed by the controller. This cluster is composed of a client and server. The end device implements the server side of this cluster. The server side contains several attributes related to the MAC Data Request rate for the device. The client side implements commands used to manage the poll rate for the device. The end device which implements the server side of this cluster sends a query to the client on a predetermined interval to see if the client would like to manage the poll period of the end device in question. When the client side of the cluster hears from the server it has the opportunity to respond with configuration data to either put the end device in a short poll mode or let the end device continue to function normally. |
| 0021 | GREEN_POWER | The Green Power cluster defines the format of the commands exchanged when handling GPDs. |
| 0101 | DOOR_LOCK | The door lock cluster provides an interface to a generic way to secure a door. The physical object that provides the locking functionality is abstracted from the cluster. The cluster has a small list of mandatory attributes and functions and a list of optional features. |
| 0102 | WINDOW_COVERING | Provides an interface for controlling and adjusting automatic window coverings. |
| 0201 | THERMOSTAT | This cluster provides an interface to the functionality of a thermostat. |
Expand Down
Expand Up @@ -42,8 +42,8 @@ public static class DataTypeMap {
static {
dataTypeMapping = new HashMap<String, DataTypeMap>();

dataTypeMapping.put("CHARACTER_STRING", new DataTypeMap("String", 0x42, -1, false));
dataTypeMapping.put("IEEE_ADDRESS", new DataTypeMap("IeeeAddress", 0xf0, 8, false, 0xffffffff));
dataTypeMapping.put("SECURITY_KEY", new DataTypeMap("ZigBeeKey", 0xf1, 16, false));
dataTypeMapping.put("EXTENDED_PANID", new DataTypeMap("Long", 0, 0, false));
dataTypeMapping.put("NODE_DESCRIPTOR", new DataTypeMap("NodeDescriptor", 0, 0, false));
dataTypeMapping.put("SIMPLE_DESCRIPTOR", new DataTypeMap("SimpleDescriptor", 0, 0, false));
Expand Down Expand Up @@ -105,6 +105,9 @@ public static class DataTypeMap {
dataTypeMapping.put("FLOAT_32_BIT", new DataTypeMap("Double", 0x39, 4, true));
dataTypeMapping.put("DATA_8_BIT", new DataTypeMap("Integer", 0x08, 1, false));
dataTypeMapping.put("OCTET_STRING", new DataTypeMap("ByteArray", 0x41, -1, false));
dataTypeMapping.put("CHARACTER_STRING", new DataTypeMap("String", 0x42, -1, false));
dataTypeMapping.put("LONG_OCTET_STRING", new DataTypeMap("ByteArray", 0x43, -1, false));
dataTypeMapping.put("LONG_CHARACTER_STRING", new DataTypeMap("String", 0x44, -1, false));
dataTypeMapping.put("UTCTIME", new DataTypeMap("Calendar", 0xe2, 4, true, 0xffffffff));
dataTypeMapping.put("ZDO_STATUS", new DataTypeMap("ZdoStatus", 0, 0, false));
dataTypeMapping.put("ZCL_STATUS", new DataTypeMap("ZclStatus", 0, 0, false));
Expand Down
Expand Up @@ -110,6 +110,7 @@ public abstract class ZigBeeBaseClassGenerator {
standardTypes.add("int[]");

customTypes.put("IeeeAddress", packageRoot + ".IeeeAddress");
customTypes.put("ZigBeeKey", packageRoot + ".security.ZigBeeKey");
customTypes.put("ByteArray", packageRoot + packageZclField + ".ByteArray");
customTypes.put("ZclStatus", packageRoot + packageZcl + ".ZclStatus");
customTypes.put("ZdoStatus", packageRoot + packageZdp + ".ZdoStatus");
Expand Down
Expand Up @@ -65,6 +65,7 @@ public static void main(final String[] args) {
zclParser.addFile("src/main/resources/0015_Commissioning.xml");
zclParser.addFile("src/main/resources/0019_OtaUpgrade.xml");
zclParser.addFile("src/main/resources/0020_PollControl.xml");
zclParser.addFile("src/main/resources/0021_Greenpower.xml");

zclParser.addFile("src/main/resources/0101_DoorLock.xml");
zclParser.addFile("src/main/resources/0102_WindowCovering.xml");
Expand Down