diff --git a/.gitignore b/.gitignore index 0f634e384..feda17266 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,8 @@ bin/ *.log *.log.* *.json +*.sh +*.zip .metadata local.properties diff --git a/README.md b/README.md index 6b2767368..2d0b911a4 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,58 @@ Features include -: * ZigBee Cluster Library * Over-The-Air firmware upgrade +### ZigBee Cluster Library + +The framework includes a ZigBee Cluster Library that is auto-generated from an XML definition file. + +The following clusters are currently supported -: + +| ID | Cluster | Description | +|----|---------|-------------| +| 0000 | BASIC | This cluster supports an interface to the node or physical device. It provides attributes and commands for determining basic information, setting user information such as location, and resetting to factory defaults. | +| 0001 | POWER_CONFIGURATION | Attributes for determining detailed information about a device’s power source(s), and for configuring under/over voltage alarms. | +| 0003 | IDENTIFY | Attributes and commands to put a device into an Identification mode (e.g. flashing a light), that indicates to an observer – e.g. an installer - which of several devices it is, also to request any device that is identifying itself to respond to the initiator. | +| 0004 | GROUPS | The ZigBee specification provides the capability for group addressing. That is, any endpoint on any device may be assigned to one or more groups, each labeled with a 16-bit identifier (0x0001 – 0xfff7), which acts for all intents and purposes like a network address. Once a group is established, frames, sent using the APSDE-DATA.request primitive and having a DstAddrMode of 0x01, denoting group addressing, will be delivered to every endpoint assigned to the group address named in the DstAddr parameter of the outgoing APSDE-DATA.request primitive on every device in the network for which there are such endpoints. | +| 0005 | SCENES | The scenes cluster provides attributes and commands for setting up and recalling scenes. Each scene corresponds to a set of stored values of specified attributes for one or more clusters on the same end point as the scenes cluster. | +| 0006 | ON_OFF | Attributes and commands for switching devices between ‘On’ and ‘Off’ states. | +| 0007 | ON_OFF_SWITCH_CONFIGURATION | Attributes and commands for configuring On/Off switching devices | +| 0008 | LEVEL_CONTROL | This cluster provides an interface for controlling a characteristic of a device that can be set to a level, for example the brightness of a light, the degree of closure of a door, or the power output of a heater. | +| 0009 | ALARMS | Attributes and commands for sending alarm notifications and configuring alarm functionality. | +| 000A | TIME | This cluster provides a basic interface to a real-time clock. The clock time MAY be read and also written, in order to synchronize the clock (as close as practical) to a time standard. This time standard is the number of seconds since 0 hrs 0 mins 0 sec on 1st January 2000 UTC (Universal Coordinated Time). | +| 000B | RSSI_LOCATION | This cluster provides a means for exchanging Received Signal Strength Indication (RSSI) information among one hop devices as well as messages to report RSSI data to a centralized device that collects all the RSSI data in the network. | +| 000F | BINARY_INPUT_BASIC | The Binary Input (Basic) cluster provides an interface for reading the value of a binary measurement and accessing various characteristics of that measurement. The cluster is typically used to implement a sensor that measures a two-state physical quantity. | +| 0012 | MULTISTATE_INPUT_BASIC | The Multistate Input (Basic) cluster provides an interface for reading the value of a multistate measurement and accessing various characteristics of that measurement. The cluster is typically used to implement a sensor that measures a physical quantity that can take on one of a number of discrete states. | +| 0013 | MULTISTATE_OUTPUT_BASIC | The Multistate Output (Basic) cluster provides an interface for setting the value of an output that can take one of a number of discrete values, and accessing characteristics of that value. | +| 0014 | MULTISTATE_VALUE_BASIC | The Multistate Value (Basic) cluster provides an interface for setting a multistate value, typically used as a control system parameter, and accessing characteristics of that value. | +| 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. | +| 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. | +| 0202 | FAN_CONTROL | This cluster specifies an interface to control the speed of a fan as part of a heating / cooling system. | +| 0203 | DEHUMIDIFICATION_CONTROL | This cluster provides an interface to dehumidification functionality. | +| 0204 | THERMOSTAT_USER_INTERFACE_CONFIGURATION | This cluster provides an interface to allow configuration of the user interface for a thermostat, or a thermostat controller device, that supports a keypad and LCD screen. | +| 0300 | COLOR_CONTROL | This cluster provides an interface for changing the color of a light. Color is specified according to the Commission Internationale de l'Éclairage (CIE) specification CIE 1931 Color Space, [B4]. Color control is carried out in terms of x,y values, as defined by this specification. | +| 0400 | ILLUMINANCE_MEASUREMENT | The cluster provides an interface to illuminance measurement functionality, including configuration and provision of notifications of illuminance measurements. | +| 0401 | ILLUMINANCE_LEVEL_SENSING | The cluster provides an interface to illuminance level sensing functionality, including configuration and provision of notifications of whether the illuminance is within, above or below a target band. | +| 0402 | TEMPERATURE_MEASUREMENT | The server cluster provides an interface to temperature measurement functionality, including configuration and provision of notifications of temperature measurements. | +| 0403 | PRESSURE_MEASUREMENT | The cluster provides an interface to pressure measurement functionality, including configuration and provision of notifications of pressure measurements. | +| 0404 | FLOW_MEASUREMENT | The server cluster provides an interface to flow measurement functionality, including configuration and provision of notifications of flow measurements. | +| 0405 | RELATIVE_HUMIDITY_MEASUREMENT | The server cluster provides an interface to relative humidity measurement functionality, including configuration and provision of notifications of relative humidity measurements. | +| 0406 | OCCUPANCY_SENSING | The cluster provides an interface to occupancy sensing functionality, including configuration and provision of notifications of occupancy status. | +| 0500 | IAS_ZONE | The IAS Zone cluster defines an interface to the functionality of an IAS security zone device. IAS Zone supports up to two alarm types per zone, low battery reports and supervision of the IAS network. | +| 0501 | IAS_ACE | The IAS ACE cluster defines an interface to the functionality of any Ancillary Control Equipment of the IAS system. Using this cluster, a ZigBee enabled ACE device can access a IAS CIE device and manipulate the IAS system, on behalf of a level-2 user. | +| 0502 | IAS_WD | The IAS WD cluster provides an interface to the functionality of any Warning Device equipment of the IAS system. Using this cluster, a ZigBee enabled CIE device can access a ZigBee enabled IAS WD device and issue alarm warning indications (siren, strobe lighting, etc.) when a system alarm condition is detected. | +| 0700 | PRICE | The Price Cluster provides the mechanism for communicating Gas, Energy, or Water pricing information within the premises. This pricing information is distributed to the ESI from either the utilities or from regional energy providers. The ESI conveys the information (via the Price Cluster mechanisms) to other Smart Energy devices. | +| 0701 | DEMAND_RESPONSE_AND_LOAD_CONTROL | This cluster provides an interface to the functionality of Smart Energy Demand Response and Load Control. Devices targeted by this cluster include thermostats and devices that support load control. | +| 0702 | METERING | The Metering Cluster provides a mechanism to retrieve usage information from Electric, Gas, Water, and potentially Thermal metering devices. These devices can operate on either battery or mains power, and can have a wide variety of sophistication. The Metering Cluster is designed to provide flexibility while limiting capabilities to a set number of metered information types. More advanced forms or data sets from metering devices will be supported in the Smart Energy Tunneling Cluster | +| 0703 | MESSAGING | This cluster provides an interface for passing text messages between ZigBee devices. Messages are expected to be delivered via the ESI and then unicast to all individually registered devices implementing the Messaging Cluster on the ZigBee network, or just made available to all devices for later pickup. Nested and overlapping messages are not allowed. The current active message will be replaced if a new message is received by the ESI. | +| 0704 | SMART_ENERGY_TUNNELING | The tunneling cluster provides an interface for tunneling protocols. It is comprised of commands and attributes required to transport any existing metering communication protocol within the payload of standard ZigBee frames (including the handling of issues such as addressing, fragmentation and flow control). Examples for such protocols are DLMS/COSEM, IEC61107, ANSI C12, M-Bus, ClimateTalk etc. | +| 0705 | PREPAYMENT | The Prepayment Cluster provides the facility to pass messages relating to the accounting functionality of a meter between devices on the HAN. It allows for the implementation of a system conforming to the set of standards relating to Payment Electricity Meters (IEC 62055) and also for the case where the accounting function is remote from the meter. Prepayment is used in situations where the supply of a service may be interrupted or enabled under the control of the meter or system in relation to a payment tariff. The accounting process may be within the meter or elsewhere in the system. The amount of available credit is decremented as the service is consumed and is incremented through payments made by the consumer. Such a system allows the consumer to better manage their energy consumption and reduces the risk of bad debt owing to the supplier. | +| 0800 | KEY_ESTABLISHMENT | This cluster provides attributes and commands to perform mutual authentication and establish keys between two ZigBee devices. | +| 0B04 | ELECTRICAL_MEASUREMENT | This cluster provides a mechanism for querying data about the electrical properties as measured by the device. This cluster may be implemented on any device type and be implemented on a per-endpoint basis. For example, a power strip device could represent each outlet on a different endpoint and report electrical information for each individual outlet. The only caveat is that if you implement an attribute that has an associated multiplier and divisor, then you must implement the associated multiplier and divisor attributes. For example if you implement DCVoltage, you must also implement DCVoltageMultiplier and DCVoltageDivisor. | +| 0B05 | DIAGNOSTICS | The diagnostics cluster provides access to information regarding the operation of the ZigBee stack over time. This information is useful to installers and other network administrators who wish to know how a particular device is functioning on the network. | + # Packages The framework implements a package structure that allows efficient use of re-usable components in a number of different applications. diff --git a/com.zsmartsystems.zigbee.autocode/pom.xml b/com.zsmartsystems.zigbee.autocode/pom.xml index 48ff66b6b..885eaba8f 100644 --- a/com.zsmartsystems.zigbee.autocode/pom.xml +++ b/com.zsmartsystems.zigbee.autocode/pom.xml @@ -4,28 +4,22 @@ com.zsmartsystems.zigbee com.zsmartsystems.zigbee.autocode - jar + maven-plugin UTF-8 UTF-8 - true com.zsmartsystems zigbee 1.1.10-SNAPSHOT + .. - - org.apache.maven.plugins - maven-jar-plugin - 2.5 - - org.apache.maven.plugins maven-source-plugin @@ -38,11 +32,45 @@ - + + maven-plugin-plugin + 3.6.0 + + + default-descriptor + process-classes + + + + help-goal + + helpmojo + + + + + + org.apache.maven + maven-plugin-api + 3.0 + + + org.apache.maven + maven-core + 3.0 + + + org.apache.maven.plugin-tools + maven-plugin-annotations + 3.6.0 + true + provided + + commons-io @@ -55,8 +83,6 @@ commons-lang 2.6 - - diff --git a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/AutoCodeMojo.java b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/AutoCodeMojo.java new file mode 100644 index 000000000..e2995839a --- /dev/null +++ b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/AutoCodeMojo.java @@ -0,0 +1,122 @@ +package com.zsmartsystems.zigbee.autocode; + +import com.zsmartsystems.zigbee.autocode.xml.ZigBeeXmlCluster; +import com.zsmartsystems.zigbee.autocode.xml.ZigBeeXmlConstant; +import com.zsmartsystems.zigbee.autocode.xml.ZigBeeXmlGlobal; +import com.zsmartsystems.zigbee.autocode.xml.ZigBeeXmlParser; +import org.apache.maven.plugin.AbstractMojo; +import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.Execute; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; +import org.apache.maven.project.MavenProject; +import org.codehaus.plexus.util.IOUtil; + +import java.io.*; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.*; + +@Mojo(name="generate-zcl", defaultPhase = LifecyclePhase.GENERATE_SOURCES) +@Execute(phase = LifecyclePhase.GENERATE_SOURCES) +public class AutoCodeMojo extends AbstractMojo { + @Parameter(readonly = true, required = true) + private File zclInput; + + @Parameter(readonly = true, required = true) + private File zdoInput; + + @Parameter(readonly = true, required = true) + private File constantsInput; + + @Parameter(readonly = true, required = true, defaultValue = "${project.build.directory}/generated-sources/zcl-autocoder") + private String outputDirectory; + + @Parameter(readonly = true, required = true, defaultValue = "${project.parent.basedir}/src/etc/header.txt") + private File licenseHeaderTemplateFile; + + @Parameter(readonly = true, required = true, defaultValue = "${license.year}") + private String licenseYear; + + @Parameter(readonly = true, defaultValue = "${project}") + private MavenProject project; + + @Override + public void execute() throws MojoFailureException { + project.addCompileSourceRoot(outputDirectory); + + DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'"); + dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); + String generatedDate = dateFormat.format(new Date()); + String license; + try { + license = license(); + } catch (IOException e) { + throw new MojoFailureException("Could not read license", e); + } + + ZigBeeXmlParser zclParser = new ZigBeeXmlParser(); + for (File f: listContents(zclInput)) { + zclParser.addFile(f.getAbsolutePath()); + } + + List zclClusters = zclParser.parseClusterConfiguration(); + + ZigBeeXmlParser zdoParser = new ZigBeeXmlParser(); + for (File f: listContents(zdoInput)) { + zdoParser.addFile(f.getAbsolutePath()); + } + + List zdoClusters = zdoParser.parseClusterConfiguration(); + + // Process all enums, bitmaps and structures first so we have a consolidated list. + // We use this later when generating the imports in the cluster and command classes. + List allClusters = new ArrayList<>(); + allClusters.addAll(zclClusters); + allClusters.addAll(zdoClusters); + ZigBeeZclDependencyGenerator typeGenerator = new ZigBeeZclDependencyGenerator(outputDirectory, license, allClusters); + Map zclTypes = typeGenerator.getDependencyMap(); + Set dataTypes = typeGenerator.getZclTypeMap(); + + new ZigBeeZclClusterGenerator(outputDirectory, license, zclClusters, generatedDate, zclTypes); + new ZigBeeZclCommandGenerator(outputDirectory, license, zclClusters, generatedDate, zclTypes); + new ZigBeeZclConstantGenerator(outputDirectory, license, zclClusters, generatedDate, zclTypes); + new ZigBeeZclStructureGenerator(outputDirectory, license, zclClusters, generatedDate, zclTypes); + new ZigBeeZclClusterTypeGenerator(outputDirectory, license, zclClusters, generatedDate, zclTypes); + new ZigBeeZclCommandTypeGenerator(outputDirectory, license, zclClusters, generatedDate, zclTypes); + new ZigBeeZclDataTypeGenerator(outputDirectory, license, dataTypes, generatedDate); + + new ZigBeeZclCommandGenerator(outputDirectory, license, zdoClusters, generatedDate, zclTypes); + + zclParser = new ZigBeeXmlParser(); + for (File f: listContents(constantsInput)) { + zclParser.addFile(f.getAbsolutePath()); + } + ZigBeeXmlGlobal globals = zclParser.parseGlobalConfiguration(); + + for (ZigBeeXmlConstant constant : globals.constants) { + new ZigBeeZclConstantGenerator(outputDirectory, license, constant, generatedDate); + } + + // FIXME how to handle? + // new ZigBeeZclReadmeGenerator(outputDirectory, license, zclClusters); + } + + private Iterable listContents(File input) { + if (input.isFile()) { + return Collections.singleton(input); + } + if (input.isDirectory()) { + return Arrays.asList(input.listFiles()); + } + throw new IllegalArgumentException(); + } + + private String license() throws IOException { + try (InputStream input = new FileInputStream(licenseHeaderTemplateFile)) { + String license = IOUtil.toString(input); + return license.replace("\\$\\{year\\}", licenseYear); + } + } +} diff --git a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/CodeGeneratorUtil.java b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/CodeGeneratorUtil.java deleted file mode 100644 index 37a0be4cd..000000000 --- a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/CodeGeneratorUtil.java +++ /dev/null @@ -1,90 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.autocode; - -import java.io.BufferedReader; -import java.io.FileNotFoundException; -import java.io.FileReader; -import java.io.IOException; -import java.io.PrintWriter; - -import org.apache.commons.lang.StringUtils; -import org.apache.commons.lang.WordUtils; - -/** - * Created by tlaukkan on 4/10/2016. - */ -public class CodeGeneratorUtil { - public static String toHex(int profileId) { - return "0x" + Integer.toHexString(profileId); - } - - public static Integer fromHex(String headerIdString) { - return Integer.valueOf(StringUtils.substringAfter(headerIdString, "0x"), 16); - } - - public static String labelToEnumerationValue(String dataType) { - String val = dataType.toUpperCase().trim().replace(" ", "_").replace("-", "_").replace("/", "_") - .replace("(", "_").replace(")", "_"); - if (val.endsWith("_")) { - val = val.substring(0, val.length() - 1); - } - if ("0123456789".indexOf(val.charAt(0)) >= 0) { - // Swap the last word to the beginning - String partsInitial[] = val.split("_"); - StringBuilder sb = new StringBuilder(); - sb.append(partsInitial[partsInitial.length - 1]); - for (int c = 0; c < partsInitial.length - 1; c++) { - sb.append("_"); - sb.append(partsInitial[c]); - } - return sb.toString(); - } - return val; - } - - public static String labelToUpperCamelCase(String value) { - return WordUtils.capitalizeFully(splitCamelCase(value).replace("-", " ").replace("_", " ").replace("/", " ") - .replace("(", " ").replace(")", " "), new char[] { ' ' }).replaceAll(" ", ""); - } - - public static String upperCamelCaseToLowerCamelCase(String value) { - if (value.length() == 0) { - return ""; - } - - return value.substring(0, 1).toLowerCase() + value.substring(1); - } - - public static String splitCamelCase(String value) { - return value.replaceAll(String.format("%s|%s|%s", "(?<=[A-Z])(?=[A-Z][a-z])", "(?<=[^A-Z])(?=[A-Z])", - "(?<=[A-Za-z])(?=[^A-Za-z])"), " "); - } - - protected static void outputLicense(PrintWriter out) { - BufferedReader br; - try { - br = new BufferedReader(new FileReader("../src/etc/header.txt")); - String line = br.readLine(); - - out.println("/**"); - while (line != null) { - out.println(" * " + line.replaceFirst("\\$\\{year\\}", "2018")); - line = br.readLine(); - } - out.println(" */"); - br.close(); - } catch (FileNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } -} diff --git a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/zcl/ZclDataType.java b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZclDataType.java similarity index 92% rename from com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/zcl/ZclDataType.java rename to com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZclDataType.java index 05cb6db03..2f51aa9cf 100644 --- a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/zcl/ZclDataType.java +++ b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZclDataType.java @@ -5,7 +5,7 @@ * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html */ -package com.zsmartsystems.zigbee.autocode.zcl; +package com.zsmartsystems.zigbee.autocode; import java.util.HashMap; import java.util.Map; @@ -83,6 +83,7 @@ public static class DataTypeMap { dataTypeMapping.put("BOOLEAN", new DataTypeMap("Boolean", 0x10, 1, false, 0xff)); dataTypeMapping.put("SIGNED_8_BIT_INTEGER", new DataTypeMap("Integer", 0x28, 1, true, 0x80)); dataTypeMapping.put("SIGNED_16_BIT_INTEGER", new DataTypeMap("Integer", 0x29, 2, true, 0x8000)); + dataTypeMapping.put("SIGNED_24_BIT_INTEGER", new DataTypeMap("Integer", 0x2a, 3, true, 0x800000)); dataTypeMapping.put("SIGNED_32_BIT_INTEGER", new DataTypeMap("Integer", 0x2b, 4, true, 0x80000000)); dataTypeMapping.put("UNSIGNED_8_BIT_INTEGER", new DataTypeMap("Integer", 0x20, 1, true, 0xff)); dataTypeMapping.put("UNSIGNED_16_BIT_INTEGER", new DataTypeMap("Integer", 0x21, 2, true, 0xffff)); @@ -94,6 +95,10 @@ public static class DataTypeMap { dataTypeMapping.put("BITMAP_16_BIT", new DataTypeMap("Integer", 0x19, 2, false)); dataTypeMapping.put("BITMAP_24_BIT", new DataTypeMap("Integer", 0x1a, 3, false)); dataTypeMapping.put("BITMAP_32_BIT", new DataTypeMap("Integer", 0x1b, 4, false)); + dataTypeMapping.put("BITMAP_40_BIT", new DataTypeMap("Integer", 0x1c, 5, false)); + dataTypeMapping.put("BITMAP_48_BIT", new DataTypeMap("Integer", 0x1d, 6, false)); + dataTypeMapping.put("BITMAP_56_BIT", new DataTypeMap("Integer", 0x1e, 7, false)); + dataTypeMapping.put("BITMAP_64_BIT", new DataTypeMap("Integer", 0x1f, 8, false)); dataTypeMapping.put("ENUMERATION_16_BIT", new DataTypeMap("Integer", 0x31, 2, false, 0xffff)); dataTypeMapping.put("ENUMERATION_8_BIT", new DataTypeMap("Integer", 0x30, 1, false, 0xff)); dataTypeMapping.put("DATA_8_BIT", new DataTypeMap("Integer", 0x08, 1, false)); @@ -106,6 +111,7 @@ public static class DataTypeMap { dataTypeMapping.put("BINDING_TABLE", new DataTypeMap("BindingTable", 0, 0, false)); dataTypeMapping.put("N_X_BINDING_TABLE", new DataTypeMap("List", 0, 0, false)); dataTypeMapping.put("BYTE_ARRAY", new DataTypeMap("ByteArray", 0, 0, false)); + dataTypeMapping.put("RAW_OCTET", new DataTypeMap("ByteArray", 0, 0, false)); dataTypeMapping.put("IMAGE_UPGRADE_STATUS", new DataTypeMap("ImageUpgradeStatus", 0, 0, false)); }; diff --git a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZclProtocolCodeGenerator.java b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZclProtocolCodeGenerator.java deleted file mode 100644 index 16df91159..000000000 --- a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZclProtocolCodeGenerator.java +++ /dev/null @@ -1,2663 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.autocode; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.FileReader; -import java.io.IOException; -import java.io.PrintWriter; -import java.nio.file.Files; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Date; -import java.util.HashSet; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.TimeZone; -import java.util.TreeMap; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import org.apache.commons.io.FileUtils; - -import com.zsmartsystems.zigbee.autocode.zcl.Attribute; -import com.zsmartsystems.zigbee.autocode.zcl.Cluster; -import com.zsmartsystems.zigbee.autocode.zcl.Command; -import com.zsmartsystems.zigbee.autocode.zcl.Context; -import com.zsmartsystems.zigbee.autocode.zcl.DataType; -import com.zsmartsystems.zigbee.autocode.zcl.Field; -import com.zsmartsystems.zigbee.autocode.zcl.Profile; -import com.zsmartsystems.zigbee.autocode.zcl.ZclDataType; -import com.zsmartsystems.zigbee.autocode.zcl.ZclDataType.DataTypeMap; - -/** - * Code generator for generating ZigBee cluster library command protocol. - * - * @author Tommi S.E. Laukkanen - * @author Chris Jackson - */ -public class ZclProtocolCodeGenerator { - // The following are offsets to the root package - static String packageZcl = ".zcl"; - static String packageZclField = packageZcl + ".field"; - static String packageZclCluster = packageZcl + ".clusters"; - static String packageZclProtocol = packageZcl + ".protocol"; - static String packageZclProtocolCommand = packageZclCluster; - static String packageTransactionPrefix = ".transaction"; - - static String packageZdp = ".zdo"; - static String packageZdpField = packageZdp + ".field"; - static String packageZdpCommand = packageZdp + ".command"; - static String packageZdpTransaction = packageZdp + ".transaction"; - static String packageZdpDescriptors = packageZdpField; - - private static int lineLen = 120; - - private static String generatedDate; - - private static boolean fileCompare(String file1, String file2) throws IOException { - File f = new File(file1); - if (!f.exists()) { - return false; - } - f = new File(file2); - if (!f.exists()) { - return false; - } - - BufferedReader reader1 = new BufferedReader(new FileReader(file1)); - BufferedReader reader2 = new BufferedReader(new FileReader(file2)); - - String line1 = reader1.readLine(); - String line2 = reader2.readLine(); - - boolean areEqual = true; - - int lineNum = 1; - - while (line1 != null || line2 != null) { - if (line1 == null || line2 == null) { - areEqual = false; - - break; - } else if (!line1.startsWith("@Generated") && !line1.equalsIgnoreCase(line2)) { - areEqual = false; - - break; - } - - line1 = reader1.readLine(); - line2 = reader2.readLine(); - - lineNum++; - } - - if (areEqual) { - System.out.println("Two files have same content."); - } else { - System.out.println("Two files have different content. They differ at line " + lineNum); - System.out.println("File1 has " + line1 + " and File2 has " + line2 + " at line " + lineNum); - } - - reader1.close(); - reader2.close(); - - return areEqual; - } - - private static void copyFile(String source, String dest) throws IOException { - File target = new File(dest); - - File parent = target.getParentFile(); - if (!parent.exists() && !parent.mkdirs()) { - throw new IllegalStateException("Couldn't create dir: " + parent); - } - - if (target.exists()) { - Files.delete(new File(dest).toPath()); - } - - Files.copy(new File(source).toPath(), new File(dest).toPath()); - } - - private static void compareFiles(String inFolder, String outFolder, String folder) { - File[] files = new File(inFolder + folder).listFiles(); - for (File file : files) { - if (file.isDirectory()) { - compareFiles(inFolder, outFolder, folder + "/" + file.getName()); - } else { - System.out.println("File: " + folder + "/" + file.getName()); - try { - if (!fileCompare(inFolder + folder + "/" + file.getName(), - outFolder + folder + "/" + file.getName())) { - copyFile(inFolder + folder + "/" + file.getName(), outFolder + folder + "/" + file.getName()); - System.out.println("File: " + folder + "/" + file.getName() + " updated"); - } - } catch (IOException e) { - e.printStackTrace(); - } - } - } - } - - /** - * The main method for running the code generator. - * - * @param args - * the command line arguments - */ - public static void main(final String[] args) { - DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'"); - dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); - generatedDate = dateFormat.format(new Date()); - - final String definitionFilePathZcl = "./src/main/resources/zcl_definition.md"; - final String definitionFilePathZll = "./src/main/resources/zll_definition.md"; - final String definitionFilePathZdp = "./src/main/resources/zdp_definition.md"; - final String definitionFilePathOta = "./src/main/resources/ota_definition.md"; - final String definitionFilePathZse = "./src/main/resources/zse_definition.md"; - final String definitionFilePathMan = "./src/main/resources/manufacturer_definition.md"; - - final String sourceRootPath; - // if (args.length != 0) { - // sourceRootPath = args[0]; - // } else { - // sourceRootPath = "../com.zsmartsystems.zigbee/src/main/java/"; - // } - String outRootPath = "../com.zsmartsystems.zigbee/src/main/java/"; - - sourceRootPath = "target/src/main/java/"; - final File packageFolder = new File(sourceRootPath); - if (!packageFolder.exists()) { - packageFolder.mkdirs(); - } - - final File sourceRootFile = new File(sourceRootPath); - if (!sourceRootFile.exists()) { - System.out.println("Source root path does not exist: " + sourceRootFile); - return; - } - if (!sourceRootFile.isDirectory()) { - System.out.println("Source root path is not directory: " + sourceRootFile); - return; - } - - final String packageRoot; - if (args.length != 0) { - packageRoot = args[0]; - } else { - packageRoot = "com.zsmartsystems.zigbee"; - } - - final Context contextZcl = new Context(); - final File definitionFileZcl = new File(definitionFilePathZcl); - final File definitionFileZse = new File(definitionFilePathZse); - final File definitionFileOta = new File(definitionFilePathOta); - final File definitionFileZll = new File(definitionFilePathZll); - final File definitionFileMan = new File(definitionFilePathMan); - if (!(definitionFileZcl.exists() && definitionFileOta.exists() && definitionFileZll.exists())) { - System.out.println("Definition file does not exist: " + definitionFilePathZcl); - } else { - try { - contextZcl.lines = new ArrayList(FileUtils.readLines(definitionFileZcl, "UTF-8")); - contextZcl.lines.addAll(new ArrayList(FileUtils.readLines(definitionFileOta, "UTF-8"))); - contextZcl.lines.addAll(new ArrayList(FileUtils.readLines(definitionFileZll, "UTF-8"))); - contextZcl.lines.addAll(new ArrayList(FileUtils.readLines(definitionFileZse, "UTF-8"))); - contextZcl.lines.addAll(new ArrayList(FileUtils.readLines(definitionFileMan, "UTF-8"))); - generateZclCode(contextZcl, sourceRootFile, packageRoot); - } catch (final IOException e) { - System.out.println( - "Reading lines from Zcl definition file failed: " + definitionFileZcl.getAbsolutePath()); - e.printStackTrace(); - } - } - - final Context contextZdp = new Context(); - final File definitionFileZdp = new File(definitionFilePathZdp); - if (!definitionFileZdp.exists()) { - System.out.println("Definition file does not exist: " + definitionFilePathZdp); - } else { - try { - contextZdp.lines = new ArrayList(FileUtils.readLines(definitionFileZdp, "UTF-8")); - generateZdpCode(contextZdp, sourceRootFile, packageRoot); - } catch (final IOException e) { - System.out.println( - "Reading lines from Zdp definition file failed: " + definitionFileZdp.getAbsolutePath()); - e.printStackTrace(); - return; - } - } - - final String packagePath = getPackagePath(sourceRootFile, packageRoot); - final File packageFile = getPackageFile(packagePath); - - try { - final LinkedList dataTypes = new LinkedList(contextZcl.dataTypes.values()); - - // Add any types that are not defined in the autogenerated code - final DataType dataType = new DataType(); - dataType.dataTypeName = "EXTENDED_PANID"; - dataType.dataTypeType = "EXTENDED_PANID"; - - dataType.dataTypeClass = ZclDataType.getDataTypeMapping().get("EXTENDED_PANID").dataClass; - dataTypes.add(dataType); - - boolean addIt; - for (DataType newType : contextZdp.dataTypes.values()) { - addIt = true; - for (DataType checkType : dataTypes) { - if (checkType.dataTypeType.equals(newType.dataTypeType)) { - addIt = false; - } - } - if (addIt) { - dataTypes.add(newType); - } - } - - generateZclDataTypeEnumeration(dataTypes, packageRoot, packageFile); - - String inRootPath = sourceRootPath.substring(0, sourceRootPath.length() - 1); - compareFiles(inRootPath, outRootPath, ""); - } catch (final IOException e) { - System.out.println("Failed to generate data types enumeration."); - e.printStackTrace(); - return; - } - } - - public static void generateZclCode(final Context context, final File sourceRootPath, final String packageRoot) { - ZclProtocolDefinitionParser.parseProfiles(context); - - final String packagePath = getPackagePath(sourceRootPath, packageRoot); - final File packageFile = getPackageFile(packagePath); - - try { - final LinkedList dataTypes = new LinkedList(context.dataTypes.values()); - dataTypes.addAll(context.dataTypes.values()); - - generateZclDataTypeEnumeration(dataTypes, packageRoot, packageFile); - } catch (final IOException e) { - System.out.println("Failed to generate data types enumeration."); - e.printStackTrace(); - return; - } - - try { - generateZclProfileTypeEnumeration(context, packageRoot, packageFile); - } catch (final IOException e) { - System.out.println("Failed to generate profile enumeration."); - e.printStackTrace(); - return; - } - - try { - generateZclClusterTypeEnumeration(context, packageRoot, packageFile); - } catch (final IOException e) { - System.out.println("Failed to generate cluster enumeration."); - e.printStackTrace(); - return; - } - - try { - // generateZclCommandTypeEnumerationXXXXX(context, packageRoot, packageFile); - generateZclCommandTypeEnumeration(context, packageRoot, packageFile); - } catch (final IOException e) { - System.out.println("Failed to generate command enumeration."); - e.printStackTrace(); - return; - } - - try { - generateAttributeEnumeration(context, packageRoot, sourceRootPath); - } catch (final IOException e) { - System.out.println("Failed to generate attribute enum classes."); - e.printStackTrace(); - return; - } - - try { - generateFieldEnumeration(context, packageRoot, sourceRootPath); - } catch (final IOException e) { - System.out.println("Failed to generate field enum classes."); - e.printStackTrace(); - return; - } - - try { - generateZclCommandClasses(context, packageRoot, sourceRootPath); - } catch (final IOException e) { - System.out.println("Failed to generate profile message classes."); - e.printStackTrace(); - return; - } - - try { - generateZclClusterClasses(context, packageRoot, sourceRootPath); - } catch (final IOException e) { - System.out.println("Failed to generate cluster classes."); - e.printStackTrace(); - return; - } - } - - public static void generateZdpCode(final Context context, final File sourceRootPath, final String packageRoot) { - ZclProtocolDefinitionParser.parseProfiles(context); - - try { - generateZdpCommandClasses(context, packageRoot, sourceRootPath); - } catch (final IOException e) { - System.out.println("Failed to generate profile message classes."); - e.printStackTrace(); - return; - } - - try { - generateZdoCommandTypeEnumeration(context, packageRoot, sourceRootPath); - } catch (final IOException e) { - System.out.println("Failed to generate command enumeration."); - e.printStackTrace(); - return; - } - - } - - private static void outputClassJavaDoc(final PrintWriter out, String description) { - out.println("/**"); - out.println(" * " + description); - out.println(" *

"); - out.println(" * Code is auto-generated. Modifications may be overwritten!"); - out.println(" *"); - out.println(" * @author Chris Jackson"); - out.println(" */"); - } - - private static File getPackageFile(String packagePath) { - final File packageFile = new File(packagePath); - if (!packageFile.exists()) { - packageFile.mkdirs(); - } - return packageFile; - } - - private static String getPackagePath(File sourceRootPath, String packageRoot) { - return sourceRootPath.getAbsolutePath() + File.separator + packageRoot.replace(".", File.separator); - } - - private static void generateZclDataTypeEnumeration(LinkedList dataTypes, final String packageRootPrefix, - File sourceRootPath) throws IOException { - final String className = "ZclDataType"; - - final String packageRoot = packageRootPrefix + packageZclProtocol; - final String packagePath = getPackagePath(sourceRootPath, packageZclProtocol); - final File packageFile = getPackageFile(packagePath); - - final PrintWriter out = getClassOut(packageFile, className); - CodeGeneratorUtil.outputLicense(out); - - out.println("package " + packageRoot + ";"); - - out.println(); - out.println("import java.util.Calendar;"); - out.println("import java.util.HashMap;"); - out.println("import java.util.Map;"); - out.println(); - out.println("import javax.annotation.Generated;"); - out.println("import " + packageRootPrefix + packageZclField + ".*;"); - out.println("import " + packageRootPrefix + packageZcl + ".ZclStatus;"); - out.println("import " + packageRootPrefix + packageZdp + ".ZdoStatus;"); - out.println("import " + packageRootPrefix + packageZdpDescriptors + ".*;"); - out.println("import " + packageRootPrefix + "." + "IeeeAddress" + ";"); - out.println("import " + packageRootPrefix + "." + "ExtendedPanId" + ";"); - out.println(); - outputClassJavaDoc(out, "Enumeration of the ZCL data types"); - outputClassGenerated(out); - out.println("public enum " + className + " {"); - - DataType newDataType = new DataType(); - - newDataType = new DataType(); - newDataType.dataTypeName = "Unsigned 8 bit Integer Array"; - newDataType.dataTypeType = "UNSIGNED_8_BIT_INTEGER_ARRAY"; - newDataType.dataTypeClass = ZclDataType.getDataTypeMapping().get("UNSIGNED_8_BIT_INTEGER_ARRAY").dataClass; - dataTypes.add(newDataType); - - newDataType = new DataType(); - newDataType.dataTypeName = "ZigBee Data Type"; - newDataType.dataTypeType = "ZIGBEE_DATA_TYPE"; - newDataType.dataTypeClass = ZclDataType.getDataTypeMapping().get("ZIGBEE_DATA_TYPE").dataClass; - dataTypes.add(newDataType); - - // final LinkedList dataTypes = new LinkedList(context.dataTypes.values()); - for (final DataType dataType : dataTypes) { - DataTypeMap zclDataType = ZclDataType.getDataTypeMapping().get(dataType.dataTypeType); - final String dataTypeClass; - if (dataType.dataTypeClass.contains("<")) { - dataTypeClass = dataType.dataTypeClass.substring(dataType.dataTypeClass.indexOf("<") + 1, - dataType.dataTypeClass.indexOf(">")); - } else { - dataTypeClass = dataType.dataTypeClass; - } - out.print(" " + dataType.dataTypeType + "(\"" + dataType.dataTypeName + "\", " + dataTypeClass + ".class" - + ", " + String.format("0x%02X", zclDataType.id) + ", " + zclDataType.analogue + ")"); - out.println(dataTypes.getLast().equals(dataType) ? ';' : ','); - } - - out.println(); - out.println(" private final String label;"); - out.println(" private final Class dataClass;"); - out.println(" private final int id;"); - out.println(" private final boolean analogue;"); - out.println(" private static Map codeTypeMapping;"); - out.println(); - - out.println(" static {"); - out.println(" codeTypeMapping = new HashMap();"); - out.println(" for (" + className + " s : values()) {"); - out.println(" codeTypeMapping.put(s.id, s);"); - out.println(" }"); - out.println(" }"); - out.println(); - out.println(" " + className - + "(final String label, final Class dataClass, final int id, final boolean analogue) {"); - out.println(" this.label = label;"); - out.println(" this.dataClass = dataClass;"); - out.println(" this.id = id;"); - out.println(" this.analogue = analogue;"); - out.println(" }"); - out.println(); - - out.println(" public static " + className + " getType(int id) {"); - out.println(" return codeTypeMapping.get(id);"); - out.println(" }"); - - out.println(); - out.println(" public String getLabel() {"); - out.println(" return label;"); - out.println(" }"); - out.println(); - out.println(" public Class getDataClass() {"); - out.println(" return dataClass;"); - out.println(" }"); - out.println(); - out.println(" public int getId() {"); - out.println(" return id;"); - out.println(" }"); - out.println(); - out.println(" public boolean isAnalog() {"); - out.println(" return analogue;"); - out.println(" }"); - out.println("}"); - - out.flush(); - out.close(); - } - - private static void outputClassGenerated(PrintWriter out) { - out.println("@Generated(value = \"" + ZclProtocolCodeGenerator.class.getName() + "\", date = \"" + generatedDate - + "\")"); - } - - private static void generateZclProfileTypeEnumeration(Context context, String packageRootPrefix, - File sourceRootPath) throws IOException { - final String className = "ZigBeeProfileType"; - - final String packageRoot = packageRootPrefix; - final String packagePath = getPackagePath(sourceRootPath, ""); - final File packageFile = getPackageFile(packagePath); - - final PrintWriter out = getClassOut(packageFile, className); - - CodeGeneratorUtil.outputLicense(out); - - out.println("package " + packageRoot + ";"); - out.println(); - out.println("import java.util.Map;"); - out.println("import java.util.HashMap;"); - out.println(); - out.println("import javax.annotation.Generated;"); - - out.println(); - outputClassJavaDoc(out, "Enumeration of ZigBee profile types"); - outputClassGenerated(out); - out.println("public enum " + className + " {"); - - out.println(" UNKNOWN(-1, \"Unknown Profile\"),"); - final LinkedList profiles = new LinkedList(context.profiles.values()); - for (final Profile profile : profiles) { - out.print(" " + profile.profileType + "(" + String.format("0x%04X", profile.profileId) + ", \"" - + profile.profileName + "\")"); - out.println(profiles.getLast().equals(profile) ? ';' : ','); - } - - out.println(); - out.println(" /*"); - out.println(" * The ZigBee profile ID"); - out.println(" */"); - out.println(" private final int profileId;"); - out.println(); - out.println(" /*"); - out.println(" * The ZigBee profile label"); - out.println(" */"); - out.println(" private final String label;"); - out.println(); - out.println(" /**"); - out.println(" * Map containing the link of profile type value to the enum"); - out.println(" */"); - out.println(" private static Map map = null;"); - out.println(); - - out.println(" static {"); - out.println(" map = new HashMap();"); - out.println(" for (" + className + " profileType : values()) {"); - out.println(" map.put(profileType.profileId, profileType);"); - out.println(" }"); - out.println(" }"); - out.println(); - - out.println(" " + className + "(final int profileId, final String label) {"); - out.println(" this.profileId = profileId;"); - out.println(" this.label = label;"); - out.println(" }"); - out.println(); - out.println(" /*"); - out.println(" * Get the ZigBee profile ID"); - out.println(" *"); - out.println(" * @ return the profile ID"); - out.println(" */"); - out.println(" public int getId() {"); - out.println(" return profileId;"); - out.println(" }"); - out.println(); - out.println(" /*"); - out.println(" * Get the ZigBee profile label"); - out.println(" *"); - out.println(" * @ return the profile label"); - out.println(" */"); - out.println(" public String getLabel() {"); - out.println(" return label;"); - out.println(" }"); - out.println(); - - out.println(" /**"); - out.println(" * Get a {@link " + className + "} from an integer"); - out.println(" *"); - out.println(" * @param profileTypeValue integer value defining the profile type"); - out.println(" * @return {@link " + className + "} or {@link #UNKNOWN} if the value could not be converted"); - out.println(" */"); - out.println(" public static " + className + " getProfileType(int profileTypeValue) {"); - out.println(" if (map.get(profileTypeValue) == null) {"); - out.println(" return UNKNOWN;"); - out.println(" }"); - out.println(" return map.get(profileTypeValue);"); - out.println(" }"); - - out.println("}"); - - out.flush(); - out.close(); - } - - private static void generateZclClusterTypeEnumeration(Context context, String packageRootPrefix, - File sourceRootPath) throws IOException { - final String className = "ZclClusterType"; - - final String packageRoot = packageRootPrefix + packageZclProtocol; - final String packagePath = getPackagePath(sourceRootPath, packageZclProtocol); - final File packageFile = getPackageFile(packagePath); - - final PrintWriter out = getClassOut(packageFile, className); - - CodeGeneratorUtil.outputLicense(out); - - out.println("package " + packageRoot + ";"); - out.println(); - out.println("import " + packageRootPrefix + ".ZigBeeProfileType;"); - out.println("import " + packageRootPrefix + packageZcl + ".ZclCluster;"); - out.println("import " + packageRootPrefix + packageZclCluster + ".*;"); - out.println(); - out.println("import java.util.HashMap;"); - out.println("import java.util.Map;"); - out.println(); - out.println("import javax.annotation.Generated;"); - - out.println(); - outputClassJavaDoc(out, "Enumeration of ZigBee Clusters"); - outputClassGenerated(out); - out.println("public enum " + className + " {"); - - boolean first = true; - final LinkedList profiles = new LinkedList(context.profiles.values()); - for (final Profile profile : profiles) { - final LinkedList clusters = new LinkedList(profile.clusters.values()); - for (final Cluster cluster : clusters) { - if (first == false) { - out.println(","); - } - first = false; - out.print(" " + cluster.clusterType + "(" + String.format("0x%04X", cluster.clusterId) - + ", ZigBeeProfileType." + profile.profileType + ", Zcl" + cluster.nameUpperCamelCase - + "Cluster.class, \"" + cluster.clusterName + "\")"); - } - } - out.println(";"); - - out.println(); - out.println( - " private static final Map idValueMap = new HashMap();"); - out.println(); - out.println(" private final int clusterId;"); - out.println(" private final ZigBeeProfileType profileType;"); - out.println(" private final String label;"); - out.println(" private final Class clusterClass;"); - out.println(); - out.println(" " + className - + "(final int clusterId, final ZigBeeProfileType profileType, final ClassclusterClass, final String label) {"); - out.println(" this.clusterId = clusterId;"); - out.println(" this.profileType = profileType;"); - out.println(" this.clusterClass = clusterClass;"); - out.println(" this.label = label;"); - out.println(" }"); - out.println(); - out.println(" static {"); - out.println(" for (final ZclClusterType value : values()) {"); - out.println(" idValueMap.put(value.clusterId, value);"); - out.println(" }"); - out.println(" }"); - out.println(); - out.println(" public int getId() {"); - out.println(" return clusterId;"); - out.println(" }"); - out.println(); - out.println(" public ZigBeeProfileType getProfileType() {"); - out.println(" return profileType;"); - out.println(" }"); - out.println(); - out.println(" public String getLabel() {"); - out.println(" return label;"); - out.println(" }"); - out.println(); - // out.println(" public String toString() {"); - // out.println(" return label;"); - // out.println(" }"); - // out.println(); - out.println(" public Class getClusterClass() {"); - out.println(" return clusterClass;"); - out.println(" }"); - out.println(); - out.println(" public static ZclClusterType getValueById(final int clusterId) {"); - out.println(" return idValueMap.get(clusterId);"); - out.println(" }"); - out.println(); - out.println("}"); - - out.flush(); - out.close(); - } - - private static void generateZclCommandTypeEnumerationXXXXX(Context context, String packageRootPrefix, - File sourceRootPath) throws IOException { - - final String className = "ZclCommandTypeXXX"; - - final String packageRoot = packageRootPrefix + packageZclProtocol; - final String packagePath = getPackagePath(sourceRootPath, packageZclProtocol); - final File packageFile = getPackageFile(packagePath); - - final PrintWriter out = getClassOut(packageFile, className); - - out.println("package " + packageRoot + ";"); - out.println(); - outputClassJavaDoc(out, "Enumeration of ZCL commands"); - outputClassGenerated(out); - out.println("public enum " + className + " {"); - - final LinkedList valueRows = new LinkedList(); - final LinkedList profiles = new LinkedList(context.profiles.values()); - for (final Profile profile : profiles) { - final LinkedList clusters = new LinkedList(profile.clusters.values()); - for (final Cluster cluster : clusters) { - { - final LinkedList commands = new LinkedList(cluster.received.values()); - for (final Command command : commands) { - final boolean generic = cluster.clusterId == 65535; - valueRows.add(" " + command.commandType + "(" + command.commandId + ", ZclClusterType." - + cluster.clusterType + ", \"" + command.commandLabel + "\", true, " + generic + ")"); - } - } - { - final LinkedList commands = new LinkedList(cluster.generated.values()); - for (final Command command : commands) { - final boolean generic = cluster.clusterId == 65535; - valueRows.add(" " + command.commandType + "(" + command.commandId + ", ZclClusterType." - + cluster.clusterType + ", \"" + command.commandLabel + "\", false, " + generic + ")"); - } - } - } - } - - for (final String valueRow : valueRows) { - out.print(valueRow); - out.println(valueRows.getLast().equals(valueRow) ? ';' : ','); - } - - out.println(); - out.println(" private final int id;"); - out.println(" private final ZclClusterType clusterType;"); - out.println(" private final String label;"); - out.println(" private final boolean received;"); - out.println(" private final boolean generic;"); - out.println(); - out.println(" " + className - + "(final int id, final ZclClusterType clusterType, final String label, final boolean received, final boolean generic) {"); - out.println(" this.id = id;"); - out.println(" this.clusterType = clusterType;"); - out.println(" this.label = label;"); - out.println(" this.received = received;"); - out.println(" this.generic = generic;"); - out.println(" }"); - out.println(); - out.println(" public int getId() { return id; }"); - out.println(" public ZclClusterType getClusterType() { return clusterType; }"); - out.println(" public String getLabel() { return label; }"); - out.println(" public boolean isReceived() { return received; }"); - out.println(" public boolean isGeneric() { return generic; }"); - out.println(" public String toString() { return label; }"); - out.println("}"); - - out.flush(); - out.close(); - } - - private static void generateZclAttributeTypeEnumeration(Context context, String packageRootPrefix, - File sourceRootPath) throws IOException { - - final String className = "ZclAttributeType"; - - final String packageRoot = packageRootPrefix + packageZclProtocol; - final String packagePath = getPackagePath(sourceRootPath, packageZclProtocol); - final File packageFile = getPackageFile(packagePath); - - final PrintWriter out = getClassOut(packageFile, className); - - CodeGeneratorUtil.outputLicense(out); - - out.println("package " + packageRoot + ";"); - out.println(); - outputClassJavaDoc(out, "Enumeration of ZigBee attributes"); - outputClassGenerated(out); - out.println("public enum " + className + " {"); - - boolean first = true; - final LinkedList profiles = new LinkedList(context.profiles.values()); - for (final Profile profile : profiles) { - final LinkedList clusters = new LinkedList(profile.clusters.values()); - - for (final Cluster cluster : clusters) { - for (final Attribute attribute : cluster.attributes.values()) { - if (first == false) { - out.println(","); - } - first = false; - out.print(" " + attribute.enumName + "(0x" + String.format("%04X", cluster.clusterId) + ", 0x" - + String.format("%04X", attribute.attributeId) + ", ZclDataType." + attribute.dataType - + ")"); - } - } - } - out.println(";"); - - out.println(); - out.println(" private final int clusterId;"); - out.println(" private final int attributeId;"); - out.println(" private final ZclAttributeType attributeType;"); - out.println(" private final String label;"); - out.println(" private final boolean received;"); - out.println(" private final boolean generic;"); - out.println(); - out.println(" " + className + "(final int clusterId, final int attributeId, final ZclDataType dataType) {"); - out.println(" this.id = id;"); - out.println(" this.attributeType = attributeType;"); - out.println(" this.label = label;"); - out.println(" this.received = received;"); - out.println(" this.generic = generic;"); - out.println(" }"); - out.println(); - out.println(" public int getId() { return id; }"); - out.println(" public ZclAttributeType getAttributeType() { return attributeType; }"); - out.println(" public String getLabel() { return label; }"); - out.println(" public boolean isReceived() { return received; }"); - out.println(" public boolean isGeneric() { return generic; }"); - out.println(" public String toString() { return label; }"); - out.println("}"); - - out.flush(); - out.close(); - } - - private static void generateZclFieldTypeEnumeration(Context context, String packageRootPrefix, File sourceRootPath) - throws IOException { - final String className = "ZclFieldType"; - - final String packageRoot = packageRootPrefix + packageZclProtocol; - final String packagePath = getPackagePath(sourceRootPath, packageZclProtocol); - final File packageFile = getPackageFile(packagePath); - - final PrintWriter out = getClassOut(packageFile, className); - - CodeGeneratorUtil.outputLicense(out); - - out.println("package " + packageRoot + ";"); - out.println(); - outputClassJavaDoc(out, "Enumeration of ZCL fields"); - outputClassGenerated(out); - out.println("public enum " + className + " {"); - - final LinkedList valueRows = new LinkedList(); - final LinkedList profiles = new LinkedList(context.profiles.values()); - for (final Profile profile : profiles) { - final LinkedList clusters = new LinkedList(profile.clusters.values()); - for (final Cluster cluster : clusters) { - final ArrayList commands = new ArrayList(); - commands.addAll(cluster.received.values()); - commands.addAll(cluster.generated.values()); - for (final Command command : commands) { - final LinkedList fields = new LinkedList(command.fields.values()); - for (final Field field : fields) { - valueRows.add(" " + field.fieldType + "(" + field.fieldId + ", ZclCommandType." - + command.commandType + ", \"" + field.fieldLabel + "\", ZclDataType." + field.dataType - + ")"); - } - } - } - } - - for (final String valueRow : valueRows) { - out.print(valueRow); - out.println(valueRows.getLast().equals(valueRow) ? ';' : ','); - } - - out.println(); - out.println(" private final int id;"); - out.println(" private final ZclCommandType commandType;"); - out.println(" private final String label;"); - out.println(" private final ZclDataType dataType;"); - out.println(); - out.println(" " + className - + "(final int id, final ZclCommandType commandType, final String label, final ZclDataType dataType) {"); - out.println(" this.id = id;"); - out.println(" this.commandType = commandType;"); - out.println(" this.label = label;"); - out.println(" this.dataType = dataType;"); - out.println(" }"); - out.println(); - out.println(" public int getId() { return id; }"); - out.println(" public ZclCommandType getCommandType() { return commandType; }"); - out.println(" public String getLabel() { return label; }"); - out.println(" public ZclDataType getDataType() { return dataType; }"); - out.println(); - out.println("}"); - - out.flush(); - out.close(); - } - - private static void generateZclCommandClasses(Context context, String packageRootPrefix, File sourceRootPath) - throws IOException { - - final LinkedList profiles = new LinkedList(context.profiles.values()); - for (final Profile profile : profiles) { - final LinkedList clusters = new LinkedList(profile.clusters.values()); - for (final Cluster cluster : clusters) { - final ArrayList commands = new ArrayList(); - commands.addAll(cluster.received.values()); - commands.addAll(cluster.generated.values()); - for (final Command command : commands) { - final String packageRoot = packageRootPrefix + packageZclProtocolCommand + "." - + cluster.clusterType.replace("_", "").toLowerCase(); - final String packagePath = getPackagePath(sourceRootPath, packageRoot); - final File packageFile = getPackageFile(packagePath); - - final String className = command.nameUpperCamelCase; - final PrintWriter out = getClassOut(packageFile, className); - - final LinkedList fields = new LinkedList(command.fields.values()); - boolean fieldWithDataTypeList = false; - for (final Field field : fields) { - if (field.dataTypeClass.startsWith("List")) { - fieldWithDataTypeList = true; - break; - } - } - CodeGeneratorUtil.outputLicense(out); - - out.println("package " + packageRoot + ";"); - out.println(); - out.println("import javax.annotation.Generated;"); - out.println(); - - // out.println("import " + packageRootPrefix + packageZcl + ".ZclCommandMessage;"); - out.println("import " + packageRootPrefix + packageZcl + ".ZclCommand;"); - // out.println("import " + packageRootPrefix + packageZcl + ".ZclField;"); - if (fields.size() > 0) { - out.println("import " + packageRootPrefix + packageZcl + ".ZclFieldSerializer;"); - out.println("import " + packageRootPrefix + packageZcl + ".ZclFieldDeserializer;"); - out.println("import " + packageRootPrefix + packageZclProtocol + ".ZclDataType;"); - } - out.println("import " + packageRootPrefix + packageZclProtocol + ".ZclCommandDirection;"); - // out.println("import " + packageRootPrefix + packageZclProtocol + ".ZclClusterType;"); - // out.println("import " + packageRootPrefix + packageZclProtocol + ".ZclCommandType;"); - // if (!fields.isEmpty()) { - // out.println("import " + packageRootPrefix + packageZclProtocol + ".ZclFieldType;"); - // if (fieldWithDataTypeList) { - // out.println("import " + packageRootPrefix + packageZclField + ".*;"); - // } - // } - - if (fieldWithDataTypeList) { - out.println(); - out.println("import java.util.List;"); - } - - // out.println("import java.util.Map;"); - // out.println("import java.util.HashMap;"); - - for (final Field field : fields) { - String packageName; - if (field.dataTypeClass.contains("Descriptor")) { - packageName = packageZdpDescriptors; - } else { - packageName = packageZclField; - } - - String typeName; - if (field.dataTypeClass.startsWith("List")) { - typeName = field.dataTypeClass; - typeName = typeName.substring(typeName.indexOf("<") + 1); - typeName = typeName.substring(0, typeName.indexOf(">")); - } else { - typeName = field.dataTypeClass; - } - - switch (typeName) { - case "Integer": - case "Boolean": - case "Object": - case "Long": - case "String": - case "int[]": - continue; - case "IeeeAddress": - out.println("import " + packageRootPrefix + "." + typeName + ";"); - continue; - case "ZclStatus": - out.println("import " + packageRootPrefix + packageZcl + ".ZclStatus;"); - continue; - case "ImageUpgradeStatus": - out.println("import " + packageRootPrefix + packageZclField + ".ImageUpgradeStatus;"); - continue; - } - - out.println("import " + packageRootPrefix + packageName + "." + typeName + ";"); - } - - out.println(); - out.println("/**"); - out.println(" * " + command.commandLabel + " value object class."); - - out.println(" *

"); - out.println(" * Cluster: " + cluster.clusterName + ". Command is sent " - + (cluster.received.containsValue(command) ? "TO" : "FROM") + " the server."); - out.println(" * This command is " + ((cluster.clusterType.equals("GENERAL")) - ? "a generic command used across the profile." - : "a specific command used for the " + cluster.clusterName + " cluster.")); - - if (command.commandDescription.size() > 0) { - out.println(" *

"); - outputWithLinebreak(out, "", command.commandDescription); - } - - out.println(" *

"); - out.println(" * Code is auto-generated. Modifications may be overwritten!"); - - out.println(" */"); - outputClassGenerated(out); - out.println("public class " + className + " extends ZclCommand {"); - - for (final Field field : fields) { - out.println(" /**"); - out.println(" * " + field.fieldLabel + " command message field."); - if (field.description.size() != 0) { - out.println(" *

"); - outputWithLinebreak(out, " ", field.description); - } - out.println(" */"); - out.println(" private " + field.dataTypeClass + " " + field.nameLowerCamelCase + ";"); - out.println(); - } - - // if (fields.size() > 0) { - // out.println(" static {"); - // for (final Field field : fields) { - // out.println(" fields.put(" + field.fieldId + ", new ZclField(" + field.fieldId - // + ", \"" + field.fieldLabel + "\", ZclDataType." + field.dataType + "));"); - // } - // out.println(" }"); - // out.println(); - // } - - out.println(" /**"); - out.println(" * Default constructor."); - out.println(" */"); - out.println(" public " + className + "() {"); - // out.println(" setType(ZclCommandType." + command.commandType + ");"); - out.println(" genericCommand = " - + ((cluster.clusterType.equals("GENERAL")) ? "true" : "false") + ";"); - if (!cluster.clusterType.equals("GENERAL")) { - out.println(" clusterId = " + cluster.clusterId + ";"); - } - out.println(" commandId = " + command.commandId + ";"); - - out.println(" commandDirection = ZclCommandDirection." - + (cluster.received.containsValue(command) ? "CLIENT_TO_SERVER" : "SERVER_TO_CLIENT") - + ";"); - - out.println(" }"); - // out.println(); - // out.println(" /**"); - // out.println(" * Constructor copying field values from command message."); - // out.println(" *"); - // out.println(" * @param fields a {@link Map} containing the value {@link Object}s"); - // out.println(" */"); - // out.println(" public " + className + "(final Map fields) {"); - // out.println(" this();"); - // for (final Field field : fields) { - // out.println(" " + field.nameLowerCamelCase + " = (" + field.dataTypeClass - // + ") fields.get(" + field.fieldId + ");"); - // } - // out.println(" }"); - // out.println(); - // out.println(" @Override"); - // out.println(" public ZclCommandMessage toCommandMessage() {"); - // out.println(" final ZclCommandMessage message = super.toCommandMessage();"); - // for (final Field field : fields) { - // out.println(" message.getFields().put(ZclFieldType." + field.fieldType + "," - // + field.nameLowerCamelCase + ");"); - // } - // out.println(" return message;"); - // out.println(" }"); - - if (cluster.clusterType.equals("GENERAL")) { - out.println(); - out.println(" /**"); - out.println(" * Sets the cluster ID for generic commands. {@link " + className - + "} is a generic command."); - out.println(" *

"); - out.println( - " * For commands that are not generic, this method will do nothing as the cluster ID is fixed."); - out.println( - " * To test if a command is generic, use the {@link #isGenericCommand} method."); - out.println(" *"); - out.println( - " * @param clusterId the cluster ID used for generic commands as an {@link Integer}"); - - out.println(" */"); - out.println(" @Override"); - out.println(" public void setClusterId(Integer clusterId) {"); - out.println(" this.clusterId = clusterId;"); - out.println(" }"); - } - - for (final Field field : fields) { - out.println(); - out.println(" /**"); - out.println(" * Gets " + field.fieldLabel + "."); - if (field.description.size() != 0) { - out.println(" *"); - for (String line : field.description) { - out.println(" * " + line); - } - } - out.println(" *"); - out.println(" * @return the " + field.fieldLabel); - out.println(" */"); - out.println(" public " + field.dataTypeClass + " get" + field.nameUpperCamelCase + "() {"); - out.println(" return " + field.nameLowerCamelCase + ";"); - out.println(" }"); - out.println(); - out.println(" /**"); - out.println(" * Sets " + field.fieldLabel + "."); - if (field.description.size() != 0) { - out.println(" *"); - outputWithLinebreak(out, " ", field.description); - } - out.println(" *"); - out.println(" * @param " + field.nameLowerCamelCase + " the " + field.fieldLabel); - out.println(" */"); - out.println(" public void set" + field.nameUpperCamelCase + "(final " + field.dataTypeClass - + " " + field.nameLowerCamelCase + ") {"); - out.println( - " this." + field.nameLowerCamelCase + " = " + field.nameLowerCamelCase + ";"); - out.println(" }"); - - } - - if (fields.size() > 0) { - // out.println(); - // out.println(" @Override"); - // out.println(" public void setFieldValues(final Map values) {"); - // for (final Field field : fields) { - // out.println(" " + field.nameLowerCamelCase + " = (" + field.dataTypeClass - // + ") values.get(" + field.fieldId + ");"); - // } - // out.println(" }"); - - out.println(); - out.println(" @Override"); - out.println(" public void serialize(final ZclFieldSerializer serializer) {"); - for (final Field field : fields) { - // Rules... - // if listSizer == null, then just output the field - // if listSizer != null and contains && then check the param bit - - if (field.listSizer != null) { - if (field.listSizer.equals("statusResponse")) { - // Special case where a ZclStatus may be sent, or, a list of results. - // This checks for a single response - out.println(" if (status == ZclStatus.SUCCESS) {"); - out.println(" serializer.serialize(status, ZclDataType.ZCL_STATUS);"); - out.println(" return;"); - out.println(" }"); - } else if (field.conditionOperator != null) { - if (field.conditionOperator == "&&") { - out.println(" if ((" + field.listSizer + " & " + field.condition - + ") != 0) {"); - } else { - out.println(" if (" + field.listSizer + " " + field.conditionOperator - + " " + field.condition + ") {"); - } - out.println(" serializer.serialize(" + field.nameLowerCamelCase - + ", ZclDataType." + field.dataType + ");"); - out.println(" }"); - } else { - out.println(" for (int cnt = 0; cnt < " + field.nameLowerCamelCase - + ".size(); cnt++) {"); - out.println(" serializer.serialize(" + field.nameLowerCamelCase - + ".get(cnt), ZclDataType." + field.dataType + ");"); - out.println(" }"); - } - } else { - out.println(" serializer.serialize(" + field.nameLowerCamelCase - + ", ZclDataType." + field.dataType + ");"); - } - } - out.println(" }"); - - out.println(); - out.println(" @Override"); - out.println(" public void deserialize(final ZclFieldDeserializer deserializer) {"); - for (final Field field : fields) { - if (field.listSizer != null) { - if (field.listSizer.equals("statusResponse")) { - // Special case where a ZclStatus may be sent, or, a list of results. - // This checks for a single response - out.println(" if (deserializer.getRemainingLength() == 1) {"); - out.println( - " status = (ZclStatus) deserializer.deserialize(ZclDataType.ZCL_STATUS);"); - out.println(" return;"); - out.println(" }"); - } else if (field.conditionOperator != null) { - if (field.conditionOperator == "&&") { - out.println(" if ((" + field.listSizer + " & " + field.condition - + ") != 0) {"); - } else { - out.println(" if (" + field.listSizer + " " + field.conditionOperator - + " " + field.condition + ") {"); - } - out.println(" " + field.nameLowerCamelCase + " = (" + field.dataTypeClass - + ") deserializer.deserialize(" + "ZclDataType." + field.dataType + ");"); - out.println(" }"); - } else { - out.println(" for (int cnt = 0; cnt < " + field.nameLowerCamelCase - + ".size(); cnt++) {"); - out.println(" " + field.nameLowerCamelCase + " = (" + field.dataTypeClass - + ") deserializer.deserialize(" + "ZclDataType." + field.dataType + ");"); - out.println(" }"); - } - } else { - out.println(" " + field.nameLowerCamelCase + " = (" + field.dataTypeClass - + ") deserializer.deserialize(" + "ZclDataType." + field.dataType + ");"); - } - } - out.println(" }"); - } - - int fieldLen = 0; - for (final Field field : fields) { - fieldLen += field.nameLowerCamelCase.length() + 20; - } - - out.println(); - out.println(" @Override"); - out.println(" public String toString() {"); - out.println(" final StringBuilder builder = new StringBuilder(" - + (className.length() + 3 + fieldLen) + ");"); - - out.println(" builder.append(\"" + className + " [\");"); - out.println(" builder.append(super.toString());"); - for (final Field field : fields) { - out.println(" builder.append(\", " + field.nameLowerCamelCase + "=\");"); - out.println(" builder.append(" + field.nameLowerCamelCase + ");"); - } - out.println(" builder.append(\']\');"); - out.println(" return builder.toString();"); - out.println(" }"); - - out.println(); - out.println("}"); - - out.flush(); - out.close(); - } - } - } - } - - private static String getZclCommandTypeEnum(final Cluster cluster, final Command command, String string) { - return command.commandType + "(" + String.format("0x%04X", cluster.clusterId) + ", " + command.commandId + ", " - + command.nameUpperCamelCase + ".class" + ", " + string + ")"; - // return command.commandType + "(ZclClusterType." + cluster.clusterType + ", " + command.commandId + ", " - // + command.nameUpperCamelCase + ".class" + ", " + received + ")"; - } - - private static void generateZclCommandTypeEnumeration(Context context, String packageRootPrefix, - File sourceRootPath) throws IOException { - final String className = "ZclCommandType"; - - final String packageRoot = packageRootPrefix + packageZclProtocol; - final String packagePath = getPackagePath(sourceRootPath, packageZclProtocol); - final File packageFile = getPackageFile(packagePath); - - final PrintWriter out = getClassOut(packageFile, className); - - CodeGeneratorUtil.outputLicense(out); - - out.println("package " + packageRoot + ";"); - out.println(); - - out.println("import java.lang.reflect.Constructor;"); - out.println(); - out.println("import javax.annotation.Generated;"); - out.println(); - out.println("import " + packageRootPrefix + packageZcl + ".ZclCommand;"); - out.println("import " + packageRootPrefix + packageZclProtocol + ".ZclCommandDirection;"); - out.println(); - - Map commandEnum = new TreeMap(); - - final LinkedList profiles = new LinkedList(context.profiles.values()); - for (final Profile profile : profiles) { - final LinkedList clusters = new LinkedList(profile.clusters.values()); - for (final Cluster cluster : clusters) { - // Brute force to get the commands in order! - for (int c = 0; c < 65535; c++) { - if (cluster.received.get(c) != null) { - out.println("import " + getZclClusterCommandPackage(packageRootPrefix, cluster) + "." - + cluster.received.get(c).nameUpperCamelCase + ";"); - - commandEnum.put(getZclCommandTypeEnum(cluster, cluster.received.get(c), - "ZclCommandDirection.CLIENT_TO_SERVER"), cluster.received.get(c)); - } - if (cluster.generated.get(c) != null) { - out.println("import " + getZclClusterCommandPackage(packageRootPrefix, cluster) + "." - + cluster.generated.get(c).nameUpperCamelCase + ";"); - - commandEnum.put(getZclCommandTypeEnum(cluster, cluster.generated.get(c), - "ZclCommandDirection.SERVER_TO_CLIENT"), cluster.generated.get(c)); - } - } - } - } - out.println(); - - out.println(); - outputClassJavaDoc(out, "Enumeration of ZigBee Cluster Library commands"); - outputClassGenerated(out); - out.println("public enum " + className + " {"); - boolean first = true; - for (String command : commandEnum.keySet()) { - Command cmd = commandEnum.get(command); - if (cmd == null) { - System.out.println("Command without data: " + command); - continue; - } - - if (!first) { - out.println(","); - } - first = false; - out.println(" /**"); - out.println(" * " + cmd.commandType + ": " + cmd.commandLabel); - out.println(" *

"); - out.println(" * See {@link " + cmd.nameUpperCamelCase + "}"); - out.println(" */"); - out.print(" " + command); - } - out.println(";"); - out.println(); - - out.println(" private final int commandId;"); - out.println(" private final int clusterType;"); - out.println(" private final Class commandClass;"); - // out.println(" private final String label;"); - out.println(" private final ZclCommandDirection direction;"); - out.println(); - out.println(" " + className - + "(final int clusterType, final int commandId, final Class commandClass, final ZclCommandDirection direction) {"); - out.println(" this.clusterType = clusterType;"); - out.println(" this.commandId = commandId;"); - out.println(" this.commandClass = commandClass;"); - // out.println(" this.label = label;"); - out.println(" this.direction = direction;"); - out.println(" }"); - out.println(); - - out.println(" public int getClusterType() {"); - out.println(" return clusterType;"); - out.println(" }"); - out.println(); - out.println(" public int getId() {"); - out.println(" return commandId;"); - out.println(" }"); - out.println(); - // out.println(" public String getLabel() { return label; }"); - out.println(" public boolean isGeneric() {"); - out.println(" return clusterType==0xFFFF;"); - out.println(" }"); - out.println(); - out.println(" public ZclCommandDirection getDirection() {"); - out.println(" return direction;"); - out.println(" }"); - out.println(); - out.println(" public Class getCommandClass() {"); - out.println(" return commandClass;"); - out.println(" }"); - out.println(); - out.println( - " public static ZclCommandType getCommandType(final int clusterType, final int commandId,\n"); - out.println(" ZclCommandDirection direction) {\n"); - out.println(" for (final ZclCommandType value : values()) {\n"); - out.println( - " if (value.direction == direction && value.clusterType == clusterType && value.commandId == commandId) {\n"); - out.println(" return value;\n"); - out.println(" }\n"); - out.println(" }\n"); - out.println(" return null;\n"); - out.println(" }"); - - out.println(); - out.println(" public static ZclCommandType getGeneric(final int commandId) {"); - out.println(" for (final ZclCommandType value : values()) {"); - out.println(" if (value.clusterType == 0xFFFF && value.commandId == commandId) {"); - out.println(" return value;"); - out.println(" }"); - out.println(" }"); - out.println(" return null;"); - out.println(" }"); - - out.println(); - out.println(" public ZclCommand instantiateCommand() {"); - out.println(" Constructor cmdConstructor;"); - out.println(" try {"); - out.println(" cmdConstructor = commandClass.getConstructor();"); - out.println(" return cmdConstructor.newInstance();"); - out.println(" } catch (Exception e) {"); - out.println(" // logger.debug(\"Error instantiating cluster command {}\", this);"); - out.println(" }"); - out.println(" return null;"); - out.println(" }"); - - out.println("}"); - - out.flush(); - out.close(); - } - - protected static void outputWithLinebreak(PrintWriter out, String indent, List lines) { - for (String line : lines) { - String[] words = line.split(" "); - if (words.length == 0) { - return; - } - - out.print(indent + " *"); - - int len = 2; - for (String word : words) { - // if (word.toLowerCase().equals("note:")) { - // if (len > 2) { - // out.println(); - // } - // out.println(indent + " *

"); - // out.print(indent + " * Note:"); - // continue; - // } - if (len + word.length() > lineLen) { - out.println(); - out.print(indent + " *"); - len = 2; - } - out.print(" "); - out.print(word); - len += word.length(); - } - - if (len != 0) { - out.println(); - } - } - } - - private static void generateZclClusterClasses(Context context, String packageRootPrefix, File sourceRootPath) - throws IOException { - - final LinkedList profiles = new LinkedList(context.profiles.values()); - for (final Profile profile : profiles) { - final LinkedList clusters = new LinkedList(profile.clusters.values()); - for (final Cluster cluster : clusters) { - final String packageRoot = packageRootPrefix; - final String packagePath = getPackagePath(sourceRootPath, packageRoot); - final File packageFile = getPackageFile(packagePath + (packageZclCluster).replace('.', '/')); - - final String className = "Zcl" + cluster.nameUpperCamelCase + "Cluster"; - final PrintWriter out = getClassOut(packageFile, className); - - final ArrayList commands = new ArrayList(); - commands.addAll(cluster.received.values()); - commands.addAll(cluster.generated.values()); - - CodeGeneratorUtil.outputLicense(out); - - out.println("package " + packageRoot + packageZclCluster + ";"); - out.println(); - - Set imports = new HashSet(); - - boolean useList = false; - for (final Command command : commands) { - final LinkedList fields = new LinkedList(command.fields.values()); - System.out.println("Checking command " + command.commandLabel); - - for (final Field field : fields) { - System.out.println("Checking " + field.dataTypeClass); - String packageName; - if (field.dataTypeClass.contains("Descriptor")) { - packageName = packageZdpDescriptors; - } else { - packageName = packageZclField; - } - - String typeName; - if (field.dataTypeClass.startsWith("List")) { - useList = true; - typeName = field.dataTypeClass; - typeName = typeName.substring(typeName.indexOf("<") + 1); - typeName = typeName.substring(0, typeName.indexOf(">")); - } else { - typeName = field.dataTypeClass; - } - - switch (typeName) { - case "Integer": - case "Boolean": - case "Object": - case "Long": - case "String": - case "int[]": - continue; - case "IeeeAddress": - imports.add(packageRootPrefix + "." + typeName); - System.out.println("Adding " + typeName); - continue; - case "ZclStatus": - imports.add(packageRootPrefix + packageZcl + ".ZclStatus"); - continue; - case "ImageUpgradeStatus": - imports.add(packageRootPrefix + packageZclField + ".ImageUpgradeStatus"); - continue; - } - - imports.add(packageRootPrefix + packageName + "." + typeName); - } - } - - if (useList) { - imports.add("java.util.List"); - // imports.add(packageRootPrefix + packageZclField + ".*"); - } - - boolean addAttributeTypes = false; - boolean readAttributes = false; - boolean writeAttributes = false; - for (final Attribute attribute : cluster.attributes.values()) { - if (attribute.attributeAccess.toLowerCase().contains("write")) { - addAttributeTypes = true; - writeAttributes = true; - } - if (attribute.attributeAccess.toLowerCase().contains("read")) { - readAttributes = true; - } - - if ("Calendar".equals(attribute.dataTypeClass)) { - imports.add("java.util.Calendar"); - } - if ("IeeeAddress".equals(attribute.dataTypeClass)) { - imports.add("com.zsmartsystems.zigbee.IeeeAddress"); - } - if ("ImageUpgradeStatus".equals(attribute.dataTypeClass)) { - imports.add(packageRootPrefix + packageZclField + ".ImageUpgradeStatus"); - } - } - - if (addAttributeTypes) { - imports.add("com.zsmartsystems.zigbee.zcl.protocol.ZclDataType"); - } - - imports.add(packageRoot + packageZcl + ".ZclCluster"); - if (cluster.attributes.size() != 0) { - imports.add(packageRoot + packageZclProtocol + ".ZclDataType"); - } - - if (!commands.isEmpty()) { - imports.add(packageRoot + packageZcl + ".ZclCommand"); - } - // imports.add(packageRoot + packageZcl + ".ZclCommandMessage"); - imports.add("javax.annotation.Generated"); - - // imports.add(packageRoot + ".ZigBeeDestination"); - imports.add(packageRoot + ".ZigBeeEndpoint"); - if (!cluster.attributes.isEmpty() | !commands.isEmpty()) { - imports.add(packageRoot + ".CommandResult"); - } - // imports.add(packageRoot + ".ZigBeeEndpoint"); - imports.add(packageRoot + packageZcl + ".ZclAttribute"); - imports.add("java.util.Map"); - imports.add("java.util.concurrent.ConcurrentHashMap"); - - if (!cluster.attributes.isEmpty() | !commands.isEmpty()) { - imports.add("java.util.concurrent.Future"); - } - // imports.add("com.zsmartsystems.zigbee.model.ZigBeeType"); - - for (final Attribute attribute : cluster.attributes.values()) { - if (attribute.attributeAccess.toLowerCase().contains("read")) { - // imports.add("java.util.Calendar"); - } - } - - for (final Command command : commands) { - imports.add(getZclClusterCommandPackage(packageRoot, cluster) + "." + command.nameUpperCamelCase); - } - - if (!cluster.attributes.isEmpty()) { - imports.add(packageRoot + packageZclProtocol + ".ZclClusterType"); - } - - List importList = new ArrayList(); - importList.addAll(imports); - Collections.sort(importList); - for (final String importClass : importList) { - out.println("import " + importClass + ";"); - } - - out.println(); - out.println("/**"); - out.println(" * " + cluster.clusterName + " cluster implementation (Cluster ID " - + String.format("0x%04X", cluster.clusterId) + ")."); - if (cluster.clusterDescription.size() > 0) { - out.println(" *

"); - } - outputWithLinebreak(out, "", cluster.clusterDescription); - - out.println(" *

"); - out.println(" * Code is auto-generated. Modifications may be overwritten!"); - - out.println(" */"); - // outputClassJavaDoc(out); - outputClassGenerated(out); - out.println("public class " + className + " extends ZclCluster {"); - - out.println(" /**"); - out.println(" * The ZigBee Cluster Library Cluster ID"); - out.println(" */"); - out.println(" public static final int CLUSTER_ID = " + String.format("0x%04X;", cluster.clusterId)); - out.println(); - out.println(" /**"); - out.println(" * The ZigBee Cluster Library Cluster Name"); - out.println(" */"); - out.println(" public static final String CLUSTER_NAME = \"" + cluster.clusterName + "\";"); - out.println(); - - if (cluster.attributes.size() != 0) { - out.println(" // Attribute constants"); - for (final Attribute attribute : cluster.attributes.values()) { - out.println(" /**"); - outputWithLinebreak(out, " ", attribute.attributeDescription); - - out.println(" */"); - out.println(" public static final int " + attribute.enumName + " = " - + String.format("0x%04X", attribute.attributeId) + ";"); - } - out.println(); - } - - out.println(" // Attribute initialisation"); - out.println(" protected Map initializeAttributes() {"); - out.println( - " Map attributeMap = new ConcurrentHashMap(" - + cluster.attributes.size() + ");"); - - if (cluster.attributes.size() != 0) { - out.println(); - for (final Attribute attribute : cluster.attributes.values()) { - out.println(" attributeMap.put(" + attribute.enumName - + ", new ZclAttribute(ZclClusterType." + cluster.clusterType + ", " + attribute.enumName - + ", \"" + attribute.attributeLabel + "\", " + "ZclDataType." + attribute.dataType - + ", " + "mandatory".equals(attribute.attributeImplementation.toLowerCase()) + ", " - + attribute.attributeAccess.toLowerCase().contains("read") + ", " - + attribute.attributeAccess.toLowerCase().contains("write") + ", " - + "mandatory".equals(attribute.attributeReporting.toLowerCase()) + "));"); - } - } - out.println(); - out.println(" return attributeMap;"); - out.println(" }"); - out.println(); - - out.println(" /**"); - out.println(" * Default constructor to create a " + cluster.clusterName + " cluster."); - out.println(" *"); - out.println(" * @param zigbeeEndpoint the {@link ZigBeeEndpoint}"); - out.println(" */"); - out.println(" public " + className + "(final ZigBeeEndpoint zigbeeEndpoint) {"); - out.println(" super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME);"); - out.println(" }"); - - for (final Attribute attribute : cluster.attributes.values()) { - DataTypeMap zclDataType = ZclDataType.getDataTypeMapping().get(attribute.dataType); - - if (attribute.attributeAccess.toLowerCase().contains("write")) { - outputAttributeJavaDoc(out, "Set", attribute, zclDataType); - out.println(" public Future set" - + attribute.nameUpperCamelCase.replace("_", "") + "(final Object value) {"); - out.println(" return write(attributes.get(" + attribute.enumName + "), value);"); - out.println(" }"); - } - - if (attribute.attributeAccess.toLowerCase().contains("read")) { - outputAttributeJavaDoc(out, "Get", attribute, zclDataType); - out.println(" public Future get" - + attribute.nameUpperCamelCase.replace("_", "") + "Async() {"); - out.println(" return read(attributes.get(" + attribute.enumName + "));"); - out.println(" }"); - outputAttributeJavaDoc(out, "Synchronously get", attribute, zclDataType); - out.println(" public " + attribute.dataTypeClass + " get" - + attribute.nameUpperCamelCase.replace("_", "") + "(final long refreshPeriod) {"); - out.println(" if (attributes.get(" + attribute.enumName - + ").isLastValueCurrent(refreshPeriod)) {"); - out.println(" return (" + attribute.dataTypeClass + ") attributes.get(" - + attribute.enumName + ").getLastValue();"); - out.println(" }"); - out.println(); - out.println(" return (" + attribute.dataTypeClass + ") readSync(attributes.get(" - + attribute.enumName + "));"); - out.println(" }"); - } - - if (attribute.attributeAccess.toLowerCase().contains("read") - && attribute.attributeReporting.toLowerCase().equals("mandatory")) { - outputAttributeJavaDoc(out, "Set reporting for", attribute, zclDataType); - if (zclDataType.analogue) { - out.println(" public Future set" + attribute.nameUpperCamelCase - + "Reporting(final int minInterval, final int maxInterval, final Object reportableChange) {"); - out.println(" return setReporting(attributes.get(" + attribute.enumName - + "), minInterval, maxInterval, reportableChange);"); - } else { - out.println(" public Future set" + attribute.nameUpperCamelCase - + "Reporting(final int minInterval, final int maxInterval) {"); - out.println(" return setReporting(attributes.get(" + attribute.enumName - + "), minInterval, maxInterval);"); - } - out.println(" }"); - } - } - - for (final Command command : commands) { - out.println(); - out.println(" /**"); - out.println(" * The " + command.commandLabel); - if (command.commandDescription.size() != 0) { - out.println(" *

"); - outputWithLinebreak(out, " ", command.commandDescription); - } - out.println(" *"); - - final LinkedList fields = new LinkedList(command.fields.values()); - for (final Field field : fields) { - out.println(" * @param " + field.nameLowerCamelCase + " {@link " + field.dataTypeClass - + "} " + field.fieldLabel); - } - - out.println(" * @return the {@link Future} command result future"); - out.println(" */"); - out.print(" public Future " + command.nameLowerCamelCase + "("); - - boolean first = true; - for (final Field field : fields) { - if (first == false) { - out.print(", "); - } - out.print(field.dataTypeClass + " " + field.nameLowerCamelCase); - first = false; - } - - out.println(") {"); - out.println(" " + command.nameUpperCamelCase + " command = new " + command.nameUpperCamelCase - + "();"); - if (fields.size() != 0) { - out.println(); - out.println(" // Set the fields"); - } - for (final Field field : fields) { - out.println(" command.set" + field.nameUpperCamelCase + "(" + field.nameLowerCamelCase - + ");"); - } - out.println(); - out.println(" return send(command);"); - out.println(" }"); - } - - // if (readAttributes) { - // out.println(); - // out.println(" /**"); - // out.println(" * Add a binding for this cluster to the local node"); - // out.println(" *"); - // out.println(" * @return the {@link Future} command result future"); - // out.println(" */"); - // out.println(" public Future bind() {"); - // out.println(" return bind();"); - // out.println(" }"); - // } - - if (cluster.received.size() > 0) { - out.println(); - out.println(" @Override"); - out.println(" public ZclCommand getCommandFromId(int commandId) {"); - out.println(" switch (commandId) {"); - for (final Command command : cluster.received.values()) { - out.println(" case " + command.commandId + ": // " + command.commandType); - out.println(" return new " + command.nameUpperCamelCase + "();"); - } - out.println(" default:"); - out.println(" return null;"); - out.println(" }"); - out.println(" }"); - } - - if (cluster.generated.size() > 0) { - out.println(); - out.println(" @Override"); - out.println(" public ZclCommand getResponseFromId(int commandId) {"); - out.println(" switch (commandId) {"); - for (final Command command : cluster.generated.values()) { - out.println(" case " + command.commandId + ": // " + command.commandType); - out.println(" return new " + command.nameUpperCamelCase + "();"); - } - out.println(" default:"); - out.println(" return null;"); - out.println(" }"); - out.println(" }"); - } - - out.println("}"); - - out.flush(); - out.close(); - } - } - } - - private static void generateAttributeEnumeration(Context context, String packageRootPrefix, File sourceRootPath) - throws IOException { - - final LinkedList profiles = new LinkedList(context.profiles.values()); - for (final Profile profile : profiles) { - final LinkedList clusters = new LinkedList(profile.clusters.values()); - for (final Cluster cluster : clusters) { - if (cluster.attributes.size() != 0) { - for (final Attribute attribute : cluster.attributes.values()) { - if (attribute.valueMap.isEmpty()) { - continue; - } - - final String packageRoot = packageRootPrefix + packageZclProtocolCommand + "." - + cluster.clusterType.replace("_", "").toLowerCase(); - - final String className = attribute.nameUpperCamelCase + "Enum"; - - outputEnum(packageRoot, sourceRootPath, className, attribute.valueMap, cluster.clusterName, - attribute.attributeLabel); - } - } - } - } - } - - private static void generateFieldEnumeration(Context context, String packageRootPrefix, File sourceRootPath) - throws IOException { - - final LinkedList profiles = new LinkedList(context.profiles.values()); - for (final Profile profile : profiles) { - final LinkedList clusters = new LinkedList(profile.clusters.values()); - for (final Cluster cluster : clusters) { - final ArrayList commands = new ArrayList(); - commands.addAll(cluster.received.values()); - commands.addAll(cluster.generated.values()); - - if (commands.size() != 0) { - for (final Command command : commands) { - for (final Field field : command.fields.values()) { - if (field.valueMap.isEmpty()) { - continue; - } - - final String packageRoot = packageRootPrefix + packageZclProtocolCommand + "." - + cluster.clusterType.replace("_", "").toLowerCase(); - - final String className = field.nameUpperCamelCase + "Enum"; - - outputEnum(packageRoot, sourceRootPath, className, field.valueMap, cluster.clusterName, - field.fieldLabel); - } - } - } - } - } - } - - private static void outputEnum(String packageRoot, File sourceRootPath, String className, - Map valueMap, String parentName, String label) throws IOException { - - final String packagePath = getPackagePath(sourceRootPath, packageRoot); - final File packageFile = getPackageFile(packagePath); - - final PrintWriter out = getClassOut(packageFile, className); - - CodeGeneratorUtil.outputLicense(out); - - out.println("package " + packageRoot + ";"); - - out.println(); - out.println("import java.util.HashMap;"); - out.println("import java.util.Map;"); - out.println(); - out.println("import javax.annotation.Generated;"); - - out.println(); - outputClassJavaDoc(out, "Enumeration of " + parentName + " attribute " + label + " options."); - outputClassGenerated(out); - out.println("public enum " + className + " {"); - boolean first = true; - for (final Integer key : valueMap.keySet()) { - String value = valueMap.get(key); - - if (!first) { - out.println(","); - } - first = false; - // out.println(" /**"); - // out.println(" * " + cmd.commandLabel); - // out.println(" *

"); - // out.println(" * See {@link " + cmd.nameUpperCamelCase + "}"); - // out.println(" */"); - out.print(" " + CodeGeneratorUtil.labelToEnumerationValue(value) + String.format("(0x%04X)", key)); - } - out.println(";"); - out.println(); - - out.println(" /**"); - out.println(" * A mapping between the integer code and its corresponding " + className - + " type to facilitate lookup by value."); - out.println(" */"); - out.println(" private static Map idMap;"); - out.println(); - out.println(" static {"); - out.println(" idMap = new HashMap();"); - out.println(" for (" + className + " enumValue : values()) {"); - out.println(" idMap.put(enumValue.key, enumValue);"); - out.println(" }"); - out.println(" }"); - out.println(); - out.println(" private final int key;"); - out.println(); - out.println(" " + className + "(final int key) {"); - out.println(" this.key = key;"); - out.println(" }"); - out.println(); - - out.println(" public int getKey() {"); - out.println(" return key;"); - out.println(" }"); - out.println(); - out.println(" public static " + className + " getByValue(final int value) {"); - out.println(" return idMap.get(value);"); - out.println(" }"); - out.println("}"); - - out.flush(); - out.close(); - } - - private static void outputAttributeJavaDoc(PrintWriter out, String type, Attribute attribute, - DataTypeMap zclDataType) { - out.println(); - out.println(" /**"); - out.println(" * " + type + " the " + attribute.attributeLabel + " attribute [attribute ID " - + attribute.attributeId + "]."); - if (attribute.attributeDescription.size() != 0) { - out.println(" *

"); - outputWithLinebreak(out, " ", attribute.attributeDescription); - } - if ("Synchronously get".equals(type)) { - out.println(" *

"); - out.println(" * This method can return cached data if the attribute has already been received."); - out.println( - " * The parameter refreshPeriod is used to control this. If the attribute has been received"); - out.println( - " * within refreshPeriod milliseconds, then the method will immediately return the last value"); - out.println( - " * received. If refreshPeriod is set to 0, then the attribute will always be updated."); - out.println(" *

"); - out.println( - " * This method will block until the response is received or a timeout occurs unless the current value is returned."); - } - out.println(" *

"); - out.println(" * The attribute is of type {@link " + attribute.dataTypeClass + "}."); - out.println(" *

"); - out.println(" * The implementation of this attribute by a device is " - + attribute.attributeImplementation.toUpperCase()); - out.println(" *"); - if ("Set reporting for".equals(type)) { - out.println(" * @param minInterval {@link int} minimum reporting period"); - out.println(" * @param maxInterval {@link int} maximum reporting period"); - if (zclDataType.analogue) { - out.println(" * @param reportableChange {@link Object} delta required to trigger report"); - } - } else if ("Set".equals(type)) { - out.println(" * @param " + attribute.nameLowerCamelCase + " the {@link " + attribute.dataTypeClass - + "} attribute value to be set"); - } - - if ("Synchronously get".equals(type)) { - out.println( - " * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed"); - out.println(" * @return the {@link " + attribute.dataTypeClass + "} attribute value, or null on error"); - } else { - out.println(" * @return the {@link Future} command result future"); - } - out.println(" */"); - } - - private static PrintWriter getClassOut(File packageFile, String className) throws FileNotFoundException { - final File classFile = new File(packageFile + File.separator + className + ".java"); - System.out.println("Generating: " + classFile.getAbsolutePath()); - final FileOutputStream fileOutputStream = new FileOutputStream(classFile, false); - return new PrintWriter(fileOutputStream); - } - - public static List splitString(String msg, int lineSize) { - List res = new ArrayList(); - - Pattern p = Pattern.compile("\\b.{1," + (lineSize - 1) + "}\\b\\W?"); - Matcher m = p.matcher(msg); - - while (m.find()) { - System.out.println(m.group().trim()); // Debug - res.add(m.group()); - } - return res; - } - - private static String getZclClusterCommandPackage(String packageRoot, Cluster cluster) { - return packageRoot + packageZclProtocolCommand + "." + cluster.clusterType.replace("_", "").toLowerCase(); - } - - private static String getFieldType(Field field) { - if (field.listSizer != null) { - return "List<" + field.dataTypeClass + ">"; - } else { - return field.dataTypeClass; - } - } - - private static void generateZdpCommandClasses(Context context, String packageRootPrefix, File sourceRootPath) - throws IOException { - - // List of fields that are handled internally by super class - List reservedFields = new ArrayList(); - reservedFields.add("status"); - - final LinkedList profiles = new LinkedList(context.profiles.values()); - for (final Profile profile : profiles) { - final LinkedList clusters = new LinkedList(profile.clusters.values()); - for (final Cluster cluster : clusters) { - final ArrayList commands = new ArrayList(); - commands.addAll(cluster.received.values()); - commands.addAll(cluster.generated.values()); - for (final Command command : commands) { - final String packageRoot = packageRootPrefix + packageZdpCommand; - final String packagePath = getPackagePath(sourceRootPath, packageRoot); - final File packageFile = getPackageFile(packagePath); - - final String className = command.nameUpperCamelCase; - final PrintWriter out = getClassOut(packageFile, className); - - final LinkedList fields = new LinkedList(command.fields.values()); - boolean fieldWithDataTypeList = false; - for (final Field field : fields) { - if (field.listSizer != null) { - fieldWithDataTypeList = true; - break; - } - - if (field.dataTypeClass.startsWith("List")) { - fieldWithDataTypeList = true; - break; - } - } - - CodeGeneratorUtil.outputLicense(out); - - out.println("package " + packageRoot + ";"); - out.println(); - // out.println("import " + packageRootPrefix + packageZcl + ".ZclCommandMessage;"); - // out.println("import " + packageRootPrefix + packageZdp + ".ZclCommand;"); - // out.println("import " + packageRootPrefix + packageZcl + ".ZclField;"); - if (fields.size() > 0) { - out.println("import " + packageRootPrefix + packageZcl + ".ZclFieldSerializer;"); - out.println("import " + packageRootPrefix + packageZcl + ".ZclFieldDeserializer;"); - out.println("import " + packageRootPrefix + packageZclProtocol + ".ZclDataType;"); - } - - if (className.endsWith("Request")) { - out.println("import " + packageRootPrefix + packageZdp + ".ZdoRequest;"); - } else { - out.println("import " + packageRootPrefix + packageZdp + ".ZdoResponse;"); - } - - if (command.responseCommand != null && command.responseCommand.length() != 0) { - out.println("import " + packageRootPrefix + ".ZigBeeCommand;"); - out.println("import " + packageRootPrefix + packageTransactionPrefix - + ".ZigBeeTransactionMatcher;"); - out.println("import " + packageRootPrefix + packageZdpCommand + "." + command.responseCommand - + ";"); - } - - if (fieldWithDataTypeList) { - out.println(); - out.println("import java.util.List;"); - out.println("import java.util.ArrayList;"); - } - - out.println("import javax.annotation.Generated;"); - - // out.println("import java.util.Map;"); - // out.println("import java.util.HashMap;"); - - for (final Field field : fields) { - String packageName; - if (field.dataTypeClass.endsWith("Descriptor")) { - packageName = packageZdpDescriptors; - } else if (field.dataTypeClass.endsWith("Table")) { - packageName = packageZdpDescriptors; - } else { - packageName = packageZclField; - } - - String typeName; - if (field.dataTypeClass.startsWith("List")) { - typeName = field.dataTypeClass; - typeName = typeName.substring(typeName.indexOf("<") + 1); - typeName = typeName.substring(0, typeName.indexOf(">")); - } else { - typeName = field.dataTypeClass; - } - - // if (reservedFields.contains(field.nameLowerCamelCase)) { - // continue; - // } - - switch (typeName) { - case "Integer": - case "Boolean": - case "Object": - case "Long": - case "String": - continue; - case "IeeeAddress": - out.println("import " + packageRootPrefix + "." + typeName + ";"); - continue; - case "ZdoStatus": - out.println("import " + packageRootPrefix + packageZdp + ".ZdoStatus;"); - continue; - case "BindingTable": - out.println("import " + packageRootPrefix + packageZdpField + ".BindingTable;"); - continue; - case "NeighborTable": - out.println("import " + packageRootPrefix + packageZdpField + ".NeighborTable;"); - continue; - } - - out.println("import " + packageRootPrefix + packageName + "." + typeName + ";"); - } - - out.println(); - out.println("/**"); - out.println(" * " + command.commandLabel + " value object class."); - - if (command.commandDescription != null && command.commandDescription.size() != 0) { - out.println(" *

"); - outputWithLinebreak(out, "", command.commandDescription); - } - - if (cluster.clusterDescription.size() > 0) { - out.println(" *

"); - outputWithLinebreak(out, "", cluster.clusterDescription); - } - - out.println(" *

"); - out.println(" * Code is auto-generated. Modifications may be overwritten!"); - - out.println(" */"); - out.println(); - - outputClassGenerated(out); - - if (className.endsWith("Request")) { - out.print("public class " + className + " extends ZdoRequest"); - } else { - out.print("public class " + className + " extends ZdoResponse"); - } - - if (command.responseCommand != null && command.responseCommand.length() != 0) { - out.print(" implements ZigBeeTransactionMatcher"); - } - out.println(" {"); - - for (final Field field : fields) { - if (reservedFields.contains(field.nameLowerCamelCase)) { - continue; - } - - if (getAutoSized(fields, field.nameLowerCamelCase) != null) { - continue; - } - - out.println(" /**"); - out.println(" * " + field.fieldLabel + " command message field."); - if (field.description.size() > 0) { - out.println(" *

"); - outputWithLinebreak(out, " ", field.description); - } - out.println(" */"); - out.println(" private " + getFieldType(field) + " " + field.nameLowerCamelCase + ";"); - out.println(); - } - - // if (fields.size() > 0) { - // out.println(" static {"); - // for (final Field field : fields) { - // out.println(" fields.put(" + field.fieldId + ", new ZclField(" + field.fieldId - // + ", \"" + field.fieldLabel + "\", ZclDataType." + field.dataType + "));"); - // } - // out.println(" }"); - // out.println(); - // } - - out.println(" /**"); - out.println(" * Default constructor."); - out.println(" */"); - out.println(" public " + className + "() {"); - // out.println(" setType(ZclCommandType." + command.commandType + ");"); - // out.println(" commandId = " + command.commandId + ";"); - out.println(" clusterId = " + String.format("0x%04X", command.commandId) + ";"); - // out.println(" commandDirection = " - // + (cluster.received.containsValue(command) ? "true" : "false") + ";"); - - out.println(" }"); - - for (final Field field : fields) { - if (reservedFields.contains(field.nameLowerCamelCase)) { - continue; - } - - if (getAutoSized(fields, field.nameLowerCamelCase) != null) { - continue; - } - - out.println(); - out.println(" /**"); - out.println(" * Gets " + field.fieldLabel + "."); - if (field.description.size() != 0) { - out.println(" *

"); - outputWithLinebreak(out, " ", field.description); - } - out.println(" *"); - out.println(" * @return the " + field.fieldLabel); - out.println(" */"); - out.println(" public " + getFieldType(field) + " get" + field.nameUpperCamelCase + "() {"); - out.println(" return " + field.nameLowerCamelCase + ";"); - out.println(" }"); - out.println(); - out.println(" /**"); - out.println(" * Sets " + field.fieldLabel + "."); - if (field.description.size() != 0) { - out.println(" *

"); - outputWithLinebreak(out, " ", field.description); - } - out.println(" *"); - out.println(" * @param " + field.nameLowerCamelCase + " the " + field.fieldLabel); - out.println(" */"); - out.println(" public void set" + field.nameUpperCamelCase + "(final " + getFieldType(field) - + " " + field.nameLowerCamelCase + ") {"); - out.println( - " this." + field.nameLowerCamelCase + " = " + field.nameLowerCamelCase + ";"); - out.println(" }"); - - } - - if (fields.size() > 0) { - // out.println(); - // out.println(" @Override"); - // out.println(" public void setFieldValues(final Map values) {"); - // for (final Field field : fields) { - // out.println(" " + field.nameLowerCamelCase + " = (" + field.dataTypeClass - // + ") values.get(" + field.fieldId + ");"); - // } - // out.println(" }"); - - out.println(); - out.println(" @Override"); - out.println(" public void serialize(final ZclFieldSerializer serializer) {"); - out.println(" super.serialize(serializer);"); - out.println(); - for (final Field field : fields) { - if (getAutoSized(fields, field.nameLowerCamelCase) != null) { - Field sizedField = getAutoSized(fields, field.nameLowerCamelCase); - out.println(" serializer.serialize(" + sizedField.nameLowerCamelCase - + ".size(), ZclDataType." + field.dataType + ");"); - - continue; - } - - if (field.listSizer != null) { - out.println(" for (int cnt = 0; cnt < " + field.nameLowerCamelCase - + ".size(); cnt++) {"); - out.println(" serializer.serialize(" + field.nameLowerCamelCase - + ".get(cnt), ZclDataType." + field.dataType + ");"); - out.println(" }"); - } else { - out.println(" serializer.serialize(" + field.nameLowerCamelCase - + ", ZclDataType." + field.dataType + ");"); - } - } - out.println(" }"); - - out.println(); - out.println(" @Override"); - out.println(" public void deserialize(final ZclFieldDeserializer deserializer) {"); - out.println(" super.deserialize(deserializer);"); - out.println(); - boolean first = true; - for (final Field field : fields) { - if (field.listSizer != null) { - if (first) { - out.println(" // Create lists"); - first = false; - } - out.println(" " + field.nameLowerCamelCase + " = new ArrayList<" - + field.dataTypeClass + ">();"); - } - } - if (first == false) { - out.println(); - } - for (final Field field : fields) { - if (field.completeOnZero) { - out.println(" if (deserializer.isEndOfStream()) {"); - out.println(" return;"); - out.println(" }"); - } - if (getAutoSized(fields, field.nameLowerCamelCase) != null) { - out.println(" Integer " + field.nameLowerCamelCase + " = (" + field.dataTypeClass - + ") deserializer.deserialize(" + "ZclDataType." + field.dataType + ");"); - continue; - } - - if (field.listSizer != null) { - out.println(" if (" + field.listSizer + " != null) {"); - out.println(" for (int cnt = 0; cnt < " + field.listSizer + "; cnt++) {"); - out.println(" " + field.nameLowerCamelCase + ".add((" - + field.dataTypeClass + ") deserializer.deserialize(" + "ZclDataType." - + field.dataType + "));"); - out.println(" }"); - out.println(" }"); - } else { - out.println(" " + field.nameLowerCamelCase + " = (" + field.dataTypeClass - + ") deserializer.deserialize(" + "ZclDataType." + field.dataType + ");"); - } - if (field.completeOnZero) { - out.println(" if (" + field.nameLowerCamelCase + " == 0) {"); - out.println(" return;"); - out.println(" }"); - } - - if (field.nameLowerCamelCase.equals("status")) { - out.println(" if (status != ZdoStatus.SUCCESS) {"); - out.println(" // Don't read the full response if we have an error"); - out.println(" return;"); - out.println(" }"); - } - } - out.println(" }"); - } - - if (command.responseCommand != null && command.responseCommand.length() != 0) { - out.println(); - out.println(" @Override"); - out.println( - " public boolean isTransactionMatch(ZigBeeCommand request, ZigBeeCommand response) {"); - out.println(" if (!(response instanceof " + command.responseCommand + ")) {"); - out.println(" return false;"); - out.println(" }"); - out.println(); - out.print(" return "); - // out.println("(((" + command.nameUpperCamelCase + ") request).getDestinationAddress()"); - // out.print(" .equals(((" + command.responseCommand - // + ") response).getSourceAddress()))"); - - boolean first = true; - for (String matcher : command.responseMatchers.keySet()) { - if (first == false) { - out.println(); - out.print(" && "); - } - first = false; - out.println("(((" + command.nameUpperCamelCase + ") request).get" + matcher + "()"); - out.print(" .equals(((" + command.responseCommand + ") response).get" - + command.responseMatchers.get(matcher) + "()))"); - } - - // Default address checker - if (first == true) { - out.print("((ZdoRequest) request).getDestinationAddress().equals(((" - + command.responseCommand + ") response).getSourceAddress())"); - } - - out.print(";"); - out.println(); - out.println(" }"); - } - - int fieldLen = 0; - for (final Field field : fields) { - fieldLen += field.nameLowerCamelCase.length() + 20; - } - - out.println(); - out.println(" @Override"); - out.println(" public String toString() {"); - out.println(" final StringBuilder builder = new StringBuilder(" - + (className.length() + 3 + fieldLen) + ");"); - out.println(" builder.append(\"" + className + " [\");"); - out.println(" builder.append(super.toString());"); - for (final Field field : fields) { - if (getAutoSized(fields, field.nameLowerCamelCase) != null) { - continue; - } - - out.println(" builder.append(\", " + field.nameLowerCamelCase + "=\");"); - out.println(" builder.append(" + field.nameLowerCamelCase + ");"); - } - out.println(" builder.append(\']\');"); - out.println(" return builder.toString();"); - out.println(" }"); - - out.println(); - out.println("}"); - - out.flush(); - out.close(); - } - } - } - } - - private static Field getAutoSized(LinkedList fields, String name) { - for (Field field : fields) { - if (name.equals(field.listSizer)) { - return field; - } - } - return null; - } - - private static String getZdoCommandTypeEnum(final Cluster cluster, final Command command, boolean received) { - return command.commandType + "(" + String.format("0x%04X", command.commandId) + ", " - + command.nameUpperCamelCase + ".class" + ")"; - } - - private static String getZdpClusterCommandPackage(String packageRoot, Cluster cluster) { - return packageRoot + packageZdpCommand + "." + cluster.clusterType.replace("_", "").toLowerCase(); - } - - private static void generateZdoCommandTypeEnumeration(Context context, String packageRootPrefix, - File sourceRootPath) throws IOException { - final String className = "ZdoCommandType"; - - final String packageRoot = packageRootPrefix + packageZdp; - final String packagePath = getPackagePath(sourceRootPath, packageRoot); - final File packageFile = getPackageFile(packagePath); - - final PrintWriter out = getClassOut(packageFile, className); - - CodeGeneratorUtil.outputLicense(out); - - out.println("package " + packageRoot + ";"); - out.println(); - - Map commandEnum = new TreeMap(); - - final LinkedList profiles = new LinkedList(context.profiles.values()); - for (final Profile profile : profiles) { - final LinkedList clusters = new LinkedList(profile.clusters.values()); - for (final Cluster cluster : clusters) { - // Brute force to get the commands in order! - for (int c = 0; c < 65535; c++) { - if (cluster.received.get(c) != null) { - out.println("import " + packageRootPrefix + packageZdpCommand + "." - + cluster.received.get(c).nameUpperCamelCase + ";"); - - commandEnum.put(getZdoCommandTypeEnum(cluster, cluster.received.get(c), true), - cluster.received.get(c)); - } - } - } - } - out.println(); - - out.println(); - outputClassJavaDoc(out, "Enumeration of ZDP commands"); - out.println("public enum " + className + " {"); - boolean first = true; - for (String command : commandEnum.keySet()) { - Command cmd = commandEnum.get(command); - if (cmd == null) { - System.out.println("Command without data: " + command); - continue; - } - - if (!first) { - out.println(","); - } - first = false; - out.println(" /**"); - out.println(" * " + cmd.commandLabel); - out.println(" *

"); - out.println(" * See {@link " + cmd.nameUpperCamelCase + "}"); - out.println(" */"); - out.print(" " + command); - } - out.println(";"); - - out.println(); - out.println(" private final int clusterId;"); - out.println(" private final Class commandClass;"); - out.println(); - out.println(" " + className + "(final int clusterId, final Class commandClass) {"); - out.println(" this.clusterId = clusterId;"); - out.println(" this.commandClass = commandClass;"); - // out.println(" this.label = label;"); - out.println(" }"); - out.println(); - - out.println(" public int getClusterId() {"); - out.println(" return clusterId;"); - out.println(" }"); - out.println(); - out.println(" public Class getCommandClass() {"); - out.println(" return commandClass;"); - out.println(" }"); - out.println(); - out.println(" public static ZdoCommandType getValueById(final int clusterId) {"); - out.println(" for (final ZdoCommandType value : values()) {"); - out.println(" if(value.clusterId == clusterId) {"); - out.println(" return value;"); - out.println(" }"); - out.println(" }"); - out.println(" return null;"); - out.println(" }"); - out.println("}"); - - out.flush(); - out.close(); - } - - private static void generateZdpCommandTransactions(Context context, String packageRootPrefix, File sourceRootPath) - throws IOException { - - final LinkedList profiles = new LinkedList(context.profiles.values()); - for (final Profile profile : profiles) { - final LinkedList clusters = new LinkedList(profile.clusters.values()); - for (final Cluster cluster : clusters) { - final ArrayList commands = new ArrayList(); - commands.addAll(cluster.received.values()); - commands.addAll(cluster.generated.values()); - for (final Command command : commands) { - if (command.responseCommand == null || command.responseCommand.length() == 0) { - continue; - } - - final String packageRoot = packageRootPrefix + packageZdpTransaction; - final String packagePath = getPackagePath(sourceRootPath, packageRoot); - final File packageFile = getPackageFile(packagePath); - - final String className = command.nameUpperCamelCase + "Transaction"; - final PrintWriter out = getClassOut(packageFile, className); - - out.println("package " + packageRoot + ";"); - out.println(); - - // out.println("import " + packageRootPrefix + packageZcl + ".ZclCommandMessage;"); - // out.println("import " + packageRootPrefix + packageZdp + ".ZclCommand;"); - // out.println("import " + packageRootPrefix + packageZcl + ".ZclField;"); - - out.println( - "import " + packageRootPrefix + packageZdpCommand + "." + command.nameUpperCamelCase + ";"); - out.println( - "import " + packageRootPrefix + packageZdpCommand + "." + command.responseCommand + ";"); - - out.println("import " + packageRootPrefix + ".Command;"); - out.println( - "import " + packageRootPrefix + packageTransactionPrefix + ".ZigBeeTransactionMatcher;"); - // out.println("import " + packageRootPrefix + packageZdp + ".ZdoRequest;"); - // out.println("import " + packageRootPrefix + packageZdp + ".ZdoResponse;"); - - // out.println("import java.util.Map;"); - // out.println("import java.util.HashMap;"); - - out.println(); - out.println("/**"); - out.println(" * " + command.commandLabel + " transaction class."); - - if (command.commandDescription != null && command.commandDescription.size() != 0) { - out.println(" *

"); - outputWithLinebreak(out, "", command.commandDescription); - } - - if (cluster.clusterDescription.size() > 0) { - out.println(" *

"); - outputWithLinebreak(out, "", cluster.clusterDescription); - } - - out.println(" *

"); - out.println(" * Code is auto-generated. Modifications may be overwritten!"); - - out.println(" */"); - out.println("public class " + className + " implements ZigBeeTransactionMatcher {"); - - // out.println(" /**"); - // out.println(" * Default constructor."); - // out.println(" */"); - // out.println(" public " + className + "() {"); - // out.println(" }"); - // out.println(" setType(ZclCommandType." + command.commandType + ");"); - // out.println(" commandId = " + command.commandId + ";"); - // out.println(" commandDirection = " - // + (cluster.received.containsValue(command) ? "true" : "false") + ";"); - - out.println(); - out.println(" @Override"); - out.println(" public boolean isTransactionMatch(Command request, Command response) {"); - out.println(" if (response instanceof " + command.responseCommand + ") {"); - // out.println(" return ((" + command.nameUpperCamelCase + ") request).get" - // + command.responseRequest + "() == ((" + command.responseCommand + ") response).get" - // + command.responseResponse + "();"); - out.println(" } else {"); - out.println(" return false;"); - out.println(" }"); - out.println(" }"); - - out.println(); - out.println("}"); - - out.flush(); - out.close(); - } - } - } - } - -} diff --git a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZclProtocolDefinitionParser.java b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZclProtocolDefinitionParser.java deleted file mode 100644 index 8e2afb418..000000000 --- a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZclProtocolDefinitionParser.java +++ /dev/null @@ -1,530 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.autocode; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.TreeMap; - -import org.apache.commons.lang.StringUtils; - -import com.zsmartsystems.zigbee.autocode.zcl.Attribute; -import com.zsmartsystems.zigbee.autocode.zcl.Cluster; -import com.zsmartsystems.zigbee.autocode.zcl.Command; -import com.zsmartsystems.zigbee.autocode.zcl.Context; -import com.zsmartsystems.zigbee.autocode.zcl.DataType; -import com.zsmartsystems.zigbee.autocode.zcl.Field; -import com.zsmartsystems.zigbee.autocode.zcl.Profile; -import com.zsmartsystems.zigbee.autocode.zcl.ZclDataType; - -/** - * @author tlaukkan - Created on 4/10/2016. - * @author Chris Jackson - */ -public class ZclProtocolDefinitionParser { - public static void parseProfiles(Context context) { - while (context.lines.size() > 0) { - final String line = context.lines.remove(0); - - if (line.startsWith("# ") && line.contains("[")) { - context.profile = new Profile(); - context.profile.profileName = getHeaderTitle(line); - context.profile.profileAbbreviation = getHeaderAbbreviation(line); - context.profile.profileType = CodeGeneratorUtil.labelToEnumerationValue(context.profile.profileName); - context.profile.profileId = getHeaderId(line); - context.profiles.put(context.profile.profileId, context.profile); - System.out.println("Profile: " + context.profile.profileName + " " - + CodeGeneratorUtil.toHex(context.profile.profileId)); - parseFunctionalDomains(context); - } - } - } - - private static void parseFunctionalDomains(Context context) { - while (context.lines.size() > 0) { - final String line = context.lines.remove(0); - - // Returning to previous level. - if (line.startsWith("# ") && line.contains("[")) { - context.lines.add(0, line); - return; - } - - if (line.startsWith("# ")) { - final String functionalDomainName = getHeaderTitle(line); - System.out.println(" Functional domain: " + functionalDomainName); - - parseClusters(context); - } - } - } - - private static void parseClusters(Context context) { - while (context.lines.size() > 0) { - final String line = context.lines.remove(0); - - // Returning to previous level. - if (line.startsWith("# ")) { - context.lines.add(0, line); - return; - } - - if (line.startsWith("## ")) { - context.cluster = new Cluster(); - context.cluster.clusterName = getHeaderTitle(line); - context.cluster.clusterDescription = new ArrayList(); - context.cluster.clusterType = CodeGeneratorUtil.labelToEnumerationValue(context.cluster.clusterName); - context.cluster.clusterId = getHeaderId(line); - context.cluster.nameUpperCamelCase = CodeGeneratorUtil - .labelToUpperCamelCase(context.cluster.clusterName); - context.cluster.nameLowerCamelCase = CodeGeneratorUtil - .upperCamelCaseToLowerCamelCase(context.cluster.clusterName); - context.profile.clusters.put(context.cluster.clusterId, context.cluster); - System.out.println( - " " + CodeGeneratorUtil.toHex(context.cluster.clusterId) + ") " + context.cluster.clusterName); - - parseDirections(context); - } - } - } - - private static void parseDirections(Context context) { - boolean addBreak = false; - while (context.lines.size() > 0) { - final String line = context.lines.remove(0); - - // Returning to previous level. - if (line.startsWith("# ") || line.startsWith("## ")) { - context.lines.add(0, line); - return; - } - - if (line.startsWith("### ")) { - addBreak = false; - - context.received = line.toLowerCase().contains("received"); - context.generated = line.toLowerCase().contains("generated"); - context.attribute = line.toLowerCase().contains("attributes"); - if (context.received) { - System.out.println(" Received:"); - } else if (context.generated) { - System.out.println(" Generated:"); - } else if (context.attribute) { - System.out.println(" Attributes:"); - - parseAttributes(context); - continue; - } else { - System.out.println(" Unknown:"); - } - - parseCommands(context); - - continue; - } - - if (context.cluster.clusterDescription.size() == 0 && line.trim().length() == 0) { - continue; - } - if (line.trim().length() == 0) { - addBreak = true; - continue; - } - if (addBreak && context.cluster.clusterDescription.size() > 0) { - context.cluster.clusterDescription.add("

"); - addBreak = false; - } - context.cluster.clusterDescription.add(line.trim()); - } - } - - private static void parseCommands(Context context) { - boolean addBreak = false; - Field field = null; - while (context.lines.size() > 0) { - final String line = context.lines.remove(0); - - // Returning to previous level. - if (line.startsWith("# ") || line.startsWith("## ") || line.startsWith("### ")) { - context.lines.add(0, line); - return; - } - - if (line.startsWith("##### Expected Response")) { - parseExpectedResponse(context); - continue; - } - - if (line.startsWith("##### ")) { - addBreak = false; - - for (Field fieldLoop : context.command.fields.values()) { - if (fieldLoop.fieldLabel.equals(line.trim().substring(6))) { - field = fieldLoop; - break; - } - } - if (field == null) { - System.out.println("Error finding field \"" + line.trim().substring(6) + "\""); - } - continue; - } - - if (line.startsWith("#### ")) { - context.command = new Command(); - context.command.commandLabel = getHeaderTitle(line).trim(); - String splits[] = context.command.commandLabel.split(" "); - - if ("RESPONSE".equals(splits[splits.length - 2].toUpperCase()) - && "COMMAND".equals(splits[splits.length - 1].toUpperCase())) { - StringBuilder sb = new StringBuilder(); - for (int c = 0; c < splits.length - 1; c++) { - if (c != 0) { - sb.append(" "); - } - sb.append(splits[c]); - } - - context.command.commandLabel = sb.toString(); - } - - context.command.commandDescription = new ArrayList(); - context.command.commandType = CodeGeneratorUtil.labelToEnumerationValue(context.command.commandLabel); - context.command.commandId = getHeaderId(line); - context.command.nameUpperCamelCase = CodeGeneratorUtil - .labelToUpperCamelCase(context.command.commandLabel); - context.command.nameLowerCamelCase = CodeGeneratorUtil - .upperCamelCaseToLowerCamelCase(context.command.nameUpperCamelCase); - if (context.received) { - context.cluster.received.put(context.command.commandId, context.command); - } else { - context.cluster.generated.put(context.command.commandId, context.command); - } - System.out.println(" " + CodeGeneratorUtil.toHex(context.command.commandId) + ") " - + context.command.commandLabel); - - parseField(context); - continue; - } - - if (field == null) { - continue; - } - - if (line.startsWith("|") && !line.startsWith("|Id") && !line.startsWith("|-")) { - final String row = line.trim().substring(1, line.length() - 1); - final String[] columns = row.split("\\|"); - int value = Integer.parseInt(columns[0].trim().substring(2), 16); - String label = columns[1].trim(); - - field.valueMap.put(value, label); - continue; - } - if (line.startsWith("|") && (line.startsWith("|Id") || line.startsWith("|-"))) { - continue; - } - - if (field.description.size() == 0 && line.trim().length() == 0) { - continue; - } - if (line.trim().length() == 0) { - addBreak = true; - continue; - } - if (addBreak && field.description.size() > 0) { - field.description.add("

"); - addBreak = false; - } - field.description.add(line.trim()); - } - - } - - private static void parseField(Context context) { - int fieldIndex = 0; - boolean addBreak = false; - while (context.lines.size() > 0) { - final String line = context.lines.remove(0); - - // Returning to previous level. - if (line.startsWith("#")) { - context.lines.add(0, line); - return; - } - - if (line.startsWith("|") && !line.startsWith("|Field Name") && !line.startsWith("|-")) { - final String row = line.trim().substring(1, line.length() - 1); - final String[] columns = row.split("\\|"); - final Field field = new Field(); - field.description = new ArrayList(); - field.fieldId = fieldIndex; - field.valueMap = new TreeMap(); - - field.fieldLabel = columns[0].trim(); - if (field.fieldLabel.contains("[")) { - String option = field.fieldLabel.substring(field.fieldLabel.indexOf("[") + 1, - field.fieldLabel.indexOf("]")); - field.fieldLabel = field.fieldLabel.substring(0, field.fieldLabel.indexOf("[")); - field.completeOnZero = true; - } - - field.fieldType = context.command.commandType + "_" - + CodeGeneratorUtil.labelToEnumerationValue(field.fieldLabel); - field.nameUpperCamelCase = CodeGeneratorUtil.labelToEnumerationValue(field.fieldLabel); - field.nameUpperCamelCase = CodeGeneratorUtil.labelToUpperCamelCase(field.fieldLabel); - field.nameLowerCamelCase = CodeGeneratorUtil.upperCamelCaseToLowerCamelCase(field.nameUpperCamelCase); - - String dataTypeName = columns[1].trim(); - if (dataTypeName.contains("[")) { - String fieldString = dataTypeName.substring(dataTypeName.indexOf("[") + 1, - dataTypeName.indexOf("]")); - if (fieldString.length() != 0) { - String conditionOperator = ""; - String condition = ""; - if (fieldString.contains("&&")) { - conditionOperator = "&&"; - } - if (fieldString.contains(">=")) { - conditionOperator = ">="; - } - if (fieldString.contains("==")) { - conditionOperator = "=="; - } - - if (conditionOperator.length() != 0) { - field.listSizer = fieldString.substring(0, fieldString.indexOf(conditionOperator)); - condition = fieldString - .substring(fieldString.indexOf(conditionOperator) + conditionOperator.length()); - - field.condition = condition; - field.conditionOperator = conditionOperator; - } else { - field.listSizer = fieldString; - } - field.listSizer = CodeGeneratorUtil.labelToUpperCamelCase(field.listSizer); - field.listSizer = CodeGeneratorUtil.upperCamelCaseToLowerCamelCase(field.listSizer); - - dataTypeName = dataTypeName.substring(0, dataTypeName.indexOf("[")); - } - } - field.dataType = CodeGeneratorUtil.labelToEnumerationValue(dataTypeName); - - final DataType dataType = new DataType(); - dataType.dataTypeName = dataTypeName; - dataType.dataTypeType = field.dataType; - - dataType.dataTypeClass = ZclDataType.getDataTypeMapping().get(field.dataType).dataClass; - if (dataType.dataTypeClass == null) { - throw new IllegalArgumentException("Type not mapped: " + field.dataType); - } - - field.dataTypeClass = dataType.dataTypeClass; - - context.dataTypes.put(field.dataType, dataType); - context.command.fields.put(field.fieldId, field); - System.out.println(" " + CodeGeneratorUtil.toHex(fieldIndex) + ") " + field.fieldLabel + ": " - + dataType.dataTypeName); - fieldIndex++; - } - - if (line.startsWith("|Id") || line.startsWith("|-")) { - continue; - } - - if (line.startsWith("|")) { - addBreak = false; - continue; - } - - if (context.command.commandDescription.size() == 0 && line.trim().length() == 0) { - continue; - } - if (line.trim().length() == 0) { - addBreak = true; - continue; - } - if (addBreak) { - context.command.commandDescription.add("
"); - addBreak = false; - } - context.command.commandDescription.add(line.trim()); - } - } - - private static void parseExpectedResponse(Context context) { - context.command.responseMatchers = new HashMap(); - while (context.lines.size() > 0) { - final String line = context.lines.remove(0); - - // Returning to previous level. - if (line.startsWith("#")) { - context.lines.add(0, line); - return; - } - - if (line.startsWith("Packet: ")) { - String cmd = line.substring(7); - String splits[] = cmd.split(" "); - StringBuilder sb = new StringBuilder(); - for (int c = 0; c < splits.length - 1; c++) { - if (c != 0) { - sb.append(" "); - } - sb.append(splits[c]); - } - context.command.responseCommand = CodeGeneratorUtil.labelToUpperCamelCase(line.substring(7)); - } - - if (line.startsWith("Match: ")) { - String response = line.substring(7).trim(); - String[] matcher = response.split("=="); - - String responseRequest = getMatcherResponse(matcher[0].trim()); - String responseResponse = getMatcherResponse(matcher[1].trim()); - context.command.responseMatchers.put(responseRequest, responseResponse); - } - } - } - - private static String getMatcherResponse(String definition) { - if (!definition.contains(".")) { - return CodeGeneratorUtil.labelToUpperCamelCase(definition.trim()); - } - - String[] parts = definition.split("\\."); - parts[0] = CodeGeneratorUtil.labelToUpperCamelCase(parts[0].trim()); - parts[1] = CodeGeneratorUtil.labelToUpperCamelCase(parts[1].trim()); - return parts[0] + "().get" + parts[1]; - } - - private static String getHeaderTitle(String line) { - line = line.substring(line.lastIndexOf("#") + 1); - if (line.contains("[")) { - return StringUtils.substringBefore(line, "[").trim(); - } else { - return line.trim(); - } - } - - private static int getHeaderId(String line) { - final String headerIdString = StringUtils.substringBetween(line, "[", "]").trim(); - return CodeGeneratorUtil.fromHex(headerIdString); - } - - private static String getHeaderAbbreviation(String line) { - return StringUtils.substringAfter(line, "]").trim().toLowerCase(); - } - - private static void parseAttributes(Context context) { - Attribute attribute = null; - while (context.lines.size() > 0) { - final String line = context.lines.remove(0); - - // Returning to previous level. - if (line.startsWith("# ") || line.startsWith("## ") || line.startsWith("### ")) { - context.lines.add(0, line); - return; - } - - if (line.startsWith("|") && !line.startsWith("|Id") && !line.startsWith("|-")) { - parseAttributeTable(context, line); - } - - if (line.startsWith("#### ")) { - attribute = null; - for (Attribute attr : context.cluster.attributes.values()) { - if (attr.attributeLabel - .equals(getHeaderTitle(line).substring(0, getHeaderTitle(line).indexOf(" ")))) { - attribute = attr; - break; - } - } - - if (attribute == null) { - System.out.println("***** Attribute not found: " + line); - continue; - } - parseAttribute(context, attribute); - continue; - } - - } - } - - private static void parseAttributeTable(Context context, String line) { - final String row = line.trim().substring(1, line.length() - 1); - final String[] columns = row.split("\\|"); - final Attribute attribute = new Attribute(); - attribute.valueMap = new TreeMap(); - attribute.attributeId = Integer.parseInt(columns[0].trim().substring(2), 16); - attribute.attributeLabel = columns[1].trim(); - attribute.attributeDescription = new ArrayList(); - attribute.attributeAccess = columns[3].trim(); - attribute.attributeImplementation = columns[4].trim(); - attribute.attributeReporting = columns[5].trim(); - attribute.nameUpperCamelCase = CodeGeneratorUtil.labelToEnumerationValue(attribute.attributeLabel); - attribute.nameUpperCamelCase = CodeGeneratorUtil.labelToUpperCamelCase(attribute.attributeLabel); - attribute.nameLowerCamelCase = CodeGeneratorUtil.upperCamelCaseToLowerCamelCase(attribute.nameUpperCamelCase); - attribute.dataType = CodeGeneratorUtil.labelToEnumerationValue(columns[2].trim()); - attribute.enumName = "ATTR_" + attribute.attributeLabel.toUpperCase(); - final DataType dataType = new DataType(); - dataType.dataTypeName = columns[2].trim(); - dataType.dataTypeType = attribute.dataType; - System.out.println(" Type:::" + attribute.attributeLabel + ":: " + dataType.dataTypeType); - dataType.dataTypeClass = ZclDataType.getDataTypeMapping().get(attribute.dataType).dataClass; - if (dataType.dataTypeClass == null) { - throw new IllegalArgumentException("Type not mapped: " + attribute.dataType); - } - attribute.dataTypeClass = dataType.dataTypeClass; - - context.dataTypes.put(attribute.dataType, dataType); - context.cluster.attributes.put(attribute.attributeId, attribute); - } - - private static void parseAttribute(Context context, Attribute attribute) { - boolean addBreak = false; - while (context.lines.size() > 0) { - final String line = context.lines.remove(0); - - // Returning to previous level. - if (line.startsWith("# ") || line.startsWith("## ") || line.startsWith("### ") - || line.startsWith("#### ")) { - context.lines.add(0, line); - return; - } - - if (line.startsWith("|") && !line.startsWith("|Id") && !line.startsWith("|-")) { - final String row = line.trim().substring(1, line.length() - 1); - final String[] columns = row.split("\\|"); - int value = Integer.parseInt(columns[0].trim().substring(2), 16); - String label = columns[1].trim(); - - attribute.valueMap.put(value, label); - continue; - } - - if (line.startsWith("|Id") || line.startsWith("|-")) { - continue; - } - - if ((attribute.attributeDescription.size() == 0 && line.trim().length() == 0)) { - continue; - } - if (line.trim().length() == 0 && attribute.attributeDescription.size() > 0) { - addBreak = true; - continue; - } - if (addBreak && attribute.attributeDescription.size() > 0) { - attribute.attributeDescription.add("

"); - addBreak = false; - } - attribute.attributeDescription.add(line.trim()); - } - } - -} diff --git a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZigBeeBaseClassGenerator.java b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZigBeeBaseClassGenerator.java new file mode 100644 index 000000000..ea3f62580 --- /dev/null +++ b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZigBeeBaseClassGenerator.java @@ -0,0 +1,468 @@ +/** + * Copyright (c) 2016-2019 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.autocode; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.FileReader; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.zsmartsystems.zigbee.autocode.ZclDataType.DataTypeMap; +import com.zsmartsystems.zigbee.autocode.xml.ZigBeeXmlAttribute; +import com.zsmartsystems.zigbee.autocode.xml.ZigBeeXmlCluster; +import com.zsmartsystems.zigbee.autocode.xml.ZigBeeXmlDescription; +import com.zsmartsystems.zigbee.autocode.xml.ZigBeeXmlField; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * + * @author Chris Jackson (zsmartsystems.com) + * + */ + +public abstract class ZigBeeBaseClassGenerator { + private final Logger log = LoggerFactory.getLogger(ZigBeeBaseClassGenerator.class); + + String generatedDate; + + Map dependencies; + + int lineLen = 80; + String sourceRootPath; + private final String licenseText; + List importList = new ArrayList(); + + static String packageRoot = "com.zsmartsystems.zigbee"; + static String packageZcl = ".zcl"; + static String packageZclField = packageZcl + ".field"; + String packageZclCluster = packageZcl + ".clusters"; + String packageZclProtocol = packageZcl + ".protocol"; + String packageZclProtocolCommand = packageZclCluster; + + static String packageZdp = ".zdo"; + static String packageZdpField = packageZdp + ".field"; + String packageZdpCommand = packageZdp + ".command"; + String packageZdpTransaction = packageZdp + ".transaction"; + String packageZdpDescriptors = packageZdpField; + + private static List standardTypes = new ArrayList<>(); + private static Map customTypes = new HashMap<>(); + private static List fixedCaseAcronyms = new ArrayList<>(); + static { + fixedCaseAcronyms.add("AA"); + fixedCaseAcronyms.add("AC"); + fixedCaseAcronyms.add("AAA"); + fixedCaseAcronyms.add("ACE"); + fixedCaseAcronyms.add("APS"); + fixedCaseAcronyms.add("CIE"); + fixedCaseAcronyms.add("CR"); + fixedCaseAcronyms.add("CO"); + fixedCaseAcronyms.add("CO2"); + fixedCaseAcronyms.add("DC"); + fixedCaseAcronyms.add("DRLC"); + fixedCaseAcronyms.add("DST"); + fixedCaseAcronyms.add("ECC"); + fixedCaseAcronyms.add("ECDSA"); + fixedCaseAcronyms.add("EUI"); + fixedCaseAcronyms.add("FC"); + fixedCaseAcronyms.add("HAN"); + fixedCaseAcronyms.add("HW"); + fixedCaseAcronyms.add("ID"); + fixedCaseAcronyms.add("IAS"); + fixedCaseAcronyms.add("IEEE"); + fixedCaseAcronyms.add("LQI"); + fixedCaseAcronyms.add("MAC"); + fixedCaseAcronyms.add("MMO"); + fixedCaseAcronyms.add("NWK"); + fixedCaseAcronyms.add("PIN"); + fixedCaseAcronyms.add("PIR"); + fixedCaseAcronyms.add("RMS"); + fixedCaseAcronyms.add("RSSI"); + fixedCaseAcronyms.add("SMAC"); + fixedCaseAcronyms.add("SW"); + fixedCaseAcronyms.add("UTC"); + fixedCaseAcronyms.add("WAN"); + fixedCaseAcronyms.add("WD"); + fixedCaseAcronyms.add("XY"); + fixedCaseAcronyms.add("ZCL"); + + fixedCaseAcronyms.add("may"); + fixedCaseAcronyms.add("shall"); + fixedCaseAcronyms.add("should"); + + fixedCaseAcronyms.add("ZigBee"); + + standardTypes.add("Integer"); + standardTypes.add("Boolean"); + standardTypes.add("Object"); + standardTypes.add("Long"); + standardTypes.add("String"); + standardTypes.add("int[]"); + + customTypes.put("IeeeAddress", packageRoot + ".IeeeAddress"); + customTypes.put("ByteArray", packageRoot + packageZclField + ".ByteArray"); + customTypes.put("ZclStatus", packageRoot + packageZcl + ".ZclStatus"); + customTypes.put("ZdoStatus", packageRoot + packageZdp + ".ZdoStatus"); + customTypes.put("BindingTable", packageRoot + packageZdpField + ".BindingTable"); + customTypes.put("NeighborTable", packageRoot + packageZdpField + ".NeighborTable"); + customTypes.put("RoutingTable", packageRoot + packageZdpField + ".RoutingTable"); + customTypes.put("Calendar", "java.util.Calendar"); + customTypes.put("ImageUpgradeStatus", packageRoot + packageZclField + ".ImageUpgradeStatus"); + } + + ZigBeeBaseClassGenerator(String sourceRootPath, String licenseText) { + this.sourceRootPath = sourceRootPath; + this.licenseText = licenseText; + } + + protected String stringToConstantEnum(String value) { + return stringToConstant(value).replaceAll("_", ""); + } + + protected String stringToConstant(String value) { + // value = value.replaceAll("\\(.*?\\) ?", ""); + value = value.trim(); + value = value.replace("+", "_Plus"); + value = value.replace("(", "_"); + value = value.replace(")", "_"); + value = value.replace(" ", "_"); + value = value.replace("-", "_"); + value = value.replace(".", "_"); + value = value.replace("/", "_"); + value = value.replace("#", "_"); + value = value.replaceAll("_+", "_"); + if (value.endsWith("_")) { + value = value.substring(0, value.length() - 1); + } + return value.toUpperCase(); + } + + private String toProperCase(String s) { + return s.substring(0, 1).toUpperCase() + s.substring(1).toLowerCase(); + } + + private String toCamelCase(String value) { + // value = value.replaceAll("\\(.*?\\) ?", ""); + value = value.replace("(", "_"); + value = value.replace(")", "_"); + value = value.replace("+", "_Plus"); + value = value.replace(" ", "_"); + value = value.replace("-", "_"); + value = value.replace(".", "_"); + value = value.replace("/", "_"); + value = value.replace("#", "_"); + value = value.replaceAll("_+", "_"); + String[] parts = value.split("_"); + String camelCaseString = ""; + for (String part : parts) { + camelCaseString = camelCaseString + toProperCase(part); + } + return camelCaseString; + } + + protected String stringToUpperCamelCase(String value) { + return toCamelCase(value); + } + + protected String stringToLowerCamelCase(String value) { + String cc = toCamelCase(value); + + return cc.substring(0, 1).toLowerCase() + cc.substring(1); + } + + protected String upperCaseFirstCharacter(String val) { + return val.substring(0, 1).toUpperCase() + val.substring(1); + } + + protected String lowerCaseFirstCharacter(String val) { + return val.substring(0, 1).toLowerCase() + val.substring(1); + } + + protected PrintWriter getClassOut(File packageFile, String className) throws FileNotFoundException { + packageFile.mkdirs(); + final File classFile = new File(packageFile + File.separator + className + ".java"); + log.debug("Generating: {}", classFile.getAbsolutePath()); + final FileOutputStream fileOutputStream = new FileOutputStream(classFile, false); + return new PrintWriter(fileOutputStream); + } + + protected void importsClear() { + importList.clear(); + } + + protected void importsAdd(String importClass) { + if (importList.contains(importClass)) { + return; + } + importList.add(importClass); + } + + protected void outputImports(final PrintWriter out) { + Collections.sort(importList); + boolean found = false; + for (final String importClass : importList) { + if (!importClass.startsWith("java.")) { + continue; + } + found = true; + out.println("import " + importClass + ";"); + } + if (found) { + out.println(); + found = false; + } + for (final String importClass : importList) { + if (!importClass.startsWith("javax.")) { + continue; + } + found = true; + out.println("import " + importClass + ";"); + } + if (found) { + out.println(); + found = false; + } + for (final String importClass : importList) { + if (importClass.startsWith("java.") || importClass.startsWith("javax.")) { + continue; + } + out.println("import " + importClass + ";"); + } + } + + protected void outputWithLinebreak(PrintWriter out, String indent, List descriptions) { + boolean firstDescription = true; + for (ZigBeeXmlDescription description : descriptions) { + if (description.description == null) { + continue; + } + String[] words = description.description.split("\\s+"); + if (words.length == 0) { + continue; + } + + if (!firstDescription) { + out.println(indent + " *

"); + } + firstDescription = false; + + out.print(indent + " *"); + int len = 2 + indent.length(); + + for (String word : words) { + if (word.equalsIgnoreCase("note:")) { + if (len > 2) { + out.println(); + } + out.println(indent + " *

"); + out.print(indent + " * Note:"); + continue; + } + if (len + word.length() > lineLen) { + out.println(); + out.print(indent + " *"); + len = 2 + indent.length(); + } + out.print(" "); + + for (String acronym : fixedCaseAcronyms) { + if (acronym.equalsIgnoreCase(word)) { + word = acronym; + } + } + + out.print(word); + len += word.length(); + } + + if (len != 0) { + out.println(); + } + } + } + + protected void outputLicense(PrintWriter out) { + out.println("/**"); + for (String line: licenseText.split("\n")) { + out.println(" * " + line); + + } + out.println(" */"); + } + + protected File getPackageFile(String packagePath) { + final File packageFile = new File(packagePath); + if (!packageFile.exists()) { + packageFile.mkdirs(); + } + return packageFile; + } + + protected String getPackagePath(File sourceRootPath, String packageRoot) { + return sourceRootPath.getAbsolutePath() + File.separator + packageRoot.replace(".", File.separator); + } + + protected void outputClassGenerated(PrintWriter out) { + out.println("@Generated(value = \"" + getClass().getName() + "\", date = \"" + generatedDate + + "\")"); + } + + protected void outputAttributeJavaDoc(PrintWriter out, String type, ZigBeeXmlAttribute attribute, + DataTypeMap zclDataType) { + out.println(); + out.println(" /**"); + out.println(" * " + type + " the " + attribute.name + " attribute [attribute ID 0x" + + String.format("%04X", attribute.code) + "]."); + if (attribute.description.size() != 0) { + out.println(" *

"); + outputWithLinebreak(out, " ", attribute.description); + } + if ("Synchronously get".equals(type)) { + out.println(" *

"); + out.println(" * This method can return cached data if the attribute has already been received."); + out.println( + " * The parameter refreshPeriod is used to control this. If the attribute has been received"); + out.println( + " * within refreshPeriod milliseconds, then the method will immediately return the last value"); + out.println( + " * received. If refreshPeriod is set to 0, then the attribute will always be updated."); + out.println(" *

"); + out.println( + " * This method will block until the response is received or a timeout occurs unless the current value is returned."); + } + out.println(" *

"); + out.println(" * The attribute is of type {@link " + getDataTypeClass(attribute) + "}."); + out.println(" *

"); + out.println(" * The implementation of this attribute by a device is " + + (attribute.optional ? "OPTIONAL" : "MANDATORY")); + out.println(" *"); + if (attribute.arrayCount != null && attribute.arrayStart != null) { + out.println(" * @param arrayOffset attribute array offset (" + attribute.arrayStart + + " < arrayOffset < " + (attribute.arrayStart + attribute.arrayCount - 1) + ")"); + } + if ("Set reporting for".equals(type)) { + out.println(" * @param minInterval minimum reporting period"); + out.println(" * @param maxInterval maximum reporting period"); + if (zclDataType.analogue) { + out.println(" * @param reportableChange {@link Object} delta required to trigger report"); + } + } else if ("Set".equals(type)) { + out.println(" * @param " + stringToLowerCamelCase(attribute.name) + " the {@link " + + getDataTypeClass(attribute) + "} attribute value to be set"); + } + + if ("Synchronously get".equals(type)) { + out.println( + " * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed"); + out.println( + " * @return the {@link " + getDataTypeClass(attribute) + "} attribute value, or null on error"); + } else { + out.println(" * @return the {@link Future} command result future"); + } + out.println(" */"); + } + + protected String getDataTypeClass(ZigBeeXmlAttribute attribute) { + // if (attribute.implementationClass.isEmpty()) { + if (ZclDataType.getDataTypeMapping().get(attribute.type) != null) { + return ZclDataType.getDataTypeMapping().get(attribute.type).dataClass; + } + + if (dependencies.containsKey(attribute.implementationClass)) { + // importsAdd(dependencies.get(type)); + return attribute.implementationClass; + } + + log.warn("Unknown data type {}", attribute.type); + return "(UNKNOWN::" + attribute.type + ")"; + // } + // return attribute.implementationClass; + } + + protected String getDataTypeClass(ZigBeeXmlField field) { + String dataType = ""; + + // if (field.implementationClass.isEmpty()) { + if (ZclDataType.getDataTypeMapping().get(field.type) != null) { + dataType = ZclDataType.getDataTypeMapping().get(field.type).dataClass; + } else if (dependencies.containsKey(field.implementationClass)) { + // importsAdd(dependencies.get(type)); + dataType = field.implementationClass; + } + + if (dataType.isEmpty()) { + log.warn("Unknown data type {}", field.type); + return "(UNKNOWN::" + field.type + ")"; + } + + if (field.sizer == null) { + return dataType; + } else { + return "List<" + dataType + ">"; + } + + // } + // return field.implementationClass; + } + + protected void importsAddClass(ZigBeeXmlField field) { + importsAddClassInternal(getDataTypeClass(field)); + } + + protected void importsAddClass(ZigBeeXmlAttribute attribute) { + importsAddClassInternal(getDataTypeClass(attribute)); + } + + protected void importsAddClassInternal(String type) { + String typeName = type; + if (type.startsWith("List")) { + importsAdd("java.util.List"); + typeName = typeName.substring(typeName.indexOf("<") + 1, typeName.indexOf(">")); + } + + if (standardTypes.contains(typeName)) { + return; + } + + if (customTypes.containsKey(typeName)) { + importsAdd(customTypes.get(typeName)); + return; + } + + if (dependencies.containsKey(type)) { + importsAdd(dependencies.get(type)); + return; + } + + String packageName; + if (type.contains("Descriptor")) { + packageName = packageZdpDescriptors; + } else { + packageName = packageZclField; + } + importsAdd(packageRoot + packageName + "." + typeName); + } + + protected String getZclClusterCommandPackage(ZigBeeXmlCluster cluster) { + if (cluster.name.startsWith("ZDO")) { + return packageRoot + packageZdpCommand; + } else { + return packageRoot + packageZclProtocolCommand + "." + + stringToLowerCamelCase(cluster.name).replace("_", "").toLowerCase(); + } + } +} diff --git a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZigBeeBaseFieldGenerator.java b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZigBeeBaseFieldGenerator.java new file mode 100644 index 000000000..52a1b25ae --- /dev/null +++ b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZigBeeBaseFieldGenerator.java @@ -0,0 +1,284 @@ +/** + * Copyright (c) 2016-2019 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.autocode; + +import java.io.PrintWriter; +import java.util.List; + +import com.zsmartsystems.zigbee.autocode.xml.ZigBeeXmlField; + +/** + * + * @author Chris Jackson (zsmartsystems.com) + * + */ +public class ZigBeeBaseFieldGenerator extends ZigBeeBaseClassGenerator { + private final String OPERATOR_LOGIC_AND = "LOGIC_AND"; + private final String OPERATOR_EQUAL = "EQUAL"; + private final String OPERATOR_NOT_EQUAL = "NOT_EQUAL"; + private final String OPERATOR_GREATER_THAN = "GREATER_THAN"; + private final String OPERATOR_GREATER_THAN_OR_EQUAL = "GREATER_THAN_OR_EQUAL"; + private final String OPERATOR_LESS_THAN = "LESS_THAN"; + private final String OPERATOR_LESS_THAN_OR_EQUAL = "LESS_THAN_OR_EQUAL"; + + ZigBeeBaseFieldGenerator(String sourceRootPath, String licenseText) { + super(sourceRootPath, licenseText); + } + + protected void generateFields(PrintWriter out, String parentClass, String className, List fields, + List reservedFields) { + for (final ZigBeeXmlField field : fields) { + if (reservedFields.contains(stringToLowerCamelCase(field.name))) { + continue; + } + if (getAutoSized(fields, stringToLowerCamelCase(field.name)) != null) { + continue; + } + + out.println(); + out.println(" /**"); + out.println(" * Gets " + field.name + "."); + if (field.description.size() != 0) { + out.println(" *

"); + outputWithLinebreak(out, " ", field.description); + } + out.println(" *"); + out.println(" * @return the " + field.name); + out.println(" */"); + out.println(" public " + getDataTypeClass(field) + " get" + stringToUpperCamelCase(field.name) + "() {"); + out.println(" return " + stringToLowerCamelCase(field.name) + ";"); + out.println(" }"); + out.println(); + out.println(" /**"); + out.println(" * Sets " + field.name + "."); + if (field.description.size() != 0) { + out.println(" *

"); + outputWithLinebreak(out, " ", field.description); + } + out.println(" *"); + out.println(" * @param " + stringToLowerCamelCase(field.name) + " the " + field.name); + out.println(" */"); + out.println(" public void set" + stringToUpperCamelCase(field.name) + "(final " + getDataTypeClass(field) + + " " + stringToLowerCamelCase(field.name) + ") {"); + out.println(" this." + stringToLowerCamelCase(field.name) + " = " + + stringToLowerCamelCase(field.name) + ";"); + out.println(" }"); + + } + + if (fields.size() > 0) { + out.println(); + out.println(" @Override"); + out.println(" public void serialize(final ZclFieldSerializer serializer) {"); + if (parentClass.startsWith("Zdo")) { + out.println(" super.serialize(serializer);"); + out.println(); + } + + for (final ZigBeeXmlField field : fields) { + // if (reservedFields.contains(stringToLowerCamelCase(field.name))) { + // continue; + // } + + // Rules... + // if listSizer == null, then just output the field + // if listSizer != null and contains && then check the param bit + if (getAutoSized(fields, stringToLowerCamelCase(field.name)) != null) { + ZigBeeXmlField sizedField = getAutoSized(fields, stringToLowerCamelCase(field.name)); + out.println(" serializer.serialize(" + stringToLowerCamelCase(sizedField.name) + + ".size(), ZclDataType." + field.type + ");"); + + continue; + } + + if (field.sizer != null) { + out.println(" for (int cnt = 0; cnt < " + stringToLowerCamelCase(field.name) + + ".size(); cnt++) {"); + out.println(" serializer.serialize(" + stringToLowerCamelCase(field.name) + + ".get(cnt), ZclDataType." + field.type + ");"); + out.println(" }"); + } else if (field.condition != null) { + if (field.condition.value.equals("statusResponse")) { + // Special case where a ZclStatus may be sent, or, a list of results. + // This checks for a single response + out.println(" if (status == ZclStatus.SUCCESS) {"); + out.println(" serializer.serialize(status, ZclDataType.ZCL_STATUS);"); + out.println(" return;"); + out.println(" }"); + continue; + } else if (field.condition.operator.equals(OPERATOR_LOGIC_AND)) { + out.println( + " if ((" + field.condition.field + " & " + field.condition.value + ") != 0) {"); + } else { + out.println(" if (" + field.condition.field + " " + getOperator(field.condition.operator) + + " " + field.condition.value + ") {"); + } + out.println(" serializer.serialize(" + stringToLowerCamelCase(field.name) + + ", ZclDataType." + field.type + ");"); + out.println(" }"); + } else { + if (field.type != null && !field.type.isEmpty()) { + out.println(" serializer.serialize(" + stringToLowerCamelCase(field.name) + + ", ZclDataType." + field.type + ");"); + } else { + out.println(" " + stringToLowerCamelCase(field.name) + ".serialize(serializer);"); + } + } + } + out.println(" }"); + + out.println(); + out.println(" @Override"); + out.println(" public void deserialize(final ZclFieldDeserializer deserializer) {"); + if (parentClass.startsWith("Zdo")) { + out.println(" super.deserialize(deserializer);"); + out.println(); + } + boolean first = true; + for (final ZigBeeXmlField field : fields) { + if (field.sizer != null) { + if (first) { + out.println(" // Create lists"); + first = false; + } + out.println(" " + stringToLowerCamelCase(field.name) + " = new Array" + + getDataTypeClass(field) + "();"); + } + } + if (first == false) { + out.println(); + } + for (final ZigBeeXmlField field : fields) { + // if (reservedFields.contains(stringToLowerCamelCase(field.name))) { + // continue; + // } + + if (field.completeOnZero) { + out.println(" if (deserializer.isEndOfStream()) {"); + out.println(" return;"); + out.println(" }"); + } + if (getAutoSized(fields, stringToLowerCamelCase(field.name)) != null) { + out.println( + " Integer " + stringToLowerCamelCase(field.name) + " = (" + getDataTypeClass(field) + + ") deserializer.deserialize(" + "ZclDataType." + field.type + ");"); + continue; + } + + if (field.sizer != null) { + String dataType = getDataTypeClass(field).substring(getDataTypeClass(field).indexOf('<') + 1, + getDataTypeClass(field).indexOf('>')); + + out.println(" if (" + field.sizer + " != null) {"); + out.println(" for (int cnt = 0; cnt < " + field.sizer + "; cnt++) {"); + out.println(" " + stringToLowerCamelCase(field.name) + ".add((" + dataType + + ") deserializer.deserialize(" + "ZclDataType." + field.type + "));"); + out.println(" }"); + out.println(" }"); + } else if (field.condition != null) { + if (field.condition.value.equals("statusResponse")) { + // Special case where a ZclStatus may be sent, or, a list of results. + // This checks for a single response + out.println(" if (deserializer.getRemainingLength() == 1) {"); + out.println( + " status = (ZclStatus) deserializer.deserialize(ZclDataType.ZCL_STATUS);"); + out.println(" return;"); + out.println(" }"); + continue; + } else if (field.condition.operator.equals(OPERATOR_LOGIC_AND)) { + out.println( + " if ((" + field.condition.field + " & " + field.condition.value + ") != 0) {"); + } else { + out.println(" if (" + field.condition.field + " " + getOperator(field.condition.operator) + + " " + field.condition.value + ") {"); + } + out.println(" " + stringToLowerCamelCase(field.name) + " = (" + getDataTypeClass(field) + + ") deserializer.deserialize(" + "ZclDataType." + field.type + ");"); + out.println(" }"); + } else { + if (field.type != null && !field.type.isEmpty()) { + out.println(" " + stringToLowerCamelCase(field.name) + " = (" + getDataTypeClass(field) + + ") deserializer.deserialize(" + "ZclDataType." + field.type + ");"); + } else { + out.println(" " + stringToLowerCamelCase(field.name) + " = new " + + getDataTypeClass(field) + "();"); + out.println(" " + stringToLowerCamelCase(field.name) + ".deserialize(deserializer);"); + } + } + + if (field.name.toLowerCase().equals("status") && field.type.equals("ZDO_STATUS")) { + out.println(" if (status != ZdoStatus.SUCCESS) {"); + out.println(" // Don't read the full response if we have an error"); + out.println(" return;"); + out.println(" }"); + } + } + out.println(" }"); + } + } + + protected void generateToString(PrintWriter out, String className, List fields, + List reservedFields) { + int fieldLen = 0; + for (final ZigBeeXmlField field : fields) { + fieldLen += stringToLowerCamelCase(field.name).length() + 20; + } + + out.println(); + out.println(" @Override"); + out.println(" public String toString() {"); + out.println(" final StringBuilder builder = new StringBuilder(" + (className.length() + 3 + fieldLen) + + ");"); + + out.println(" builder.append(\"" + className + " [\");"); + out.println(" builder.append(super.toString());"); + for (final ZigBeeXmlField field : fields) { + // if (reservedFields.contains(stringToLowerCamelCase(field.name))) { + // continue; + // } + if (getAutoSized(fields, stringToLowerCamelCase(field.name)) != null) { + continue; + } + out.println(" builder.append(\", " + stringToLowerCamelCase(field.name) + "=\");"); + out.println(" builder.append(" + stringToLowerCamelCase(field.name) + ");"); + } + out.println(" builder.append(\']\');"); + out.println(" return builder.toString();"); + out.println(" }"); + } + + private String getOperator(String operator) { + switch (operator) { + case OPERATOR_LOGIC_AND: + return "&&"; + case OPERATOR_EQUAL: + return "=="; + case OPERATOR_NOT_EQUAL: + return "!="; + case OPERATOR_GREATER_THAN: + return ">"; + case OPERATOR_GREATER_THAN_OR_EQUAL: + return ">="; + case OPERATOR_LESS_THAN: + return "<"; + case OPERATOR_LESS_THAN_OR_EQUAL: + return "<"; + default: + return "<>"; + } + } + + protected ZigBeeXmlField getAutoSized(List fields, String name) { + for (ZigBeeXmlField field : fields) { + if (name.equals(field.sizer)) { + return field; + } + } + return null; + } +} diff --git a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZigBeeZclClusterGenerator.java b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZigBeeZclClusterGenerator.java new file mode 100644 index 000000000..b280008ea --- /dev/null +++ b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZigBeeZclClusterGenerator.java @@ -0,0 +1,452 @@ +/** + * Copyright (c) 2016-2019 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.autocode; + +import java.io.File; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +import com.zsmartsystems.zigbee.autocode.ZclDataType.DataTypeMap; +import com.zsmartsystems.zigbee.autocode.xml.ZigBeeXmlAttribute; +import com.zsmartsystems.zigbee.autocode.xml.ZigBeeXmlCluster; +import com.zsmartsystems.zigbee.autocode.xml.ZigBeeXmlCommand; +import com.zsmartsystems.zigbee.autocode.xml.ZigBeeXmlField; + +/** + * + * @author Chris Jackson (zsmartsystems.com) + * + */ +public class ZigBeeZclClusterGenerator extends ZigBeeBaseClassGenerator { + + ZigBeeZclClusterGenerator(String sourceRootPath, String licenseText, List clusters, String generatedDate, Map dependencies) { + super(sourceRootPath, licenseText); + this.generatedDate = generatedDate; + this.dependencies = dependencies; + + for (ZigBeeXmlCluster cluster : clusters) { + // Suppress GENERAL cluster as it's not really a cluster! + if (cluster.name.equalsIgnoreCase("GENERAL")) { + continue; + } + + try { + generateZclClusterClasses(cluster, packageRoot, new File(sourceRootPath)); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + } + + private void generateZclClusterClasses(ZigBeeXmlCluster cluster, String packageRootPrefix, File sourceRootPath) + throws IOException { + + final String packageRoot = packageRootPrefix; + final String packagePath = getPackagePath(sourceRootPath, packageRoot); + final File packageFile = getPackageFile(packagePath + (packageZclCluster).replace('.', '/')); + + final String className = "Zcl" + stringToUpperCamelCase(cluster.name) + "Cluster"; + final PrintWriter out = getClassOut(packageFile, className); + + outputLicense(out); + + out.println("package " + packageRoot + packageZclCluster + ";"); + out.println(); + + importsClear(); + + int commandsServer = 0; + int commandsClient = 0; + for (final ZigBeeXmlCommand command : cluster.commands) { + importsAdd(packageRoot + packageZclCluster + "." + stringToLowerCamelCase(cluster.name).toLowerCase() + "." + + stringToUpperCamelCase(command.name)); + + if (command.source.equals("server")) { + commandsServer++; + } + if (command.source.equals("client")) { + commandsClient++; + } + + for (final ZigBeeXmlField field : command.fields) { + importsAddClass(field); + } + } + + boolean addAttributeTypes = false; + boolean readAttributes = false; + boolean writeAttributes = false; + int attributesServer = 0; + int attributesClient = 0; + for (final ZigBeeXmlAttribute attribute : cluster.attributes) { + if (attribute.writable) { + addAttributeTypes = true; + writeAttributes = true; + } + readAttributes = true; + if (attribute.side.equals("server")) { + attributesServer++; + } + if (attribute.side.equals("client")) { + attributesClient++; + } + + importsAddClass(attribute); + } + + if (addAttributeTypes) { + importsAdd("com.zsmartsystems.zigbee.zcl.protocol.ZclDataType"); + } + + importsAdd(packageRoot + packageZcl + ".ZclCluster"); + if (attributesServer > 0) { + importsAdd(packageRoot + packageZclProtocol + ".ZclDataType"); + importsAdd(packageRoot + packageZclProtocol + ".ZclClusterType"); + } + + if (!cluster.commands.isEmpty()) { + importsAdd(packageRoot + packageZcl + ".ZclCommand"); + } + // imports.add(packageRoot + packageZcl + ".ZclCommandMessage"); + importsAdd("javax.annotation.Generated"); + + // imports.add(packageRoot + ".ZigBeeDestination"); + importsAdd(packageRoot + ".ZigBeeEndpoint"); + if (!cluster.attributes.isEmpty() | !cluster.commands.isEmpty()) { + importsAdd(packageRoot + ".CommandResult"); + importsAdd("java.util.concurrent.Future"); + } + // imports.add(packageRoot + ".ZigBeeEndpoint"); + importsAdd(packageRoot + packageZcl + ".ZclAttribute"); + importsAdd("java.util.Map"); + importsAdd("java.util.concurrent.ConcurrentHashMap"); + + outputImports(out); + + out.println(); + out.println("/**"); + out.println(" * " + cluster.name + " cluster implementation (Cluster ID " + + String.format("0x%04X", cluster.code) + ")."); + if (!cluster.description.isEmpty()) { + out.println(" *

"); + outputWithLinebreak(out, "", cluster.description); + } + + out.println(" *

"); + out.println(" * Code is auto-generated. Modifications may be overwritten!"); + + out.println(" */"); + // outputClassJavaDoc(out); + outputClassGenerated(out); + out.println("public class " + className + " extends ZclCluster {"); + + out.println(" /**"); + out.println(" * The ZigBee Cluster Library Cluster ID"); + out.println(" */"); + out.println(" public static final int CLUSTER_ID = " + String.format("0x%04X;", cluster.code)); + out.println(); + out.println(" /**"); + out.println(" * The ZigBee Cluster Library Cluster Name"); + out.println(" */"); + out.println(" public static final String CLUSTER_NAME = \"" + cluster.name + "\";"); + out.println(); + + if (cluster.attributes.size() != 0) { + out.println(" // Attribute constants"); + for (final ZigBeeXmlAttribute attribute : cluster.attributes) { + if (attribute.arrayStart != null && attribute.arrayCount != null && attribute.arrayCount > 0) { + int arrayCount = attribute.arrayStart; + int arrayStep = attribute.arrayStep == null ? 1 : attribute.arrayStep; + for (int count = 0; count < attribute.arrayCount; count++) { + if (!attribute.description.isEmpty()) { + out.println(" /**"); + outputWithLinebreak(out, " ", attribute.description); + out.println(" */"); + } + String name = attribute.name.replaceAll("\\{\\{count\\}\\}", Integer.toString(arrayCount)); + out.println(" public static final int " + getEnum(name) + " = " + + String.format("0x%04X", attribute.code + arrayCount) + ";"); + arrayCount += arrayStep; + } + } else { + if (!attribute.description.isEmpty()) { + out.println(" /**"); + outputWithLinebreak(out, " ", attribute.description); + out.println(" */"); + } + out.println(" public static final int " + getEnum(attribute.name) + " = " + + String.format("0x%04X", attribute.code) + ";"); + } + } + out.println(); + } + + out.println(" // Attribute initialisation"); + out.println(" @Override"); + out.println(" protected Map initializeAttributes() {"); + out.println(" Map attributeMap = new ConcurrentHashMap(" + + attributesServer + ");"); + + if (attributesServer != 0) { + out.println(); + for (final ZigBeeXmlAttribute attribute : cluster.attributes) { + if (!attribute.side.equalsIgnoreCase("server")) { + continue; + } + + if (attribute.arrayStart != null && attribute.arrayCount != null && attribute.arrayCount > 0) { + int arrayCount = attribute.arrayStart; + int arrayStep = attribute.arrayStep == null ? 1 : attribute.arrayStep; + for (int count = 0; count < attribute.arrayCount; count++) { + String name = attribute.name.replaceAll("\\{\\{count\\}\\}", Integer.toString(arrayCount)); + out.println(" attributeMap.put(" + getEnum(name) + ", " + + defineAttribute(attribute, cluster.name, name, 0) + ");"); + arrayCount += arrayStep; + } + } else { + out.println(" attributeMap.put(" + getEnum(attribute.name) + ", " + + defineAttribute(attribute, cluster.name, attribute.name, 0) + ");"); + } + } + } + + // TODO: Add client attributes + + out.println(); + out.println(" return attributeMap;"); + out.println(" }"); + out.println(); + + out.println(" /**"); + out.println(" * Default constructor to create a " + cluster.name + " cluster."); + out.println(" *"); + out.println(" * @param zigbeeEndpoint the {@link ZigBeeEndpoint} this cluster is contained within"); + out.println(" */"); + out.println(" public " + className + "(final ZigBeeEndpoint zigbeeEndpoint) {"); + out.println(" super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME);"); + out.println(" }"); + + for (final ZigBeeXmlAttribute attribute : cluster.attributes) { + DataTypeMap zclDataType = ZclDataType.getDataTypeMapping().get(attribute.type); + if (zclDataType == null) { + throw new IllegalArgumentException( + "Unknown ZCL Type \"" + attribute.type + "\" for attribute \"" + attribute.name + "\"."); + } + + if (attribute.writable) { + outputAttributeJavaDoc(out, "Set", attribute, zclDataType); + if (attribute.arrayStart != null && attribute.arrayCount != null && attribute.arrayCount > 0) { + String name = attribute.name.replaceAll("\\{\\{count\\}\\}", ""); + out.println(" public Future set" + stringToUpperCamelCase(name).replace("_", "") + + "(final int arrayOffset, final " + getDataTypeClass(attribute) + " value) {"); + name = attribute.name.replaceAll("\\{\\{count\\}\\}", Integer.toString(attribute.arrayStart)); + out.println(" return write(attributes.get(" + getEnum(name) + " + arrayOffset), value);"); + } else { + out.println(" public Future set" + + stringToUpperCamelCase(attribute.name).replace("_", "") + "(final " + + getDataTypeClass(attribute) + " value) {"); + out.println(" return write(attributes.get(" + getEnum(attribute.name) + "), value);"); + } + out.println(" }"); + } + + // if (attribute.attributeAccess.toLowerCase().contains("read")) { + outputAttributeJavaDoc(out, "Get", attribute, zclDataType); + if (attribute.arrayStart != null && attribute.arrayCount != null && attribute.arrayCount > 0) { + String name = attribute.name.replaceAll("\\{\\{count\\}\\}", ""); + out.println(" public Future get" + stringToUpperCamelCase(name).replace("_", "") + + "Async(final int arrayOffset) {"); + out.println(" if (arrayOffset < " + attribute.arrayStart + " || arrayOffset > " + + (attribute.arrayStart + attribute.arrayCount - 1) + ") {"); + out.println(" throw new IllegalArgumentException(\"arrayOffset out of bounds\");"); + out.println(" }"); + out.println(); + name = attribute.name.replaceAll("\\{\\{count\\}\\}", Integer.toString(attribute.arrayStart)); + out.println(" return read(attributes.get(" + getEnum(name) + " + arrayOffset));"); + } else { + out.println(" public Future get" + + stringToUpperCamelCase(attribute.name).replace("_", "") + "Async() {"); + out.println(" return read(attributes.get(" + getEnum(attribute.name) + "));"); + } + out.println(" }"); + + // TODO: Needs to document the counter + outputAttributeJavaDoc(out, "Synchronously get", attribute, zclDataType); + if (attribute.arrayStart != null && attribute.arrayCount != null && attribute.arrayCount > 0) { + String name = attribute.name.replaceAll("\\{\\{count\\}\\}", ""); + out.println(" public " + getDataTypeClass(attribute) + " get" + + stringToUpperCamelCase(name).replace("_", "") + + "(final int arrayOffset, final long refreshPeriod) {"); + name = attribute.name.replaceAll("\\{\\{count\\}\\}", Integer.toString(attribute.arrayStart)); + out.println(" if (attributes.get(" + getEnum(name) + " + arrayOffset" + + ").isLastValueCurrent(refreshPeriod)) {"); + out.println(" return (" + getDataTypeClass(attribute) + ") attributes.get(" + getEnum(name) + + " + arrayOffset).getLastValue();"); + out.println(" }"); + out.println(); + out.println(" return (" + getDataTypeClass(attribute) + ") readSync(attributes.get(" + + getEnum(name) + " + arrayOffset));"); + } else { + out.println(" public " + getDataTypeClass(attribute) + " get" + + stringToUpperCamelCase(attribute.name).replace("_", "") + "(final long refreshPeriod) {"); + out.println(" if (attributes.get(" + getEnum(attribute.name) + + ").isLastValueCurrent(refreshPeriod)) {"); + out.println(" return (" + getDataTypeClass(attribute) + ") attributes.get(" + + getEnum(attribute.name) + ").getLastValue();"); + out.println(" }"); + out.println(); + out.println(" return (" + getDataTypeClass(attribute) + ") readSync(attributes.get(" + + getEnum(attribute.name) + "));"); + } + out.println(" }"); + // } + + if (!attribute.optional) { + outputAttributeJavaDoc(out, "Set reporting for", attribute, zclDataType); + if (attribute.arrayStart != null && attribute.arrayCount != null && attribute.arrayCount > 0) { + String name = attribute.name.replaceAll("\\{\\{count\\}\\}", + Integer.toString(attribute.arrayStart)); + String offset; + if (attribute.arrayStep == null) { + offset = "arrayOffset - 1"; + } else { + offset = "(arrayOffset - 1) * " + attribute.arrayStep; + } + + if (zclDataType.analogue) { + out.println(" public Future set" + stringToUpperCamelCase(name) + + "Reporting(final int arrayOffset, final int minInterval, final int maxInterval, final Object reportableChange) {"); + out.println(" return setReporting(attributes.get(" + getEnum(name) + " + " + offset + + "), minInterval, maxInterval, reportableChange);"); + } else { + out.println(" public Future set" + stringToUpperCamelCase(name) + + "Reporting(final int arrayOffset, final int minInterval, final int maxInterval) {"); + out.println(" return setReporting(attributes.get(" + getEnum(name) + " + " + offset + + "), minInterval, maxInterval);"); + } + } else { + if (zclDataType.analogue) { + out.println(" public Future set" + stringToUpperCamelCase(attribute.name) + + "Reporting(final int minInterval, final int maxInterval, final Object reportableChange) {"); + out.println(" return setReporting(attributes.get(" + getEnum(attribute.name) + + "), minInterval, maxInterval, reportableChange);"); + } else { + out.println(" public Future set" + stringToUpperCamelCase(attribute.name) + + "Reporting(final int minInterval, final int maxInterval) {"); + out.println(" return setReporting(attributes.get(" + getEnum(attribute.name) + + "), minInterval, maxInterval);"); + } + } + out.println(" }"); + } + } + + for (final ZigBeeXmlCommand command : cluster.commands) { + out.println(); + out.println(" /**"); + out.println(" * The " + command.name); + if (!command.description.isEmpty()) { + out.println(" *

"); + outputWithLinebreak(out, " ", command.description); + } + out.println(" *"); + + final LinkedList fields = new LinkedList(command.fields); + for (final ZigBeeXmlField field : fields) { + out.println(" * @param " + stringToLowerCamelCase(field.name) + " {@link " + getDataTypeClass(field) + + "} " + field.name); + } + + out.println(" * @return the {@link Future} command result future"); + out.println(" */"); + out.print(" public Future " + stringToLowerCamelCase(command.name) + "("); + + boolean first = true; + for (final ZigBeeXmlField field : fields) { + if (first == false) { + out.print(", "); + } + out.print(getDataTypeClass(field) + " " + stringToLowerCamelCase(field.name)); + first = false; + } + + out.println(") {"); + if (fields.size() == 0) { + out.println(" return send(new " + stringToUpperCamelCase(command.name) + "());"); + } else { + out.println(" " + stringToUpperCamelCase(command.name) + " command = new " + + stringToUpperCamelCase(command.name) + "();"); + out.println(); + out.println(" // Set the fields"); + + for (final ZigBeeXmlField field : fields) { + out.println(" command.set" + stringToUpperCamelCase(field.name) + "(" + + stringToLowerCamelCase(field.name) + ");"); + } + out.println(); + out.println(" return send(command);"); + } + out.println(" }"); + } + + if (commandsServer > 0) { + out.println(); + out.println(" @Override"); + out.println(" public ZclCommand getCommandFromId(int commandId) {"); + out.println(" switch (commandId) {"); + for (final ZigBeeXmlCommand command : cluster.commands) { + if (command.source.equalsIgnoreCase("client")) { + out.println(" case 0x" + String.format("%02X", command.code) + ": // " + + stringToConstant(command.name)); + out.println(" return new " + stringToUpperCamelCase(command.name) + "();"); + } + } + out.println(" default:"); + out.println(" return null;"); + out.println(" }"); + out.println(" }"); + } + + if (commandsClient > 0) { + out.println(); + out.println(" @Override"); + out.println(" public ZclCommand getResponseFromId(int commandId) {"); + out.println(" switch (commandId) {"); + for (final ZigBeeXmlCommand command : cluster.commands) { + if (command.source.equalsIgnoreCase("server")) { + out.println(" case 0x" + String.format("%02X", command.code) + ": // " + + stringToConstant(command.name)); + out.println(" return new " + stringToUpperCamelCase(command.name) + "();"); + } + } + out.println(" default:"); + out.println(" return null;"); + out.println(" }"); + out.println(" }"); + } + + out.println("}"); + + out.flush(); + out.close(); + } + + private String defineAttribute(ZigBeeXmlAttribute attribute, String clusterName, String attributeName, int count) { + return "new ZclAttribute(ZclClusterType." + stringToConstant(clusterName) + ", " + getEnum(attributeName) + + ", \"" + attributeName + "\", " + "ZclDataType." + attribute.type + ", " + !attribute.optional + ", " + + true + ", " + attribute.writable + ", " + attribute.reportable + ")"; + } + + private String getEnum(String name) { + return "ATTR_" + stringToConstantEnum(name); + } +} diff --git a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZigBeeZclClusterTypeGenerator.java b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZigBeeZclClusterTypeGenerator.java new file mode 100644 index 000000000..cd2dfce7a --- /dev/null +++ b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZigBeeZclClusterTypeGenerator.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) 2016-2019 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.autocode; + +import java.io.File; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.List; +import java.util.Map; +import java.util.TreeMap; + +import com.zsmartsystems.zigbee.autocode.xml.ZigBeeXmlCluster; + +/** + * + * @author Chris Jackson (zsmartsystems.com) + * + */ +public class ZigBeeZclClusterTypeGenerator extends ZigBeeBaseClassGenerator { + ZigBeeZclClusterTypeGenerator(String sourceRootPath, String licenseText, List clusters, String generatedDate, + Map dependencies) { + super(sourceRootPath, licenseText); + this.generatedDate = generatedDate; + this.dependencies = dependencies; + + try { + generateZclClusterCommands(clusters, packageRoot, new File(sourceRootPath)); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + private void generateZclClusterCommands(List clusters, String packageRootPrefix, + File sourceRootPath) throws IOException { + + final String className = "ZclClusterType"; + + final String packageRoot = packageRootPrefix + packageZclProtocol; + final String packagePath = getPackagePath(sourceRootPath, packageRoot); + final File packageFile = getPackageFile(packagePath); + + final PrintWriter out = getClassOut(packageFile, className); + + outputLicense(out); + importsClear(); + + Map clusterEnum = new TreeMap<>(); + for (final ZigBeeXmlCluster cluster : clusters) { + // Suppress GENERAL cluster as it's not really a cluster! + if (cluster.name.equalsIgnoreCase("GENERAL")) { + continue; + } + clusterEnum.put(cluster.code, cluster); + importsAdd( + packageRootPrefix + packageZclCluster + ".Zcl" + stringToUpperCamelCase(cluster.name) + "Cluster"); + } + + out.println("package " + packageRoot + ";"); + out.println(); + importsAdd(packageRootPrefix + packageZcl + ".ZclCluster"); + importsAdd("java.util.Map"); + importsAdd("java.util.concurrent.ConcurrentHashMap"); + importsAdd("javax.annotation.Generated"); + outputImports(out); + out.println(); + out.println("/**"); + out.println(" * Enumeration of ZigBee Clusters\n" + " *

\n" + + " * Code is auto-generated. Modifications may be overwritten!\n" + " *\n" + + " * @author Chris Jackson\n"); + out.println(" */"); + outputClassGenerated(out); + out.println("public enum " + className + " {"); + + boolean first = true; + for (final ZigBeeXmlCluster cluster : clusterEnum.values()) { + if (first == false) { + out.println(","); + } + first = false; + out.print(" " + stringToConstant(cluster.name) + "(" + String.format("0x%04X", cluster.code) + ", Zcl" + + stringToUpperCamelCase(cluster.name) + "Cluster.class, \"" + cluster.name + "\")"); + } + out.println(";"); + + out.println(); + out.println(" private static final Map idValueMap = new ConcurrentHashMap<>();"); + out.println(); + out.println(" private final int clusterId;"); + out.println(" private final String label;"); + out.println(" private final Class clusterClass;"); + out.println(); + out.println(" " + className + + "(final int clusterId, final ClassclusterClass, final String label) {"); + out.println(" this.clusterId = clusterId;"); + out.println(" this.clusterClass = clusterClass;"); + out.println(" this.label = label;"); + out.println(" }"); + out.println(); + out.println(" static {"); + out.println(" for (final ZclClusterType value : values()) {"); + out.println(" idValueMap.put(value.clusterId, value);"); + out.println(" }"); + out.println(" }"); + out.println(); + out.println(" public int getId() {"); + out.println(" return clusterId;"); + out.println(" }"); + out.println(); + out.println(" public String getLabel() {"); + out.println(" return label;"); + out.println(" }"); + out.println(); + // out.println(" public String toString() {"); + // out.println(" return label;"); + // out.println(" }"); + // out.println(); + out.println(" public Class getClusterClass() {"); + out.println(" return clusterClass;"); + out.println(" }"); + out.println(); + out.println(" public static ZclClusterType getValueById(final int clusterId) {"); + out.println(" return idValueMap.get(clusterId);"); + out.println(" }"); + out.println(); + out.println("}"); + + out.flush(); + out.close(); + + } + +} diff --git a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZigBeeZclCommandGenerator.java b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZigBeeZclCommandGenerator.java new file mode 100644 index 000000000..470f3c1a1 --- /dev/null +++ b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZigBeeZclCommandGenerator.java @@ -0,0 +1,240 @@ +/** + * Copyright (c) 2016-2019 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.autocode; + +import java.io.File; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import com.zsmartsystems.zigbee.autocode.xml.ZigBeeXmlCluster; +import com.zsmartsystems.zigbee.autocode.xml.ZigBeeXmlCommand; +import com.zsmartsystems.zigbee.autocode.xml.ZigBeeXmlField; +import com.zsmartsystems.zigbee.autocode.xml.ZigBeeXmlMatcher; + +/** + * + * @author Chris Jackson (zsmartsystems.com) + * + */ +public class ZigBeeZclCommandGenerator extends ZigBeeBaseFieldGenerator { + + ZigBeeZclCommandGenerator(String sourceRootPath, String licenseText, List clusters, String generatedDate, Map dependencies) { + super(sourceRootPath, licenseText); + this.generatedDate = generatedDate; + this.dependencies = dependencies; + + for (ZigBeeXmlCluster cluster : clusters) { + try { + generateZclClusterCommands(cluster, packageRoot, new File(sourceRootPath)); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + } + + private void generateZclClusterCommands(ZigBeeXmlCluster cluster, String packageRootPrefix, File sourceRootPath) + throws IOException { + + for (final ZigBeeXmlCommand command : cluster.commands) { + final String packageRoot = getZclClusterCommandPackage(cluster); + final String packagePath = getPackagePath(sourceRootPath, packageRoot); + final File packageFile = getPackageFile(packagePath); + + final String className = stringToUpperCamelCase(command.name); + final PrintWriter out = getClassOut(packageFile, className); + + // List of fields that are handled internally by super class + List reservedFields = new ArrayList<>(); + + importsClear(); + + for (final ZigBeeXmlField field : command.fields) { + if (getDataTypeClass(field).startsWith("List")) { + importsAdd("java.util.List"); + } + + if (field.sizer != null) { + importsAdd("java.util.ArrayList"); + } + } + outputLicense(out); + + out.println("package " + packageRoot + ";"); + out.println(); + importsAdd("javax.annotation.Generated"); + + if (command.response != null) { + importsAdd(packageRootPrefix + ".transaction.ZigBeeTransactionMatcher"); + importsAdd(packageRootPrefix + ".ZigBeeCommand"); + + importsAdd(packageRoot + "." + command.response.command); + } + + String commandExtends = ""; + if (packageRoot.contains(".zcl.")) { + importsAdd(packageRootPrefix + packageZcl + ".ZclCommand"); + importsAdd(packageRootPrefix + packageZclProtocol + ".ZclCommandDirection"); + commandExtends = "ZclCommand"; + } else { + if (command.name.contains("Response")) { + commandExtends = "ZdoResponse"; + reservedFields.add("status"); + } else { + commandExtends = "ZdoRequest"; + } + importsAdd(packageRootPrefix + packageZdp + "." + commandExtends); + } + + if (command.fields.size() > 0) { + importsAdd(packageRootPrefix + packageZcl + ".ZclFieldSerializer"); + importsAdd(packageRootPrefix + packageZcl + ".ZclFieldDeserializer"); + importsAdd(packageRootPrefix + packageZclProtocol + ".ZclDataType"); + } + + for (final ZigBeeXmlField field : command.fields) { + importsAddClass(field); + } + outputImports(out); + + out.println(); + out.println("/**"); + out.println(" * " + command.name + " value object class."); + + out.println(" *

"); + if (packageRoot.contains(".zcl.")) { + out.println(" * Cluster: " + cluster.name + ". Command is sent " + + (command.source.equals("client") ? "TO" : "FROM") + " the server."); + out.println(" * This command is " + ((cluster.name.equalsIgnoreCase("GENERAL")) + ? "a generic command used across the profile." + : "a specific command used for the " + cluster.name + " cluster.")); + } + + if (command.description.size() > 0) { + out.println(" *

"); + outputWithLinebreak(out, "", command.description); + } + + out.println(" *

"); + out.println(" * Code is auto-generated. Modifications may be overwritten!"); + + out.println(" */"); + outputClassGenerated(out); + out.print("public class " + className + " extends " + commandExtends); + if (command.response != null) { + out.print(" implements ZigBeeTransactionMatcher"); + } + out.println(" {"); + + for (final ZigBeeXmlField field : command.fields) { + if (reservedFields.contains(stringToLowerCamelCase(field.name))) { + continue; + } + if (getAutoSized(command.fields, stringToLowerCamelCase(field.name)) != null) { + continue; + } + + out.println(" /**"); + out.println(" * " + field.name + " command message field."); + if (field.description.size() != 0) { + out.println(" *

"); + outputWithLinebreak(out, " ", field.description); + } + out.println(" */"); + out.println(" private " + getDataTypeClass(field) + " " + stringToLowerCamelCase(field.name) + ";"); + out.println(); + } + + out.println(" /**"); + out.println(" * Default constructor."); + out.println(" */"); + out.println(" public " + className + "() {"); + if (commandExtends.equals("ZclCommand")) { + out.println(" genericCommand = " + + ((cluster.name.equalsIgnoreCase("GENERAL")) ? "true" : "false") + ";"); + + if (!cluster.name.equalsIgnoreCase("GENERAL")) { + out.println(" clusterId = 0x" + String.format("%04X", cluster.code) + ";"); + } + + out.println(" commandId = " + command.code + ";"); + out.println(" commandDirection = ZclCommandDirection." + + (command.source.equals("client") ? "CLIENT_TO_SERVER" : "SERVER_TO_CLIENT") + ";"); + } else { + out.println(" clusterId = 0x" + String.format("%04X", command.code) + ";"); + } + out.println(" }"); + + if (cluster.name.equalsIgnoreCase("GENERAL")) { + out.println(); + out.println(" /**"); + out.println(" * Sets the cluster ID for generic commands. {@link " + className + + "} is a generic command."); + out.println(" *

"); + out.println( + " * For commands that are not generic, this method will do nothing as the cluster ID is fixed."); + out.println(" * To test if a command is generic, use the {@link #isGenericCommand} method."); + out.println(" *"); + out.println( + " * @param clusterId the cluster ID used for generic commands as an {@link Integer}"); + + out.println(" */"); + out.println(" @Override"); + out.println(" public void setClusterId(Integer clusterId) {"); + out.println(" this.clusterId = clusterId;"); + out.println(" }"); + } + + generateFields(out, commandExtends, className, command.fields, reservedFields); + + if (command.response != null) { + out.println(); + out.println(" @Override"); + out.println(" public boolean isTransactionMatch(ZigBeeCommand request, ZigBeeCommand response) {"); + if (command.response.matchers.isEmpty()) { + out.println(" return (response instanceof " + command.response.command + ")"); + out.println(" & ((ZdoRequest) request).getDestinationAddress().equals(((" + + command.response.command + ") response).getSourceAddress());"); + } else { + out.println(" if (!(response instanceof " + command.response.command + ")) {"); + out.println(" return false;"); + out.println(" }"); + out.println(); + out.print(" return "); + + boolean first = true; + for (ZigBeeXmlMatcher matcher : command.response.matchers) { + if (first == false) { + out.println(); + out.print(" && "); + } + first = false; + out.println("(((" + stringToUpperCamelCase(command.name) + ") request).get" + + matcher.commandField + "()"); + out.print(" .equals(((" + command.response.command + ") response).get" + + matcher.responseField + "()))"); + } + out.println(";"); + } + out.println(" }"); + } + + generateToString(out, className, command.fields, reservedFields); + + out.println(); + out.println("}"); + + out.flush(); + out.close(); + } + } + +} diff --git a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZigBeeZclCommandTypeGenerator.java b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZigBeeZclCommandTypeGenerator.java new file mode 100644 index 000000000..d81cfb143 --- /dev/null +++ b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZigBeeZclCommandTypeGenerator.java @@ -0,0 +1,189 @@ +/** + * Copyright (c) 2016-2019 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.autocode; + +import java.io.File; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.List; +import java.util.Map; +import java.util.TreeMap; + +import com.zsmartsystems.zigbee.autocode.xml.ZigBeeXmlCluster; +import com.zsmartsystems.zigbee.autocode.xml.ZigBeeXmlCommand; + +/** + * + * @author Chris Jackson (zsmartsystems.com) + * + */ +public class ZigBeeZclCommandTypeGenerator extends ZigBeeBaseClassGenerator { + + ZigBeeZclCommandTypeGenerator(String sourceRootPath, String licenseText, List clusters, String generatedDate, + Map dependencies) { + super(sourceRootPath, licenseText); + this.generatedDate = generatedDate; + this.dependencies = dependencies; + + try { + generateZclClusterCommands(clusters, packageRoot, new File(sourceRootPath)); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + private void generateZclClusterCommands(List clusters, String packageRootPrefix, + File sourceRootPath) throws IOException { + + final String className = "ZclCommandType"; + + final String packageRoot = packageRootPrefix + packageZclProtocol; + final String packagePath = getPackagePath(sourceRootPath, packageRoot); + final File packageFile = getPackageFile(packagePath); + + final PrintWriter out = getClassOut(packageFile, className); + + Map commandEnum = new TreeMap<>(); + + outputLicense(out); + + importsClear(); + out.println("package " + packageRoot + ";"); + out.println(); + importsAdd("javax.annotation.Generated"); + importsAdd("java.lang.reflect.Constructor"); + importsAdd(packageRootPrefix + packageZcl + ".ZclCommand"); + importsAdd(packageRootPrefix + packageZclProtocol + ".ZclCommandDirection"); + + // Produce an ordered list of clusters/commands and add the imports... + for (final ZigBeeXmlCluster cluster : clusters) { + for (ZigBeeXmlCommand command : cluster.commands) { + importsAdd(getZclClusterCommandPackage(cluster) + "." + stringToUpperCamelCase(command.name)); + commandEnum.put(getZclClusterCommandPackage(cluster) + "." + stringToUpperCamelCase(command.name), + new CommandId(cluster, command)); + } + } + + outputImports(out); + out.println(); + + // outputClassJavaDoc(out, "Enumeration of ZigBee Cluster Library commands"); + outputClassGenerated(out); + out.println("public enum " + className + " {"); + boolean first = true; + for (CommandId commandId : commandEnum.values()) { + ZigBeeXmlCluster cluster = commandId.cluster; + ZigBeeXmlCommand command = commandId.command; + if (!first) { + out.println(","); + } + first = false; + + String commandType = stringToConstant(command.name); + String commandClass = stringToUpperCamelCase(command.name); + out.println(" /**"); + out.println(" * " + commandType + ": " + command.name); + out.println(" *

"); + out.println(" * See {@link " + commandClass + "}"); + out.println(" */"); + + out.print(" " + commandType + "(" + String.format("0x%04X", cluster.code) + ", " + command.code + ", " + + commandClass + ".class" + ", ZclCommandDirection." + + (command.source.equals("client") ? "CLIENT_TO_SERVER" : "SERVER_TO_CLIENT") + ")"); + } + out.println(";"); + out.println(); + + out.println(" private final int commandId;"); + out.println(" private final int clusterType;"); + out.println(" private final Class commandClass;"); + // out.println(" private final String label;"); + out.println(" private final ZclCommandDirection direction;"); + out.println(); + out.println(" " + className + + "(final int clusterType, final int commandId, final Class commandClass, final ZclCommandDirection direction) {"); + out.println(" this.clusterType = clusterType;"); + out.println(" this.commandId = commandId;"); + out.println(" this.commandClass = commandClass;"); + // out.println(" this.label = label;"); + out.println(" this.direction = direction;"); + out.println(" }"); + out.println(); + + out.println(" public int getClusterType() {"); + out.println(" return clusterType;"); + out.println(" }"); + out.println(); + out.println(" public int getId() {"); + out.println(" return commandId;"); + out.println(" }"); + out.println(); + // out.println(" public String getLabel() { return label; }"); + out.println(" public boolean isGeneric() {"); + out.println(" return clusterType==0xFFFF;"); + out.println(" }"); + out.println(); + out.println(" public ZclCommandDirection getDirection() {"); + out.println(" return direction;"); + out.println(" }"); + out.println(); + out.println(" public Class getCommandClass() {"); + out.println(" return commandClass;"); + out.println(" }"); + out.println(); + out.println( + " public static ZclCommandType getCommandType(final int clusterType, final int commandId,\n"); + out.println(" ZclCommandDirection direction) {\n"); + out.println(" for (final ZclCommandType value : values()) {\n"); + out.println( + " if (value.direction == direction && value.clusterType == clusterType && value.commandId == commandId) {\n"); + out.println(" return value;\n"); + out.println(" }\n"); + out.println(" }\n"); + out.println(" return null;\n"); + out.println(" }"); + + out.println(); + out.println(" public static ZclCommandType getGeneric(final int commandId) {"); + out.println(" for (final ZclCommandType value : values()) {"); + out.println(" if (value.clusterType == 0xFFFF && value.commandId == commandId) {"); + out.println(" return value;"); + out.println(" }"); + out.println(" }"); + out.println(" return null;"); + out.println(" }"); + + out.println(); + out.println(" public ZclCommand instantiateCommand() {"); + out.println(" Constructor cmdConstructor;"); + out.println(" try {"); + out.println(" cmdConstructor = commandClass.getConstructor();"); + out.println(" return cmdConstructor.newInstance();"); + out.println(" } catch (Exception e) {"); + out.println(" // logger.debug(\"Error instantiating cluster command {}\", this);"); + out.println(" }"); + out.println(" return null;"); + out.println(" }"); + + out.println("}"); + + out.flush(); + out.close(); + } + + private class CommandId { + ZigBeeXmlCluster cluster; + ZigBeeXmlCommand command; + + public CommandId(ZigBeeXmlCluster cluster, ZigBeeXmlCommand command) { + this.cluster = cluster; + this.command = command; + } + } +} diff --git a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZigBeeZclConstantGenerator.java b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZigBeeZclConstantGenerator.java new file mode 100644 index 000000000..3ccd02319 --- /dev/null +++ b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZigBeeZclConstantGenerator.java @@ -0,0 +1,163 @@ +/** + * Copyright (c) 2016-2019 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.autocode; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.PrintWriter; +import java.math.BigInteger; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +import com.zsmartsystems.zigbee.autocode.xml.ZigBeeXmlCluster; +import com.zsmartsystems.zigbee.autocode.xml.ZigBeeXmlConstant; + +/** + * + * @author Chris Jackson (zsmartsystems.com) + * + */ +public class ZigBeeZclConstantGenerator extends ZigBeeBaseClassGenerator { + + ZigBeeZclConstantGenerator(String sourceRootPath, String licenseText, List clusters, String generatedDate, + Map dependencies) { + super(sourceRootPath, licenseText); + this.generatedDate = generatedDate; + this.dependencies = dependencies; + + for (ZigBeeXmlCluster cluster : clusters) { + try { + generateZclClusterConstants(cluster, packageRoot, new File(sourceRootPath)); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + } + + ZigBeeZclConstantGenerator(String sourceRootPath, String licenseText, ZigBeeXmlConstant constant, String generatedDate) { + super(sourceRootPath, licenseText); + this.generatedDate = generatedDate; + String packageRoot = "com.zsmartsystems.zigbee"; + + try { + generateZclConstant(new File(sourceRootPath), packageRoot, constant); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + private void generateZclClusterConstants(ZigBeeXmlCluster cluster, String packageRootPrefix, File sourceRootPath) + throws IOException { + if (cluster.constants == null) { + return; + } + + for (final ZigBeeXmlConstant constant : cluster.constants) { + final String packageRoot = packageRootPrefix + packageZclProtocolCommand + "." + + stringToLowerCamelCase(cluster.name).replace("_", "").toLowerCase(); + + generateZclConstant(sourceRootPath, packageRoot, constant); + } + } + + private void generateZclConstant(File sourceRootPath, String packageRoot, ZigBeeXmlConstant constant) + throws FileNotFoundException { + final String packagePath = getPackagePath(sourceRootPath, packageRoot); + final File packageFile = getPackageFile(packagePath); + + final String className = constant.className; + final PrintWriter out = getClassOut(packageFile, className); + + outputLicense(out); + + importsClear(); + out.println("package " + packageRoot + ";"); + out.println(); + + importsAdd("javax.annotation.Generated"); + importsAdd("java.util.HashMap"); + importsAdd("java.util.Map"); + + outputImports(out); + + out.println("/**"); + out.println(" * " + constant.name + " value enumeration."); + + if (constant.description.size() > 0) { + out.println(" *

"); + outputWithLinebreak(out, "", constant.description); + } + + out.println(" *

"); + out.println(" * Code is auto-generated. Modifications may be overwritten!"); + + out.println(" */"); + outputClassGenerated(out); + out.println("public enum " + className + " {"); + + boolean first = true; + for (final Entry value : constant.values.entrySet()) { + if (!first) { + out.println(","); + } + first = false; + + out.println(); + out.println(" /**"); + out.println(" * " + value.getValue()); + // if (constant.description.size() != 0) { + // out.println(" *

"); + // outputWithLinebreak(out, " ", constant.description); + // } + out.println(" */"); + out.print( + " " + stringToConstant(value.getValue()) + "(0x" + String.format("%04X", value.getKey()) + ")"); + } + out.println(";"); + + out.println(); + + out.println(" /**"); + out.println(" * A mapping between the integer code and its corresponding " + className + + " type to facilitate lookup by value."); + out.println(" */"); + out.println(" private static Map idMap;"); + out.println(); + out.println(" static {"); + out.println(" idMap = new HashMap();"); + out.println(" for (" + className + " enumValue : values()) {"); + out.println(" idMap.put(enumValue.key, enumValue);"); + out.println(" }"); + out.println(" }"); + out.println(); + out.println(" private final int key;"); + out.println(); + out.println(" private " + className + "(final int key) {"); + out.println(" this.key = key;"); + out.println(" }"); + out.println(); + + out.println(" public int getKey() {"); + out.println(" return key;"); + out.println(" }"); + out.println(); + out.println(" public static " + className + " getByValue(final int value) {"); + out.println(" return idMap.get(value);"); + out.println(" }"); + + out.println("}"); + + out.flush(); + out.close(); + } + +} diff --git a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZigBeeZclDataTypeGenerator.java b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZigBeeZclDataTypeGenerator.java new file mode 100644 index 000000000..7e81e406a --- /dev/null +++ b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZigBeeZclDataTypeGenerator.java @@ -0,0 +1,169 @@ +/** + * Copyright (c) 2016-2019 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.autocode; + +import java.io.File; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.Collections; +import java.util.LinkedList; +import java.util.List; +import java.util.Set; + +import com.zsmartsystems.zigbee.autocode.ZclDataType.DataTypeMap; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * + * @author Chris Jackson + * + */ +public class ZigBeeZclDataTypeGenerator extends ZigBeeBaseClassGenerator { + private final Logger log = LoggerFactory.getLogger(ZigBeeZclDataTypeGenerator.class); + + ZigBeeZclDataTypeGenerator(String sourceRootPath, String licenseText, Set types, String generatedDate) { + super(sourceRootPath, licenseText); + try { + this.generatedDate = generatedDate; + generateZclDataTypeEnumeration(types); + } catch (IOException e) { + e.printStackTrace(); + } + } + + private void generateZclDataTypeEnumeration(Set dataTypes) throws IOException { + final String className = "ZclDataType"; + + dataTypes.add("EXTENDED_PANID"); + dataTypes.add("UNSIGNED_8_BIT_INTEGER_ARRAY"); + dataTypes.add("ZIGBEE_DATA_TYPE"); + + List sortedTypes = new LinkedList<>(); + sortedTypes.addAll(dataTypes); + Collections.sort(sortedTypes); + + final String packagePath = getPackagePath(new File(sourceRootPath), packageRoot + packageZclProtocol); + final File packageFile = getPackageFile(packagePath); + + final PrintWriter out = getClassOut(packageFile, className); + outputLicense(out); + + importsClear(); + out.println("package " + packageRoot + packageZclProtocol + ";"); + out.println(); + + importsAdd("javax.annotation.Generated"); + importsAdd("java.util.Calendar"); + importsAdd("java.util.HashMap"); + importsAdd("java.util.Map"); + importsAdd("com.zsmartsystems.zigbee.ExtendedPanId"); + importsAdd("com.zsmartsystems.zigbee.IeeeAddress"); + importsAdd("com.zsmartsystems.zigbee.zcl.ZclStatus"); + importsAdd("com.zsmartsystems.zigbee.zcl.field.ByteArray"); + importsAdd("com.zsmartsystems.zigbee.zcl.field.ExtensionFieldSet"); + importsAdd("com.zsmartsystems.zigbee.zcl.field.AttributeInformation"); + importsAdd("com.zsmartsystems.zigbee.zcl.field.AttributeRecord"); + importsAdd("com.zsmartsystems.zigbee.zcl.field.AttributeReport"); + importsAdd("com.zsmartsystems.zigbee.zcl.field.NeighborInformation"); + importsAdd("com.zsmartsystems.zigbee.zcl.field.AttributeReportingConfigurationRecord"); + importsAdd("com.zsmartsystems.zigbee.zcl.field.AttributeStatusRecord"); + importsAdd("com.zsmartsystems.zigbee.zcl.field.ExtendedAttributeInformation"); + importsAdd("com.zsmartsystems.zigbee.zcl.field.ReadAttributeStatusRecord"); + importsAdd("com.zsmartsystems.zigbee.zcl.field.WriteAttributeRecord"); + importsAdd("com.zsmartsystems.zigbee.zcl.field.WriteAttributeStatusRecord"); + importsAdd("com.zsmartsystems.zigbee.zdo.ZdoStatus"); + importsAdd("com.zsmartsystems.zigbee.zdo.field.BindingTable"); + importsAdd("com.zsmartsystems.zigbee.zdo.field.ComplexDescriptor"); + importsAdd("com.zsmartsystems.zigbee.zdo.field.NeighborTable"); + importsAdd("com.zsmartsystems.zigbee.zdo.field.NodeDescriptor"); + importsAdd("com.zsmartsystems.zigbee.zdo.field.PowerDescriptor"); + importsAdd("com.zsmartsystems.zigbee.zdo.field.RoutingTable"); + importsAdd("com.zsmartsystems.zigbee.zdo.field.SimpleDescriptor"); + importsAdd("com.zsmartsystems.zigbee.zdo.field.UserDescriptor"); + + outputImports(out); + + out.println(); + out.println("/**"); + out.println(" * Enumeration of the ZCL data types."); + out.println(" *

"); + out.println(" * Code is auto-generated. Modifications may be overwritten!"); + out.println(" */"); + outputClassGenerated(out); + + out.println("public enum " + className + " {"); + + boolean first = true; + for (final String dataTypeString : sortedTypes) { + DataTypeMap zclDataType = ZclDataType.getDataTypeMapping().get(dataTypeString); + if (zclDataType == null) { + log.warn("Unable to map data type \"{}\"", dataTypeString); + continue; + } + + if (!first) { + out.println(','); + } + first = false; + + final String dataTypeClass; + if (zclDataType.dataClass.contains("<")) { + dataTypeClass = zclDataType.dataClass.substring(zclDataType.dataClass.indexOf("<") + 1, + zclDataType.dataClass.indexOf(">")); + } else { + dataTypeClass = zclDataType.dataClass; + } + out.print(" " + dataTypeString + "(" + dataTypeClass + ".class" + ", " + + String.format("0x%02X", zclDataType.id) + ", " + zclDataType.analogue + ")"); + } + out.println(';'); + + out.println(); + out.println(" private final Class dataClass;"); + out.println(" private final int typeId;"); + out.println(" private final boolean analogue;"); + out.println(" private static Map codeTypeMapping;"); + out.println(); + + out.println(" static {"); + out.println(" codeTypeMapping = new HashMap();"); + out.println(" for (" + className + " value : values()) {"); + out.println(" codeTypeMapping.put(value.typeId, value);"); + out.println(" }"); + out.println(" }"); + out.println(); + out.println(" " + className + "(final Class dataClass, final int typeId, final boolean analogue) {"); + out.println(" this.dataClass = dataClass;"); + out.println(" this.typeId = typeId;"); + out.println(" this.analogue = analogue;"); + out.println(" }"); + out.println(); + + out.println(" public static " + className + " getType(int typeId) {"); + out.println(" return codeTypeMapping.get(typeId);"); + out.println(" }"); + + out.println(); + out.println(" public Class getDataClass() {"); + out.println(" return dataClass;"); + out.println(" }"); + out.println(); + out.println(" public int getId() {"); + out.println(" return typeId;"); + out.println(" }"); + out.println(); + out.println(" public boolean isAnalog() {"); + out.println(" return analogue;"); + out.println(" }"); + out.println("}"); + + out.flush(); + out.close(); + } +} diff --git a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZigBeeZclDependencyGenerator.java b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZigBeeZclDependencyGenerator.java new file mode 100644 index 000000000..dbb8b4d90 --- /dev/null +++ b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZigBeeZclDependencyGenerator.java @@ -0,0 +1,90 @@ +/** + * Copyright (c) 2016-2019 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.autocode; + +import com.zsmartsystems.zigbee.autocode.xml.*; + +import java.util.*; + +/** + * + * @author Chris Jackson (zsmartsystems.com) + * + */ +public class ZigBeeZclDependencyGenerator extends ZigBeeBaseClassGenerator { + + private Map dependencies = new HashMap<>(); + private Set zclTypes = new HashSet<>(); + + ZigBeeZclDependencyGenerator(String sourceRootPath, String licenseText, List clusters) { + super(sourceRootPath, licenseText); + for (ZigBeeXmlCluster cluster : clusters) { + generateZclClusterDependencies(cluster, packageRoot); + } + } + + private void generateZclClusterDependencies(ZigBeeXmlCluster cluster, String packageRootPrefix) { + if (cluster.constants != null) { + for (final ZigBeeXmlConstant constant : cluster.constants) { + final String packageRoot = packageRootPrefix + packageZclProtocolCommand + "." + + stringToLowerCamelCase(cluster.name).replace("_", "").toLowerCase(); + + final String className = constant.className; + + String lastClass = dependencies.put(className, packageRoot + "." + className); + if (lastClass != null) { + throw new IllegalStateException( + "Duplicate class definition: " + lastClass + " with " + packageRoot + "." + className); + } + } + } + + if (cluster.structures != null) { + for (final ZigBeeXmlStructure structure : cluster.structures) { + final String packageRoot = packageRootPrefix + packageZclProtocolCommand + "." + + stringToLowerCamelCase(cluster.name).replace("_", "").toLowerCase(); + + final String className = structure.className; + + String lastClass = dependencies.put(className, packageRoot + "." + className); + if (lastClass != null) { + throw new IllegalStateException( + "Duplicate class definition: " + lastClass + " with " + packageRoot + "." + className); + } + + for (ZigBeeXmlField field : structure.fields) { + zclTypes.add(field.type); + } + } + } + + if (cluster.commands != null) { + for (final ZigBeeXmlCommand command : cluster.commands) { + for (ZigBeeXmlField field : command.fields) { + zclTypes.add(field.type); + } + } + } + + if (cluster.attributes != null) { + for (ZigBeeXmlAttribute attribute : cluster.attributes) { + zclTypes.add(attribute.type); + } + } + + } + + public Map getDependencyMap() { + return dependencies; + } + + public Set getZclTypeMap() { + return zclTypes; + } + +} diff --git a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZigBeeZclReadmeGenerator.java b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZigBeeZclReadmeGenerator.java new file mode 100644 index 000000000..409e8c73b --- /dev/null +++ b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZigBeeZclReadmeGenerator.java @@ -0,0 +1,93 @@ +/** + * Copyright (c) 2016-2019 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.autocode; + +import java.io.BufferedReader; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.PrintWriter; +import java.util.List; + +import com.zsmartsystems.zigbee.autocode.xml.ZigBeeXmlCluster; + +/** + * + * @author Chris Jackson (zsmartsystems.com) + * + */ +public class ZigBeeZclReadmeGenerator extends ZigBeeBaseClassGenerator { + final String TABLE1 = "| ID | Cluster | Description |"; + final String TABLE2 = "|----|---------|-------------|"; + final String README_MD = "../README.md"; + + ZigBeeZclReadmeGenerator(String sourceRootPath, String licenseText, List clusters) { + super(sourceRootPath, licenseText); + FileInputStream fstream; + try { + fstream = new FileInputStream(README_MD); + BufferedReader br = new BufferedReader(new InputStreamReader(fstream)); + String strLine; + String mdContents = ""; + + // Read File Line By Line + while ((strLine = br.readLine()) != null) { + if (strLine.equals(TABLE1)) { + while ((strLine = br.readLine()) != null) { + if (!strLine.startsWith("|")) { + break; + } + } + mdContents += writeTable(clusters); + mdContents += strLine + "\n"; + + continue; + } + + mdContents += strLine + "\n"; + } + + // Close the input stream + fstream.close(); + + PrintWriter fos; + + fos = new PrintWriter(README_MD); + fos.print(mdContents); + fos.close(); + } catch (IOException e) { + e.printStackTrace(); + } + + } + + private String writeTable(List clusters) { + String mdContents = ""; + mdContents += TABLE1 + "\n"; + mdContents += TABLE2 + "\n"; + for (ZigBeeXmlCluster cluster : clusters) { + // Suppress GENERAL cluster as it's not really a cluster! + if (cluster.name.equalsIgnoreCase("GENERAL")) { + continue; + } + + mdContents += "| " + String.format("%04X", cluster.code); + mdContents += " | " + stringToConstant(cluster.name); + + if (cluster.description != null) { + mdContents += " | " + cluster.description.get(0).description; + } else { + mdContents += " |"; + + } + mdContents += " |\n"; + } + + return mdContents; + } +} diff --git a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZigBeeZclStructureGenerator.java b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZigBeeZclStructureGenerator.java new file mode 100644 index 000000000..f9654a9c5 --- /dev/null +++ b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZigBeeZclStructureGenerator.java @@ -0,0 +1,125 @@ +/** + * Copyright (c) 2016-2019 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.autocode; + +import java.io.File; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +import com.zsmartsystems.zigbee.autocode.xml.ZigBeeXmlCluster; +import com.zsmartsystems.zigbee.autocode.xml.ZigBeeXmlField; +import com.zsmartsystems.zigbee.autocode.xml.ZigBeeXmlStructure; + +/** + * + * @author Chris Jackson (zsmartsystems.com) + * + */ +public class ZigBeeZclStructureGenerator extends ZigBeeBaseFieldGenerator { + + ZigBeeZclStructureGenerator(String sourceRootPath, String licenseText, List clusters, String generatedDate, + Map dependencies) { + super(sourceRootPath, licenseText); + this.generatedDate = generatedDate; + this.dependencies = dependencies; + + for (ZigBeeXmlCluster cluster : clusters) { + try { + generateZclClusterStructures(cluster, packageRoot, new File(sourceRootPath)); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + } + + private void generateZclClusterStructures(ZigBeeXmlCluster cluster, String packageRootPrefix, File sourceRootPath) + throws IOException { + if (cluster.structures == null) { + return; + } + + for (final ZigBeeXmlStructure structure : cluster.structures) { + final String packageRoot = packageRootPrefix + packageZclProtocolCommand + "." + + stringToLowerCamelCase(cluster.name).replace("_", "").toLowerCase(); + final String packagePath = getPackagePath(sourceRootPath, packageRoot); + final File packageFile = getPackageFile(packagePath); + + final String className = structure.className; + final PrintWriter out = getClassOut(packageFile, className); + + outputLicense(out); + + importsClear(); + out.println("package " + packageRoot + ";"); + + importsAdd("javax.annotation.Generated"); + // importsAdd("java.util.HashMap"); + // importsAdd("java.util.Map"); + + importsAdd(packageRootPrefix + ".serialization.ZigBeeSerializable"); + importsAdd(packageRootPrefix + packageZcl + ".ZclFieldSerializer"); + importsAdd(packageRootPrefix + packageZcl + ".ZclFieldSerializer"); + importsAdd(packageRootPrefix + packageZcl + ".ZclFieldDeserializer"); + importsAdd(packageRootPrefix + packageZclProtocol + ".ZclDataType"); + + for (final ZigBeeXmlField field : structure.fields) { + // String packageName; + // if (getDataTypeClass(field).contains("Descriptor")) { + // packageName = packageZdpDescriptors; + // } else { + // packageName = packageZclField; + // } + importsAddClass(field); + } + + outputImports(out); + + out.println(); + out.println("/**"); + out.println(" * " + structure.name + " structure implementation."); + + if (structure.description.size() > 0) { + out.println(" *

"); + outputWithLinebreak(out, "", structure.description); + } + + out.println(" *

"); + out.println(" * Code is auto-generated. Modifications may be overwritten!"); + + out.println(" */"); + outputClassGenerated(out); + out.println("public class " + className + " implements ZigBeeSerializable {"); + + for (final ZigBeeXmlField field : structure.fields) { + out.println(" /**"); + out.println(" * " + field.name + " structure field."); + if (field.description.size() != 0) { + out.println(" *

"); + outputWithLinebreak(out, " ", field.description); + } + out.println(" */"); + out.println(" private " + getDataTypeClass(field) + " " + stringToLowerCamelCase(field.name) + ";"); + out.println(); + } + out.println(); + + generateFields(out, "ZigBeeSerializable", className, structure.fields, Collections.emptyList()); + generateToString(out, className, structure.fields, Collections.emptyList()); + + out.println("}"); + + out.flush(); + out.close(); + } + } + +} diff --git a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/xml/ZigBeeXmlAttribute.java b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/xml/ZigBeeXmlAttribute.java new file mode 100644 index 000000000..8c2bc71da --- /dev/null +++ b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/xml/ZigBeeXmlAttribute.java @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2016-2019 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.autocode.xml; + +import java.math.BigInteger; +import java.util.List; + +/** + * + * @author Chris Jackson (zsmartsystems.com) + * + */ +public class ZigBeeXmlAttribute { + public String name; + public List description; + public Integer code; + public Integer arrayStart; + public Integer arrayCount; + public Integer arrayStep; + public String type; + public String implementationClass; + public String side; + public Boolean optional; + public Boolean writable; + public Boolean reportable; + public BigInteger minimumValue; + public BigInteger maximumValue; + public BigInteger defaultValue; +} diff --git a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/xml/ZigBeeXmlCluster.java b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/xml/ZigBeeXmlCluster.java new file mode 100644 index 000000000..2c2c66dc1 --- /dev/null +++ b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/xml/ZigBeeXmlCluster.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2016-2019 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.autocode.xml; + +import java.util.List; + +/** + * + * @author Chris Jackson (zsmartsystems.com) + * + */ +public class ZigBeeXmlCluster { + public String name; + public Integer code; + public List description; + public List commands; + public List attributes; + public List constants; + public List structures; +} diff --git a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/xml/ZigBeeXmlCommand.java b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/xml/ZigBeeXmlCommand.java new file mode 100644 index 000000000..938ba6da8 --- /dev/null +++ b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/xml/ZigBeeXmlCommand.java @@ -0,0 +1,24 @@ +/** + * Copyright (c) 2016-2019 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.autocode.xml; + +import java.util.List; + +/** + * + * @author Chris Jackson (zsmartsystems.com) + * + */ +public class ZigBeeXmlCommand { + public Integer code; + public String source; + public String name; + public List description; + public List fields; + public ZigBeeXmlResponse response; +} diff --git a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/xml/ZigBeeXmlCondition.java b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/xml/ZigBeeXmlCondition.java new file mode 100644 index 000000000..1d5aad78e --- /dev/null +++ b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/xml/ZigBeeXmlCondition.java @@ -0,0 +1,19 @@ +/** + * Copyright (c) 2016-2019 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.autocode.xml; + +/** + * + * @author Chris Jackson (zsmartsystems.com) + * + */ +public class ZigBeeXmlCondition { + public String field; + public String operator; + public String value; +} diff --git a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/xml/ZigBeeXmlConstant.java b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/xml/ZigBeeXmlConstant.java new file mode 100644 index 000000000..019285e6a --- /dev/null +++ b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/xml/ZigBeeXmlConstant.java @@ -0,0 +1,24 @@ +/** + * Copyright (c) 2016-2019 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.autocode.xml; + +import java.math.BigInteger; +import java.util.List; +import java.util.Map; + +/** + * + * @author Chris Jackson (zsmartsystems.com) + * + */ +public class ZigBeeXmlConstant { + public String name; + public String className; + public List description; + public Map values; +} diff --git a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/zcl/DataType.java b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/xml/ZigBeeXmlDescription.java similarity index 61% rename from com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/zcl/DataType.java rename to com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/xml/ZigBeeXmlDescription.java index 8ba93b7ba..8a0da6567 100644 --- a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/zcl/DataType.java +++ b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/xml/ZigBeeXmlDescription.java @@ -5,13 +5,14 @@ * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html */ -package com.zsmartsystems.zigbee.autocode.zcl; +package com.zsmartsystems.zigbee.autocode.xml; /** - * Created by tlaukkan on 4/10/2016. + * + * @author Chris Jackson (zsmartsystems.com) + * */ -public class DataType { - public String dataTypeName; - public String dataTypeType; - public String dataTypeClass; +public class ZigBeeXmlDescription { + public String description; + public String format; } diff --git a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/xml/ZigBeeXmlField.java b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/xml/ZigBeeXmlField.java new file mode 100644 index 000000000..dd4090045 --- /dev/null +++ b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/xml/ZigBeeXmlField.java @@ -0,0 +1,26 @@ +/** + * Copyright (c) 2016-2019 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.autocode.xml; + +import java.util.List; + +/** + * + * @author Chris Jackson (zsmartsystems.com) + * + */ +public class ZigBeeXmlField { + public String name; + public List description; + public String type; + public String implementationClass; + public Boolean array; + public String sizer; + public ZigBeeXmlCondition condition; + public boolean completeOnZero; +} diff --git a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/xml/ZigBeeXmlGlobal.java b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/xml/ZigBeeXmlGlobal.java new file mode 100644 index 000000000..9b2f222cb --- /dev/null +++ b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/xml/ZigBeeXmlGlobal.java @@ -0,0 +1,19 @@ +/** + * Copyright (c) 2016-2019 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.autocode.xml; + +import java.util.List; + +/** + * + * @author Chris Jackson (zsmartsystems.com) + * + */ +public class ZigBeeXmlGlobal { + public List constants; +} diff --git a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/xml/ZigBeeXmlMatcher.java b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/xml/ZigBeeXmlMatcher.java new file mode 100644 index 000000000..1824daa68 --- /dev/null +++ b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/xml/ZigBeeXmlMatcher.java @@ -0,0 +1,18 @@ +/** + * Copyright (c) 2016-2019 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.autocode.xml; + +/** + * + * @author Chris Jackson (zsmartsystems.com) + * + */ +public class ZigBeeXmlMatcher { + public String commandField; + public String responseField; +} diff --git a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/xml/ZigBeeXmlParser.java b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/xml/ZigBeeXmlParser.java new file mode 100644 index 000000000..3f4b48841 --- /dev/null +++ b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/xml/ZigBeeXmlParser.java @@ -0,0 +1,370 @@ +/** + * Copyright (c) 2016-2019 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.autocode.xml; + +import java.io.File; +import java.math.BigInteger; +import java.util.ArrayList; +import java.util.List; +import java.util.TreeMap; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; + +/** + * XML file parser - reads the XML cluster definitions + * + * @author Chris Jackson (zsmartsystems.com) + * + */ +public class ZigBeeXmlParser { + private final Logger log = LoggerFactory.getLogger(ZigBeeXmlParser.class); + + List files = new ArrayList(); + + public ZigBeeXmlParser() { + } + + public void addFile(String filename) { + files.add(filename); + } + + public List parseClusterConfiguration() { + List clusters = new ArrayList<>(); + + try { + for (String file : files) { + log.debug("Parsing cluster file: {}", file); + // Load the class definitions + File fXmlFile = new File(file); + DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); + DocumentBuilder dBuilder = dbFactory.newDocumentBuilder(); + Document doc = dBuilder.parse(fXmlFile); + doc.getDocumentElement().normalize(); + + // Get all cluster specific definitions + NodeList nList = doc.getElementsByTagName("cluster"); + ZigBeeXmlCluster cluster = (ZigBeeXmlCluster) processNode(nList.item(0)); + clusters.add(cluster); + } + } catch (Exception e) { + e.printStackTrace(); + return null; + } + + return clusters; + } + + public ZigBeeXmlGlobal parseGlobalConfiguration() { + ZigBeeXmlGlobal globals = new ZigBeeXmlGlobal(); + globals.constants = new ArrayList(); + + try { + for (String file : files) { + log.debug("Parsing globals file: {}", file); + // Load the class definitions + File fXmlFile = new File(file); + DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); + DocumentBuilder dBuilder = dbFactory.newDocumentBuilder(); + Document doc = dBuilder.parse(fXmlFile); + doc.getDocumentElement().normalize(); + + // Get all global specific definitions + NodeList nList = doc.getElementsByTagName("zigbee"); + ZigBeeXmlGlobal global = (ZigBeeXmlGlobal) processNode(nList.item(0)); + globals.constants.addAll(global.constants); + } + } catch (Exception e) { + e.printStackTrace(); + return null; + } + + return globals; + } + + Object processNode(Node node) { + NodeList nodes = node.getChildNodes(); + Element e; + + switch (node.getNodeName()) { + case "zigbee": + ZigBeeXmlGlobal global = new ZigBeeXmlGlobal(); + global.constants = new ArrayList<>(); + for (int temp = 0; temp < nodes.getLength(); temp++) { + if (nodes.item(temp).getNodeName().equals("constant")) { + global.constants.add((ZigBeeXmlConstant) processNode(nodes.item(temp))); + } + } + log.info("Done: Global"); + return global; + + case "cluster": + ZigBeeXmlCluster cluster = new ZigBeeXmlCluster(); + + e = (Element) node; + cluster.code = getInteger(e.getAttribute("code")).intValue(); + + cluster.description = new ArrayList(); + cluster.commands = new ArrayList(); + cluster.attributes = new ArrayList(); + cluster.constants = new ArrayList(); + cluster.structures = new ArrayList(); + + for (int temp = 0; temp < nodes.getLength(); temp++) { + if (nodes.item(temp).getNodeName().equals("name")) { + cluster.name = nodes.item(temp).getTextContent().trim(); + } + if (nodes.item(temp).getNodeName().equals("description")) { + cluster.description.add((ZigBeeXmlDescription) processNode(nodes.item(temp))); + } + if (nodes.item(temp).getNodeName().equals("command")) { + cluster.commands.add((ZigBeeXmlCommand) processNode(nodes.item(temp))); + } + if (nodes.item(temp).getNodeName().equals("attribute")) { + cluster.attributes.add((ZigBeeXmlAttribute) processNode(nodes.item(temp))); + } + if (nodes.item(temp).getNodeName().equals("constant")) { + cluster.constants.add((ZigBeeXmlConstant) processNode(nodes.item(temp))); + } + if (nodes.item(temp).getNodeName().equals("struct")) { + cluster.structures.add((ZigBeeXmlStructure) processNode(nodes.item(temp))); + } + } + log.info("Done: Cluster - {}", cluster.name); + return cluster; + + case "attribute": + ZigBeeXmlAttribute attribute = new ZigBeeXmlAttribute(); + attribute.description = new ArrayList<>(); + + e = (Element) node; + attribute.code = getInteger(e.getAttribute("code")).intValue(); + attribute.side = e.getAttribute("side"); + attribute.writable = Boolean.valueOf(e.getAttribute("writable")); + attribute.reportable = Boolean.valueOf(e.getAttribute("reportable")); + attribute.optional = Boolean.valueOf(e.getAttribute("optional")); + attribute.type = e.getAttribute("type").trim(); + attribute.implementationClass = e.getAttribute("class").trim(); + attribute.minimumValue = getInteger(e.getAttribute("minimum")); + attribute.maximumValue = getInteger(e.getAttribute("maximum")); + attribute.defaultValue = getInteger(e.getAttribute("default")); + + if (getInteger(e.getAttribute("arraycount")) != null) { + attribute.arrayCount = getInteger(e.getAttribute("arraycount")).intValue(); + } + if (getInteger(e.getAttribute("arraystart")) != null) { + attribute.arrayStart = getInteger(e.getAttribute("arraystart")).intValue(); + } + if (getInteger(e.getAttribute("arraystep")) != null) { + attribute.arrayStep = getInteger(e.getAttribute("arraystep")).intValue(); + } + + for (int temp = 0; temp < nodes.getLength(); temp++) { + if (nodes.item(temp).getNodeName().equals("name")) { + attribute.name = nodes.item(temp).getTextContent().trim(); + } + if (nodes.item(temp).getNodeName().equals("description")) { + attribute.description.add((ZigBeeXmlDescription) processNode(nodes.item(temp))); + } + } + + return attribute; + + case "command": + ZigBeeXmlCommand command = new ZigBeeXmlCommand(); + command.fields = new ArrayList<>(); + command.description = new ArrayList<>(); + + e = (Element) node; + + command.name = e.getAttribute("name").trim(); + command.code = getInteger(e.getAttribute("code")).intValue(); + command.source = e.getAttribute("source"); + + for (int temp = 0; temp < nodes.getLength(); temp++) { + if (nodes.item(temp).getNodeName().equals("name")) { + command.name = nodes.item(temp).getTextContent().trim(); + } + if (nodes.item(temp).getNodeName().equals("description")) { + command.description.add((ZigBeeXmlDescription) processNode(nodes.item(temp))); + } + if (nodes.item(temp).getNodeName().equals("field")) { + command.fields.add((ZigBeeXmlField) processNode(nodes.item(temp))); + } + if (nodes.item(temp).getNodeName().equals("response")) { + command.response = (ZigBeeXmlResponse) processNode(nodes.item(temp)); + } + } + log.info("Done: Command - {}", command.name); + return command; + + case "field": + ZigBeeXmlField field = new ZigBeeXmlField(); + field.description = new ArrayList<>(); + + e = (Element) node; + if (e.getAttribute("completeOnZero").length() > 0) { + String x = e.getAttribute("completeOnZero"); + } + field.type = e.getAttribute("type").trim(); + field.completeOnZero = "true".equals(e.getAttribute("completeOnZero").trim()); + field.implementationClass = e.getAttribute("class").trim(); + field.array = Boolean.valueOf(e.getAttribute("array")); + for (int temp = 0; temp < nodes.getLength(); temp++) { + if (nodes.item(temp).getNodeName().equals("name")) { + field.name = nodes.item(temp).getTextContent().trim(); + } + if (nodes.item(temp).getNodeName().equals("sizer")) { + field.sizer = nodes.item(temp).getTextContent().trim(); + } + if (nodes.item(temp).getNodeName().equals("description")) { + field.description.add((ZigBeeXmlDescription) processNode(nodes.item(temp))); + } + if (nodes.item(temp).getNodeName().equals("conditional")) { + field.condition = (ZigBeeXmlCondition) processNode(nodes.item(temp)); + } + } + log.info("Done: Field - {}", field.name); + return field; + + case "constant": + ZigBeeXmlConstant constant = new ZigBeeXmlConstant(); + constant.description = new ArrayList<>(); + + e = (Element) node; + + constant.className = e.getAttribute("class").trim(); + + constant.values = new TreeMap<>(); + + for (int temp = 0; temp < nodes.getLength(); temp++) { + if (nodes.item(temp).getNodeName().equals("name")) { + constant.name = nodes.item(temp).getTextContent().trim(); + } + if (nodes.item(temp).getNodeName().equals("description")) { + constant.description.add((ZigBeeXmlDescription) processNode(nodes.item(temp))); + } + if (nodes.item(temp).getNodeName().equals("value")) { + e = (Element) nodes.item(temp); + String name = e.getAttribute("name").trim(); + BigInteger value = getInteger(e.getAttribute("code").trim()); + constant.values.put(value, name); + } + } + + return constant; + + case "struct": + ZigBeeXmlStructure structure = new ZigBeeXmlStructure(); + structure.fields = new ArrayList<>(); + structure.description = new ArrayList<>(); + + e = (Element) node; + + structure.name = e.getAttribute("name").trim(); + structure.className = e.getAttribute("class").trim(); + + for (int temp = 0; temp < nodes.getLength(); temp++) { + if (nodes.item(temp).getNodeName().equals("name")) { + structure.name = nodes.item(temp).getTextContent().trim(); + } + if (nodes.item(temp).getNodeName().equals("description")) { + structure.description.add((ZigBeeXmlDescription) processNode(nodes.item(temp))); + } + if (nodes.item(temp).getNodeName().equals("field")) { + structure.fields.add((ZigBeeXmlField) processNode(nodes.item(temp))); + } + } + log.info("Done: Structure - ", structure.name); + return structure; + + case "description": + ZigBeeXmlDescription description = new ZigBeeXmlDescription(); + + e = (Element) node; + + if (nodes.item(0) != null && nodes.item(0).getTextContent() != null) { + description.description = nodes.item(0).getTextContent().trim(); + } + if (e.getAttribute("format") != null) { + description.format = e.getAttribute("format").trim(); + } + + return description; + + case "conditional": + ZigBeeXmlCondition condition = new ZigBeeXmlCondition(); + + e = (Element) node; + for (int temp = 0; temp < nodes.getLength(); temp++) { + if (nodes.item(temp).getNodeName().equals("field")) { + condition.field = nodes.item(temp).getTextContent().trim(); + } + if (nodes.item(temp).getNodeName().equals("operator")) { + condition.operator = nodes.item(temp).getTextContent().trim(); + } + if (nodes.item(temp).getNodeName().equals("value")) { + condition.value = nodes.item(temp).getTextContent().trim(); + } + } + log.info("Done: Condition - {}", condition.field); + return condition; + + case "response": + ZigBeeXmlResponse response = new ZigBeeXmlResponse(); + response.matchers = new ArrayList<>(); + + e = (Element) node; + response.command = e.getAttribute("command").trim(); + + for (int temp = 0; temp < nodes.getLength(); temp++) { + if (nodes.item(temp).getNodeName().equals("matcher")) { + response.matchers.add((ZigBeeXmlMatcher) processNode(nodes.item(temp))); + } + } + log.info("Done: Response - {}", response.command); + return response; + + case "matcher": + ZigBeeXmlMatcher matcher = new ZigBeeXmlMatcher(); + + e = (Element) node; + matcher.commandField = e.getAttribute("commandField").trim(); + matcher.responseField = e.getAttribute("responseField").trim(); + + log.info("Done: Matcher - {}", matcher.commandField); + return matcher; + } + + return null; + } + + private static BigInteger getInteger(String value) { + if (value == null || value.length() == 0) { + return null; + } + + String lwrValue = value.toLowerCase(); + try { + if (lwrValue.startsWith("0x")) { + return new BigInteger(lwrValue.substring(2), 16); + } else { + return new BigInteger(lwrValue); + } + } catch (NumberFormatException e) { + return null; + } + } +} diff --git a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/xml/ZigBeeXmlResponse.java b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/xml/ZigBeeXmlResponse.java new file mode 100644 index 000000000..d1fa6856a --- /dev/null +++ b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/xml/ZigBeeXmlResponse.java @@ -0,0 +1,20 @@ +/** + * Copyright (c) 2016-2019 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.autocode.xml; + +import java.util.List; + +/** + * + * @author Chris Jackson (zsmartsystems.com) + * + */ +public class ZigBeeXmlResponse { + public String command; + public List matchers; +} diff --git a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/xml/ZigBeeXmlStructure.java b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/xml/ZigBeeXmlStructure.java new file mode 100644 index 000000000..3f115a6c6 --- /dev/null +++ b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/xml/ZigBeeXmlStructure.java @@ -0,0 +1,22 @@ +/** + * Copyright (c) 2016-2019 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.autocode.xml; + +import java.util.List; + +/** + * + * @author Chris Jackson (zsmartsystems.com) + * + */ +public class ZigBeeXmlStructure { + public String name; + public String className; + public List description; + public List fields; +} diff --git a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/zcl/Attribute.java b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/zcl/Attribute.java deleted file mode 100644 index de03bad02..000000000 --- a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/zcl/Attribute.java +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.autocode.zcl; - -import java.util.List; -import java.util.Map; - -public class Attribute { - public String attributeLabel; - public List attributeDescription; - public String attributeType; - public String dataType; - public String dataTypeClass; - public String nameUpperCamelCase; - public String nameLowerCamelCase; - public String attributeAccess; - public String attributeReporting; - public String enumName; - public Integer attributeId; - public String attributeImplementation; - public Map valueMap; -} diff --git a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/zcl/Cluster.java b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/zcl/Cluster.java deleted file mode 100644 index d3e7b0e02..000000000 --- a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/zcl/Cluster.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.autocode.zcl; - -import java.util.List; -import java.util.TreeMap; - -/** - * Created by tlaukkan on 4/10/2016. - */ -public class Cluster { - public int clusterId; - public List clusterDescription; - public String clusterName; - public String clusterType; - public String nameUpperCamelCase; - public String nameLowerCamelCase; - public TreeMap received = new TreeMap(); - public TreeMap generated = new TreeMap(); - public TreeMap attributes = new TreeMap(); -} diff --git a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/zcl/Command.java b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/zcl/Command.java deleted file mode 100644 index 0c91b8b2d..000000000 --- a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/zcl/Command.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.autocode.zcl; - -import java.util.List; -import java.util.Map; -import java.util.TreeMap; - -/** - * @author tlaukkan - * @author Chris Jackson - */ -public class Command { - public int commandId; - public String commandLabel; - public List commandDescription; - public String commandType; - public String dataType; - public String dataTypeClass; - public String nameUpperCamelCase; - public String nameLowerCamelCase; - - public String responseCommand; - // public String responseRequest; - // public String responseResponse; - - public Map responseMatchers; - - public TreeMap fields = new TreeMap(); -} diff --git a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/zcl/Context.java b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/zcl/Context.java deleted file mode 100644 index 315f5b67e..000000000 --- a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/zcl/Context.java +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.autocode.zcl; - -import java.util.List; -import java.util.TreeMap; - -/** - * Created by tlaukkan on 4/10/2016. - */ -public class Context { - - public List lines; - - public Profile profile; - public Cluster cluster; - public Command command; - - public boolean received; - public boolean generated; - public boolean attribute; - - public TreeMap dataTypes = new TreeMap(); - public TreeMap profiles = new TreeMap(); - -} diff --git a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/zcl/Field.java b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/zcl/Field.java deleted file mode 100644 index a3bc169fb..000000000 --- a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/zcl/Field.java +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.autocode.zcl; - -import java.util.List; -import java.util.Map; - -/** - * Created by tlaukkan on 4/10/2016. - */ -public class Field { - public int fieldId; - public String fieldLabel; - public String fieldType; - public String dataType; - public String dataTypeClass; - public String nameUpperCamelCase; - public String nameLowerCamelCase; - public String listSizer; - public boolean completeOnZero; - public String condition; - public String conditionOperator; - public List description; - public Map valueMap; -} diff --git a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/zcl/Profile.java b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/zcl/Profile.java deleted file mode 100644 index fc204c5e5..000000000 --- a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/zcl/Profile.java +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.autocode.zcl; - -import java.util.TreeMap; - -/** - * Created by tlaukkan on 4/10/2016. - */ -public class Profile { - public int profileId; - public String profileName; - public String profileAbbreviation; - public String profileType; - public TreeMap clusters = new TreeMap(); -} diff --git a/com.zsmartsystems.zigbee.autocode/src/main/resources/manufacturer_definition.md b/com.zsmartsystems.zigbee.autocode/src/main/resources/manufacturer_definition.md deleted file mode 100644 index c60c0a262..000000000 --- a/com.zsmartsystems.zigbee.autocode/src/main/resources/manufacturer_definition.md +++ /dev/null @@ -1,3 +0,0 @@ -# Manufacturer Digi [0xC105] - -# Manufacturer Telegesis [0xC091] diff --git a/com.zsmartsystems.zigbee.autocode/src/main/resources/ota_definition.md b/com.zsmartsystems.zigbee.autocode/src/main/resources/ota_definition.md deleted file mode 100644 index 962ba1907..000000000 --- a/com.zsmartsystems.zigbee.autocode/src/main/resources/ota_definition.md +++ /dev/null @@ -1,365 +0,0 @@ -# Basic - -## OTA Upgrade [0x0019] - -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. - -It is the responsibility of the server to indicate to the clients when update images are available. The client MAY be upgraded or downgraded64. The upgrade server knows which client devices to upgrade and to what file version. The upgrade server MAY be notified of such information via the backend system. For ZR clients, the server MAY send a message to notify the device when an updated image is available. It is assumed that ZED clients will not be awake to receive an unsolicited notification of an available image. All clients (ZR and ZED) SHALL query (poll) the server periodically to determine whether the server has an image update for them. Image Notify is optional. - -The cluster is implemented in such a way that the client service works on both ZED and ZR devices. Being able to handle polling is mandatory for all server devices while being able to send a notify is optional. Hence, all client devices must be able to use a ‘poll’ mechanism to send query message to the server in order to see if the server has any new file for it. The polling mechanism also puts fewer resources on the upgrade server. It is ideal to have the server maintain as little state as possible since this will scale when there are hundreds of clients in the network. The upgrade server is not required to keep track of what pieces of an image that a particular client has received; instead the client SHALL do that. Lastly poll makes more sense for devices that MAY need to perform special setup to get ready to receive an image, such as unlocking flash or allocating space for the new image. - -### Attributes - -|Id |Name |Type |Access |Implement |Reporting | -|-------|-----------------------------|---------------------------|-----------|----------|----------| -|0x0000 |UpgradeServerID |IEEE Address |Read Only |Mandatory | | -|0x0001 |FileOffset |Unsigned 32-bit integer |Read Only |Optional | | -|0x0002 |CurrentFileVersion |Unsigned 32-bit integer |Read Only |Optional | | -|0x0003 |CurrentZigBeeStackVersion |Unsigned 16-bit integer |Read Only |Optional | | -|0x0004 |DownloadedFileVersion |Unsigned 32-bit integer |Read Only |Optional | | -|0x0005 |DownloadedZigBeeStackVersion |Unsigned 16-bit integer |Read Only |Optional | | -|0x0006 |ImageUpgradeStatus |Unsigned 8-bit integer |Read Only |Optional | | -|0x0007 |ManufacturerID |Unsigned 16-bit integer |Read Only |Optional | | -|0x0008 |ImageTypeID |Unsigned 16-bit integer |Read Only |Optional | | -|0x0009 |MinimumBlockRequestDelay |Unsigned 16-bit integer |Read Only |Optional | | -|0x000A |ImageStamp |Unsigned 32-bit integer |Read Only |Optional | | - -#### UpgradeServerID Attribute -The attribute is used to store the IEEE address of the upgrade server resulted from the discovery of the -upgrade server’s identity. If the value is set to a non-zero value and corresponds to an IEEE address of -a device that is no longer accessible, a device may choose to discover a new Upgrade Server depending -on its own security policies. - -#### FileOffset Attribute -The parameter indicates the current location in the OTA upgrade image. It is essentially the (start of -the) address of the image data that is being transferred from the OTA server to the client. The attribute -is optional on the client and is made available in a case where the server wants to track the upgrade -process of a particular client. - -#### CurrentFileVersion Attribute -The file version of the running firmware image on the device. The information is available for the -server to query via ZCL read attribute command. The attribute is optional on the client. - -#### CurrentZigBeeStackVersion Attribute -The ZigBee stack version of the running image on the device. The information is available for the -server to query via ZCL read attribute command. The attribute is optional on the client. - -#### DownloadedFileVersion Attribute -The file version of the downloaded image on additional memory space on the device. The information -is available for the server to query via ZCL read attribute command. The information is useful for the -OTA upgrade management, so the server shall ensure that each client has downloaded the correct file -version before initiate the upgrade. The attribute is optional on the client. - -#### DownloadedZigBeeStackVersion Attribute -The ZigBee stack version of the downloaded image on additional memory space on the device. The -information is available for the server to query via ZCL read attribute command. The information is -useful for the OTA upgrade management, so the server shall ensure that each client has downloaded the -correct ZigBee stack version before initiate the upgrade. The attribute is optional on the client. - -#### ImageUpgradeStatus Attribute -The upgrade status of the client device. The status indicates where the client device is at in terms of the -download and upgrade process. The status helps to indicate whether the client has completed the -download process and whether it is ready to upgrade to the new image. The status may be queried by -the server via ZCL read attribute command. Hence, the server may not be able to reliably query the -status of ZED client since the device may have its radio off. The attribute is optional on the client. - -#### Manufacturer ID Attribute -This attribute shall reflect the ZigBee assigned value for the manufacturer of the device. - -#### Image Type ID Attribute -This attribute shall indicate the image type identifier of the file that the client is currently downloading, -or a file that has been completely downloaded but not upgraded to yet. The value of this attribute shall -be 0xFFFF when the client is not downloading a file or is not waiting to apply an upgrade - -#### MinimumBlockRequestDelay Attribute -This attribute acts as a rate limiting feature for the server to slow down the client download and prevent -saturating the network with block requests. The attribute lives on the client but can be changed during -a download if rate limiting is supported by both devices. -This attribute shall reflect the minimum delay between Image Block Request commands generated by -the client in milliseconds. The value of this attribute shall be updated when the rate is changed by the -server, but should reflect the client default when an upgrade is not in progress or a server does not -support this feature. -The value is in milliseconds and defaults to 0 (no delay). - -#### Image Stamp Attribute -This attribute acts as a second verification to identify the image in the case that sometimes developers -of the application have forgotten to increase the firmware version attribute. It is a 32 bits value and has -a valid range from 0x00000000 to 0xFFFFFFFF. This attribute value must be consistent during the -lifetime of the same image and also must be unique for each different build of the image. This attribute -value should not be hardcoded or generated by any manual process. This attribute value should be -generated by performing a hash or checksum on the entire image. There are two possible methods to -generate this checksum. It can be generated dynamically during runtime of the application or it can be -generated during compile time of the application. - - -### Received - -#### Image Notify Command [0x00] -The purpose of sending Image Notify command is so the server has a way to notify client devices of -when the OTA upgrade images are available for them. It eliminates the need for ZR client devices -having to check with the server periodically of when the new images are available. However, all client -devices still need to send in Query Next Image Request command in order to officially start the OTA -upgrade process. - -For ZR client devices, the upgrade server may send out a unicast, broadcast, or multicast indicating it -has the next upgrade image, via an Image Notify command. Since the command may not have APS -security (if it is broadcast or multicast), it is considered purely informational and not authoritative. -Even in the case of a unicast, ZR shall continue to perform the query process described in later section. - -When the command is sent with payload type value of zero, it generally means the server wishes to -notify all clients disregard of their manufacturers, image types or file versions. Query jitter is needed -to protect the server from being flooded with clients’ queries for next image. - - -|Field Name |Data Type | -|---------------------------|------------------------------------------| -|Payload type |8-bit Enumeration | -|Query jitter |Unsigned 8-bit integer[Payload type>=0] | -|Manufacturer code |Unsigned 16-bit integer[Payload type>=1] | -|Image type |Unsigned 16-bit integer[Payload type>=2] | -|New File Version |Unsigned 32-bit integer[Payload type>=3] | - - -#### Query Next Image Command [0x01] - -Client devices shall send a Query Next Image Request command to the server to see if there is new -OTA upgrade image available. ZR devices may send the command after receiving Image Notify -command. ZED device shall periodically wake up and send the command to the upgrade server. Client -devices query what the next image is, based on their own information. - -The server takes the client’s information in the command and determines whether it has a suitable -image for the particular client. The decision should be based on specific policy that is specific to the -upgrade server and outside the scope of this document.. However, a recommended default policy is for -the server to send back a response that indicates the availability of an image that matches the -manufacturer code, image type, and the highest available file version of that image on the -server. However, the server may choose to upgrade, downgrade, or reinstall clients’ image, as its -policy dictates. If client’s hardware version is included in the command, the server shall examine the -value against the minimum and maximum hardware versions included in the OTA file header. - -|Field Name |Data Type | -|---------------------------|---------------------------------------------| -|Field control |Bitmap 8-bit | -|Manufacturer code |Unsigned 16-bit integer | -|Image type |Unsigned 16-bit integer | -|File version |Unsigned 32-bit integer | -|Hardware version |Unsigned 16-bit integer[Field control&&0x01] | - - -#### Image Block Command [0x03] - -The client device requests the image data at its leisure by sending Image Block Request command to -the upgrade server. The client knows the total number of request commands it needs to send from the -image size value received in Query Next Image Response command. - -The client repeats Image Block Requests until it has successfully obtained all data. Manufacturer code, -image type and file version are included in all further queries regarding that image. The information -eliminates the need for the server to remember which OTA Upgrade Image is being used for each -download process. - -If the client supports the BlockRequestDelay attribute it shall include the value of the attribute as the -BlockRequestDelay field of the Image Block Request message. The client shall ensure that it delays at -least BlockRequestDelay milliseconds after the previous Image Block Request was sent before sending -the next Image Block Request message. A client may delay its next Image Block Requests longer than -its BlockRequestDelay attribute. - -|Field Name |Data Type | -|---------------------------|---------------------------------------------| -|Field control |Bitmap 8-bit | -|Manufacturer code |Unsigned 16-bit integer | -|Image type |Unsigned 16-bit integer | -|File version |Unsigned 32-bit integer | -|File offset |Unsigned 32-bit integer | -|Maximum data size |Unsigned 8-bit integer | -|Request node address |IEEE Address[Field control&&0x01] | -|BlockRequestDelay |Unsigned 16-bit integer[Field control&&0x02] | - - -#### Image Page Command [0x04] - -The support for the command is optional. The client device may choose to request OTA upgrade data -in one page size at a time from upgrade server. Using Image Page Request reduces the numbers of -requests sent from the client to the upgrade server, compared to using Image Block Request command. -In order to conserve battery life a device may use the Image Page Request command. Using the Image -Page Request command eliminates the need for the client device to send Image Block Request -command for every data block it needs; possibly saving the transmission of hundreds or thousands of -messages depending on the image size. - -The client keeps track of how much data it has received by keeping a cumulative count of each data -size it has received in each Image Block Response. Once the count has reach the value of the page size -requested, it shall repeat Image Page Requests until it has successfully obtained all pages. Note that the -client may choose to switch between using Image Block Request and Image Page Request during the -upgrade process. For example, if the client does not receive all data requested in one Image Page -Request, the client may choose to request the missing block of data using Image Block Request -command, instead of requesting the whole page again. - -|Field Name |Data Type | -|---------------------------|---------------------------------------------| -|Field control |Bitmap 8-bit | -|Manufacturer code |Unsigned 16-bit integer | -|Image type |Unsigned 16-bit integer | -|File version |Unsigned 32-bit integer | -|File offset |Unsigned 32-bit integer | -|Maximum data size |Unsigned 8-bit integer | -|Page size |Unsigned 16-bit integer | -|Response spacing |Unsigned 16-bit integer | -|Request node address |IEEE Address[Field control&&0x01] | - - - -#### Upgrade End Command [0x06] - -Upon reception all the image data, the client should verify the image to ensure its integrity and validity. -If the device requires signed images it shall examine the image and verify the signature. Clients may perform -additional manufacturer specific integrity checks to validate the image, for example, CRC check on the actual file data. - -If the image fails any integrity checks, the client shall send an Upgrade End Request command to the -upgrade server with a status of INVALID_IMAGE. In this case, the client may reinitiate the upgrade -process in order to obtain a valid OTA upgrade image. The client shall not upgrade to the bad image -and shall discard the downloaded image data. - -If the image passes all integrity checks and the client does not require additional OTA upgrade image -file, it shall send back an Upgrade End Request with a status of SUCCESS. However, if the client -requires multiple OTA upgrade image files before performing an upgrade, it shall send an Upgrade End -Request command with status REQUIRE_MORE_IMAGE. This shall indicate to the server that it -cannot yet upgrade the image it received. - -If the client decides to cancel the download process for any other reasons, it has the option of sending -Upgrade End Request with status of ABORT at anytime during the download process. The client shall -then try to reinitiate the download process again at a later time. - - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |Zcl Status | -|Manufacturer code |Unsigned 16-bit integer | -|Image type |Unsigned 16-bit integer | -|File Version |Unsigned 32-bit integer | - - -#### Query Specific File Command [0x08] - -Client devices shall send a Query Specific File Request command to the server to request for a file that -is specific and unique to it. Such file could contain non-firmware data such as security credential -(needed for upgrading from Smart Energy 1.1 to Smart Energy 2.0), configuration or log. When the -device decides to send the Query Specific File Request command is manufacturer specific. However, -one example is during upgrading from SE 1.1 to 2.0 where the client may have already obtained new -SE 2.0 image and now needs new SE 2.0 security credential data. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Request node address |IEEE Address | -|Manufacturer code |Unsigned 16-bit integer | -|Image type |Unsigned 16-bit integer | -|File Version |Unsigned 32-bit integer | -|Zigbee Stack Version |Unsigned 16-bit integer | - - -### Generated - - -#### Query Next Image Response Command [0x02] - -The upgrade server sends a Query Next Image Response with one of the following status: SUCCESS, -NO_IMAGE_AVAILABLE or NOT_AUTHORIZED. When a SUCCESS status is sent, it is -considered to be the explicit authorization to a device by the upgrade server that the device may -upgrade to a specific software image. - -A status of NO_IMAGE_AVAILABLE indicates that the server is authorized to upgrade the client but -it currently does not have the (new) OTA upgrade image available for the client. For all clients (both -ZR and ZED)9 , they shall continue sending Query Next Image Requests to the server periodically until -an image becomes available. - -A status of NOT_AUTHORIZED indicates the server is not authorized to upgrade the client. In this -case, the client may perform discovery again to find another upgrade server. The client may implement -an intelligence to avoid querying the same unauthorized server. - - -|Field Name |Data Type | -|---------------------------|---------------------------------------------------| -|Status |Zcl Status | -|Manufacturer code |Unsigned 16-bit integer[Status==ZclStatus.SUCCESS] | -|Image type |Unsigned 16-bit integer[Status==ZclStatus.SUCCESS] | -|File Version |Unsigned 32-bit integer[Status==ZclStatus.SUCCESS] | -|Image Size |Unsigned 32-bit integer[Status==ZclStatus.SUCCESS] | - - - - -#### Image Block Response Command [0x05] - -Upon receipt of an Image Block Request command the server shall generate an Image Block Response. -If the server is able to retrieve the data for the client and does not wish to change the image download -rate, it will respond with a status of SUCCESS and it will include all the fields in the payload. The use -of file offset allows the server to send packets with variable data size during the upgrade process. This -allows the server to support a case when the network topology of a client may change during the -upgrade process, for example, mobile client may move around during the upgrade process. If the client -has moved a few hops away, the data size shall be smaller. Moreover, using file offset eliminates the -need for data padding since each Image Block Response command may contain different data size. A -simple server implementation may choose to only support largest possible data size for the worst-case -scenario in order to avoid supporting sending packets with variable data size. - -The server shall respect the maximum data size value requested by the client and shall not send the data -with length greater than that value. The server may send the data with length smaller than the value -depending on the network topology of the client. For example, the client may be able to receive 100 -bytes of data at once so it sends the request with 100 as maximum data size. But after considering all -the security headers (perhaps from both APS and network levels) and source routing overhead (for -example, the client is five hops away), the largest possible data size that the server can send to the -client shall be smaller than 100 bytes. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |Zcl Status | -|Manufacturer code |Unsigned 16-bit integer | -|Image type |Unsigned 16-bit integer | -|File Version |Unsigned 32-bit integer | -|File offset |Unsigned 32-bit integer | -|Image Data |Byte array | - - - -#### Upgrade End Response Command [0x07] - -When an upgrade server receives an Upgrade End Request command with a status of -INVALID_IMAGE, REQUIRE_MORE_IMAGE, or ABORT, no additional processing shall be done -in its part. If the upgrade server receives an Upgrade End Request command with a status of -SUCCESS, it shall generate an Upgrade End Response with the manufacturer code and image type -received in the Upgrade End Request along with the times indicating when the device should upgrade -to the new image. - -The server may send an unsolicited Upgrade End Response command to the client. This may be used -for example if the server wants to synchronize the upgrade on multiple clients simultaneously. For -client devices, the upgrade server may unicast or broadcast Upgrade End Response command -indicating a single client device or multiple client devices shall switch to using their new images. The -command may not be reliably received by sleepy devices if it is sent unsolicited. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Manufacturer code |Unsigned 16-bit integer | -|Image type |Unsigned 16-bit integer | -|File Version |Unsigned 32-bit integer | -|Current Time |Unsigned 32-bit integer | -|Upgrade Time |Unsigned 32-bit integer | - - - -#### Query Specific File Response Command [0x09] - -The server sends Query Specific File Response after receiving Query Specific File Request from a -client. The server shall determine whether it first supports the Query Specific File Request command. -Then it shall determine whether it has the specific file being requested by the client using all the -information included in the request. The upgrade server sends a Query Specific File Response with -one of the following status: SUCCESS, NO_IMAGE_AVAILABLE or NOT_AUTHORIZED. - -A status of NO_IMAGE_AVAILABLE indicates that the server currently does not have the device -specific file available for the client. A status of NOT_AUTHORIZED indicates the server is not -authorized to send the file to the client. - -|Field Name |Data Type | -|---------------------------|---------------------------------------------------| -|Status |Zcl Status | -|Manufacturer code |Unsigned 16-bit integer[Status==ZclStatus.SUCCESS] | -|Image type |Unsigned 16-bit integer[Status==ZclStatus.SUCCESS] | -|File Version |Unsigned 32-bit integer[Status==ZclStatus.SUCCESS] | -|Image Size |Unsigned 32-bit integer[Status==ZclStatus.SUCCESS] | - - diff --git a/com.zsmartsystems.zigbee.autocode/src/main/resources/zcl_definition.md b/com.zsmartsystems.zigbee.autocode/src/main/resources/zcl_definition.md deleted file mode 100644 index 9a235a630..000000000 --- a/com.zsmartsystems.zigbee.autocode/src/main/resources/zcl_definition.md +++ /dev/null @@ -1,4076 +0,0 @@ -# ZigBee Home Automation [0x0104] - -Home Automation ZigBee cluster library protocol description is used to code generate cluster specific command serialization classes. - -# General - -## General [0xFFFF] - -### Received - -#### Read Attributes Command [0x00] - -The read attributes command is generated when a device wishes to determine the -values of one or more attributes located on another device. Each attribute -identifier field shall contain the identifier of the attribute to be read. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Identifiers |N X Attribute identifier | - -#### Read Attributes Response Command [0x01] - -The read attributes response command is generated in response to a read attributes -or read attributes structured command. The command frame shall contain a read -attribute status record for each attribute identifier specified in the original read -attributes or read attributes structured command. For each read attribute status -record, the attribute identifier field shall contain the identifier specified in the -original read attributes or read attributes structured command. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Records |N X Read attribute status record | - -#### Write Attributes Command [0x02] - -The write attributes command is generated when a device wishes to change the -values of one or more attributes located on another device. Each write attribute -record shall contain the identifier and the actual value of the attribute to be -written. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Records |N X Write attribute record | - -#### Write Attributes Undivided Command [0x03] - -The write attributes undivided command is generated when a device wishes to -change the values of one or more attributes located on another device, in such a -way that if any attribute cannot be written (e.g. if an attribute is not implemented -on the device, or a value to be written is outside its valid range), no attribute -values are changed. - -In all other respects, including generation of a write attributes response command, -the format and operation of the command is the same as that of the write attributes -command, except that the command identifier field shall be set to indicate the -write attributes undivided command. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Records |N X Write attribute record | - -#### Write Attributes Response Command [0x04] - -The write attributes response command is generated in response to a write -attributes command. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Records |N X Write attribute status record | - -#### Write Attributes No Response Command [0x05] - -The write attributes no response command is generated when a device wishes to -change the value of one or more attributes located on another device but does not -require a response. Each write attribute record shall contain the identifier and the -actual value of the attribute to be written. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Records |N X Write attribute record | - -#### Configure Reporting Command [0x06] - -The Configure Reporting command is used to configure the reporting mechanism -for one or more of the attributes of a cluster. - -The individual cluster definitions specify which attributes shall be available to this -reporting mechanism, however specific implementations of a cluster may make -additional attributes available. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Records |N X Attribute reporting configuration record| - -#### Configure Reporting Response Command [0x07] - -The Configure Reporting Response command is generated in response to a -Configure Reporting command. - -|Field Name |Data Type | -|---------------------------|-----------------------------| -|Status |Zcl Status [status-response] | -|Records |N X Attribute status record | - - -##### Status -Status is only provided if the command was successful, and the -attribute status records are not included for successfully -written attributes, in order to save bandwidth. - -##### Records -Note that attribute status records are not included for successfully -configured attributes in order to save bandwidth. In the case of successful -configuration of all attributes, only a single attribute status record SHALL -be included in the command, with the status field set to SUCCESS and the direction and -attribute identifier fields omitted. - -#### Read Reporting Configuration Command [0x08] - -The Read Reporting Configuration command is used to read the configuration -details of the reporting mechanism for one or more of the attributes of a cluster. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Records |N X Attribute record | - -#### Read Reporting Configuration Response Command [0x09] - -The Read Reporting Configuration Response command is used to respond to a -Read Reporting Configuration command. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Records |N X Attribute reporting configuration record| - -#### Report Attributes Command [0x0a] - -The report attributes command is used by a device to report the values of one or -more of its attributes to another device, bound a priori. Individual clusters, defined -elsewhere in the ZCL, define which attributes are to be reported and at what -interval. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Reports |N X Attribute report | - -#### Default Response Command [0x0b] - -The default response command is generated when a device receives a unicast -command, there is no other relevant response specified for the command, and -either an error results or the Disable default response bit of its Frame control field -is set to 0. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Command identifier |Unsigned 8-bit integer | -|Status code |Zcl Status | - -#### Discover Attributes Command [0x0c] - -The discover attributes command is generated when a remote device wishes to -discover the identifiers and types of the attributes on a device which are supported -within the cluster to which this command is directed. - -|Field Name |Data Type | -|------------------------------|---------------------------| -|Start attribute identifier |Unsigned 16-bit integer | -|Maximum attribute identifiers |Unsigned 8-bit integer | - -##### Start attribute identifier -The start attribute identifier field is 16 bits in length and specifies the value -of the identifier at which to begin the attribute discovery. - -##### Maximum attribute identifiers -The maximum attribute identifiers field is 8 bits in length and specifies the -maximum number of attribute identifiers that are to be returned in the resulting -Discover Attributes Response command. - -#### Discover Attributes Response Command [0x0d] - -The discover attributes response command is generated in response to a discover -attributes command. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Discovery Complete |Boolean | -|Attribute Information |N X Attribute information | - - -##### Discovery Complete -The discovery complete field is a Boolean field. A value of 0 indicates that there -are more attributes to be discovered that have an attribute identifier value greater -than the last attribute identifier in the last attribute information field. A value -of 1 indicates that there are no more attributes to be discovered. - -##### Attribute Identifier -The attribute identifier field SHALL contain the identifier of a discovered attribute. -Attributes SHALL be included in ascending order, starting with the lowest attribute -identifier that is greater than or equal to the start attribute identifier field of the -received Discover Attributes command. - -#### Read Attributes Structured Command [0x0e] - -The read attributes command is generated when a device wishes to determine the -values of one or more attributes, or elements of attributes, located on another -device. Each attribute identifier field shall contain the identifier of the attribute to -be read. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Attribute selectors |N X Attribute selector | - -#### Write Attributes Structured Command [0x0f] - -The write attributes structured command is generated when a device wishes to -change the values of one or more attributes located on another device. Each write -attribute record shall contain the identifier and the actual value of the attribute, or -element thereof, to be written. - -|Field Name |Data Type | -|---------------------------|-----------------------------| -|Status |Zcl Status [status-response] | -|Attribute selectors |N X Attribute selector | - - -##### Status -Status is only provided if the command was successful, and the -attribute selector records are not included for successfully -written attributes, in order to save bandwidth. - -##### Attribute selectors -Note that write attribute status records are not included for successfully -written attributes, in order to save bandwidth. In the case of successful -writing of all attributes, only a single write attribute status record -SHALL be included in the command, with the status field set to SUCCESS and the -attribute identifier and selector fields omitted. - -#### Write Attributes Structured Response Command [0x10] - -The write attributes structured response command is generated in response to a -write attributes structured command. - -|Field Name |Data Type | -|---------------------------|----------------------------------| -|Status |Zcl Status[status-response] | -|Records |N X Write attribute status record | - -##### Status -Status is only provided if the command was successful, and the write -attribute status records are not included for successfully -written attributes, in order to save bandwidth. - -##### Records -Note that write attribute status records are not included for successfully -written attributes, in order to save bandwidth. In the case of successful -writing of all attributes, only a single write attribute status record -SHALL be included in the command, with the status field set to SUCCESS and the -attribute identifier field omitted. - -#### Discover Commands Received [0x11] - -The Discover Commands Received command is generated when a remote device wishes to discover the -optional and mandatory commands the cluster to which this command is sent can process. - -|Field Name |Data Type | -|-----------------------------|---------------------------| -|Start command identifier |Unsigned 8-bit integer | -|Maximum command identifiers |Unsigned 8-bit integer | - - -#### Discover Commands Received Response [0x12] - -The Discover Commands Received Response is generated in response to a Discover Commands Received -command. - -|Field Name |Data Type | -|-----------------------------|-----------------------------| -|Discovery complete |Boolean | -|Command identifiers |X Unsigned 8-bit integer | - - -#### Discover Commands Generated [0x13] - -The Discover Commands Generated command is generated when a remote device wishes to discover the -commands that a cluster may generate on the device to which this command is directed. - -|Field Name |Data Type | -|-----------------------------|---------------------------| -|Start command identifier |Unsigned 8-bit integer | -|Maximum command identifiers |Unsigned 8-bit integer | - -#### Discover Commands Generated Response [0x14] - -The Discover Commands Generated Response is generated in response to a Discover Commands Generated -command. - -|Field Name |Data Type | -|-----------------------------|-----------------------------| -|Discovery complete |Boolean | -|Command identifiers |X Unsigned 8-bit integer | - - -#### Discover Attributes Extended [0x15] - -The Discover Attributes Extended command is generated when a remote device wishes to discover the -identifiers and types of the attributes on a device which are supported within the cluster to which this -command is directed, including whether the attribute is readable, writeable or reportable. - -|Field Name |Data Type | -|-----------------------------|---------------------------| -|Start attribute identifier |Unsigned 16-bit integer | -|Maximum attribute identifiers|Unsigned 8-bit integer | - - -#### Discover Attributes Extended Response [0x16] - -The Discover Attributes Extended Response command is generated in response to a Discover Attributes -Extended command. - -|Field Name |Data Type | -|-----------------------------|-----------------------------------| -|Discovery complete |Boolean | -|Attribute Information |N x Extended Attribute Information | - - - -## Basic [0x0000] - -### Attributes - -|Id |Name |Type |Access |Implement |Reporting | -|-------|---------------------|---------------------------|-----------|----------|----------| -|0x0000 |ZCLVersion |Unsigned 8-bit integer |Read Only |Mandatory | | -|0x0001 |ApplicationVersion |Unsigned 8-bit integer |Read Only |Mandatory | | -|0x0002 |StackVersion |Unsigned 8-bit integer |Read Only |Mandatory | | -|0x0003 |HWVersion |Unsigned 8-bit integer |Read Only |Mandatory | | -|0x0004 |ManufacturerName |Character string |Read Only |Mandatory | | -|0x0005 |ModelIdentifier |Character string |Read Only |Mandatory | | -|0x0006 |DateCode |Character string |Read Only |Mandatory | | -|0x0007 |PowerSource |8-bit enumeration |Read Only |Mandatory | | -|0x0010 |LocationDescription |Character string |Read/Write |Mandatory | | -|0x0011 |PhysicalEnvironment |8-bit enumeration |Read/Write |Mandatory | | -|0x0012 |DeviceEnabled |Boolean |Read/Write |Mandatory | | -|0x0013 |AlarmMask |8-bit bitmap |Read/Write |Mandatory | | -|0x0014 |DisableLocalConfig |8-bit bitmap |Read/Write |Mandatory | | -|0x4000 |SWBuildID |Character string |Read Only |Optional | | - -#### ZCLVersion Attribute -The ZCLVersion attribute is 8 bits in length and specifies the version number of -the ZigBee Cluster Library that all clusters on this endpoint conform to. - -#### ApplicationVersion Attribute -The ApplicationVersion attribute is 8 bits in length and specifies the version -number of the application software contained in the device. The usage of this -attribute is manufacturer dependent. - -#### StackVersion Attribute -The StackVersion attribute is 8 bits in length and specifies the version number -of the implementation of the ZigBee stack contained in the device. The usage of -this attribute is manufacturer dependent. - -#### HWVersion Attribute -The HWVersion attribute is 8 bits in length and specifies the version number of -the hardware of the device. The usage of this attribute is manufacturer dependent. - -#### ManufacturerName Attribute -The ManufacturerName attribute is a maximum of 32 bytes in length and specifies -the name of the manufacturer as a ZigBee character string. - -#### ModelIdentifier Attribute -The ModelIdentifier attribute is a maximum of 32 bytes in length and specifies the -model number (or other identifier) assigned by the manufacturer as a ZigBee character string. - -#### DateCode Attribute -The DateCode attribute is a ZigBee character string with a maximum length of 16 bytes. -The first 8 characters specify the date of manufacturer of the device in international -date notation according to ISO 8601, i.e. YYYYMMDD, e.g. 20060814. - -#### PowerSource Attribute -The PowerSource attribute is 8 bits in length and specifies the source(s) of power -available to the device. Bits b0–b6 of this attribute represent the primary power -source of the device and bit b7 indicates whether the device has a secondary power -source in the form of a battery backup. - -|Id |Name | -|-------|--------------------------| -|0x0000 |Unknown | -|0x0001 |Mains Single Phase | -|0x0002 |Mains Three Phase | -|0x0003 |Battery | -|0x0004 |DC Source | -|0x0005 |Emergency Mains Constant | -|0x0006 |Emergency Mains Changeover| - - - -#### LocationDescription Attribute -The LocationDescription attribute is a maximum of 16 bytes in length and describes -the physical location of the device as a ZigBee character string. - -#### PhysicalEnvironment Attribute -The PhysicalEnvironment attribute is 8 bits in length and specifies the type of -physical environment in which the device will operate. - -|Id |Name | -|-------|--------------------------| -|0x0000 |Unknown | -|0x0001 |Atrium | -|0x0002 |Bar | -|0x0003 |Courtyard | -|0x0004 |Bathroom | -|0x0005 |edroom | - -#### DeviceEnabled Attribute -The DeviceEnabled attribute is a boolean and specifies whether the device is enabled -or disabled. - -#### AlarmMask Attribute -The AlarmMask attribute is 8 bits in length and specifies which of a number of general -alarms may be generated. - -#### DisableLocalConfig Attribute -The DisableLocalConfig attribute allows a number of local device configuration -functions to be disabled. - -The intention of this attribute is to allow disabling of any local configuration -user interface, for example to prevent reset or binding buttons being activated by -unauthorised persons in a public building. - -#### SWBuildID Attribute -The SWBuildIDattribute represents a detailed, manufacturer-specific reference to the version of the software. - - -### Received - -#### Reset to Factory Defaults Command [0x00] -On receipt of this command, the device resets all the attributes of all its clusters -to their factory defaults. Note that ZigBee networking functionality,bindings, groups -or other persistent data are not affected by this command - -|Field Name |Data Type | -|---------------------------|---------------------------| - -### Generated - -No cluster specific commands. - -## Power configuration [0x0001] -Attributes for determining detailed information about a device’s power source(s), -and for configuring under/over voltage alarms. - -### Attributes - -|Id |Name |Type |Access |Implement |Reporting | -|-------|--------------------------|---------------------------|-----------|----------|----------| -|0x0000 |MainsVoltage |Unsigned 16-bit integer |Read only |Optional | | -|0x0001 |MainsFrequency |Unsigned 16-bit integer |Read only |Optional | | -|0x0010 |MainsAlarmMask |8-bit Bitmap |Read/Write |Optional | | -|0x0011 |MainsVoltageMinThreshold |Unsigned 16-bit integer |Read/Write |Optional | | -|0x0012 |MainsVoltageMaxThreshold |Unsigned 16-bit integer |Read/Write |Optional | | -|0x0013 |MainsVoltageDwellTripPoint|Unsigned 16-bit integer |Read/Write |Optional | | -|0x0020 |BatteryVoltage |Unsigned 8-bit integer |Read |Optional | | -|0x0021 |BatteryPercentageRemaining |Unsigned 8-bit integer |Read |Optional |Mandatory | -|0x0030 |BatteryManufacturer |Character string |Read/Write |Optional | | -|0x0031 |BatterySize |8-bit Enumeration |Read/Write |Optional | | -|0x0032 |BatteryAHrRating |Unsigned 16-bit integer |Read/Write |Optional | | -|0x0033 |BatteryQuantity |Unsigned 8-bit integer |Read/Write |Optional | | -|0x0034 |BatteryRatedVoltage |Unsigned 8-bit integer |Read/Write |Optional | | -|0x0035 |BatteryAlarmMask |8-bit Bitmap |Read/Write |Optional | | -|0x0036 |BatteryVoltageMinThreshold |Unsigned 8-bit integer |Read/Write |Optional | | -|0x0037 |BatteryVoltageThreshold1 |Unsigned 8-bit integer |Read/Write |Optional | | -|0x0038 |BatteryVoltageThreshold2 |Unsigned 8-bit integer |Read/Write |Optional | | -|0x0039 |BatteryVoltageThreshold3 |Unsigned 8-bit integer |Read/Write |Optional | | -|0x003A |BatteryPercentageMinThreshold|Unsigned 8-bit integer |Read/Write |Optional | | -|0x003B |BatteryPercentageThreshold1 |Unsigned 8-bit integer |Read/Write |Optional | | -|0x003C |BatteryPercentageThreshold2 |Unsigned 8-bit integer |Read/Write |Optional | | -|0x003D |BatteryPercentageThreshold3 |Unsigned 8-bit integer |Read/Write |Optional | | -|0x003E |BatteryAlarmState |32-bit Bitmap |Read |Optional | | - - - -#### MainsVoltage Attribute -The MainsVoltage attribute is 16-bits in length and specifies the actual (measured) -RMS voltage (or DC voltage in the case of a DC supply) currently applied to the -device, measured in units of 100mV. - -#### MainsFrequency Attribute -The MainsFrequency attribute is 8-bits in length and represents the frequency, in -Hertz, of the mains as determined by the device as follows:- - -MainsFrequency = 0.5 x measured frequency - -Where 2 Hz <= measured frequency <= 506 Hz, corresponding to a - -MainsFrequency in the range 1 to 0xfd. - -The maximum resolution this format allows is 2 Hz. -The following special values of MainsFrequency apply. -

  • 0x00 indicates a frequency that is too low to be measured.
  • -
  • 0xfe indicates a frequency that is too high to be measured.
  • -
  • 0xff indicates that the frequency could not be measured.
  • - -#### MainsAlarmMask Attribute -The MainsAlarmMask attribute is 8-bits in length and specifies which mains -alarms may be generated. A ‘1’ in each bit position enables the alarm. - -#### MainsVoltageMinThreshold Attribute -The MainsVoltageMinThreshold attribute is 16-bits in length and specifies the -lower alarm threshold, measured in units of 100mV, for the MainsVoltage -attribute. The value of this attribute shall be less than MainsVoltageMaxThreshold. - -If the value of MainsVoltage drops below the threshold specified by -MainsVoltageMinThreshold, the device shall start a timer to expire after -MainsVoltageDwellTripPoint seconds. If the value of this attribute increases to -greater than or equal to MainsVoltageMinThreshold before the timer expires, the -device shall stop and reset the timer. If the timer expires, an alarm shall be -generated. - -The Alarm Code field included in the generated alarm shall be 0x00. - -If this attribute takes the value 0xffff then this alarm shall not be generated. - -#### MainsVoltageMaxThreshold Attribute -The MainsVoltageMaxThreshold attribute is 16-bits in length and specifies the -upper alarm threshold, measured in units of 100mV, for the MainsVoltage -attribute. The value of this attribute shall be greater than -MainsVoltageMinThreshold. - -If the value of MainsVoltage rises above the threshold specified by -MainsVoltageMaxThreshold, the device shall start a timer to expire after -MainsVoltageDwellTripPoint seconds. If the value of this attribute drops to lower -than or equal to MainsVoltageMaxThreshold before the timer expires, the device -shall stop and reset the timer. If the timer expires, an alarm shall be generated. - -The Alarm Code field included in the generated alarm shall be 0x01. - -If this attribute takes the value 0xffff then this alarm shall not be generated. - -#### MainsVoltageDwellTripPoint Attribute -The MainsVoltageDwellTripPoint attribute is 16-bits in length and specifies the -length of time, in seconds that the value of MainsVoltage may exist beyond either -of its thresholds before an alarm is generated. - -If this attribute takes the value 0xffff then the associated alarms shall not be -generated. - -#### BatteryVoltage Attribute -The BatteryVoltage attribute is 8-bits in length and specifies the current actual -(measured) battery voltage, in units of 100mV. -The value 0xff indicates an invalid or unknown reading. - -#### BatteryManufacturer Attribute -The BatteryManufacturer attribute is a maximum of 16 bytes in length and -specifies the name of the battery manufacturer as a ZigBee character string. - -#### BatterySize Attribute -The BatterySize attribute is an enumeration which specifies the type of battery -being used by the device. - -|Id |Name | -|-------|--------------------------| -|0x0000 |No Battery | -|0x0001 |Build In | -|0x0002 |Other | -|0x0003 |AA Cell | -|0x0004 |AAA Cell | -|0x0005 |C Cell | -|0x0006 |D Cell | -|0x0007 |CR2 Cell | -|0x0008 |CR123A Cell | -|0x00FF |Unknown | - - -#### BatteryAHrRating Attribute -The BatteryAHrRating attribute is 16-bits in length and specifies the Ampere-hour -rating of the battery, measured in units of 10mAHr. - -#### BatteryQuantity Attribute -The BatteryQuantity attribute is 8-bits in length and specifies the number of -battery cells used to power the device. - -#### BatteryRatedVoltage Attribute -The BatteryRatedVoltage attribute is 8-bits in length and specifies the rated -voltage of the battery being used in the device, measured in units of 100mV. - -#### BatteryAlarmMask Attribute -The BatteryAlarmMask attribute is 8-bits in length and specifies which battery -alarms may be generated. - -#### BatteryVoltageMinThreshold Attribute -The BatteryVoltageMinThreshold attribute is 8-bits in length and specifies the low -voltage alarm threshold, measured in units of 100mV, for the BatteryVoltage -attribute. - -If the value of BatteryVoltage drops below the threshold specified by -BatteryVoltageMinThreshold an alarm shall be generated. - -The Alarm Code field included in the generated alarm shall be 0x10. - -If this attribute takes the value 0xff then this alarm shall not be generated. - -### Received - -No cluster specific commands. - -### Generated - -No cluster specific commands. - -## Device Temperature Configuration [0x0002] - -### Received - -No cluster specific commands. - -### Generated - -No cluster specific commands. - -## Identify [0x0003] -Attributes and commands to put a device into an Identification mode (e.g. flashing -a light), that indicates to an observer – e.g. an installer - which of several devices -it is, also to request any device that is identifying itself to respond to the initiator. - -Note that this cluster cannot be disabled, and remains functional regardless of the -setting of the DeviceEnable attribute in the Basic cluster. - -### Attributes - -|Id |Name |Type |Access |Implement |Reporting | -|-------|---------------------|---------------------------|-----------|----------|----------| -|0x0000 |IdentifyTime |Unsigned 16-bit integer |Read/Write |Mandatory | | - -#### IdentifyTime Attribute -The IdentifyTime attribute specifies the remaining length of time, in seconds, that -the device will continue to identify itself. - -If this attribute is set to a value other than 0x0000 then the device shall enter its -identification procedure, in order to indicate to an observer which of several -devices it is. It is recommended that this procedure consists of flashing a light -with a period of 0.5 seconds. The IdentifyTime attribute shall be decremented -every second. - -If this attribute reaches or is set to the value 0x0000 then the device shall -terminate its identification procedure. - -### Received - -#### Identify Command [0x00] -The identify command starts or stops the receiving device identifying itself. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Identify Time |Unsigned 16-bit integer | - -#### Identify Query Command [0x01] -|Field Name |Data Type | -|---------------------------|---------------------------| - -### Generated - -#### Identify Query Response Command [0x00] -The identify query response command is generated in response to receiving an -Identify Query command in the case that the device is currently identifying itself. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Identify Time |Unsigned 16-bit integer | - -## Groups [0x0004] -The ZigBee specification provides the capability for group addressing. That is, -any endpoint on any device may be assigned to one or more groups, each labeled -with a 16-bit identifier (0x0001 – 0xfff7), which acts for all intents and purposes -like a network address. Once a group is established, frames, sent using the -APSDE-DATA.request primitive and having a DstAddrMode of 0x01, denoting -group addressing, will be delivered to every endpoint assigned to the group -address named in the DstAddr parameter of the outgoing APSDE-DATA.request -primitive on every device in the network for which there are such endpoints. - -Management of group membership on each device and endpoint is implemented -by the APS, but the over-the-air messages that allow for remote management and -commissioning of groups are defined here in the cluster library on the theory that, -while the basic group addressing facilities are integral to the operation of the -stack, not every device will need or want to implement this management cluster. -Furthermore, the placement of the management commands here allows developers -of proprietary profiles to avoid implementing the library cluster but still exploit -group addressing - -### Received - -#### Add Group Command [0x00] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Group ID |Unsigned 16-bit integer | -|Group Name |Character string | - -#### View Group Command [0x01] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Group ID |Unsigned 16-bit integer | - -#### Get Group Membership Command [0x02] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Group count |Unsigned 8-bit integer | -|Group list |N X Unsigned 16-bit integer| - -#### Remove Group Command [0x03] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Group ID |Unsigned 16-bit integer | - -#### Remove All Groups Command [0x04] -|Field Name |Data Type | -|---------------------------|---------------------------| - -#### Add Group If Identifying Command [0x05] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Group ID |Unsigned 16-bit integer | -|Group Name |Character string | - -### Generated - -#### Add Group Response Command [0x00] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |8-bit enumeration | -|Group ID |Unsigned 16-bit integer | - -#### View Group Response Command [0x01] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |8-bit enumeration | -|Group ID |Unsigned 16-bit integer | -|Group Name |Character string | - -#### Get Group Membership Response Command [0x02] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Capacity |Unsigned 8-bit integer | -|Group count |Unsigned 8-bit integer | -|Group list |N X Unsigned 16-bit integer| - -#### Remove Group Response Command [0x03] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |8-bit enumeration | -|Group ID |Unsigned 16-bit integer | - -## Scenes [0x0005] -The scenes cluster provides attributes and commands for setting up and recalling -scenes. Each scene corresponds to a set of stored values of specified attributes for -one or more clusters on the same end point as the scenes cluster. - -In most cases scenes are associated with a particular group ID. Scenes may also -exist without a group, in which case the value 0x0000 replaces the group ID. Note -that extra care is required in these cases to avoid a scene ID collision, and that -commands related to scenes without a group may only be unicast, i.e.: they may -not be multicast or broadcast. - -### Attributes - -|Id |Name |Type |Access |Implement |Reporting | -|-------|---------------------|---------------------------|-----------|----------|----------| -|0x0000 |SceneCount |Unsigned 8-bit integer |Read only |Mandatory | | -|0x0001 |CurrentScene |Unsigned 8-bit integer |Read only |Mandatory | | -|0x0002 |CurrentGroup |Unsigned 16-bit integer |Read only |Mandatory | | -|0x0003 |SceneValid |Boolean |Read only |Mandatory | | -|0x0004 |NameSupport |8-bit bitmap |Read only |Mandatory | | -|0x0005 |LastConfiguredBy |IEEE Address |Read only |Optional | | - -#### SceneCount Attribute -The SceneCount attribute specifies the number of scenes currently in the device's -scene table. - -#### CurrentScene Attribute -The CurrentScene attribute holds the Scene ID of the scene last invoked. - -#### CurrentGroup Attribute -The CurrentGroup attribute holds the Group ID of the scene last invoked, or -0x0000 if the scene last invoked is not associated with a group. - -#### SceneValid Attribute -The SceneValid attribute indicates whether the state of the device corresponds to -that associated with the CurrentScene and CurrentGroup attributes. TRUE -indicates that these attributes are valid, FALSE indicates that they are not valid. - -Before a scene has been stored or recalled, this attribute is set to FALSE. After a -successful Store Scene or Recall Scene command it is set to TRUE. If, after a -scene is stored or recalled, the state of the device is modified, this attribute is set to -FALSE. - -#### NameSupport Attribute -The most significant bit of the NameSupport attribute indicates whether or not -scene names are supported. A value of 1 indicates that they are supported, and a -value of 0 indicates that they are not supported. - -#### LastConfiguredBy Attribute -The LastConfiguredBy attribute is 64-bits in length and specifies the IEEE address -of the device that last configured the scene table. - -The value 0xffffffffffffffff indicates that the device has not been configured, or -that the address of the device that last configured the scenes cluster is not known. - - -### Received - -#### Add Scene Command [0x00] -The Add Scene command shall be addressed to a single device (not a group). - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Group ID |Unsigned 16-bit integer | -|Scene ID |Unsigned 8-bit integer | -|Transition time |Unsigned 16-bit integer | -|Scene Name |Character string | -|Extension field sets |N X Extension field set | - -#### View Scene Command [0x01] -The View Scene command shall be addressed to a single device (not a group). - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Group ID |Unsigned 16-bit integer | -|Scene ID |Unsigned 8-bit integer | - -#### Remove Scene Command [0x02] -The Remove All Scenes may be addressed to a single device or to a group. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Group ID |Unsigned 16-bit integer | -|Scene ID |Unsigned 8-bit integer | - -#### Remove All Scenes Command [0x03] -The Remove All Scenes may be addressed to a single device or to a group. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Group ID |Unsigned 16-bit integer | - -#### Store Scene Command [0x04] -The Store Scene command may be addressed to a single device or to a group. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Group ID |Unsigned 16-bit integer | -|Scene ID |Unsigned 8-bit integer | - -#### Recall Scene Command [0x05] -The Recall Scene command may be addressed to a single device or to a group. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Group ID |Unsigned 16-bit integer | -|Scene ID |Unsigned 8-bit integer | - -#### Get Scene Membership Command [0x06] -The Get Scene Membership command can be used to find an unused scene -number within the group when no commissioning tool is in the network, or for a -commissioning tool to get used scenes for a group on a single device or on all -devices in the group. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Group ID |Unsigned 16-bit integer | - -### Generated - -#### Add Scene Response Command [0x00] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |8-bit enumeration | -|Group ID |Unsigned 16-bit integer | -|Scene ID |Unsigned 8-bit integer | - -#### View Scene Response Command [0x01] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |8-bit enumeration | -|Group ID |Unsigned 16-bit integer | -|Scene ID |Unsigned 8-bit integer | -|Transition time |Unsigned 16-bit integer | -|Scene Name |Character string | -|Extension field sets |N X Extension field set | - -#### Remove Scene Response Command [0x02] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |8-bit enumeration | -|Group ID |Unsigned 16-bit integer | -|Scene ID |Unsigned 8-bit integer | - -#### Remove All Scenes Response Command [0x03] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |8-bit enumeration | -|Group ID |Unsigned 16-bit integer | - -#### Store Scene Response Command [0x04] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |8-bit enumeration | -|Group ID |Unsigned 16-bit integer | -|Scene ID |Unsigned 8-bit integer | - -#### Get Scene Membership Response Command [0x05] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |8-bit enumeration | -|Capacity |Unsigned 8-bit integer | -|Group ID |Unsigned 16-bit integer | -|Scene count |Unsigned 8-bit integer | -|Scene list |N x Unsigned 8-bit integer | - -## On/Off [0x0006] -Attributes and commands for switching devices between ‘On’ and ‘Off’ states. - -### Attributes - -|Id |Name |Type |Access |Implement |Reporting | -|-------|---------------------|---------------------------|-----------|----------|----------| -|0x0000 |OnOff |Boolean |Read Only |Mandatory |Mandatory | -|0x4000 |GlobalSceneControl |Boolean |Read | | | -|0x4001 |OffTime |Unsigned 16-bit integer |Read/Write | | | -|0x4002 |OffWaitTime |Unsigned 16-bit integer |Read/Write | | | - - -#### OnOff Attribute -The OnOff attribute has the following values: 0 = Off, 1 = On - -#### GlobalSceneControl Attribute -In order to support the use case where the user gets back the last setting of the devices (e.g. level settings for lamps), a global scene is introduced which is stored when the devices are turned off and recalled when the devices are turned on. The global scene is defined as the scene that is stored with group identifier 0 and scene identifier 0. - -The GlobalSceneControl attribute is defined in order to prevent a second off command storing the all-devices-off situation as a global scene, and to prevent a second on command destroying the current settings by going back to the global scene. - -The GlobalSceneControl attribute SHALL be set to TRUE after the reception of a command which causes the OnOff attribute to be set to TRUE, such as a standard On command, a Move to level (with on/off) command, a Recall scene command or a On with recall global scene command. - -The GlobalSceneControl attribute is set to FALSE after reception of a Off with effect command. - -#### OnTime Attribute -The OnTime attribute specifies the length of time (in 1/10ths second) that the “on” state SHALL be maintained before automatically transitioning to the “off” state when using the On with timed off command. If this attribute is set to 0x0000 or 0xffff, the device SHALL remain in its current state. - -#### OffWaitTime Attribute -The OffWaitTime attribute specifies the length of time (in 1/10ths second) that the “off” state SHALL be guarded to prevent an on command turning the device back to its “on” state (e.g., when leaving a room, the lights are turned off but an occupancy sensor detects the leaving person and attempts to turn the lights back on). If this attribute is set to 0x0000, the device SHALL remain in its current state. - -### Received - -#### Off Command [0x00] -|Field Name |Data Type | -|---------------------------|---------------------------| - -#### On Command [0x01] -|Field Name |Data Type | -|---------------------------|---------------------------| - -#### Toggle Command [0x02] -|Field Name |Data Type | -|---------------------------|---------------------------| - -#### Off With Effect Command [0x40] -The Off With Effect command allows devices to be turned off using enhanced ways of fading. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Effect Identifier |Unsigned 8-bit integer | -|Effect Variant |Unsigned 8-bit integer | - -##### Effect Identifier Field -The Effect Identifier field is 8-bits in length and specifies the fading effect to use when -switching the device off. - -|Id |Name | -|-------|--------------------------| -|0x0000 |Delayed All Off | -|0x0001 |Dying Light | - -##### Effect Variant Field -The Effect Variant field is 8-bits in length and is used to indicate which variant of the -effect, indicated in the Effect Identifier field, SHOULD be triggered. If a device does not -support the given variant, it SHALL use the default variant. This field is dependent on the -value of the Effect Identifier field. - - -#### On With Recall Global Scene Command [0x41] - -The On With Recall Global Scene command allows the recall of the settings when the device was turned off. - -|Field Name |Data Type | -|---------------------------|---------------------------| - -#### On With Timed Off Command [0x42] - -The On With Timed Off command allows devices to be turned on for a specific duration -with a guarded off duration so that SHOULD the device be subsequently switched off, -further On With Timed Off commands, received during this time, are prevented from -turning the devices back on. Note that the device can be periodically re-kicked by -subsequent On With Timed Off commands, e.g., from an on/off sensor. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|On Off Control |Unsigned 8-bit integer | -|On Time |Unsigned 16-bit integer | -|Off Wait Time |Unsigned 16-bit integer | - -##### On Off Control Field -The On/Off Control field is 8-bits in length and contains information on how the device is to be operated. - -##### On Time Field -The On Time field is 16 bits in length and specifies the length of time (in 1/10ths second) -that the device is to remain “on”, i.e., with its OnOffattribute equal to 0x01, -before automatically turning “off”. This field SHALL be specified in the range 0x0000–0xfffe. - -##### Off Time Wait Field -The Off Wait Time field is 16 bits in length and specifies the length of time (in 1/10ths second) -that the device SHALL remain “off”, i.e., with its OnOffattribute equal to 0x00, and guarded to -prevent an on command turning the device back “on”. This field SHALL be specified in the range 0x0000–0xfffe. - -### Generated - -No cluster specific commands. - -## On/off Switch Configuration [0x0007] -Attributes and commands for configuring On/Off switching devices - -### Attributes - -|Id |Name |Type |Access |Implement |Reporting | -|-------|---------------------|---------------------------|-----------|----------|----------| -|0x0000 |SwitchType |8-bit enumeration |Read Only |Mandatory | | -|0x0010 |SwitchActions |8-bit enumeration |Read Write |Mandatory | | - -#### SwitchType Attribute -The SwitchTypeattribute specifies the basic functionality of the On/Off switching device. - -|Id |Name | -|-------|--------------------------| -|0x0000 |Toggle | -|0x0001 |Momentary | -|0x0002 |Multifunction | - -#### SwitchActions Attribute - -The SwitchActions attribute is 8 bits in length and specifies the commands of the On/Off cluster -to be generated when the switch moves between its two states - -|Id |Name | -|-------|--------------------------| -|0x0000 |On | -|0x0001 |Off | -|0x0002 |Toggle | - - -### Received - -No cluster specific commands. - -### Generated - -No cluster specific commands. - -## Level Control [0x0008] -This cluster provides an interface for controlling a characteristic of a device that -can be set to a level, for example the brightness of a light, the degree of closure of -a door, or the power output of a heater. - - -### Attributes - -|Id |Name |Type |Access |Implement |Reporting | -|-------|---------------------|---------------------------|-----------|----------|----------| -|0x0000 |CurrentLevel |Unsigned 8-bit integer |Read Only |Mandatory |Mandatory | -|0x0001 |RemainingTime |Unsigned 16-bit integer |Read Only |Optional | | -|0x0010 |OnOffTransitionTime |Unsigned 16-bit integer |Read/Write |Optional | | -|0x0011 |OnLevel |Unsigned 8-bit integer |Read/Write |Optional | | -|0x0012 |OnTransitionTime |Unsigned 16-bit integer |Read/Write |Optional | | -|0x0013 |OffTransitionTime |Unsigned 16-bit integer |Read/Write |Optional | | -|0x0014 |DefaultMoveRate |Unsigned 16-bit integer |Read/Write |Optional | | - -#### CurrentLevel Attribute -The CurrentLevel attribute represents the current level of this device. The -meaning of 'level' is device dependent. Value is between 0 and 254. - -#### RemainingTime Attribute -The RemainingTime attribute represents the time remaining until the current -command is complete - it is specified in 1/10ths of a second. - -#### OnOffTransitionTime Attribute -The OnOffTransitionTime attribute represents the time taken to move to or from -the target level when On of Off commands are received by an On/Off cluster on -the same endpoint. It is specified in 1/10ths of a second. - -The actual time taken should be as close to OnOffTransitionTime as the device is -able. N.B. If the device is not able to move at a variable rate, the -OnOffTransitionTime attribute should not be implemented. - -#### OnLevel Attribute -The OnLevel attribute determines the value that the CurrentLevel attribute is set to -when the OnOff attribute of an On/Off cluster on the same endpoint is set to On. If -the OnLevel attribute is not implemented, or is set to 0xff, it has no effect. - -#### OnTransitionTime Attribute -The OnTransitionTime attribute represents the time taken to move the current level from the -minimum level to the maximum level when an On command is received by an On/Off cluster on -the same endpoint. It is specified in 10ths of a second. If this command is not implemented, -or contains a value of 0xffff, the OnOffTransitionTime will be used instead. - -#### OffTransitionTime Attribute -The OffTransitionTime attribute represents the time taken to move the current level from the -maximum level to the minimum level when an Off command is received by an On/Off cluster on -the same endpoint. It is specified in 10ths of a second. If this command is not implemented, -or contains a value of 0xffff, the OnOffTransitionTime will be used instead. - -#### DefaultMoveRate Attribute -The DefaultMoveRate attribute determines the movement rate, in units per second, when a Move -command is received with a Rate parameter of 0xFF. - -### Received - -#### Move to Level Command [0x00] -On receipt of this command, a device SHALL move from its current level to the -value given in the Level field. The meaning of ‘level’ is device dependent –e.g., -for a light it MAY mean brightness level.The movement SHALL be as continuous as -technically practical, i.e., not a step function, and the time taken to move to -the new level SHALL be equal to the value of the Transition time field, in tenths -of a second, or as close to this as the device is able.If the Transition time field -takes the value 0xffff then the time taken to move to the new level SHALL instead -be determined by the OnOffTransitionTimeattribute. If OnOffTransitionTime, which is -an optional attribute, is not present, the device SHALL move to its new level as fast -as it is able. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Level |Unsigned 8-bit integer | -|Transition time |Unsigned 16-bit integer | - -#### Move Command [0x01] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Move mode |8-bit enumeration | -|Rate |Unsigned 8-bit integer | - -#### Step Command [0x02] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Step mode |8-bit enumeration | -|Step size |Unsigned 8-bit integer | -|Transition time |Unsigned 16-bit integer | - -#### Stop Command [0x03] -|Field Name |Data Type | -|---------------------------|---------------------------| - -#### Move to Level (with On/Off) Command [0x04] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Level |Unsigned 8-bit integer | -|Transition time |Unsigned 16-bit integer | - -#### Move (with On/Off) Command [0x05] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Move mode |8-bit enumeration | -|Rate |Unsigned 8-bit integer | - -#### Step (with On/Off) Command [0x06] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Step mode |8-bit enumeration | -|Step size |Unsigned 8-bit integer | -|Transition time |Unsigned 16-bit integer | - -#### Stop 2 Command [0x07] -|Field Name |Data Type | -|---------------------------|---------------------------| - -### Generated - -No cluster specific commands. - -## Alarms [0x0009] -Attributes and commands for sending alarm notifications and configuring alarm -functionality. - -Alarm conditions and their respective alarm codes are described in individual -clusters, along with an alarm mask field. Where not masked, alarm notifications -are reported to subscribed targets using binding. - -Where an alarm table is implemented, all alarms, masked or otherwise, are -recorded and may be retrieved on demand. - -Alarms may either reset automatically when the conditions that cause are no -longer active, or may need to be explicitly reset. - -### Attributes -|Id |Name |Type |Access |Implement |Reporting | -|-------|---------------------|---------------------------|-----------|----------|----------| -|0x0000 |AlarmCount |Unsigned 16-bit integer |Read Only |Optional | | - -#### AlarmCount Attribute -The AlarmCount attribute is 16-bits in length and specifies the number of entries -currently in the alarm table. This attribute shall be specified in the range 0x00 to -the maximum defined in the profile using this cluster. - -If alarm logging is not implemented this attribute shall always take the value -0x00. - -### Received - -#### Reset Alarm Command [0x00] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Alarm code |8-bit enumeration | -|Cluster identifier |Unsigned 16-bit integer | - -#### Reset All Alarms Command [0x01] -|Field Name |Data Type | -|---------------------------|---------------------------| - -#### Get Alarm Command [0x02] -|Field Name |Data Type | -|---------------------------|---------------------------| - -#### Reset Alarm Log Command [0x03] -|Field Name |Data Type | -|---------------------------|---------------------------| - -### Generated - -#### Alarm Command [0x00] -The alarm command signals an alarm situation on the sending device. - -An alarm command is generated when a cluster which has alarm functionality detects an alarm -condition, e.g., an attribute has taken on a value that is outside a ‘safe’ range. The details -are given by individual cluster specifications. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Alarm code |8-bit enumeration | -|Cluster identifier |Unsigned 16-bit integer | - -#### Get Alarm Response Command [0x01] -If there is at least one alarm record in the alarm table then the status field is set to SUCCESS. -The alarm code, cluster identifier and time stamp fields SHALL all be present and SHALL take their -values from the item in the alarm table that they are reporting.If there are no more alarms logged -in the alarm table then the status field is set to NOT_FOUND and the alarm code, cluster -identifier and time stamp fields SHALL be omitted. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |8-bit enumeration | -|Alarm code |8-bit enumeration | -|Cluster identifier |Unsigned 16-bit integer | -|Timestamp |Unsigned 32-bit integer | - -## Time [0x000a] - -### Attributes -|Id |Name |Type |Access |Implement |Reporting | -|-------|---------------------|---------------------------|-----------|----------|----------| -|0x0000 |Time |UTCTime |Read/Write |Mandatory | | -|0x0001 |TimeStatus |Unsigned 16-bit integer |Read/Write |Optional | | -|0x0002 |TimeZone |Signed 32-bit integer |Read/Write |Optional | | -|0x0003 |DstStart |Unsigned 32-bit integer |Read/Write |Optional | | -|0x0004 |DstEnd |Unsigned 32-bit integer |Read/Write |Optional | | -|0x0005 |DstShift |Signed 32-bit integer |Read/Write |Optional | | -|0x0006 |StandardTime |Signed 32-bit integer |Read Only |Optional | | -|0x0007 |LocalTime |Signed 32-bit integer |Read Only |Optional | | - -#### Time Attribute -The Time attribute is 32-bits in length and holds the time value of a real time -clock. This attribute has data type UTCTime, but note that it may not actually be -synchronised to UTC - see discussion of the TimeStatus attribute below. - -If the Master bit of the TimeStatus attribute has a value of 0, writing to this -attribute shall set the real time clock to the written value, otherwise it cannot be -written. The value 0xffffffff indicates an invalid time. - -#### TimeStatus Attribute -The TimeStatus attribute holds a number of bit fields. - -#### TimeZone Attribute -The TimeZone attribute indicates the local time zone, as a signed offset in seconds -from the Time attribute value. The value 0xffffffff indicates an invalid time zone. - -#### DstStart Attribute -The DstStart attribute indicates the DST start time in seconds. The value 0xffffffff -indicates an invalid DST start time. - -#### DstEnd Attribute -The DstEnd attribute indicates the DST end time in seconds. The value 0xffffffff -indicates an invalid DST end time. - -Note that the three attributes DstStart, DstEnd and DstShift are optional, but if any -one of them is implemented the other two must also be implemented. -Note that this attribute should be set to a new value once every year. - -Note that this attribute should be set to a new value once every year, and should be -written synchronously with the DstStart attribute. - -#### DstEnd Attribute -The DstEnd attribute indicates the DST end time in seconds. The value 0xffffffff -indicates an invalid DST end time. - -Note that this attribute should be set to a new value once every year, and should be -written synchronously with the DstStart attribute - -#### DstShift Attribute -The DstShift attribute represents a signed offset in seconds from the standard time, -to be applied between the times DstStart and DstEnd to calculate the Local Time. -The value 0xffffffff indicates an invalid DST shift. - -The range of this attribute is +/- one day. Note that the actual range of DST values -employed by countries is much smaller than this, so the manufacturer has the -option to impose a smaller range. - -#### StandardTime Attribute -A device may derive the time by reading the Time and TimeZone attributes -and adding them together. If implemented however, the optional StandardTime -attribute indicates this time directly. The value 0xffffffff indicates an invalid -Standard Time. - -#### LocalTime Attribute -A device may derive the time by reading the Time, TimeZone, DstStart, DstEnd -and DstShift attributes and performing the calculation. If implemented however, -the optional LocalTime attribute indicates this time directly. The value 0xffffffff -indicates an invalid Local Time. - -### Received - -No cluster specific commands. - -### Generated - -## RSSI Location [0x000b] - -### Attributes -|Id |Name |Type |Access |Implement |Reporting | -|-------|----------------------|---------------------------|-----------|----------|----------| -|0x0000 |LocationType |8-bit Data |Read only |Mandatory | | -|0x0001 |LocationMethod |8-bit Enumeration |Read only |Mandatory | | -|0x0002 |LocationAge |Unsigned 16-bit Integer |Read only |Optional | | -|0x0003 |QualityMeasure |Unsigned 8-bit Integer |Read only |Optional | | -|0x0004 |NumberOfDevices |Unsigned 8-bit Integer |Read only |Optional | | -|0x0010 |Coordinate1 |Signed 16-bit integer |Read/Write |Mandatory | | -|0x0011 |Coordinate2 |Signed 16-bit integer |Read/Write |Mandatory | | -|0x0012 |Coordinate3 |Signed 16-bit integer |Read/Write |Optional | | -|0x0013 |Power |Signed 16-bit integer |Read/Write |Mandatory | | -|0x0014 |PathLossExponent |Signed 16-bit integer |Read/Write |Mandatory | | -|0x0015 |ReportingPeriod |Signed 16-bit integer |Read/Write |Optional | | -|0x0016 |CalculationPeriod |Signed 16-bit integer |Read/Write |Optional | | -|0x0017 |NumberRSSIMeasurements|Signed 16-bit integer |Read/Write |Optional | | - -#### LocationType Attribute -The LocationType attribute is 8 bits long and is divided into bit fields. - -#### LocationMethod Attribute - -#### LocationAge Attribute -The LocationAge attribute indicates the amount of time, measured in seconds, that -has transpired since the location information was last calculated. This attribute is -not valid if the Absolute bit of the LocationType attribute is set to one. - -#### QualityMeasure Attribute -The QualityMeasure attribute is a measure of confidence in the corresponding -location information. The higher the value, the more confident the transmitting -device is in the location information. A value of 0x64 indicates complete (100%) -confidence and a value of 0x00 indicates zero confidence. (Note: no fixed -confidence metric is mandated – the metric may be application and manufacturer -dependent). - -This field is not valid if the Absolute bit of the LocationType attribute is set to one. - -#### NumberOfDevices Attribute -The NumberOfDevices attribute is the number of devices whose location data -were used to calculate the last location value. This attribute is related to the -QualityMeasure attribute. - -#### Coordinate1 Attributes -The Coordinate1, Coordinate2 and Coordinate3 attributes are signed 16-bit -integers, and represent orthogonal linear coordinates x, y, z in meters as follows. - -x = Coordinate1 / 10, y = Coordinate2 / 10, z = Coordinate3 / 10 - -The range of x is -3276.7 to 3276.7 meters, corresponding to Coordinate1 -between 0x8001 and 0x7fff. The same range applies to y and z. A value of -0x8000 for any of the coordinates indicates that the coordinate is unknown. - -#### Coordinate2 Attributes -The Coordinate1, Coordinate2 and Coordinate3 attributes are signed 16-bit -integers, and represent orthogonal linear coordinates x, y, z in meters as follows. - -x = Coordinate1 / 10, y = Coordinate2 / 10, z = Coordinate3 / 10 - -The range of x is -3276.7 to 3276.7 meters, corresponding to Coordinate1 -between 0x8001 and 0x7fff. The same range applies to y and z. A value of -0x8000 for any of the coordinates indicates that the coordinate is unknown. - -#### Coordinate3 Attributes -The Coordinate1, Coordinate2 and Coordinate3 attributes are signed 16-bit -integers, and represent orthogonal linear coordinates x, y, z in meters as follows. - -x = Coordinate1 / 10, y = Coordinate2 / 10, z = Coordinate3 / 10 - -The range of x is -3276.7 to 3276.7 meters, corresponding to Coordinate1 -between 0x8001 and 0x7fff. The same range applies to y and z. A value of -0x8000 for any of the coordinates indicates that the coordinate is unknown. - -#### Power Attribute -The Power attribute specifies the value of the average power P0, measured in -dBm, received at a reference distance of one meter from the transmitter. - -P0 = Power / 100 - -A value of 0x8000 indicates that Power is unknown. - -#### PathLossExponent Attribute -The PathLossExponent attribute specifies the value of the Path Loss Exponent n, -an exponent that describes the rate at which the signal power decays with -increasing distance from the transmitter. - -n = PathLossExponent / 100 - -A value of 0xffff indicates that PathLossExponent is unknown. - -#### ReportingPeriod Attribute -The ReportingPeriod attribute specifies the time in seconds between successive -reports of the device's location by means of the Location Data Notification -command. The minimum value this attribute can take is specified by the profile in -use. If ReportingPeriod is zero, the device does not automatically report its -location. Note that location information can always be polled at any time. - -#### CalculationPeriod Attribute -The CalculationPeriod attribute specifies the time in seconds between successive -calculations of the device's location. If CalculationPeriod is less than the -physically possible minimum period that the calculation can be performed, the -calculation will be repeated as frequently as possible. - -#### NumberRSSIMeasurements Attribute -The NumberRSSIMeasurements attribute specifies the number of RSSI -measurements to be used to generate one location estimate. The measurements are -averaged to improve accuracy. NumberRSSIMeasurements must be greater than or -equal to 1. - -### Received - -#### Set Absolute Location Command [0x00] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Coordinate 1 |Signed 16-bit integer | -|Coordinate 2 |Signed 16-bit integer | -|Coordinate 3 |Signed 16-bit integer | -|Power |Signed 16-bit integer | -|Path Loss Exponent |Unsigned 16-bit integer | - -#### Set Device Configuration Command [0x01] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Power |Signed 16-bit integer | -|Path Loss Exponent |Unsigned 16-bit integer | -|Calculation Period |Unsigned 16-bit integer | -|Number RSSI Measurements |Unsigned 8-bit integer | -|Reporting Period |Unsigned 16-bit integer | - -#### Get Device Configuration Command [0x02] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Target Address |IEEE Address | - -#### Get Location Data Command [0x03] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Header |8-bit bitmap | -|Number Responses |Unsigned 8-bit integer | -|Target Address |IEEE address | - -#### RSSI Response Command [0x04] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Replying Device |IEEE address | -|Coordinate 1 |Signed 16-bit integer | -|Coordinate 2 |Signed 16-bit integer | -|Coordinate 3 |Signed 16-bit integer | -|RSSI |Signed 8-bit integer | -|Number RSSI Measurements |Unsigned 8-bit Integer | - -#### Send Pings Command [0x05] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Target Address |IEEE address | -|Number RSSI Measurements |Unsigned 8-bit Integer | -|Calculation Period |Unsigned 16-bit integer | - -#### Anchor Node Announce Command [0x06] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Anchor Node Address |IEEE address | -|Coordinate 1 |Signed 16-bit integer | -|Coordinate 2 |Signed 16-bit integer | -|Coordinate 3 |Signed 16-bit integer | - -### Generated - -#### Device Configuration Response Command [0x00] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |8-bit enumeration | -|Power |Signed 16-bit integer | -|Path Loss Exponent |Unsigned 16-bit integer | -|Calculation Period |Unsigned 16-bit integer | -|Number RSSI Measurements |Unsigned 8-bit integer | -|Reporting Period |Unsigned 16-bit integer | - -#### Location Data Response Command [0x01] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |8-bit enumeration | -|Location Type |8-bit Data | -|Coordinate 1 |Signed 16-bit integer | -|Coordinate 2 |Signed 16-bit integer | -|Coordinate 3 |Signed 16-bit integer | -|Power |Signed 16-bit integer | -|Path Loss Exponent |Unsigned 16-bit integer | -|Location Method |8-bit enumeration | -|Quality Measure |Unsigned 8-bit integer | -|Location Age |Unsigned 16-bit integer | - -#### Location Data Notification Command [0x02] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Location Type |8-bit Data | -|Coordinate 1 |Signed 16-bit integer | -|Coordinate 2 |Signed 16-bit integer | -|Coordinate 3 |Signed 16-bit integer | -|Power |Signed 16-bit integer | -|Path Loss Exponent |Unsigned 16-bit integer | -|Location Method |8-bit enumeration | -|Quality Measure |Unsigned 8-bit integer | -|Location Age |Unsigned 16-bit integer | - -#### Compact Location Data Notification Command [0x03] -|Field Name |Data Type | -|---------------------------|---------------------------| - -#### RSSI Ping Command [0x04] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Location Type |8-bit Data | - -#### RSSI Request Command [0x05] -|Field Name |Data Type | -|---------------------------|---------------------------| - -#### Report RSSI Measurements Command [0x06] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Reporting Address |IEEE address | -|Number of Neighbors |Unsigned 8-bit integer | -|Neighbors Information |N X Neighbors information | - -#### Request Own Location Command [0x07] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Requesting Address |IEEE address | - -## Analog Input (Basic) [0x000c] - -### Received - -No cluster specific commands. - -### Generated - -No cluster specific commands. - -## Analog Output (Basic) [0x000d] - -### Received - -No cluster specific commands. - -### Generated - -No cluster specific commands. - -## Analog Value (Basic) [0x000e] - -### Received - -No cluster specific commands. - -### Generated - -No cluster specific commands. - -## Binary Input (Basic) [0x000f] - -The Binary Input (Basic) cluster provides an interface for reading the value of a binary measurement and accessing various characteristics of that measurement. The cluster is typically used to implement a sensor that measures a two-state physical quantity. - -### Attributes -|Id |Name |Type |Access |Implement |Reporting | -|-------|----------------------|---------------------------|-----------|----------|----------| -|0x0004 |ActiveText |Character String |Read/Write |Optional | | -|0x001C |Description |Character string |Read/Write |Optional | | -|0x002E |InactiveText |Character string |Read/Write |Optional | | -|0x0051 |OutOfService |Boolean |Read/Write |Mandatory | | -|0x0054 |Polarity |8-bit Enumeration |Read only |Optional | | -|0x0055 |PresentValue |Boolean |Read/Write |Mandatory |Mandatory | -|0x0067 |Reliability |8-bit enumeration |Read/Write |Optional | | -|0x006F |StatusFlags |8-bit bitmap |Read only |Mandatory |Mandatory | -|0x0100 |ApplicationType |Signed 32-bit integer |Read only |Optional | | - -#### ActiveText Attribute -This attribute, of type Character string, MAY be used to hold a human readable description of the ACTIVE state of a binary PresentValue. For example, for a Binary Input cluster, if the physical input is a switch contact, then the ActiveText attribute might be assigned a value such as “Fan 1 On”. If either the ActiveText attribute or the InactiveText attribute are present, then both of them SHALL be present. - -The character set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, which SHALL be printable but are otherwise unrestricted. - - -#### Description Attribute -The Description attribute, of type Character string, MAY be used to hold a description -of the usage of the input, output or value, as appropriate to the cluster. The character -set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, -which SHALL be printable but are otherwise unrestricted. - -#### InactiveText Attribute -This attribute, of type Character string, MAY be used to hold a human readable description of the INACTIVE state of a binary PresentValue. For example, for a Binary Input cluster, if the physical input is a switch contact, then the InactiveText attribute might be assigned a value such as “Fan 1 Off”. If either the InactiveText attribute or the ActiveText attribute are present, then both of them SHALL be present. - -The character set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, which SHALL be printable but are otherwise unrestricted. - -#### OutOfService Attribute -The OutOfService attribute, of type Boolean, indicates whether (TRUE) or not (FALSE) the physical -input, output or value that the cluster represents is not in service. For an Input cluster, when -OutOfService is TRUE the PresentValue attribute is decoupled from the physical input and will -not track changes to the physical input. For an Output cluster, when OutOfService is TRUE the -PresentValue attribute is decoupled from the physical output, so changes to PresentValue will not -affect the physical output. For a Value cluster, when OutOfService is TRUE the PresentValue attribute -MAY be written to freely by software local to the device that the cluster resides on. - -#### Polarity Attribute -This attribute, of type enumeration, indicates the relationship between the physical state of the input (or output as appropriate for the cluster) and the logical state represented by a binary PresentValue attribute, when OutOfService is FALSE. If the Polarity attribute is NORMAL (0), then the ACTIVE (1) state of the PresentValue attribute is also the ACTIVE or ON state of the physical input (or output). If the Polarity attribute is REVERSE (1), then the ACTIVE (1) state of the PresentValue attribute is the INACTIVE or OFF state of the physical input (or output). - -Thus, when OutOfService is FALSE, for a constant physical input state a change in the Polarity attribute SHALL produce a change in the PresentValue attribute. If OutOfService is TRUE, then the Polarity attribute SHALL have no effect on the PresentValue attribute. - -#### PresentValue Attribute -The PresentValue attribute indicates the current value of the input, output or -value, as appropriate for the cluster. For Analog clusters it is of type single precision, for Binary -clusters it is of type Boolean, and for multistate clusters it is of type Unsigned 16-bit integer. The -PresentValue attribute of an input cluster SHALL be writable when OutOfService is TRUE. When the PriorityArray -attribute is implemented, writing to PresentValue SHALL be equivalent to writing to element 16 of PriorityArray, -i.e., with a priority of 16. - -#### Reliability Attribute -The Reliability attribute, of type 8-bit enumeration, provides an indication of whether -the PresentValueor the operation of the physical input, output or value in question (as -appropriate for the cluster) is “reliable” as far as can be determined and, if not, why -not. The Reliability attribute MAY have any of the following values: - -NO-FAULT-DETECTED (0) -OVER-RANGE (2) -UNDER-RANGE (3) -OPEN-LOOP (4) -SHORTED-LOOP (5) -UNRELIABLE-OTHER (7) -PROCESS-ERROR (8) -MULTI-STATE-FAULT (9) -CONFIGURATION-ERROR (10) - -|Id |Name | -|-------|--------------------------| -|0x0000 |NO-FAULT-DETECTED | -|0x0002 |OVER-RANGE | -|0x0003 |UNDER-RANGE | -|0x0004 |OPEN-LOOP | -|0x0005 |SHORTED-LOOP | -|0x0007 |UNRELIABLE-OTHER | -|0x0008 |PROCESS-ERROR | -|0x0009 |MULTI-STATE-FAULT | -|0x000A |CONFIGURATION-ERROR | - -#### StatusFlags Attribute -This attribute, of type bitmap, represents four Boolean flags that indicate the general “health” -of the analog sensor. Three of the flags are associated with the values of other optional attributes -of this cluster. A more detailed status could be determined by reading the optional attributes (if -supported) that are linked to these flags. The relationship between individual flags is not defined. - -The four flags are Bit 0 = IN_ALARM, Bit 1 = FAULT, Bit 2 = OVERRIDDEN, Bit 3 = OUT OF SERVICE - -where: - -IN_ALARM -Logical FALSE (0) if the EventStateattribute has a value of NORMAL, otherwise logical TRUE (1). -This bit is always 0 unless the cluster implementing the EventState attribute is implemented on the same -endpoint. - -FAULT -Logical TRUE (1) if the Reliability attribute is present and does not have a value of NO FAULT DETECTED, -otherwise logical FALSE (0). - -OVERRIDDEN -Logical TRUE (1) if the cluster has been overridden by some mechanism local to the device. -Otherwise, the value is logical FALSE (0). In this context, for an input cluster, “overridden” is taken -to mean that the PresentValue and Reliability(optional) attributes are no longer tracking changes to the -physical input. For an Output cluster, “overridden” is taken to mean that the physical output is no longer -tracking changes to the PresentValue attribute and the Reliability attribute is no longer a reflection of -the physical output. For a Value cluster, “overridden” is taken to mean that the PresentValue attribute is -not writeable. - -OUT OF SERVICE -Logical TRUE (1) if the OutOfService attribute has a value of TRUE, otherwise -logical FALSE (0). - -|Id |Name | -|-------|--------------------------| -|0x0001 |IN_ALARM | -|0x0002 |FAULT | -|0x0004 |OVERRIDDEN | -|0x0008 |OUT OF SERVICE | - - -#### ApplicationType Attribute -The ApplicationType attribute is an unsigned 32 bit integer that indicates the specific -application usage for this cluster. (Note: This attribute has no BACnet equivalent). -ApplicationType is subdivided into Group, Type and an Index number, as follows. - -Group = Bits 24-31 An indication of the cluster this attribute is part of. - -Type = Bits 16-23 For Analog clusters, the physical quantity that the Present Value attribute -of the cluster represents. For Binary and Multistate clusters, the application usage domain. - -Index = Bits 0-15The specific application usage of the cluster. - - -### Received - -No cluster specific commands. - -### Generated - -No cluster specific commands. - -## Binary Output (Basic) [0x0010] - -### Received - -No cluster specific commands. - -### Generated - -No cluster specific commands. - -## Binary Value (Basic) [0x0011] - -### Received - -No cluster specific commands. - -### Generated - -## Multistate Input (Basic) [0x0012] - -The Multistate Input (Basic) cluster provides an interface for reading the value of a -multistate measurement and accessing various characteristics of that measurement. The -cluster is typically used to implement a sensor that measures a physical quantity that -can take on one of a number of discrete states. - -### Attributes -|Id |Name |Type |Access |Implement |Reporting | -|-------|----------------------|---------------------------|-----------|----------|----------| -|0x000E |StateText |Character string |Read/Write |Optional | | -|0x001C |Description |Character string |Read/Write |Optional | | -|0x004A |NumberOfStates |Unsigned 16-bit Integer |Read/Write |Mandatory | | -|0x0051 |OutOfService |Boolean |Read/Write |Mandatory | | -|0x0055 |PresentValue |Unsigned 16-bit Integer |Read/Write |Mandatory | | -|0x0067 |Reliability |8-bit enumeration |Read/Write |Optional | | -|0x006F |StatusFlags |8-bit bitmap |Read only |Mandatory | | -|0x0100 |ApplicationType |Signed 32-bit integer |Read only |Optional | | - -#### StateText Attribute -This attribute, of type Array of Character strings, holds descriptions of all possible -states of a multistate PresentValue. The number of descriptions matches the number of states -defined in the NumberOfStates property. The PresentValue, interpreted as an integer, serves as -an index into the array. If the size of this array is changed, the NumberOfStates property SHALL -also be changed to the same value. The character set used SHALL be ASCII, and the attribute -SHALL contain a maximum of 16 characters, which SHALL be printable but are otherwise unrestricted. - -#### Description Attribute -The Description attribute, of type Character string, MAY be used to hold a description -of the usage of the input, output or value, as appropriate to the cluster. The character -set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, -which SHALL be printable but are otherwise unrestricted. - -#### NumberOfStates Attribute -This attribute, of type Unsigned 16-bit integer, defines the number of states that a multistate -PresentValue MAY have. The NumberOfStates property SHALL always have a value greater than zero. -If the value of this property is changed, the size of the StateText array, if present, SHALL also -be changed to the same value. The states are numbered consecutively, starting with 1. - -#### OutOfService Attribute -The OutOfService attribute, of type Boolean, indicates whether (TRUE) or not (FALSE) the physical -input, output or value that the cluster represents is not in service. For an Input cluster, when -OutOfService is TRUE the PresentValue attribute is decoupled from the physical input and will -not track changes to the physical input. For an Output cluster, when OutOfService is TRUE the -PresentValue attribute is decoupled from the physical output, so changes to PresentValue will not -affect the physical output. For a Value cluster, when OutOfService is TRUE the PresentValue attribute -MAY be written to freely by software local to the device that the cluster resides on. - -#### PresentValue Attribute -The PresentValue attribute indicates the current value of the input, output or -value, as appropriate for the cluster. For Analog clusters it is of type single precision, for Binary -clusters it is of type Boolean, and for multistate clusters it is of type Unsigned 16-bit integer. The -PresentValue attribute of an input cluster SHALL be writable when OutOfService is TRUE. When the PriorityArray -attribute is implemented, writing to PresentValue SHALL be equivalent to writing to element 16 of PriorityArray, -i.e., with a priority of 16. - -#### Reliability Attribute -The Reliability attribute, of type 8-bit enumeration, provides an indication of whether -the PresentValueor the operation of the physical input, output or value in question (as -appropriate for the cluster) is “reliable” as far as can be determined and, if not, why -not. The Reliability attribute MAY have any of the following values: - -NO-FAULT-DETECTED (0) -OVER-RANGE (2) -UNDER-RANGE (3) -OPEN-LOOP (4) -SHORTED-LOOP (5) -UNRELIABLE-OTHER (7) -PROCESS-ERROR (8) -MULTI-STATE-FAULT (9) -CONFIGURATION-ERROR (10) - -|Id |Name | -|-------|--------------------------| -|0x0000 |NO-FAULT-DETECTED | -|0x0002 |OVER-RANGE | -|0x0003 |UNDER-RANGE | -|0x0004 |OPEN-LOOP | -|0x0005 |SHORTED-LOOP | -|0x0007 |UNRELIABLE-OTHER | -|0x0008 |PROCESS-ERROR | -|0x0009 |MULTI-STATE-FAULT | -|0x000A |CONFIGURATION-ERROR | - -#### StatusFlags Attribute -This attribute, of type bitmap, represents four Boolean flags that indicate the general “health” -of the analog sensor. Three of the flags are associated with the values of other optional attributes -of this cluster. A more detailed status could be determined by reading the optional attributes (if -supported) that are linked to these flags. The relationship between individual flags is not defined. - -The four flags are Bit 0 = IN_ALARM, Bit 1 = FAULT, Bit 2 = OVERRIDDEN, Bit 3 = OUT OF SERVICE - -where: - -IN_ALARM -Logical FALSE (0) if the EventStateattribute has a value of NORMAL, otherwise logical TRUE (1). -This bit is always 0 unless the cluster implementing the EventState attribute is implemented on the same -endpoint. - -FAULT -Logical TRUE (1) if the Reliability attribute is present and does not have a value of NO FAULT DETECTED, -otherwise logical FALSE (0). - -OVERRIDDEN -Logical TRUE (1) if the cluster has been overridden by some mechanism local to the device. -Otherwise, the value is logical FALSE (0). In this context, for an input cluster, “overridden” is taken -to mean that the PresentValue and Reliability(optional) attributes are no longer tracking changes to the -physical input. For an Output cluster, “overridden” is taken to mean that the physical output is no longer -tracking changes to the PresentValue attribute and the Reliability attribute is no longer a reflection of -the physical output. For a Value cluster, “overridden” is taken to mean that the PresentValue attribute is -not writeable. - -OUT OF SERVICE -Logical TRUE (1) if the OutOfService attribute has a value of TRUE, otherwise -logical FALSE (0). - -|Id |Name | -|-------|--------------------------| -|0x0001 |IN_ALARM | -|0x0002 |FAULT | -|0x0004 |OVERRIDDEN | -|0x0008 |OUT OF SERVICE | - - -#### ApplicationType Attribute -The ApplicationType attribute is an unsigned 32 bit integer that indicates the specific -application usage for this cluster. (Note: This attribute has no BACnet equivalent). -ApplicationType is subdivided into Group, Type and an Index number, as follows. - -Group = Bits 24-31 An indication of the cluster this attribute is part of. - -Type = Bits 16-23 For Analog clusters, the physical quantity that the Present Value attribute -of the cluster represents. For Binary and Multistate clusters, the application usage domain. - -Index = Bits 0-15The specific application usage of the cluster. - -### Received - -No cluster specific commands. - -### Generated - -No cluster specific commands. - -## Multistate Output (Basic) [0x0013] -The Multistate Output (Basic) cluster provides an interface for setting the value of an output -that can take one of a number of discrete values, and accessing characteristics of that value. - -### Attributes -|Id |Name |Type |Access |Implement |Reporting | -|-------|----------------------|---------------------------|-----------|----------|----------| -|0x000E |StateText |Character string |Read/Write |Optional | | -|0x001C |Description |Character string |Read/Write |Optional | | -|0x004A |NumberOfStates |Unsigned 16-bit Integer |Read/Write |Mandatory | | -|0x0051 |OutOfService |Boolean |Read/Write |Mandatory | | -|0x0055 |PresentValue |Unsigned 16-bit Integer |Read/Write |Mandatory | | -|0x0067 |Reliability |8-bit enumeration |Read/Write |Optional | | -|0x0068 |RelinquishDefault |Unsigned 16-bit Integer |Read/Write |Optional | | -|0x006F |StatusFlags |8-bit bitmap |Read only |Mandatory | | -|0x0100 |ApplicationType |Signed 32-bit integer |Read only |Optional | | - -#### StateText Attribute -This attribute, of type Array of Character strings, holds descriptions of all possible -states of a multistate PresentValue. The number of descriptions matches the number of states -defined in the NumberOfStates property. The PresentValue, interpreted as an integer, serves as -an index into the array. If the size of this array is changed, the NumberOfStates property SHALL -also be changed to the same value. The character set used SHALL be ASCII, and the attribute -SHALL contain a maximum of 16 characters, which SHALL be printable but are otherwise unrestricted. - -#### Description Attribute -The Description attribute, of type Character string, MAY be used to hold a description -of the usage of the input, output or value, as appropriate to the cluster. The character -set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, -which SHALL be printable but are otherwise unrestricted. - -#### NumberOfStates Attribute -This attribute, of type Unsigned 16-bit integer, defines the number of states that a multistate -PresentValue MAY have. The NumberOfStates property SHALL always have a value greater than zero. -If the value of this property is changed, the size of the StateText array, if present, SHALL also -be changed to the same value. The states are numbered consecutively, starting with 1. - -#### OutOfService Attribute -The OutOfService attribute, of type Boolean, indicates whether (TRUE) or not (FALSE) the physical -input, output or value that the cluster represents is not in service. For an Input cluster, when -OutOfService is TRUE the PresentValue attribute is decoupled from the physical input and will -not track changes to the physical input. For an Output cluster, when OutOfService is TRUE the -PresentValue attribute is decoupled from the physical output, so changes to PresentValue will not -affect the physical output. For a Value cluster, when OutOfService is TRUE the PresentValue attribute -MAY be written to freely by software local to the device that the cluster resides on. - -#### PresentValue Attribute -The PresentValue attribute indicates the current value of the input, output or -value, as appropriate for the cluster. For Analog clusters it is of type single precision, for Binary -clusters it is of type Boolean, and for multistate clusters it is of type Unsigned 16-bit integer. The -PresentValue attribute of an input cluster SHALL be writable when OutOfService is TRUE. When the PriorityArray -attribute is implemented, writing to PresentValue SHALL be equivalent to writing to element 16 of PriorityArray, -i.e., with a priority of 16. - -#### Reliability Attribute -The Reliability attribute, of type 8-bit enumeration, provides an indication of whether -the PresentValueor the operation of the physical input, output or value in question (as -appropriate for the cluster) is “reliable” as far as can be determined and, if not, why -not. The Reliability attribute MAY have any of the following values: - -NO-FAULT-DETECTED (0) -OVER-RANGE (2) -UNDER-RANGE (3) -OPEN-LOOP (4) -SHORTED-LOOP (5) -UNRELIABLE-OTHER (7) -PROCESS-ERROR (8) -MULTI-STATE-FAULT (9) -CONFIGURATION-ERROR (10) - -|Id |Name | -|-------|--------------------------| -|0x0000 |NO-FAULT-DETECTED | -|0x0002 |OVER-RANGE | -|0x0003 |UNDER-RANGE | -|0x0004 |OPEN-LOOP | -|0x0005 |SHORTED-LOOP | -|0x0007 |UNRELIABLE-OTHER | -|0x0008 |PROCESS-ERROR | -|0x0009 |MULTI-STATE-FAULT | -|0x000A |CONFIGURATION-ERROR | - -#### RelinquishDefault Attribute -The RelinquishDefault attribute is the default value to be used for the PresentValue -attribute when all elements of the PriorityArray attribute are marked as invalid. - -#### StatusFlags Attribute -This attribute, of type bitmap, represents four Boolean flags that indicate the general “health” -of the analog sensor. Three of the flags are associated with the values of other optional attributes -of this cluster. A more detailed status could be determined by reading the optional attributes (if -supported) that are linked to these flags. The relationship between individual flags is not defined. - -The four flags are Bit 0 = IN_ALARM, Bit 1 = FAULT, Bit 2 = OVERRIDDEN, Bit 3 = OUT OF SERVICE - -where: - -IN_ALARM -Logical FALSE (0) if the EventStateattribute has a value of NORMAL, otherwise logical TRUE (1). -This bit is always 0 unless the cluster implementing the EventState attribute is implemented on the same -endpoint. - -FAULT -Logical TRUE (1) if the Reliability attribute is present and does not have a value of NO FAULT DETECTED, -otherwise logical FALSE (0). - -OVERRIDDEN -Logical TRUE (1) if the cluster has been overridden by some mechanism local to the device. -Otherwise, the value is logical FALSE (0). In this context, for an input cluster, “overridden” is taken -to mean that the PresentValue and Reliability(optional) attributes are no longer tracking changes to the -physical input. For an Output cluster, “overridden” is taken to mean that the physical output is no longer -tracking changes to the PresentValue attribute and the Reliability attribute is no longer a reflection of -the physical output. For a Value cluster, “overridden” is taken to mean that the PresentValue attribute is -not writeable. - -OUT OF SERVICE -Logical TRUE (1) if the OutOfService attribute has a value of TRUE, otherwise -logical FALSE (0). - -|Id |Name | -|-------|--------------------------| -|0x0001 |IN_ALARM | -|0x0002 |FAULT | -|0x0004 |OVERRIDDEN | -|0x0008 |OUT OF SERVICE | - - -#### ApplicationType Attribute -The ApplicationType attribute is an unsigned 32 bit integer that indicates the specific -application usage for this cluster. (Note: This attribute has no BACnet equivalent). -ApplicationType is subdivided into Group, Type and an Index number, as follows. - -Group = Bits 24 -31 An indication of the cluster this attribute is part of. - -Type = Bits 16 -23 For Analog clusters, the physical quantity that the Present Value attribute -of the cluster represents. For Binary and Multistate clusters, the application usage domain. - -Index = Bits 0 -15 The specific application usage of the cluster. - - -### Received - -No cluster specific commands. - -### Generated - -No cluster specific commands. - -## Multistate Value (Basic) [0x0014] -The Multistate Value (Basic) cluster provides an interface for setting a multistate -value, typically used as a control system parameter, and accessing characteristics of that value. - -### Attributes -|Id |Name |Type |Access |Implement |Reporting | -|-------|----------------------|---------------------------|-----------|----------|----------| -|0x000E |StateText |Character string |Read/Write |Optional | | -|0x001C |Description |Character string |Read/Write |Optional | | -|0x004A |NumberOfStates |Unsigned 16-bit Integer |Read/Write |Mandatory | | -|0x0051 |OutOfService |Boolean |Read/Write |Mandatory | | -|0x0055 |PresentValue |Unsigned 16-bit Integer |Read/Write |Mandatory | | -|0x0067 |Reliability |8-bit enumeration |Read/Write |Optional | | -|0x0068 |RelinquishDefault |Unsigned 16-bit Integer |Read/Write |Optional | | -|0x006F |StatusFlags |8-bit bitmap |Read only |Mandatory | | -|0x0100 |ApplicationType |Signed 32-bit integer |Read only |Optional | | - -#### StateText Attribute -This attribute, of type Array of Character strings, holds descriptions of all possible -states of a multistate PresentValue. The number of descriptions matches the number of states -defined in the NumberOfStates property. The PresentValue, interpreted as an integer, serves as -an index into the array. If the size of this array is changed, the NumberOfStates property SHALL -also be changed to the same value. The character set used SHALL be ASCII, and the attribute -SHALL contain a maximum of 16 characters, which SHALL be printable but are otherwise unrestricted. - -#### Description Attribute -The Description attribute, of type Character string, MAY be used to hold a description -of the usage of the input, output or value, as appropriate to the cluster. The character -set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, -which SHALL be printable but are otherwise unrestricted. - -#### NumberOfStates Attribute -This attribute, of type Unsigned 16-bit integer, defines the number of states that a multistate -PresentValue MAY have. The NumberOfStates property SHALL always have a value greater than zero. -If the value of this property is changed, the size of the StateText array, if present, SHALL also -be changed to the same value. The states are numbered consecutively, starting with 1. - -#### OutOfService Attribute -The OutOfService attribute, of type Boolean, indicates whether (TRUE) or not (FALSE) the physical -input, output or value that the cluster represents is not in service. For an Input cluster, when -OutOfService is TRUE the PresentValue attribute is decoupled from the physical input and will -not track changes to the physical input. For an Output cluster, when OutOfService is TRUE the -PresentValue attribute is decoupled from the physical output, so changes to PresentValue will not -affect the physical output. For a Value cluster, when OutOfService is TRUE the PresentValue attribute -MAY be written to freely by software local to the device that the cluster resides on. - -#### PresentValue Attribute -The PresentValue attribute indicates the current value of the input, output or -value, as appropriate for the cluster. For Analog clusters it is of type single precision, for Binary -clusters it is of type Boolean, and for multistate clusters it is of type Unsigned 16-bit integer. The -PresentValue attribute of an input cluster SHALL be writable when OutOfService is TRUE. When the PriorityArray -attribute is implemented, writing to PresentValue SHALL be equivalent to writing to element 16 of PriorityArray, -i.e., with a priority of 16. - -#### Reliability Attribute -The Reliability attribute, of type 8-bit enumeration, provides an indication of whether -the PresentValueor the operation of the physical input, output or value in question (as -appropriate for the cluster) is “reliable” as far as can be determined and, if not, why -not. The Reliability attribute MAY have any of the following values: - -NO-FAULT-DETECTED (0) -OVER-RANGE (2) -UNDER-RANGE (3) -OPEN-LOOP (4) -SHORTED-LOOP (5) -UNRELIABLE-OTHER (7) -PROCESS-ERROR (8) -MULTI-STATE-FAULT (9) -CONFIGURATION-ERROR (10) - -|Id |Name | -|-------|--------------------------| -|0x0000 |NO-FAULT-DETECTED | -|0x0002 |OVER-RANGE | -|0x0003 |UNDER-RANGE | -|0x0004 |OPEN-LOOP | -|0x0005 |SHORTED-LOOP | -|0x0007 |UNRELIABLE-OTHER | -|0x0008 |PROCESS-ERROR | -|0x0009 |MULTI-STATE-FAULT | -|0x000A |CONFIGURATION-ERROR | - -#### RelinquishDefault Attribute -The RelinquishDefault attribute is the default value to be used for the PresentValue -attribute when all elements of the PriorityArray attribute are marked as invalid. - -#### StatusFlags Attribute -This attribute, of type bitmap, represents four Boolean flags that indicate the general “health” -of the analog sensor. Three of the flags are associated with the values of other optional attributes -of this cluster. A more detailed status could be determined by reading the optional attributes (if -supported) that are linked to these flags. The relationship between individual flags is not defined. - -The four flags are Bit 0 = IN_ALARM, Bit 1 = FAULT, Bit 2 = OVERRIDDEN, Bit 3 = OUT OF SERVICE - -where: - -IN_ALARM -Logical FALSE (0) if the EventStateattribute has a value of NORMAL, otherwise logical TRUE (1). -This bit is always 0 unless the cluster implementing the EventState attribute is implemented on the same -endpoint. - -FAULT -Logical TRUE (1) if the Reliability attribute is present and does not have a value of NO FAULT DETECTED, -otherwise logical FALSE (0). - -OVERRIDDEN -Logical TRUE (1) if the cluster has been overridden by some mechanism local to the device. -Otherwise, the value is logical FALSE (0). In this context, for an input cluster, “overridden” is taken -to mean that the PresentValue and Reliability(optional) attributes are no longer tracking changes to the -physical input. For an Output cluster, “overridden” is taken to mean that the physical output is no longer -tracking changes to the PresentValue attribute and the Reliability attribute is no longer a reflection of -the physical output. For a Value cluster, “overridden” is taken to mean that the PresentValue attribute is -not writeable. - -OUT OF SERVICE -Logical TRUE (1) if the OutOfService attribute has a value of TRUE, otherwise -logical FALSE (0). - -|Id |Name | -|-------|--------------------------| -|0x0001 |IN_ALARM | -|0x0002 |FAULT | -|0x0004 |OVERRIDDEN | -|0x0008 |OUT OF SERVICE | - - -#### ApplicationType Attribute -The ApplicationType attribute is an unsigned 32 bit integer that indicates the specific -application usage for this cluster. (Note: This attribute has no BACnet equivalent). -ApplicationType is subdivided into Group, Type and an Index number, as follows. - -Group = Bits 24 -31 An indication of the cluster this attribute is part of. - -Type = Bits 16 -23 For Analog clusters, the physical quantity that the Present Value attribute -of the cluster represents. For Binary and Multistate clusters, the application usage domain. - -Index = Bits 0 -15The specific application usage of the cluster. - - -### Received - -No cluster specific commands. - -### Generated - -No cluster specific commands. - -## Commissioning [0x0015] - -### Received - -#### Restart Device Command [0x00] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Option |8-bit bitmap | -|Delay |Unsigned 8-bit integer | -|Jitter |Unsigned 8-bit integer | - -#### Save Startup Parameters Command [0x01] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Option |8-bit bitmap | -|Index |Unsigned 8-bit integer | - -#### Restore Startup Parameters Command [0x02] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Option |8-bit bitmap | -|Index |Unsigned 8-bit integer | - -#### Reset Startup Parameters Command [0x03] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Option |8-bit bitmap | -|Index |Unsigned 8-bit integer | - -### Generated - -#### Restart Device Response Response Command [0x00] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |8-bit enumeration | - -#### Save Startup Parameters Response Command [0x01] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |8-bit enumeration | - -#### Restore Startup Parameters Response Command [0x02] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |8-bit enumeration | - -#### Reset Startup Parameters Response Command [0x03] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |8-bit enumeration | - -## Poll Control [0x0020] - -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. - -### Attributes - -|Id |Name |Type |Access |Implement |Reporting | -|-------|---------------------------|---------------------------|-----------|----------|----------| -|0x0000 |CheckinInterval |Unsigned 32-bit integer |Read Write |Mandatory |Mandatory | -|0x0001 |LongPollInterval |Unsigned 32-bit integer |Read |Mandatory |Mandatory | -|0x0002 |ShortPollInterval |Unsigned 16-bit integer |Read |Mandatory |Mandatory | -|0x0003 |FastPollTimeout |Unsigned 16-bit integer |Read |Mandatory |Mandatory | -|0x0004 |CheckinIntervalMin |Unsigned 32-bit integer |Read | | | -|0x0005 |LongPollIntervalMin |Unsigned 32-bit integer |Read | | | -|0x0006 |FastPollTimeoutMin |Unsigned 32-bit integer |Read | | | - -#### CheckinInterval Attribute - -The Poll Control server is responsible for checking in with the poll control client periodically to see if the poll control client wants to modify the poll rate of the poll control server. This is due to the fact that the PollControl server is implemented on an end device that MAY have an unpredictable sleep-wake cycle. The CheckinInterval represents the default amount of time between check-ins by the poll control server with the poll control client. The CheckinInterval is measured in quarter-seconds. A value of 0 indicates that the Poll Control Server is turned off and the poll control server will not check-in with the poll control client. The Poll Control Server checks in with the Poll Control Client by sending a Checkin command to the Client. This value SHOULDbe longer than the LongPoll Interval attribute. If the Client writes an invalid attribute value (Example: Out of Range or a value smaller than the optional Check-inIntervalMinattribute value or a value smaller than the LongPollInterval attribute value), the Server SHOULD return Write Attributes Response with an error status not equal to ZCL_SUCCESS. The Poll Control Client will hold onto the actions or messages for the Poll Control Server at the application level until the Poll Control Server checks in with the Poll Control Client. - -#### LongPollInterval Attribute - -An end device that implements the Poll Control server MAY optionally expose a LongPollInterval attribute. -The Long Poll Interval represents the maximum amount of time in quarter-seconds between MAC Data Requests -from the end device to its parent. - -The LongPollInterval defines the frequency of polling that an end device does when it is NOT in fast poll mode. The LongPollInterval SHOULD be longer than the ShortPollInterval attribute but shorter than the CheckinInterval attribute.A value of 0xffffffff is reserved to indicate that the device does not have or does not know its long poll interval - -#### ShortPollInterval Attribute - -An end device that implements the Poll Control server MAY optionally expose the ShortPollInterval attribute. The ShortPollIntervalrepresents the number of quarterseconds that an end device waits between MAC Data Requests to its parent when it is expecting data (i.e.,in fast poll mode). - -#### FastPollTimeout Attribute - -The FastPollTimeout attribute represents the number of quarterseconds that an end device will stay in fast poll mode by default. It is suggested that the FastPollTimeoutattribute value be greater than 7.68 seconds.The Poll Control Cluster Client MAYoverride this value by indicating a different value in the Fast Poll Duration argument in the Check-in Response command. If the Client writes a value out of range or greater than the optional FastPollTimeoutMax attribute value if supported, the Server SHOULD return a Write Attributes Response with a status of INVALID_VALUE30. An end device that implements the Poll Control server can be put into a fast poll mode during which it will send MAC Data Requests to its parent at the frequency of its configured ShortPollInterval attribute. During this period of time, fast polling is considered active. When the device goes into fast poll mode, it is required to send MAC DataRequests to its parent at an accelerated rate and is thus more responsive on the network and can receive data asynchronously from the device implementing the Poll Control Cluster Client. - -#### CheckinIntervalMin Attribute - -The Poll Control Server MAY optionally provide its own minimum value for the Check-inInterval to protect against the Check-inInterval being set too low and draining the battery on the end device implementing the Poll Control Server. - -#### LongPollIntervalMin Attribute - -The Poll Control Server MAYoptionally provide its own minimum value for the LongPollIntervalto protect against another device setting the value to too short a time resulting in an inadvertent power drain on the device. - -#### FastPollTimeoutMin Attribute - -The Poll Control Server MAY optionally provide its own maximum value for the FastPollTimeout to avoid it being set to too high a value resulting in an inadvertent power drain on the device. - -### Received - -#### Check In Response [0x00] -The Check-in Response is sent in response to the receipt of a Check-in command. The Check-in Response is used by the Poll Control Client to indicate whether it would like the device implementing the Poll Control Cluster Server to go into a fast poll mode and for how long. If the Poll Control Cluster Client indicates that it would like the device to go into a fast poll mode, it is responsible for telling the device to stop fast polling when it is done sending messages to the fast polling device. - -If the Poll Control Server receives a Check-In Response from a client for which there is no binding (unbound), it SHOULD respond with a Default Response with a status value indicating ACTION_DENIED. - -If the Poll Control Server receives a Check-In Response from a client for which there is a binding (bound) with an invalid fast poll interval it SHOULD respond with a Default Response with status INVALID_VALUE. - -If the Poll Control Server receives a Check-In Response from a bound client after temporary fast poll mode is completed it SHOULD respond with a Default Response with a status value indicating TIMEOUT. - -In all of the above cases, the Server SHALL respond with a Default Response not equal to ZCL_SUCCESS. - -|Field Name |Data Type | -|---------------------------|---------------------------| -| Start Fast Polling |Boolean | -| Fast Poll Timeout |Unsigned 16-bit integer | - -##### Start Fast Polling Field -This Boolean value indicates whether or not the Poll Control Server device SHOULD begin fast polling or not. If the Start Fast Polling value is true, the server device is EXPECTED to begin fast polling until the Fast Poll Timeout has expired. If the Start Fast Polling argument is false, the Poll Control Server MAY continue in normal operation and is not required to go into fast poll mode. - -##### Fast Poll Timeout Field -The Fast Poll Timeout value indicates the number of quarterseconds during which the device SHOULD continue fast polling. If the Fast Poll Timeout value is 0, the device is EXPECTED to continue fast polling until the amount of time indicated it the FastPollTimeout attribute has elapsed or it receives a Fast Poll Stop command. If the Start Fast Polling argument is false, the Poll Control Server MAY ignore the Fast Poll Timeout argument. - -The Fast Poll Timeout argument temporarily overrides the FastPollTimeout attribute on the Poll Control Cluster Server for the fast poll mode induced by the Check-in Response command. This value is not EXPECTED to overwrite the stored value in the FastPollTimeout attribute. - -If the FastPollTimeout parameter in the CheckInResponse command is greater than the FastPollTimeoutMax attribute value, the Server Device SHALL respond with a default response of error status not equal to ZCL_SUCCESS. It is suggested to use the Error Status of ZCL_INVALID_FIELD. - -#### Fast Poll Stop Command [0x01] - -The Fast Poll Stop command is used to stop the fast poll mode initiated by the Check-in response. The Fast Poll Stop command has no payload. - -If the Poll Control Server receives a Fast Poll Stop from an unbound client it SHOULD send back a DefaultResponse with a value field indicating “ACTION_DENIED” . The Server SHALL respond with a DefaultResponse not equal to ZCL_SUCCESS. - -If the Poll Control Server receives a Fast Poll Stop command from a bound client but it is unable to stop fast polling due to the fact that there is another bound client which has requested that polling continue it SHOULD respond with a Default Response with a status of “ACTION_DENIED” - -If a Poll Control Server receives a Fast Poll Stop command from a bound client but it is not FastPolling it SHOULD respond with a Default Response with a status of ACTION_DENIED. - -#### Set Long Poll Interval Command [0x02] -The Set Long Poll Interval command is used to set the Read Only LongPollInterval attribute. - -When the Poll Control Server receives the Set Long Poll Interval Command, it SHOULD check its internal minimal limit and the attributes relationship if the new Long Poll Interval is acceptable. If the new value is acceptable, the new value SHALL be saved to the LongPollInterval attribute. If the new value is not acceptable, the Poll Control Server SHALL send a default response of INVALID_VALUE and the LongPollInterval attribute value is not updated. - -|Field Name |Data Type | -|---------------------------|---------------------------| -| New Long Poll Interval |Unsigned 16-bit integer | - -#### Set Short Poll Interval Command [0x03] -The Set Short Poll Interval command is used to set the Read Only ShortPollInterval attribute. - -When the Poll Control Server receives the Set Short Poll Interval Command, it SHOULD check its internal minimal limit and the attributes relationship if the new Short Poll Interval is acceptable. If the new value is acceptable, the new value SHALL be saved to the ShortPollInterval attribute. If the new value is not acceptable, the Poll Control Server SHALL send a default response of INVALID_VALUE and the ShortPollInterval attribute value is not updated. - -|Field Name |Data Type | -|---------------------------|---------------------------| -| New Short Poll Interval |Unsigned 16-bit integer | - -### Generated - -#### Check In Command [0x00] -The Poll Control Cluster server sends out a Check-in command to the devices to which it is paired based on the server’s Check-inInterval attribute. It does this to find out if any of the Poll Control Cluster Clients with which it is paired are interested in having it enter fast poll mode so that it can be managed. This request is sent out based on either the Check-inInterval, or the next Check-in value in the Fast Poll Stop Request generated by the Poll Control Cluster Client. - -The Check-in command expects a Check-in Response command to be sent back from the Poll Control Client. If the Poll Control Server does not receive a Check-in response back from the Poll Control Client up to 7.68 seconds it is free to return to polling according to the LongPollInterval. - -|Field Name |Data Type | -|---------------------------|---------------------------| - - -# Closures -## Shade Configuration [0x0100] - -### Received - -### Generated - -No cluster specific commands. - -## Door Lock [0x0101] - -### Received - -#### Lock Door Command [0x00] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Pin code |Octet string | - -#### Unlock Door Command [0x01] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Pin code |Octet string | - -### Generated - -#### Lock Door Response Command [0x00] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |8-bit enumeration | - -#### Unlock Door Response Command [0x01] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |8-bit enumeration | - -# HVAC - -## Pump Configuration and Control [0x0200] - -### Received - -No cluster specific commands. - -### Generated - -No cluster specific commands. - -## Thermostat [0x0201] - -### Attributes - -|Id |Name |Type |Access |Implement |Reporting | -|-------|---------------------------|---------------------------|-----------|----------|----------| -|0x0000 |LocalTemperature |Unsigned 16-bit integer |Read |Mandatory |Mandatory | -|0x0001 |OutdoorTemperature |Unsigned 16-bit integer |Read |Optional | | -|0x0002 |Occupancy |Bitmap 8-bit |Read |Optional | | -|0x0003 |AbsMinHeatSetpointLimit |Unsigned 16-bit integer |Read |Optional | | -|0x0004 |AbsMaxHeatSetpointLimit |Unsigned 16-bit integer |Read |Optional | | -|0x0005 |AbsMinCoolSetpointLimit |Unsigned 16-bit integer |Read |Optional | | -|0x0006 |AbsMaxCoolSetpointLimit |Unsigned 16-bit integer |Read |Optional | | -|0x0007 |PICoolingDemand |Unsigned 8-bit integer |Read |Optional |Mandatory | -|0x0008 |PIHeatingDemand |Unsigned 8-bit integer |Read |Optional |Mandatory | -|0x0009 |HVACSystemTypeConfiguration|Bitmap 8-bit |Read |Optional | | -|0x0010 |LocalTemperatureCalibration|Unsigned 8-bit integer |Read |Optional | | -|0x0011 |OccupiedCoolingSetpoint |Unsigned 16-bit integer |Read |Mandatory | | -|0x0012 |OccupiedHeatingSetpoint |Unsigned 16-bit integer |Read |Mandatory | | -|0x0013 |UnoccupiedCoolingSetpoint |Unsigned 16-bit integer |Read |Optional | | -|0x0014 |UnoccupiedHeatingSetpoint |Unsigned 16-bit integer |Read |Optional | | -|0x0015 |MinHeatSetpointLimit |Unsigned 16-bit integer |Read |Optional | | -|0x0016 |MaxHeatSetpointLimit |Unsigned 16-bit integer |Read |Optional | | -|0x0017 |MinCoolSetpointLimit |Unsigned 16-bit integer |Read |Optional | | -|0x0018 |MaxCoolSetpointLimit |Unsigned 16-bit integer |Read |Optional | | -|0x0019 |MinSetpointDeadBand |Unsigned 8-bit integer |Read |Optional | | -|0x001A |RemoteSensing |Bitmap 8-bit |Read |Optional | | -|0x001B |ControlSequenceOfOperation |Enumeration 8-bit |Read |Mandatory | | -|0x001C |SystemMode |Enumeration 8-bit |Read |Mandatory | | -|0x001D |AlarmMask |Enumeration 8-bit |Read |Optional | | -|0x001E |ThermostatRunningMode |Enumeration 8-bit |Read |Optional | | -|0x0044 |ACErrorCode |Bitmap 32-bit |Read |Optional | | - -#### LocalTemperature Attribute -LocalTemperature represents the temperature in degrees Celsius, as measured locally. - -#### OutdoorTemperature Attribute -OutdoorTemperature represents the temperature in degrees Celsius, as measured locally. - -#### Occupancy Attribute -Occupancy specifies whether the heated/cooled space is occupied or not - -#### AbsMinHeatSetpointLimit Attribute -The MinHeatSetpointLimit attribute specifies the absolute minimum level that the heating setpoint MAY be -set to. This is a limitation imposed by the manufacturer. - -#### AbsMaxHeatSetpointLimit Attribute -The MaxHeatSetpointLimit attribute specifies the absolute maximum level that the heating setpoint MAY be -set to. This is a limitation imposed by the manufacturer. - -#### AbsMinCoolSetpointLimit Attribute -The MinCoolSetpointLimit attribute specifies the absolute minimum level that the cooling setpoint MAY be -set to. This is a limitation imposed by the manufacturer. - -#### AbsMaxCoolSetpointLimit Attribute -The MaxCoolSetpointLimit attribute specifies the absolute maximum level that the cooling setpoint MAY be -set to. This is a limitation imposed by the manufacturer. - -#### PICoolingDemand Attribute -The PICoolingDemandattribute is 8 bits in length and specifies the level of cooling demanded by the PI -(proportional integral) control loop in use by the thermostat (if any), in percent. This value is 0 when the -thermostat is in “off” or “heating” mode. - -#### PIHeatingDemand Attribute -The PIHeatingDemand attribute is 8 bits in length and specifies the level of heating demanded by the PI -(proportional integral) control loop in use by the thermostat (if any), in percent. This value is 0 when the -thermostat is in “off” or “cooling” mode. - -#### ACErrorCode Attribute -This indicates the type of errors encountered within the Mini Split AC. Error values are reported with four bytes -values. Each bit within the four bytes indicates the unique error. - -### Received - -#### Setpoint Raise/Lower Command [0x00] - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Mode |8-bit enumeration | -|Amount |Signed 8-bit integer | - -#### Set Weekly Schedule [0x01] - -The set weekly schedule command is used to update the thermostat weekly set point schedule from a management system. -If the thermostat already has a weekly set point schedule programmed then it SHOULD replace each daily set point set -as it receives the updates from the management system. For example if the thermostat has 4 set points for every day of -the week and is sent a Set Weekly Schedule command with one set point for Saturday then the thermostat SHOULD remove -all 4 set points for Saturday and replace those with the updated set point but leave all other days unchanged. - -If the schedule is larger than what fits in one ZigBee frame or contains more than 10 transitions, the schedule SHALL -then be sent using multipleSet Weekly Schedule Commands. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Number of Transitions |Enumeration 8-bit | -|Day of Week |Enumeration 8-bit | -|Mode |Enumeration 8-bit | -|Transition |Unsigned 16-bit integer | -|Heat Set |Unsigned 16-bit integer | -|Cool Set |Unsigned 16-bit integer | - - -#### Get Weekly Schedule [0x02] - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Days To Return |Bitmap 8-bit | -|Mode To Return |Bitmap 8-bit | - - -#### Clear Weekly Schedule [0x03] - -#### Get Relay Status Log [0x04] - -The Get Relay Status Log command is used to query the thermostat internal relay status log. This command has no payload. - -The log storing order is First in First Out (FIFO) when the log is generated and stored into the Queue. - -The first record in the log (i.e., the oldest) one, is the first to be replaced when there is a new record and there is -no more space in the log. Thus, the newest record will overwrite the oldest one if there is no space left. - -The log storing order is Last In First Out (LIFO) when the log is being retrieved from the Queue by a client device. -Once the "Get Relay Status Log Response" frame is sent by the Server, the "Unread Entries" attribute -SHOULD be decremented to indicate the number of unread records that remain in the queue. - -If the "Unread Entries"attribute reaches zero and the Client sends a new "Get Relay Status Log Request", the Server -MAY send one of the following items as a response: - -i) resend the last Get Relay Status Log Response -or -ii) generate new log record at the time of request and send Get Relay Status Log Response with the new data - -### Generated - -#### Get Weekly Schedule Response [0x00] - -|Number of Transitions |Enumeration 8-bit | -|Day of Week |Enumeration 8-bit | -|Mode |Enumeration 8-bit | -|Transition |Unsigned 16-bit integer | -|Heat Set |Unsigned 16-bit integer | -|Cool Set |Unsigned 16-bit integer | - - -#### Get Relay Status Log Response [0x01] - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Time of day |Unsigned 16-bit integer | -|Relay Status |Bitmap 8-bit | -|Local Temperature |Unsigned 16-bit integer | -|Humidity |Unsigned 8-bit integer | -|Setpoint |Unsigned 16-bit integer | -|Unread Entries |Unsigned 16-bit integer | - - -## Fan Control [0x0202] - -### Received - -No cluster specific commands. - -### Generated - -No cluster specific commands. - -## Dehumidification Control [0x0203] - -### Received - -No cluster specific commands. - -### Generated - -No cluster specific commands. - -## Thermostat User Interface Configuration [0x0204] - -### Received - -No cluster specific commands. - -### Generated - -No cluster specific commands. - -# Lighting - -## Color Control [0x0300] -This cluster provides an interface for changing the color of a light. Color is -specified according to the Commission Internationale de l'Éclairage (CIE) -specification CIE 1931 Color Space, [B4]. Color control is carried out in terms of -x,y values, as defined by this specification. - -### Attributes -|Id |Name |Type |Access |Implement |Reporting | -|-------|---------------------------|---------------------------|-----------|----------|----------| -|0x0000 |CurrentHue |Unsigned 8-bit Integer |Read only |Optional |Mandatory | -|0x0001 |CurrentSaturation |Unsigned 8-bit Integer |Read only |Optional |Mandatory | -|0x0002 |RemainingTime |Unsigned 16-bit Integer |Read only |Optional | | -|0x0003 |CurrentX |Unsigned 16-bit Integer |Read only |Mandatory |Mandatory | -|0x0004 |CurrentY |Unsigned 16-bit Integer |Read only |Mandatory |Mandatory | -|0x0005 |DriftCompensation |8-bit Enumeration |Read only |Optional | | -|0x0006 |CompensationText |Character string |Read only |Optional | | -|0x0007 |ColorTemperature |Unsigned 16-bit Integer |Read only |Optional |Mandatory | -|0x0008 |ColorMode |8-bit Enumeration |Read only |Optional | | -|0x4000 |EnhancedCurrentHue |Unsigned 16-bit Integer |Read only |Optional |Mandatory | -|0x4001 |EnhancedColorMode |8-bit Enumeration |Read only |Optional | | -|0x4002 |ColorLoopActive |Unsigned 8-bit Integer |Read only |Optional | | -|0x4003 |ColorLoopDirection |Unsigned 8-bit Integer |Read only |Optional | | -|0x4004 |ColorLoopTime |Unsigned 16-bit Integer |Read only |Optional | | -|0x4005 |ColorLoopStartHue |Unsigned 16-bit Integer |Read only |Optional | | -|0x4006 |ColorLoopStoredHue |Unsigned 16-bit Integer |Read only |Optional | | -|0x400A |ColorCapabilities |16-bit Bitmap |Read only |Optional | | -|0x400B |ColorTemperatureMin |Unsigned 16-bit Integer |Read only |Optional | | -|0x400C |ColorTemperatureMax |Unsigned 16-bit Integer |Read only |Optional | | - - -#### CurrentHue Attribute -The CurrentHue attribute contains the current hue value of the light. It is updated -as fast as practical during commands that change the hue. - -The hue in degrees shall be related to the CurrentHue attribute by the relationship -Hue = CurrentHue x 360 / 254 (CurrentHue in the range 0 - 254 inclusive) - -If this attribute is implemented then the CurrentSaturation and ColorMode -attributes shall also be implemented. - -#### CurrentSaturation Attribute -The CurrentSaturation attribute holds the current saturation value of the light. It is -updated as fast as practical during commands that change the saturation. -The saturation shall be related to the CurrentSaturation attribute by the -relationship -Saturation = CurrentSaturation/254 (CurrentSaturation in the range 0 - 254 inclusive) -If this attribute is implemented then the CurrentHue and ColorMode attributes -shall also be implemented. - -#### RemainingTime Attribute -The RemainingTime attribute holds the time remaining, in 1/10ths of a second, -until the currently active command will be complete. - -#### CurrentX Attribute -The CurrentX attribute contains the current value of the normalized chromaticity -value x, as defined in the CIE xyY Color Space. It is updated as fast as practical -during commands that change the color. - -The value of x shall be related to the CurrentX attribute by the relationship - -x = CurrentX / 65535 (CurrentX in the range 0 to 65279 inclusive) - -#### CurrentY Attribute -The CurrentY attribute contains the current value of the normalized chromaticity -value y, as defined in the CIE xyY Color Space. It is updated as fast as practical -during commands that change the color. - -The value of y shall be related to the CurrentY attribute by the relationship - -y = CurrentY / 65535 (CurrentY in the range 0 to 65279 inclusive) - -#### DriftCompensation Attribute -The DriftCompensation attribute indicates what mechanism, if any, is in use for -compensation for color/intensity drift over time. - -#### CompensationText Attribute -The CompensationText attribute holds a textual indication of what mechanism, if -any, is in use to compensate for color/intensity drift over time. - -#### ColorTemperature Attribute -The ColorTemperature attribute contains a scaled inverse of the current value of -the color temperature. It is updated as fast as practical during commands that -change the color. - -The color temperature value in Kelvins shall be related to the ColorTemperature -attribute by the relationship - -Color temperature = 1,000,000 / ColorTemperature (ColorTemperature in the -range 1 to 65279 inclusive, giving a color temperature range from 1,000,000 -Kelvins to 15.32 Kelvins). - -The value ColorTemperature = 0 indicates an undefined value. The value -ColorTemperature = 65535 indicates an invalid value. - -#### ColorMode Attribute -The ColorMode attribute indicates which attributes are currently determining the color of the device. -If either the CurrentHue or CurrentSaturation attribute is implemented, this attribute SHALL also be -implemented, otherwise it is optional. The value of the ColorMode attribute cannot be written directly -- it is set upon reception of another command in to the appropriate mode for that command. - -|Id |Name | -|-------|----------------------------------| -|0x0000 |CurrentHue and CurrentSaturation | -|0x0001 |CurrentX and CurrentY | -|0x0002 |ColorTemperature | - - -#### EnhancedCurrentHue Attribute -The EnhancedCurrentHueattribute represents non-equidistant steps along the CIE 1931 color -triangle, and it provides 16-bits precision. The upper 8 bits of this attribute SHALL be -used as an index in the implementation specific XY lookup table to provide the non-equidistance -steps (see the ZLL test specification for an example). The lower 8 bits SHALL be used to -interpolate between these steps in a linear way in order to provide color zoom for the user. - -#### EnhancedColorMode Attribute -The EnhancedColorModeattribute specifies which attributes are currently determining the color of the device. -To provide compatibility with standard ZCL, the original ColorModeattribute SHALLindicate ‘CurrentHueand CurrentSaturation’ -when the light uses the EnhancedCurrentHueattribute. - -|Id |Name | -|-------|-----------------------------------------| -|0x0000 |CurrentHue and CurrentSaturation | -|0x0001 |CurrentX and CurrentY | -|0x0002 |ColorTemperature | -|0x0002 |EnhancedCurrentHue and CurrentSaturation | - -#### ColorCapabilities Attribute -The ColorCapabilitiesattribute specifies the color capabilities of the device supporting the -color control cluster. - -Note:The support of the CurrentXand CurrentYattributes is mandatory regardless of color capabilities. - -|Id |Name | -|-------|--------------------| -|0x0001 |Hue and Saturation | -|0x0002 |Enhanced Hue | -|0x0004 |Color Loop | -|0x0008 |XY Attribute | -|0x0010 |Color Temperature | - -#### ColorLoopActive Attribute -The ColorLoopActive attribute specifies the current active status of the color loop. -If this attribute has the value 0x00, the color loop SHALLnot be active. If this attribute -has the value 0x01, the color loop SHALL be active. All other values (0x02 – 0xff) are reserved. - -#### ColorLoopDirection Attribute -The ColorLoopDirection attribute specifies the current direction of the color loop. -If this attribute has the value 0x00, the EnhancedCurrentHue attribute SHALL be decremented. -If this attribute has the value 0x01, the EnhancedCurrentHue attribute SHALL be incremented. -All other values (0x02 – 0xff) are reserved. - -#### ColorLoopTime Attribute -The ColorLoopTime attribute specifies the number of seconds it SHALL take to perform a full -color loop, i.e.,to cycle all values of the EnhancedCurrentHue attribute (between 0x0000 and 0xffff). - -#### ColorLoopStartHue Attribute -The ColorLoopStartEnhancedHueattribute specifies the value of the EnhancedCurrentHue attribute -from which the color loop SHALL be started. - -#### ColorLoopStoredHue Attribute -The ColorLoopStoredEnhancedHue attribute specifies the value of the EnhancedCurrentHue attribute -before the color loop was started. Once the color loop is complete, the EnhancedCurrentHue -attribute SHALL be restored to this value. - -#### ColorTemperatureMin Attribute -The ColorTempPhysicalMinMiredsattribute indicates the minimum mired value -supported by the hardware. ColorTempPhysicalMinMiredscorresponds to the maximum -color temperature in kelvins supported by the hardware. -ColorTempPhysicalMinMireds ≤ ColorTemperatureMireds - -#### ColorTemperatureMax Attribute -The ColorTempPhysicalMaxMiredsattribute indicates the maximum mired value -supported by the hard-ware. ColorTempPhysicalMaxMiredscorresponds to the minimum -color temperature in kelvins supported by the hardware. -ColorTemperatureMireds ≤ ColorTempPhysicalMaxMireds. - -### Received - -#### Move to Hue Command [0x00] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Hue |Unsigned 8-bit integer | -|Direction |8-bit enumeration | -|Transition time |Unsigned 16-bit integer | - -#### Move Hue Command [0x01] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Move mode |8-bit enumeration | -|Rate |Unsigned 8-bit integer | - -#### Step Hue Command [0x02] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Step mode |8-bit enumeration | -|Step size |Unsigned 8-bit integer | -|Transition time |Unsigned 8-bit integer | - -#### Move to Saturation Command [0x03] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Saturation |Unsigned 8-bit integer | -|Transition time |Unsigned 16-bit integer | - -#### Move Saturation Command [0x04] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Move mode |8-bit enumeration | -|Rate |Unsigned 8-bit integer | - -#### Step Saturation Command [0x05] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Step mode |8-bit enumeration | -|Step size |Unsigned 8-bit integer | -|Transition time |Unsigned 8-bit integer | - -#### Move to Hue and Saturation Command [0x06] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Hue |Unsigned 8-bit integer | -|Saturation |Unsigned 8-bit integer | -|Transition time |Unsigned 16-bit integer | - -#### Move to Color Command [0x07] -|Field Name |Data Type | -|---------------------------|---------------------------| -|ColorX |Unsigned 16-bit integer | -|ColorY |Unsigned 16-bit integer | -|Transition time |Unsigned 16-bit integer | - -#### Move Color Command [0x08] -|Field Name |Data Type | -|---------------------------|---------------------------| -|RateX |Signed 16-bit integer | -|RateY |Signed 16-bit integer | - -#### Step Color Command [0x09] -|Field Name |Data Type | -|---------------------------|---------------------------| -|StepX |Signed 16-bit integer | -|StepY |Signed 16-bit integer | -|Transition time |Unsigned 16-bit integer | - -#### Move to Color Temperature Command [0x0a] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Color Temperature |Unsigned 16-bit integer | -|Transition time |Unsigned 16-bit integer | - -#### Enhanced Move To Hue Command [0x40] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Hue |Unsigned 16-bit integer | -|Direction |8-bit enumeration | -|Transition time |Unsigned 16-bit integer | - -#### Enhanced Step Hue Command [0x41] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Step Mode |8-bit enumeration | -|Step Size |Unsigned 16-bit integer | -|Transition time |Unsigned 16-bit integer | - -#### Enhanced Move To Hue and Saturation Command [0x42] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Hue |Unsigned 16-bit integer | -|Saturation |8-bit enumeration | -|Transition time |Unsigned 16-bit integer | - -#### Color Loop Set Command [0x43] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Update Flags |8-bit bitmap | -|Action |8-bit enumeration | -|Direction |8-bit enumeration | -|Transition time |Unsigned 16-bit integer | -|Start Hue |Unsigned 16-bit integer | - - -### Generated - -No cluster specific commands. - -## Ballast Configuration [0x0301] - -### Received - -No cluster specific commands. - -### Generated - -No cluster specific commands. - -# Measurement and Sensing - -## Illuminance measurement [0x0400] -The cluster provides an interface to illuminance measurement functionality, -including configuration and provision of notifications of illuminance -measurements. - -### Attributes -|Id |Name |Type |Access |Implement |Reporting | -|-------|----------------------|---------------------------|-----------|----------|----------| -|0x0000 |MeasuredValue |Unsigned 16-bit Integer |Read only |Mandatory |Mandatory | -|0x0001 |MinMeasuredValue |Unsigned 16-bit Integer |Read only |Mandatory | | -|0x0002 |MaxMeasuredValue |Unsigned 16-bit Integer |Read only |Mandatory | | -|0x0003 |Tolerance |Unsigned 16-bit Integer |Read only |Optional |Mandatory | -|0x0004 |LightSensorType |8-bit Enumeration |Read only |Optional | | - -#### MeasuredValue Attribute -MeasuredValue represents the Illuminance in Lux (symbol lx) as follows:- - -MeasuredValue = 10,000 x log10 Illuminance + 1 - -Where 1 lx <= Illuminance <=3.576 Mlx, corresponding to a MeasuredValue in -the range 1 to 0xfffe. - -The following special values of MeasuredValue apply. -
  • 0x0000 indicates a value of Illuminance that is too low to be measured.
  • -
  • 0xffff indicates that the Illuminance measurement is invalid.
  • - -#### MinMeasuredValue Attribute -The MinMeasuredValue attribute indicates the minimum value of MeasuredValue -that can be measured. A value of 0xffff indicates that this attribute is not defined. - -#### MaxMeasuredValue Attribute -The MaxMeasuredValue attribute indicates the maximum value of MeasuredValue -that can be measured. A value of 0xffff indicates that this attribute is not defined. - -MaxMeasuredValue shall be greater than MinMeasuredValue. - -MinMeasuredValue and MaxMeasuredValue define the range of the sensor. - -#### Tolerance Attribute -The Tolerance attribute indicates the magnitude of the possible error that is -associated with MeasuredValue . The true value is located in the range -(MeasuredValue – Tolerance) to (MeasuredValue + Tolerance). - -#### LightSensorType Attribute -The LightSensorType attribute specifies the electronic type of the light sensor. - -### Received - -No cluster specific commands. - -### Generated - -No cluster specific commands. - -## Illuminance level sensing [0x0401] -The cluster provides an interface to illuminance level sensing functionality, -including configuration and provision of notifications of whether the illuminance -is within, above or below a target band. - -### Attributes -|Id |Name |Type |Access |Implement |Reporting | -|-------|----------------------|---------------------------|-----------|----------|----------| -|0x0000 |LevelStatus |8-bit Enumeration |Read only |Mandatory |Mandatory | -|0x0001 |LightSensorType |8-bit Enumeration |Read only |Optional | | -|0x0010 |IlluminanceTargetLevel|Unsigned 16-bit Integer |Read only |Optional | | - -#### LevelStatus Attribute -The LevelStatus attribute indicates whether the measured illuminance is above, -below, or within a band around IlluminanceTargetLevel . - -#### LightSensorType Attribute -The LightSensorType attribute specifies the electronic type of the light sensor. - -#### IlluminanceTargetLevel Attribute -The IlluminanceTargetLevel attribute specifies the target illuminance level. This -target level is taken as the centre of a 'dead band', which must be sufficient in -width, with hysteresis bands at both top and bottom, to provide reliable -notifications without 'chatter'. Such a dead band and hysteresis bands must be -provided by any implementation of this cluster. (N.B. Manufacturer specific -attributes may be provided to configure these). - -IlluminanceTargetLevel represents illuminance in Lux (symbol lx) as follows: - -IlluminanceTargetLevel = 10,000 x log10 Illuminance - -Where 1 lx <= Illuminance <=3.576 Mlx, corresponding to a MeasuredValue in -the range 0 to 0xfffe. - -A value of 0xffff indicates that this attribute is not valid. - -### Received - -No cluster specific commands. - -### Generated - -No cluster specific commands. - -## Temperature measurement [0x0402] - -### Attributes -|Id |Name |Type |Access |Implement |Reporting | -|-------|----------------------|---------------------------|-----------|----------|----------| -|0x0000 |MeasuredValue |Signed 16-bit Integer |Read only |Mandatory |Mandatory | -|0x0001 |MinMeasuredValue |Signed 16-bit Integer |Read only |Mandatory | | -|0x0002 |MaxMeasuredValue |Signed 16-bit Integer |Read only |Mandatory | | -|0x0003 |Tolerance |Unsigned 16-bit Integer |Read only |Optional |Mandatory | - -#### MeasuredValue Attribute -MeasuredValue represents the temperature in degrees Celsius as follows:- -MeasuredValue = 100 x temperature in degrees Celsius. - -Where -273.15°C <= temperature <= 327.67 ºC, corresponding to a - -MeasuredValue in the range 0x954d to 0x7fff. The maximum resolution this -format allows is 0.01 ºC. - -A MeasuredValue of 0x8000 indicates that the temperature measurement is -invalid. - -MeasuredValue is updated continuously as new measurements are made. - -#### MinMeasuredValue Attribute -The MinMeasuredValue attribute indicates the minimum value of MeasuredValue -that is capable of being measured. A MinMeasuredValue of 0x8000 indicates that -the minimum value is unknown. - -#### MaxMeasuredValue Attribute -The MaxMeasuredValue attribute indicates the maximum value of MeasuredValue -that is capable of being measured. - -MaxMeasuredValue shall be greater than MinMeasuredValue. - -MinMeasuredValue and MaxMeasuredValue define the range of the sensor. - -A MaxMeasuredValue of 0x8000 indicates that the maximum value is unknown. - -#### Tolerance Attribute -The Tolerance attribute indicates the magnitude of the possible error that is -associated with MeasuredValue . The true value is located in the range -(MeasuredValue – Tolerance) to (MeasuredValue + Tolerance). - -### Received - -No cluster specific commands. - -### Generated - -No cluster specific commands. - -## Pressure measurement [0x0403] -The cluster provides an interface to pressure measurement functionality, -including configuration and provision of notifications of pressure measurements. - -### Attributes -|Id |Name |Type |Access |Implement |Reporting | -|-------|----------------------|---------------------------|-----------|----------|----------| -|0x0000 |MeasuredValue |Signed 16-bit Integer |Read only |Mandatory |Mandatory | -|0x0001 |MinMeasuredValue |Signed 16-bit Integer |Read only |Mandatory | | -|0x0002 |MaxMeasuredValue |Signed 16-bit Integer |Read only |Mandatory |Mandatory | -|0x0003 |Tolerance |Unsigned 16-bit Integer |Read only |Optional | | -|0x0010 |ScaledValue |Signed 16-bit Integer |Read only |Optional |Mandatory | -|0x0011 |MinScaledValue |Signed 16-bit Integer |Read only |Optional | | -|0x0012 |MaxScaledValue |Signed 16-bit Integer |Read only |Optional | | -|0x0013 |ScaledTolerance |Unsigned 16-bit Integer |Read only |Optional |Mandatory | -|0x0014 |Scale |Unsigned 8-bit Integer |Read only |Optional | | - - - -#### MeasuredValue Attribute -MeasuredValue represents the pressure in kPa as follows:- - -MeasuredValue = 10 x Pressure - -Where -3276.7 kPa <= Pressure <= 3276.7 kPa, corresponding to a -MeasuredValue in the range 0x8001 to 0x7fff. - -Note:- The maximum resolution this format allows is 0.1 kPa. - -A MeasuredValue of 0x8000 indicates that the pressure measurement is invalid. -MeasuredValue is updated continuously as new measurements are made. - -#### MinMeasuredValue Attribute -The MinMeasuredValue attribute indicates the minimum value of MeasuredValue -that can be measured. A value of 0x8000 means this attribute is not defined. - -#### MaxMeasuredValue Attribute -The MaxMeasuredValue attribute indicates the maximum value of MeasuredValue -that can be measured. A value of 0x8000 means this attribute is not defined. - -MaxMeasuredValue shall be greater than MinMeasuredValue. - -MinMeasuredValue and MaxMeasuredValue define the range of the sensor. - -#### Tolerance Attribute -The Tolerance attribute indicates the magnitude of the possible error that is -associated with MeasuredValue . The true value is located in the range -(MeasuredValue – Tolerance) to (MeasuredValue + Tolerance). - -### Received - -No cluster specific commands. - -### Generated - -No cluster specific commands. - -## Flow measurement [0x0404] -The server cluster provides an interface to flow measurement functionality, -including configuration and provision of notifications of flow measurements. - -### Attributes -|Id |Name |Type |Access |Implement |Reporting | -|-------|----------------------|---------------------------|-----------|----------|----------| -|0x0000 |MeasuredValue |Unsigned 16-bit Integer |Read only |Mandatory |Mandatory | -|0x0001 |MinMeasuredValue |Unsigned 16-bit Integer |Read only |Mandatory | | -|0x0002 |MaxMeasuredValue |Unsigned 16-bit Integer |Read only |Mandatory | | -|0x0003 |Tolerance |Unsigned 16-bit Integer |Read only |Optional |Mandatory | - -#### MeasuredValue Attribute -MeasuredValue represents the flow in m3/h as follows:- - -MeasuredValue = 10 x Flow - -Where 0 m3/h <= Flow <= 6,553.4 m3 - -/h, corresponding to a MeasuredValue in the -range 0 to 0xfffe. - -The maximum resolution this format allows is 0.1 m3/h. - -A MeasuredValue of 0xffff indicates that the pressure measurement is invalid. - -MeasuredValue is updated continuously as new measurements are made. - -#### MinMeasuredValue Attribute -The MinMeasuredValue attribute indicates the minimum value of MeasuredValue -that can be measured. A value of 0xffff means this attribute is not defined - -#### MaxMeasuredValue Attribute -The MaxMeasuredValue attribute indicates the maximum value of MeasuredValue -that can be measured. A value of 0xffff means this attribute is not defined. - -MaxMeasuredValue shall be greater than MinMeasuredValue. - -MinMeasuredValue and MaxMeasuredValue define the range of the sensor - -#### Tolerance Attribute -The Tolerance attribute indicates the magnitude of the possible error that is -associated with MeasuredValue . The true value is located in the range -(MeasuredValue – Tolerance) to (MeasuredValue + Tolerance). - -### Received - -No cluster specific commands. - -### Generated - -No cluster specific commands. - -## Relative humidity measurement [0x0405] -The server cluster provides an interface to relative humidity measurement -functionality, including configuration and provision of notifications of relative -humidity measurements. - -### Attributes -|Id |Name |Type |Access |Implement |Reporting | -|-------|----------------------|---------------------------|-----------|----------|----------| -|0x0000 |MeasuredValue |Unsigned 16-bit Integer |Read only |Mandatory |Mandatory | -|0x0001 |MinMeasuredValue |Unsigned 16-bit Integer |Read only |Mandatory | | -|0x0002 |MaxMeasuredValue |Unsigned 16-bit Integer |Read only |Mandatory | | -|0x0003 |Tolerance |Unsigned 16-bit Integer |Read only |Optional |Mandatory | - -#### MeasuredValue Attribute -MeasuredValue represents the relative humidity in % as follows:- - -MeasuredValue = 100 x Relative humidity - -Where 0% <= Relative humidity <= 100%, corresponding to a MeasuredValue in -the range 0 to 0x2710. - -The maximum resolution this format allows is 0.01%. - -A MeasuredValue of 0xffff indicates that the measurement is invalid. - -MeasuredValue is updated continuously as new measurements are made. - -#### MinMeasuredValue Attribute -The MinMeasuredValue attribute indicates the minimum value of MeasuredValue -that can be measured. A value of 0xffff means this attribute is not defined - -#### MaxMeasuredValue Attribute -The MaxMeasuredValue attribute indicates the maximum value of MeasuredValue -that can be measured. A value of 0xffff means this attribute is not defined. - -MaxMeasuredValue shall be greater than MinMeasuredValue. - -MinMeasuredValue and MaxMeasuredValue define the range of the sensor. - -#### Tolerance Attribute -The Tolerance attribute indicates the magnitude of the possible error that is -associated with MeasuredValue . The true value is located in the range -(MeasuredValue – Tolerance) to (MeasuredValue + Tolerance). - -### Received - -No cluster specific commands. - -### Generated - -No cluster specific commands. - -## Occupancy sensing [0x0406] -The cluster provides an interface to occupancy sensing functionality, -including configuration and provision of notifications of occupancy status. - -### Attributes -|Id |Name |Type |Access |Implement |Reporting | -|-------|---------------------------------------|---------------------------|-----------|----------|----------| -|0x0000 |Occupancy |8-bit Bitmap |Read only |Mandatory |Mandatory | -|0x0001 |OccupancySensorType |8-bit Enumeration |Read only |Mandatory | | -|0x0010 |PIROccupiedToUnoccupiedDelay |Unsigned 8-bit Integer |Read/Write |Optional | | -|0x0011 |PIRUnoccupiedToOccupiedDelay |Unsigned 8-bit Integer |Read/Write |Optional | | -|0x0020 |UltraSonicOccupiedToUnoccupiedDelay |Unsigned 8-bit Integer |Read/Write |Optional | | -|0x0021 |UltraSonicUnoccupiedToOccupiedDelay |Unsigned 8-bit Integer |Read/Write |Optional | | -|0x0022 |UltrasonicUnoccupiedToOccupiedThreshold|Unsigned 8-bit Integer |Read/Write |Optional | | - -#### Occupancy Attribute -The Occupancy attribute is a bitmap. - -Bit 0 specifies the sensed occupancy as follows: 1 = occupied, 0 = unoccupied. -All other bits are reserved. - -#### OccupancySensorType Attribute -The OccupancySensorType attribute specifies the type of the occupancy sensor. - -#### PIROccupiedToUnoccupiedDelay Attribute -The PIROccupiedToUnoccupiedDelay attribute is 8-bits in length and specifies -the time delay, in seconds, before the PIR sensor changes to its occupied state -when the sensed area becomes unoccupied. This attribute, along with -PIRUnoccupiedToOccupiedTime, may be used to reduce sensor 'chatter' when -used in an area where occupation changes frequently. - -#### PIRUnoccupiedToOccupiedDelay Attribute -The PIRUnoccupiedToOccupiedDelay attribute is 8-bits in length and specifies -the time delay, in seconds, before the PIR sensor changes to its unoccupied state -when the sensed area becomes occupied. - -#### UltraSonicOccupiedToUnoccupiedDelay Attribute -The UltraSonicOccupiedToUnoccupiedTime attribute specifies the time delay, in -seconds, before the ultrasonic sensor changes to its occupied state when the -sensed area becomes unoccupied. This attribute, along with -UltraSonicUnoccupiedToOccupiedTime, may be used to reduce sensor 'chatter' -when used in an area where occupation changes frequently. - -#### UltraSonicUnoccupiedToOccupiedDelay Attribute -The UltraSonicUnoccupiedToOccupiedTime attribute specifies the time delay, in -seconds, before the ultrasonic sensor changes to its unoccupied state when the -sensed area becomes occupied. - - -### Received - -No cluster specific commands. - -### Generated - -No cluster specific commands. - -# Security and Safety - -## IAS Zone [0x0500] -The IAS Zone cluster defines an interface to the functionality of an IAS security -zone device. IAS Zone supports up to two alarm types per zone, low battery -reports and supervision of the IAS network. - -### Attributes - -|Id |Name |Type |Access |Implement |Reporting | -|-------|--------------------------------------------|---------------------------|-----------|----------|----------| -|0x0000 |ZoneState |8-bit Enumeration |Read only |Mandatory | | -|0x0001 |ZoneType |16-bit Enumeration |Read only |Mandatory | | -|0x0002 |ZoneStatus |16-bit Bitmap |Read only |Mandatory | | -|0x0010 |IASCIEAddress |IEEE Address |Read/Write |Mandatory | | -|0x0011 |ZoneID |Unsigned 8-bit Integer |Read/Write |Mandatory | | -|0x0012 |NumberOfZoneSensitivityLevelsSupported |Unsigned 8-bit Integer |Read only |Optional | | -|0x0013 |CurrentZoneSensitivityLevel |Unsigned 8-bit Integer |Read/Write |Optional | | - -#### ZoneState Attribute -The Zone State attribute defines if the device is currently enrolled with a CIE or not. - -|Id |Name | -|-------|--------------------------| -|0x0000 |Not Enrolled | -|0x0001 |Enrolled | - -#### ZoneType Attribute -The Zone Type dictates the meaning of Alarm1 and Alarm2 bits of the ZoneStatus attribute - -|Id |Name | -|-------|--------------------------| -|0x0000 |Standard CIE | -|0x000D |Motion Sensor | -|0x0015 |Contact Switch | -|0x0028 |Fire Sensor | -|0x002A |Water Sensor | -|0x002B |CO Sensor | -|0x002C |Personal Emergency Device | -|0x002D |Vibration Movement Sensor | -|0x010F |Remote Control | -|0x0115 |Key Fob | -|0x021D |Key Pad | -|0x0225 |Standard Warning Device | -|0x0226 |Glass Break Sensor | -|0x0229 |Security Repeater | - -#### ZoneStatus Attribute -The ZoneStatus attribute is a bit map. Each bit defines the state of an alarm. - -#### IASCIEAddress Attribute -The IAS_CIE_Address attribute specifies the address that commands generated by -the server shall be sent to. All commands received by the server must also come -from this address. - -It is up to the zone's specific implementation to permit or deny change (write) of -this attribute at specific times. Also, it is up to the zone's specific implementation -to implement some auto-detect for the CIE (example: by requesting the ZigBee -cluster discovery service to locate a Zone Server cluster.) or require the -intervention of a CT in order to configure this attribute during installation. - -#### ZoneID Attribute -A unique reference number allocated by the CIE at zone enrollment time. - -Used by IAS devices to reference specific zones when communicating with the CIE. The ZoneID of each zone stays fixed until that zone is unenrolled. - -#### NumberOfZoneSensitivityLevelsSupported Attribute -Provides the total number of sensitivity levels supported by the IAS Zone server. The purpose of this attribute is to support devices that can be configured to be more or less sensitive (e.g., motion sensor). It provides IAS Zone clients with the range of sensitivity levels that are supported so they MAY be presented to the user for configuration. - -The values 0x00 and 0x01 are reserved because a device that has zero or one sensitivity level SHOULD NOT support this attribute because no configuration of the IAS Zone server’s sensitivity level is possible. - -The meaning of each sensitivity level is manufacturer-specific. However, the sensitivity level of the IAS Zone server SHALL become more sensitive as they ascend. For example, if the server supports three sen- sitivity levels, then the value of this attribute would be 0x03 where 0x03 is more sensitive than 0x02, which is more sensitive than 0x01. - -#### CurrentZoneSensitivityLevel Attribute -Allows an IAS Zone client to query and configure the IAS Zone server’s sensitivity level. Please see NumberOfZoneSensitivityLevelsSupported Attribute for more detail on how to interpret this attribute. - -The default value 0x00 is the device’s default sensitivity level as configured by the manufacturer. It MAY correspond to the same sensitivity as another value in the NumberOfZoneSensitivityLevelsSupported, but this is the default sensitivity to be used if the CurrentZoneSensitivityLevel attribute is not otherwise configured by an IAS Zone client. - - -### Received - -#### Zone Enroll Response Command [0x00] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Enroll response code |8-bit Enumeration | -|Zone ID |Unsigned 8-bit Integer | - -##### Enroll response code - -|Id |Name | -|-------|--------------------------| -|0x0000 |Success | -|0x0001 |Not Supported | -|0x0002 |No Enroll Permit | -|0x0003 |Too Many Zones | - -#### Initiate Normal Operation Mode Command [0x01] -Used to tell the IAS Zone server to commence normal operation mode. - -Upon receipt, the IAS Zone server SHALL commence normal operational mode. - -Any configurations and changes made (e.g., CurrentZoneSensitivityLevel attribute) to the IAS Zone server SHALL be retained. - -Upon commencing normal operation mode, the IAS Zone server SHALL send a Zone Status Change Notification command updating the ZoneStatus attribute Test bit to zero (i.e., “operation mode”). - - -#### Initiate Test Mode Command [0x02] -Certain IAS Zone servers MAY have operational configurations that could be configured OTA or locally on the device. This command enables them to be remotely placed into a test mode so that the user or installer MAY configure their field of view, sensitivity, and other operational parameters. They MAY also verify the placement and proper operation of the IAS Zone server, which MAY have been placed in a difficult to reach location (i.e., making a physical input on the device impractical to trigger). - -Another use case for this command is large deployments, especially commercial and industrial, where placing the entire IAS system into test mode instead of a single IAS Zone server is infeasible due to the vulnerabilities that might arise. This command enables only a single IAS Zone server to be placed into test mode. - -The biggest limitation of this command is that most IAS Zone servers today are battery-powered sleepy nodes that cannot reliably receive commands. However, implementers MAY decide to program an IAS Zone server by factory default to maintain a limited duration of normal polling upon initialization/joining to a new network. Some IAS Zone servers MAY also have AC mains power and are able to receive commands. Some types of IAS Zone servers that MAY benefit from this command are: motion sensors and fire sensor/smoke alarm listeners (i.e., a device that listens for a non-communicating fire sensor to alarm and communicates this to the IAS CIE). - -|Field Name |Data Type | -|-------------------------------|---------------------------| -|Test Mode Duration |Unsigned 8-bit Integer | -|Current Zone Sensitivity Level |Unsigned 8-bit Integer | - -##### Test Mode Duration Field -Specifies the duration, in seconds, for which the IAS Zone server SHALL operate in its test mode. - -##### Current Zone Sensitivity Level Field -Specifies the sensitivity level the IAS Zone server SHALL use for the duration of the Test Mode and with which it must update its CurrentZoneSensitivityLevel attribute. - -The permitted values of Current Zone Sensitivity Level are shown defined for the CurrentZoneSensitivityLevel Attribute. - -### Generated - -#### Zone Status Change Notification Command [0x00] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Zone Status |16-bit Enumeration | -|Extended Status |8-bit Enumeration | - -#### Zone Enroll Request Command [0x01] -The Zone Enroll Request command is generated when a device embodying the Zone server cluster wishes -to be enrolled as an active alarm device. It must do this immediately it has joined the network -(during commissioning). - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Zone Type |16-bit Enumeration | -|Manufacturer Code |Unsigned 16-bit Integer | - -## IAS ACE [0x0501] -The IAS ACE cluster defines an interface to the functionality of any Ancillary -Control Equipment of the IAS system. Using this cluster, a ZigBee enabled ACE -device can access a IAS CIE device and manipulate the IAS system, on behalf of a -level-2 user. - -### Attributes - -### Received - -#### Arm Command [0x00] -On receipt of this command, the receiving device sets its arm mode according to the value of the Arm Mode field. It -is not guaranteed that an Arm command will succeed. Based on the current state of -the IAS CIE, and its related devices, the command can be rejected. The device SHALL generate an Arm Response command -to indicate the resulting armed state - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Arm Mode |8-bit Enumeration | -|Arm/Disarm Code |Character String | -|Zone ID |Unsigned 8-bit Integer | - -##### Arm Mode - -|Id |Name | -|-------|--------------------------| -|0x0000 |Disarm | -|0x0001 |Arm Day | -|0x0002 |Arm Night | -|0x0003 |Arm All Zones | - - -##### Arm/Disarm Code -The Arm/DisarmCode SHALL be a code entered into the ACE client (e.g., security keypad) or system by the -user upon arming/disarming. The server MAY validate the Arm/Disarm Code received from the IAS ACE client -in Arm command payload before arming or disarming the system. If the client does not have the capability -to input an Arm/Disarm Code (e.g., keyfob),or the system does not require one, the client SHALL a transmit -a string with a length of zero. - -There is no minimum or maximum length to the Arm/Disarm Code; however, the -Arm/Disarm Code SHOULD be between four and eight alphanumeric characters in length. - -The string encoding SHALL be UTF-8. - -##### Zone ID -Zone ID is the index of the Zone in the CIE's zone table. If none is programmed, the Zone -ID default value SHALL be indicated in this field. - -#### Bypass Command [0x01] - -Provides IAS ACE clients with a method to send zone bypass requests to the IAS ACE server. -Bypassed zones MAYbe faulted or in alarm but will not trigger the security system to go into alarm. -For example, a user MAYwish to allow certain windows in his premises protected by an IAS Zone server to -be left open while the user leaves the premises. The user could bypass the IAS Zone server protecting -the window on his IAS ACE client (e.g., security keypad), and if the IAS ACE server indicates that zone is -successfully by-passed, arm his security system while he is away. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Number of Zones |Unsigned 8-bit integer | -|Zone IDs |N x Unsigned 8-bit integer | -|Arm/Disarm Code |Character String | - - -##### Arm/Disarm Code -The Arm/DisarmCode SHALL be a code entered into the ACE client (e.g., security keypad) or system by the -user upon arming/disarming. The server MAY validate the Arm/Disarm Code received from the IAS ACE client -in Arm command payload before arming or disarming the system. If the client does not have the capability -to input an Arm/Disarm Code (e.g., keyfob),or the system does not require one, the client SHALL a transmit -a string with a length of zero. - -#### Emergency Command [0x02] -|Field Name |Data Type | -|---------------------------|---------------------------| - -#### Fire Command [0x03] -|Field Name |Data Type | -|---------------------------|---------------------------| - -#### Panic Command [0x04] -|Field Name |Data Type | -|---------------------------|---------------------------| - -#### Get Zone ID Map Command [0x05] -|Field Name |Data Type | -|---------------------------|---------------------------| - -#### Get Zone Information Command [0x06] - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Zone ID |Unsigned 8-bit Integer | - -#### Get Panel Status Command [0x07] -This command is used by ACE clients to request an update to the status (e.g., security -system arm state) of the ACE server (i.e., the IAS CIE). In particular, this command is -useful for battery-powered ACE clients with polling rates longer than the ZigBee standard -check-in rate. - -On receipt of this command, the ACE server responds with the status of the security system. -The IAS ACE server SHALL generate a Get Panel Status Response command. - -|Field Name |Data Type | -|---------------------------|---------------------------| - -#### Get Bypassed Zone List Command [0x08] -Provides IAS ACE clients with a way to retrieve the list of zones to be bypassed. This provides them with the ability -to provide greater local functionality (i.e., at the IAS ACE client) for users to modify the Bypassed Zone List and reduce -communications to the IAS ACE server when trying to arm the CIE security system. - -#### Get Zone Status Command [0x09] -This command is used by ACE clients to request an update of the status of the IAS Zone devices managed by the ACE server -(i.e., the IAS CIE). In particular, this command is useful for battery-powered ACE clients with polling rates longer than -the ZigBee standard check-in rate. The command is similar to the Get Attributes Supported command in that it specifies a -starting Zone ID and a number of Zone IDs for which information is requested. Depending on the number of IAS Zone devices -managed by the IAS ACE server, sending the Zone Status of all zones MAY not fit into a single Get ZoneStatus Response command. -IAS ACE clients MAY need to send multiple Get Zone Status commands in order to get the information they seek. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Starting Zone ID |Unsigned 8-bit Integer | -|Max Zone IDs |Unsigned 8-bit Integer | -|Zone Status Mask Flag |Boolean | -|Zone Status Mask |16-bit bitmap | - -##### Starting Zone ID -Specifies the starting Zone ID at which the IAS Client would like to obtain zone status information. - -##### Max Zone IDs -Specifies the maximum number of Zone IDs and corresponding Zone Statuses that are to be returned by the IAS ACE server -when it responds with a Get Zone Status Response command - -##### Zone Status Mask Flag -Functions as a query operand with the Zone Status Mask field. If set to zero (i.e., FALSE), the IAS ACE server SHALL include all Zone -IDs and their status, regardless of their Zone Status when it responds with a Get Zone Status Response command. If set to one (i.e., TRUE), -the IAS ACE server SHALL include only those Zone IDs whose Zone Status attribute is equal to one or more of the Zone Statuses requested -in the Zone Status Mask field of the Get Zone Status command. - -Use of Zone Status Mask Flag and Zone Status Mask fields allow a client to obtain updated information for the subset of Zone IDs -they’re interested in, which is beneficial when the number of IAS Zone devices in a system is large. - -##### Zone Status Mask -Coupled with the Zone Status Mask Flag field, functions as a mask to enable IAS ACE clients to get information about the Zone IDs whose -ZoneStatus attribute is equal to any of the bits indicated by the IAS ACE client in the Zone Status Mask field. The format of this field -is the same as the ZoneStatus attribute in the IAS Zone cluster. Per the Zone Status Mask Flag field, IAS ACE servers SHALL respond with -only the Zone IDs whose ZoneStatus attributes are equal to at least one of the Zone Status bits set in the Zone Status Mask field requested -by the IAS ACE client.For example, if the Zone Status Mask field set to “0x0003” would match IAS Zones whose ZoneStatus attributes are -0x0001, 0x0002, and 0x0003. - -In other words, if a logical 'AND' between the Zone Status Mask field and the IAS Zone’s ZoneStatus attribute yields a non-zero result, -the IAS ACE server SHALL include that IAS Zone in the Get Zone Status Response command - -### Generated - -#### Arm Response Command [0x00] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Arm Notification |8-bit enumeration | - -##### Arm Notification - -|Id |Name | -|-------|--------------------------| -|0x0000 |All Zones Disarmed | -|0x0001 |Day Zones Armed | -|0x0002 |Night Zones Armed | -|0x0003 |All Zones Armed | -|0x0004 |Invalid Arm Code | -|0x0005 |Not Ready To Arm | -|0x0006 |Already Disarmed | - -#### Get Zone ID Map Response Command [0x01] -The 16 fields of the payload indicate whether each of the Zone IDs from 0 to 0xff is allocated or not. If bit n -of Zone ID Map section N is set to 1, then Zone ID (16 x N + n ) is allocated, else it is not allocated - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Zone ID Map section 0 |16-bit bitmap | -|Zone ID Map section 1 |16-bit bitmap | -|Zone ID Map section 2 |16-bit bitmap | -|Zone ID Map section 3 |16-bit bitmap | -|Zone ID Map section 4 |16-bit bitmap | -|Zone ID Map section 5 |16-bit bitmap | -|Zone ID Map section 6 |16-bit bitmap | -|Zone ID Map section 7 |16-bit bitmap | -|Zone ID Map section 8 |16-bit bitmap | -|Zone ID Map section 9 |16-bit bitmap | -|Zone ID Map section 10 |16-bit bitmap | -|Zone ID Map section 11 |16-bit bitmap | -|Zone ID Map section 12 |16-bit bitmap | -|Zone ID Map section 13 |16-bit bitmap | -|Zone ID Map section 14 |16-bit bitmap | -|Zone ID Map section 15 |16-bit bitmap | - -#### Get Zone Information Response Command [0x02] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Zone ID |Unsigned 8-bit integer | -|Zone Type |16-bit Enumeration | -|IEEE address |IEEE address | -|Zone Label |Character String | - -##### Zone Label -Provides the ZoneLabel stored in the IAS CIE. If none is programmed, the IAS ACE server SHALL transmit a string with a length -of zero.There is no minimum or maximum length to the Zone Label field; however, the Zone Label SHOULD be between 16 to 24 -alphanumeric characters in length. - -The string encoding SHALL be UTF-8. - -#### Zone Status Changed Command [0x03] -This command updates ACE clients in the system of changes to zone status recorded by the ACE server (e.g., IAS CIE device). -An IAS ACE server SHOULD send a Zone Status Changed command upon a change to an IAS Zone device’s ZoneStatus that it manages (i.e., -IAS ACE server SHOULD send a Zone Status Changed command upon receipt of a Zone Status Change Notification command). - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Zone ID |Unsigned 8-bit Integer | -|Zone Status |16-bit enumeration | -|Audible Notification |8-bit enumeration | -|Zone Label |Character String | - -##### Zone ID -The index of the Zone in the CIE’s zone table (Table 8-11). If none is programmed, the ZoneID attribute default -value SHALL be indicated in this field. - -##### Zone Label -Provides the ZoneLabel stored in the IAS CIE. If none is programmed, the IAS ACE server SHALL transmit a string with a length -of zero. There is no minimum or maximum length to the Zone Label field; however, the Zone Label SHOULD be between 16 to 24 -alphanumeric characters in length. - -#### Panel Status Changed Command [0x04] -This command updates ACE clients in the system of changes to panel status recorded by the ACE server (e.g., IAS CIE -device).Sending the Panel Status Changed command (vs.the Get Panel Status and Get Panel Status Response method) is -generally useful only when there are IAS ACE clients that data poll within the retry timeout of the network (e.g., less than -7.68 seconds). - -An IAS ACE server SHALL send a Panel Status Changed command upon a change to the IAS CIE’s panel status (e.g., -Disarmed to Arming Away/Stay/Night, Arming Away/Stay/Night to Armed, Armed to Disarmed) as defined in the Panel Status field. - -When Panel Status is Arming Away/Stay/Night, an IAS ACE server SHOULD send Panel Status Changed commands every second in order to -update the Seconds Remaining. In some markets (e.g., North America), the final 10 seconds of the Arming Away/Stay/Night sequence -requires a separate audible notification (e.g., a double tone). - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Panel Status |8-bit enumeration | -|Seconds Remaining |Unsigned 8-bit Integer | -|Audible Notification |8-bit enumeration | -|Alarm Status |8-bit enumeration | - -##### Panel Status -|Id |Name | -|-------|--------------------------| -|0x0000 |Panel Disarmed | -|0x0001 |Armed Stay | -|0x0002 |Armed Night | -|0x0003 |Armed Away | -|0x0004 |Exit Delay | -|0x0005 |Entry Delay | -|0x0006 |Not Ready to Arm | -|0x0007 |In Alarm | -|0x0008 |Arming Stay | -|0x0009 |Arming Night | -|0x000A |Arming Away | - -##### Seconds Remaining Parameter -Indicates the number of seconds remaining for the server to be in the state indicated in the PanelStatus parameter. -The SecondsRemaining parameter SHALL be provided if the PanelStatus parameter has a value of 0x04 (Exit delay) or 0x05 (Entry delay). - -The default value SHALL be 0x00. - -##### Alarm Status -|Id |Name | -|-------|--------------------------| -|0x0000 |No Alarm | -|0x0001 |Burglar | -|0x0002 |Fire | -|0x0003 |Emergency | -|0x0004 |Police Panic | -|0x0005 |Fire Panic | -|0x0006 |Emergency Panic | - -#### Get Panel Status Response Command [0x05] -This command updates requesting IAS ACE clients in the system of changes to the security panel status recorded by -the ACE server (e.g., IAS CIE device). - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Panel Status |8-bit enumeration | -|Seconds Remaining |Unsigned 8-bit Integer | -|Audible Notification |8-bit enumeration | -|Alarm Status |8-bit enumeration | - - -##### Panel Status -Defines the current status of the alarm panel. - -|Id |Name | -|-------|--------------------------| -|0x0000 |Panel Disarmed | -|0x0001 |Armed Stay | -|0x0002 |Armed Night | -|0x0003 |Armed Away | -|0x0004 |Exit Delay | -|0x0005 |Entry Delay | -|0x0006 |Not Ready to Arm | -|0x0007 |In Alarm | -|0x0008 |Arming Stay | -|0x0009 |Arming Night | -|0x000A |Arming Away | - -##### Seconds Remaining -Indicates the number of seconds remaining for the server to be in the state indicated in the PanelStatus parameter. -The SecondsRemaining parameter SHALL be provided if the PanelStatus parameter has a value of 0x04 (Exit delay) or 0x05 (Entry delay). - -The default value SHALL be 0x00. - -##### Audible Notification -Provide the ACE client with information on which type of audible notification it SHOULD make for the zone status change. This field is useful for telling the ACE client to play a standard chime or other audio indication or to mute and not sound an audible notification at all. This field also allows manufacturers to create additional audible alert types (e.g., dog barking, windchimes, conga drums) to enable users to customise their system. - -##### Alarm Status -Provides the ACE client with information on the type of alarm the panel is in if its Panel Status field indicates it is “in alarm.” This field MAY be useful for ACE clients to display or otherwise initiate notification for users. - -|Id |Name | -|-------|--------------------------| -|0x0000 |No Alarm | -|0x0001 |Burglar | -|0x0002 |Fire | -|0x0003 |Emergency | -|0x0004 |Police Panic | -|0x0005 |Fire Panic | -|0x0006 |Emergency Panic | - -#### Set Bypassed Zone List Command [0x06] -Sets the list of bypassed zones on the IAS ACE client. This command can be sent either as a response to the -GetBypassedZoneList command or unsolicited when the list of bypassed zones changes on the ACE server. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Zone ID |N x Unsigned 8-bit Integer | - -##### Zone ID -Zone ID is the index of the Zone in the CIE's zone table and is an array of Zone IDs for each zone that is bypassed -where X is equal to the value of the Number of Zones field. There is no order imposed by the numbering of the Zone ID -field in this command payload. IAS ACE servers SHOULD provide the array of Zone IDs in ascending order. - -#### Bypass Response Command [0x07] -Provides the response of the security panel to the request from the IAS ACE client to bypass zones via a Bypass command. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Bypass Result |N x Unsigned 8-bit Integer | - -##### Bypass Result -An array of Zone IDs for each zone requested to be bypassed via the Bypass command where X is equal to the value of -the Number of Zones field. The order of results for Zone IDs SHALL be the same as the order of Zone IDs sent in -the Bypass command by the IAS ACE client. - -|Id |Name | -|-------|--------------------------| -|0x0000 |Zone Bypassed | -|0x0001 |Zone Not Bypassed | -|0x0002 |Not Allowed | -|0x0003 |Invalid Zone Id | -|0x0004 |Unknown Zone Id | -|0x0005 |Invalid Arm Code | - - -#### Get Zone Status Response [0x08] - -This command updates requesting IAS ACE clients in the system of changes to the IAS Zone server statuses recorded -by the ACE server (e.g., IAS CIE device). - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Zone Status Complete |Boolean | -|Number of zones |Unsigned 8-bit Integer | -|Ias Ace Zone Status |Unsigned 8-bit Integer |Structure[Number Of Zones] | -|Zone Id |Unsigned 8-bit Integer |TODO -|Zone Status |16-bit bitmap |TODO - -##### Zone Status Complete -Indicates whether there are additional Zone IDs managed by the IAS ACE Server with Zone Status information to be obtained. -A value of zero (i.e. FALSE) indicates there are additional Zone IDs for which Zone Status information is available and -that the IAS ACE client SHOULD send another Get Zone Status command.A value of one (i.e. TRUE) indicates there are no -more Zone IDs for the IAS ACE client to query and the IAS ACE client has received all the Zone Status information for all -IAS Zones managed by the IAS ACE server. - -The IAS ACE client SHOULD NOT typically send another Get Zone Status command. - -## IAS WD [0x0502] -The IAS WD cluster provides an interface to the functionality of any Warning -Device equipment of the IAS system. Using this cluster, a ZigBee enabled CIE -device can access a ZigBee enabled IAS WD device and issue alarm warning -indications (siren, strobe lighting, etc.) when a system alarm condition is detected. - -### Attributes - -|Id |Name |Type |Access |Implement |Reporting | -|-------|---------------------|---------------------------|-----------|----------|----------| -|0x0000 |MaxDuration |Unsigned 16-bit Integer |Read/Write |Mandatory | | -|0x0001 |ZoneType |8-bit Enumeration |Read only |Mandatory | | -|0x0002 |ZoneStatus |16-bit Bitmap |Read only |Mandatory | | -|0x0010 |IAS_CIE_Address |IEEE Address |Read/Write |Mandatory | | - -#### MaxDuration Attribute -The MaxDuration attribute specifies the maximum time in seconds that the siren -will sound continuously, regardless of start/stop commands. - -### Received - -#### Start Warning Command [0x00] -This command starts the WD operation. The WD alerts the surrounding area by -audible (siren) and visual (strobe) signals. - -A Start Warning command shall always terminate the effect of any previous -command that is still current. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Header |8-bit data | -|Warning duration |Unsigned 16-bit integer | - -#### Squawk Command [0x02] -|Field Name |Data Type | -|---------------------------|---------------------------| -|Header |8-bit data | - -### Generated - -# Protocol Interfaces - -## Generic Tunnel [0x0600] -### Received -### Generated -## BACnet Protocol Tunnel [0x0601] -### Received -### Generated -## Analog Input (BACnet Regular) [0x0602] -### Received -### Generated -## Analog Input (BACnet Extended) [0x0603] -### Received -### Generated -## Analog Output (BACnet Regular) [0x0604] -### Received -### Generated -## Analog Output (BACnet Extended) [0x0605] -### Received -### Generated -## Analog Value (BACnet Regular) [0x0606] -### Received -### Generated -## Analog Value (BACnet Extended) [0x0607] -### Received -### Generated -## Binary Input (BACnet Regular) [0x0608] -### Received -### Generated -## Binary Input (BACnet Extended) [0x0609] -### Received -### Generated -## Binary Output (BACnet Regular) [0x060a] -### Received -### Generated -## Binary Output (BACnet Extended) [0x060b] -### Received -### Generated -## Binary Value (BACnet Regular) [0x060c] -### Received -### Generated -## Binary Value (BACnet Extended) [0x060d] -### Received -### Generated -## Multistate Input (BACnet Regular) [0x060e] -### Received -### Generated -## Multistate Input (BACnet Extended) [0x060f] -### Received -### Generated -## Multistate Output (BACnet Regular) [0x0610] -### Received -### Generated -## Multistate Output (BACnet Extended) [0x0611] -### Received -### Generated -## Multistate Value (BACnet Regular) [0x0612] -### Received -### Generated -## Multistate Value (BACnet Extended) [0x0613] -### Received -### Generated - -# Smart Energy - -## Price [0x0700] -### Received -### Generated - -## Demand Response and Load Control [0x0701] -### Received -### Generated - -## Metering [0x0702] -### Received -### Generated - -## Messaging [0x0703] -### Received -### Generated - -## Tunneling [0x0704] -### Received -### Generated - -## Key Establishment [0x0800] -### Received -### Generated - -# Appliances -## Appliance Control [0x001B] -### Received -### Generated - -## Appliance Identification [0x0B00] -### Received -### Generated - -## Appliance Events and Alerts [0x0B02] -### Received -### Generated - -## Appliance Statistics [0x0B03] -### Received -### Generated - -## Electrical Measurement [0x0B04] -This cluster provides a mechanism for querying data about the electrical properties as measured -by the device. This cluster may be implemented on any device type and be implemented on a per-endpoint -basis. For example, a power strip device could represent each outlet on a different endpoint and -report electrical information for each individual outlet. The only caveat is that if you implement -an attribute that has an associated multiplier and divisor, then you must implement the associated -multiplier and divisor attributes. For example if you implement DCVoltage, you must also implement -DCVoltageMultiplier and DCVoltageDivisor. - -If you are interested in reading information about the power supply or battery level on the device, -please see the Power Configuration cluster. - -### Attributes - -|Id |Name |Type |Access |Implement |Reporting | -|-------|---------------------------------|---------------------------|-----------|----------|----------| -|0x0000 |MeasurementType |32-bit Bitmap |Read only |Mandatory | | -|0x0300 |ACFrequency |Unsigned 16-bit Integer |Read only |Optional | | -|0x0304 |TotalActivePower |Signed 32-bit Integer |Read only |Optional | | -|0x0305 |TotalReactivePower |Signed 32-bit Integer |Read only |Optional | | -|0x0306 |TotalApparentPower |Unsigned 32-bit Integer |Read only |Optional | | -|0x0505 |RMSVoltage |Unsigned 16-bit Integer |Read only |Optional | | -|0x0508 |RMSCurrent |Unsigned 16-bit Integer |Read only |Optional | | -|0x050B |ActivePower |Signed 16-bit Integer |Read only |Optional | | -|0x0600 |ACVoltageMultiplier |Unsigned 16-bit Integer |Read only |Optional | | -|0x0601 |ACVoltageDivisor |Unsigned 16-bit Integer |Read only |Optional | | -|0x0602 |ACCurrentMultiplier |Unsigned 16-bit Integer |Read only |Optional | | -|0x0603 |ACCurrentDivisor |Unsigned 16-bit Integer |Read only |Optional | | -|0x0604 |ACPowerMultiplier |Unsigned 16-bit Integer |Read only |Optional | | -|0x0605 |ACPowerDivisor |Unsigned 16-bit Integer |Read only |Optional | | - - - -#### MeasurementType Attribute -This attribute indicates a device’s measurement capabilities. This will be indicated by setting -the desire measurement bits to 1. - -|Id |Name | -|-------|--------------------------| -|0x0000 |AC Active Measurement | -|0x0001 |AC Reactive Measurement | -|0x0002 |AC Apparent Measurement | -|0x0004 |Phase A Measurement | -|0x0008 |Phase B Measurement | -|0x0010 |Phase C Measurement | -|0x0020 |DC Measurement | -|0x0040 |Harmonics Measurement | -|0x0080 |Power Quality Measurement | - -#### ACFrequency Attribute -The ACFrequency attribute represents the most recent AC Frequency reading in Hertz (Hz). -If the frequency cannot be measured, a value of 0xFFFF is returned. - -#### TotalActivePower Attribute -Active power represents the current demand of active power delivered or received at the -premises, in kW. Positive values indicate power delivered to the premises where negative -values indicate power received from the premises. In case if device is capable of measuring -multi elements or phases then this will be net active power value. - -#### TotalReactivePower Attribute -Reactive power represents the current demand of reactive power delivered or -received at the premises, in kVAr. Positive values indicate power delivered to -the premises where negative values indicate power received from the premises. In -case if device is capable of measuring multi elements or phases then this will be net reactive -power value. - -#### TotalApparentPower Attribute -Represents the current demand of apparent power, in kVA. In case if device is capable of -measuring multi elements or phases then this will be net apparent power value. - -#### RMSVoltage Attribute -Represents the most recent RMS voltage reading in Volts (V). If the RMS voltage cannot be -measured, a value of 0xFFFF is returned. - -#### RMSCurrent Attribute -Represents the most recent RMS current reading in Amps (A). If the power cannot be measured, -a value of 0xFFFF is returned. - -#### ActivePower Attribute -Represents the single phase or Phase A, current demand of active power delivered or received at -the premises, in Watts (W). Positive values indicate power delivered to the premises where negative -values indicate power received from the premises. - -#### ACCurrentMultiplier Attribute -Provides a value to be multiplied against the InstantaneousCurrent and RMSCurrentattributes. -his attribute must be used in conjunction with the ACCurrentDivisorattribute. 0x0000 is an invalid value for this attribute. - -#### ACCurrentDivisor Attribute -Provides a value to be divided against the ACCurrent, InstantaneousCurrent and -RMSCurrentattributes. This attribute must be used in conjunction with the ACCurrentMultiplierattribute -0x0000 is an invalid value for this attribute. - -#### ACPowerMultiplier Attribute -Provides a value to be multiplied against the InstantaneousPower and ActivePowerattributes. -This attribute must be used in conjunction with the ACPowerDivisorattribute. 0x0000 is an invalid -value for this attribute - -#### ACPowerDivisor Attribute -Provides a value to be divided against the InstantaneousPower and ActivePowerattributes. -This attribute must be used in conjunction with the ACPowerMultiplierattribute. 0x0000 is an -invalid value for this attribute. - -### Received -### Generated - -## Diagnostics [0x0B05] - -### Attributes - -|Id |Name |Type |Access |Implement |Reporting | -|-------|---------------------------------|---------------------------|-----------|----------|----------| -|0x0100 |MacRxBcast |Unsigned 32-bit Integer |Read only |Mandatory | | -|0x0101 |MacTxBcast |Unsigned 32-bit Integer |Read only |Mandatory | | -|0x0102 |MacRxUcast |Unsigned 32-bit Integer |Read only |Mandatory | | -|0x0103 |MacTxUcast |Unsigned 32-bit Integer |Read only |Mandatory | | -|0x0104 |MacTxUcastRetry |Unsigned 16-bit Integer |Read only |Mandatory | | -|0x0105 |MacTxUcastFail |Unsigned 16-bit Integer |Read only |Mandatory | | -|0x0106 |APSRxBcast |Unsigned 16-bit Integer |Read only |Mandatory | | -|0x0107 |APSTxBcast |Unsigned 16-bit Integer |Read only |Mandatory | | -|0x0108 |APSRxUcast |Unsigned 16-bit Integer |Read only |Mandatory | | -|0x0109 |APSTxUcastSuccess |Unsigned 16-bit Integer |Read only |Mandatory | | -|0x010A |APSTxUcastRetry |Unsigned 16-bit Integer |Read only |Mandatory | | -|0x010B |APSTxUcastFail |Unsigned 16-bit Integer |Read only |Mandatory | | -|0x010C |RouteDiscInitiated |Unsigned 16-bit Integer |Read only |Mandatory | | -|0x010D |NeighborAdded |Unsigned 16-bit Integer |Read only |Mandatory | | -|0x010E |NeighborRemoved |Unsigned 16-bit Integer |Read only |Mandatory | | -|0x010F |NeighborStale |Unsigned 16-bit Integer |Read only |Mandatory | | -|0x0110 |JoinIndication |Unsigned 16-bit Integer |Read only |Mandatory | | -|0x0111 |ChildMoved |Unsigned 16-bit Integer |Read only |Mandatory | | -|0x0112 |NWKFCFailure |Unsigned 16-bit Integer |Read only |Mandatory | | -|0x0113 |APSFCFailure |Unsigned 16-bit Integer |Read only |Mandatory | | -|0x0114 |APSUnauthorizedKey |Unsigned 16-bit Integer |Read only |Mandatory | | -|0x0115 |NWKDecryptFailures |Unsigned 16-bit Integer |Read only |Mandatory | | -|0x0116 |APSDecryptFailures |Unsigned 16-bit Integer |Read only |Mandatory | | -|0x0117 |PacketBufferAllocateFailures |Unsigned 16-bit Integer |Read only |Mandatory | | -|0x0118 |RelayedUcast |Unsigned 16-bit Integer |Read only |Mandatory | | -|0x0119 |PhytoMACqueuelimitreached |Unsigned 16-bit Integer |Read only |Mandatory | | -|0x011A |PacketValidatedropcount |Unsigned 16-bit Integer |Read only |Mandatory | | -|0x011B |AverageMACRetryPerAPSMessageSent |Unsigned 16-bit Integer |Read only |Mandatory | | -|0x011C |LastMessageLQI |Unsigned 8-bit Integer |Read only |Mandatory | | -|0x011D |LastMessageRSSI |Signed 8-bit Integer |Read only |Mandatory | | - -### Received -### Generated diff --git a/com.zsmartsystems.zigbee.autocode/src/main/resources/zdp_definition.md b/com.zsmartsystems.zigbee.autocode/src/main/resources/zdp_definition.md deleted file mode 100644 index 442704bd9..000000000 --- a/com.zsmartsystems.zigbee.autocode/src/main/resources/zdp_definition.md +++ /dev/null @@ -1,1201 +0,0 @@ -# ZigBee Device Profile [0x0000] - -ZigBee Device Profile commands - -# General - -## General [0x0000] - -### Received - -#### Network Address Request [0x0000] - -The NWK_addr_req is generated from a Local Device wishing to inquire as to the -16-bit address of the Remote Device based on its known IEEE address. The -destination addressing on this command shall be unicast or broadcast to all -devices for which macRxOnWhenIdle = TRUE. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|IEEEAddr |IEEE Address | -|RequestType |Unsigned 8-bit integer | -|StartIndex |Unsigned 8-bit integer | - -##### RequestType -Request type for this command: -0x00 – Single device response -0x01 – Extended response -0x02-0xFF – reserved - -##### Expected Response -Packet: Network Address Response -Match: IEEEAddr == IEEEAddrRemoteDev - - -#### IEEE Address Request [0x0001] - -The IEEE_addr_req is generated from a Local Device wishing to inquire as to the -64-bit IEEE address of the Remote Device based on their known 16-bit address. -The destination addressing on this command shall be unicast. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|NWKAddrOfInterest |NWK address | -|RequestType |Unsigned 8-bit integer | -|StartIndex |Unsigned 8-bit integer | - -##### Expected Response -Packet: IEEE Address Response -Match: NWKAddrOfInterest == NWKAddrRemoteDev - -#### Node Descriptor Request [0x0002] - -The Node_Desc_req command is generated from a local device wishing to inquire -as to the node descriptor of a remote device. This command shall be unicast either -to the remote device itself or to an alternative device that contains the discovery -information of the remote device. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|NWKAddrOfInterest |NWK address | - -##### Expected Response -Packet: Node Descriptor Response -Match: NWKAddrOfInterest == NWKAddrOfInterest - - -#### Power Descriptor Request [0x0003] - -The Power_Desc_req command is generated from a local device wishing to -inquire as to the power descriptor of a remote device. This command shall be -unicast either to the remote device itself or to an alternative device that contains -the discovery information of the remote device. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|NWKAddrOfInterest |NWK address | - -##### Expected Response -Packet: Power Descriptor Response -Match: NWKAddrOfInterest == NWKAddrOfInterest - - -#### Simple Descriptor Request [0x0004] - -The Simple_Desc_req command is generated from a local device wishing to -inquire as to the simple descriptor of a remote device on a specified endpoint. This -command shall be unicast either to the remote device itself or to an alternative -device that contains the discovery information of the remote device. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|NWKAddrOfInterest |NWK address | -|Endpoint |Unsigned 8-bit integer | - -##### Expected Response -Packet: Simple Descriptor Response -Match: NWKAddrOfInterest == NWKAddrOfInterest -Match: Endpoint == SimpleDescriptor.Endpoint - -#### Active Endpoints Request [0x0005] - -The Active_EP_req command is generated from a local device wishing to acquire -the list of endpoints on a remote device with simple descriptors. This command -shall be unicast either to the remote device itself or to an alternative device that -contains the discovery information of the remote device. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|NWKAddrOfInterest |NWK address | - -##### Expected Response -Packet: Active Endpoints Response -Match: NWKAddrOfInterest == NWKAddrOfInterest - - -#### Match Descriptor Request [0x0006] - -The Match_Desc_req command is generated from a local device wishing to find -remote devices supporting a specific simple descriptor match criterion. This -command shall either be broadcast to all devices for which macRxOnWhenIdle = -TRUE, or unicast. If the command is unicast, it shall be directed either to the -remote device itself or to an alternative device that contains the discovery -information of the remote device. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|NWKAddrOfInterest |NWK address | -|ProfileID |Unsigned 16-bit integer | -|InClusterCount |Unsigned 8-bit integer | -|InClusterList |ClusterId[InClusterCount] | -|OutClusterCount |Unsigned 8-bit integer | -|OutClusterList |ClusterId[OutClusterCount] | - - -#### Complex Descriptor Request [0x0010] - -The Complex_Desc_req command is generated from a local device wishing to -inquire as to the complex descriptor of a remote device. This command shall be -unicast either to the remote device itself or to an alternative device that contains -the discovery information of the remote device. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|NWKAddrOfInterest |NWK address | - -##### Expected Response -Packet: Complex Descriptor Response -Match: NWKAddrOfInterest == NWKAddrOfInterest - - -#### User Descriptor Request [0x0011] - -The User_Desc_req command is generated from a local device wishing to inquire -as to the user descriptor of a remote device. This command shall be unicast either -to the remote device itself or to an alternative device that contains the discovery -information of the remote device. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|NWKAddrOfInterest |NWK address | - -##### Expected Response -Packet: User Descriptor Response -Match: NWKAddrOfInterest == NWKAddrOfInterest - - -#### Discovery Cache Request [0x0012] - -The Discovery_Cache_req is provided to enable devices on the network to locate -a Primary Discovery Cache device on the network. The destination addressing on -this primitive shall be broadcast to all devices for which macRxOnWhenIdle = -TRUE. - -#### Device Announce [0x0013] - -The Device_annce is provided to enable ZigBee devices on the network to notify -other ZigBee devices that the device has joined or re-joined the network, -identifying the device's 64-bit IEEE address and new 16-bit NWK address, and -informing the Remote Devices of the capability of the ZigBee device. This -command shall be invoked for all ZigBee end devices upon join or rejoin. This -command may also be invoked by ZigBee routers upon join or rejoin as part of -NWK address conflict resolution. The destination addressing on this primitive is -broadcast to all devices for which macRxOnWhenIdle = TRUE. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|NWKAddrOfInterest |NWK address | -|IEEEAddr |IEEE Address | -|Capability |Bitmap 8-bit | - - -#### User Descriptor Set Request [0x0014] - -The User_Desc_set command is generated from a local device wishing to -configure the user descriptor on a remote device. This command shall be unicast -either to the remote device itself or to an alternative device that contains the -discovery information of the remote device. - -The local device shall generate the User_Desc_set command using the format -illustrated in Table 2.55. The NWKAddrOfInterest field shall contain the network -address of the remote device for which the user descriptor is to be configured and -the UserDescription field shall contain the ASCII character string that is to be -configured in the user descriptor. Characters with ASCII codes numbered 0x00 -through 0x1f are not permitted to be included in this string. - -#### System Server Discovery Request [0x0015] - -The System_Server_Discovery_req is generated from a Local Device wishing to -discover the location of a particular system server or servers as indicated by the -ServerMask parameter. The destination addressing on this request is "broadcast to -all devices for which macRxOnWhenIdle = TRUE". - -#### Discovery Store Request Request [0x0016] - -The Discovery_store_req is provided to enable ZigBee end devices on the -network to request storage of their discovery cache information on a Primary -Discovery Cache device. Included in the request is the amount of storage space -the Local Device requires. - -#### Node Descriptor Store Request [0x0017] - -The Node_Desc_store_req is provided to enable ZigBee end devices on the -network to request storage of their Node Descriptor on a Primary Discovery -Cache device which has previously received a SUCCESS status from a -Discovery_store_req to the same Primary Discovery Cache device. Included in -this request is the Node Descriptor the Local Device wishes to cache. - -#### Power Descriptor Store Request [0x0018] - -The Power_Desc_store_req is provided to enable ZigBee end devices on the -network to request storage of their Power Descriptor on a Primary Discovery -Cache device which has previously received a SUCCESS status from a -Discovery_store_req to the same Primary Discovery Cache device. Included in -this request is the Power Descriptor the Local Device wishes to cache. - -#### Active Endpoint Store Request [0x0019] - -The Active_EP_store_req is provided to enable ZigBee end devices on the -network to request storage of their list of Active Endpoints on a Primary -Discovery Cache device which has previously received a SUCCESS status from a -Discovery_store_req to the same Primary Discovery Cache device. Included in -this request is the count of Active Endpoints the Local Device wishes to cache and -the endpoint list itself. - -#### Simple Descriptor Store [0x001A] - -The Simple_desc_store_req is provided to enable ZigBee end devices on the -network to request storage of their list of Simple Descriptors on a Primary -Discovery Cache device which has previously received a SUCCESS status from a -Discovery_store_req to the same Primary Discovery Cache device. Note that each -Simple Descriptor for every active endpoint on the Local Device must be -individually uploaded to the Primary Discovery Cache device via this command -to enable cached discovery. Included in this request is the length of the Simple -Descriptor the Local Device wishes to cache and the Simple Descriptor itself. The -endpoint is a field within the Simple Descriptor and is accessed by the Remote -Device to manage the discovery cache information for the Local Device. - -#### Remove Node Cache Request [0x001B] - -The Remove_node_cache_req is provided to enable ZigBee devices on the -network to request removal of discovery cache information for a specified ZigBee -end device from a Primary Discovery Cache device. The effect of a successful -Remove_node_cache_req is to undo a previously successful Discovery_store_req -and additionally remove any cache information stored on behalf of the specified -ZigBee end device on the Primary Discovery Cache device. - -#### Find Node Cache Request [0x001C] - -The Find_node_cache_req is provided to enable ZigBee devices on the network to -broadcast to all devices for which macRxOnWhenIdle = TRUE a request to find a -device on the network that holds discovery information for the device of interest, -as specified in the request parameters. The effect of a successful -Find_node_cache_req is to have the Primary Discovery Cache device, holding -discovery information for the device of interest, unicast a Find_node_cache_rsp -back to the Local Device. Note that, like the NWK_addr_req, only the device -meeting this criteria shall respond to the request generated by -Find_node_cache_req. - -#### Extended Simple Descriptor Request [0x001D] - -The Extended_Simple_Desc_req command is generated from a local device -wishing to inquire as to the simple descriptor of a remote device on a specified -endpoint. This command shall be unicast either to the remote device itself or to an -alternative device that contains the discovery information of the remote device. -The Extended_Simple_Desc_req is intended for use with devices which employ a -larger number of application input or output clusters than can be described by the -Simple_Desc_req. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|NWKAddrOfInterest |NWK address | -|Endpoint |Unsigned 8-bit integer | -|StartIndex |Unsigned 8-bit integer | - -#### Extended Active Endpoint Request [0x001E] - -The Extended_Active_EP_req command is generated from a local device wishing -to acquire the list of endpoints on a remote device with simple descriptors. This -command shall be unicast either to the remote device itself or to an alternative -device that contains the discovery information of the remote device. The -Extended_Active_EP_req is used for devices which support more active -endpoints than can be returned by a single Active_EP_req. - -The NWKAddrOfInterest field shall contain the network address of the remote device for -which the active endpoint list is required. The StartIndex field shall be set in the -request to enable retrieval of lists of active endpoints from devices whose list exceeds -the size of a single ASDU and where fragmentation is not supported. - -#### End Device Bind Request [0x0020] - -The End_Device_Bind_req is generated from a Local Device wishing to perform -End Device Bind with a Remote Device. The End_Device_Bind_req is generated, -typically based on some user action like a button press. The destination addressing -on this command shall be unicast, and the destination address shall be that of the -ZigBee Coordinator. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|BindingTarget |NWK Address | -|SrcAddress |IEEE address | -|SrcEndpoint |Unsigned 8-bit integer | -|ProfileID |Unsigned 16-bit integer | -|InClusterCount |Unsigned 8-bit integer | -|InClusterList |ClusterId[InClusterCount] | -|OutClusterCount |Unsigned 8-bit integer | -|OutClusterList |ClusterId[OutClusterCount] | - - -#### Bind Request [0x0021] - -The Bind_req is generated from a Local Device wishing to create a Binding Table -entry for the source and destination addresses contained as parameters. The -destination addressing on this command shall be unicast only, and the destination -address shall be that of a Primary binding table cache or to the SrcAddress itself. -The Binding Manager is optionally supported on the source device (unless that -device is also the ZigBee Coordinator) so that device shall issue a -NOT_SUPPORTED status to the Bind_req if not supported. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|SrcAddress |IEEE address | -|SrcEndpoint |Unsigned 8-bit integer | -|BindCluster |Unsigned 16-bit integer | -|DstAddrMode |Unsigned 8-bit integer | -|DstAddress |IEEE address | -|DstEndpoint |Unsigned 8-bit integer | - -##### SrcAddress -The IEEE address for the source. - -##### SrcEndpoint -The source endpoint for the binding entry. - -##### BindCluster -The identifier of the cluster on the source device that is bound to the destination. - -##### DstAddrMode -The addressing mode for the destination address used in this command. This field -can take one of the non-reserved values from the following list: -0x00 = reserved -0x01 = 16-bit group address for DstAddress and DstEndp not present -0x02 = reserved -0x03 = 64-bit extended address for DstAddress and DstEndp present -0x04 – 0xff = reserved - -##### DstAddress -The destination address for the binding entry. - -##### DstEndpoint -This field shall be present only if the DstAddrMode field has a value of 0x03 and, -if present, shall be the destination endpoint for the binding entry. - -##### Expected Response -Packet: Bind Response - - -#### Unbind Request [0x0022] - -The Unbind_req is generated from a Local Device wishing to remove a Binding -Table entry for the source and destination addresses contained as parameters. The -destination addressing on this command shall be unicast only and the destination -address must be that of the a Primary binding table cache or the SrcAddress. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|SrcAddress |IEEE address | -|SrcEndpoint |Unsigned 8-bit integer | -|BindCluster |Unsigned 16-bit integer | -|DstAddrMode |Unsigned 8-bit integer | -|DstAddress |IEEE address | -|DstEndpoint |Unsigned 8-bit integer | - -##### SrcAddress -The IEEE address for the source. - -##### SrcEndpoint -The source endpoint for the binding entry. - -##### BindCluster -The identifier of the cluster on the source device that is bound to the destination. - -##### DstAddrMode -The addressing mode for the destination address used in this command. This field -can take one of the non-reserved values from the following list: -0x00 = reserved -0x01 = 16-bit group address for DstAddress and DstEndp not present -0x02 = reserved -0x03 = 64-bit extended address for DstAddress and DstEndp present -0x04 – 0xff = reserved - -##### DstAddress -The destination address for the binding entry. - -##### DstEndpoint -This field shall be present only if the DstAddrMode field has a value of 0x03 and, -if present, shall be the destination endpoint for the binding entry. - -##### Expected Response -Packet: Unbind Response - -#### Bind Register [0x0023] - -The Bind_Register_req is generated from a Local Device and sent to a primary -binding table cache device to register that the local device wishes to hold its own -binding table entries. The destination addressing mode for this request is unicast. - -#### Replace Device Request [0x0024] - -The Replace_Device_req is intended for use by a special device such as a -Commissioning tool and is sent to a primary binding table cache device to change -all binding table entries which match OldAddress and OldEndpoint as specified. -Note that OldEndpoint = 0 has special meaning and signifies that only the address -needs to be matched. The endpoint in the binding table will not be changed in this -case and so NewEndpoint is ignored. The processing changes all binding table -entries for which the source address is the same as OldAddress and, if -OldEndpoint is non-zero, for which the source endpoint is the same as -OldEndpoint. It shall also change all binding table entries which have the -destination address the same as OldAddress and, if OldEndpoint is non-zero, the -destination endpoint the same as OldEndpoint. The destination addressing mode -for this request is unicast. - -#### Store Backup Bind Entry Request [0x0025] - -The Store_Bkup_Bind_Entry_req is generated from a local primary binding table -cache and sent to a remote backup binding table cache device to request backup -storage of the entry. It will be generated whenever a new binding table entry has -been created by the primary binding table cache. The destination addressing mode -for this request is unicast. - -#### Remove Backup Bind Table Request [0x0026] - -The Remove_Bkup_Bind_Entry_req is generated from a local primary binding -table cache and sent to a remote backup binding table cache device to request -removal of the entry from backup storage. It will be generated whenever a binding -table entry has been unbound by the primary binding table cache. The destination -addressing mode for this request is unicast. - -#### Backup Bind Table Request [0x0027] - -The Backup_Bind_Table_req is generated from a local primary binding table -cache and sent to the remote backup binding table cache device to request backup -storage of its entire binding table. The destination addressing mode for this -request is unicast. - -#### Recover Bind Table Request [0x0028] - -The Recover_Bind_Table_req is generated from a local primary binding table -cache and sent to a remote backup binding table cache device when it wants a -complete restore of the binding table. The destination addressing mode for this -request is unicast. - -#### Backup Source Bind Request [0x0029] - -The Backup_Source_Bind_req is generated from a local primary binding table -cache and sent to a remote backup binding table cache device to request backup -storage of its entire source table. The destination addressing mode for this request -is unicast. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|SourceTableEntries |Unsigned 16-bit integer | -|StartIndex |Unsigned 16-bit integer | -|SourceTableListCount |Unsigned 16-bit integer | -|SourceTableList |N X IEEE Address | - - -#### Recover Source Bind Request [0x002A] - -The Recover_Source_Bind_req is generated from a local primary binding table -cache and sent to the remote backup binding table cache device when it wants a -complete restore of the source binding table. The destination addressing mode for -this request is unicast. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|StartIndex |Unsigned 8-bit integer | - -#### Management Network Discovery [0x0030] - -The Mgmt_NWK_Disc_req is generated from a Local Device requesting that the -Remote Device execute a Scan to report back networks in the vicinity of the Local -Device. The destination addressing on this command shall be unicast. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|ScanChannels |Bitmap 32-bit | -|ScanDuration |Unsigned 8-bit integer | -|StartIndex |Unsigned 8-bit integer | - -#### Management LQI Request [0x0031] - -The Mgmt_Lqi_req is generated from a Local Device wishing to obtain a -neighbor list for the Remote Device along with associated LQI values to each -neighbor. The destination addressing on this command shall be unicast only and -the destination address must be that of a ZigBee Coordinator or ZigBee Router. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|StartIndex |Unsigned 8-bit integer | - -##### Expected Response -Packet: Management LQI Response -Match: DestinationAddress == SourceAddress - -#### Management Routing Request [0x0032] - -The Mgmt_Rtg_req is generated from a Local Device wishing to retrieve the -contents of the Routing Table from the Remote Device. The destination -addressing on this command shall be unicast only and the destination address -must be that of the ZigBee Router or ZigBee Coordinator. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|StartIndex |Unsigned 8-bit integer | - -##### Expected Response -Packet: Management Routing Response -Match: DestinationAddress == SourceAddress - - -#### Management Bind Request [0x0033] - -The Mgmt_Bind_req is generated from a Local Device wishing to retrieve the -contents of the Binding Table from the Remote Device. The destination -addressing on this command shall be unicast only and the destination address -must be that of a Primary binding table cache or source device holding its own -binding table. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|StartIndex |Unsigned 8-bit integer | - -##### Expected Response -Packet: Management Bind Response - -#### Management Leave Request [0x0034] - -The Mgmt_Leave_req is generated from a Local Device requesting that a Remote -Device leave the network or to request that another device leave the network. The -Mgmt_Leave_req is generated by a management application which directs the -request to a Remote Device where the NLME-LEAVE.request is to be executed -using the parameter supplied by Mgmt_Leave_req. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|DeviceAddress |IEEE Address | -|RemoveChildren_Rejoin |Boolean | - -##### Expected Response -Packet: Management Leave Response -Match: DestinationAddress == SourceAddress - - -#### Management Direct Join Request [0x0035] - -The Mgmt_Direct_Join_req is generated from a Local Device requesting that a -Remote Device permit a device designated by DeviceAddress to join the network -directly. The Mgmt_Direct_Join_req is generated by a management application -which directs the request to a Remote Device where the NLME-DIRECTJOIN.request -is to be executed using the parameter supplied by -Mgmt_Direct_Join_req. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|DeviceAddress |IEEE Address | -|CapabilityInformation |Bitmap 8-bit | - - -#### Management Permit Joining Request [0x0036] - -The Mgmt_Permit_Joining_req is generated from a Local Device requesting that -a remote device or devices allow or disallow association. The -Mgmt_Permit_Joining_req is generated by a management application or -commissioning tool which directs the request to a remote device(s) where the -NLME-PERMIT-JOINING.request is executed using the PermitDuration -parameter supplied by Mgmt_Permit_Joining_req. Additionally, if the remote -device is the Trust Center and TC_Significance is set to 1, the Trust Center -authentication policy will be affected. The addressing may be unicast or -"broadcast to all routers and coordinator". - -|Field Name |Data Type | -|---------------------------|---------------------------| -|PermitDuration |Unsigned 8-bit integer | -|TC_Significance |Boolean | - -##### Expected Response -Packet: Management Permit Joining Response - -#### Cache Request [0x0037] - -The Mgmt_Cache_req is provided to enable ZigBee devices on the network to -retrieve a list of ZigBee End Devices registered with a Primary Discovery Cache -device. The destination addressing on this primitive shall be unicast. - -#### Network Update Request [0x0038] - -This command is provided to allow updating of network configuration parameters -or to request information from devices on network conditions in the local -operating environment. The destination addressing on this primitive shall be -unicast or broadcast to all devices for which macRxOnWhenIdle = TRUE. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|ScanChannels |Bitmap 32-bit | -|ScanDuration |Unsigned 8-bit integer | -|ScanCount |Unsigned 8-bit integer | -|nwkUpdateId |Unsigned 8-bit integer | -|nwkManagerAddr |NWK Address | - - -#### Network Address Response [0x8000] - -The NWK_addr_rsp is generated by a Remote Device in response to a -NWK_addr_req command inquiring as to the NWK address of the Remote Device -or the NWK address of an address held in a local discovery cache. The -destination addressing on this command is unicast. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |Zdo Status | -|IEEEAddrRemoteDev |IEEE Address | -|NWKAddrRemoteDev |NWK address | -|NumAssocDev |Unsigned 8-bit integer | -|StartIndex |Unsigned 8-bit integer | -|NWKAddrAssocDevList |NWK Address[NumAssocDev] | - - -#### IEEE Address Response [0x8001] - -The IEEE_addr_rsp is generated by a Remote Device in response to an -IEEE_addr_req command inquiring as to the 64-bit IEEE address of the Remote -Device or the 64-bit IEEE address of an address held in a local discovery cache. -The destination addressing on this command shall be unicast. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |Zdo Status | -|IEEEAddrRemoteDev |IEEE Address | -|NWKAddrRemoteDev |NWK address | -|NumAssocDev[0] |Unsigned 8-bit integer | -|StartIndex |Unsigned 8-bit integer | -|NWKAddrAssocDevList |NWK Address[NumAssocDev] | - - -#### Node Descriptor Response [0x8002] - -The Node_Desc_rsp is generated by a remote device in response to a -Node_Desc_req directed to the remote device. This command shall be unicast to -the originator of the Node_Desc_req command. - -The NWKAddrOfInterest field shall match that specified in the original -Node_Desc_req command. If the NWKAddrOfInterest field matches the network -address of the remote device, it shall set the Status field to -SUCCESS and include its node descriptor in the NodeDescriptor field. - -If the NWKAddrOfInterest field does not match the network address of the -remote device and it is an end device, it shall set the Status field to -INV_REQUESTTYPE and not include the NodeDescriptor field. If the -NWKAddrOfInterest field does not match the network address of the remote -device and it is the coordinator or a router, it shall determine whether the -NWKAddrOfInterest field matches the network address of one of its children. If -the NWKAddrOfInterest field does not match the network address of one of the -children of the remote device, it shall set the Status field to -DEVICE_NOT_FOUND and not include the NodeDescriptor field. If the -NWKAddrOfInterest matches the network address of one of the children of the -remote device, it shall determine whether a node descriptor for that device is -available. If a node descriptor is not available for the child indicated by the -NWKAddrOfInterest field, the remote device shall set the Status field to -NO_DESCRIPTOR and not include the NodeDescriptor field. If a node descriptor -is available for the child indicated by the NWKAddrOfInterest field, the remote -device shall set the Status field to SUCCESS and include the node descriptor of -the matching child device in the NodeDescriptor field. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |Zdo Status | -|NWKAddrOfInterest |NWK address | -|NodeDescriptor |Node Descriptor | - -#### Power Descriptor Response [0x8003] - -The Power_Desc_rsp is generated by a remote device in response to a -Power_Desc_req directed to the remote device. This command shall be unicast to -the originator of the Power_Desc_req command. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |Zdo Status | -|NWKAddrOfInterest |NWK address | -|PowerDescriptor |Power Descriptor | - -#### Simple Descriptor Response [0x8004] - -The Simple_Desc_rsp is generated by a remote device in response to a -Simple_Desc_req directed to the remote device. This command shall be unicast to -the originator of the Simple_Desc_req command. - -|Field Name |Data Type | -|-------------------------------|---------------------------| -|Status |Zdo Status | -|NWKAddrOfInterest |NWK address | -|Length |Unsigned 8-bit integer | -|SimpleDescriptor |Simple Descriptor | - - -#### Active Endpoints Response [0x8005] - -The Active_EP_rsp is generated by a remote device in response to an -Active_EP_req directed to the remote device. This command shall be unicast to -the originator of the Active_EP_req command. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |Zdo Status | -|NWKAddrOfInterest |NWK address | -|ActiveEPCnt |Unsigned 8-bit integer | -|ActiveEPList |Endpoint[ActiveEPCnt] | - - -#### Match Descriptor Response [0x8006] - -The Match_Desc_rsp is generated by a remote device in response to a -Match_Desc_req either broadcast or directed to the remote device. This command -shall be unicast to the originator of the Match_Desc_req command. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |Zdo Status | -|NWKAddrOfInterest |NWK address | -|MatchLength |Unsigned 8-bit integer | -|MatchList |Endpoint[MatchLength] | - - -#### Complex Descriptor Response [0x8010] - -The Complex_Desc_rsp is generated by a remote device in response to a -Complex_Desc_req directed to the remote device. This command shall be unicast -to the originator of the Complex_Desc_req command. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |Zdo Status | -|NWKAddrOfInterest |NWK address | -|Length |Unsigned 8-bit integer | -|ComplexDescriptor |Complex Descriptor | - - -#### User Descriptor Response [0x8011] - -The User_Desc_rsp is generated by a remote device in response to a -User_Desc_req directed to the remote device. This command shall be unicast to -the originator of the User_Desc_req command. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |Zdo Status | -|NWKAddrOfInterest |NWK address | -|Length |Unsigned 8-bit integer | -|UserDescriptor |User Descriptor | - -#### Discovery Cache Response [0x8012] - -The Discovery_Cache_rsp is generated by Primary Discovery Cache devices -receiving the Discovery_Cache_req. Remote Devices which are not Primary -Discovery Cache devices (as designated in its Node Descriptor) should not -respond to the Discovery_Cache_req command. - -#### User Descriptor Conf [0x8014] - -The User_Desc_conf is generated by a remote device in response to a -User_Desc_set directed to the remote device. This command shall be unicast to -the originator of the User_Desc_set command. - - -#### Discovery Store Response [0x8016] - -The Discovery_store_rsp is provided to notify a Local Device of the request status -from a Primary Discovery Cache device. Included in the response is a status code -to notify the Local Device whether the request is successful (the Primary Cache -Device has space to store the discovery cache data for the Local Device), whether -the request is unsupported (meaning the Remote Device is not a Primary -Discovery Cache device), or insufficient space exists. - -#### Node Descriptor Store Response [0x8017] - -The Node_store_rsp is provided to notify a Local Device of the request status -from a Primary Discovery Cache device. Included in the response is a status code -to notify the Local Device whether the request is successful (the Primary Cache -Device has space to store the discovery cache data for the Local Device), whether -the request is not supported (meaning the Remote Device is not a Primary -Discovery Cache device), or insufficient space exists. - -#### Power Descriptor Store Response [0x8018] - -The Power_Desc_store_rsp is provided to notify a Local Device of the request -status from a Primary Discovery Cache device. Included in the response is a status -code to notify the Local Device whether the request is successful (the Primary -Cache Device has space to store the discovery cache data for the Local Device), -whether the request is not supported (meaning the Remote Device is not a Primary -Discovery Cache device), or insufficient space exists. - -#### Active Endpoint Store Response [0x8019] - -The Active_EP_store_rsp is provided to notify a Local Device of the request -status from a Primary Discovery Cache device. Included in the response is a status -code to notify the Local Device whether the request is successful (the Primary -Cache Device has space to store the discovery cache data for the Local Device), -the request is not supported (meaning the Remote Device is not a Primary -Discovery Cache device), or insufficient space exists. - -#### Simple Descriptor Store Response [0x801a] - -The Simple_Desc_store_rsp is provided to notify a Local Device of the request -status from a Primary Discovery Cache device. Included in the response is a status -code to notify the Local Device whether the request is successful (the Primary -Cache Device has space to store the discovery cache data for the Local Device), -the request is not supported (meaning the Remote Device is not a Primary -Discovery Cache device), or insufficient space exists. - -#### Remove Node Cache [0x801b] - -The Remove_node_cache_rsp is provided to notify a Local Device of the request -status from a Primary Discovery Cache device. Included in the response is a status -code to notify the Local Device whether the request is successful (the Primary -Cache Device has removed the discovery cache data for the indicated device of -interest), or the request is not supported (meaning the Remote Device is not a -Primary Discovery Cache device). - -#### Find Node Cache Response [0x801C] - -The Find_node_cache_rsp is provided to notify a Local Device of the successful -discovery of the Primary Discovery Cache device for the given NWKAddr and -IEEEAddr fields supplied in the request, or to signify that the device of interest is -capable of responding to discovery requests. The Find_node_cache_rsp shall be -generated only by Primary Discovery Cache devices holding discovery -information for the NWKAddr and IEEEAddr in the request or the device of -interest itself and all other Remote Devices shall not supply a response. - -#### Extended Simple Descriptor Response [0x801D] - -The Extended_Simple_Desc_rsp is generated by a remote device in response to an -Extended_Simple_Desc_req directed to the remote device. This command shall -be unicast to the originator of the Extended_Simple_Desc_req command. - -#### Extended Active Endpoint Response [0x801E] - -The Extended_Active_EP_rsp is generated by a remote device in response to an -Extended_Active_EP_req directed to the remote device. This command shall be -unicast to the originator of the Extended_Active_EP_req command. - -#### End Device Bind Response [0x8020] - -The End_Device_Bind_rsp is generated by the ZigBee Coordinator in response to -an End_Device_Bind_req and contains the status of the request. This command -shall be unicast to each device involved in the bind attempt, using the -acknowledged data service. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |Zdo Status | - - -#### Bind Response [0x8021] - -The Bind_rsp is generated in response to a Bind_req. If the Bind_req is processed -and the Binding Table entry committed on the Remote Device, a Status of -SUCCESS is returned. If the Remote Device is not a Primary binding table cache -or the SrcAddress, a Status of NOT_SUPPORTED is returned. The supplied -endpoint shall be checked to determine whether it falls within the specified range. -If it does not, a Status of INVALID_EP shall be returned. If the Remote Device is -the Primary binding table cache or SrcAddress but does not have Binding Table -resources for the request, a Status of TABLE_FULL is returned. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |Zdo Status | - -#### Unbind Response [0x8022] - -The Unbind_rsp is generated in response to an Unbind_req. If the Unbind_req is -processed and the corresponding Binding Table entry is removed from the Remote -Device, a Status of SUCCESS is returned. If the Remote Device is not the ZigBee -Coordinator or the SrcAddress, a Status of NOT_SUPPORTED is returned. The -supplied endpoint shall be checked to determine whether it falls within the -specified range. If it does not, a Status of INVALID_EP shall be returned If the -Remote Device is the ZigBee Coordinator or SrcAddress but does not have a -Binding Table entry corresponding to the parameters received in the request, a -Status of NO_ENTRY is returned. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |Zdo Status | - - -#### Bind Register Response [0x8023] - -The Bind_Register_rsp is generated from a primary binding table cache device in -response to a Bind_Register_req and contains the status of the request. This -command shall be unicast to the requesting device. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |Zdo Status | -|BindingTableEntries |Unsigned 16-bit integer | -|BindingTableListCount |Unsigned 16-bit integer | -|BindingTableList |N x Binding Table[BindingTableListCount] | - -#### Replace Device Response [0x8024] - -The Replace_Device_rsp is generated from a primary binding table cache device -in response to a Replace_Device_req and contains the status of the request. This -command shall be unicast to the requesting device. If the device receiving the -Replace_Device_req is not a primary binding table cache, a Status of -NOT_SUPPORTED is returned. The primary binding table cache shall search its -binding table for entries whose source address and source endpoint, or whose -destination address and destination endpoint match OldAddress and OldEndpoint, -as described in the text for Replace_Device_req. It shall change these entries to -have NewAddress and possibly NewEndpoint. It shall then return a response of -SUCCESS. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |Zdo Status | - -#### Store Backup Bind Entry Response [0x8025] - -The Store_Bkup_Bind_Entry_rsp is generated from a backup binding table cache -device in response to a Store_Bkup_Bind_Entry_req from a primary binding table -cache, and contains the status of the request. This command shall be unicast to the -requesting device. If the remote device is not a backup binding table cache, it shall -return a status of NOT_SUPPORTED. If the originator of the request is not -recognized as a primary binding table cache, it shall return a status of -INV_REQUESTTYPE. Otherwise, the backup binding table cache shall add the -binding entry to its binding table and return a status of SUCCESS. If there is no -room, it shall return a status of TABLE_FULL. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |Zdo Status | - -#### Remove Backup Bind Entry Response [0x8026] - -The Remove_Bkup_Bind_Entry_rsp is generated from a backup binding table -cache device in response to a Remove_Bkup_Bind_Entry_req from the primary -binding table cache and contains the status of the request. This command shall be -unicast to the requesting device. If the remote device is not a backup binding table -cache, it shall return a status of NOT_SUPPORTED. If the originator of the -request is not recognized as a primary binding table cache, it shall return a status -of INV_REQUESTTYPE. Otherwise, the backup binding table cache shall delete -the binding entry from its binding table and return a status of SUCCESS. If the -entry is not found, it shall return a status of NO_ENTRY. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |Zdo Status | -|EntryCount |Unsigned 16-bit integer | - -#### Backup Bind Table Response [0x8027] - -The Backup_Bind_Table_rsp is generated from a backup binding table cache -device in response to a Backup_Bind_Table_req from a primary binding table -cache and contains the status of the request. This command shall be unicast to the -requesting device. If the remote device is not a backup binding table cache, it shall -return a status of NOT_SUPPORTED. If the originator of the request is not -recognized as a primary binding table cache, it shall return a status of -INV_REQUESTTYPE. Otherwise, the backup binding table cache shall -overwrite the binding entries in its binding table starting with StartIndex and -continuing for BindingTableListCount entries. If this exceeds its table size, it shall -fill in as many entries as possible and return a status of TABLE_FULL and the -EntryCount parameter will be the number of entries in the table. Otherwise, it -shall return a status of SUCCESS and EntryCount will be equal to StartIndex + -BindingTableListCount from Backup_Bind_Table_req. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |Zdo Status | - -#### Recover Bind Table Response [0x8028] - -The Recover_Bind_Table_rsp is generated from a backup binding table cache -device in response to a Recover_Bind_Table_req from a primary binding table -cache and contains the status of the request. This command shall be unicast to the -requesting device. If the responding device is not a backup binding table cache, it -shall return a status of NOT_SUPPORTED. If the originator of the request is not -recognized as a primary binding table cache it shall return a status of -INV_REQUESTTYPE. Otherwise, the backup binding table cache shall prepare a -list of binding table entries from its backup beginning with StartIndex. It will fit in -as many entries as possible into a Recover_Bind_Table_rsp command and return a -status of SUCCESS. If StartIndex is more than the number of entries in the -Binding table, a status of NO_ENTRY is returned. For a successful response, -BindingTableEntries is the total number of entries in the backup binding table, and -BindingTableListCount is the number of entries which is being returned in the -response. - -#### Backup Source Bind Response [0x8029] - -The Backup_Source_Bind_rsp is generated from a backup binding table cache -device in response to a Backup_Source_Bind_req from a primary binding table -cache and contains the status of the request. This command shall be unicast to the -requesting device. If the remote device is not a backup binding table cache, it shall -return a status of NOT_SUPPORTED. If the originator of the request is not -recognized as a primary binding table cache, it shall return a status of -INV_REQUESTTYPE. Otherwise, the backup binding table cache shall -overwrite its backup source binding table starting with StartIndex and continuing -for BindingTableListCount entries. If this exceeds its table size, it shall return a -status of TABLE_FULL. Otherwise it shall return a status of SUCCESS. - -#### Recover Source Bind Response [0x8029] - -The Recover_Source_Bind_rsp is generated from a backup binding table cache -device in response to a Recover_Source_Bind_req from a primary binding table -cache and contains the status of the request. This command shall be unicast to the -requesting device. If the responding device is not a backup binding table cache, it -shall return a status of NOT_SUPPORTED. If the originator of the request is not -recognized as a primary binding table cache, it shall return a status of -INV_REQUESTTYPE. Otherwise, the backup binding table cache shall prepare a -list of binding table entries from its backup beginning with StartIndex. It will fit in -as many entries as possible into a Recover_Source_Bind_rsp command and return -a status of SUCCESS. If StartIndex is more than the number of entries in the -Source table, a status of NO_ENTRY is returned. For a successful response, -SourceTableEntries is the total number of entries in the backup source table, and -SourceTableListCount is the number of entries which is being returned in the -response. - -#### Management Network Discovery Response [0x8030] - -The Mgmt_NWK_Disc_rsp is generated in response to an -Mgmt_NWK_Disc_req. If this management command is not supported, a status -of NOT_SUPPORTED shall be returned and all parameter fields after the Status -field shall be omitted. Otherwise, the Remote Device shall implement the -following process. - -Upon receipt of and after support for the Mgmt_NWK_Disc_req has been -verified, the Remote Device shall issue an NLME-NETWORKDISCOVERY.request -primitive using the ScanChannels and ScanDuration -parameters, supplied in the Mgmt_NWK_Disc_req command. Upon receipt of the -NLME-NETWORK-DISCOVERY.confirm primitive, the Remote Device shall -report the results, starting with the StartIndex element, via the -Mgmt_NWK_Disc_rsp command. The NetworkList field shall contain whole -NetworkList records, until the limit on -MSDU size, i.e., aMaxMACFrameSize, is reached. The number of -results reported shall be set in the NetworkListCount. - -#### Management LQI Response [0x8031] - -The Mgmt_Lqi_rsp is generated in response to an Mgmt_Lqi_req. If this -management command is not supported, a status of NOT_SUPPORTED shall be -returned and all parameter fields after the Status field shall be omitted. Otherwise, -the Remote Device shall implement the following processing. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |Zdo Status | -|NeighborTableEntries |Unsigned 8-bit integer | -|StartIndex |Unsigned 8-bit integer | -|NeighborTableListCount |Unsigned 8-bit integer | -|NeighborTableList |Neighbor Table[NeighborTableListCount]| - - -#### Management Routing Response [0x8032] - -The Mgmt_Rtg_rsp is generated in response to an Mgmt_Rtg_req. If this -management command is not supported, a status of NOT_SUPPORTED shall be -returned and all parameter fields after the Status field shall be omitted. Otherwise, -the Remote Device shall implement the following processing. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |Zdo Status | -|RoutingTableEntries |Unsigned 8-bit integer | -|StartIndex |Unsigned 8-bit integer | -|RoutingTableListCount |Unsigned 8-bit integer | -|RoutingTableList |Routing Table[RoutingTableListCount]| - - -#### Management Bind Response [0x8033] - -The Mgmt_Bind_rsp is generated in response to a Mgmt_Bind_req. If this -management command is not supported, a status of NOT_SUPPORTED shall be -returned and all parameter fields after the Status field shall be omitted. Otherwise, -the Remote Device shall implement the following processing. - -|Field Name |Data Type | -|---------------------------|---------------------------------------| -|Status |Zdo Status | -|BindingTableEntries |Unsigned 8-bit integer | -|StartIndex |Unsigned 8-bit integer | -|BindingTableListCount |Unsigned 8-bit integer | -|BindingTableList |Binding Table[BindingTableListCount] | - -#### Management Leave Response [0x8034] - -The Mgmt_Leave_rsp is generated in response to a Mgmt_Leave_req. If this -management command is not supported, a status of NOT_SUPPORTED shall be -returned. Otherwise, the Remote Device shall implement the following -processing. - -Upon receipt of and after support for the Mgmt_Leave_req has been verified, the -Remote Device shall execute the NLME-LEAVE.request to disassociate from the -currently associated network. The Mgmt_Leave_rsp shall contain the same status -that was contained in the NLME-LEAVE.confirm primitive. - -Once a device has disassociated, it may execute pre-programmed logic to perform -NLME-NETWORK-DISCOVERY and NLME-JOIN to join/re-join a network. - - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |Zdo Status | - -#### Management Direct Join Response [0x8035] - -The Mgmt_Direct_Join_rsp is generated in response to a Mgmt_Direct_Join_req. -If this management command is not supported, a status of NOT_SUPPORTED -shall be returned. Otherwise, the Remote Device shall implement the following -processing. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |Zdo Status | - -#### Management Permit Joining Response [0x8036] - -The Mgmt_Permit_Joining_rsp is generated in response to a unicast -Mgmt_Permit_Joining_req. In the description which follows, note that no -response shall be sent if the Mgmt_Permit_Joining_req was received as a -broadcast to all routers. If this management command is not permitted by the -requesting device, a status of INVALID_REQUEST shall be returned. Upon -receipt and after support for Mgmt_Permit_Joining_req has been verified, the -Remote Device shall execute the NLME-PERMIT-JOINING.request. The -Mgmt_Permit-Joining_rsp shall contain the same status that was contained in the -NLME-PERMIT-JOINING.confirm primitive. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |Zdo Status | - - -#### Management Cache Response [0x8037] - -The Mgmt_Cache_rsp is generated in response to an Mgmt_Cache_req. If this -management command is not supported, or the Remote Device is not a Primary -Cache Device, a status of NOT_SUPPORTED shall be returned and all parameter -fields after the Status field shall be omitted. Otherwise, the Remote Device shall -implement the following processing. Upon receipt of the Mgmt_Cache_req and -after support for the Mgmt_Cache_req has been verified, the Remote Device shall -access an internally maintained list of registered ZigBee End Devices utilizing the -discovery cache on this Primary Discovery Cache device. The entries reported -shall be those, starting with StartIndex and including whole DiscoveryCacheList -records until the limit on MSDU size, i.e., aMaxMACFrameSize, is reached. Within -the Mgmt_Cache_rsp command, the -DiscoveryCacheListEntries field shall represent the total number of registered -entries in the Remote Device. The parameter DiscoveryCacheListCount shall be -the number of entries reported in the DiscoveryCacheList field of the -Mgmt_Cache_rsp command. - -#### Management Network Update Notify [0x8038] - -The Mgmt_NWK_Update_notify is provided to enable ZigBee devices to report -the condition on local channels to a network manager. The scanned channel list is -the report of channels scanned and it is followed by a list of records, one for each -channel scanned, each record including one byte of the energy level measured -during the scan, or 0xff if there is too much interference on this channel. - -When sent in response to a Mgmt_NWK_Update_req command the status field -shall represent the status of the request. When sent unsolicited the status field -shall be set to SUCCESS. -A Status of NOT_SUPPORTED indicates that the request was directed to a device -which was not the ZigBee Coordinator or that the ZigBee Coordinator does not -support End Device Binding. Otherwise, End_Device_Bind_req processing is -performed as described below, including transmission of the -End_Device_Bind_rsp. - -|Field Name |Data Type | -|---------------------------|---------------------------| -|Status |Zdo Status | -|ScannedChannels |Unsigned 32-bit integer | -|TotalTransmissions |Unsigned 16-bit integer | -|TransmissionFailures |Unsigned 16-bit integer | -|ScannedChannelsListCount |Unsigned 8-bit integer | -|EnergyValues |Unsigned 8-bit integer[ScannedChannelsListCount] | diff --git a/com.zsmartsystems.zigbee.autocode/src/main/resources/zll_definition.md b/com.zsmartsystems.zigbee.autocode/src/main/resources/zll_definition.md deleted file mode 100644 index 56661212e..000000000 --- a/com.zsmartsystems.zigbee.autocode/src/main/resources/zll_definition.md +++ /dev/null @@ -1,7 +0,0 @@ -# ZigBee Light Link [0xC05E] - -# Commissioning - -## Touchlink [0x1000] -### Received -### Generated diff --git a/com.zsmartsystems.zigbee.autocode/src/main/resources/zse_definition.md b/com.zsmartsystems.zigbee.autocode/src/main/resources/zse_definition.md deleted file mode 100644 index 4df1bfb3b..000000000 --- a/com.zsmartsystems.zigbee.autocode/src/main/resources/zse_definition.md +++ /dev/null @@ -1,2 +0,0 @@ -# ZigBee Smart Energy [0x0109] - diff --git a/com.zsmartsystems.zigbee.console/src/main/java/com/zsmartsystems/zigbee/console/ZigBeeConsoleLinkKeyCommand.java b/com.zsmartsystems.zigbee.console/src/main/java/com/zsmartsystems/zigbee/console/ZigBeeConsoleLinkKeyCommand.java index 3bf82d915..5061aade3 100644 --- a/com.zsmartsystems.zigbee.console/src/main/java/com/zsmartsystems/zigbee/console/ZigBeeConsoleLinkKeyCommand.java +++ b/com.zsmartsystems.zigbee.console/src/main/java/com/zsmartsystems/zigbee/console/ZigBeeConsoleLinkKeyCommand.java @@ -51,7 +51,7 @@ public void process(ZigBeeNetworkManager networkManager, String[] args, PrintStr ZigBeeKey key; if (args.length == 2) { key = new ZigBeeKey(args[1]); - } else if (args.length == 3 && args[1].equalsIgnoreCase("mmo")) { + } else if (args[1].equalsIgnoreCase("mmo")) { MmoHash hash; try { hash = new MmoHash(args[2]); diff --git a/com.zsmartsystems.zigbee.dongle.cc2531/src/main/java/com/zsmartsystems/zigbee/dongle/cc2531/zigbee/util/ByteUtils.java b/com.zsmartsystems.zigbee.dongle.cc2531/src/main/java/com/zsmartsystems/zigbee/dongle/cc2531/zigbee/util/ByteUtils.java index ddecc9456..5fd5b0c5c 100644 --- a/com.zsmartsystems.zigbee.dongle.cc2531/src/main/java/com/zsmartsystems/zigbee/dongle/cc2531/zigbee/util/ByteUtils.java +++ b/com.zsmartsystems.zigbee.dongle.cc2531/src/main/java/com/zsmartsystems/zigbee/dongle/cc2531/zigbee/util/ByteUtils.java @@ -196,10 +196,8 @@ public static String toBase16(int b) { return Integer.toHexString(b).substring(6).toUpperCase(); } else if (b < 0x10) { return "0" + Integer.toHexString(b).toUpperCase(); - } else if (b >= 0x10) { - return Integer.toHexString(b).toUpperCase(); } else { - throw new IllegalArgumentException("Unable to recognize the value " + b); + return Integer.toHexString(b).toUpperCase(); } } diff --git a/com.zsmartsystems.zigbee.dongle.ember.autocode/src/main/java/com/zsmartsystems/zigbee/dongle/ember/autocode/ClassGenerator.java b/com.zsmartsystems.zigbee.dongle.ember.autocode/src/main/java/com/zsmartsystems/zigbee/dongle/ember/autocode/ClassGenerator.java index edd08a969..53e2f3fd7 100644 --- a/com.zsmartsystems.zigbee.dongle.ember.autocode/src/main/java/com/zsmartsystems/zigbee/dongle/ember/autocode/ClassGenerator.java +++ b/com.zsmartsystems.zigbee.dongle.ember.autocode/src/main/java/com/zsmartsystems/zigbee/dongle/ember/autocode/ClassGenerator.java @@ -210,7 +210,7 @@ protected void outputWithLinebreak(PrintWriter out, String indent, String line) len += word.length(); } - if (len != 0) { + if (len != 2) { out.println(); } } diff --git a/com.zsmartsystems.zigbee.dongle.ember/src/main/java/com/zsmartsystems/zigbee/dongle/ember/ZigBeeDongleEzsp.java b/com.zsmartsystems.zigbee.dongle.ember/src/main/java/com/zsmartsystems/zigbee/dongle/ember/ZigBeeDongleEzsp.java index 40bf5aeb5..235565b95 100644 --- a/com.zsmartsystems.zigbee.dongle.ember/src/main/java/com/zsmartsystems/zigbee/dongle/ember/ZigBeeDongleEzsp.java +++ b/com.zsmartsystems.zigbee.dongle.ember/src/main/java/com/zsmartsystems/zigbee/dongle/ember/ZigBeeDongleEzsp.java @@ -542,7 +542,7 @@ public void sendCommand(final ZigBeeApsFrame apsFrame) { transaction = new EzspSingleResponseTransaction(emberMulticast, EzspSendMulticastResponse.class); } else { - logger.debug("EZSP message not sent: {}, {}", apsFrame); + logger.debug("EZSP message not sent: {}", apsFrame); // ZigBeeGroupAddress groupAddress = (ZigBeeGroupAddress) zclCommand.getDestinationAddress(); // apsFrame.setGroupId(groupAddress.getGroupId()); return; @@ -566,7 +566,7 @@ public void run() { } else if (transaction.getResponse() instanceof EzspSendMulticastResponse) { status = ((EzspSendMulticastResponse) transaction.getResponse()).getStatus(); } else { - logger.debug("Unable to get response from {} :: ", transaction.getRequest(), + logger.debug("Unable to get response from {} :: {}", transaction.getRequest(), transaction.getResponse()); return; } diff --git a/com.zsmartsystems.zigbee.dongle.ember/src/main/java/com/zsmartsystems/zigbee/dongle/ember/internal/EmberFirmwareUpdateHandler.java b/com.zsmartsystems.zigbee.dongle.ember/src/main/java/com/zsmartsystems/zigbee/dongle/ember/internal/EmberFirmwareUpdateHandler.java index 3c72e2539..9d8d4530a 100644 --- a/com.zsmartsystems.zigbee.dongle.ember/src/main/java/com/zsmartsystems/zigbee/dongle/ember/internal/EmberFirmwareUpdateHandler.java +++ b/com.zsmartsystems.zigbee.dongle.ember/src/main/java/com/zsmartsystems/zigbee/dongle/ember/internal/EmberFirmwareUpdateHandler.java @@ -224,15 +224,11 @@ private boolean getBlPrompt() { } } - if (retryCount >= MENU_MAX_RETRIES) { - logger.debug("Ember bootloader: Unable to get bootloader prompt."); - transferComplete(ZigBeeTransportFirmwareStatus.FIRMWARE_UPDATE_FAILED); - return false; - } - retryCount++; } + logger.debug("Ember bootloader: Unable to get bootloader prompt."); + transferComplete(ZigBeeTransportFirmwareStatus.FIRMWARE_UPDATE_FAILED); return false; } diff --git a/com.zsmartsystems.zigbee.dongle.telegesis.autocode/src/main/java/com/zsmartsystems/zigbee/dongle/telegesis/autocode/ClassGenerator.java b/com.zsmartsystems.zigbee.dongle.telegesis.autocode/src/main/java/com/zsmartsystems/zigbee/dongle/telegesis/autocode/ClassGenerator.java index 58677366b..a872b9ee9 100644 --- a/com.zsmartsystems.zigbee.dongle.telegesis.autocode/src/main/java/com/zsmartsystems/zigbee/dongle/telegesis/autocode/ClassGenerator.java +++ b/com.zsmartsystems.zigbee.dongle.telegesis.autocode/src/main/java/com/zsmartsystems/zigbee/dongle/telegesis/autocode/ClassGenerator.java @@ -170,7 +170,7 @@ protected void outputWithLinebreak(PrintWriter out, String indent, String line) len += word.length(); } - if (len != 0) { + if (len != 2) { out.println(); } } diff --git a/com.zsmartsystems.zigbee.dongle.telegesis/src/main/java/com/zsmartsystems/zigbee/dongle/telegesis/internal/TelegesisFirmwareUpdateHandler.java b/com.zsmartsystems.zigbee.dongle.telegesis/src/main/java/com/zsmartsystems/zigbee/dongle/telegesis/internal/TelegesisFirmwareUpdateHandler.java index 2da3e61db..ad2c8450d 100644 --- a/com.zsmartsystems.zigbee.dongle.telegesis/src/main/java/com/zsmartsystems/zigbee/dongle/telegesis/internal/TelegesisFirmwareUpdateHandler.java +++ b/com.zsmartsystems.zigbee.dongle.telegesis/src/main/java/com/zsmartsystems/zigbee/dongle/telegesis/internal/TelegesisFirmwareUpdateHandler.java @@ -214,15 +214,11 @@ private boolean getBlPrompt() { } } - if (retryCount >= MENU_MAX_RETRIES) { - logger.debug("Telegesis bootloader: Unable to get bootloader prompt."); - transferComplete(ZigBeeTransportFirmwareStatus.FIRMWARE_UPDATE_FAILED); - return false; - } - retryCount++; } + logger.debug("Telegesis bootloader: Unable to get bootloader prompt."); + transferComplete(ZigBeeTransportFirmwareStatus.FIRMWARE_UPDATE_FAILED); return false; } diff --git a/com.zsmartsystems.zigbee.dongle.xbee.autocode/src/main/java/com/zsmartsystems/zigbee/dongle/xbee/autocode/ClassGenerator.java b/com.zsmartsystems.zigbee.dongle.xbee.autocode/src/main/java/com/zsmartsystems/zigbee/dongle/xbee/autocode/ClassGenerator.java index c615c92f7..8ba0e3f52 100644 --- a/com.zsmartsystems.zigbee.dongle.xbee.autocode/src/main/java/com/zsmartsystems/zigbee/dongle/xbee/autocode/ClassGenerator.java +++ b/com.zsmartsystems.zigbee.dongle.xbee.autocode/src/main/java/com/zsmartsystems/zigbee/dongle/xbee/autocode/ClassGenerator.java @@ -170,7 +170,7 @@ protected void outputWithLinebreak(PrintWriter out, String indent, String line) len += word.length(); } - if (len != 0) { + if (len != 2) { out.println(); } } diff --git a/com.zsmartsystems.zigbee.dongle.xbee/src/main/java/com/zsmartsystems/zigbee/dongle/xbee/ZigBeeDongleXBee.java b/com.zsmartsystems.zigbee.dongle.xbee/src/main/java/com/zsmartsystems/zigbee/dongle/xbee/ZigBeeDongleXBee.java index bc5ab53c5..14f2ec3ca 100644 --- a/com.zsmartsystems.zigbee.dongle.xbee/src/main/java/com/zsmartsystems/zigbee/dongle/xbee/ZigBeeDongleXBee.java +++ b/com.zsmartsystems.zigbee.dongle.xbee/src/main/java/com/zsmartsystems/zigbee/dongle/xbee/ZigBeeDongleXBee.java @@ -188,7 +188,7 @@ public ZigBeeStatus initialize() { XBeeIeeeAddressLowResponse ieeeLowResponse = (XBeeIeeeAddressLowResponse) frameHandler .sendRequest(ieeeLowCommand); - if (ieeeHighResponse == null || ieeeLowCommand == null) { + if (ieeeHighResponse == null || ieeeLowResponse == null) { logger.error("Unable to get XBee IEEE address"); return ZigBeeStatus.BAD_RESPONSE; } diff --git a/com.zsmartsystems.zigbee/pom.xml b/com.zsmartsystems.zigbee/pom.xml index 59399910b..c27f9c07c 100644 --- a/com.zsmartsystems.zigbee/pom.xml +++ b/com.zsmartsystems.zigbee/pom.xml @@ -10,6 +10,7 @@ com.zsmartsystems zigbee 1.1.10-SNAPSHOT + .. @@ -26,6 +27,24 @@ + + ${project.groupId} + com.zsmartsystems.zigbee.autocode + ${project.version} + + + generate-sources + + generate-zcl + + + + + src/main/xml/zdo + src/main/xml/zcl + src/main/xml/zigbee_constants.xml + + diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/ZigBeeDeviceType.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/ZigBeeDeviceType.java deleted file mode 100644 index e810fa796..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/ZigBeeDeviceType.java +++ /dev/null @@ -1,313 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee; - -import java.util.HashMap; -import java.util.Map; - -import javax.annotation.Generated; - -/** - * ZigBee Device Type value enumeration. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-08-29T17:17:08Z") -public enum ZigBeeDeviceType { - - /** - * On/Off Switch - */ - ON_OFF_SWITCH(0x0000), - - /** - * Level Control Switch - */ - LEVEL_CONTROL_SWITCH(0x0001), - - /** - * On/Off Output - */ - ON_OFF_OUTPUT(0x0002), - - /** - * Level Controllable Output - */ - LEVEL_CONTROLLABLE_OUTPUT(0x0003), - - /** - * Scene Selector - */ - SCENE_SELECTOR(0x0004), - - /** - * Configuration Tool - */ - CONFIGURATION_TOOL(0x0005), - - /** - * Remote Control - */ - REMOTE_CONTROL(0x0006), - - /** - * Combined Interface - */ - COMBINED_INTERFACE(0x0007), - - /** - * Range Extender - */ - RANGE_EXTENDER(0x0008), - - /** - * Mains Power Outlet - */ - MAINS_POWER_OUTLET(0x0009), - - /** - * Door Lock - */ - DOOR_LOCK(0x000A), - - /** - * Door Lock Controller - */ - DOOR_LOCK_CONTROLLER(0x000B), - - /** - * Simple Sensor - */ - SIMPLE_SENSOR(0x000C), - - /** - * Consumption Awareness Device - */ - CONSUMPTION_AWARENESS_DEVICE(0x000D), - - /** - * Home Gateway - */ - HOME_GATEWAY(0x0050), - - /** - * Smart Plug - */ - SMART_PLUG(0x0051), - - /** - * White Goods - */ - WHITE_GOODS(0x0052), - - /** - * Meter Interface - */ - METER_INTERFACE(0x0053), - - /** - * On/Off Light - */ - ON_OFF_LIGHT(0x0100), - - /** - * Dimmable Light - */ - DIMMABLE_LIGHT(0x0101), - - /** - * Color Dimmable Light - */ - COLOR_DIMMABLE_LIGHT(0x0102), - - /** - * On/Off Light Switch - */ - ON_OFF_LIGHT_SWITCH(0x0103), - - /** - * Dimmer Switch - */ - DIMMER_SWITCH(0x0104), - - /** - * Color Dimmer Switch - */ - COLOR_DIMMER_SWITCH(0x0105), - - /** - * Light Sensor - */ - LIGHT_SENSOR(0x0106), - - /** - * Occupancy Sensor - */ - OCCUPANCY_SENSOR(0x0107), - - /** - * Shade - */ - SHADE(0x0200), - - /** - * Shade Controller - */ - SHADE_CONTROLLER(0x0201), - - /** - * Window Covering Device - */ - WINDOW_COVERING_DEVICE(0x0202), - - /** - * Window Covering Controller - */ - WINDOW_COVERING_CONTROLLER(0x0203), - - /** - * Extended Color Light - */ - EXTENDED_COLOR_LIGHT(0x0210), - - /** - * Color Temperature Light - */ - COLOR_TEMPERATURE_LIGHT(0x0220), - - /** - * Heating/Cooling Unit - */ - HEATING_COOLING_UNIT(0x0300), - - /** - * Thermostat - */ - THERMOSTAT(0x0301), - - /** - * Temperature Sensor - */ - TEMPERATURE_SENSOR(0x0302), - - /** - * Pump - */ - PUMP(0x0303), - - /** - * Pump Controller - */ - PUMP_CONTROLLER(0x0304), - - /** - * Pressure Sensor - */ - PRESSURE_SENSOR(0x0305), - - /** - * Flow Sensor - */ - FLOW_SENSOR(0x0306), - - /** - * Mini Split AC - */ - MINI_SPLIT_AC(0x0307), - - /** - * IAS Control and Indicating Equipment - */ - IAS_CONTROL_AND_INDICATING_EQUIPMENT(0x0400), - - /** - * IAS Ancillary Control Equipment - */ - IAS_ANCILLARY_CONTROL_EQUIPMENT(0x0401), - - /** - * IAS Zone - */ - IAS_ZONE(0x0402), - - /** - * IAS Warning Device - */ - IAS_WARNING_DEVICE(0x0403), - - /** - * Energy Service Interface - */ - ENERGY_SERVICE_INTERFACE(0x0500), - - /** - * Metering Device - */ - METERING_DEVICE(0x0501), - - /** - * In-Home Display - */ - IN_HOME_DISPLAY(0x0502), - - /** - * Programmable Communicating Thermostat - */ - PROGRAMMABLE_COMMUNICATING_THERMOSTAT(0x0503), - - /** - * Load Control Device - */ - LOAD_CONTROL_DEVICE(0x0504), - - /** - * Smart Appliance - */ - SMART_APPLIANCE(0x0505), - - /** - * Prepayment Terminal - */ - PREPAYMENT_TERMINAL(0x0506), - - /** - * Physical Device - */ - PHYSICAL_DEVICE(0x0507), - - /** - * Remote Communications Device - */ - REMOTE_COMMUNICATIONS_DEVICE(0x0508); - - /** - * A mapping between the integer code and its corresponding ZigBeeDeviceType type to facilitate lookup by value. - */ - private static Map idMap; - - static { - idMap = new HashMap(); - for (ZigBeeDeviceType enumValue : values()) { - idMap.put(enumValue.key, enumValue); - } - } - - private final int key; - - private ZigBeeDeviceType(final int key) { - this.key = key; - } - - public int getKey() { - return key; - } - - public static ZigBeeDeviceType getByValue(final int value) { - return idMap.get(value); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/ZigBeeProfileType.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/ZigBeeProfileType.java deleted file mode 100644 index 888ddd79f..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/ZigBeeProfileType.java +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee; -import java.util.HashMap; -import java.util.Map; - -import javax.annotation.Generated; - - -/** - * ZigBee Profile Type value enumeration. - *

    - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-08-29T17:17:08Z") -public enum ZigBeeProfileType { - - /** - * ZigBee Home Automation - */ - ZIGBEE_HOME_AUTOMATION(0x0104), - - /** - * ZigBee Smart Energy - */ - ZIGBEE_SMART_ENERGY(0x0109), - - /** - * ZigBee Green Power - */ - ZIGBEE_GREEN_POWER(0xA10E), - - /** - * Manufacturer Telegesis - */ - MANUFACTURER_TELEGESIS(0xC059), - - /** - * ZigBee Light Link - */ - ZIGBEE_LIGHT_LINK(0xC05E), - - /** - * Manufacturer Digi - */ - MANUFACTURER_DIGI(0xC105); - - /** - * A mapping between the integer code and its corresponding ZigBeeProfileType type to facilitate lookup by value. - */ - private static Map idMap; - - static { - idMap = new HashMap(); - for (ZigBeeProfileType enumValue : values()) { - idMap.put(enumValue.key, enumValue); - } - } - - private final int key; - - private ZigBeeProfileType(final int key) { - this.key = key; - } - - public int getKey() { - return key; - } - - public static ZigBeeProfileType getByValue(final int value) { - return idMap.get(value); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/ZigBeeStackType.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/ZigBeeStackType.java deleted file mode 100644 index 25e024bfc..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/ZigBeeStackType.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee; -import java.util.HashMap; -import java.util.Map; - -import javax.annotation.Generated; - - -/** - * ZigBee Stack Type value enumeration. - *

    - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-08-29T17:17:08Z") -public enum ZigBeeStackType { - - /** - * ZigBee 2006 - */ - ZIGBEE_2006(0x0000), - - /** - * ZigBee 2007 - */ - ZIGBEE_2007(0x0001), - - /** - * ZigBee Pro - */ - ZIGBEE_PRO(0x0002), - - /** - * ZigBee IP - */ - ZIGBEE_IP(0x0003); - - /** - * A mapping between the integer code and its corresponding ZigBeeStackType type to facilitate lookup by value. - */ - private static Map idMap; - - static { - idMap = new HashMap(); - for (ZigBeeStackType enumValue : values()) { - idMap.put(enumValue.key, enumValue); - } - } - - private final int key; - - private ZigBeeStackType(final int key) { - this.key = key; - } - - public int getKey() { - return key; - } - - public static ZigBeeStackType getByValue(final int value) { - return idMap.get(value); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/app/iasclient/ZclIasZoneClient.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/app/iasclient/ZclIasZoneClient.java index 5f9304196..d683bbc23 100644 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/app/iasclient/ZclIasZoneClient.java +++ b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/app/iasclient/ZclIasZoneClient.java @@ -16,7 +16,7 @@ import com.zsmartsystems.zigbee.app.ZigBeeApplication; import com.zsmartsystems.zigbee.zcl.ZclCluster; import com.zsmartsystems.zigbee.zcl.clusters.ZclIasZoneCluster; -import com.zsmartsystems.zigbee.zcl.clusters.iaszone.EnrollResponseCodeEnum; +import com.zsmartsystems.zigbee.zcl.clusters.iaszone.IasEnrollResponseCodeEnum; import com.zsmartsystems.zigbee.zcl.clusters.iaszone.ZoneEnrollRequestCommand; import com.zsmartsystems.zigbee.zcl.clusters.iaszone.ZoneEnrollResponse; import com.zsmartsystems.zigbee.zcl.clusters.iaszone.ZoneStateEnum; @@ -166,14 +166,14 @@ private void initialise() { currentState); } - IeeeAddress currentIeeeAddress = iasZoneCluster.getIascieAddress(0); + IeeeAddress currentIeeeAddress = iasZoneCluster.getIasCieAddress(0); logger.debug("{}: IAS CIE address is currently {}", iasZoneCluster.getZigBeeAddress(), currentIeeeAddress); if (!ieeeAddress.equals(currentIeeeAddress)) { // Set the CIE address in the remote device. This is where the device will send its reports. - iasZoneCluster.setIascieAddress(ieeeAddress); + iasZoneCluster.setIasCieAddress(ieeeAddress); - currentIeeeAddress = iasZoneCluster.getIascieAddress(0); + currentIeeeAddress = iasZoneCluster.getIasCieAddress(0); logger.debug("{}: IAS CIE address is confirmed {}", iasZoneCluster.getZigBeeAddress(), currentIeeeAddress); } @@ -211,7 +211,7 @@ public int getClusterId() { */ private void handleZoneEnrollRequestCommand(ZoneEnrollRequestCommand command) { zoneType = command.getZoneType(); - iasZoneCluster.zoneEnrollResponse(EnrollResponseCodeEnum.SUCCESS.getKey(), zone); + iasZoneCluster.zoneEnrollResponse(IasEnrollResponseCodeEnum.SUCCESS.getKey(), zone); } @Override diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/serialization/ZigBeeSerializable.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/serialization/ZigBeeSerializable.java new file mode 100644 index 000000000..09fd6ba4f --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/serialization/ZigBeeSerializable.java @@ -0,0 +1,33 @@ +/** + * Copyright (c) 2016-2019 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.serialization; + +import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; +import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; + +/** + * + * @author Chris Jackson + * + */ +public interface ZigBeeSerializable { + /** + * Serialization method + * + * @param serializer the {@link ZclFieldSerializer} + */ + public void serialize(final ZclFieldSerializer serializer); + + /** + * Deserialization method + * + * @param deserializer the {@link ZclFieldDeserializer} + */ + public void deserialize(final ZclFieldDeserializer deserializer); + +} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/ZclFieldDeserializer.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/ZclFieldDeserializer.java index eca7f1bdf..d84f4ae14 100644 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/ZclFieldDeserializer.java +++ b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/ZclFieldDeserializer.java @@ -68,7 +68,7 @@ public Object deserialize(final ZclDataType dataType) { try { item = (ZclListItemField) dataTypeClass.newInstance(); } catch (final Exception e) { - throw new IllegalArgumentException("Error deserializing field: " + dataType.getLabel(), e); + throw new IllegalArgumentException("Error deserializing field: " + dataType.toString(), e); } item.deserialize(this.deserializer); list.add(item); diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclAlarmsCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclAlarmsCluster.java deleted file mode 100644 index 48ed47492..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclAlarmsCluster.java +++ /dev/null @@ -1,266 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.CommandResult; -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.clusters.alarms.AlarmCommand; -import com.zsmartsystems.zigbee.zcl.clusters.alarms.GetAlarmCommand; -import com.zsmartsystems.zigbee.zcl.clusters.alarms.GetAlarmResponse; -import com.zsmartsystems.zigbee.zcl.clusters.alarms.ResetAlarmCommand; -import com.zsmartsystems.zigbee.zcl.clusters.alarms.ResetAlarmLogCommand; -import com.zsmartsystems.zigbee.zcl.clusters.alarms.ResetAllAlarmsCommand; -import com.zsmartsystems.zigbee.zcl.protocol.ZclClusterType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Future; -import javax.annotation.Generated; - -/** - * Alarms cluster implementation (Cluster ID 0x0009). - *

    - * Attributes and commands for sending alarm notifications and configuring alarm - * functionality. - *

    - * Alarm conditions and their respective alarm codes are described in individual - * clusters, along with an alarm mask field. Where not masked, alarm notifications - * are reported to subscribed targets using binding. - *

    - * Where an alarm table is implemented, all alarms, masked or otherwise, are - * recorded and may be retrieved on demand. - *

    - * Alarms may either reset automatically when the conditions that cause are no - * longer active, or may need to be explicitly reset. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclAlarmsCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0009; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Alarms"; - - // Attribute constants - /** - * The AlarmCount attribute is 16-bits in length and specifies the number of entries - * currently in the alarm table. This attribute shall be specified in the range 0x00 to - * the maximum defined in the profile using this cluster. - *

    - * If alarm logging is not implemented this attribute shall always take the value - * 0x00. - */ - public static final int ATTR_ALARMCOUNT = 0x0000; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(1); - - attributeMap.put(ATTR_ALARMCOUNT, new ZclAttribute(ZclClusterType.ALARMS, ATTR_ALARMCOUNT, "AlarmCount", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, false)); - - return attributeMap; - } - - /** - * Default constructor to create a Alarms cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclAlarmsCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } - - /** - * Get the AlarmCount attribute [attribute ID 0]. - *

    - * The AlarmCount attribute is 16-bits in length and specifies the number of entries - * currently in the alarm table. This attribute shall be specified in the range 0x00 to - * the maximum defined in the profile using this cluster. - *

    - * If alarm logging is not implemented this attribute shall always take the value - * 0x00. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getAlarmCountAsync() { - return read(attributes.get(ATTR_ALARMCOUNT)); - } - - /** - * Synchronously get the AlarmCount attribute [attribute ID 0]. - *

    - * The AlarmCount attribute is 16-bits in length and specifies the number of entries - * currently in the alarm table. This attribute shall be specified in the range 0x00 to - * the maximum defined in the profile using this cluster. - *

    - * If alarm logging is not implemented this attribute shall always take the value - * 0x00. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getAlarmCount(final long refreshPeriod) { - if (attributes.get(ATTR_ALARMCOUNT).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_ALARMCOUNT).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_ALARMCOUNT)); - } - - /** - * The Reset Alarm Command - * - * @param alarmCode {@link Integer} Alarm code - * @param clusterIdentifier {@link Integer} Cluster identifier - * @return the {@link Future} command result future - */ - public Future resetAlarmCommand(Integer alarmCode, Integer clusterIdentifier) { - ResetAlarmCommand command = new ResetAlarmCommand(); - - // Set the fields - command.setAlarmCode(alarmCode); - command.setClusterIdentifier(clusterIdentifier); - - return send(command); - } - - /** - * The Reset All Alarms Command - * - * @return the {@link Future} command result future - */ - public Future resetAllAlarmsCommand() { - ResetAllAlarmsCommand command = new ResetAllAlarmsCommand(); - - return send(command); - } - - /** - * The Get Alarm Command - * - * @return the {@link Future} command result future - */ - public Future getAlarmCommand() { - GetAlarmCommand command = new GetAlarmCommand(); - - return send(command); - } - - /** - * The Reset Alarm Log Command - * - * @return the {@link Future} command result future - */ - public Future resetAlarmLogCommand() { - ResetAlarmLogCommand command = new ResetAlarmLogCommand(); - - return send(command); - } - - /** - * The Alarm Command - *

    - * The alarm command signals an alarm situation on the sending device. - *
    - * An alarm command is generated when a cluster which has alarm functionality detects an alarm - * condition, e.g., an attribute has taken on a value that is outside a ‘safe’ range. The details - * are given by individual cluster specifications. - * - * @param alarmCode {@link Integer} Alarm code - * @param clusterIdentifier {@link Integer} Cluster identifier - * @return the {@link Future} command result future - */ - public Future alarmCommand(Integer alarmCode, Integer clusterIdentifier) { - AlarmCommand command = new AlarmCommand(); - - // Set the fields - command.setAlarmCode(alarmCode); - command.setClusterIdentifier(clusterIdentifier); - - return send(command); - } - - /** - * The Get Alarm Response - *

    - * If there is at least one alarm record in the alarm table then the status field is set to SUCCESS. - * The alarm code, cluster identifier and time stamp fields SHALL all be present and SHALL take their - * values from the item in the alarm table that they are reporting.If there are no more alarms logged - * in the alarm table then the status field is set to NOT_FOUND and the alarm code, cluster - * identifier and time stamp fields SHALL be omitted. - * - * @param status {@link Integer} Status - * @param alarmCode {@link Integer} Alarm code - * @param clusterIdentifier {@link Integer} Cluster identifier - * @param timestamp {@link Integer} Timestamp - * @return the {@link Future} command result future - */ - public Future getAlarmResponse(Integer status, Integer alarmCode, Integer clusterIdentifier, Integer timestamp) { - GetAlarmResponse command = new GetAlarmResponse(); - - // Set the fields - command.setStatus(status); - command.setAlarmCode(alarmCode); - command.setClusterIdentifier(clusterIdentifier); - command.setTimestamp(timestamp); - - return send(command); - } - - @Override - public ZclCommand getCommandFromId(int commandId) { - switch (commandId) { - case 0: // RESET_ALARM_COMMAND - return new ResetAlarmCommand(); - case 1: // RESET_ALL_ALARMS_COMMAND - return new ResetAllAlarmsCommand(); - case 2: // GET_ALARM_COMMAND - return new GetAlarmCommand(); - case 3: // RESET_ALARM_LOG_COMMAND - return new ResetAlarmLogCommand(); - default: - return null; - } - } - - @Override - public ZclCommand getResponseFromId(int commandId) { - switch (commandId) { - case 0: // ALARM_COMMAND - return new AlarmCommand(); - case 1: // GET_ALARM_RESPONSE - return new GetAlarmResponse(); - default: - return null; - } - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclAnalogInputBaCnetExtendedCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclAnalogInputBaCnetExtendedCluster.java deleted file mode 100644 index 753103f45..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclAnalogInputBaCnetExtendedCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Analog Input (BACnet Extended) cluster implementation (Cluster ID 0x0603). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclAnalogInputBaCnetExtendedCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0603; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Analog Input (BACnet Extended)"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Analog Input (BACnet Extended) cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclAnalogInputBaCnetExtendedCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclAnalogInputBaCnetRegularCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclAnalogInputBaCnetRegularCluster.java deleted file mode 100644 index 8c6d2d579..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclAnalogInputBaCnetRegularCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Analog Input (BACnet Regular) cluster implementation (Cluster ID 0x0602). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclAnalogInputBaCnetRegularCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0602; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Analog Input (BACnet Regular)"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Analog Input (BACnet Regular) cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclAnalogInputBaCnetRegularCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclAnalogInputBasicCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclAnalogInputBasicCluster.java deleted file mode 100644 index 506030e6a..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclAnalogInputBasicCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Analog Input (Basic) cluster implementation (Cluster ID 0x000C). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclAnalogInputBasicCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x000C; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Analog Input (Basic)"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Analog Input (Basic) cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclAnalogInputBasicCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclAnalogOutputBaCnetExtendedCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclAnalogOutputBaCnetExtendedCluster.java deleted file mode 100644 index afb3b6a5e..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclAnalogOutputBaCnetExtendedCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Analog Output (BACnet Extended) cluster implementation (Cluster ID 0x0605). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclAnalogOutputBaCnetExtendedCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0605; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Analog Output (BACnet Extended)"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Analog Output (BACnet Extended) cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclAnalogOutputBaCnetExtendedCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclAnalogOutputBaCnetRegularCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclAnalogOutputBaCnetRegularCluster.java deleted file mode 100644 index 67e64ef05..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclAnalogOutputBaCnetRegularCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Analog Output (BACnet Regular) cluster implementation (Cluster ID 0x0604). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclAnalogOutputBaCnetRegularCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0604; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Analog Output (BACnet Regular)"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Analog Output (BACnet Regular) cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclAnalogOutputBaCnetRegularCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclAnalogOutputBasicCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclAnalogOutputBasicCluster.java deleted file mode 100644 index cab8ec232..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclAnalogOutputBasicCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Analog Output (Basic) cluster implementation (Cluster ID 0x000D). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclAnalogOutputBasicCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x000D; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Analog Output (Basic)"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Analog Output (Basic) cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclAnalogOutputBasicCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclAnalogValueBaCnetExtendedCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclAnalogValueBaCnetExtendedCluster.java deleted file mode 100644 index 0b2910709..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclAnalogValueBaCnetExtendedCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Analog Value (BACnet Extended) cluster implementation (Cluster ID 0x0607). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclAnalogValueBaCnetExtendedCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0607; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Analog Value (BACnet Extended)"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Analog Value (BACnet Extended) cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclAnalogValueBaCnetExtendedCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclAnalogValueBaCnetRegularCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclAnalogValueBaCnetRegularCluster.java deleted file mode 100644 index 1bd999533..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclAnalogValueBaCnetRegularCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Analog Value (BACnet Regular) cluster implementation (Cluster ID 0x0606). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclAnalogValueBaCnetRegularCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0606; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Analog Value (BACnet Regular)"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Analog Value (BACnet Regular) cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclAnalogValueBaCnetRegularCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclAnalogValueBasicCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclAnalogValueBasicCluster.java deleted file mode 100644 index 7d7aa95ae..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclAnalogValueBasicCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Analog Value (Basic) cluster implementation (Cluster ID 0x000E). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclAnalogValueBasicCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x000E; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Analog Value (Basic)"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Analog Value (Basic) cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclAnalogValueBasicCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclApplianceControlCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclApplianceControlCluster.java deleted file mode 100644 index 480ec1f5a..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclApplianceControlCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Appliance Control cluster implementation (Cluster ID 0x001B). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclApplianceControlCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x001B; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Appliance Control"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Appliance Control cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclApplianceControlCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclApplianceEventsAndAlertsCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclApplianceEventsAndAlertsCluster.java deleted file mode 100644 index 53539b7aa..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclApplianceEventsAndAlertsCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Appliance Events and Alerts cluster implementation (Cluster ID 0x0B02). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclApplianceEventsAndAlertsCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0B02; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Appliance Events and Alerts"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Appliance Events and Alerts cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclApplianceEventsAndAlertsCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclApplianceIdentificationCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclApplianceIdentificationCluster.java deleted file mode 100644 index 44916dfb4..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclApplianceIdentificationCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Appliance Identification cluster implementation (Cluster ID 0x0B00). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclApplianceIdentificationCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0B00; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Appliance Identification"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Appliance Identification cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclApplianceIdentificationCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclApplianceStatisticsCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclApplianceStatisticsCluster.java deleted file mode 100644 index c786f80f9..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclApplianceStatisticsCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Appliance Statistics cluster implementation (Cluster ID 0x0B03). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclApplianceStatisticsCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0B03; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Appliance Statistics"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Appliance Statistics cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclApplianceStatisticsCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclBaCnetProtocolTunnelCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclBaCnetProtocolTunnelCluster.java deleted file mode 100644 index 023f56494..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclBaCnetProtocolTunnelCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * BACnet Protocol Tunnel cluster implementation (Cluster ID 0x0601). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclBaCnetProtocolTunnelCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0601; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "BACnet Protocol Tunnel"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a BACnet Protocol Tunnel cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclBaCnetProtocolTunnelCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclBallastConfigurationCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclBallastConfigurationCluster.java deleted file mode 100644 index 779e63eb1..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclBallastConfigurationCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Ballast Configuration cluster implementation (Cluster ID 0x0301). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclBallastConfigurationCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0301; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Ballast Configuration"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Ballast Configuration cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclBallastConfigurationCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclBasicCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclBasicCluster.java deleted file mode 100644 index 1ffca9efb..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclBasicCluster.java +++ /dev/null @@ -1,896 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.CommandResult; -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.clusters.basic.ResetToFactoryDefaultsCommand; -import com.zsmartsystems.zigbee.zcl.protocol.ZclClusterType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Future; -import javax.annotation.Generated; - -/** - * Basic cluster implementation (Cluster ID 0x0000). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclBasicCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0000; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Basic"; - - // Attribute constants - /** - * The ZCLVersion attribute is 8 bits in length and specifies the version number of - * the ZigBee Cluster Library that all clusters on this endpoint conform to. - */ - public static final int ATTR_ZCLVERSION = 0x0000; - /** - * The ApplicationVersion attribute is 8 bits in length and specifies the version - * number of the application software contained in the device. The usage of this - * attribute is manufacturer dependent. - */ - public static final int ATTR_APPLICATIONVERSION = 0x0001; - /** - * The StackVersion attribute is 8 bits in length and specifies the version number - * of the implementation of the ZigBee stack contained in the device. The usage of - * this attribute is manufacturer dependent. - */ - public static final int ATTR_STACKVERSION = 0x0002; - /** - * The HWVersion attribute is 8 bits in length and specifies the version number of - * the hardware of the device. The usage of this attribute is manufacturer dependent. - */ - public static final int ATTR_HWVERSION = 0x0003; - /** - * The ManufacturerName attribute is a maximum of 32 bytes in length and specifies - * the name of the manufacturer as a ZigBee character string. - */ - public static final int ATTR_MANUFACTURERNAME = 0x0004; - /** - * The ModelIdentifier attribute is a maximum of 32 bytes in length and specifies the - * model number (or other identifier) assigned by the manufacturer as a ZigBee character string. - */ - public static final int ATTR_MODELIDENTIFIER = 0x0005; - /** - * The DateCode attribute is a ZigBee character string with a maximum length of 16 bytes. - * The first 8 characters specify the date of manufacturer of the device in international - * date notation according to ISO 8601, i.e. YYYYMMDD, e.g. 20060814. - */ - public static final int ATTR_DATECODE = 0x0006; - /** - * The PowerSource attribute is 8 bits in length and specifies the source(s) of power - * available to the device. Bits b0–b6 of this attribute represent the primary power - * source of the device and bit b7 indicates whether the device has a secondary power - * source in the form of a battery backup. - */ - public static final int ATTR_POWERSOURCE = 0x0007; - /** - * The LocationDescription attribute is a maximum of 16 bytes in length and describes - * the physical location of the device as a ZigBee character string. - */ - public static final int ATTR_LOCATIONDESCRIPTION = 0x0010; - /** - * The PhysicalEnvironment attribute is 8 bits in length and specifies the type of - * physical environment in which the device will operate. - */ - public static final int ATTR_PHYSICALENVIRONMENT = 0x0011; - /** - * The DeviceEnabled attribute is a boolean and specifies whether the device is enabled - * or disabled. - */ - public static final int ATTR_DEVICEENABLED = 0x0012; - /** - * The AlarmMask attribute is 8 bits in length and specifies which of a number of general - * alarms may be generated. - */ - public static final int ATTR_ALARMMASK = 0x0013; - /** - * The DisableLocalConfig attribute allows a number of local device configuration - * functions to be disabled. - *

    - * The intention of this attribute is to allow disabling of any local configuration - * user interface, for example to prevent reset or binding buttons being activated by - * unauthorised persons in a public building. - */ - public static final int ATTR_DISABLELOCALCONFIG = 0x0014; - /** - * The SWBuildIDattribute represents a detailed, manufacturer-specific reference to the version of the software. - */ - public static final int ATTR_SWBUILDID = 0x4000; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(14); - - attributeMap.put(ATTR_ZCLVERSION, new ZclAttribute(ZclClusterType.BASIC, ATTR_ZCLVERSION, "ZCLVersion", ZclDataType.UNSIGNED_8_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_APPLICATIONVERSION, new ZclAttribute(ZclClusterType.BASIC, ATTR_APPLICATIONVERSION, "ApplicationVersion", ZclDataType.UNSIGNED_8_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_STACKVERSION, new ZclAttribute(ZclClusterType.BASIC, ATTR_STACKVERSION, "StackVersion", ZclDataType.UNSIGNED_8_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_HWVERSION, new ZclAttribute(ZclClusterType.BASIC, ATTR_HWVERSION, "HWVersion", ZclDataType.UNSIGNED_8_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_MANUFACTURERNAME, new ZclAttribute(ZclClusterType.BASIC, ATTR_MANUFACTURERNAME, "ManufacturerName", ZclDataType.CHARACTER_STRING, true, true, false, false)); - attributeMap.put(ATTR_MODELIDENTIFIER, new ZclAttribute(ZclClusterType.BASIC, ATTR_MODELIDENTIFIER, "ModelIdentifier", ZclDataType.CHARACTER_STRING, true, true, false, false)); - attributeMap.put(ATTR_DATECODE, new ZclAttribute(ZclClusterType.BASIC, ATTR_DATECODE, "DateCode", ZclDataType.CHARACTER_STRING, true, true, false, false)); - attributeMap.put(ATTR_POWERSOURCE, new ZclAttribute(ZclClusterType.BASIC, ATTR_POWERSOURCE, "PowerSource", ZclDataType.ENUMERATION_8_BIT, true, true, false, false)); - attributeMap.put(ATTR_LOCATIONDESCRIPTION, new ZclAttribute(ZclClusterType.BASIC, ATTR_LOCATIONDESCRIPTION, "LocationDescription", ZclDataType.CHARACTER_STRING, true, true, true, false)); - attributeMap.put(ATTR_PHYSICALENVIRONMENT, new ZclAttribute(ZclClusterType.BASIC, ATTR_PHYSICALENVIRONMENT, "PhysicalEnvironment", ZclDataType.ENUMERATION_8_BIT, true, true, true, false)); - attributeMap.put(ATTR_DEVICEENABLED, new ZclAttribute(ZclClusterType.BASIC, ATTR_DEVICEENABLED, "DeviceEnabled", ZclDataType.BOOLEAN, true, true, true, false)); - attributeMap.put(ATTR_ALARMMASK, new ZclAttribute(ZclClusterType.BASIC, ATTR_ALARMMASK, "AlarmMask", ZclDataType.BITMAP_8_BIT, true, true, true, false)); - attributeMap.put(ATTR_DISABLELOCALCONFIG, new ZclAttribute(ZclClusterType.BASIC, ATTR_DISABLELOCALCONFIG, "DisableLocalConfig", ZclDataType.BITMAP_8_BIT, true, true, true, false)); - attributeMap.put(ATTR_SWBUILDID, new ZclAttribute(ZclClusterType.BASIC, ATTR_SWBUILDID, "SWBuildID", ZclDataType.CHARACTER_STRING, false, true, false, false)); - - return attributeMap; - } - - /** - * Default constructor to create a Basic cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclBasicCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } - - /** - * Get the ZCLVersion attribute [attribute ID 0]. - *

    - * The ZCLVersion attribute is 8 bits in length and specifies the version number of - * the ZigBee Cluster Library that all clusters on this endpoint conform to. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getZclVersionAsync() { - return read(attributes.get(ATTR_ZCLVERSION)); - } - - /** - * Synchronously get the ZCLVersion attribute [attribute ID 0]. - *

    - * The ZCLVersion attribute is 8 bits in length and specifies the version number of - * the ZigBee Cluster Library that all clusters on this endpoint conform to. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getZclVersion(final long refreshPeriod) { - if (attributes.get(ATTR_ZCLVERSION).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_ZCLVERSION).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_ZCLVERSION)); - } - - /** - * Get the ApplicationVersion attribute [attribute ID 1]. - *

    - * The ApplicationVersion attribute is 8 bits in length and specifies the version - * number of the application software contained in the device. The usage of this - * attribute is manufacturer dependent. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getApplicationVersionAsync() { - return read(attributes.get(ATTR_APPLICATIONVERSION)); - } - - /** - * Synchronously get the ApplicationVersion attribute [attribute ID 1]. - *

    - * The ApplicationVersion attribute is 8 bits in length and specifies the version - * number of the application software contained in the device. The usage of this - * attribute is manufacturer dependent. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getApplicationVersion(final long refreshPeriod) { - if (attributes.get(ATTR_APPLICATIONVERSION).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_APPLICATIONVERSION).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_APPLICATIONVERSION)); - } - - /** - * Get the StackVersion attribute [attribute ID 2]. - *

    - * The StackVersion attribute is 8 bits in length and specifies the version number - * of the implementation of the ZigBee stack contained in the device. The usage of - * this attribute is manufacturer dependent. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getStackVersionAsync() { - return read(attributes.get(ATTR_STACKVERSION)); - } - - /** - * Synchronously get the StackVersion attribute [attribute ID 2]. - *

    - * The StackVersion attribute is 8 bits in length and specifies the version number - * of the implementation of the ZigBee stack contained in the device. The usage of - * this attribute is manufacturer dependent. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getStackVersion(final long refreshPeriod) { - if (attributes.get(ATTR_STACKVERSION).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_STACKVERSION).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_STACKVERSION)); - } - - /** - * Get the HWVersion attribute [attribute ID 3]. - *

    - * The HWVersion attribute is 8 bits in length and specifies the version number of - * the hardware of the device. The usage of this attribute is manufacturer dependent. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getHwVersionAsync() { - return read(attributes.get(ATTR_HWVERSION)); - } - - /** - * Synchronously get the HWVersion attribute [attribute ID 3]. - *

    - * The HWVersion attribute is 8 bits in length and specifies the version number of - * the hardware of the device. The usage of this attribute is manufacturer dependent. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getHwVersion(final long refreshPeriod) { - if (attributes.get(ATTR_HWVERSION).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_HWVERSION).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_HWVERSION)); - } - - /** - * Get the ManufacturerName attribute [attribute ID 4]. - *

    - * The ManufacturerName attribute is a maximum of 32 bytes in length and specifies - * the name of the manufacturer as a ZigBee character string. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getManufacturerNameAsync() { - return read(attributes.get(ATTR_MANUFACTURERNAME)); - } - - /** - * Synchronously get the ManufacturerName attribute [attribute ID 4]. - *

    - * The ManufacturerName attribute is a maximum of 32 bytes in length and specifies - * the name of the manufacturer as a ZigBee character string. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link String} attribute value, or null on error - */ - public String getManufacturerName(final long refreshPeriod) { - if (attributes.get(ATTR_MANUFACTURERNAME).isLastValueCurrent(refreshPeriod)) { - return (String) attributes.get(ATTR_MANUFACTURERNAME).getLastValue(); - } - - return (String) readSync(attributes.get(ATTR_MANUFACTURERNAME)); - } - - /** - * Get the ModelIdentifier attribute [attribute ID 5]. - *

    - * The ModelIdentifier attribute is a maximum of 32 bytes in length and specifies the - * model number (or other identifier) assigned by the manufacturer as a ZigBee character string. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getModelIdentifierAsync() { - return read(attributes.get(ATTR_MODELIDENTIFIER)); - } - - /** - * Synchronously get the ModelIdentifier attribute [attribute ID 5]. - *

    - * The ModelIdentifier attribute is a maximum of 32 bytes in length and specifies the - * model number (or other identifier) assigned by the manufacturer as a ZigBee character string. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link String} attribute value, or null on error - */ - public String getModelIdentifier(final long refreshPeriod) { - if (attributes.get(ATTR_MODELIDENTIFIER).isLastValueCurrent(refreshPeriod)) { - return (String) attributes.get(ATTR_MODELIDENTIFIER).getLastValue(); - } - - return (String) readSync(attributes.get(ATTR_MODELIDENTIFIER)); - } - - /** - * Get the DateCode attribute [attribute ID 6]. - *

    - * The DateCode attribute is a ZigBee character string with a maximum length of 16 bytes. - * The first 8 characters specify the date of manufacturer of the device in international - * date notation according to ISO 8601, i.e. YYYYMMDD, e.g. 20060814. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getDateCodeAsync() { - return read(attributes.get(ATTR_DATECODE)); - } - - /** - * Synchronously get the DateCode attribute [attribute ID 6]. - *

    - * The DateCode attribute is a ZigBee character string with a maximum length of 16 bytes. - * The first 8 characters specify the date of manufacturer of the device in international - * date notation according to ISO 8601, i.e. YYYYMMDD, e.g. 20060814. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link String} attribute value, or null on error - */ - public String getDateCode(final long refreshPeriod) { - if (attributes.get(ATTR_DATECODE).isLastValueCurrent(refreshPeriod)) { - return (String) attributes.get(ATTR_DATECODE).getLastValue(); - } - - return (String) readSync(attributes.get(ATTR_DATECODE)); - } - - /** - * Get the PowerSource attribute [attribute ID 7]. - *

    - * The PowerSource attribute is 8 bits in length and specifies the source(s) of power - * available to the device. Bits b0–b6 of this attribute represent the primary power - * source of the device and bit b7 indicates whether the device has a secondary power - * source in the form of a battery backup. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getPowerSourceAsync() { - return read(attributes.get(ATTR_POWERSOURCE)); - } - - /** - * Synchronously get the PowerSource attribute [attribute ID 7]. - *

    - * The PowerSource attribute is 8 bits in length and specifies the source(s) of power - * available to the device. Bits b0–b6 of this attribute represent the primary power - * source of the device and bit b7 indicates whether the device has a secondary power - * source in the form of a battery backup. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getPowerSource(final long refreshPeriod) { - if (attributes.get(ATTR_POWERSOURCE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_POWERSOURCE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_POWERSOURCE)); - } - - /** - * Set the LocationDescription attribute [attribute ID 16]. - *

    - * The LocationDescription attribute is a maximum of 16 bytes in length and describes - * the physical location of the device as a ZigBee character string. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param locationDescription the {@link String} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setLocationDescription(final Object value) { - return write(attributes.get(ATTR_LOCATIONDESCRIPTION), value); - } - - /** - * Get the LocationDescription attribute [attribute ID 16]. - *

    - * The LocationDescription attribute is a maximum of 16 bytes in length and describes - * the physical location of the device as a ZigBee character string. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getLocationDescriptionAsync() { - return read(attributes.get(ATTR_LOCATIONDESCRIPTION)); - } - - /** - * Synchronously get the LocationDescription attribute [attribute ID 16]. - *

    - * The LocationDescription attribute is a maximum of 16 bytes in length and describes - * the physical location of the device as a ZigBee character string. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link String} attribute value, or null on error - */ - public String getLocationDescription(final long refreshPeriod) { - if (attributes.get(ATTR_LOCATIONDESCRIPTION).isLastValueCurrent(refreshPeriod)) { - return (String) attributes.get(ATTR_LOCATIONDESCRIPTION).getLastValue(); - } - - return (String) readSync(attributes.get(ATTR_LOCATIONDESCRIPTION)); - } - - /** - * Set the PhysicalEnvironment attribute [attribute ID 17]. - *

    - * The PhysicalEnvironment attribute is 8 bits in length and specifies the type of - * physical environment in which the device will operate. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param physicalEnvironment the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setPhysicalEnvironment(final Object value) { - return write(attributes.get(ATTR_PHYSICALENVIRONMENT), value); - } - - /** - * Get the PhysicalEnvironment attribute [attribute ID 17]. - *

    - * The PhysicalEnvironment attribute is 8 bits in length and specifies the type of - * physical environment in which the device will operate. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getPhysicalEnvironmentAsync() { - return read(attributes.get(ATTR_PHYSICALENVIRONMENT)); - } - - /** - * Synchronously get the PhysicalEnvironment attribute [attribute ID 17]. - *

    - * The PhysicalEnvironment attribute is 8 bits in length and specifies the type of - * physical environment in which the device will operate. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getPhysicalEnvironment(final long refreshPeriod) { - if (attributes.get(ATTR_PHYSICALENVIRONMENT).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_PHYSICALENVIRONMENT).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_PHYSICALENVIRONMENT)); - } - - /** - * Set the DeviceEnabled attribute [attribute ID 18]. - *

    - * The DeviceEnabled attribute is a boolean and specifies whether the device is enabled - * or disabled. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param deviceEnabled the {@link Boolean} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setDeviceEnabled(final Object value) { - return write(attributes.get(ATTR_DEVICEENABLED), value); - } - - /** - * Get the DeviceEnabled attribute [attribute ID 18]. - *

    - * The DeviceEnabled attribute is a boolean and specifies whether the device is enabled - * or disabled. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getDeviceEnabledAsync() { - return read(attributes.get(ATTR_DEVICEENABLED)); - } - - /** - * Synchronously get the DeviceEnabled attribute [attribute ID 18]. - *

    - * The DeviceEnabled attribute is a boolean and specifies whether the device is enabled - * or disabled. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Boolean} attribute value, or null on error - */ - public Boolean getDeviceEnabled(final long refreshPeriod) { - if (attributes.get(ATTR_DEVICEENABLED).isLastValueCurrent(refreshPeriod)) { - return (Boolean) attributes.get(ATTR_DEVICEENABLED).getLastValue(); - } - - return (Boolean) readSync(attributes.get(ATTR_DEVICEENABLED)); - } - - /** - * Set the AlarmMask attribute [attribute ID 19]. - *

    - * The AlarmMask attribute is 8 bits in length and specifies which of a number of general - * alarms may be generated. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param alarmMask the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setAlarmMask(final Object value) { - return write(attributes.get(ATTR_ALARMMASK), value); - } - - /** - * Get the AlarmMask attribute [attribute ID 19]. - *

    - * The AlarmMask attribute is 8 bits in length and specifies which of a number of general - * alarms may be generated. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getAlarmMaskAsync() { - return read(attributes.get(ATTR_ALARMMASK)); - } - - /** - * Synchronously get the AlarmMask attribute [attribute ID 19]. - *

    - * The AlarmMask attribute is 8 bits in length and specifies which of a number of general - * alarms may be generated. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getAlarmMask(final long refreshPeriod) { - if (attributes.get(ATTR_ALARMMASK).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_ALARMMASK).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_ALARMMASK)); - } - - /** - * Set the DisableLocalConfig attribute [attribute ID 20]. - *

    - * The DisableLocalConfig attribute allows a number of local device configuration - * functions to be disabled. - *

    - * The intention of this attribute is to allow disabling of any local configuration - * user interface, for example to prevent reset or binding buttons being activated by - * unauthorised persons in a public building. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param disableLocalConfig the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setDisableLocalConfig(final Object value) { - return write(attributes.get(ATTR_DISABLELOCALCONFIG), value); - } - - /** - * Get the DisableLocalConfig attribute [attribute ID 20]. - *

    - * The DisableLocalConfig attribute allows a number of local device configuration - * functions to be disabled. - *

    - * The intention of this attribute is to allow disabling of any local configuration - * user interface, for example to prevent reset or binding buttons being activated by - * unauthorised persons in a public building. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getDisableLocalConfigAsync() { - return read(attributes.get(ATTR_DISABLELOCALCONFIG)); - } - - /** - * Synchronously get the DisableLocalConfig attribute [attribute ID 20]. - *

    - * The DisableLocalConfig attribute allows a number of local device configuration - * functions to be disabled. - *

    - * The intention of this attribute is to allow disabling of any local configuration - * user interface, for example to prevent reset or binding buttons being activated by - * unauthorised persons in a public building. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getDisableLocalConfig(final long refreshPeriod) { - if (attributes.get(ATTR_DISABLELOCALCONFIG).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_DISABLELOCALCONFIG).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_DISABLELOCALCONFIG)); - } - - /** - * Get the SWBuildID attribute [attribute ID 16384]. - *

    - * The SWBuildIDattribute represents a detailed, manufacturer-specific reference to the version of the software. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getSwBuildIdAsync() { - return read(attributes.get(ATTR_SWBUILDID)); - } - - /** - * Synchronously get the SWBuildID attribute [attribute ID 16384]. - *

    - * The SWBuildIDattribute represents a detailed, manufacturer-specific reference to the version of the software. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link String} attribute value, or null on error - */ - public String getSwBuildId(final long refreshPeriod) { - if (attributes.get(ATTR_SWBUILDID).isLastValueCurrent(refreshPeriod)) { - return (String) attributes.get(ATTR_SWBUILDID).getLastValue(); - } - - return (String) readSync(attributes.get(ATTR_SWBUILDID)); - } - - /** - * The Reset to Factory Defaults Command - *

    - * On receipt of this command, the device resets all the attributes of all its clusters - * to their factory defaults. Note that ZigBee networking functionality,bindings, groups - * or other persistent data are not affected by this command - * - * @return the {@link Future} command result future - */ - public Future resetToFactoryDefaultsCommand() { - ResetToFactoryDefaultsCommand command = new ResetToFactoryDefaultsCommand(); - - return send(command); - } - - @Override - public ZclCommand getCommandFromId(int commandId) { - switch (commandId) { - case 0: // RESET_TO_FACTORY_DEFAULTS_COMMAND - return new ResetToFactoryDefaultsCommand(); - default: - return null; - } - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclBinaryInputBaCnetExtendedCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclBinaryInputBaCnetExtendedCluster.java deleted file mode 100644 index e62911675..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclBinaryInputBaCnetExtendedCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Binary Input (BACnet Extended) cluster implementation (Cluster ID 0x0609). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclBinaryInputBaCnetExtendedCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0609; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Binary Input (BACnet Extended)"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Binary Input (BACnet Extended) cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclBinaryInputBaCnetExtendedCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclBinaryInputBaCnetRegularCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclBinaryInputBaCnetRegularCluster.java deleted file mode 100644 index 8ad196140..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclBinaryInputBaCnetRegularCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Binary Input (BACnet Regular) cluster implementation (Cluster ID 0x0608). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclBinaryInputBaCnetRegularCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0608; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Binary Input (BACnet Regular)"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Binary Input (BACnet Regular) cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclBinaryInputBaCnetRegularCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclBinaryInputBasicCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclBinaryInputBasicCluster.java deleted file mode 100644 index b78eee7bc..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclBinaryInputBasicCluster.java +++ /dev/null @@ -1,913 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.CommandResult; -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import com.zsmartsystems.zigbee.zcl.protocol.ZclClusterType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Future; -import javax.annotation.Generated; - -/** - * Binary Input (Basic) cluster implementation (Cluster ID 0x000F). - *

    - * The Binary Input (Basic) cluster provides an interface for reading the value of a binary measurement and accessing various - * characteristics of that measurement. The cluster is typically used to implement a sensor that measures a two-state physical quantity. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclBinaryInputBasicCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x000F; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Binary Input (Basic)"; - - // Attribute constants - /** - * This attribute, of type Character string, MAY be used to hold a human readable description of the ACTIVE state of a binary PresentValue. For - * example, for a Binary Input cluster, if the physical input is a switch contact, then the ActiveText attribute might be assigned a value such - * as “Fan 1 On”. If either the ActiveText attribute or the InactiveText attribute are present, then both of them SHALL be present. - *

    - * The character set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, which SHALL be printable but are otherwise - * unrestricted. - */ - public static final int ATTR_ACTIVETEXT = 0x0004; - /** - * The Description attribute, of type Character string, MAY be used to hold a description - * of the usage of the input, output or value, as appropriate to the cluster. The character - * set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, - * which SHALL be printable but are otherwise unrestricted. - */ - public static final int ATTR_DESCRIPTION = 0x001C; - /** - * This attribute, of type Character string, MAY be used to hold a human readable description of the INACTIVE state of a binary PresentValue. - * For example, for a Binary Input cluster, if the physical input is a switch contact, then the InactiveText attribute might be assigned a value - * such as “Fan 1 Off”. If either the InactiveText attribute or the ActiveText attribute are present, then both of them SHALL be present. - *

    - * The character set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, which SHALL be printable but are otherwise - * unrestricted. - */ - public static final int ATTR_INACTIVETEXT = 0x002E; - /** - * The OutOfService attribute, of type Boolean, indicates whether (TRUE) or not (FALSE) the physical - * input, output or value that the cluster represents is not in service. For an Input cluster, when - * OutOfService is TRUE the PresentValue attribute is decoupled from the physical input and will - * not track changes to the physical input. For an Output cluster, when OutOfService is TRUE the - * PresentValue attribute is decoupled from the physical output, so changes to PresentValue will not - * affect the physical output. For a Value cluster, when OutOfService is TRUE the PresentValue attribute - * MAY be written to freely by software local to the device that the cluster resides on. - */ - public static final int ATTR_OUTOFSERVICE = 0x0051; - /** - * This attribute, of type enumeration, indicates the relationship between the physical state of the input (or output as appropriate for the - * cluster) and the logical state represented by a binary PresentValue attribute, when OutOfService is FALSE. If the Polarity attribute is - * NORMAL (0), then the ACTIVE (1) state of the PresentValue attribute is also the ACTIVE or ON state of the physical input (or output). If the - * Polarity attribute is REVERSE (1), then the ACTIVE (1) state of the PresentValue attribute is the INACTIVE or OFF state of the physical input - * (or output). - *

    - * Thus, when OutOfService is FALSE, for a constant physical input state a change in the Polarity attribute SHALL produce a change in the - * PresentValue attribute. If OutOfService is TRUE, then the Polarity attribute SHALL have no effect on the PresentValue attribute. - */ - public static final int ATTR_POLARITY = 0x0054; - /** - * The PresentValue attribute indicates the current value of the input, output or - * value, as appropriate for the cluster. For Analog clusters it is of type single precision, for Binary - * clusters it is of type Boolean, and for multistate clusters it is of type Unsigned 16-bit integer. The - * PresentValue attribute of an input cluster SHALL be writable when OutOfService is TRUE. When the PriorityArray - * attribute is implemented, writing to PresentValue SHALL be equivalent to writing to element 16 of PriorityArray, - * i.e., with a priority of 16. - */ - public static final int ATTR_PRESENTVALUE = 0x0055; - /** - * The Reliability attribute, of type 8-bit enumeration, provides an indication of whether - * the PresentValueor the operation of the physical input, output or value in question (as - * appropriate for the cluster) is “reliable” as far as can be determined and, if not, why - * not. The Reliability attribute MAY have any of the following values: - *

    - * NO-FAULT-DETECTED (0) - * OVER-RANGE (2) - * UNDER-RANGE (3) - * OPEN-LOOP (4) - * SHORTED-LOOP (5) - * UNRELIABLE-OTHER (7) - * PROCESS-ERROR (8) - * MULTI-STATE-FAULT (9) - * CONFIGURATION-ERROR (10) - */ - public static final int ATTR_RELIABILITY = 0x0067; - /** - * This attribute, of type bitmap, represents four Boolean flags that indicate the general “health” - * of the analog sensor. Three of the flags are associated with the values of other optional attributes - * of this cluster. A more detailed status could be determined by reading the optional attributes (if - * supported) that are linked to these flags. The relationship between individual flags is not defined. - *

    - * The four flags are Bit 0 = IN_ALARM, Bit 1 = FAULT, Bit 2 = OVERRIDDEN, Bit 3 = OUT OF SERVICE - *

    - * where: - *

    - * IN_ALARM -Logical FALSE (0) if the EventStateattribute has a value of NORMAL, otherwise logical TRUE (1). - * This bit is always 0 unless the cluster implementing the EventState attribute is implemented on the same - * endpoint. - *

    - * FAULT -Logical TRUE (1) if the Reliability attribute is present and does not have a value of NO FAULT DETECTED, - * otherwise logical FALSE (0). - *

    - * OVERRIDDEN -Logical TRUE (1) if the cluster has been overridden by some mechanism local to the device. - * Otherwise, the value is logical FALSE (0). In this context, for an input cluster, “overridden” is taken - * to mean that the PresentValue and Reliability(optional) attributes are no longer tracking changes to the - * physical input. For an Output cluster, “overridden” is taken to mean that the physical output is no longer - * tracking changes to the PresentValue attribute and the Reliability attribute is no longer a reflection of - * the physical output. For a Value cluster, “overridden” is taken to mean that the PresentValue attribute is - * not writeable. - *

    - * OUT OF SERVICE -Logical TRUE (1) if the OutOfService attribute has a value of TRUE, otherwise - * logical FALSE (0). - */ - public static final int ATTR_STATUSFLAGS = 0x006F; - /** - * The ApplicationType attribute is an unsigned 32 bit integer that indicates the specific - * application usage for this cluster. (Note: This attribute has no BACnet equivalent). - * ApplicationType is subdivided into Group, Type and an Index number, as follows. - *

    - * Group = Bits 24-31 An indication of the cluster this attribute is part of. - *

    - * Type = Bits 16-23 For Analog clusters, the physical quantity that the Present Value attribute - * of the cluster represents. For Binary and Multistate clusters, the application usage domain. - *

    - * Index = Bits 0-15The specific application usage of the cluster. - */ - public static final int ATTR_APPLICATIONTYPE = 0x0100; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(9); - - attributeMap.put(ATTR_ACTIVETEXT, new ZclAttribute(ZclClusterType.BINARY_INPUT__BASIC, ATTR_ACTIVETEXT, "ActiveText", ZclDataType.CHARACTER_STRING, false, true, true, false)); - attributeMap.put(ATTR_DESCRIPTION, new ZclAttribute(ZclClusterType.BINARY_INPUT__BASIC, ATTR_DESCRIPTION, "Description", ZclDataType.CHARACTER_STRING, false, true, true, false)); - attributeMap.put(ATTR_INACTIVETEXT, new ZclAttribute(ZclClusterType.BINARY_INPUT__BASIC, ATTR_INACTIVETEXT, "InactiveText", ZclDataType.CHARACTER_STRING, false, true, true, false)); - attributeMap.put(ATTR_OUTOFSERVICE, new ZclAttribute(ZclClusterType.BINARY_INPUT__BASIC, ATTR_OUTOFSERVICE, "OutOfService", ZclDataType.BOOLEAN, true, true, true, false)); - attributeMap.put(ATTR_POLARITY, new ZclAttribute(ZclClusterType.BINARY_INPUT__BASIC, ATTR_POLARITY, "Polarity", ZclDataType.ENUMERATION_8_BIT, false, true, false, false)); - attributeMap.put(ATTR_PRESENTVALUE, new ZclAttribute(ZclClusterType.BINARY_INPUT__BASIC, ATTR_PRESENTVALUE, "PresentValue", ZclDataType.BOOLEAN, true, true, true, true)); - attributeMap.put(ATTR_RELIABILITY, new ZclAttribute(ZclClusterType.BINARY_INPUT__BASIC, ATTR_RELIABILITY, "Reliability", ZclDataType.ENUMERATION_8_BIT, false, true, true, false)); - attributeMap.put(ATTR_STATUSFLAGS, new ZclAttribute(ZclClusterType.BINARY_INPUT__BASIC, ATTR_STATUSFLAGS, "StatusFlags", ZclDataType.BITMAP_8_BIT, true, true, false, true)); - attributeMap.put(ATTR_APPLICATIONTYPE, new ZclAttribute(ZclClusterType.BINARY_INPUT__BASIC, ATTR_APPLICATIONTYPE, "ApplicationType", ZclDataType.SIGNED_32_BIT_INTEGER, false, true, false, false)); - - return attributeMap; - } - - /** - * Default constructor to create a Binary Input (Basic) cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclBinaryInputBasicCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } - - /** - * Set the ActiveText attribute [attribute ID 4]. - *

    - * This attribute, of type Character string, MAY be used to hold a human readable description of the ACTIVE state of a binary PresentValue. For - * example, for a Binary Input cluster, if the physical input is a switch contact, then the ActiveText attribute might be assigned a value such - * as “Fan 1 On”. If either the ActiveText attribute or the InactiveText attribute are present, then both of them SHALL be present. - *

    - * The character set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, which SHALL be printable but are otherwise - * unrestricted. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param activeText the {@link String} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setActiveText(final Object value) { - return write(attributes.get(ATTR_ACTIVETEXT), value); - } - - /** - * Get the ActiveText attribute [attribute ID 4]. - *

    - * This attribute, of type Character string, MAY be used to hold a human readable description of the ACTIVE state of a binary PresentValue. For - * example, for a Binary Input cluster, if the physical input is a switch contact, then the ActiveText attribute might be assigned a value such - * as “Fan 1 On”. If either the ActiveText attribute or the InactiveText attribute are present, then both of them SHALL be present. - *

    - * The character set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, which SHALL be printable but are otherwise - * unrestricted. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getActiveTextAsync() { - return read(attributes.get(ATTR_ACTIVETEXT)); - } - - /** - * Synchronously get the ActiveText attribute [attribute ID 4]. - *

    - * This attribute, of type Character string, MAY be used to hold a human readable description of the ACTIVE state of a binary PresentValue. For - * example, for a Binary Input cluster, if the physical input is a switch contact, then the ActiveText attribute might be assigned a value such - * as “Fan 1 On”. If either the ActiveText attribute or the InactiveText attribute are present, then both of them SHALL be present. - *

    - * The character set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, which SHALL be printable but are otherwise - * unrestricted. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link String} attribute value, or null on error - */ - public String getActiveText(final long refreshPeriod) { - if (attributes.get(ATTR_ACTIVETEXT).isLastValueCurrent(refreshPeriod)) { - return (String) attributes.get(ATTR_ACTIVETEXT).getLastValue(); - } - - return (String) readSync(attributes.get(ATTR_ACTIVETEXT)); - } - - /** - * Set the Description attribute [attribute ID 28]. - *

    - * The Description attribute, of type Character string, MAY be used to hold a description - * of the usage of the input, output or value, as appropriate to the cluster. The character - * set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, - * which SHALL be printable but are otherwise unrestricted. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param description the {@link String} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setDescription(final Object value) { - return write(attributes.get(ATTR_DESCRIPTION), value); - } - - /** - * Get the Description attribute [attribute ID 28]. - *

    - * The Description attribute, of type Character string, MAY be used to hold a description - * of the usage of the input, output or value, as appropriate to the cluster. The character - * set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, - * which SHALL be printable but are otherwise unrestricted. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getDescriptionAsync() { - return read(attributes.get(ATTR_DESCRIPTION)); - } - - /** - * Synchronously get the Description attribute [attribute ID 28]. - *

    - * The Description attribute, of type Character string, MAY be used to hold a description - * of the usage of the input, output or value, as appropriate to the cluster. The character - * set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, - * which SHALL be printable but are otherwise unrestricted. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link String} attribute value, or null on error - */ - public String getDescription(final long refreshPeriod) { - if (attributes.get(ATTR_DESCRIPTION).isLastValueCurrent(refreshPeriod)) { - return (String) attributes.get(ATTR_DESCRIPTION).getLastValue(); - } - - return (String) readSync(attributes.get(ATTR_DESCRIPTION)); - } - - /** - * Set the InactiveText attribute [attribute ID 46]. - *

    - * This attribute, of type Character string, MAY be used to hold a human readable description of the INACTIVE state of a binary PresentValue. - * For example, for a Binary Input cluster, if the physical input is a switch contact, then the InactiveText attribute might be assigned a value - * such as “Fan 1 Off”. If either the InactiveText attribute or the ActiveText attribute are present, then both of them SHALL be present. - *

    - * The character set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, which SHALL be printable but are otherwise - * unrestricted. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param inactiveText the {@link String} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setInactiveText(final Object value) { - return write(attributes.get(ATTR_INACTIVETEXT), value); - } - - /** - * Get the InactiveText attribute [attribute ID 46]. - *

    - * This attribute, of type Character string, MAY be used to hold a human readable description of the INACTIVE state of a binary PresentValue. - * For example, for a Binary Input cluster, if the physical input is a switch contact, then the InactiveText attribute might be assigned a value - * such as “Fan 1 Off”. If either the InactiveText attribute or the ActiveText attribute are present, then both of them SHALL be present. - *

    - * The character set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, which SHALL be printable but are otherwise - * unrestricted. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getInactiveTextAsync() { - return read(attributes.get(ATTR_INACTIVETEXT)); - } - - /** - * Synchronously get the InactiveText attribute [attribute ID 46]. - *

    - * This attribute, of type Character string, MAY be used to hold a human readable description of the INACTIVE state of a binary PresentValue. - * For example, for a Binary Input cluster, if the physical input is a switch contact, then the InactiveText attribute might be assigned a value - * such as “Fan 1 Off”. If either the InactiveText attribute or the ActiveText attribute are present, then both of them SHALL be present. - *

    - * The character set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, which SHALL be printable but are otherwise - * unrestricted. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link String} attribute value, or null on error - */ - public String getInactiveText(final long refreshPeriod) { - if (attributes.get(ATTR_INACTIVETEXT).isLastValueCurrent(refreshPeriod)) { - return (String) attributes.get(ATTR_INACTIVETEXT).getLastValue(); - } - - return (String) readSync(attributes.get(ATTR_INACTIVETEXT)); - } - - /** - * Set the OutOfService attribute [attribute ID 81]. - *

    - * The OutOfService attribute, of type Boolean, indicates whether (TRUE) or not (FALSE) the physical - * input, output or value that the cluster represents is not in service. For an Input cluster, when - * OutOfService is TRUE the PresentValue attribute is decoupled from the physical input and will - * not track changes to the physical input. For an Output cluster, when OutOfService is TRUE the - * PresentValue attribute is decoupled from the physical output, so changes to PresentValue will not - * affect the physical output. For a Value cluster, when OutOfService is TRUE the PresentValue attribute - * MAY be written to freely by software local to the device that the cluster resides on. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param outOfService the {@link Boolean} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setOutOfService(final Object value) { - return write(attributes.get(ATTR_OUTOFSERVICE), value); - } - - /** - * Get the OutOfService attribute [attribute ID 81]. - *

    - * The OutOfService attribute, of type Boolean, indicates whether (TRUE) or not (FALSE) the physical - * input, output or value that the cluster represents is not in service. For an Input cluster, when - * OutOfService is TRUE the PresentValue attribute is decoupled from the physical input and will - * not track changes to the physical input. For an Output cluster, when OutOfService is TRUE the - * PresentValue attribute is decoupled from the physical output, so changes to PresentValue will not - * affect the physical output. For a Value cluster, when OutOfService is TRUE the PresentValue attribute - * MAY be written to freely by software local to the device that the cluster resides on. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getOutOfServiceAsync() { - return read(attributes.get(ATTR_OUTOFSERVICE)); - } - - /** - * Synchronously get the OutOfService attribute [attribute ID 81]. - *

    - * The OutOfService attribute, of type Boolean, indicates whether (TRUE) or not (FALSE) the physical - * input, output or value that the cluster represents is not in service. For an Input cluster, when - * OutOfService is TRUE the PresentValue attribute is decoupled from the physical input and will - * not track changes to the physical input. For an Output cluster, when OutOfService is TRUE the - * PresentValue attribute is decoupled from the physical output, so changes to PresentValue will not - * affect the physical output. For a Value cluster, when OutOfService is TRUE the PresentValue attribute - * MAY be written to freely by software local to the device that the cluster resides on. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Boolean} attribute value, or null on error - */ - public Boolean getOutOfService(final long refreshPeriod) { - if (attributes.get(ATTR_OUTOFSERVICE).isLastValueCurrent(refreshPeriod)) { - return (Boolean) attributes.get(ATTR_OUTOFSERVICE).getLastValue(); - } - - return (Boolean) readSync(attributes.get(ATTR_OUTOFSERVICE)); - } - - /** - * Get the Polarity attribute [attribute ID 84]. - *

    - * This attribute, of type enumeration, indicates the relationship between the physical state of the input (or output as appropriate for the - * cluster) and the logical state represented by a binary PresentValue attribute, when OutOfService is FALSE. If the Polarity attribute is - * NORMAL (0), then the ACTIVE (1) state of the PresentValue attribute is also the ACTIVE or ON state of the physical input (or output). If the - * Polarity attribute is REVERSE (1), then the ACTIVE (1) state of the PresentValue attribute is the INACTIVE or OFF state of the physical input - * (or output). - *

    - * Thus, when OutOfService is FALSE, for a constant physical input state a change in the Polarity attribute SHALL produce a change in the - * PresentValue attribute. If OutOfService is TRUE, then the Polarity attribute SHALL have no effect on the PresentValue attribute. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getPolarityAsync() { - return read(attributes.get(ATTR_POLARITY)); - } - - /** - * Synchronously get the Polarity attribute [attribute ID 84]. - *

    - * This attribute, of type enumeration, indicates the relationship between the physical state of the input (or output as appropriate for the - * cluster) and the logical state represented by a binary PresentValue attribute, when OutOfService is FALSE. If the Polarity attribute is - * NORMAL (0), then the ACTIVE (1) state of the PresentValue attribute is also the ACTIVE or ON state of the physical input (or output). If the - * Polarity attribute is REVERSE (1), then the ACTIVE (1) state of the PresentValue attribute is the INACTIVE or OFF state of the physical input - * (or output). - *

    - * Thus, when OutOfService is FALSE, for a constant physical input state a change in the Polarity attribute SHALL produce a change in the - * PresentValue attribute. If OutOfService is TRUE, then the Polarity attribute SHALL have no effect on the PresentValue attribute. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getPolarity(final long refreshPeriod) { - if (attributes.get(ATTR_POLARITY).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_POLARITY).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_POLARITY)); - } - - /** - * Set the PresentValue attribute [attribute ID 85]. - *

    - * The PresentValue attribute indicates the current value of the input, output or - * value, as appropriate for the cluster. For Analog clusters it is of type single precision, for Binary - * clusters it is of type Boolean, and for multistate clusters it is of type Unsigned 16-bit integer. The - * PresentValue attribute of an input cluster SHALL be writable when OutOfService is TRUE. When the PriorityArray - * attribute is implemented, writing to PresentValue SHALL be equivalent to writing to element 16 of PriorityArray, - * i.e., with a priority of 16. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param presentValue the {@link Boolean} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setPresentValue(final Object value) { - return write(attributes.get(ATTR_PRESENTVALUE), value); - } - - /** - * Get the PresentValue attribute [attribute ID 85]. - *

    - * The PresentValue attribute indicates the current value of the input, output or - * value, as appropriate for the cluster. For Analog clusters it is of type single precision, for Binary - * clusters it is of type Boolean, and for multistate clusters it is of type Unsigned 16-bit integer. The - * PresentValue attribute of an input cluster SHALL be writable when OutOfService is TRUE. When the PriorityArray - * attribute is implemented, writing to PresentValue SHALL be equivalent to writing to element 16 of PriorityArray, - * i.e., with a priority of 16. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getPresentValueAsync() { - return read(attributes.get(ATTR_PRESENTVALUE)); - } - - /** - * Synchronously get the PresentValue attribute [attribute ID 85]. - *

    - * The PresentValue attribute indicates the current value of the input, output or - * value, as appropriate for the cluster. For Analog clusters it is of type single precision, for Binary - * clusters it is of type Boolean, and for multistate clusters it is of type Unsigned 16-bit integer. The - * PresentValue attribute of an input cluster SHALL be writable when OutOfService is TRUE. When the PriorityArray - * attribute is implemented, writing to PresentValue SHALL be equivalent to writing to element 16 of PriorityArray, - * i.e., with a priority of 16. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Boolean} attribute value, or null on error - */ - public Boolean getPresentValue(final long refreshPeriod) { - if (attributes.get(ATTR_PRESENTVALUE).isLastValueCurrent(refreshPeriod)) { - return (Boolean) attributes.get(ATTR_PRESENTVALUE).getLastValue(); - } - - return (Boolean) readSync(attributes.get(ATTR_PRESENTVALUE)); - } - - /** - * Set reporting for the PresentValue attribute [attribute ID 85]. - *

    - * The PresentValue attribute indicates the current value of the input, output or - * value, as appropriate for the cluster. For Analog clusters it is of type single precision, for Binary - * clusters it is of type Boolean, and for multistate clusters it is of type Unsigned 16-bit integer. The - * PresentValue attribute of an input cluster SHALL be writable when OutOfService is TRUE. When the PriorityArray - * attribute is implemented, writing to PresentValue SHALL be equivalent to writing to element 16 of PriorityArray, - * i.e., with a priority of 16. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param minInterval {@link int} minimum reporting period - * @param maxInterval {@link int} maximum reporting period - * @return the {@link Future} command result future - */ - public Future setPresentValueReporting(final int minInterval, final int maxInterval) { - return setReporting(attributes.get(ATTR_PRESENTVALUE), minInterval, maxInterval); - } - - /** - * Set the Reliability attribute [attribute ID 103]. - *

    - * The Reliability attribute, of type 8-bit enumeration, provides an indication of whether - * the PresentValueor the operation of the physical input, output or value in question (as - * appropriate for the cluster) is “reliable” as far as can be determined and, if not, why - * not. The Reliability attribute MAY have any of the following values: - *

    - * NO-FAULT-DETECTED (0) - * OVER-RANGE (2) - * UNDER-RANGE (3) - * OPEN-LOOP (4) - * SHORTED-LOOP (5) - * UNRELIABLE-OTHER (7) - * PROCESS-ERROR (8) - * MULTI-STATE-FAULT (9) - * CONFIGURATION-ERROR (10) - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param reliability the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setReliability(final Object value) { - return write(attributes.get(ATTR_RELIABILITY), value); - } - - /** - * Get the Reliability attribute [attribute ID 103]. - *

    - * The Reliability attribute, of type 8-bit enumeration, provides an indication of whether - * the PresentValueor the operation of the physical input, output or value in question (as - * appropriate for the cluster) is “reliable” as far as can be determined and, if not, why - * not. The Reliability attribute MAY have any of the following values: - *

    - * NO-FAULT-DETECTED (0) - * OVER-RANGE (2) - * UNDER-RANGE (3) - * OPEN-LOOP (4) - * SHORTED-LOOP (5) - * UNRELIABLE-OTHER (7) - * PROCESS-ERROR (8) - * MULTI-STATE-FAULT (9) - * CONFIGURATION-ERROR (10) - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getReliabilityAsync() { - return read(attributes.get(ATTR_RELIABILITY)); - } - - /** - * Synchronously get the Reliability attribute [attribute ID 103]. - *

    - * The Reliability attribute, of type 8-bit enumeration, provides an indication of whether - * the PresentValueor the operation of the physical input, output or value in question (as - * appropriate for the cluster) is “reliable” as far as can be determined and, if not, why - * not. The Reliability attribute MAY have any of the following values: - *

    - * NO-FAULT-DETECTED (0) - * OVER-RANGE (2) - * UNDER-RANGE (3) - * OPEN-LOOP (4) - * SHORTED-LOOP (5) - * UNRELIABLE-OTHER (7) - * PROCESS-ERROR (8) - * MULTI-STATE-FAULT (9) - * CONFIGURATION-ERROR (10) - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getReliability(final long refreshPeriod) { - if (attributes.get(ATTR_RELIABILITY).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_RELIABILITY).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_RELIABILITY)); - } - - /** - * Get the StatusFlags attribute [attribute ID 111]. - *

    - * This attribute, of type bitmap, represents four Boolean flags that indicate the general “health” - * of the analog sensor. Three of the flags are associated with the values of other optional attributes - * of this cluster. A more detailed status could be determined by reading the optional attributes (if - * supported) that are linked to these flags. The relationship between individual flags is not defined. - *

    - * The four flags are Bit 0 = IN_ALARM, Bit 1 = FAULT, Bit 2 = OVERRIDDEN, Bit 3 = OUT OF SERVICE - *

    - * where: - *

    - * IN_ALARM -Logical FALSE (0) if the EventStateattribute has a value of NORMAL, otherwise logical TRUE (1). - * This bit is always 0 unless the cluster implementing the EventState attribute is implemented on the same - * endpoint. - *

    - * FAULT -Logical TRUE (1) if the Reliability attribute is present and does not have a value of NO FAULT DETECTED, - * otherwise logical FALSE (0). - *

    - * OVERRIDDEN -Logical TRUE (1) if the cluster has been overridden by some mechanism local to the device. - * Otherwise, the value is logical FALSE (0). In this context, for an input cluster, “overridden” is taken - * to mean that the PresentValue and Reliability(optional) attributes are no longer tracking changes to the - * physical input. For an Output cluster, “overridden” is taken to mean that the physical output is no longer - * tracking changes to the PresentValue attribute and the Reliability attribute is no longer a reflection of - * the physical output. For a Value cluster, “overridden” is taken to mean that the PresentValue attribute is - * not writeable. - *

    - * OUT OF SERVICE -Logical TRUE (1) if the OutOfService attribute has a value of TRUE, otherwise - * logical FALSE (0). - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getStatusFlagsAsync() { - return read(attributes.get(ATTR_STATUSFLAGS)); - } - - /** - * Synchronously get the StatusFlags attribute [attribute ID 111]. - *

    - * This attribute, of type bitmap, represents four Boolean flags that indicate the general “health” - * of the analog sensor. Three of the flags are associated with the values of other optional attributes - * of this cluster. A more detailed status could be determined by reading the optional attributes (if - * supported) that are linked to these flags. The relationship between individual flags is not defined. - *

    - * The four flags are Bit 0 = IN_ALARM, Bit 1 = FAULT, Bit 2 = OVERRIDDEN, Bit 3 = OUT OF SERVICE - *

    - * where: - *

    - * IN_ALARM -Logical FALSE (0) if the EventStateattribute has a value of NORMAL, otherwise logical TRUE (1). - * This bit is always 0 unless the cluster implementing the EventState attribute is implemented on the same - * endpoint. - *

    - * FAULT -Logical TRUE (1) if the Reliability attribute is present and does not have a value of NO FAULT DETECTED, - * otherwise logical FALSE (0). - *

    - * OVERRIDDEN -Logical TRUE (1) if the cluster has been overridden by some mechanism local to the device. - * Otherwise, the value is logical FALSE (0). In this context, for an input cluster, “overridden” is taken - * to mean that the PresentValue and Reliability(optional) attributes are no longer tracking changes to the - * physical input. For an Output cluster, “overridden” is taken to mean that the physical output is no longer - * tracking changes to the PresentValue attribute and the Reliability attribute is no longer a reflection of - * the physical output. For a Value cluster, “overridden” is taken to mean that the PresentValue attribute is - * not writeable. - *

    - * OUT OF SERVICE -Logical TRUE (1) if the OutOfService attribute has a value of TRUE, otherwise - * logical FALSE (0). - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getStatusFlags(final long refreshPeriod) { - if (attributes.get(ATTR_STATUSFLAGS).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_STATUSFLAGS).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_STATUSFLAGS)); - } - - /** - * Set reporting for the StatusFlags attribute [attribute ID 111]. - *

    - * This attribute, of type bitmap, represents four Boolean flags that indicate the general “health” - * of the analog sensor. Three of the flags are associated with the values of other optional attributes - * of this cluster. A more detailed status could be determined by reading the optional attributes (if - * supported) that are linked to these flags. The relationship between individual flags is not defined. - *

    - * The four flags are Bit 0 = IN_ALARM, Bit 1 = FAULT, Bit 2 = OVERRIDDEN, Bit 3 = OUT OF SERVICE - *

    - * where: - *

    - * IN_ALARM -Logical FALSE (0) if the EventStateattribute has a value of NORMAL, otherwise logical TRUE (1). - * This bit is always 0 unless the cluster implementing the EventState attribute is implemented on the same - * endpoint. - *

    - * FAULT -Logical TRUE (1) if the Reliability attribute is present and does not have a value of NO FAULT DETECTED, - * otherwise logical FALSE (0). - *

    - * OVERRIDDEN -Logical TRUE (1) if the cluster has been overridden by some mechanism local to the device. - * Otherwise, the value is logical FALSE (0). In this context, for an input cluster, “overridden” is taken - * to mean that the PresentValue and Reliability(optional) attributes are no longer tracking changes to the - * physical input. For an Output cluster, “overridden” is taken to mean that the physical output is no longer - * tracking changes to the PresentValue attribute and the Reliability attribute is no longer a reflection of - * the physical output. For a Value cluster, “overridden” is taken to mean that the PresentValue attribute is - * not writeable. - *

    - * OUT OF SERVICE -Logical TRUE (1) if the OutOfService attribute has a value of TRUE, otherwise - * logical FALSE (0). - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param minInterval {@link int} minimum reporting period - * @param maxInterval {@link int} maximum reporting period - * @return the {@link Future} command result future - */ - public Future setStatusFlagsReporting(final int minInterval, final int maxInterval) { - return setReporting(attributes.get(ATTR_STATUSFLAGS), minInterval, maxInterval); - } - - /** - * Get the ApplicationType attribute [attribute ID 256]. - *

    - * The ApplicationType attribute is an unsigned 32 bit integer that indicates the specific - * application usage for this cluster. (Note: This attribute has no BACnet equivalent). - * ApplicationType is subdivided into Group, Type and an Index number, as follows. - *

    - * Group = Bits 24-31 An indication of the cluster this attribute is part of. - *

    - * Type = Bits 16-23 For Analog clusters, the physical quantity that the Present Value attribute - * of the cluster represents. For Binary and Multistate clusters, the application usage domain. - *

    - * Index = Bits 0-15The specific application usage of the cluster. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getApplicationTypeAsync() { - return read(attributes.get(ATTR_APPLICATIONTYPE)); - } - - /** - * Synchronously get the ApplicationType attribute [attribute ID 256]. - *

    - * The ApplicationType attribute is an unsigned 32 bit integer that indicates the specific - * application usage for this cluster. (Note: This attribute has no BACnet equivalent). - * ApplicationType is subdivided into Group, Type and an Index number, as follows. - *

    - * Group = Bits 24-31 An indication of the cluster this attribute is part of. - *

    - * Type = Bits 16-23 For Analog clusters, the physical quantity that the Present Value attribute - * of the cluster represents. For Binary and Multistate clusters, the application usage domain. - *

    - * Index = Bits 0-15The specific application usage of the cluster. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getApplicationType(final long refreshPeriod) { - if (attributes.get(ATTR_APPLICATIONTYPE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_APPLICATIONTYPE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_APPLICATIONTYPE)); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclBinaryOutputBaCnetExtendedCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclBinaryOutputBaCnetExtendedCluster.java deleted file mode 100644 index cda863194..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclBinaryOutputBaCnetExtendedCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Binary Output (BACnet Extended) cluster implementation (Cluster ID 0x060B). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclBinaryOutputBaCnetExtendedCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x060B; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Binary Output (BACnet Extended)"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Binary Output (BACnet Extended) cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclBinaryOutputBaCnetExtendedCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclBinaryOutputBaCnetRegularCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclBinaryOutputBaCnetRegularCluster.java deleted file mode 100644 index 514bdfb0f..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclBinaryOutputBaCnetRegularCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Binary Output (BACnet Regular) cluster implementation (Cluster ID 0x060A). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclBinaryOutputBaCnetRegularCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x060A; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Binary Output (BACnet Regular)"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Binary Output (BACnet Regular) cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclBinaryOutputBaCnetRegularCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclBinaryOutputBasicCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclBinaryOutputBasicCluster.java deleted file mode 100644 index ad8f73bd7..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclBinaryOutputBasicCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Binary Output (Basic) cluster implementation (Cluster ID 0x0010). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclBinaryOutputBasicCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0010; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Binary Output (Basic)"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Binary Output (Basic) cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclBinaryOutputBasicCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclBinaryValueBaCnetExtendedCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclBinaryValueBaCnetExtendedCluster.java deleted file mode 100644 index ddef0d5e2..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclBinaryValueBaCnetExtendedCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Binary Value (BACnet Extended) cluster implementation (Cluster ID 0x060D). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclBinaryValueBaCnetExtendedCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x060D; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Binary Value (BACnet Extended)"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Binary Value (BACnet Extended) cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclBinaryValueBaCnetExtendedCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclBinaryValueBaCnetRegularCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclBinaryValueBaCnetRegularCluster.java deleted file mode 100644 index 047ef4808..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclBinaryValueBaCnetRegularCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Binary Value (BACnet Regular) cluster implementation (Cluster ID 0x060C). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclBinaryValueBaCnetRegularCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x060C; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Binary Value (BACnet Regular)"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Binary Value (BACnet Regular) cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclBinaryValueBaCnetRegularCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclBinaryValueBasicCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclBinaryValueBasicCluster.java deleted file mode 100644 index 7ed99e173..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclBinaryValueBasicCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Binary Value (Basic) cluster implementation (Cluster ID 0x0011). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclBinaryValueBasicCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0011; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Binary Value (Basic)"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Binary Value (Basic) cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclBinaryValueBasicCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclColorControlCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclColorControlCluster.java deleted file mode 100644 index cdd282e3b..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclColorControlCluster.java +++ /dev/null @@ -1,1637 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.CommandResult; -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.clusters.colorcontrol.ColorLoopSetCommand; -import com.zsmartsystems.zigbee.zcl.clusters.colorcontrol.EnhancedMoveToHueAndSaturationCommand; -import com.zsmartsystems.zigbee.zcl.clusters.colorcontrol.EnhancedMoveToHueCommand; -import com.zsmartsystems.zigbee.zcl.clusters.colorcontrol.EnhancedStepHueCommand; -import com.zsmartsystems.zigbee.zcl.clusters.colorcontrol.MoveColorCommand; -import com.zsmartsystems.zigbee.zcl.clusters.colorcontrol.MoveHueCommand; -import com.zsmartsystems.zigbee.zcl.clusters.colorcontrol.MoveSaturationCommand; -import com.zsmartsystems.zigbee.zcl.clusters.colorcontrol.MoveToColorCommand; -import com.zsmartsystems.zigbee.zcl.clusters.colorcontrol.MoveToColorTemperatureCommand; -import com.zsmartsystems.zigbee.zcl.clusters.colorcontrol.MoveToHueAndSaturationCommand; -import com.zsmartsystems.zigbee.zcl.clusters.colorcontrol.MoveToHueCommand; -import com.zsmartsystems.zigbee.zcl.clusters.colorcontrol.MoveToSaturationCommand; -import com.zsmartsystems.zigbee.zcl.clusters.colorcontrol.StepColorCommand; -import com.zsmartsystems.zigbee.zcl.clusters.colorcontrol.StepHueCommand; -import com.zsmartsystems.zigbee.zcl.clusters.colorcontrol.StepSaturationCommand; -import com.zsmartsystems.zigbee.zcl.protocol.ZclClusterType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Future; -import javax.annotation.Generated; - -/** - * Color Control cluster implementation (Cluster ID 0x0300). - *

    - * This cluster provides an interface for changing the color of a light. Color is - * specified according to the Commission Internationale de l'Éclairage (CIE) - * specification CIE 1931 Color Space, [B4]. Color control is carried out in terms of - * x,y values, as defined by this specification. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclColorControlCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0300; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Color Control"; - - // Attribute constants - /** - * The CurrentHue attribute contains the current hue value of the light. It is updated - * as fast as practical during commands that change the hue. - *

    - * The hue in degrees shall be related to the CurrentHue attribute by the relationship - * Hue = CurrentHue x 360 / 254 (CurrentHue in the range 0 - 254 inclusive) - *

    - * If this attribute is implemented then the CurrentSaturation and ColorMode - * attributes shall also be implemented. - */ - public static final int ATTR_CURRENTHUE = 0x0000; - /** - * The CurrentSaturation attribute holds the current saturation value of the light. It is - * updated as fast as practical during commands that change the saturation. - * The saturation shall be related to the CurrentSaturation attribute by the - * relationship - * Saturation = CurrentSaturation/254 (CurrentSaturation in the range 0 - 254 inclusive) - * If this attribute is implemented then the CurrentHue and ColorMode attributes - * shall also be implemented. - */ - public static final int ATTR_CURRENTSATURATION = 0x0001; - /** - * The RemainingTime attribute holds the time remaining, in 1/10ths of a second, - * until the currently active command will be complete. - */ - public static final int ATTR_REMAININGTIME = 0x0002; - /** - * The CurrentX attribute contains the current value of the normalized chromaticity - * value x, as defined in the CIE xyY Color Space. It is updated as fast as practical - * during commands that change the color. - *

    - * The value of x shall be related to the CurrentX attribute by the relationship - *

    - * x = CurrentX / 65535 (CurrentX in the range 0 to 65279 inclusive) - */ - public static final int ATTR_CURRENTX = 0x0003; - /** - * The CurrentY attribute contains the current value of the normalized chromaticity - * value y, as defined in the CIE xyY Color Space. It is updated as fast as practical - * during commands that change the color. - *

    - * The value of y shall be related to the CurrentY attribute by the relationship - *

    - * y = CurrentY / 65535 (CurrentY in the range 0 to 65279 inclusive) - */ - public static final int ATTR_CURRENTY = 0x0004; - /** - * The DriftCompensation attribute indicates what mechanism, if any, is in use for - * compensation for color/intensity drift over time. - */ - public static final int ATTR_DRIFTCOMPENSATION = 0x0005; - /** - * The CompensationText attribute holds a textual indication of what mechanism, if - * any, is in use to compensate for color/intensity drift over time. - */ - public static final int ATTR_COMPENSATIONTEXT = 0x0006; - /** - * The ColorTemperature attribute contains a scaled inverse of the current value of - * the color temperature. It is updated as fast as practical during commands that - * change the color. - *

    - * The color temperature value in Kelvins shall be related to the ColorTemperature - * attribute by the relationship - *

    - * Color temperature = 1,000,000 / ColorTemperature (ColorTemperature in the - * range 1 to 65279 inclusive, giving a color temperature range from 1,000,000 - * Kelvins to 15.32 Kelvins). - *

    - * The value ColorTemperature = 0 indicates an undefined value. The value - * ColorTemperature = 65535 indicates an invalid value. - */ - public static final int ATTR_COLORTEMPERATURE = 0x0007; - /** - * The ColorMode attribute indicates which attributes are currently determining the color of the device. - * If either the CurrentHue or CurrentSaturation attribute is implemented, this attribute SHALL also be - * implemented, otherwise it is optional. The value of the ColorMode attribute cannot be written directly - * - it is set upon reception of another command in to the appropriate mode for that command. - */ - public static final int ATTR_COLORMODE = 0x0008; - /** - * The EnhancedCurrentHueattribute represents non-equidistant steps along the CIE 1931 color - * triangle, and it provides 16-bits precision. The upper 8 bits of this attribute SHALL be - * used as an index in the implementation specific XY lookup table to provide the non-equidistance - * steps (see the ZLL test specification for an example). The lower 8 bits SHALL be used to - * interpolate between these steps in a linear way in order to provide color zoom for the user. - */ - public static final int ATTR_ENHANCEDCURRENTHUE = 0x4000; - /** - * The EnhancedColorModeattribute specifies which attributes are currently determining the color of the device. - * To provide compatibility with standard ZCL, the original ColorModeattribute SHALLindicate ‘CurrentHueand CurrentSaturation’ - * when the light uses the EnhancedCurrentHueattribute. - */ - public static final int ATTR_ENHANCEDCOLORMODE = 0x4001; - /** - * The ColorLoopActive attribute specifies the current active status of the color loop. - * If this attribute has the value 0x00, the color loop SHALLnot be active. If this attribute - * has the value 0x01, the color loop SHALL be active. All other values (0x02 – 0xff) are reserved. - */ - public static final int ATTR_COLORLOOPACTIVE = 0x4002; - /** - * The ColorLoopDirection attribute specifies the current direction of the color loop. - * If this attribute has the value 0x00, the EnhancedCurrentHue attribute SHALL be decremented. - * If this attribute has the value 0x01, the EnhancedCurrentHue attribute SHALL be incremented. - * All other values (0x02 – 0xff) are reserved. - */ - public static final int ATTR_COLORLOOPDIRECTION = 0x4003; - /** - * The ColorLoopTime attribute specifies the number of seconds it SHALL take to perform a full - * color loop, i.e.,to cycle all values of the EnhancedCurrentHue attribute (between 0x0000 and 0xffff). - */ - public static final int ATTR_COLORLOOPTIME = 0x4004; - /** - * The ColorLoopStartEnhancedHueattribute specifies the value of the EnhancedCurrentHue attribute - * from which the color loop SHALL be started. - */ - public static final int ATTR_COLORLOOPSTARTHUE = 0x4005; - /** - * The ColorLoopStoredEnhancedHue attribute specifies the value of the EnhancedCurrentHue attribute - * before the color loop was started. Once the color loop is complete, the EnhancedCurrentHue - * attribute SHALL be restored to this value. - */ - public static final int ATTR_COLORLOOPSTOREDHUE = 0x4006; - /** - * The ColorCapabilitiesattribute specifies the color capabilities of the device supporting the - * color control cluster. - *

    - * Note:The support of the CurrentXand CurrentYattributes is mandatory regardless of color capabilities. - */ - public static final int ATTR_COLORCAPABILITIES = 0x400A; - /** - * The ColorTempPhysicalMinMiredsattribute indicates the minimum mired value - * supported by the hardware. ColorTempPhysicalMinMiredscorresponds to the maximum - * color temperature in kelvins supported by the hardware. - * ColorTempPhysicalMinMireds ≤ ColorTemperatureMireds - */ - public static final int ATTR_COLORTEMPERATUREMIN = 0x400B; - /** - * The ColorTempPhysicalMaxMiredsattribute indicates the maximum mired value - * supported by the hard-ware. ColorTempPhysicalMaxMiredscorresponds to the minimum - * color temperature in kelvins supported by the hardware. - * ColorTemperatureMireds ≤ ColorTempPhysicalMaxMireds. - */ - public static final int ATTR_COLORTEMPERATUREMAX = 0x400C; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(19); - - attributeMap.put(ATTR_CURRENTHUE, new ZclAttribute(ZclClusterType.COLOR_CONTROL, ATTR_CURRENTHUE, "CurrentHue", ZclDataType.UNSIGNED_8_BIT_INTEGER, false, true, false, true)); - attributeMap.put(ATTR_CURRENTSATURATION, new ZclAttribute(ZclClusterType.COLOR_CONTROL, ATTR_CURRENTSATURATION, "CurrentSaturation", ZclDataType.UNSIGNED_8_BIT_INTEGER, false, true, false, true)); - attributeMap.put(ATTR_REMAININGTIME, new ZclAttribute(ZclClusterType.COLOR_CONTROL, ATTR_REMAININGTIME, "RemainingTime", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_CURRENTX, new ZclAttribute(ZclClusterType.COLOR_CONTROL, ATTR_CURRENTX, "CurrentX", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, true)); - attributeMap.put(ATTR_CURRENTY, new ZclAttribute(ZclClusterType.COLOR_CONTROL, ATTR_CURRENTY, "CurrentY", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, true)); - attributeMap.put(ATTR_DRIFTCOMPENSATION, new ZclAttribute(ZclClusterType.COLOR_CONTROL, ATTR_DRIFTCOMPENSATION, "DriftCompensation", ZclDataType.ENUMERATION_8_BIT, false, true, false, false)); - attributeMap.put(ATTR_COMPENSATIONTEXT, new ZclAttribute(ZclClusterType.COLOR_CONTROL, ATTR_COMPENSATIONTEXT, "CompensationText", ZclDataType.CHARACTER_STRING, false, true, false, false)); - attributeMap.put(ATTR_COLORTEMPERATURE, new ZclAttribute(ZclClusterType.COLOR_CONTROL, ATTR_COLORTEMPERATURE, "ColorTemperature", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, true)); - attributeMap.put(ATTR_COLORMODE, new ZclAttribute(ZclClusterType.COLOR_CONTROL, ATTR_COLORMODE, "ColorMode", ZclDataType.ENUMERATION_8_BIT, false, true, false, false)); - attributeMap.put(ATTR_ENHANCEDCURRENTHUE, new ZclAttribute(ZclClusterType.COLOR_CONTROL, ATTR_ENHANCEDCURRENTHUE, "EnhancedCurrentHue", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, true)); - attributeMap.put(ATTR_ENHANCEDCOLORMODE, new ZclAttribute(ZclClusterType.COLOR_CONTROL, ATTR_ENHANCEDCOLORMODE, "EnhancedColorMode", ZclDataType.ENUMERATION_8_BIT, false, true, false, false)); - attributeMap.put(ATTR_COLORLOOPACTIVE, new ZclAttribute(ZclClusterType.COLOR_CONTROL, ATTR_COLORLOOPACTIVE, "ColorLoopActive", ZclDataType.UNSIGNED_8_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_COLORLOOPDIRECTION, new ZclAttribute(ZclClusterType.COLOR_CONTROL, ATTR_COLORLOOPDIRECTION, "ColorLoopDirection", ZclDataType.UNSIGNED_8_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_COLORLOOPTIME, new ZclAttribute(ZclClusterType.COLOR_CONTROL, ATTR_COLORLOOPTIME, "ColorLoopTime", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_COLORLOOPSTARTHUE, new ZclAttribute(ZclClusterType.COLOR_CONTROL, ATTR_COLORLOOPSTARTHUE, "ColorLoopStartHue", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_COLORLOOPSTOREDHUE, new ZclAttribute(ZclClusterType.COLOR_CONTROL, ATTR_COLORLOOPSTOREDHUE, "ColorLoopStoredHue", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_COLORCAPABILITIES, new ZclAttribute(ZclClusterType.COLOR_CONTROL, ATTR_COLORCAPABILITIES, "ColorCapabilities", ZclDataType.BITMAP_16_BIT, false, true, false, false)); - attributeMap.put(ATTR_COLORTEMPERATUREMIN, new ZclAttribute(ZclClusterType.COLOR_CONTROL, ATTR_COLORTEMPERATUREMIN, "ColorTemperatureMin", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_COLORTEMPERATUREMAX, new ZclAttribute(ZclClusterType.COLOR_CONTROL, ATTR_COLORTEMPERATUREMAX, "ColorTemperatureMax", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, false)); - - return attributeMap; - } - - /** - * Default constructor to create a Color Control cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclColorControlCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } - - /** - * Get the CurrentHue attribute [attribute ID 0]. - *

    - * The CurrentHue attribute contains the current hue value of the light. It is updated - * as fast as practical during commands that change the hue. - *

    - * The hue in degrees shall be related to the CurrentHue attribute by the relationship - * Hue = CurrentHue x 360 / 254 (CurrentHue in the range 0 - 254 inclusive) - *

    - * If this attribute is implemented then the CurrentSaturation and ColorMode - * attributes shall also be implemented. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getCurrentHueAsync() { - return read(attributes.get(ATTR_CURRENTHUE)); - } - - /** - * Synchronously get the CurrentHue attribute [attribute ID 0]. - *

    - * The CurrentHue attribute contains the current hue value of the light. It is updated - * as fast as practical during commands that change the hue. - *

    - * The hue in degrees shall be related to the CurrentHue attribute by the relationship - * Hue = CurrentHue x 360 / 254 (CurrentHue in the range 0 - 254 inclusive) - *

    - * If this attribute is implemented then the CurrentSaturation and ColorMode - * attributes shall also be implemented. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getCurrentHue(final long refreshPeriod) { - if (attributes.get(ATTR_CURRENTHUE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_CURRENTHUE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_CURRENTHUE)); - } - - /** - * Set reporting for the CurrentHue attribute [attribute ID 0]. - *

    - * The CurrentHue attribute contains the current hue value of the light. It is updated - * as fast as practical during commands that change the hue. - *

    - * The hue in degrees shall be related to the CurrentHue attribute by the relationship - * Hue = CurrentHue x 360 / 254 (CurrentHue in the range 0 - 254 inclusive) - *

    - * If this attribute is implemented then the CurrentSaturation and ColorMode - * attributes shall also be implemented. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param minInterval {@link int} minimum reporting period - * @param maxInterval {@link int} maximum reporting period - * @param reportableChange {@link Object} delta required to trigger report - * @return the {@link Future} command result future - */ - public Future setCurrentHueReporting(final int minInterval, final int maxInterval, final Object reportableChange) { - return setReporting(attributes.get(ATTR_CURRENTHUE), minInterval, maxInterval, reportableChange); - } - - /** - * Get the CurrentSaturation attribute [attribute ID 1]. - *

    - * The CurrentSaturation attribute holds the current saturation value of the light. It is - * updated as fast as practical during commands that change the saturation. - * The saturation shall be related to the CurrentSaturation attribute by the - * relationship - * Saturation = CurrentSaturation/254 (CurrentSaturation in the range 0 - 254 inclusive) - * If this attribute is implemented then the CurrentHue and ColorMode attributes - * shall also be implemented. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getCurrentSaturationAsync() { - return read(attributes.get(ATTR_CURRENTSATURATION)); - } - - /** - * Synchronously get the CurrentSaturation attribute [attribute ID 1]. - *

    - * The CurrentSaturation attribute holds the current saturation value of the light. It is - * updated as fast as practical during commands that change the saturation. - * The saturation shall be related to the CurrentSaturation attribute by the - * relationship - * Saturation = CurrentSaturation/254 (CurrentSaturation in the range 0 - 254 inclusive) - * If this attribute is implemented then the CurrentHue and ColorMode attributes - * shall also be implemented. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getCurrentSaturation(final long refreshPeriod) { - if (attributes.get(ATTR_CURRENTSATURATION).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_CURRENTSATURATION).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_CURRENTSATURATION)); - } - - /** - * Set reporting for the CurrentSaturation attribute [attribute ID 1]. - *

    - * The CurrentSaturation attribute holds the current saturation value of the light. It is - * updated as fast as practical during commands that change the saturation. - * The saturation shall be related to the CurrentSaturation attribute by the - * relationship - * Saturation = CurrentSaturation/254 (CurrentSaturation in the range 0 - 254 inclusive) - * If this attribute is implemented then the CurrentHue and ColorMode attributes - * shall also be implemented. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param minInterval {@link int} minimum reporting period - * @param maxInterval {@link int} maximum reporting period - * @param reportableChange {@link Object} delta required to trigger report - * @return the {@link Future} command result future - */ - public Future setCurrentSaturationReporting(final int minInterval, final int maxInterval, final Object reportableChange) { - return setReporting(attributes.get(ATTR_CURRENTSATURATION), minInterval, maxInterval, reportableChange); - } - - /** - * Get the RemainingTime attribute [attribute ID 2]. - *

    - * The RemainingTime attribute holds the time remaining, in 1/10ths of a second, - * until the currently active command will be complete. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getRemainingTimeAsync() { - return read(attributes.get(ATTR_REMAININGTIME)); - } - - /** - * Synchronously get the RemainingTime attribute [attribute ID 2]. - *

    - * The RemainingTime attribute holds the time remaining, in 1/10ths of a second, - * until the currently active command will be complete. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getRemainingTime(final long refreshPeriod) { - if (attributes.get(ATTR_REMAININGTIME).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_REMAININGTIME).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_REMAININGTIME)); - } - - /** - * Get the CurrentX attribute [attribute ID 3]. - *

    - * The CurrentX attribute contains the current value of the normalized chromaticity - * value x, as defined in the CIE xyY Color Space. It is updated as fast as practical - * during commands that change the color. - *

    - * The value of x shall be related to the CurrentX attribute by the relationship - *

    - * x = CurrentX / 65535 (CurrentX in the range 0 to 65279 inclusive) - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getCurrentXAsync() { - return read(attributes.get(ATTR_CURRENTX)); - } - - /** - * Synchronously get the CurrentX attribute [attribute ID 3]. - *

    - * The CurrentX attribute contains the current value of the normalized chromaticity - * value x, as defined in the CIE xyY Color Space. It is updated as fast as practical - * during commands that change the color. - *

    - * The value of x shall be related to the CurrentX attribute by the relationship - *

    - * x = CurrentX / 65535 (CurrentX in the range 0 to 65279 inclusive) - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getCurrentX(final long refreshPeriod) { - if (attributes.get(ATTR_CURRENTX).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_CURRENTX).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_CURRENTX)); - } - - /** - * Set reporting for the CurrentX attribute [attribute ID 3]. - *

    - * The CurrentX attribute contains the current value of the normalized chromaticity - * value x, as defined in the CIE xyY Color Space. It is updated as fast as practical - * during commands that change the color. - *

    - * The value of x shall be related to the CurrentX attribute by the relationship - *

    - * x = CurrentX / 65535 (CurrentX in the range 0 to 65279 inclusive) - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param minInterval {@link int} minimum reporting period - * @param maxInterval {@link int} maximum reporting period - * @param reportableChange {@link Object} delta required to trigger report - * @return the {@link Future} command result future - */ - public Future setCurrentXReporting(final int minInterval, final int maxInterval, final Object reportableChange) { - return setReporting(attributes.get(ATTR_CURRENTX), minInterval, maxInterval, reportableChange); - } - - /** - * Get the CurrentY attribute [attribute ID 4]. - *

    - * The CurrentY attribute contains the current value of the normalized chromaticity - * value y, as defined in the CIE xyY Color Space. It is updated as fast as practical - * during commands that change the color. - *

    - * The value of y shall be related to the CurrentY attribute by the relationship - *

    - * y = CurrentY / 65535 (CurrentY in the range 0 to 65279 inclusive) - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getCurrentYAsync() { - return read(attributes.get(ATTR_CURRENTY)); - } - - /** - * Synchronously get the CurrentY attribute [attribute ID 4]. - *

    - * The CurrentY attribute contains the current value of the normalized chromaticity - * value y, as defined in the CIE xyY Color Space. It is updated as fast as practical - * during commands that change the color. - *

    - * The value of y shall be related to the CurrentY attribute by the relationship - *

    - * y = CurrentY / 65535 (CurrentY in the range 0 to 65279 inclusive) - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getCurrentY(final long refreshPeriod) { - if (attributes.get(ATTR_CURRENTY).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_CURRENTY).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_CURRENTY)); - } - - /** - * Set reporting for the CurrentY attribute [attribute ID 4]. - *

    - * The CurrentY attribute contains the current value of the normalized chromaticity - * value y, as defined in the CIE xyY Color Space. It is updated as fast as practical - * during commands that change the color. - *

    - * The value of y shall be related to the CurrentY attribute by the relationship - *

    - * y = CurrentY / 65535 (CurrentY in the range 0 to 65279 inclusive) - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param minInterval {@link int} minimum reporting period - * @param maxInterval {@link int} maximum reporting period - * @param reportableChange {@link Object} delta required to trigger report - * @return the {@link Future} command result future - */ - public Future setCurrentYReporting(final int minInterval, final int maxInterval, final Object reportableChange) { - return setReporting(attributes.get(ATTR_CURRENTY), minInterval, maxInterval, reportableChange); - } - - /** - * Get the DriftCompensation attribute [attribute ID 5]. - *

    - * The DriftCompensation attribute indicates what mechanism, if any, is in use for - * compensation for color/intensity drift over time. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getDriftCompensationAsync() { - return read(attributes.get(ATTR_DRIFTCOMPENSATION)); - } - - /** - * Synchronously get the DriftCompensation attribute [attribute ID 5]. - *

    - * The DriftCompensation attribute indicates what mechanism, if any, is in use for - * compensation for color/intensity drift over time. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getDriftCompensation(final long refreshPeriod) { - if (attributes.get(ATTR_DRIFTCOMPENSATION).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_DRIFTCOMPENSATION).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_DRIFTCOMPENSATION)); - } - - /** - * Get the CompensationText attribute [attribute ID 6]. - *

    - * The CompensationText attribute holds a textual indication of what mechanism, if - * any, is in use to compensate for color/intensity drift over time. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getCompensationTextAsync() { - return read(attributes.get(ATTR_COMPENSATIONTEXT)); - } - - /** - * Synchronously get the CompensationText attribute [attribute ID 6]. - *

    - * The CompensationText attribute holds a textual indication of what mechanism, if - * any, is in use to compensate for color/intensity drift over time. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link String} attribute value, or null on error - */ - public String getCompensationText(final long refreshPeriod) { - if (attributes.get(ATTR_COMPENSATIONTEXT).isLastValueCurrent(refreshPeriod)) { - return (String) attributes.get(ATTR_COMPENSATIONTEXT).getLastValue(); - } - - return (String) readSync(attributes.get(ATTR_COMPENSATIONTEXT)); - } - - /** - * Get the ColorTemperature attribute [attribute ID 7]. - *

    - * The ColorTemperature attribute contains a scaled inverse of the current value of - * the color temperature. It is updated as fast as practical during commands that - * change the color. - *

    - * The color temperature value in Kelvins shall be related to the ColorTemperature - * attribute by the relationship - *

    - * Color temperature = 1,000,000 / ColorTemperature (ColorTemperature in the - * range 1 to 65279 inclusive, giving a color temperature range from 1,000,000 - * Kelvins to 15.32 Kelvins). - *

    - * The value ColorTemperature = 0 indicates an undefined value. The value - * ColorTemperature = 65535 indicates an invalid value. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getColorTemperatureAsync() { - return read(attributes.get(ATTR_COLORTEMPERATURE)); - } - - /** - * Synchronously get the ColorTemperature attribute [attribute ID 7]. - *

    - * The ColorTemperature attribute contains a scaled inverse of the current value of - * the color temperature. It is updated as fast as practical during commands that - * change the color. - *

    - * The color temperature value in Kelvins shall be related to the ColorTemperature - * attribute by the relationship - *

    - * Color temperature = 1,000,000 / ColorTemperature (ColorTemperature in the - * range 1 to 65279 inclusive, giving a color temperature range from 1,000,000 - * Kelvins to 15.32 Kelvins). - *

    - * The value ColorTemperature = 0 indicates an undefined value. The value - * ColorTemperature = 65535 indicates an invalid value. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getColorTemperature(final long refreshPeriod) { - if (attributes.get(ATTR_COLORTEMPERATURE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_COLORTEMPERATURE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_COLORTEMPERATURE)); - } - - /** - * Set reporting for the ColorTemperature attribute [attribute ID 7]. - *

    - * The ColorTemperature attribute contains a scaled inverse of the current value of - * the color temperature. It is updated as fast as practical during commands that - * change the color. - *

    - * The color temperature value in Kelvins shall be related to the ColorTemperature - * attribute by the relationship - *

    - * Color temperature = 1,000,000 / ColorTemperature (ColorTemperature in the - * range 1 to 65279 inclusive, giving a color temperature range from 1,000,000 - * Kelvins to 15.32 Kelvins). - *

    - * The value ColorTemperature = 0 indicates an undefined value. The value - * ColorTemperature = 65535 indicates an invalid value. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param minInterval {@link int} minimum reporting period - * @param maxInterval {@link int} maximum reporting period - * @param reportableChange {@link Object} delta required to trigger report - * @return the {@link Future} command result future - */ - public Future setColorTemperatureReporting(final int minInterval, final int maxInterval, final Object reportableChange) { - return setReporting(attributes.get(ATTR_COLORTEMPERATURE), minInterval, maxInterval, reportableChange); - } - - /** - * Get the ColorMode attribute [attribute ID 8]. - *

    - * The ColorMode attribute indicates which attributes are currently determining the color of the device. - * If either the CurrentHue or CurrentSaturation attribute is implemented, this attribute SHALL also be - * implemented, otherwise it is optional. The value of the ColorMode attribute cannot be written directly - * - it is set upon reception of another command in to the appropriate mode for that command. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getColorModeAsync() { - return read(attributes.get(ATTR_COLORMODE)); - } - - /** - * Synchronously get the ColorMode attribute [attribute ID 8]. - *

    - * The ColorMode attribute indicates which attributes are currently determining the color of the device. - * If either the CurrentHue or CurrentSaturation attribute is implemented, this attribute SHALL also be - * implemented, otherwise it is optional. The value of the ColorMode attribute cannot be written directly - * - it is set upon reception of another command in to the appropriate mode for that command. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getColorMode(final long refreshPeriod) { - if (attributes.get(ATTR_COLORMODE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_COLORMODE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_COLORMODE)); - } - - /** - * Get the EnhancedCurrentHue attribute [attribute ID 16384]. - *

    - * The EnhancedCurrentHueattribute represents non-equidistant steps along the CIE 1931 color - * triangle, and it provides 16-bits precision. The upper 8 bits of this attribute SHALL be - * used as an index in the implementation specific XY lookup table to provide the non-equidistance - * steps (see the ZLL test specification for an example). The lower 8 bits SHALL be used to - * interpolate between these steps in a linear way in order to provide color zoom for the user. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getEnhancedCurrentHueAsync() { - return read(attributes.get(ATTR_ENHANCEDCURRENTHUE)); - } - - /** - * Synchronously get the EnhancedCurrentHue attribute [attribute ID 16384]. - *

    - * The EnhancedCurrentHueattribute represents non-equidistant steps along the CIE 1931 color - * triangle, and it provides 16-bits precision. The upper 8 bits of this attribute SHALL be - * used as an index in the implementation specific XY lookup table to provide the non-equidistance - * steps (see the ZLL test specification for an example). The lower 8 bits SHALL be used to - * interpolate between these steps in a linear way in order to provide color zoom for the user. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getEnhancedCurrentHue(final long refreshPeriod) { - if (attributes.get(ATTR_ENHANCEDCURRENTHUE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_ENHANCEDCURRENTHUE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_ENHANCEDCURRENTHUE)); - } - - /** - * Set reporting for the EnhancedCurrentHue attribute [attribute ID 16384]. - *

    - * The EnhancedCurrentHueattribute represents non-equidistant steps along the CIE 1931 color - * triangle, and it provides 16-bits precision. The upper 8 bits of this attribute SHALL be - * used as an index in the implementation specific XY lookup table to provide the non-equidistance - * steps (see the ZLL test specification for an example). The lower 8 bits SHALL be used to - * interpolate between these steps in a linear way in order to provide color zoom for the user. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param minInterval {@link int} minimum reporting period - * @param maxInterval {@link int} maximum reporting period - * @param reportableChange {@link Object} delta required to trigger report - * @return the {@link Future} command result future - */ - public Future setEnhancedCurrentHueReporting(final int minInterval, final int maxInterval, final Object reportableChange) { - return setReporting(attributes.get(ATTR_ENHANCEDCURRENTHUE), minInterval, maxInterval, reportableChange); - } - - /** - * Get the EnhancedColorMode attribute [attribute ID 16385]. - *

    - * The EnhancedColorModeattribute specifies which attributes are currently determining the color of the device. - * To provide compatibility with standard ZCL, the original ColorModeattribute SHALLindicate ‘CurrentHueand CurrentSaturation’ - * when the light uses the EnhancedCurrentHueattribute. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getEnhancedColorModeAsync() { - return read(attributes.get(ATTR_ENHANCEDCOLORMODE)); - } - - /** - * Synchronously get the EnhancedColorMode attribute [attribute ID 16385]. - *

    - * The EnhancedColorModeattribute specifies which attributes are currently determining the color of the device. - * To provide compatibility with standard ZCL, the original ColorModeattribute SHALLindicate ‘CurrentHueand CurrentSaturation’ - * when the light uses the EnhancedCurrentHueattribute. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getEnhancedColorMode(final long refreshPeriod) { - if (attributes.get(ATTR_ENHANCEDCOLORMODE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_ENHANCEDCOLORMODE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_ENHANCEDCOLORMODE)); - } - - /** - * Get the ColorLoopActive attribute [attribute ID 16386]. - *

    - * The ColorLoopActive attribute specifies the current active status of the color loop. - * If this attribute has the value 0x00, the color loop SHALLnot be active. If this attribute - * has the value 0x01, the color loop SHALL be active. All other values (0x02 – 0xff) are reserved. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getColorLoopActiveAsync() { - return read(attributes.get(ATTR_COLORLOOPACTIVE)); - } - - /** - * Synchronously get the ColorLoopActive attribute [attribute ID 16386]. - *

    - * The ColorLoopActive attribute specifies the current active status of the color loop. - * If this attribute has the value 0x00, the color loop SHALLnot be active. If this attribute - * has the value 0x01, the color loop SHALL be active. All other values (0x02 – 0xff) are reserved. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getColorLoopActive(final long refreshPeriod) { - if (attributes.get(ATTR_COLORLOOPACTIVE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_COLORLOOPACTIVE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_COLORLOOPACTIVE)); - } - - /** - * Get the ColorLoopDirection attribute [attribute ID 16387]. - *

    - * The ColorLoopDirection attribute specifies the current direction of the color loop. - * If this attribute has the value 0x00, the EnhancedCurrentHue attribute SHALL be decremented. - * If this attribute has the value 0x01, the EnhancedCurrentHue attribute SHALL be incremented. - * All other values (0x02 – 0xff) are reserved. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getColorLoopDirectionAsync() { - return read(attributes.get(ATTR_COLORLOOPDIRECTION)); - } - - /** - * Synchronously get the ColorLoopDirection attribute [attribute ID 16387]. - *

    - * The ColorLoopDirection attribute specifies the current direction of the color loop. - * If this attribute has the value 0x00, the EnhancedCurrentHue attribute SHALL be decremented. - * If this attribute has the value 0x01, the EnhancedCurrentHue attribute SHALL be incremented. - * All other values (0x02 – 0xff) are reserved. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getColorLoopDirection(final long refreshPeriod) { - if (attributes.get(ATTR_COLORLOOPDIRECTION).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_COLORLOOPDIRECTION).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_COLORLOOPDIRECTION)); - } - - /** - * Get the ColorLoopTime attribute [attribute ID 16388]. - *

    - * The ColorLoopTime attribute specifies the number of seconds it SHALL take to perform a full - * color loop, i.e.,to cycle all values of the EnhancedCurrentHue attribute (between 0x0000 and 0xffff). - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getColorLoopTimeAsync() { - return read(attributes.get(ATTR_COLORLOOPTIME)); - } - - /** - * Synchronously get the ColorLoopTime attribute [attribute ID 16388]. - *

    - * The ColorLoopTime attribute specifies the number of seconds it SHALL take to perform a full - * color loop, i.e.,to cycle all values of the EnhancedCurrentHue attribute (between 0x0000 and 0xffff). - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getColorLoopTime(final long refreshPeriod) { - if (attributes.get(ATTR_COLORLOOPTIME).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_COLORLOOPTIME).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_COLORLOOPTIME)); - } - - /** - * Get the ColorLoopStartHue attribute [attribute ID 16389]. - *

    - * The ColorLoopStartEnhancedHueattribute specifies the value of the EnhancedCurrentHue attribute - * from which the color loop SHALL be started. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getColorLoopStartHueAsync() { - return read(attributes.get(ATTR_COLORLOOPSTARTHUE)); - } - - /** - * Synchronously get the ColorLoopStartHue attribute [attribute ID 16389]. - *

    - * The ColorLoopStartEnhancedHueattribute specifies the value of the EnhancedCurrentHue attribute - * from which the color loop SHALL be started. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getColorLoopStartHue(final long refreshPeriod) { - if (attributes.get(ATTR_COLORLOOPSTARTHUE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_COLORLOOPSTARTHUE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_COLORLOOPSTARTHUE)); - } - - /** - * Get the ColorLoopStoredHue attribute [attribute ID 16390]. - *

    - * The ColorLoopStoredEnhancedHue attribute specifies the value of the EnhancedCurrentHue attribute - * before the color loop was started. Once the color loop is complete, the EnhancedCurrentHue - * attribute SHALL be restored to this value. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getColorLoopStoredHueAsync() { - return read(attributes.get(ATTR_COLORLOOPSTOREDHUE)); - } - - /** - * Synchronously get the ColorLoopStoredHue attribute [attribute ID 16390]. - *

    - * The ColorLoopStoredEnhancedHue attribute specifies the value of the EnhancedCurrentHue attribute - * before the color loop was started. Once the color loop is complete, the EnhancedCurrentHue - * attribute SHALL be restored to this value. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getColorLoopStoredHue(final long refreshPeriod) { - if (attributes.get(ATTR_COLORLOOPSTOREDHUE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_COLORLOOPSTOREDHUE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_COLORLOOPSTOREDHUE)); - } - - /** - * Get the ColorCapabilities attribute [attribute ID 16394]. - *

    - * The ColorCapabilitiesattribute specifies the color capabilities of the device supporting the - * color control cluster. - *

    - * Note:The support of the CurrentXand CurrentYattributes is mandatory regardless of color capabilities. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getColorCapabilitiesAsync() { - return read(attributes.get(ATTR_COLORCAPABILITIES)); - } - - /** - * Synchronously get the ColorCapabilities attribute [attribute ID 16394]. - *

    - * The ColorCapabilitiesattribute specifies the color capabilities of the device supporting the - * color control cluster. - *

    - * Note:The support of the CurrentXand CurrentYattributes is mandatory regardless of color capabilities. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getColorCapabilities(final long refreshPeriod) { - if (attributes.get(ATTR_COLORCAPABILITIES).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_COLORCAPABILITIES).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_COLORCAPABILITIES)); - } - - /** - * Get the ColorTemperatureMin attribute [attribute ID 16395]. - *

    - * The ColorTempPhysicalMinMiredsattribute indicates the minimum mired value - * supported by the hardware. ColorTempPhysicalMinMiredscorresponds to the maximum - * color temperature in kelvins supported by the hardware. - * ColorTempPhysicalMinMireds ≤ ColorTemperatureMireds - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getColorTemperatureMinAsync() { - return read(attributes.get(ATTR_COLORTEMPERATUREMIN)); - } - - /** - * Synchronously get the ColorTemperatureMin attribute [attribute ID 16395]. - *

    - * The ColorTempPhysicalMinMiredsattribute indicates the minimum mired value - * supported by the hardware. ColorTempPhysicalMinMiredscorresponds to the maximum - * color temperature in kelvins supported by the hardware. - * ColorTempPhysicalMinMireds ≤ ColorTemperatureMireds - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getColorTemperatureMin(final long refreshPeriod) { - if (attributes.get(ATTR_COLORTEMPERATUREMIN).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_COLORTEMPERATUREMIN).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_COLORTEMPERATUREMIN)); - } - - /** - * Get the ColorTemperatureMax attribute [attribute ID 16396]. - *

    - * The ColorTempPhysicalMaxMiredsattribute indicates the maximum mired value - * supported by the hard-ware. ColorTempPhysicalMaxMiredscorresponds to the minimum - * color temperature in kelvins supported by the hardware. - * ColorTemperatureMireds ≤ ColorTempPhysicalMaxMireds. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getColorTemperatureMaxAsync() { - return read(attributes.get(ATTR_COLORTEMPERATUREMAX)); - } - - /** - * Synchronously get the ColorTemperatureMax attribute [attribute ID 16396]. - *

    - * The ColorTempPhysicalMaxMiredsattribute indicates the maximum mired value - * supported by the hard-ware. ColorTempPhysicalMaxMiredscorresponds to the minimum - * color temperature in kelvins supported by the hardware. - * ColorTemperatureMireds ≤ ColorTempPhysicalMaxMireds. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getColorTemperatureMax(final long refreshPeriod) { - if (attributes.get(ATTR_COLORTEMPERATUREMAX).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_COLORTEMPERATUREMAX).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_COLORTEMPERATUREMAX)); - } - - /** - * The Move to Hue Command - * - * @param hue {@link Integer} Hue - * @param direction {@link Integer} Direction - * @param transitionTime {@link Integer} Transition time - * @return the {@link Future} command result future - */ - public Future moveToHueCommand(Integer hue, Integer direction, Integer transitionTime) { - MoveToHueCommand command = new MoveToHueCommand(); - - // Set the fields - command.setHue(hue); - command.setDirection(direction); - command.setTransitionTime(transitionTime); - - return send(command); - } - - /** - * The Move Hue Command - * - * @param moveMode {@link Integer} Move mode - * @param rate {@link Integer} Rate - * @return the {@link Future} command result future - */ - public Future moveHueCommand(Integer moveMode, Integer rate) { - MoveHueCommand command = new MoveHueCommand(); - - // Set the fields - command.setMoveMode(moveMode); - command.setRate(rate); - - return send(command); - } - - /** - * The Step Hue Command - * - * @param stepMode {@link Integer} Step mode - * @param stepSize {@link Integer} Step size - * @param transitionTime {@link Integer} Transition time - * @return the {@link Future} command result future - */ - public Future stepHueCommand(Integer stepMode, Integer stepSize, Integer transitionTime) { - StepHueCommand command = new StepHueCommand(); - - // Set the fields - command.setStepMode(stepMode); - command.setStepSize(stepSize); - command.setTransitionTime(transitionTime); - - return send(command); - } - - /** - * The Move to Saturation Command - * - * @param saturation {@link Integer} Saturation - * @param transitionTime {@link Integer} Transition time - * @return the {@link Future} command result future - */ - public Future moveToSaturationCommand(Integer saturation, Integer transitionTime) { - MoveToSaturationCommand command = new MoveToSaturationCommand(); - - // Set the fields - command.setSaturation(saturation); - command.setTransitionTime(transitionTime); - - return send(command); - } - - /** - * The Move Saturation Command - * - * @param moveMode {@link Integer} Move mode - * @param rate {@link Integer} Rate - * @return the {@link Future} command result future - */ - public Future moveSaturationCommand(Integer moveMode, Integer rate) { - MoveSaturationCommand command = new MoveSaturationCommand(); - - // Set the fields - command.setMoveMode(moveMode); - command.setRate(rate); - - return send(command); - } - - /** - * The Step Saturation Command - * - * @param stepMode {@link Integer} Step mode - * @param stepSize {@link Integer} Step size - * @param transitionTime {@link Integer} Transition time - * @return the {@link Future} command result future - */ - public Future stepSaturationCommand(Integer stepMode, Integer stepSize, Integer transitionTime) { - StepSaturationCommand command = new StepSaturationCommand(); - - // Set the fields - command.setStepMode(stepMode); - command.setStepSize(stepSize); - command.setTransitionTime(transitionTime); - - return send(command); - } - - /** - * The Move to Hue and Saturation Command - * - * @param hue {@link Integer} Hue - * @param saturation {@link Integer} Saturation - * @param transitionTime {@link Integer} Transition time - * @return the {@link Future} command result future - */ - public Future moveToHueAndSaturationCommand(Integer hue, Integer saturation, Integer transitionTime) { - MoveToHueAndSaturationCommand command = new MoveToHueAndSaturationCommand(); - - // Set the fields - command.setHue(hue); - command.setSaturation(saturation); - command.setTransitionTime(transitionTime); - - return send(command); - } - - /** - * The Move to Color Command - * - * @param colorX {@link Integer} ColorX - * @param colorY {@link Integer} ColorY - * @param transitionTime {@link Integer} Transition time - * @return the {@link Future} command result future - */ - public Future moveToColorCommand(Integer colorX, Integer colorY, Integer transitionTime) { - MoveToColorCommand command = new MoveToColorCommand(); - - // Set the fields - command.setColorX(colorX); - command.setColorY(colorY); - command.setTransitionTime(transitionTime); - - return send(command); - } - - /** - * The Move Color Command - * - * @param rateX {@link Integer} RateX - * @param rateY {@link Integer} RateY - * @return the {@link Future} command result future - */ - public Future moveColorCommand(Integer rateX, Integer rateY) { - MoveColorCommand command = new MoveColorCommand(); - - // Set the fields - command.setRateX(rateX); - command.setRateY(rateY); - - return send(command); - } - - /** - * The Step Color Command - * - * @param stepX {@link Integer} StepX - * @param stepY {@link Integer} StepY - * @param transitionTime {@link Integer} Transition time - * @return the {@link Future} command result future - */ - public Future stepColorCommand(Integer stepX, Integer stepY, Integer transitionTime) { - StepColorCommand command = new StepColorCommand(); - - // Set the fields - command.setStepX(stepX); - command.setStepY(stepY); - command.setTransitionTime(transitionTime); - - return send(command); - } - - /** - * The Move to Color Temperature Command - * - * @param colorTemperature {@link Integer} Color Temperature - * @param transitionTime {@link Integer} Transition time - * @return the {@link Future} command result future - */ - public Future moveToColorTemperatureCommand(Integer colorTemperature, Integer transitionTime) { - MoveToColorTemperatureCommand command = new MoveToColorTemperatureCommand(); - - // Set the fields - command.setColorTemperature(colorTemperature); - command.setTransitionTime(transitionTime); - - return send(command); - } - - /** - * The Enhanced Move To Hue Command - * - * @param hue {@link Integer} Hue - * @param direction {@link Integer} Direction - * @param transitionTime {@link Integer} Transition time - * @return the {@link Future} command result future - */ - public Future enhancedMoveToHueCommand(Integer hue, Integer direction, Integer transitionTime) { - EnhancedMoveToHueCommand command = new EnhancedMoveToHueCommand(); - - // Set the fields - command.setHue(hue); - command.setDirection(direction); - command.setTransitionTime(transitionTime); - - return send(command); - } - - /** - * The Enhanced Step Hue Command - * - * @param stepMode {@link Integer} Step Mode - * @param stepSize {@link Integer} Step Size - * @param transitionTime {@link Integer} Transition time - * @return the {@link Future} command result future - */ - public Future enhancedStepHueCommand(Integer stepMode, Integer stepSize, Integer transitionTime) { - EnhancedStepHueCommand command = new EnhancedStepHueCommand(); - - // Set the fields - command.setStepMode(stepMode); - command.setStepSize(stepSize); - command.setTransitionTime(transitionTime); - - return send(command); - } - - /** - * The Enhanced Move To Hue and Saturation Command - * - * @param hue {@link Integer} Hue - * @param saturation {@link Integer} Saturation - * @param transitionTime {@link Integer} Transition time - * @return the {@link Future} command result future - */ - public Future enhancedMoveToHueAndSaturationCommand(Integer hue, Integer saturation, Integer transitionTime) { - EnhancedMoveToHueAndSaturationCommand command = new EnhancedMoveToHueAndSaturationCommand(); - - // Set the fields - command.setHue(hue); - command.setSaturation(saturation); - command.setTransitionTime(transitionTime); - - return send(command); - } - - /** - * The Color Loop Set Command - * - * @param updateFlags {@link Integer} Update Flags - * @param action {@link Integer} Action - * @param direction {@link Integer} Direction - * @param transitionTime {@link Integer} Transition time - * @param startHue {@link Integer} Start Hue - * @return the {@link Future} command result future - */ - public Future colorLoopSetCommand(Integer updateFlags, Integer action, Integer direction, Integer transitionTime, Integer startHue) { - ColorLoopSetCommand command = new ColorLoopSetCommand(); - - // Set the fields - command.setUpdateFlags(updateFlags); - command.setAction(action); - command.setDirection(direction); - command.setTransitionTime(transitionTime); - command.setStartHue(startHue); - - return send(command); - } - - @Override - public ZclCommand getCommandFromId(int commandId) { - switch (commandId) { - case 0: // MOVE_TO_HUE_COMMAND - return new MoveToHueCommand(); - case 1: // MOVE_HUE_COMMAND - return new MoveHueCommand(); - case 2: // STEP_HUE_COMMAND - return new StepHueCommand(); - case 3: // MOVE_TO_SATURATION_COMMAND - return new MoveToSaturationCommand(); - case 4: // MOVE_SATURATION_COMMAND - return new MoveSaturationCommand(); - case 5: // STEP_SATURATION_COMMAND - return new StepSaturationCommand(); - case 6: // MOVE_TO_HUE_AND_SATURATION_COMMAND - return new MoveToHueAndSaturationCommand(); - case 7: // MOVE_TO_COLOR_COMMAND - return new MoveToColorCommand(); - case 8: // MOVE_COLOR_COMMAND - return new MoveColorCommand(); - case 9: // STEP_COLOR_COMMAND - return new StepColorCommand(); - case 10: // MOVE_TO_COLOR_TEMPERATURE_COMMAND - return new MoveToColorTemperatureCommand(); - case 64: // ENHANCED_MOVE_TO_HUE_COMMAND - return new EnhancedMoveToHueCommand(); - case 65: // ENHANCED_STEP_HUE_COMMAND - return new EnhancedStepHueCommand(); - case 66: // ENHANCED_MOVE_TO_HUE_AND_SATURATION_COMMAND - return new EnhancedMoveToHueAndSaturationCommand(); - case 67: // COLOR_LOOP_SET_COMMAND - return new ColorLoopSetCommand(); - default: - return null; - } - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclCommissioningCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclCommissioningCluster.java deleted file mode 100644 index a0c810065..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclCommissioningCluster.java +++ /dev/null @@ -1,222 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.CommandResult; -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.clusters.commissioning.ResetStartupParametersCommand; -import com.zsmartsystems.zigbee.zcl.clusters.commissioning.ResetStartupParametersResponse; -import com.zsmartsystems.zigbee.zcl.clusters.commissioning.RestartDeviceCommand; -import com.zsmartsystems.zigbee.zcl.clusters.commissioning.RestartDeviceResponseResponse; -import com.zsmartsystems.zigbee.zcl.clusters.commissioning.RestoreStartupParametersCommand; -import com.zsmartsystems.zigbee.zcl.clusters.commissioning.RestoreStartupParametersResponse; -import com.zsmartsystems.zigbee.zcl.clusters.commissioning.SaveStartupParametersCommand; -import com.zsmartsystems.zigbee.zcl.clusters.commissioning.SaveStartupParametersResponse; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Future; -import javax.annotation.Generated; - -/** - * Commissioning cluster implementation (Cluster ID 0x0015). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclCommissioningCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0015; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Commissioning"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Commissioning cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclCommissioningCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } - - /** - * The Restart Device Command - * - * @param option {@link Integer} Option - * @param delay {@link Integer} Delay - * @param jitter {@link Integer} Jitter - * @return the {@link Future} command result future - */ - public Future restartDeviceCommand(Integer option, Integer delay, Integer jitter) { - RestartDeviceCommand command = new RestartDeviceCommand(); - - // Set the fields - command.setOption(option); - command.setDelay(delay); - command.setJitter(jitter); - - return send(command); - } - - /** - * The Save Startup Parameters Command - * - * @param option {@link Integer} Option - * @param index {@link Integer} Index - * @return the {@link Future} command result future - */ - public Future saveStartupParametersCommand(Integer option, Integer index) { - SaveStartupParametersCommand command = new SaveStartupParametersCommand(); - - // Set the fields - command.setOption(option); - command.setIndex(index); - - return send(command); - } - - /** - * The Restore Startup Parameters Command - * - * @param option {@link Integer} Option - * @param index {@link Integer} Index - * @return the {@link Future} command result future - */ - public Future restoreStartupParametersCommand(Integer option, Integer index) { - RestoreStartupParametersCommand command = new RestoreStartupParametersCommand(); - - // Set the fields - command.setOption(option); - command.setIndex(index); - - return send(command); - } - - /** - * The Reset Startup Parameters Command - * - * @param option {@link Integer} Option - * @param index {@link Integer} Index - * @return the {@link Future} command result future - */ - public Future resetStartupParametersCommand(Integer option, Integer index) { - ResetStartupParametersCommand command = new ResetStartupParametersCommand(); - - // Set the fields - command.setOption(option); - command.setIndex(index); - - return send(command); - } - - /** - * The Restart Device Response Response - * - * @param status {@link Integer} Status - * @return the {@link Future} command result future - */ - public Future restartDeviceResponseResponse(Integer status) { - RestartDeviceResponseResponse command = new RestartDeviceResponseResponse(); - - // Set the fields - command.setStatus(status); - - return send(command); - } - - /** - * The Save Startup Parameters Response - * - * @param status {@link Integer} Status - * @return the {@link Future} command result future - */ - public Future saveStartupParametersResponse(Integer status) { - SaveStartupParametersResponse command = new SaveStartupParametersResponse(); - - // Set the fields - command.setStatus(status); - - return send(command); - } - - /** - * The Restore Startup Parameters Response - * - * @param status {@link Integer} Status - * @return the {@link Future} command result future - */ - public Future restoreStartupParametersResponse(Integer status) { - RestoreStartupParametersResponse command = new RestoreStartupParametersResponse(); - - // Set the fields - command.setStatus(status); - - return send(command); - } - - /** - * The Reset Startup Parameters Response - * - * @param status {@link Integer} Status - * @return the {@link Future} command result future - */ - public Future resetStartupParametersResponse(Integer status) { - ResetStartupParametersResponse command = new ResetStartupParametersResponse(); - - // Set the fields - command.setStatus(status); - - return send(command); - } - - @Override - public ZclCommand getCommandFromId(int commandId) { - switch (commandId) { - case 0: // RESTART_DEVICE_COMMAND - return new RestartDeviceCommand(); - case 1: // SAVE_STARTUP_PARAMETERS_COMMAND - return new SaveStartupParametersCommand(); - case 2: // RESTORE_STARTUP_PARAMETERS_COMMAND - return new RestoreStartupParametersCommand(); - case 3: // RESET_STARTUP_PARAMETERS_COMMAND - return new ResetStartupParametersCommand(); - default: - return null; - } - } - - @Override - public ZclCommand getResponseFromId(int commandId) { - switch (commandId) { - case 0: // RESTART_DEVICE_RESPONSE_RESPONSE - return new RestartDeviceResponseResponse(); - case 1: // SAVE_STARTUP_PARAMETERS_RESPONSE - return new SaveStartupParametersResponse(); - case 2: // RESTORE_STARTUP_PARAMETERS_RESPONSE - return new RestoreStartupParametersResponse(); - case 3: // RESET_STARTUP_PARAMETERS_RESPONSE - return new ResetStartupParametersResponse(); - default: - return null; - } - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclDehumidificationControlCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclDehumidificationControlCluster.java deleted file mode 100644 index 0d8efff56..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclDehumidificationControlCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Dehumidification Control cluster implementation (Cluster ID 0x0203). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclDehumidificationControlCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0203; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Dehumidification Control"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Dehumidification Control cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclDehumidificationControlCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclDemandResponseAndLoadControlCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclDemandResponseAndLoadControlCluster.java deleted file mode 100644 index 121a9e1f0..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclDemandResponseAndLoadControlCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Demand Response and Load Control cluster implementation (Cluster ID 0x0701). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclDemandResponseAndLoadControlCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0701; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Demand Response and Load Control"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Demand Response and Load Control cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclDemandResponseAndLoadControlCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclDeviceTemperatureConfigurationCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclDeviceTemperatureConfigurationCluster.java deleted file mode 100644 index 38f284cb6..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclDeviceTemperatureConfigurationCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Device Temperature Configuration cluster implementation (Cluster ID 0x0002). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclDeviceTemperatureConfigurationCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0002; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Device Temperature Configuration"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Device Temperature Configuration cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclDeviceTemperatureConfigurationCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclDiagnosticsCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclDiagnosticsCluster.java deleted file mode 100644 index 37425e16c..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclDiagnosticsCluster.java +++ /dev/null @@ -1,1316 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.CommandResult; -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import com.zsmartsystems.zigbee.zcl.protocol.ZclClusterType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Future; -import javax.annotation.Generated; - -/** - * Diagnostics cluster implementation (Cluster ID 0x0B05). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclDiagnosticsCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0B05; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Diagnostics"; - - // Attribute constants - /** - */ - public static final int ATTR_MACRXBCAST = 0x0100; - /** - */ - public static final int ATTR_MACTXBCAST = 0x0101; - /** - */ - public static final int ATTR_MACRXUCAST = 0x0102; - /** - */ - public static final int ATTR_MACTXUCAST = 0x0103; - /** - */ - public static final int ATTR_MACTXUCASTRETRY = 0x0104; - /** - */ - public static final int ATTR_MACTXUCASTFAIL = 0x0105; - /** - */ - public static final int ATTR_APSRXBCAST = 0x0106; - /** - */ - public static final int ATTR_APSTXBCAST = 0x0107; - /** - */ - public static final int ATTR_APSRXUCAST = 0x0108; - /** - */ - public static final int ATTR_APSTXUCASTSUCCESS = 0x0109; - /** - */ - public static final int ATTR_APSTXUCASTRETRY = 0x010A; - /** - */ - public static final int ATTR_APSTXUCASTFAIL = 0x010B; - /** - */ - public static final int ATTR_ROUTEDISCINITIATED = 0x010C; - /** - */ - public static final int ATTR_NEIGHBORADDED = 0x010D; - /** - */ - public static final int ATTR_NEIGHBORREMOVED = 0x010E; - /** - */ - public static final int ATTR_NEIGHBORSTALE = 0x010F; - /** - */ - public static final int ATTR_JOININDICATION = 0x0110; - /** - */ - public static final int ATTR_CHILDMOVED = 0x0111; - /** - */ - public static final int ATTR_NWKFCFAILURE = 0x0112; - /** - */ - public static final int ATTR_APSFCFAILURE = 0x0113; - /** - */ - public static final int ATTR_APSUNAUTHORIZEDKEY = 0x0114; - /** - */ - public static final int ATTR_NWKDECRYPTFAILURES = 0x0115; - /** - */ - public static final int ATTR_APSDECRYPTFAILURES = 0x0116; - /** - */ - public static final int ATTR_PACKETBUFFERALLOCATEFAILURES = 0x0117; - /** - */ - public static final int ATTR_RELAYEDUCAST = 0x0118; - /** - */ - public static final int ATTR_PHYTOMACQUEUELIMITREACHED = 0x0119; - /** - */ - public static final int ATTR_PACKETVALIDATEDROPCOUNT = 0x011A; - /** - */ - public static final int ATTR_AVERAGEMACRETRYPERAPSMESSAGESENT = 0x011B; - /** - */ - public static final int ATTR_LASTMESSAGELQI = 0x011C; - /** - */ - public static final int ATTR_LASTMESSAGERSSI = 0x011D; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(30); - - attributeMap.put(ATTR_MACRXBCAST, new ZclAttribute(ZclClusterType.DIAGNOSTICS, ATTR_MACRXBCAST, "MacRxBcast", ZclDataType.UNSIGNED_32_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_MACTXBCAST, new ZclAttribute(ZclClusterType.DIAGNOSTICS, ATTR_MACTXBCAST, "MacTxBcast", ZclDataType.UNSIGNED_32_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_MACRXUCAST, new ZclAttribute(ZclClusterType.DIAGNOSTICS, ATTR_MACRXUCAST, "MacRxUcast", ZclDataType.UNSIGNED_32_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_MACTXUCAST, new ZclAttribute(ZclClusterType.DIAGNOSTICS, ATTR_MACTXUCAST, "MacTxUcast", ZclDataType.UNSIGNED_32_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_MACTXUCASTRETRY, new ZclAttribute(ZclClusterType.DIAGNOSTICS, ATTR_MACTXUCASTRETRY, "MacTxUcastRetry", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_MACTXUCASTFAIL, new ZclAttribute(ZclClusterType.DIAGNOSTICS, ATTR_MACTXUCASTFAIL, "MacTxUcastFail", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_APSRXBCAST, new ZclAttribute(ZclClusterType.DIAGNOSTICS, ATTR_APSRXBCAST, "APSRxBcast", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_APSTXBCAST, new ZclAttribute(ZclClusterType.DIAGNOSTICS, ATTR_APSTXBCAST, "APSTxBcast", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_APSRXUCAST, new ZclAttribute(ZclClusterType.DIAGNOSTICS, ATTR_APSRXUCAST, "APSRxUcast", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_APSTXUCASTSUCCESS, new ZclAttribute(ZclClusterType.DIAGNOSTICS, ATTR_APSTXUCASTSUCCESS, "APSTxUcastSuccess", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_APSTXUCASTRETRY, new ZclAttribute(ZclClusterType.DIAGNOSTICS, ATTR_APSTXUCASTRETRY, "APSTxUcastRetry", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_APSTXUCASTFAIL, new ZclAttribute(ZclClusterType.DIAGNOSTICS, ATTR_APSTXUCASTFAIL, "APSTxUcastFail", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_ROUTEDISCINITIATED, new ZclAttribute(ZclClusterType.DIAGNOSTICS, ATTR_ROUTEDISCINITIATED, "RouteDiscInitiated", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_NEIGHBORADDED, new ZclAttribute(ZclClusterType.DIAGNOSTICS, ATTR_NEIGHBORADDED, "NeighborAdded", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_NEIGHBORREMOVED, new ZclAttribute(ZclClusterType.DIAGNOSTICS, ATTR_NEIGHBORREMOVED, "NeighborRemoved", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_NEIGHBORSTALE, new ZclAttribute(ZclClusterType.DIAGNOSTICS, ATTR_NEIGHBORSTALE, "NeighborStale", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_JOININDICATION, new ZclAttribute(ZclClusterType.DIAGNOSTICS, ATTR_JOININDICATION, "JoinIndication", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_CHILDMOVED, new ZclAttribute(ZclClusterType.DIAGNOSTICS, ATTR_CHILDMOVED, "ChildMoved", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_NWKFCFAILURE, new ZclAttribute(ZclClusterType.DIAGNOSTICS, ATTR_NWKFCFAILURE, "NWKFCFailure", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_APSFCFAILURE, new ZclAttribute(ZclClusterType.DIAGNOSTICS, ATTR_APSFCFAILURE, "APSFCFailure", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_APSUNAUTHORIZEDKEY, new ZclAttribute(ZclClusterType.DIAGNOSTICS, ATTR_APSUNAUTHORIZEDKEY, "APSUnauthorizedKey", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_NWKDECRYPTFAILURES, new ZclAttribute(ZclClusterType.DIAGNOSTICS, ATTR_NWKDECRYPTFAILURES, "NWKDecryptFailures", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_APSDECRYPTFAILURES, new ZclAttribute(ZclClusterType.DIAGNOSTICS, ATTR_APSDECRYPTFAILURES, "APSDecryptFailures", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_PACKETBUFFERALLOCATEFAILURES, new ZclAttribute(ZclClusterType.DIAGNOSTICS, ATTR_PACKETBUFFERALLOCATEFAILURES, "PacketBufferAllocateFailures", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_RELAYEDUCAST, new ZclAttribute(ZclClusterType.DIAGNOSTICS, ATTR_RELAYEDUCAST, "RelayedUcast", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_PHYTOMACQUEUELIMITREACHED, new ZclAttribute(ZclClusterType.DIAGNOSTICS, ATTR_PHYTOMACQUEUELIMITREACHED, "PhytoMACqueuelimitreached", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_PACKETVALIDATEDROPCOUNT, new ZclAttribute(ZclClusterType.DIAGNOSTICS, ATTR_PACKETVALIDATEDROPCOUNT, "PacketValidatedropcount", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_AVERAGEMACRETRYPERAPSMESSAGESENT, new ZclAttribute(ZclClusterType.DIAGNOSTICS, ATTR_AVERAGEMACRETRYPERAPSMESSAGESENT, "AverageMACRetryPerAPSMessageSent", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_LASTMESSAGELQI, new ZclAttribute(ZclClusterType.DIAGNOSTICS, ATTR_LASTMESSAGELQI, "LastMessageLQI", ZclDataType.UNSIGNED_8_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_LASTMESSAGERSSI, new ZclAttribute(ZclClusterType.DIAGNOSTICS, ATTR_LASTMESSAGERSSI, "LastMessageRSSI", ZclDataType.SIGNED_8_BIT_INTEGER, true, true, false, false)); - - return attributeMap; - } - - /** - * Default constructor to create a Diagnostics cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclDiagnosticsCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } - - /** - * Get the MacRxBcast attribute [attribute ID 256]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getMacRxBcastAsync() { - return read(attributes.get(ATTR_MACRXBCAST)); - } - - /** - * Synchronously get the MacRxBcast attribute [attribute ID 256]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMacRxBcast(final long refreshPeriod) { - if (attributes.get(ATTR_MACRXBCAST).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MACRXBCAST).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MACRXBCAST)); - } - - /** - * Get the MacTxBcast attribute [attribute ID 257]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getMacTxBcastAsync() { - return read(attributes.get(ATTR_MACTXBCAST)); - } - - /** - * Synchronously get the MacTxBcast attribute [attribute ID 257]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMacTxBcast(final long refreshPeriod) { - if (attributes.get(ATTR_MACTXBCAST).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MACTXBCAST).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MACTXBCAST)); - } - - /** - * Get the MacRxUcast attribute [attribute ID 258]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getMacRxUcastAsync() { - return read(attributes.get(ATTR_MACRXUCAST)); - } - - /** - * Synchronously get the MacRxUcast attribute [attribute ID 258]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMacRxUcast(final long refreshPeriod) { - if (attributes.get(ATTR_MACRXUCAST).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MACRXUCAST).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MACRXUCAST)); - } - - /** - * Get the MacTxUcast attribute [attribute ID 259]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getMacTxUcastAsync() { - return read(attributes.get(ATTR_MACTXUCAST)); - } - - /** - * Synchronously get the MacTxUcast attribute [attribute ID 259]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMacTxUcast(final long refreshPeriod) { - if (attributes.get(ATTR_MACTXUCAST).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MACTXUCAST).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MACTXUCAST)); - } - - /** - * Get the MacTxUcastRetry attribute [attribute ID 260]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getMacTxUcastRetryAsync() { - return read(attributes.get(ATTR_MACTXUCASTRETRY)); - } - - /** - * Synchronously get the MacTxUcastRetry attribute [attribute ID 260]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMacTxUcastRetry(final long refreshPeriod) { - if (attributes.get(ATTR_MACTXUCASTRETRY).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MACTXUCASTRETRY).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MACTXUCASTRETRY)); - } - - /** - * Get the MacTxUcastFail attribute [attribute ID 261]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getMacTxUcastFailAsync() { - return read(attributes.get(ATTR_MACTXUCASTFAIL)); - } - - /** - * Synchronously get the MacTxUcastFail attribute [attribute ID 261]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMacTxUcastFail(final long refreshPeriod) { - if (attributes.get(ATTR_MACTXUCASTFAIL).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MACTXUCASTFAIL).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MACTXUCASTFAIL)); - } - - /** - * Get the APSRxBcast attribute [attribute ID 262]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getApsRxBcastAsync() { - return read(attributes.get(ATTR_APSRXBCAST)); - } - - /** - * Synchronously get the APSRxBcast attribute [attribute ID 262]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getApsRxBcast(final long refreshPeriod) { - if (attributes.get(ATTR_APSRXBCAST).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_APSRXBCAST).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_APSRXBCAST)); - } - - /** - * Get the APSTxBcast attribute [attribute ID 263]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getApsTxBcastAsync() { - return read(attributes.get(ATTR_APSTXBCAST)); - } - - /** - * Synchronously get the APSTxBcast attribute [attribute ID 263]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getApsTxBcast(final long refreshPeriod) { - if (attributes.get(ATTR_APSTXBCAST).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_APSTXBCAST).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_APSTXBCAST)); - } - - /** - * Get the APSRxUcast attribute [attribute ID 264]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getApsRxUcastAsync() { - return read(attributes.get(ATTR_APSRXUCAST)); - } - - /** - * Synchronously get the APSRxUcast attribute [attribute ID 264]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getApsRxUcast(final long refreshPeriod) { - if (attributes.get(ATTR_APSRXUCAST).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_APSRXUCAST).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_APSRXUCAST)); - } - - /** - * Get the APSTxUcastSuccess attribute [attribute ID 265]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getApsTxUcastSuccessAsync() { - return read(attributes.get(ATTR_APSTXUCASTSUCCESS)); - } - - /** - * Synchronously get the APSTxUcastSuccess attribute [attribute ID 265]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getApsTxUcastSuccess(final long refreshPeriod) { - if (attributes.get(ATTR_APSTXUCASTSUCCESS).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_APSTXUCASTSUCCESS).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_APSTXUCASTSUCCESS)); - } - - /** - * Get the APSTxUcastRetry attribute [attribute ID 266]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getApsTxUcastRetryAsync() { - return read(attributes.get(ATTR_APSTXUCASTRETRY)); - } - - /** - * Synchronously get the APSTxUcastRetry attribute [attribute ID 266]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getApsTxUcastRetry(final long refreshPeriod) { - if (attributes.get(ATTR_APSTXUCASTRETRY).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_APSTXUCASTRETRY).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_APSTXUCASTRETRY)); - } - - /** - * Get the APSTxUcastFail attribute [attribute ID 267]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getApsTxUcastFailAsync() { - return read(attributes.get(ATTR_APSTXUCASTFAIL)); - } - - /** - * Synchronously get the APSTxUcastFail attribute [attribute ID 267]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getApsTxUcastFail(final long refreshPeriod) { - if (attributes.get(ATTR_APSTXUCASTFAIL).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_APSTXUCASTFAIL).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_APSTXUCASTFAIL)); - } - - /** - * Get the RouteDiscInitiated attribute [attribute ID 268]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getRouteDiscInitiatedAsync() { - return read(attributes.get(ATTR_ROUTEDISCINITIATED)); - } - - /** - * Synchronously get the RouteDiscInitiated attribute [attribute ID 268]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getRouteDiscInitiated(final long refreshPeriod) { - if (attributes.get(ATTR_ROUTEDISCINITIATED).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_ROUTEDISCINITIATED).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_ROUTEDISCINITIATED)); - } - - /** - * Get the NeighborAdded attribute [attribute ID 269]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getNeighborAddedAsync() { - return read(attributes.get(ATTR_NEIGHBORADDED)); - } - - /** - * Synchronously get the NeighborAdded attribute [attribute ID 269]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getNeighborAdded(final long refreshPeriod) { - if (attributes.get(ATTR_NEIGHBORADDED).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_NEIGHBORADDED).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_NEIGHBORADDED)); - } - - /** - * Get the NeighborRemoved attribute [attribute ID 270]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getNeighborRemovedAsync() { - return read(attributes.get(ATTR_NEIGHBORREMOVED)); - } - - /** - * Synchronously get the NeighborRemoved attribute [attribute ID 270]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getNeighborRemoved(final long refreshPeriod) { - if (attributes.get(ATTR_NEIGHBORREMOVED).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_NEIGHBORREMOVED).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_NEIGHBORREMOVED)); - } - - /** - * Get the NeighborStale attribute [attribute ID 271]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getNeighborStaleAsync() { - return read(attributes.get(ATTR_NEIGHBORSTALE)); - } - - /** - * Synchronously get the NeighborStale attribute [attribute ID 271]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getNeighborStale(final long refreshPeriod) { - if (attributes.get(ATTR_NEIGHBORSTALE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_NEIGHBORSTALE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_NEIGHBORSTALE)); - } - - /** - * Get the JoinIndication attribute [attribute ID 272]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getJoinIndicationAsync() { - return read(attributes.get(ATTR_JOININDICATION)); - } - - /** - * Synchronously get the JoinIndication attribute [attribute ID 272]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getJoinIndication(final long refreshPeriod) { - if (attributes.get(ATTR_JOININDICATION).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_JOININDICATION).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_JOININDICATION)); - } - - /** - * Get the ChildMoved attribute [attribute ID 273]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getChildMovedAsync() { - return read(attributes.get(ATTR_CHILDMOVED)); - } - - /** - * Synchronously get the ChildMoved attribute [attribute ID 273]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getChildMoved(final long refreshPeriod) { - if (attributes.get(ATTR_CHILDMOVED).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_CHILDMOVED).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_CHILDMOVED)); - } - - /** - * Get the NWKFCFailure attribute [attribute ID 274]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getNwkfcFailureAsync() { - return read(attributes.get(ATTR_NWKFCFAILURE)); - } - - /** - * Synchronously get the NWKFCFailure attribute [attribute ID 274]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getNwkfcFailure(final long refreshPeriod) { - if (attributes.get(ATTR_NWKFCFAILURE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_NWKFCFAILURE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_NWKFCFAILURE)); - } - - /** - * Get the APSFCFailure attribute [attribute ID 275]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getApsfcFailureAsync() { - return read(attributes.get(ATTR_APSFCFAILURE)); - } - - /** - * Synchronously get the APSFCFailure attribute [attribute ID 275]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getApsfcFailure(final long refreshPeriod) { - if (attributes.get(ATTR_APSFCFAILURE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_APSFCFAILURE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_APSFCFAILURE)); - } - - /** - * Get the APSUnauthorizedKey attribute [attribute ID 276]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getApsUnauthorizedKeyAsync() { - return read(attributes.get(ATTR_APSUNAUTHORIZEDKEY)); - } - - /** - * Synchronously get the APSUnauthorizedKey attribute [attribute ID 276]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getApsUnauthorizedKey(final long refreshPeriod) { - if (attributes.get(ATTR_APSUNAUTHORIZEDKEY).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_APSUNAUTHORIZEDKEY).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_APSUNAUTHORIZEDKEY)); - } - - /** - * Get the NWKDecryptFailures attribute [attribute ID 277]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getNwkDecryptFailuresAsync() { - return read(attributes.get(ATTR_NWKDECRYPTFAILURES)); - } - - /** - * Synchronously get the NWKDecryptFailures attribute [attribute ID 277]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getNwkDecryptFailures(final long refreshPeriod) { - if (attributes.get(ATTR_NWKDECRYPTFAILURES).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_NWKDECRYPTFAILURES).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_NWKDECRYPTFAILURES)); - } - - /** - * Get the APSDecryptFailures attribute [attribute ID 278]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getApsDecryptFailuresAsync() { - return read(attributes.get(ATTR_APSDECRYPTFAILURES)); - } - - /** - * Synchronously get the APSDecryptFailures attribute [attribute ID 278]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getApsDecryptFailures(final long refreshPeriod) { - if (attributes.get(ATTR_APSDECRYPTFAILURES).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_APSDECRYPTFAILURES).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_APSDECRYPTFAILURES)); - } - - /** - * Get the PacketBufferAllocateFailures attribute [attribute ID 279]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getPacketBufferAllocateFailuresAsync() { - return read(attributes.get(ATTR_PACKETBUFFERALLOCATEFAILURES)); - } - - /** - * Synchronously get the PacketBufferAllocateFailures attribute [attribute ID 279]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getPacketBufferAllocateFailures(final long refreshPeriod) { - if (attributes.get(ATTR_PACKETBUFFERALLOCATEFAILURES).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_PACKETBUFFERALLOCATEFAILURES).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_PACKETBUFFERALLOCATEFAILURES)); - } - - /** - * Get the RelayedUcast attribute [attribute ID 280]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getRelayedUcastAsync() { - return read(attributes.get(ATTR_RELAYEDUCAST)); - } - - /** - * Synchronously get the RelayedUcast attribute [attribute ID 280]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getRelayedUcast(final long refreshPeriod) { - if (attributes.get(ATTR_RELAYEDUCAST).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_RELAYEDUCAST).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_RELAYEDUCAST)); - } - - /** - * Get the PhytoMACqueuelimitreached attribute [attribute ID 281]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getPhytoMaCqueuelimitreachedAsync() { - return read(attributes.get(ATTR_PHYTOMACQUEUELIMITREACHED)); - } - - /** - * Synchronously get the PhytoMACqueuelimitreached attribute [attribute ID 281]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getPhytoMaCqueuelimitreached(final long refreshPeriod) { - if (attributes.get(ATTR_PHYTOMACQUEUELIMITREACHED).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_PHYTOMACQUEUELIMITREACHED).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_PHYTOMACQUEUELIMITREACHED)); - } - - /** - * Get the PacketValidatedropcount attribute [attribute ID 282]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getPacketValidatedropcountAsync() { - return read(attributes.get(ATTR_PACKETVALIDATEDROPCOUNT)); - } - - /** - * Synchronously get the PacketValidatedropcount attribute [attribute ID 282]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getPacketValidatedropcount(final long refreshPeriod) { - if (attributes.get(ATTR_PACKETVALIDATEDROPCOUNT).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_PACKETVALIDATEDROPCOUNT).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_PACKETVALIDATEDROPCOUNT)); - } - - /** - * Get the AverageMACRetryPerAPSMessageSent attribute [attribute ID 283]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getAverageMacRetryPerApsMessageSentAsync() { - return read(attributes.get(ATTR_AVERAGEMACRETRYPERAPSMESSAGESENT)); - } - - /** - * Synchronously get the AverageMACRetryPerAPSMessageSent attribute [attribute ID 283]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getAverageMacRetryPerApsMessageSent(final long refreshPeriod) { - if (attributes.get(ATTR_AVERAGEMACRETRYPERAPSMESSAGESENT).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_AVERAGEMACRETRYPERAPSMESSAGESENT).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_AVERAGEMACRETRYPERAPSMESSAGESENT)); - } - - /** - * Get the LastMessageLQI attribute [attribute ID 284]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getLastMessageLqiAsync() { - return read(attributes.get(ATTR_LASTMESSAGELQI)); - } - - /** - * Synchronously get the LastMessageLQI attribute [attribute ID 284]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getLastMessageLqi(final long refreshPeriod) { - if (attributes.get(ATTR_LASTMESSAGELQI).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_LASTMESSAGELQI).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_LASTMESSAGELQI)); - } - - /** - * Get the LastMessageRSSI attribute [attribute ID 285]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getLastMessageRssiAsync() { - return read(attributes.get(ATTR_LASTMESSAGERSSI)); - } - - /** - * Synchronously get the LastMessageRSSI attribute [attribute ID 285]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getLastMessageRssi(final long refreshPeriod) { - if (attributes.get(ATTR_LASTMESSAGERSSI).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_LASTMESSAGERSSI).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_LASTMESSAGERSSI)); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclDoorLockCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclDoorLockCluster.java deleted file mode 100644 index 8e4cc2519..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclDoorLockCluster.java +++ /dev/null @@ -1,3395 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Future; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.CommandResult; -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.clusters.doorlock.LockDoorCommand; -import com.zsmartsystems.zigbee.zcl.clusters.doorlock.LockDoorResponse; -import com.zsmartsystems.zigbee.zcl.clusters.doorlock.Toggle; -import com.zsmartsystems.zigbee.zcl.clusters.doorlock.ToggleResponse; -import com.zsmartsystems.zigbee.zcl.clusters.doorlock.UnlockDoorCommand; -import com.zsmartsystems.zigbee.zcl.clusters.doorlock.UnlockDoorResponse; -import com.zsmartsystems.zigbee.zcl.clusters.doorlock.UnlockWithTimeout; -import com.zsmartsystems.zigbee.zcl.clusters.doorlock.UnlockWithTimeoutResponse; -import com.zsmartsystems.zigbee.zcl.field.ByteArray; -import com.zsmartsystems.zigbee.zcl.protocol.ZclClusterType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; - -/** - * Door Lock cluster implementation (Cluster ID 0x0101). - *

    - * The door lock cluster provides an interface to a generic way to secure a door. The physical - * object that pro- vides the locking functionality is abstracted from the cluster. The - * cluster has a small list of mandatory at- tributes and functions and a list of optional - * features. - *

    - * Generally the door lock itself implements the server side of this cluster. The attributes - * and commands listed in this cluster were developed to be implemented by a door lock which has - * the ability to keep track of mul- tiple users and schedules. - *

    - * The door lock cluster provides several alarms which can be sent when there is a critical state - * on the door lock. The alarms available for the door lock cluster are listed in the section - * below outlining the alarm mask at- tribute. The Alarm cluster is used to generate the actual - * alarms. - *

    - * The event mechanism in the door lock centers on the transmission of two commands - * autonomously generated by the server and sent to a bound device. The assumption is that the - * binding mechanism will be used to commission the server to send these commands. - *

    - * Door locks have the ability to require the use of APS encryption for sending and receiving of - * all cluster messages. The Security Level attribute is used to specify the type of encryption - * required by the door lock. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclDoorLockCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0101; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Door Lock"; - - // Attribute constants - /** - * Provides the current lock state - */ - public static final int ATTR_LOCKSTATE = 0x0000; - /** - * Defines the type of lock - */ - public static final int ATTR_LOCKTYPE = 0x0001; - /** - * Boolean indicating the enabled/disabled state of the lock - */ - public static final int ATTR_ACTUATORENABLED = 0x0002; - /** - * The current state of the door lock - */ - public static final int ATTR_DOORSTATE = 0x0003; - /** - * This attribute holds the number of door open events that have occurred since it was last - * zeroed. - */ - public static final int ATTR_DOOROPENEVENTS = 0x0004; - /** - * This attribute holds the number of door closed events that have occurred since it was - * last zeroed. - */ - public static final int ATTR_DOORCLOSEDEVENTS = 0x0005; - /** - * This attribute holds the number of minutes the door has been open since the last time it - * transitioned from closed to open. - */ - public static final int ATTR_OPENPERIOD = 0x0006; - /** - * The number of available log records. - */ - public static final int ATTR_NUMLOCKRECORDSSUPPORTED = 0x0010; - /** - * Number of total users supported by the lock. This value is equal to the higher one of [# of - * PIN Users Supported] and [# of RFID Users Supported] - */ - public static final int ATTR_NUMTOTALUSERSSUPPORTED = 0x0011; - /** - * The number of PIN users supported. - */ - public static final int ATTR_NUMPINUSERSSUPPORTED = 0x0012; - /** - * The number of RFID users supported. - */ - public static final int ATTR_NUMRFIDUSERSSUPPORTED = 0x0013; - /** - * The number of configurable week day schedule supported per user. - */ - public static final int ATTR_NUMWEEKDAYSCHEDULESSUPPORTEDPERUSER = 0x0014; - /** - * The number of configurable year day schedule supported per user - */ - public static final int ATTR_NUMYEARDAYSCHEDULESSUPPORTEDPERUSER = 0x0015; - /** - * The number of holiday schedules supported for the entire door lock device. - */ - public static final int ATTR_NUMHOLIDAYSCHEDULESSUPPORTEDPERUSER = 0x0016; - /** - * An 8 bit value indicates the maximum length in bytes of a PIN Code on this device. The - * default is set to 8 since most lock manufacturers currently allow PIN Codes of 8 bytes or - * less. - */ - public static final int ATTR_MAXPINLENGTH = 0x0017; - /** - * An 8 bit value indicates the minimum length in bytes of a PIN Code on this device. The - * default is set to 4 since most lock manufacturers do not support PIN Codes that are - * shorter than 4 bytes. - */ - public static final int ATTR_MINPINLENGTH = 0x0018; - /** - * An 8 bit value indicates the maximum length in bytes of a RFID Code on this device. The - * value depends on the RFID code range specified by the manufacturer, if media - * anti-collision identifiers (UID) are used as RFID code, a value of 20 (equals 10 Byte ISO - * 14443A UID) is recommended. - */ - public static final int ATTR_MAXRFIDCODELENGTH = 0x0019; - /** - * An 8 bit value indicates the minimum length in bytes of a RFID Code on this device. The - * value depends on the RFID code range specified by the manufacturer, if media - * anti-collision identifiers (UID) are used as RFID code, a value of 8 (equals 4 Byte ISO - * 14443A UID) is recommended. - */ - public static final int ATTR_MINRFIDCODELENGTH = 0x001A; - /** - * Enable/disable event logging. When event logging is enabled, all event messages are - * stored on the lock for retrieval. Logging events can be but not limited to Tamper Alarm, - * Lock, Unlock, Autolock, User Code Added, User Code Deleted, Schedule Added, and - * Schedule Deleted. For a full detail of all the possible alarms and events, please refer - * to the full list in the Alarm and Event Masks Attribute Set. - */ - public static final int ATTR_ENABLELOGGING = 0x0020; - /** - * Modifies the language for the on-screen or audible user interface using three bytes - * from ISO-639-1. It consists of one byte of length and two bytes for the language code. For - * example if the language is set to English, the value would be "02 65 6E" for the language - * code "en" - */ - public static final int ATTR_LANGUAGE = 0x0021; - /** - * The settings for the LED support three different modes - */ - public static final int ATTR_LEDSETTINGS = 0x0022; - /** - * The number of seconds to wait after unlocking a lock before it automatically locks - * again. 0=disabled. If set, unlock operations from any source will be timed. For one time - * unlock with timeout use the specific command. - */ - public static final int ATTR_AUTORELOCKTIME = 0x0023; - /** - * The sound volume on a door lock has three possible settings: silent, low and high volumes - */ - public static final int ATTR_SOUNDVOLUME = 0x0024; - /** - * Shows the current operating mode - */ - public static final int ATTR_OPERATINGMODE = 0x0025; - /** - * This bitmap contains all operating bits of the Operating Mode Attribute supported by - * the lock. The value of the enumeration in “Operating Mode” defines the related bit to be - * set, as shown in Table 7-16. All bits supported by a lock SHALL be set to zero. - */ - public static final int ATTR_SUPPORTEDOPERATINGMODES = 0x0026; - /** - * This attribute represents the default configurations as they are physically set on the - * device (example: hardware dip switch setting, etc…) and represents the default - * setting for some of the attributes within this Operational Setting Attribute Set (for - * example: LED, Auto Lock, Sound Volume, and Operating Mode attributes). - *

    - * This is a read-only attribute and is intended to allow clients to determine what changes - * MAY need to be made without having to query all the included attributes. It MAY be - * beneficial for the clients to know what the device’s original settings were in the event - * that the device needs to be restored to factory default settings. - */ - public static final int ATTR_DEFAULTCONFIGURATIONREGISTER = 0x0027; - /** - * Enable/disable local programming on the door lock. The local programming features - * includes but not limited to adding new user codes, deleting existing user codes, add new - * schedule, deleting existing schedule on the local door lock interfaces. If this value - * is set to 0x01 or TRUE then local programming is enabled on the door lock. If it is set to - * 0x00 or FALSE then local programming is disabled on the door lock. Local programming is - * enabled by default. - */ - public static final int ATTR_ENABLELOCALPROGRAMMING = 0x0028; - /** - * Enable/disable the ability to lock the door lock with a single touch on the door lock. - */ - public static final int ATTR_ENABLEONETOUCHLOCKING = 0x0029; - /** - * Enable/disable an inside LED that allows the user to see at a glance if the door is locked. - */ - public static final int ATTR_ENABLEINSIDESTATUSLED = 0x002A; - /** - * Enable/disable a button inside the door that is used to put the lock into privacy mode. - * When the lock is in privacy mode it cannot be manipulated from the outside. - */ - public static final int ATTR_ENABLEPRIVACYMODEBUTTON = 0x002B; - /** - * The number of incorrect codes or RFID presentment attempts a user is allowed to enter - * before the door will enter a lockout state. The lockout state will be for the duration of - * UserCodeTemporaryDisableTime. - */ - public static final int ATTR_WRONGCODEENTRYLIMIT = 0x0030; - /** - * The number of seconds that the lock shuts down following wrong code entry. 1-255 - * seconds. Device can shutdown to lock user out for specified amount of time. (Makes it - * difficult to try and guess a PIN for the device.) - */ - public static final int ATTR_USERCODETEMPORARYDISABLETIME = 0x0031; - /** - * Boolean set to True if it is ok for the door lock server to send PINs over the air. This - * attribute determines the behavior of the server’s TX operation. If it is false, then it - * is not ok for the device to send PIN in any messages over the air. - *

    - * The PIN field within any door lock cluster message SHALL keep the first octet unchanged - * and masks the actual code by replacing with 0xFF. For example (PIN "1234" ): If the - * attribute value is True, 0x04 0x31 0x32 0x33 0x34 SHALL be used in the PIN field in any door - * lock cluster message payload. If the attribute value is False, 0x04 0xFF 0xFF 0xFF 0xFF - * SHALL be used. - */ - public static final int ATTR_SENDPINOVERTHEAIR = 0x0032; - /** - * Boolean set to True if the door lock server requires that an optional PINs be included in - * the payload of RF lock operation events like Lock, Unlock and Toggle in order to - * function. - */ - public static final int ATTR_REQUIREPINFORRFOPERATION = 0x0033; - /** - * Door locks MAY sometimes wish to implement a higher level of security within the - * application protocol in additional to the default network security. For instance a - * door lock MAY wish to use additional APS security for cluster transactions. This - * protects the door lock against being controlled by any other devices which have access - * to the network key. - *

    - * The Security Level attribute allows the door lock manufacturer to indicate what level - * of security the doorlock requires. - */ - public static final int ATTR_ZIGBEESECURITYLEVEL = 0x0034; - /** - * The alarm mask is used to turn on/off alarms for particular functions. Alarms for an - * alarm group are enabled if the associated alarm mask bit is set. Each bit represents a - * group of alarms. Entire alarm groups can be turned on or off by setting or clearing the - * associated bit in the alarm mask. - */ - public static final int ATTR_ALARMMASK = 0x0040; - /** - * Event mask used to turn on and off the transmission of keypad operation events. This mask - * DOES NOT apply to the storing of events in the report table. - */ - public static final int ATTR_KEYPADOPERATIONEVENTMASK = 0x0041; - /** - * Event mask used to turn on and off the transmission of RF operation events. This mask DOES - * NOT apply to the storing of events in the report table. - */ - public static final int ATTR_RFOPERATIONEVENTMASK = 0x0042; - /** - * Event mask used to turn on and off manual operation events. This mask DOES NOT apply to the - * storing of events in the report table. - */ - public static final int ATTR_MANUALOPERATIONEVENTMASK = 0x0043; - /** - * Event mask used to turn on and off RFID operation events. This mask DOES NOT apply to the - * storing of events in the report table. - */ - public static final int ATTR_RFIDOPERATIONEVENTMASK = 0x0044; - /** - * Event mask used to turn on and off keypad programming events. This mask DOES NOT apply to - * the storing of events in the report table. - */ - public static final int ATTR_KEYPADPROGRAMMINGEVENTMASK = 0x0045; - /** - * Event mask used to turn on and off RF programming events. This mask DOES NOT apply to the - * storing of events in the report table. - */ - public static final int ATTR_RFPROGRAMMINGEVENTMASK = 0x0046; - /** - * Event mask used to turn on and off RFID programming events. This mask DOES NOT apply to the - * storing of events in the report table. - */ - public static final int ATTR_RFIDPROGRAMMINGEVENTMASK = 0x0047; - - // Attribute initialisation - @Override - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(43); - - attributeMap.put(ATTR_LOCKSTATE, new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_LOCKSTATE, "Lock State", - ZclDataType.ENUMERATION_8_BIT, true, true, false, false)); - attributeMap.put(ATTR_LOCKTYPE, new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_LOCKTYPE, "Lock Type", - ZclDataType.ENUMERATION_8_BIT, true, true, false, false)); - attributeMap.put(ATTR_ACTUATORENABLED, new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_ACTUATORENABLED, - "Actuator Enabled", ZclDataType.BOOLEAN, true, true, false, false)); - attributeMap.put(ATTR_DOORSTATE, new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_DOORSTATE, "Door State", - ZclDataType.ENUMERATION_8_BIT, true, true, false, false)); - attributeMap.put(ATTR_DOOROPENEVENTS, new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_DOOROPENEVENTS, - "Door Open Events", ZclDataType.UNSIGNED_32_BIT_INTEGER, false, true, true, true)); - attributeMap.put(ATTR_DOORCLOSEDEVENTS, new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_DOORCLOSEDEVENTS, - "Door Closed Events", ZclDataType.UNSIGNED_32_BIT_INTEGER, false, true, true, true)); - attributeMap.put(ATTR_OPENPERIOD, new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_OPENPERIOD, "Open Period", - ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, true, true)); - attributeMap.put(ATTR_NUMLOCKRECORDSSUPPORTED, - new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_NUMLOCKRECORDSSUPPORTED, "Num Lock Records Supported", - ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_NUMTOTALUSERSSUPPORTED, - new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_NUMTOTALUSERSSUPPORTED, "Num Total Users Supported", - ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_NUMPINUSERSSUPPORTED, - new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_NUMPINUSERSSUPPORTED, "Num PIN Users Supported", - ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_NUMRFIDUSERSSUPPORTED, - new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_NUMRFIDUSERSSUPPORTED, "Num RFID Users Supported", - ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_NUMWEEKDAYSCHEDULESSUPPORTEDPERUSER, - new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_NUMWEEKDAYSCHEDULESSUPPORTEDPERUSER, - "Num Weekday Schedules Supported Per User", ZclDataType.UNSIGNED_8_BIT_INTEGER, true, true, - false, false)); - attributeMap.put(ATTR_NUMYEARDAYSCHEDULESSUPPORTEDPERUSER, - new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_NUMYEARDAYSCHEDULESSUPPORTEDPERUSER, - "Num Yearday Schedules Supported Per User", ZclDataType.UNSIGNED_8_BIT_INTEGER, true, true, - false, false)); - attributeMap.put(ATTR_NUMHOLIDAYSCHEDULESSUPPORTEDPERUSER, - new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_NUMHOLIDAYSCHEDULESSUPPORTEDPERUSER, - "Num Holiday Schedules Supported Per User", ZclDataType.UNSIGNED_8_BIT_INTEGER, true, true, - false, false)); - attributeMap.put(ATTR_MAXPINLENGTH, new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_MAXPINLENGTH, - "Max PIN Length", ZclDataType.UNSIGNED_8_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_MINPINLENGTH, new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_MINPINLENGTH, - "Min PIN Length", ZclDataType.UNSIGNED_8_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_MAXRFIDCODELENGTH, new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_MAXRFIDCODELENGTH, - "Max RFID Code Length", ZclDataType.UNSIGNED_8_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_MINRFIDCODELENGTH, new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_MINRFIDCODELENGTH, - "Min RFID Code Length", ZclDataType.UNSIGNED_8_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_ENABLELOGGING, new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_ENABLELOGGING, - "Enable Logging", ZclDataType.BOOLEAN, false, true, true, true)); - attributeMap.put(ATTR_LANGUAGE, new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_LANGUAGE, "Language", - ZclDataType.CHARACTER_STRING, false, true, true, true)); - attributeMap.put(ATTR_LEDSETTINGS, new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_LEDSETTINGS, "LED Settings", - ZclDataType.UNSIGNED_8_BIT_INTEGER, false, true, true, true)); - attributeMap.put(ATTR_AUTORELOCKTIME, new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_AUTORELOCKTIME, - "Auto Relock Time", ZclDataType.UNSIGNED_32_BIT_INTEGER, false, true, true, true)); - attributeMap.put(ATTR_SOUNDVOLUME, new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_SOUNDVOLUME, "Sound Volume", - ZclDataType.UNSIGNED_8_BIT_INTEGER, false, true, true, true)); - attributeMap.put(ATTR_OPERATINGMODE, new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_OPERATINGMODE, - "Operating Mode", ZclDataType.ENUMERATION_8_BIT, false, true, true, true)); - attributeMap.put(ATTR_SUPPORTEDOPERATINGMODES, - new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_SUPPORTEDOPERATINGMODES, "Supported Operating Modes", - ZclDataType.BITMAP_16_BIT, true, true, false, false)); - attributeMap.put(ATTR_DEFAULTCONFIGURATIONREGISTER, - new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_DEFAULTCONFIGURATIONREGISTER, - "Default Configuration Register", ZclDataType.BITMAP_16_BIT, true, true, false, false)); - attributeMap.put(ATTR_ENABLELOCALPROGRAMMING, new ZclAttribute(ZclClusterType.DOOR_LOCK, - ATTR_ENABLELOCALPROGRAMMING, "Enable Local Programming", ZclDataType.BOOLEAN, false, true, true, true)); - attributeMap.put(ATTR_ENABLEONETOUCHLOCKING, new ZclAttribute(ZclClusterType.DOOR_LOCK, - ATTR_ENABLEONETOUCHLOCKING, "Enable One Touch Locking", ZclDataType.BOOLEAN, false, true, true, true)); - attributeMap.put(ATTR_ENABLEINSIDESTATUSLED, new ZclAttribute(ZclClusterType.DOOR_LOCK, - ATTR_ENABLEINSIDESTATUSLED, "Enable Inside Status Led", ZclDataType.BOOLEAN, false, true, true, true)); - attributeMap.put(ATTR_ENABLEPRIVACYMODEBUTTON, - new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_ENABLEPRIVACYMODEBUTTON, "Enable Privacy Mode Button", - ZclDataType.BOOLEAN, false, true, true, true)); - attributeMap.put(ATTR_WRONGCODEENTRYLIMIT, new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_WRONGCODEENTRYLIMIT, - "Wrong Code Entry Limit", ZclDataType.UNSIGNED_8_BIT_INTEGER, false, true, true, true)); - attributeMap.put(ATTR_USERCODETEMPORARYDISABLETIME, - new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_USERCODETEMPORARYDISABLETIME, - "User Code Temporary Disable Time", ZclDataType.UNSIGNED_8_BIT_INTEGER, false, true, true, - true)); - attributeMap.put(ATTR_SENDPINOVERTHEAIR, new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_SENDPINOVERTHEAIR, - "Send PIN Over The Air", ZclDataType.BOOLEAN, false, true, true, true)); - attributeMap.put(ATTR_REQUIREPINFORRFOPERATION, - new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_REQUIREPINFORRFOPERATION, - "Require PIN For RF Operation", ZclDataType.BOOLEAN, false, true, true, true)); - attributeMap.put(ATTR_ZIGBEESECURITYLEVEL, new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_ZIGBEESECURITYLEVEL, - "Zigbee Security Level", ZclDataType.ENUMERATION_8_BIT, true, true, false, false)); - attributeMap.put(ATTR_ALARMMASK, new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_ALARMMASK, "Alarm Mask", - ZclDataType.BITMAP_16_BIT, false, true, true, true)); - attributeMap.put(ATTR_KEYPADOPERATIONEVENTMASK, - new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_KEYPADOPERATIONEVENTMASK, "Keypad Operation Event Mask", - ZclDataType.BITMAP_16_BIT, false, true, true, true)); - attributeMap.put(ATTR_RFOPERATIONEVENTMASK, - new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_RFOPERATIONEVENTMASK, "RF Operation Event Mask", - ZclDataType.BITMAP_16_BIT, false, true, true, true)); - attributeMap.put(ATTR_MANUALOPERATIONEVENTMASK, - new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_MANUALOPERATIONEVENTMASK, "Manual Operation Event Mask", - ZclDataType.BITMAP_16_BIT, false, true, true, true)); - attributeMap.put(ATTR_RFIDOPERATIONEVENTMASK, - new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_RFIDOPERATIONEVENTMASK, "RFID Operation Event Mask", - ZclDataType.BITMAP_16_BIT, false, true, true, true)); - attributeMap.put(ATTR_KEYPADPROGRAMMINGEVENTMASK, - new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_KEYPADPROGRAMMINGEVENTMASK, - "Keypad Programming Event Mask", ZclDataType.BITMAP_16_BIT, false, true, true, true)); - attributeMap.put(ATTR_RFPROGRAMMINGEVENTMASK, - new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_RFPROGRAMMINGEVENTMASK, "RF Programming Event Mask", - ZclDataType.BITMAP_16_BIT, false, true, true, true)); - attributeMap.put(ATTR_RFIDPROGRAMMINGEVENTMASK, - new ZclAttribute(ZclClusterType.DOOR_LOCK, ATTR_RFIDPROGRAMMINGEVENTMASK, "RFID Programming Event Mask", - ZclDataType.BITMAP_16_BIT, false, true, true, true)); - - return attributeMap; - } - - /** - * Default constructor to create a Door Lock cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} this cluster is contained within - */ - public ZclDoorLockCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } - - /** - * Get the Lock State attribute [attribute ID 0x0000]. - *

    - * Provides the current lock state - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getLockStateAsync() { - return read(attributes.get(ATTR_LOCKSTATE)); - } - - /** - * Synchronously get the Lock State attribute [attribute ID 0x0000]. - *

    - * Provides the current lock state - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getLockState(final long refreshPeriod) { - if (attributes.get(ATTR_LOCKSTATE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_LOCKSTATE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_LOCKSTATE)); - } - - /** - * Set reporting for the Lock State attribute [attribute ID 0x0000]. - *

    - * Provides the current lock state - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param minInterval minimum reporting period - * @param maxInterval maximum reporting period - * @return the {@link Future} command result future - */ - public Future setLockStateReporting(final int minInterval, final int maxInterval) { - return setReporting(attributes.get(ATTR_LOCKSTATE), minInterval, maxInterval); - } - - /** - * Get the Lock Type attribute [attribute ID 0x0001]. - *

    - * Defines the type of lock - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getLockTypeAsync() { - return read(attributes.get(ATTR_LOCKTYPE)); - } - - /** - * Synchronously get the Lock Type attribute [attribute ID 0x0001]. - *

    - * Defines the type of lock - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getLockType(final long refreshPeriod) { - if (attributes.get(ATTR_LOCKTYPE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_LOCKTYPE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_LOCKTYPE)); - } - - /** - * Set reporting for the Lock Type attribute [attribute ID 0x0001]. - *

    - * Defines the type of lock - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param minInterval minimum reporting period - * @param maxInterval maximum reporting period - * @return the {@link Future} command result future - */ - public Future setLockTypeReporting(final int minInterval, final int maxInterval) { - return setReporting(attributes.get(ATTR_LOCKTYPE), minInterval, maxInterval); - } - - /** - * Get the Actuator Enabled attribute [attribute ID 0x0002]. - *

    - * Boolean indicating the enabled/disabled state of the lock - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getActuatorEnabledAsync() { - return read(attributes.get(ATTR_ACTUATORENABLED)); - } - - /** - * Synchronously get the Actuator Enabled attribute [attribute ID 0x0002]. - *

    - * Boolean indicating the enabled/disabled state of the lock - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Boolean} attribute value, or null on error - */ - public Boolean getActuatorEnabled(final long refreshPeriod) { - if (attributes.get(ATTR_ACTUATORENABLED).isLastValueCurrent(refreshPeriod)) { - return (Boolean) attributes.get(ATTR_ACTUATORENABLED).getLastValue(); - } - - return (Boolean) readSync(attributes.get(ATTR_ACTUATORENABLED)); - } - - /** - * Set reporting for the Actuator Enabled attribute [attribute ID 0x0002]. - *

    - * Boolean indicating the enabled/disabled state of the lock - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param minInterval minimum reporting period - * @param maxInterval maximum reporting period - * @return the {@link Future} command result future - */ - public Future setActuatorEnabledReporting(final int minInterval, final int maxInterval) { - return setReporting(attributes.get(ATTR_ACTUATORENABLED), minInterval, maxInterval); - } - - /** - * Get the Door State attribute [attribute ID 0x0003]. - *

    - * The current state of the door lock - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getDoorStateAsync() { - return read(attributes.get(ATTR_DOORSTATE)); - } - - /** - * Synchronously get the Door State attribute [attribute ID 0x0003]. - *

    - * The current state of the door lock - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getDoorState(final long refreshPeriod) { - if (attributes.get(ATTR_DOORSTATE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_DOORSTATE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_DOORSTATE)); - } - - /** - * Set reporting for the Door State attribute [attribute ID 0x0003]. - *

    - * The current state of the door lock - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param minInterval minimum reporting period - * @param maxInterval maximum reporting period - * @return the {@link Future} command result future - */ - public Future setDoorStateReporting(final int minInterval, final int maxInterval) { - return setReporting(attributes.get(ATTR_DOORSTATE), minInterval, maxInterval); - } - - /** - * Set the Door Open Events attribute [attribute ID 0x0004]. - *

    - * This attribute holds the number of door open events that have occurred since it was last - * zeroed. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param doorOpenEvents the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setDoorOpenEvents(final Integer value) { - return write(attributes.get(ATTR_DOOROPENEVENTS), value); - } - - /** - * Get the Door Open Events attribute [attribute ID 0x0004]. - *

    - * This attribute holds the number of door open events that have occurred since it was last - * zeroed. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getDoorOpenEventsAsync() { - return read(attributes.get(ATTR_DOOROPENEVENTS)); - } - - /** - * Synchronously get the Door Open Events attribute [attribute ID 0x0004]. - *

    - * This attribute holds the number of door open events that have occurred since it was last - * zeroed. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getDoorOpenEvents(final long refreshPeriod) { - if (attributes.get(ATTR_DOOROPENEVENTS).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_DOOROPENEVENTS).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_DOOROPENEVENTS)); - } - - /** - * Set the Door Closed Events attribute [attribute ID 0x0005]. - *

    - * This attribute holds the number of door closed events that have occurred since it was - * last zeroed. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param doorClosedEvents the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setDoorClosedEvents(final Integer value) { - return write(attributes.get(ATTR_DOORCLOSEDEVENTS), value); - } - - /** - * Get the Door Closed Events attribute [attribute ID 0x0005]. - *

    - * This attribute holds the number of door closed events that have occurred since it was - * last zeroed. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getDoorClosedEventsAsync() { - return read(attributes.get(ATTR_DOORCLOSEDEVENTS)); - } - - /** - * Synchronously get the Door Closed Events attribute [attribute ID 0x0005]. - *

    - * This attribute holds the number of door closed events that have occurred since it was - * last zeroed. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getDoorClosedEvents(final long refreshPeriod) { - if (attributes.get(ATTR_DOORCLOSEDEVENTS).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_DOORCLOSEDEVENTS).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_DOORCLOSEDEVENTS)); - } - - /** - * Set the Open Period attribute [attribute ID 0x0006]. - *

    - * This attribute holds the number of minutes the door has been open since the last time it - * transitioned from closed to open. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param openPeriod the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setOpenPeriod(final Integer value) { - return write(attributes.get(ATTR_OPENPERIOD), value); - } - - /** - * Get the Open Period attribute [attribute ID 0x0006]. - *

    - * This attribute holds the number of minutes the door has been open since the last time it - * transitioned from closed to open. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getOpenPeriodAsync() { - return read(attributes.get(ATTR_OPENPERIOD)); - } - - /** - * Synchronously get the Open Period attribute [attribute ID 0x0006]. - *

    - * This attribute holds the number of minutes the door has been open since the last time it - * transitioned from closed to open. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getOpenPeriod(final long refreshPeriod) { - if (attributes.get(ATTR_OPENPERIOD).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_OPENPERIOD).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_OPENPERIOD)); - } - - /** - * Get the Num Lock Records Supported attribute [attribute ID 0x0010]. - *

    - * The number of available log records. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getNumLockRecordsSupportedAsync() { - return read(attributes.get(ATTR_NUMLOCKRECORDSSUPPORTED)); - } - - /** - * Synchronously get the Num Lock Records Supported attribute [attribute ID 0x0010]. - *

    - * The number of available log records. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getNumLockRecordsSupported(final long refreshPeriod) { - if (attributes.get(ATTR_NUMLOCKRECORDSSUPPORTED).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_NUMLOCKRECORDSSUPPORTED).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_NUMLOCKRECORDSSUPPORTED)); - } - - /** - * Set reporting for the Num Lock Records Supported attribute [attribute ID 0x0010]. - *

    - * The number of available log records. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param minInterval minimum reporting period - * @param maxInterval maximum reporting period - * @param reportableChange {@link Object} delta required to trigger report - * @return the {@link Future} command result future - */ - public Future setNumLockRecordsSupportedReporting(final int minInterval, final int maxInterval, - final Object reportableChange) { - return setReporting(attributes.get(ATTR_NUMLOCKRECORDSSUPPORTED), minInterval, maxInterval, reportableChange); - } - - /** - * Get the Num Total Users Supported attribute [attribute ID 0x0011]. - *

    - * Number of total users supported by the lock. This value is equal to the higher one of [# of - * PIN Users Supported] and [# of RFID Users Supported] - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getNumTotalUsersSupportedAsync() { - return read(attributes.get(ATTR_NUMTOTALUSERSSUPPORTED)); - } - - /** - * Synchronously get the Num Total Users Supported attribute [attribute ID 0x0011]. - *

    - * Number of total users supported by the lock. This value is equal to the higher one of [# of - * PIN Users Supported] and [# of RFID Users Supported] - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getNumTotalUsersSupported(final long refreshPeriod) { - if (attributes.get(ATTR_NUMTOTALUSERSSUPPORTED).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_NUMTOTALUSERSSUPPORTED).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_NUMTOTALUSERSSUPPORTED)); - } - - /** - * Set reporting for the Num Total Users Supported attribute [attribute ID 0x0011]. - *

    - * Number of total users supported by the lock. This value is equal to the higher one of [# of - * PIN Users Supported] and [# of RFID Users Supported] - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param minInterval minimum reporting period - * @param maxInterval maximum reporting period - * @param reportableChange {@link Object} delta required to trigger report - * @return the {@link Future} command result future - */ - public Future setNumTotalUsersSupportedReporting(final int minInterval, final int maxInterval, - final Object reportableChange) { - return setReporting(attributes.get(ATTR_NUMTOTALUSERSSUPPORTED), minInterval, maxInterval, reportableChange); - } - - /** - * Get the Num PIN Users Supported attribute [attribute ID 0x0012]. - *

    - * The number of PIN users supported. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getNumPinUsersSupportedAsync() { - return read(attributes.get(ATTR_NUMPINUSERSSUPPORTED)); - } - - /** - * Synchronously get the Num PIN Users Supported attribute [attribute ID 0x0012]. - *

    - * The number of PIN users supported. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getNumPinUsersSupported(final long refreshPeriod) { - if (attributes.get(ATTR_NUMPINUSERSSUPPORTED).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_NUMPINUSERSSUPPORTED).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_NUMPINUSERSSUPPORTED)); - } - - /** - * Set reporting for the Num PIN Users Supported attribute [attribute ID 0x0012]. - *

    - * The number of PIN users supported. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param minInterval minimum reporting period - * @param maxInterval maximum reporting period - * @param reportableChange {@link Object} delta required to trigger report - * @return the {@link Future} command result future - */ - public Future setNumPinUsersSupportedReporting(final int minInterval, final int maxInterval, - final Object reportableChange) { - return setReporting(attributes.get(ATTR_NUMPINUSERSSUPPORTED), minInterval, maxInterval, reportableChange); - } - - /** - * Get the Num RFID Users Supported attribute [attribute ID 0x0013]. - *

    - * The number of RFID users supported. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getNumRfidUsersSupportedAsync() { - return read(attributes.get(ATTR_NUMRFIDUSERSSUPPORTED)); - } - - /** - * Synchronously get the Num RFID Users Supported attribute [attribute ID 0x0013]. - *

    - * The number of RFID users supported. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getNumRfidUsersSupported(final long refreshPeriod) { - if (attributes.get(ATTR_NUMRFIDUSERSSUPPORTED).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_NUMRFIDUSERSSUPPORTED).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_NUMRFIDUSERSSUPPORTED)); - } - - /** - * Set reporting for the Num RFID Users Supported attribute [attribute ID 0x0013]. - *

    - * The number of RFID users supported. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param minInterval minimum reporting period - * @param maxInterval maximum reporting period - * @param reportableChange {@link Object} delta required to trigger report - * @return the {@link Future} command result future - */ - public Future setNumRfidUsersSupportedReporting(final int minInterval, final int maxInterval, - final Object reportableChange) { - return setReporting(attributes.get(ATTR_NUMRFIDUSERSSUPPORTED), minInterval, maxInterval, reportableChange); - } - - /** - * Get the Num Weekday Schedules Supported Per User attribute [attribute ID 0x0014]. - *

    - * The number of configurable week day schedule supported per user. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getNumWeekdaySchedulesSupportedPerUserAsync() { - return read(attributes.get(ATTR_NUMWEEKDAYSCHEDULESSUPPORTEDPERUSER)); - } - - /** - * Synchronously get the Num Weekday Schedules Supported Per User attribute [attribute ID 0x0014]. - *

    - * The number of configurable week day schedule supported per user. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getNumWeekdaySchedulesSupportedPerUser(final long refreshPeriod) { - if (attributes.get(ATTR_NUMWEEKDAYSCHEDULESSUPPORTEDPERUSER).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_NUMWEEKDAYSCHEDULESSUPPORTEDPERUSER).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_NUMWEEKDAYSCHEDULESSUPPORTEDPERUSER)); - } - - /** - * Set reporting for the Num Weekday Schedules Supported Per User attribute [attribute ID 0x0014]. - *

    - * The number of configurable week day schedule supported per user. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param minInterval minimum reporting period - * @param maxInterval maximum reporting period - * @param reportableChange {@link Object} delta required to trigger report - * @return the {@link Future} command result future - */ - public Future setNumWeekdaySchedulesSupportedPerUserReporting(final int minInterval, - final int maxInterval, final Object reportableChange) { - return setReporting(attributes.get(ATTR_NUMWEEKDAYSCHEDULESSUPPORTEDPERUSER), minInterval, maxInterval, - reportableChange); - } - - /** - * Get the Num Yearday Schedules Supported Per User attribute [attribute ID 0x0015]. - *

    - * The number of configurable year day schedule supported per user - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getNumYeardaySchedulesSupportedPerUserAsync() { - return read(attributes.get(ATTR_NUMYEARDAYSCHEDULESSUPPORTEDPERUSER)); - } - - /** - * Synchronously get the Num Yearday Schedules Supported Per User attribute [attribute ID 0x0015]. - *

    - * The number of configurable year day schedule supported per user - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getNumYeardaySchedulesSupportedPerUser(final long refreshPeriod) { - if (attributes.get(ATTR_NUMYEARDAYSCHEDULESSUPPORTEDPERUSER).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_NUMYEARDAYSCHEDULESSUPPORTEDPERUSER).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_NUMYEARDAYSCHEDULESSUPPORTEDPERUSER)); - } - - /** - * Set reporting for the Num Yearday Schedules Supported Per User attribute [attribute ID 0x0015]. - *

    - * The number of configurable year day schedule supported per user - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param minInterval minimum reporting period - * @param maxInterval maximum reporting period - * @param reportableChange {@link Object} delta required to trigger report - * @return the {@link Future} command result future - */ - public Future setNumYeardaySchedulesSupportedPerUserReporting(final int minInterval, - final int maxInterval, final Object reportableChange) { - return setReporting(attributes.get(ATTR_NUMYEARDAYSCHEDULESSUPPORTEDPERUSER), minInterval, maxInterval, - reportableChange); - } - - /** - * Get the Num Holiday Schedules Supported Per User attribute [attribute ID 0x0016]. - *

    - * The number of holiday schedules supported for the entire door lock device. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getNumHolidaySchedulesSupportedPerUserAsync() { - return read(attributes.get(ATTR_NUMHOLIDAYSCHEDULESSUPPORTEDPERUSER)); - } - - /** - * Synchronously get the Num Holiday Schedules Supported Per User attribute [attribute ID 0x0016]. - *

    - * The number of holiday schedules supported for the entire door lock device. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getNumHolidaySchedulesSupportedPerUser(final long refreshPeriod) { - if (attributes.get(ATTR_NUMHOLIDAYSCHEDULESSUPPORTEDPERUSER).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_NUMHOLIDAYSCHEDULESSUPPORTEDPERUSER).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_NUMHOLIDAYSCHEDULESSUPPORTEDPERUSER)); - } - - /** - * Set reporting for the Num Holiday Schedules Supported Per User attribute [attribute ID 0x0016]. - *

    - * The number of holiday schedules supported for the entire door lock device. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param minInterval minimum reporting period - * @param maxInterval maximum reporting period - * @param reportableChange {@link Object} delta required to trigger report - * @return the {@link Future} command result future - */ - public Future setNumHolidaySchedulesSupportedPerUserReporting(final int minInterval, - final int maxInterval, final Object reportableChange) { - return setReporting(attributes.get(ATTR_NUMHOLIDAYSCHEDULESSUPPORTEDPERUSER), minInterval, maxInterval, - reportableChange); - } - - /** - * Get the Max PIN Length attribute [attribute ID 0x0017]. - *

    - * An 8 bit value indicates the maximum length in bytes of a PIN Code on this device. The - * default is set to 8 since most lock manufacturers currently allow PIN Codes of 8 bytes or - * less. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getMaxPinLengthAsync() { - return read(attributes.get(ATTR_MAXPINLENGTH)); - } - - /** - * Synchronously get the Max PIN Length attribute [attribute ID 0x0017]. - *

    - * An 8 bit value indicates the maximum length in bytes of a PIN Code on this device. The - * default is set to 8 since most lock manufacturers currently allow PIN Codes of 8 bytes or - * less. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMaxPinLength(final long refreshPeriod) { - if (attributes.get(ATTR_MAXPINLENGTH).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MAXPINLENGTH).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MAXPINLENGTH)); - } - - /** - * Set reporting for the Max PIN Length attribute [attribute ID 0x0017]. - *

    - * An 8 bit value indicates the maximum length in bytes of a PIN Code on this device. The - * default is set to 8 since most lock manufacturers currently allow PIN Codes of 8 bytes or - * less. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param minInterval minimum reporting period - * @param maxInterval maximum reporting period - * @param reportableChange {@link Object} delta required to trigger report - * @return the {@link Future} command result future - */ - public Future setMaxPinLengthReporting(final int minInterval, final int maxInterval, - final Object reportableChange) { - return setReporting(attributes.get(ATTR_MAXPINLENGTH), minInterval, maxInterval, reportableChange); - } - - /** - * Get the Min PIN Length attribute [attribute ID 0x0018]. - *

    - * An 8 bit value indicates the minimum length in bytes of a PIN Code on this device. The - * default is set to 4 since most lock manufacturers do not support PIN Codes that are - * shorter than 4 bytes. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getMinPinLengthAsync() { - return read(attributes.get(ATTR_MINPINLENGTH)); - } - - /** - * Synchronously get the Min PIN Length attribute [attribute ID 0x0018]. - *

    - * An 8 bit value indicates the minimum length in bytes of a PIN Code on this device. The - * default is set to 4 since most lock manufacturers do not support PIN Codes that are - * shorter than 4 bytes. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMinPinLength(final long refreshPeriod) { - if (attributes.get(ATTR_MINPINLENGTH).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MINPINLENGTH).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MINPINLENGTH)); - } - - /** - * Set reporting for the Min PIN Length attribute [attribute ID 0x0018]. - *

    - * An 8 bit value indicates the minimum length in bytes of a PIN Code on this device. The - * default is set to 4 since most lock manufacturers do not support PIN Codes that are - * shorter than 4 bytes. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param minInterval minimum reporting period - * @param maxInterval maximum reporting period - * @param reportableChange {@link Object} delta required to trigger report - * @return the {@link Future} command result future - */ - public Future setMinPinLengthReporting(final int minInterval, final int maxInterval, - final Object reportableChange) { - return setReporting(attributes.get(ATTR_MINPINLENGTH), minInterval, maxInterval, reportableChange); - } - - /** - * Get the Max RFID Code Length attribute [attribute ID 0x0019]. - *

    - * An 8 bit value indicates the maximum length in bytes of a RFID Code on this device. The - * value depends on the RFID code range specified by the manufacturer, if media - * anti-collision identifiers (UID) are used as RFID code, a value of 20 (equals 10 Byte ISO - * 14443A UID) is recommended. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getMaxRfidCodeLengthAsync() { - return read(attributes.get(ATTR_MAXRFIDCODELENGTH)); - } - - /** - * Synchronously get the Max RFID Code Length attribute [attribute ID 0x0019]. - *

    - * An 8 bit value indicates the maximum length in bytes of a RFID Code on this device. The - * value depends on the RFID code range specified by the manufacturer, if media - * anti-collision identifiers (UID) are used as RFID code, a value of 20 (equals 10 Byte ISO - * 14443A UID) is recommended. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMaxRfidCodeLength(final long refreshPeriod) { - if (attributes.get(ATTR_MAXRFIDCODELENGTH).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MAXRFIDCODELENGTH).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MAXRFIDCODELENGTH)); - } - - /** - * Set reporting for the Max RFID Code Length attribute [attribute ID 0x0019]. - *

    - * An 8 bit value indicates the maximum length in bytes of a RFID Code on this device. The - * value depends on the RFID code range specified by the manufacturer, if media - * anti-collision identifiers (UID) are used as RFID code, a value of 20 (equals 10 Byte ISO - * 14443A UID) is recommended. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param minInterval minimum reporting period - * @param maxInterval maximum reporting period - * @param reportableChange {@link Object} delta required to trigger report - * @return the {@link Future} command result future - */ - public Future setMaxRfidCodeLengthReporting(final int minInterval, final int maxInterval, - final Object reportableChange) { - return setReporting(attributes.get(ATTR_MAXRFIDCODELENGTH), minInterval, maxInterval, reportableChange); - } - - /** - * Get the Min RFID Code Length attribute [attribute ID 0x001A]. - *

    - * An 8 bit value indicates the minimum length in bytes of a RFID Code on this device. The - * value depends on the RFID code range specified by the manufacturer, if media - * anti-collision identifiers (UID) are used as RFID code, a value of 8 (equals 4 Byte ISO - * 14443A UID) is recommended. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getMinRfidCodeLengthAsync() { - return read(attributes.get(ATTR_MINRFIDCODELENGTH)); - } - - /** - * Synchronously get the Min RFID Code Length attribute [attribute ID 0x001A]. - *

    - * An 8 bit value indicates the minimum length in bytes of a RFID Code on this device. The - * value depends on the RFID code range specified by the manufacturer, if media - * anti-collision identifiers (UID) are used as RFID code, a value of 8 (equals 4 Byte ISO - * 14443A UID) is recommended. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMinRfidCodeLength(final long refreshPeriod) { - if (attributes.get(ATTR_MINRFIDCODELENGTH).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MINRFIDCODELENGTH).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MINRFIDCODELENGTH)); - } - - /** - * Set reporting for the Min RFID Code Length attribute [attribute ID 0x001A]. - *

    - * An 8 bit value indicates the minimum length in bytes of a RFID Code on this device. The - * value depends on the RFID code range specified by the manufacturer, if media - * anti-collision identifiers (UID) are used as RFID code, a value of 8 (equals 4 Byte ISO - * 14443A UID) is recommended. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param minInterval minimum reporting period - * @param maxInterval maximum reporting period - * @param reportableChange {@link Object} delta required to trigger report - * @return the {@link Future} command result future - */ - public Future setMinRfidCodeLengthReporting(final int minInterval, final int maxInterval, - final Object reportableChange) { - return setReporting(attributes.get(ATTR_MINRFIDCODELENGTH), minInterval, maxInterval, reportableChange); - } - - /** - * Set the Enable Logging attribute [attribute ID 0x0020]. - *

    - * Enable/disable event logging. When event logging is enabled, all event messages are - * stored on the lock for retrieval. Logging events can be but not limited to Tamper Alarm, - * Lock, Unlock, Autolock, User Code Added, User Code Deleted, Schedule Added, and - * Schedule Deleted. For a full detail of all the possible alarms and events, please refer - * to the full list in the Alarm and Event Masks Attribute Set. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param enableLogging the {@link Boolean} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setEnableLogging(final Boolean value) { - return write(attributes.get(ATTR_ENABLELOGGING), value); - } - - /** - * Get the Enable Logging attribute [attribute ID 0x0020]. - *

    - * Enable/disable event logging. When event logging is enabled, all event messages are - * stored on the lock for retrieval. Logging events can be but not limited to Tamper Alarm, - * Lock, Unlock, Autolock, User Code Added, User Code Deleted, Schedule Added, and - * Schedule Deleted. For a full detail of all the possible alarms and events, please refer - * to the full list in the Alarm and Event Masks Attribute Set. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getEnableLoggingAsync() { - return read(attributes.get(ATTR_ENABLELOGGING)); - } - - /** - * Synchronously get the Enable Logging attribute [attribute ID 0x0020]. - *

    - * Enable/disable event logging. When event logging is enabled, all event messages are - * stored on the lock for retrieval. Logging events can be but not limited to Tamper Alarm, - * Lock, Unlock, Autolock, User Code Added, User Code Deleted, Schedule Added, and - * Schedule Deleted. For a full detail of all the possible alarms and events, please refer - * to the full list in the Alarm and Event Masks Attribute Set. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Boolean} attribute value, or null on error - */ - public Boolean getEnableLogging(final long refreshPeriod) { - if (attributes.get(ATTR_ENABLELOGGING).isLastValueCurrent(refreshPeriod)) { - return (Boolean) attributes.get(ATTR_ENABLELOGGING).getLastValue(); - } - - return (Boolean) readSync(attributes.get(ATTR_ENABLELOGGING)); - } - - /** - * Set the Language attribute [attribute ID 0x0021]. - *

    - * Modifies the language for the on-screen or audible user interface using three bytes - * from ISO-639-1. It consists of one byte of length and two bytes for the language code. For - * example if the language is set to English, the value would be "02 65 6E" for the language - * code "en" - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param language the {@link String} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setLanguage(final String value) { - return write(attributes.get(ATTR_LANGUAGE), value); - } - - /** - * Get the Language attribute [attribute ID 0x0021]. - *

    - * Modifies the language for the on-screen or audible user interface using three bytes - * from ISO-639-1. It consists of one byte of length and two bytes for the language code. For - * example if the language is set to English, the value would be "02 65 6E" for the language - * code "en" - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getLanguageAsync() { - return read(attributes.get(ATTR_LANGUAGE)); - } - - /** - * Synchronously get the Language attribute [attribute ID 0x0021]. - *

    - * Modifies the language for the on-screen or audible user interface using three bytes - * from ISO-639-1. It consists of one byte of length and two bytes for the language code. For - * example if the language is set to English, the value would be "02 65 6E" for the language - * code "en" - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link String} attribute value, or null on error - */ - public String getLanguage(final long refreshPeriod) { - if (attributes.get(ATTR_LANGUAGE).isLastValueCurrent(refreshPeriod)) { - return (String) attributes.get(ATTR_LANGUAGE).getLastValue(); - } - - return (String) readSync(attributes.get(ATTR_LANGUAGE)); - } - - /** - * Set the LED Settings attribute [attribute ID 0x0022]. - *

    - * The settings for the LED support three different modes - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param ledSettings the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setLedSettings(final Integer value) { - return write(attributes.get(ATTR_LEDSETTINGS), value); - } - - /** - * Get the LED Settings attribute [attribute ID 0x0022]. - *

    - * The settings for the LED support three different modes - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getLedSettingsAsync() { - return read(attributes.get(ATTR_LEDSETTINGS)); - } - - /** - * Synchronously get the LED Settings attribute [attribute ID 0x0022]. - *

    - * The settings for the LED support three different modes - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getLedSettings(final long refreshPeriod) { - if (attributes.get(ATTR_LEDSETTINGS).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_LEDSETTINGS).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_LEDSETTINGS)); - } - - /** - * Set the Auto Relock Time attribute [attribute ID 0x0023]. - *

    - * The number of seconds to wait after unlocking a lock before it automatically locks - * again. 0=disabled. If set, unlock operations from any source will be timed. For one time - * unlock with timeout use the specific command. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param autoRelockTime the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setAutoRelockTime(final Integer value) { - return write(attributes.get(ATTR_AUTORELOCKTIME), value); - } - - /** - * Get the Auto Relock Time attribute [attribute ID 0x0023]. - *

    - * The number of seconds to wait after unlocking a lock before it automatically locks - * again. 0=disabled. If set, unlock operations from any source will be timed. For one time - * unlock with timeout use the specific command. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getAutoRelockTimeAsync() { - return read(attributes.get(ATTR_AUTORELOCKTIME)); - } - - /** - * Synchronously get the Auto Relock Time attribute [attribute ID 0x0023]. - *

    - * The number of seconds to wait after unlocking a lock before it automatically locks - * again. 0=disabled. If set, unlock operations from any source will be timed. For one time - * unlock with timeout use the specific command. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getAutoRelockTime(final long refreshPeriod) { - if (attributes.get(ATTR_AUTORELOCKTIME).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_AUTORELOCKTIME).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_AUTORELOCKTIME)); - } - - /** - * Set the Sound Volume attribute [attribute ID 0x0024]. - *

    - * The sound volume on a door lock has three possible settings: silent, low and high volumes - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param soundVolume the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setSoundVolume(final Integer value) { - return write(attributes.get(ATTR_SOUNDVOLUME), value); - } - - /** - * Get the Sound Volume attribute [attribute ID 0x0024]. - *

    - * The sound volume on a door lock has three possible settings: silent, low and high volumes - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getSoundVolumeAsync() { - return read(attributes.get(ATTR_SOUNDVOLUME)); - } - - /** - * Synchronously get the Sound Volume attribute [attribute ID 0x0024]. - *

    - * The sound volume on a door lock has three possible settings: silent, low and high volumes - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getSoundVolume(final long refreshPeriod) { - if (attributes.get(ATTR_SOUNDVOLUME).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_SOUNDVOLUME).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_SOUNDVOLUME)); - } - - /** - * Set the Operating Mode attribute [attribute ID 0x0025]. - *

    - * Shows the current operating mode - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param operatingMode the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setOperatingMode(final Integer value) { - return write(attributes.get(ATTR_OPERATINGMODE), value); - } - - /** - * Get the Operating Mode attribute [attribute ID 0x0025]. - *

    - * Shows the current operating mode - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getOperatingModeAsync() { - return read(attributes.get(ATTR_OPERATINGMODE)); - } - - /** - * Synchronously get the Operating Mode attribute [attribute ID 0x0025]. - *

    - * Shows the current operating mode - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getOperatingMode(final long refreshPeriod) { - if (attributes.get(ATTR_OPERATINGMODE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_OPERATINGMODE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_OPERATINGMODE)); - } - - /** - * Get the Supported Operating Modes attribute [attribute ID 0x0026]. - *

    - * This bitmap contains all operating bits of the Operating Mode Attribute supported by - * the lock. The value of the enumeration in “Operating Mode” defines the related bit to be - * set, as shown in Table 7-16. All bits supported by a lock SHALL be set to zero. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getSupportedOperatingModesAsync() { - return read(attributes.get(ATTR_SUPPORTEDOPERATINGMODES)); - } - - /** - * Synchronously get the Supported Operating Modes attribute [attribute ID 0x0026]. - *

    - * This bitmap contains all operating bits of the Operating Mode Attribute supported by - * the lock. The value of the enumeration in “Operating Mode” defines the related bit to be - * set, as shown in Table 7-16. All bits supported by a lock SHALL be set to zero. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getSupportedOperatingModes(final long refreshPeriod) { - if (attributes.get(ATTR_SUPPORTEDOPERATINGMODES).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_SUPPORTEDOPERATINGMODES).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_SUPPORTEDOPERATINGMODES)); - } - - /** - * Set reporting for the Supported Operating Modes attribute [attribute ID 0x0026]. - *

    - * This bitmap contains all operating bits of the Operating Mode Attribute supported by - * the lock. The value of the enumeration in “Operating Mode” defines the related bit to be - * set, as shown in Table 7-16. All bits supported by a lock SHALL be set to zero. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param minInterval minimum reporting period - * @param maxInterval maximum reporting period - * @return the {@link Future} command result future - */ - public Future setSupportedOperatingModesReporting(final int minInterval, final int maxInterval) { - return setReporting(attributes.get(ATTR_SUPPORTEDOPERATINGMODES), minInterval, maxInterval); - } - - /** - * Get the Default Configuration Register attribute [attribute ID 0x0027]. - *

    - * This attribute represents the default configurations as they are physically set on the - * device (example: hardware dip switch setting, etc…) and represents the default - * setting for some of the attributes within this Operational Setting Attribute Set (for - * example: LED, Auto Lock, Sound Volume, and Operating Mode attributes). - *

    - * This is a read-only attribute and is intended to allow clients to determine what changes - * MAY need to be made without having to query all the included attributes. It MAY be - * beneficial for the clients to know what the device’s original settings were in the event - * that the device needs to be restored to factory default settings. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getDefaultConfigurationRegisterAsync() { - return read(attributes.get(ATTR_DEFAULTCONFIGURATIONREGISTER)); - } - - /** - * Synchronously get the Default Configuration Register attribute [attribute ID 0x0027]. - *

    - * This attribute represents the default configurations as they are physically set on the - * device (example: hardware dip switch setting, etc…) and represents the default - * setting for some of the attributes within this Operational Setting Attribute Set (for - * example: LED, Auto Lock, Sound Volume, and Operating Mode attributes). - *

    - * This is a read-only attribute and is intended to allow clients to determine what changes - * MAY need to be made without having to query all the included attributes. It MAY be - * beneficial for the clients to know what the device’s original settings were in the event - * that the device needs to be restored to factory default settings. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getDefaultConfigurationRegister(final long refreshPeriod) { - if (attributes.get(ATTR_DEFAULTCONFIGURATIONREGISTER).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_DEFAULTCONFIGURATIONREGISTER).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_DEFAULTCONFIGURATIONREGISTER)); - } - - /** - * Set reporting for the Default Configuration Register attribute [attribute ID 0x0027]. - *

    - * This attribute represents the default configurations as they are physically set on the - * device (example: hardware dip switch setting, etc…) and represents the default - * setting for some of the attributes within this Operational Setting Attribute Set (for - * example: LED, Auto Lock, Sound Volume, and Operating Mode attributes). - *

    - * This is a read-only attribute and is intended to allow clients to determine what changes - * MAY need to be made without having to query all the included attributes. It MAY be - * beneficial for the clients to know what the device’s original settings were in the event - * that the device needs to be restored to factory default settings. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param minInterval minimum reporting period - * @param maxInterval maximum reporting period - * @return the {@link Future} command result future - */ - public Future setDefaultConfigurationRegisterReporting(final int minInterval, - final int maxInterval) { - return setReporting(attributes.get(ATTR_DEFAULTCONFIGURATIONREGISTER), minInterval, maxInterval); - } - - /** - * Set the Enable Local Programming attribute [attribute ID 0x0028]. - *

    - * Enable/disable local programming on the door lock. The local programming features - * includes but not limited to adding new user codes, deleting existing user codes, add new - * schedule, deleting existing schedule on the local door lock interfaces. If this value - * is set to 0x01 or TRUE then local programming is enabled on the door lock. If it is set to - * 0x00 or FALSE then local programming is disabled on the door lock. Local programming is - * enabled by default. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param enableLocalProgramming the {@link Boolean} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setEnableLocalProgramming(final Boolean value) { - return write(attributes.get(ATTR_ENABLELOCALPROGRAMMING), value); - } - - /** - * Get the Enable Local Programming attribute [attribute ID 0x0028]. - *

    - * Enable/disable local programming on the door lock. The local programming features - * includes but not limited to adding new user codes, deleting existing user codes, add new - * schedule, deleting existing schedule on the local door lock interfaces. If this value - * is set to 0x01 or TRUE then local programming is enabled on the door lock. If it is set to - * 0x00 or FALSE then local programming is disabled on the door lock. Local programming is - * enabled by default. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getEnableLocalProgrammingAsync() { - return read(attributes.get(ATTR_ENABLELOCALPROGRAMMING)); - } - - /** - * Synchronously get the Enable Local Programming attribute [attribute ID 0x0028]. - *

    - * Enable/disable local programming on the door lock. The local programming features - * includes but not limited to adding new user codes, deleting existing user codes, add new - * schedule, deleting existing schedule on the local door lock interfaces. If this value - * is set to 0x01 or TRUE then local programming is enabled on the door lock. If it is set to - * 0x00 or FALSE then local programming is disabled on the door lock. Local programming is - * enabled by default. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Boolean} attribute value, or null on error - */ - public Boolean getEnableLocalProgramming(final long refreshPeriod) { - if (attributes.get(ATTR_ENABLELOCALPROGRAMMING).isLastValueCurrent(refreshPeriod)) { - return (Boolean) attributes.get(ATTR_ENABLELOCALPROGRAMMING).getLastValue(); - } - - return (Boolean) readSync(attributes.get(ATTR_ENABLELOCALPROGRAMMING)); - } - - /** - * Set the Enable One Touch Locking attribute [attribute ID 0x0029]. - *

    - * Enable/disable the ability to lock the door lock with a single touch on the door lock. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param enableOneTouchLocking the {@link Boolean} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setEnableOneTouchLocking(final Boolean value) { - return write(attributes.get(ATTR_ENABLEONETOUCHLOCKING), value); - } - - /** - * Get the Enable One Touch Locking attribute [attribute ID 0x0029]. - *

    - * Enable/disable the ability to lock the door lock with a single touch on the door lock. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getEnableOneTouchLockingAsync() { - return read(attributes.get(ATTR_ENABLEONETOUCHLOCKING)); - } - - /** - * Synchronously get the Enable One Touch Locking attribute [attribute ID 0x0029]. - *

    - * Enable/disable the ability to lock the door lock with a single touch on the door lock. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Boolean} attribute value, or null on error - */ - public Boolean getEnableOneTouchLocking(final long refreshPeriod) { - if (attributes.get(ATTR_ENABLEONETOUCHLOCKING).isLastValueCurrent(refreshPeriod)) { - return (Boolean) attributes.get(ATTR_ENABLEONETOUCHLOCKING).getLastValue(); - } - - return (Boolean) readSync(attributes.get(ATTR_ENABLEONETOUCHLOCKING)); - } - - /** - * Set the Enable Inside Status Led attribute [attribute ID 0x002A]. - *

    - * Enable/disable an inside LED that allows the user to see at a glance if the door is locked. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param enableInsideStatusLed the {@link Boolean} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setEnableInsideStatusLed(final Boolean value) { - return write(attributes.get(ATTR_ENABLEINSIDESTATUSLED), value); - } - - /** - * Get the Enable Inside Status Led attribute [attribute ID 0x002A]. - *

    - * Enable/disable an inside LED that allows the user to see at a glance if the door is locked. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getEnableInsideStatusLedAsync() { - return read(attributes.get(ATTR_ENABLEINSIDESTATUSLED)); - } - - /** - * Synchronously get the Enable Inside Status Led attribute [attribute ID 0x002A]. - *

    - * Enable/disable an inside LED that allows the user to see at a glance if the door is locked. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Boolean} attribute value, or null on error - */ - public Boolean getEnableInsideStatusLed(final long refreshPeriod) { - if (attributes.get(ATTR_ENABLEINSIDESTATUSLED).isLastValueCurrent(refreshPeriod)) { - return (Boolean) attributes.get(ATTR_ENABLEINSIDESTATUSLED).getLastValue(); - } - - return (Boolean) readSync(attributes.get(ATTR_ENABLEINSIDESTATUSLED)); - } - - /** - * Set the Enable Privacy Mode Button attribute [attribute ID 0x002B]. - *

    - * Enable/disable a button inside the door that is used to put the lock into privacy mode. - * When the lock is in privacy mode it cannot be manipulated from the outside. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param enablePrivacyModeButton the {@link Boolean} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setEnablePrivacyModeButton(final Boolean value) { - return write(attributes.get(ATTR_ENABLEPRIVACYMODEBUTTON), value); - } - - /** - * Get the Enable Privacy Mode Button attribute [attribute ID 0x002B]. - *

    - * Enable/disable a button inside the door that is used to put the lock into privacy mode. - * When the lock is in privacy mode it cannot be manipulated from the outside. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getEnablePrivacyModeButtonAsync() { - return read(attributes.get(ATTR_ENABLEPRIVACYMODEBUTTON)); - } - - /** - * Synchronously get the Enable Privacy Mode Button attribute [attribute ID 0x002B]. - *

    - * Enable/disable a button inside the door that is used to put the lock into privacy mode. - * When the lock is in privacy mode it cannot be manipulated from the outside. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Boolean} attribute value, or null on error - */ - public Boolean getEnablePrivacyModeButton(final long refreshPeriod) { - if (attributes.get(ATTR_ENABLEPRIVACYMODEBUTTON).isLastValueCurrent(refreshPeriod)) { - return (Boolean) attributes.get(ATTR_ENABLEPRIVACYMODEBUTTON).getLastValue(); - } - - return (Boolean) readSync(attributes.get(ATTR_ENABLEPRIVACYMODEBUTTON)); - } - - /** - * Set the Wrong Code Entry Limit attribute [attribute ID 0x0030]. - *

    - * The number of incorrect codes or RFID presentment attempts a user is allowed to enter - * before the door will enter a lockout state. The lockout state will be for the duration of - * UserCodeTemporaryDisableTime. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param wrongCodeEntryLimit the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setWrongCodeEntryLimit(final Integer value) { - return write(attributes.get(ATTR_WRONGCODEENTRYLIMIT), value); - } - - /** - * Get the Wrong Code Entry Limit attribute [attribute ID 0x0030]. - *

    - * The number of incorrect codes or RFID presentment attempts a user is allowed to enter - * before the door will enter a lockout state. The lockout state will be for the duration of - * UserCodeTemporaryDisableTime. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getWrongCodeEntryLimitAsync() { - return read(attributes.get(ATTR_WRONGCODEENTRYLIMIT)); - } - - /** - * Synchronously get the Wrong Code Entry Limit attribute [attribute ID 0x0030]. - *

    - * The number of incorrect codes or RFID presentment attempts a user is allowed to enter - * before the door will enter a lockout state. The lockout state will be for the duration of - * UserCodeTemporaryDisableTime. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getWrongCodeEntryLimit(final long refreshPeriod) { - if (attributes.get(ATTR_WRONGCODEENTRYLIMIT).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_WRONGCODEENTRYLIMIT).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_WRONGCODEENTRYLIMIT)); - } - - /** - * Set the User Code Temporary Disable Time attribute [attribute ID 0x0031]. - *

    - * The number of seconds that the lock shuts down following wrong code entry. 1-255 - * seconds. Device can shutdown to lock user out for specified amount of time. (Makes it - * difficult to try and guess a PIN for the device.) - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param userCodeTemporaryDisableTime the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setUserCodeTemporaryDisableTime(final Integer value) { - return write(attributes.get(ATTR_USERCODETEMPORARYDISABLETIME), value); - } - - /** - * Get the User Code Temporary Disable Time attribute [attribute ID 0x0031]. - *

    - * The number of seconds that the lock shuts down following wrong code entry. 1-255 - * seconds. Device can shutdown to lock user out for specified amount of time. (Makes it - * difficult to try and guess a PIN for the device.) - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getUserCodeTemporaryDisableTimeAsync() { - return read(attributes.get(ATTR_USERCODETEMPORARYDISABLETIME)); - } - - /** - * Synchronously get the User Code Temporary Disable Time attribute [attribute ID 0x0031]. - *

    - * The number of seconds that the lock shuts down following wrong code entry. 1-255 - * seconds. Device can shutdown to lock user out for specified amount of time. (Makes it - * difficult to try and guess a PIN for the device.) - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getUserCodeTemporaryDisableTime(final long refreshPeriod) { - if (attributes.get(ATTR_USERCODETEMPORARYDISABLETIME).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_USERCODETEMPORARYDISABLETIME).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_USERCODETEMPORARYDISABLETIME)); - } - - /** - * Set the Send PIN Over The Air attribute [attribute ID 0x0032]. - *

    - * Boolean set to True if it is ok for the door lock server to send PINs over the air. This - * attribute determines the behavior of the server’s TX operation. If it is false, then it - * is not ok for the device to send PIN in any messages over the air. - *

    - * The PIN field within any door lock cluster message SHALL keep the first octet unchanged - * and masks the actual code by replacing with 0xFF. For example (PIN "1234" ): If the - * attribute value is True, 0x04 0x31 0x32 0x33 0x34 SHALL be used in the PIN field in any door - * lock cluster message payload. If the attribute value is False, 0x04 0xFF 0xFF 0xFF 0xFF - * SHALL be used. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param sendPinOverTheAir the {@link Boolean} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setSendPinOverTheAir(final Boolean value) { - return write(attributes.get(ATTR_SENDPINOVERTHEAIR), value); - } - - /** - * Get the Send PIN Over The Air attribute [attribute ID 0x0032]. - *

    - * Boolean set to True if it is ok for the door lock server to send PINs over the air. This - * attribute determines the behavior of the server’s TX operation. If it is false, then it - * is not ok for the device to send PIN in any messages over the air. - *

    - * The PIN field within any door lock cluster message SHALL keep the first octet unchanged - * and masks the actual code by replacing with 0xFF. For example (PIN "1234" ): If the - * attribute value is True, 0x04 0x31 0x32 0x33 0x34 SHALL be used in the PIN field in any door - * lock cluster message payload. If the attribute value is False, 0x04 0xFF 0xFF 0xFF 0xFF - * SHALL be used. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getSendPinOverTheAirAsync() { - return read(attributes.get(ATTR_SENDPINOVERTHEAIR)); - } - - /** - * Synchronously get the Send PIN Over The Air attribute [attribute ID 0x0032]. - *

    - * Boolean set to True if it is ok for the door lock server to send PINs over the air. This - * attribute determines the behavior of the server’s TX operation. If it is false, then it - * is not ok for the device to send PIN in any messages over the air. - *

    - * The PIN field within any door lock cluster message SHALL keep the first octet unchanged - * and masks the actual code by replacing with 0xFF. For example (PIN "1234" ): If the - * attribute value is True, 0x04 0x31 0x32 0x33 0x34 SHALL be used in the PIN field in any door - * lock cluster message payload. If the attribute value is False, 0x04 0xFF 0xFF 0xFF 0xFF - * SHALL be used. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Boolean} attribute value, or null on error - */ - public Boolean getSendPinOverTheAir(final long refreshPeriod) { - if (attributes.get(ATTR_SENDPINOVERTHEAIR).isLastValueCurrent(refreshPeriod)) { - return (Boolean) attributes.get(ATTR_SENDPINOVERTHEAIR).getLastValue(); - } - - return (Boolean) readSync(attributes.get(ATTR_SENDPINOVERTHEAIR)); - } - - /** - * Set the Require PIN For RF Operation attribute [attribute ID 0x0033]. - *

    - * Boolean set to True if the door lock server requires that an optional PINs be included in - * the payload of RF lock operation events like Lock, Unlock and Toggle in order to - * function. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param requirePinForRfOperation the {@link Boolean} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setRequirePinForRfOperation(final Boolean value) { - return write(attributes.get(ATTR_REQUIREPINFORRFOPERATION), value); - } - - /** - * Get the Require PIN For RF Operation attribute [attribute ID 0x0033]. - *

    - * Boolean set to True if the door lock server requires that an optional PINs be included in - * the payload of RF lock operation events like Lock, Unlock and Toggle in order to - * function. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getRequirePinForRfOperationAsync() { - return read(attributes.get(ATTR_REQUIREPINFORRFOPERATION)); - } - - /** - * Synchronously get the Require PIN For RF Operation attribute [attribute ID 0x0033]. - *

    - * Boolean set to True if the door lock server requires that an optional PINs be included in - * the payload of RF lock operation events like Lock, Unlock and Toggle in order to - * function. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Boolean} attribute value, or null on error - */ - public Boolean getRequirePinForRfOperation(final long refreshPeriod) { - if (attributes.get(ATTR_REQUIREPINFORRFOPERATION).isLastValueCurrent(refreshPeriod)) { - return (Boolean) attributes.get(ATTR_REQUIREPINFORRFOPERATION).getLastValue(); - } - - return (Boolean) readSync(attributes.get(ATTR_REQUIREPINFORRFOPERATION)); - } - - /** - * Get the Zigbee Security Level attribute [attribute ID 0x0034]. - *

    - * Door locks MAY sometimes wish to implement a higher level of security within the - * application protocol in additional to the default network security. For instance a - * door lock MAY wish to use additional APS security for cluster transactions. This - * protects the door lock against being controlled by any other devices which have access - * to the network key. - *

    - * The Security Level attribute allows the door lock manufacturer to indicate what level - * of security the doorlock requires. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getZigbeeSecurityLevelAsync() { - return read(attributes.get(ATTR_ZIGBEESECURITYLEVEL)); - } - - /** - * Synchronously get the Zigbee Security Level attribute [attribute ID 0x0034]. - *

    - * Door locks MAY sometimes wish to implement a higher level of security within the - * application protocol in additional to the default network security. For instance a - * door lock MAY wish to use additional APS security for cluster transactions. This - * protects the door lock against being controlled by any other devices which have access - * to the network key. - *

    - * The Security Level attribute allows the door lock manufacturer to indicate what level - * of security the doorlock requires. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getZigbeeSecurityLevel(final long refreshPeriod) { - if (attributes.get(ATTR_ZIGBEESECURITYLEVEL).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_ZIGBEESECURITYLEVEL).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_ZIGBEESECURITYLEVEL)); - } - - /** - * Set reporting for the Zigbee Security Level attribute [attribute ID 0x0034]. - *

    - * Door locks MAY sometimes wish to implement a higher level of security within the - * application protocol in additional to the default network security. For instance a - * door lock MAY wish to use additional APS security for cluster transactions. This - * protects the door lock against being controlled by any other devices which have access - * to the network key. - *

    - * The Security Level attribute allows the door lock manufacturer to indicate what level - * of security the doorlock requires. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param minInterval minimum reporting period - * @param maxInterval maximum reporting period - * @return the {@link Future} command result future - */ - public Future setZigbeeSecurityLevelReporting(final int minInterval, final int maxInterval) { - return setReporting(attributes.get(ATTR_ZIGBEESECURITYLEVEL), minInterval, maxInterval); - } - - /** - * Set the Alarm Mask attribute [attribute ID 0x0040]. - *

    - * The alarm mask is used to turn on/off alarms for particular functions. Alarms for an - * alarm group are enabled if the associated alarm mask bit is set. Each bit represents a - * group of alarms. Entire alarm groups can be turned on or off by setting or clearing the - * associated bit in the alarm mask. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param alarmMask the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setAlarmMask(final Integer value) { - return write(attributes.get(ATTR_ALARMMASK), value); - } - - /** - * Get the Alarm Mask attribute [attribute ID 0x0040]. - *

    - * The alarm mask is used to turn on/off alarms for particular functions. Alarms for an - * alarm group are enabled if the associated alarm mask bit is set. Each bit represents a - * group of alarms. Entire alarm groups can be turned on or off by setting or clearing the - * associated bit in the alarm mask. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getAlarmMaskAsync() { - return read(attributes.get(ATTR_ALARMMASK)); - } - - /** - * Synchronously get the Alarm Mask attribute [attribute ID 0x0040]. - *

    - * The alarm mask is used to turn on/off alarms for particular functions. Alarms for an - * alarm group are enabled if the associated alarm mask bit is set. Each bit represents a - * group of alarms. Entire alarm groups can be turned on or off by setting or clearing the - * associated bit in the alarm mask. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getAlarmMask(final long refreshPeriod) { - if (attributes.get(ATTR_ALARMMASK).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_ALARMMASK).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_ALARMMASK)); - } - - /** - * Set the Keypad Operation Event Mask attribute [attribute ID 0x0041]. - *

    - * Event mask used to turn on and off the transmission of keypad operation events. This mask - * DOES NOT apply to the storing of events in the report table. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param keypadOperationEventMask the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setKeypadOperationEventMask(final Integer value) { - return write(attributes.get(ATTR_KEYPADOPERATIONEVENTMASK), value); - } - - /** - * Get the Keypad Operation Event Mask attribute [attribute ID 0x0041]. - *

    - * Event mask used to turn on and off the transmission of keypad operation events. This mask - * DOES NOT apply to the storing of events in the report table. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getKeypadOperationEventMaskAsync() { - return read(attributes.get(ATTR_KEYPADOPERATIONEVENTMASK)); - } - - /** - * Synchronously get the Keypad Operation Event Mask attribute [attribute ID 0x0041]. - *

    - * Event mask used to turn on and off the transmission of keypad operation events. This mask - * DOES NOT apply to the storing of events in the report table. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getKeypadOperationEventMask(final long refreshPeriod) { - if (attributes.get(ATTR_KEYPADOPERATIONEVENTMASK).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_KEYPADOPERATIONEVENTMASK).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_KEYPADOPERATIONEVENTMASK)); - } - - /** - * Set the RF Operation Event Mask attribute [attribute ID 0x0042]. - *

    - * Event mask used to turn on and off the transmission of RF operation events. This mask DOES - * NOT apply to the storing of events in the report table. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param rfOperationEventMask the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setRfOperationEventMask(final Integer value) { - return write(attributes.get(ATTR_RFOPERATIONEVENTMASK), value); - } - - /** - * Get the RF Operation Event Mask attribute [attribute ID 0x0042]. - *

    - * Event mask used to turn on and off the transmission of RF operation events. This mask DOES - * NOT apply to the storing of events in the report table. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getRfOperationEventMaskAsync() { - return read(attributes.get(ATTR_RFOPERATIONEVENTMASK)); - } - - /** - * Synchronously get the RF Operation Event Mask attribute [attribute ID 0x0042]. - *

    - * Event mask used to turn on and off the transmission of RF operation events. This mask DOES - * NOT apply to the storing of events in the report table. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getRfOperationEventMask(final long refreshPeriod) { - if (attributes.get(ATTR_RFOPERATIONEVENTMASK).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_RFOPERATIONEVENTMASK).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_RFOPERATIONEVENTMASK)); - } - - /** - * Set the Manual Operation Event Mask attribute [attribute ID 0x0043]. - *

    - * Event mask used to turn on and off manual operation events. This mask DOES NOT apply to the - * storing of events in the report table. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param manualOperationEventMask the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setManualOperationEventMask(final Integer value) { - return write(attributes.get(ATTR_MANUALOPERATIONEVENTMASK), value); - } - - /** - * Get the Manual Operation Event Mask attribute [attribute ID 0x0043]. - *

    - * Event mask used to turn on and off manual operation events. This mask DOES NOT apply to the - * storing of events in the report table. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getManualOperationEventMaskAsync() { - return read(attributes.get(ATTR_MANUALOPERATIONEVENTMASK)); - } - - /** - * Synchronously get the Manual Operation Event Mask attribute [attribute ID 0x0043]. - *

    - * Event mask used to turn on and off manual operation events. This mask DOES NOT apply to the - * storing of events in the report table. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getManualOperationEventMask(final long refreshPeriod) { - if (attributes.get(ATTR_MANUALOPERATIONEVENTMASK).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MANUALOPERATIONEVENTMASK).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MANUALOPERATIONEVENTMASK)); - } - - /** - * Set the RFID Operation Event Mask attribute [attribute ID 0x0044]. - *

    - * Event mask used to turn on and off RFID operation events. This mask DOES NOT apply to the - * storing of events in the report table. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param rfidOperationEventMask the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setRfidOperationEventMask(final Integer value) { - return write(attributes.get(ATTR_RFIDOPERATIONEVENTMASK), value); - } - - /** - * Get the RFID Operation Event Mask attribute [attribute ID 0x0044]. - *

    - * Event mask used to turn on and off RFID operation events. This mask DOES NOT apply to the - * storing of events in the report table. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getRfidOperationEventMaskAsync() { - return read(attributes.get(ATTR_RFIDOPERATIONEVENTMASK)); - } - - /** - * Synchronously get the RFID Operation Event Mask attribute [attribute ID 0x0044]. - *

    - * Event mask used to turn on and off RFID operation events. This mask DOES NOT apply to the - * storing of events in the report table. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getRfidOperationEventMask(final long refreshPeriod) { - if (attributes.get(ATTR_RFIDOPERATIONEVENTMASK).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_RFIDOPERATIONEVENTMASK).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_RFIDOPERATIONEVENTMASK)); - } - - /** - * Set the Keypad Programming Event Mask attribute [attribute ID 0x0045]. - *

    - * Event mask used to turn on and off keypad programming events. This mask DOES NOT apply to - * the storing of events in the report table. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param keypadProgrammingEventMask the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setKeypadProgrammingEventMask(final Integer value) { - return write(attributes.get(ATTR_KEYPADPROGRAMMINGEVENTMASK), value); - } - - /** - * Get the Keypad Programming Event Mask attribute [attribute ID 0x0045]. - *

    - * Event mask used to turn on and off keypad programming events. This mask DOES NOT apply to - * the storing of events in the report table. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getKeypadProgrammingEventMaskAsync() { - return read(attributes.get(ATTR_KEYPADPROGRAMMINGEVENTMASK)); - } - - /** - * Synchronously get the Keypad Programming Event Mask attribute [attribute ID 0x0045]. - *

    - * Event mask used to turn on and off keypad programming events. This mask DOES NOT apply to - * the storing of events in the report table. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getKeypadProgrammingEventMask(final long refreshPeriod) { - if (attributes.get(ATTR_KEYPADPROGRAMMINGEVENTMASK).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_KEYPADPROGRAMMINGEVENTMASK).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_KEYPADPROGRAMMINGEVENTMASK)); - } - - /** - * Set the RF Programming Event Mask attribute [attribute ID 0x0046]. - *

    - * Event mask used to turn on and off RF programming events. This mask DOES NOT apply to the - * storing of events in the report table. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param rfProgrammingEventMask the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setRfProgrammingEventMask(final Integer value) { - return write(attributes.get(ATTR_RFPROGRAMMINGEVENTMASK), value); - } - - /** - * Get the RF Programming Event Mask attribute [attribute ID 0x0046]. - *

    - * Event mask used to turn on and off RF programming events. This mask DOES NOT apply to the - * storing of events in the report table. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getRfProgrammingEventMaskAsync() { - return read(attributes.get(ATTR_RFPROGRAMMINGEVENTMASK)); - } - - /** - * Synchronously get the RF Programming Event Mask attribute [attribute ID 0x0046]. - *

    - * Event mask used to turn on and off RF programming events. This mask DOES NOT apply to the - * storing of events in the report table. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getRfProgrammingEventMask(final long refreshPeriod) { - if (attributes.get(ATTR_RFPROGRAMMINGEVENTMASK).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_RFPROGRAMMINGEVENTMASK).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_RFPROGRAMMINGEVENTMASK)); - } - - /** - * Set the RFID Programming Event Mask attribute [attribute ID 0x0047]. - *

    - * Event mask used to turn on and off RFID programming events. This mask DOES NOT apply to the - * storing of events in the report table. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param rfidProgrammingEventMask the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setRfidProgrammingEventMask(final Integer value) { - return write(attributes.get(ATTR_RFIDPROGRAMMINGEVENTMASK), value); - } - - /** - * Get the RFID Programming Event Mask attribute [attribute ID 0x0047]. - *

    - * Event mask used to turn on and off RFID programming events. This mask DOES NOT apply to the - * storing of events in the report table. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getRfidProgrammingEventMaskAsync() { - return read(attributes.get(ATTR_RFIDPROGRAMMINGEVENTMASK)); - } - - /** - * Synchronously get the RFID Programming Event Mask attribute [attribute ID 0x0047]. - *

    - * Event mask used to turn on and off RFID programming events. This mask DOES NOT apply to the - * storing of events in the report table. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getRfidProgrammingEventMask(final long refreshPeriod) { - if (attributes.get(ATTR_RFIDPROGRAMMINGEVENTMASK).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_RFIDPROGRAMMINGEVENTMASK).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_RFIDPROGRAMMINGEVENTMASK)); - } - - /** - * The Lock Door Command - *

    - * This command causes the lock device to lock the door. As of HA 1.2, this command includes - * an optional code for the lock. The door lock MAY require a PIN depending on the value of the - * [Require PIN for RF Operation attribute] - * - * @param pinCode {@link ByteArray} PIN Code - * @return the {@link Future} command result future - */ - public Future lockDoorCommand(ByteArray pinCode) { - LockDoorCommand command = new LockDoorCommand(); - - // Set the fields - command.setPinCode(pinCode); - - return send(command); - } - - /** - * The Unlock Door Command - *

    - * This command causes the lock device to unlock the door. As of HA 1.2, this command - * includes an optional code for the lock. The door lock MAY require a code depending on the - * value of the [Require PIN for RF Operation attribute]. - *

    - * - *

    - * Note: If the attribute AutoRelockTime is supported the lock will close when the auto relock - * time has expired - * - * @param pinCode {@link ByteArray} PIN Code - * @return the {@link Future} command result future - */ - public Future unlockDoorCommand(ByteArray pinCode) { - UnlockDoorCommand command = new UnlockDoorCommand(); - - // Set the fields - command.setPinCode(pinCode); - - return send(command); - } - - /** - * The Toggle - *

    - * Request the status of the lock. As of HA 1.2, this command includes an optional code for - * the lock. The door lock MAY require a code depending on the value of the [Require PIN for RF - * Operation attribute] - * - * @param pin {@link String} PIN - * @return the {@link Future} command result future - */ - public Future toggle(String pin) { - Toggle command = new Toggle(); - - // Set the fields - command.setPin(pin); - - return send(command); - } - - /** - * The Unlock With Timeout - *

    - * This command causes the lock device to unlock the door with a timeout parameter. After - * the time in seconds specified in the timeout field, the lock device will relock itself - * automatically. This timeout parameter is only temporary for this message transition - * only and overrides the default relock time as specified in the [Auto Relock Time - * attribute] attribute. If the door lock device is not capable of or does not want to - * support temporary Relock Timeout, it SHOULD not support this optional command. - * - * @param timeoutInSeconds {@link Integer} Timeout In Seconds - * @param pin {@link String} PIN - * @return the {@link Future} command result future - */ - public Future unlockWithTimeout(Integer timeoutInSeconds, String pin) { - UnlockWithTimeout command = new UnlockWithTimeout(); - - // Set the fields - command.setTimeoutInSeconds(timeoutInSeconds); - command.setPin(pin); - - return send(command); - } - - /** - * The Lock Door Response - *

    - * This command is sent in response to a Lock command with one status byte payload. The - * Status field SHALL be set to SUCCESS or FAILURE. - *

    - * The status byte only indicates if the message has received successfully. To determine - * the lock and/or door status, the client SHOULD query to [Lock State attribute] and [Door - * State attribute] - * - * @param status {@link Integer} Status - * @return the {@link Future} command result future - */ - public Future lockDoorResponse(Integer status) { - LockDoorResponse command = new LockDoorResponse(); - - // Set the fields - command.setStatus(status); - - return send(command); - } - - /** - * The Unlock Door Response - *

    - * This command is sent in response to a Toggle command with one status byte payload. The - * Status field SHALL be set to SUCCESS or FAILURE. - *

    - * The status byte only indicates if the message has received successfully. To determine - * the lock and/or door status, the client SHOULD query to [Lock State attribute] and [Door - * State attribute]. - * - * @param status {@link Integer} Status - * @return the {@link Future} command result future - */ - public Future unlockDoorResponse(Integer status) { - UnlockDoorResponse command = new UnlockDoorResponse(); - - // Set the fields - command.setStatus(status); - - return send(command); - } - - /** - * The Toggle Response - *

    - * This command is sent in response to a Toggle command with one status byte payload. The - * Status field SHALL be set to SUCCESS or FAILURE. - *

    - * The status byte only indicates if the message has received successfully. To determine - * the lock and/or door status, the client SHOULD query to [Lock State attribute] and [Door - * State attribute]. - * - * @param status {@link Integer} Status - * @return the {@link Future} command result future - */ - public Future toggleResponse(Integer status) { - ToggleResponse command = new ToggleResponse(); - - // Set the fields - command.setStatus(status); - - return send(command); - } - - /** - * The Unlock With Timeout Response - *

    - * This command is sent in response to an Unlock with Timeout command with one status byte - * payload. The Status field SHALL be set to SUCCESS or FAILURE. - *

    - * The status byte only indicates if the message has received successfully. To determine - * status, the client SHOULD query to [Lock State attribute] and [Door State attribute]. - * - * @param status {@link Integer} Status - * @return the {@link Future} command result future - */ - public Future unlockWithTimeoutResponse(Integer status) { - UnlockWithTimeoutResponse command = new UnlockWithTimeoutResponse(); - - // Set the fields - command.setStatus(status); - - return send(command); - } - - @Override - public ZclCommand getCommandFromId(int commandId) { - switch (commandId) { - case 0x00: // LOCK_DOOR_COMMAND - return new LockDoorCommand(); - case 0x01: // UNLOCK_DOOR_COMMAND - return new UnlockDoorCommand(); - case 0x02: // TOGGLE - return new Toggle(); - case 0x03: // UNLOCK_WITH_TIMEOUT - return new UnlockWithTimeout(); - default: - return null; - } - } - - @Override - public ZclCommand getResponseFromId(int commandId) { - switch (commandId) { - case 0x00: // LOCK_DOOR_RESPONSE - return new LockDoorResponse(); - case 0x01: // UNLOCK_DOOR_RESPONSE - return new UnlockDoorResponse(); - case 0x02: // TOGGLE_RESPONSE - return new ToggleResponse(); - case 0x03: // UNLOCK_WITH_TIMEOUT_RESPONSE - return new UnlockWithTimeoutResponse(); - default: - return null; - } - } -} \ No newline at end of file diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclElectricalMeasurementCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclElectricalMeasurementCluster.java deleted file mode 100644 index 7a20ce5f9..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclElectricalMeasurementCluster.java +++ /dev/null @@ -1,778 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.CommandResult; -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import com.zsmartsystems.zigbee.zcl.protocol.ZclClusterType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Future; -import javax.annotation.Generated; - -/** - * Electrical Measurement cluster implementation (Cluster ID 0x0B04). - *

    - * This cluster provides a mechanism for querying data about the electrical properties as measured - * by the device. This cluster may be implemented on any device type and be implemented on a per-endpoint - * basis. For example, a power strip device could represent each outlet on a different endpoint and - * report electrical information for each individual outlet. The only caveat is that if you implement - * an attribute that has an associated multiplier and divisor, then you must implement the associated - * multiplier and divisor attributes. For example if you implement DCVoltage, you must also implement - * DCVoltageMultiplier and DCVoltageDivisor. - *

    - * If you are interested in reading information about the power supply or battery level on the device, - * please see the Power Configuration cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclElectricalMeasurementCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0B04; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Electrical Measurement"; - - // Attribute constants - /** - * This attribute indicates a device’s measurement capabilities. This will be indicated by setting - * the desire measurement bits to 1. - */ - public static final int ATTR_MEASUREMENTTYPE = 0x0000; - /** - * The ACFrequency attribute represents the most recent AC Frequency reading in Hertz (Hz). - * If the frequency cannot be measured, a value of 0xFFFF is returned. - */ - public static final int ATTR_ACFREQUENCY = 0x0300; - /** - * Active power represents the current demand of active power delivered or received at the - * premises, in kW. Positive values indicate power delivered to the premises where negative - * values indicate power received from the premises. In case if device is capable of measuring - * multi elements or phases then this will be net active power value. - */ - public static final int ATTR_TOTALACTIVEPOWER = 0x0304; - /** - * Reactive power represents the current demand of reactive power delivered or - * received at the premises, in kVAr. Positive values indicate power delivered to - * the premises where negative values indicate power received from the premises. In - * case if device is capable of measuring multi elements or phases then this will be net reactive - * power value. - */ - public static final int ATTR_TOTALREACTIVEPOWER = 0x0305; - /** - * Represents the current demand of apparent power, in kVA. In case if device is capable of - * measuring multi elements or phases then this will be net apparent power value. - */ - public static final int ATTR_TOTALAPPARENTPOWER = 0x0306; - /** - * Represents the most recent RMS voltage reading in Volts (V). If the RMS voltage cannot be - * measured, a value of 0xFFFF is returned. - */ - public static final int ATTR_RMSVOLTAGE = 0x0505; - /** - * Represents the most recent RMS current reading in Amps (A). If the power cannot be measured, - * a value of 0xFFFF is returned. - */ - public static final int ATTR_RMSCURRENT = 0x0508; - /** - * Represents the single phase or Phase A, current demand of active power delivered or received at - * the premises, in Watts (W). Positive values indicate power delivered to the premises where negative - * values indicate power received from the premises. - */ - public static final int ATTR_ACTIVEPOWER = 0x050B; - /** - */ - public static final int ATTR_ACVOLTAGEMULTIPLIER = 0x0600; - /** - */ - public static final int ATTR_ACVOLTAGEDIVISOR = 0x0601; - /** - * Provides a value to be multiplied against the InstantaneousCurrent and RMSCurrentattributes. - * his attribute must be used in conjunction with the ACCurrentDivisorattribute. 0x0000 is an invalid value for this attribute. - */ - public static final int ATTR_ACCURRENTMULTIPLIER = 0x0602; - /** - * Provides a value to be divided against the ACCurrent, InstantaneousCurrent and - * RMSCurrentattributes. This attribute must be used in conjunction with the ACCurrentMultiplierattribute - * 0x0000 is an invalid value for this attribute. - */ - public static final int ATTR_ACCURRENTDIVISOR = 0x0603; - /** - * Provides a value to be multiplied against the InstantaneousPower and ActivePowerattributes. - * This attribute must be used in conjunction with the ACPowerDivisorattribute. 0x0000 is an invalid - * value for this attribute - */ - public static final int ATTR_ACPOWERMULTIPLIER = 0x0604; - /** - * Provides a value to be divided against the InstantaneousPower and ActivePowerattributes. - * This attribute must be used in conjunction with the ACPowerMultiplierattribute. 0x0000 is an - * invalid value for this attribute. - */ - public static final int ATTR_ACPOWERDIVISOR = 0x0605; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(14); - - attributeMap.put(ATTR_MEASUREMENTTYPE, new ZclAttribute(ZclClusterType.ELECTRICAL_MEASUREMENT, ATTR_MEASUREMENTTYPE, "MeasurementType", ZclDataType.BITMAP_32_BIT, true, true, false, false)); - attributeMap.put(ATTR_ACFREQUENCY, new ZclAttribute(ZclClusterType.ELECTRICAL_MEASUREMENT, ATTR_ACFREQUENCY, "ACFrequency", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_TOTALACTIVEPOWER, new ZclAttribute(ZclClusterType.ELECTRICAL_MEASUREMENT, ATTR_TOTALACTIVEPOWER, "TotalActivePower", ZclDataType.SIGNED_32_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_TOTALREACTIVEPOWER, new ZclAttribute(ZclClusterType.ELECTRICAL_MEASUREMENT, ATTR_TOTALREACTIVEPOWER, "TotalReactivePower", ZclDataType.SIGNED_32_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_TOTALAPPARENTPOWER, new ZclAttribute(ZclClusterType.ELECTRICAL_MEASUREMENT, ATTR_TOTALAPPARENTPOWER, "TotalApparentPower", ZclDataType.UNSIGNED_32_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_RMSVOLTAGE, new ZclAttribute(ZclClusterType.ELECTRICAL_MEASUREMENT, ATTR_RMSVOLTAGE, "RMSVoltage", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_RMSCURRENT, new ZclAttribute(ZclClusterType.ELECTRICAL_MEASUREMENT, ATTR_RMSCURRENT, "RMSCurrent", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_ACTIVEPOWER, new ZclAttribute(ZclClusterType.ELECTRICAL_MEASUREMENT, ATTR_ACTIVEPOWER, "ActivePower", ZclDataType.SIGNED_16_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_ACVOLTAGEMULTIPLIER, new ZclAttribute(ZclClusterType.ELECTRICAL_MEASUREMENT, ATTR_ACVOLTAGEMULTIPLIER, "ACVoltageMultiplier", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_ACVOLTAGEDIVISOR, new ZclAttribute(ZclClusterType.ELECTRICAL_MEASUREMENT, ATTR_ACVOLTAGEDIVISOR, "ACVoltageDivisor", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_ACCURRENTMULTIPLIER, new ZclAttribute(ZclClusterType.ELECTRICAL_MEASUREMENT, ATTR_ACCURRENTMULTIPLIER, "ACCurrentMultiplier", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_ACCURRENTDIVISOR, new ZclAttribute(ZclClusterType.ELECTRICAL_MEASUREMENT, ATTR_ACCURRENTDIVISOR, "ACCurrentDivisor", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_ACPOWERMULTIPLIER, new ZclAttribute(ZclClusterType.ELECTRICAL_MEASUREMENT, ATTR_ACPOWERMULTIPLIER, "ACPowerMultiplier", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_ACPOWERDIVISOR, new ZclAttribute(ZclClusterType.ELECTRICAL_MEASUREMENT, ATTR_ACPOWERDIVISOR, "ACPowerDivisor", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, false)); - - return attributeMap; - } - - /** - * Default constructor to create a Electrical Measurement cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclElectricalMeasurementCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } - - /** - * Get the MeasurementType attribute [attribute ID 0]. - *

    - * This attribute indicates a device’s measurement capabilities. This will be indicated by setting - * the desire measurement bits to 1. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getMeasurementTypeAsync() { - return read(attributes.get(ATTR_MEASUREMENTTYPE)); - } - - /** - * Synchronously get the MeasurementType attribute [attribute ID 0]. - *

    - * This attribute indicates a device’s measurement capabilities. This will be indicated by setting - * the desire measurement bits to 1. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMeasurementType(final long refreshPeriod) { - if (attributes.get(ATTR_MEASUREMENTTYPE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MEASUREMENTTYPE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MEASUREMENTTYPE)); - } - - /** - * Get the ACFrequency attribute [attribute ID 768]. - *

    - * The ACFrequency attribute represents the most recent AC Frequency reading in Hertz (Hz). - * If the frequency cannot be measured, a value of 0xFFFF is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getAcFrequencyAsync() { - return read(attributes.get(ATTR_ACFREQUENCY)); - } - - /** - * Synchronously get the ACFrequency attribute [attribute ID 768]. - *

    - * The ACFrequency attribute represents the most recent AC Frequency reading in Hertz (Hz). - * If the frequency cannot be measured, a value of 0xFFFF is returned. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getAcFrequency(final long refreshPeriod) { - if (attributes.get(ATTR_ACFREQUENCY).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_ACFREQUENCY).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_ACFREQUENCY)); - } - - /** - * Get the TotalActivePower attribute [attribute ID 772]. - *

    - * Active power represents the current demand of active power delivered or received at the - * premises, in kW. Positive values indicate power delivered to the premises where negative - * values indicate power received from the premises. In case if device is capable of measuring - * multi elements or phases then this will be net active power value. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getTotalActivePowerAsync() { - return read(attributes.get(ATTR_TOTALACTIVEPOWER)); - } - - /** - * Synchronously get the TotalActivePower attribute [attribute ID 772]. - *

    - * Active power represents the current demand of active power delivered or received at the - * premises, in kW. Positive values indicate power delivered to the premises where negative - * values indicate power received from the premises. In case if device is capable of measuring - * multi elements or phases then this will be net active power value. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getTotalActivePower(final long refreshPeriod) { - if (attributes.get(ATTR_TOTALACTIVEPOWER).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_TOTALACTIVEPOWER).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_TOTALACTIVEPOWER)); - } - - /** - * Get the TotalReactivePower attribute [attribute ID 773]. - *

    - * Reactive power represents the current demand of reactive power delivered or - * received at the premises, in kVAr. Positive values indicate power delivered to - * the premises where negative values indicate power received from the premises. In - * case if device is capable of measuring multi elements or phases then this will be net reactive - * power value. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getTotalReactivePowerAsync() { - return read(attributes.get(ATTR_TOTALREACTIVEPOWER)); - } - - /** - * Synchronously get the TotalReactivePower attribute [attribute ID 773]. - *

    - * Reactive power represents the current demand of reactive power delivered or - * received at the premises, in kVAr. Positive values indicate power delivered to - * the premises where negative values indicate power received from the premises. In - * case if device is capable of measuring multi elements or phases then this will be net reactive - * power value. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getTotalReactivePower(final long refreshPeriod) { - if (attributes.get(ATTR_TOTALREACTIVEPOWER).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_TOTALREACTIVEPOWER).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_TOTALREACTIVEPOWER)); - } - - /** - * Get the TotalApparentPower attribute [attribute ID 774]. - *

    - * Represents the current demand of apparent power, in kVA. In case if device is capable of - * measuring multi elements or phases then this will be net apparent power value. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getTotalApparentPowerAsync() { - return read(attributes.get(ATTR_TOTALAPPARENTPOWER)); - } - - /** - * Synchronously get the TotalApparentPower attribute [attribute ID 774]. - *

    - * Represents the current demand of apparent power, in kVA. In case if device is capable of - * measuring multi elements or phases then this will be net apparent power value. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getTotalApparentPower(final long refreshPeriod) { - if (attributes.get(ATTR_TOTALAPPARENTPOWER).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_TOTALAPPARENTPOWER).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_TOTALAPPARENTPOWER)); - } - - /** - * Get the RMSVoltage attribute [attribute ID 1285]. - *

    - * Represents the most recent RMS voltage reading in Volts (V). If the RMS voltage cannot be - * measured, a value of 0xFFFF is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getRmsVoltageAsync() { - return read(attributes.get(ATTR_RMSVOLTAGE)); - } - - /** - * Synchronously get the RMSVoltage attribute [attribute ID 1285]. - *

    - * Represents the most recent RMS voltage reading in Volts (V). If the RMS voltage cannot be - * measured, a value of 0xFFFF is returned. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getRmsVoltage(final long refreshPeriod) { - if (attributes.get(ATTR_RMSVOLTAGE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_RMSVOLTAGE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_RMSVOLTAGE)); - } - - /** - * Get the RMSCurrent attribute [attribute ID 1288]. - *

    - * Represents the most recent RMS current reading in Amps (A). If the power cannot be measured, - * a value of 0xFFFF is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getRmsCurrentAsync() { - return read(attributes.get(ATTR_RMSCURRENT)); - } - - /** - * Synchronously get the RMSCurrent attribute [attribute ID 1288]. - *

    - * Represents the most recent RMS current reading in Amps (A). If the power cannot be measured, - * a value of 0xFFFF is returned. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getRmsCurrent(final long refreshPeriod) { - if (attributes.get(ATTR_RMSCURRENT).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_RMSCURRENT).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_RMSCURRENT)); - } - - /** - * Get the ActivePower attribute [attribute ID 1291]. - *

    - * Represents the single phase or Phase A, current demand of active power delivered or received at - * the premises, in Watts (W). Positive values indicate power delivered to the premises where negative - * values indicate power received from the premises. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getActivePowerAsync() { - return read(attributes.get(ATTR_ACTIVEPOWER)); - } - - /** - * Synchronously get the ActivePower attribute [attribute ID 1291]. - *

    - * Represents the single phase or Phase A, current demand of active power delivered or received at - * the premises, in Watts (W). Positive values indicate power delivered to the premises where negative - * values indicate power received from the premises. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getActivePower(final long refreshPeriod) { - if (attributes.get(ATTR_ACTIVEPOWER).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_ACTIVEPOWER).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_ACTIVEPOWER)); - } - - /** - * Get the ACVoltageMultiplier attribute [attribute ID 1536]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getAcVoltageMultiplierAsync() { - return read(attributes.get(ATTR_ACVOLTAGEMULTIPLIER)); - } - - /** - * Synchronously get the ACVoltageMultiplier attribute [attribute ID 1536]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getAcVoltageMultiplier(final long refreshPeriod) { - if (attributes.get(ATTR_ACVOLTAGEMULTIPLIER).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_ACVOLTAGEMULTIPLIER).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_ACVOLTAGEMULTIPLIER)); - } - - /** - * Get the ACVoltageDivisor attribute [attribute ID 1537]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getAcVoltageDivisorAsync() { - return read(attributes.get(ATTR_ACVOLTAGEDIVISOR)); - } - - /** - * Synchronously get the ACVoltageDivisor attribute [attribute ID 1537]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getAcVoltageDivisor(final long refreshPeriod) { - if (attributes.get(ATTR_ACVOLTAGEDIVISOR).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_ACVOLTAGEDIVISOR).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_ACVOLTAGEDIVISOR)); - } - - /** - * Get the ACCurrentMultiplier attribute [attribute ID 1538]. - *

    - * Provides a value to be multiplied against the InstantaneousCurrent and RMSCurrentattributes. - * his attribute must be used in conjunction with the ACCurrentDivisorattribute. 0x0000 is an invalid value for this attribute. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getAcCurrentMultiplierAsync() { - return read(attributes.get(ATTR_ACCURRENTMULTIPLIER)); - } - - /** - * Synchronously get the ACCurrentMultiplier attribute [attribute ID 1538]. - *

    - * Provides a value to be multiplied against the InstantaneousCurrent and RMSCurrentattributes. - * his attribute must be used in conjunction with the ACCurrentDivisorattribute. 0x0000 is an invalid value for this attribute. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getAcCurrentMultiplier(final long refreshPeriod) { - if (attributes.get(ATTR_ACCURRENTMULTIPLIER).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_ACCURRENTMULTIPLIER).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_ACCURRENTMULTIPLIER)); - } - - /** - * Get the ACCurrentDivisor attribute [attribute ID 1539]. - *

    - * Provides a value to be divided against the ACCurrent, InstantaneousCurrent and - * RMSCurrentattributes. This attribute must be used in conjunction with the ACCurrentMultiplierattribute - * 0x0000 is an invalid value for this attribute. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getAcCurrentDivisorAsync() { - return read(attributes.get(ATTR_ACCURRENTDIVISOR)); - } - - /** - * Synchronously get the ACCurrentDivisor attribute [attribute ID 1539]. - *

    - * Provides a value to be divided against the ACCurrent, InstantaneousCurrent and - * RMSCurrentattributes. This attribute must be used in conjunction with the ACCurrentMultiplierattribute - * 0x0000 is an invalid value for this attribute. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getAcCurrentDivisor(final long refreshPeriod) { - if (attributes.get(ATTR_ACCURRENTDIVISOR).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_ACCURRENTDIVISOR).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_ACCURRENTDIVISOR)); - } - - /** - * Get the ACPowerMultiplier attribute [attribute ID 1540]. - *

    - * Provides a value to be multiplied against the InstantaneousPower and ActivePowerattributes. - * This attribute must be used in conjunction with the ACPowerDivisorattribute. 0x0000 is an invalid - * value for this attribute - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getAcPowerMultiplierAsync() { - return read(attributes.get(ATTR_ACPOWERMULTIPLIER)); - } - - /** - * Synchronously get the ACPowerMultiplier attribute [attribute ID 1540]. - *

    - * Provides a value to be multiplied against the InstantaneousPower and ActivePowerattributes. - * This attribute must be used in conjunction with the ACPowerDivisorattribute. 0x0000 is an invalid - * value for this attribute - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getAcPowerMultiplier(final long refreshPeriod) { - if (attributes.get(ATTR_ACPOWERMULTIPLIER).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_ACPOWERMULTIPLIER).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_ACPOWERMULTIPLIER)); - } - - /** - * Get the ACPowerDivisor attribute [attribute ID 1541]. - *

    - * Provides a value to be divided against the InstantaneousPower and ActivePowerattributes. - * This attribute must be used in conjunction with the ACPowerMultiplierattribute. 0x0000 is an - * invalid value for this attribute. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getAcPowerDivisorAsync() { - return read(attributes.get(ATTR_ACPOWERDIVISOR)); - } - - /** - * Synchronously get the ACPowerDivisor attribute [attribute ID 1541]. - *

    - * Provides a value to be divided against the InstantaneousPower and ActivePowerattributes. - * This attribute must be used in conjunction with the ACPowerMultiplierattribute. 0x0000 is an - * invalid value for this attribute. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getAcPowerDivisor(final long refreshPeriod) { - if (attributes.get(ATTR_ACPOWERDIVISOR).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_ACPOWERDIVISOR).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_ACPOWERDIVISOR)); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclFanControlCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclFanControlCluster.java deleted file mode 100644 index 5f7010e15..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclFanControlCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Fan Control cluster implementation (Cluster ID 0x0202). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclFanControlCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0202; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Fan Control"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Fan Control cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclFanControlCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclFlowMeasurementCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclFlowMeasurementCluster.java deleted file mode 100644 index bf8e0aeb3..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclFlowMeasurementCluster.java +++ /dev/null @@ -1,361 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.CommandResult; -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import com.zsmartsystems.zigbee.zcl.protocol.ZclClusterType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Future; -import javax.annotation.Generated; - -/** - * Flow measurement cluster implementation (Cluster ID 0x0404). - *

    - * The server cluster provides an interface to flow measurement functionality, - * including configuration and provision of notifications of flow measurements. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclFlowMeasurementCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0404; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Flow measurement"; - - // Attribute constants - /** - * MeasuredValue represents the flow in m3/h as follows:- - *

    - * MeasuredValue = 10 x Flow - *

    - * Where 0 m3/h <= Flow <= 6,553.4 m3 - *

    - * /h, corresponding to a MeasuredValue in the - * range 0 to 0xfffe. - *

    - * The maximum resolution this format allows is 0.1 m3/h. - *

    - * A MeasuredValue of 0xffff indicates that the pressure measurement is invalid. - *

    - * MeasuredValue is updated continuously as new measurements are made. - */ - public static final int ATTR_MEASUREDVALUE = 0x0000; - /** - * The MinMeasuredValue attribute indicates the minimum value of MeasuredValue - * that can be measured. A value of 0xffff means this attribute is not defined - */ - public static final int ATTR_MINMEASUREDVALUE = 0x0001; - /** - * The MaxMeasuredValue attribute indicates the maximum value of MeasuredValue - * that can be measured. A value of 0xffff means this attribute is not defined. - *

    - * MaxMeasuredValue shall be greater than MinMeasuredValue. - *

    - * MinMeasuredValue and MaxMeasuredValue define the range of the sensor - */ - public static final int ATTR_MAXMEASUREDVALUE = 0x0002; - /** - * The Tolerance attribute indicates the magnitude of the possible error that is - * associated with MeasuredValue . The true value is located in the range - * (MeasuredValue – Tolerance) to (MeasuredValue + Tolerance). - */ - public static final int ATTR_TOLERANCE = 0x0003; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(4); - - attributeMap.put(ATTR_MEASUREDVALUE, new ZclAttribute(ZclClusterType.FLOW_MEASUREMENT, ATTR_MEASUREDVALUE, "MeasuredValue", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, true)); - attributeMap.put(ATTR_MINMEASUREDVALUE, new ZclAttribute(ZclClusterType.FLOW_MEASUREMENT, ATTR_MINMEASUREDVALUE, "MinMeasuredValue", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_MAXMEASUREDVALUE, new ZclAttribute(ZclClusterType.FLOW_MEASUREMENT, ATTR_MAXMEASUREDVALUE, "MaxMeasuredValue", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_TOLERANCE, new ZclAttribute(ZclClusterType.FLOW_MEASUREMENT, ATTR_TOLERANCE, "Tolerance", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, true)); - - return attributeMap; - } - - /** - * Default constructor to create a Flow measurement cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclFlowMeasurementCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } - - /** - * Get the MeasuredValue attribute [attribute ID 0]. - *

    - * MeasuredValue represents the flow in m3/h as follows:- - *

    - * MeasuredValue = 10 x Flow - *

    - * Where 0 m3/h <= Flow <= 6,553.4 m3 - *

    - * /h, corresponding to a MeasuredValue in the - * range 0 to 0xfffe. - *

    - * The maximum resolution this format allows is 0.1 m3/h. - *

    - * A MeasuredValue of 0xffff indicates that the pressure measurement is invalid. - *

    - * MeasuredValue is updated continuously as new measurements are made. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getMeasuredValueAsync() { - return read(attributes.get(ATTR_MEASUREDVALUE)); - } - - /** - * Synchronously get the MeasuredValue attribute [attribute ID 0]. - *

    - * MeasuredValue represents the flow in m3/h as follows:- - *

    - * MeasuredValue = 10 x Flow - *

    - * Where 0 m3/h <= Flow <= 6,553.4 m3 - *

    - * /h, corresponding to a MeasuredValue in the - * range 0 to 0xfffe. - *

    - * The maximum resolution this format allows is 0.1 m3/h. - *

    - * A MeasuredValue of 0xffff indicates that the pressure measurement is invalid. - *

    - * MeasuredValue is updated continuously as new measurements are made. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMeasuredValue(final long refreshPeriod) { - if (attributes.get(ATTR_MEASUREDVALUE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MEASUREDVALUE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MEASUREDVALUE)); - } - - /** - * Set reporting for the MeasuredValue attribute [attribute ID 0]. - *

    - * MeasuredValue represents the flow in m3/h as follows:- - *

    - * MeasuredValue = 10 x Flow - *

    - * Where 0 m3/h <= Flow <= 6,553.4 m3 - *

    - * /h, corresponding to a MeasuredValue in the - * range 0 to 0xfffe. - *

    - * The maximum resolution this format allows is 0.1 m3/h. - *

    - * A MeasuredValue of 0xffff indicates that the pressure measurement is invalid. - *

    - * MeasuredValue is updated continuously as new measurements are made. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param minInterval {@link int} minimum reporting period - * @param maxInterval {@link int} maximum reporting period - * @param reportableChange {@link Object} delta required to trigger report - * @return the {@link Future} command result future - */ - public Future setMeasuredValueReporting(final int minInterval, final int maxInterval, final Object reportableChange) { - return setReporting(attributes.get(ATTR_MEASUREDVALUE), minInterval, maxInterval, reportableChange); - } - - /** - * Get the MinMeasuredValue attribute [attribute ID 1]. - *

    - * The MinMeasuredValue attribute indicates the minimum value of MeasuredValue - * that can be measured. A value of 0xffff means this attribute is not defined - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getMinMeasuredValueAsync() { - return read(attributes.get(ATTR_MINMEASUREDVALUE)); - } - - /** - * Synchronously get the MinMeasuredValue attribute [attribute ID 1]. - *

    - * The MinMeasuredValue attribute indicates the minimum value of MeasuredValue - * that can be measured. A value of 0xffff means this attribute is not defined - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMinMeasuredValue(final long refreshPeriod) { - if (attributes.get(ATTR_MINMEASUREDVALUE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MINMEASUREDVALUE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MINMEASUREDVALUE)); - } - - /** - * Get the MaxMeasuredValue attribute [attribute ID 2]. - *

    - * The MaxMeasuredValue attribute indicates the maximum value of MeasuredValue - * that can be measured. A value of 0xffff means this attribute is not defined. - *

    - * MaxMeasuredValue shall be greater than MinMeasuredValue. - *

    - * MinMeasuredValue and MaxMeasuredValue define the range of the sensor - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getMaxMeasuredValueAsync() { - return read(attributes.get(ATTR_MAXMEASUREDVALUE)); - } - - /** - * Synchronously get the MaxMeasuredValue attribute [attribute ID 2]. - *

    - * The MaxMeasuredValue attribute indicates the maximum value of MeasuredValue - * that can be measured. A value of 0xffff means this attribute is not defined. - *

    - * MaxMeasuredValue shall be greater than MinMeasuredValue. - *

    - * MinMeasuredValue and MaxMeasuredValue define the range of the sensor - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMaxMeasuredValue(final long refreshPeriod) { - if (attributes.get(ATTR_MAXMEASUREDVALUE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MAXMEASUREDVALUE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MAXMEASUREDVALUE)); - } - - /** - * Get the Tolerance attribute [attribute ID 3]. - *

    - * The Tolerance attribute indicates the magnitude of the possible error that is - * associated with MeasuredValue . The true value is located in the range - * (MeasuredValue – Tolerance) to (MeasuredValue + Tolerance). - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getToleranceAsync() { - return read(attributes.get(ATTR_TOLERANCE)); - } - - /** - * Synchronously get the Tolerance attribute [attribute ID 3]. - *

    - * The Tolerance attribute indicates the magnitude of the possible error that is - * associated with MeasuredValue . The true value is located in the range - * (MeasuredValue – Tolerance) to (MeasuredValue + Tolerance). - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getTolerance(final long refreshPeriod) { - if (attributes.get(ATTR_TOLERANCE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_TOLERANCE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_TOLERANCE)); - } - - /** - * Set reporting for the Tolerance attribute [attribute ID 3]. - *

    - * The Tolerance attribute indicates the magnitude of the possible error that is - * associated with MeasuredValue . The true value is located in the range - * (MeasuredValue – Tolerance) to (MeasuredValue + Tolerance). - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param minInterval {@link int} minimum reporting period - * @param maxInterval {@link int} maximum reporting period - * @param reportableChange {@link Object} delta required to trigger report - * @return the {@link Future} command result future - */ - public Future setToleranceReporting(final int minInterval, final int maxInterval, final Object reportableChange) { - return setReporting(attributes.get(ATTR_TOLERANCE), minInterval, maxInterval, reportableChange); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclGeneralCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclGeneralCluster.java deleted file mode 100644 index 5990b30fb..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclGeneralCluster.java +++ /dev/null @@ -1,609 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.CommandResult; -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclStatus; -import com.zsmartsystems.zigbee.zcl.clusters.general.ConfigureReportingCommand; -import com.zsmartsystems.zigbee.zcl.clusters.general.ConfigureReportingResponse; -import com.zsmartsystems.zigbee.zcl.clusters.general.DefaultResponse; -import com.zsmartsystems.zigbee.zcl.clusters.general.DiscoverAttributesCommand; -import com.zsmartsystems.zigbee.zcl.clusters.general.DiscoverAttributesExtended; -import com.zsmartsystems.zigbee.zcl.clusters.general.DiscoverAttributesExtendedResponse; -import com.zsmartsystems.zigbee.zcl.clusters.general.DiscoverAttributesResponse; -import com.zsmartsystems.zigbee.zcl.clusters.general.DiscoverCommandsGenerated; -import com.zsmartsystems.zigbee.zcl.clusters.general.DiscoverCommandsGeneratedResponse; -import com.zsmartsystems.zigbee.zcl.clusters.general.DiscoverCommandsReceived; -import com.zsmartsystems.zigbee.zcl.clusters.general.DiscoverCommandsReceivedResponse; -import com.zsmartsystems.zigbee.zcl.clusters.general.ReadAttributesCommand; -import com.zsmartsystems.zigbee.zcl.clusters.general.ReadAttributesResponse; -import com.zsmartsystems.zigbee.zcl.clusters.general.ReadAttributesStructuredCommand; -import com.zsmartsystems.zigbee.zcl.clusters.general.ReadReportingConfigurationCommand; -import com.zsmartsystems.zigbee.zcl.clusters.general.ReadReportingConfigurationResponse; -import com.zsmartsystems.zigbee.zcl.clusters.general.ReportAttributesCommand; -import com.zsmartsystems.zigbee.zcl.clusters.general.WriteAttributesCommand; -import com.zsmartsystems.zigbee.zcl.clusters.general.WriteAttributesNoResponse; -import com.zsmartsystems.zigbee.zcl.clusters.general.WriteAttributesResponse; -import com.zsmartsystems.zigbee.zcl.clusters.general.WriteAttributesStructuredCommand; -import com.zsmartsystems.zigbee.zcl.clusters.general.WriteAttributesStructuredResponse; -import com.zsmartsystems.zigbee.zcl.clusters.general.WriteAttributesUndividedCommand; -import com.zsmartsystems.zigbee.zcl.field.AttributeInformation; -import com.zsmartsystems.zigbee.zcl.field.AttributeRecord; -import com.zsmartsystems.zigbee.zcl.field.AttributeReport; -import com.zsmartsystems.zigbee.zcl.field.AttributeReportingConfigurationRecord; -import com.zsmartsystems.zigbee.zcl.field.AttributeStatusRecord; -import com.zsmartsystems.zigbee.zcl.field.ExtendedAttributeInformation; -import com.zsmartsystems.zigbee.zcl.field.ReadAttributeStatusRecord; -import com.zsmartsystems.zigbee.zcl.field.WriteAttributeRecord; -import com.zsmartsystems.zigbee.zcl.field.WriteAttributeStatusRecord; -import java.util.List; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Future; -import javax.annotation.Generated; - -/** - * General cluster implementation (Cluster ID 0xFFFF). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclGeneralCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0xFFFF; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "General"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a General cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclGeneralCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } - - /** - * The Read Attributes Command - *

    - * The read attributes command is generated when a device wishes to determine the - * values of one or more attributes located on another device. Each attribute - * identifier field shall contain the identifier of the attribute to be read. - * - * @param identifiers {@link List} Identifiers - * @return the {@link Future} command result future - */ - public Future readAttributesCommand(List identifiers) { - ReadAttributesCommand command = new ReadAttributesCommand(); - - // Set the fields - command.setIdentifiers(identifiers); - - return send(command); - } - - /** - * The Read Attributes Response - *

    - * The read attributes response command is generated in response to a read attributes - * or read attributes structured command. The command frame shall contain a read - * attribute status record for each attribute identifier specified in the original read - * attributes or read attributes structured command. For each read attribute status - * record, the attribute identifier field shall contain the identifier specified in the - * original read attributes or read attributes structured command. - * - * @param records {@link List} Records - * @return the {@link Future} command result future - */ - public Future readAttributesResponse(List records) { - ReadAttributesResponse command = new ReadAttributesResponse(); - - // Set the fields - command.setRecords(records); - - return send(command); - } - - /** - * The Write Attributes Command - *

    - * The write attributes command is generated when a device wishes to change the - * values of one or more attributes located on another device. Each write attribute - * record shall contain the identifier and the actual value of the attribute to be - * written. - * - * @param records {@link List} Records - * @return the {@link Future} command result future - */ - public Future writeAttributesCommand(List records) { - WriteAttributesCommand command = new WriteAttributesCommand(); - - // Set the fields - command.setRecords(records); - - return send(command); - } - - /** - * The Write Attributes Undivided Command - *

    - * The write attributes undivided command is generated when a device wishes to - * change the values of one or more attributes located on another device, in such a - * way that if any attribute cannot be written (e.g. if an attribute is not implemented - * on the device, or a value to be written is outside its valid range), no attribute - * values are changed. - *
    - * In all other respects, including generation of a write attributes response command, - * the format and operation of the command is the same as that of the write attributes - * command, except that the command identifier field shall be set to indicate the - * write attributes undivided command. - * - * @param records {@link List} Records - * @return the {@link Future} command result future - */ - public Future writeAttributesUndividedCommand(List records) { - WriteAttributesUndividedCommand command = new WriteAttributesUndividedCommand(); - - // Set the fields - command.setRecords(records); - - return send(command); - } - - /** - * The Write Attributes Response - *

    - * The write attributes response command is generated in response to a write - * attributes command. - * - * @param records {@link List} Records - * @return the {@link Future} command result future - */ - public Future writeAttributesResponse(List records) { - WriteAttributesResponse command = new WriteAttributesResponse(); - - // Set the fields - command.setRecords(records); - - return send(command); - } - - /** - * The Write Attributes No Response - *

    - * The write attributes no response command is generated when a device wishes to - * change the value of one or more attributes located on another device but does not - * require a response. Each write attribute record shall contain the identifier and the - * actual value of the attribute to be written. - * - * @param records {@link List} Records - * @return the {@link Future} command result future - */ - public Future writeAttributesNoResponse(List records) { - WriteAttributesNoResponse command = new WriteAttributesNoResponse(); - - // Set the fields - command.setRecords(records); - - return send(command); - } - - /** - * The Configure Reporting Command - *

    - * The Configure Reporting command is used to configure the reporting mechanism - * for one or more of the attributes of a cluster. - *
    - * The individual cluster definitions specify which attributes shall be available to this - * reporting mechanism, however specific implementations of a cluster may make - * additional attributes available. - * - * @param records {@link List} Records - * @return the {@link Future} command result future - */ - public Future configureReportingCommand(List records) { - ConfigureReportingCommand command = new ConfigureReportingCommand(); - - // Set the fields - command.setRecords(records); - - return send(command); - } - - /** - * The Configure Reporting Response - *

    - * The Configure Reporting Response command is generated in response to a - * Configure Reporting command. - * - * @param status {@link ZclStatus} Status - * @param records {@link List} Records - * @return the {@link Future} command result future - */ - public Future configureReportingResponse(ZclStatus status, List records) { - ConfigureReportingResponse command = new ConfigureReportingResponse(); - - // Set the fields - command.setStatus(status); - command.setRecords(records); - - return send(command); - } - - /** - * The Read Reporting Configuration Command - *

    - * The Read Reporting Configuration command is used to read the configuration - * details of the reporting mechanism for one or more of the attributes of a cluster. - * - * @param records {@link List} Records - * @return the {@link Future} command result future - */ - public Future readReportingConfigurationCommand(List records) { - ReadReportingConfigurationCommand command = new ReadReportingConfigurationCommand(); - - // Set the fields - command.setRecords(records); - - return send(command); - } - - /** - * The Read Reporting Configuration Response - *

    - * The Read Reporting Configuration Response command is used to respond to a - * Read Reporting Configuration command. - * - * @param records {@link List} Records - * @return the {@link Future} command result future - */ - public Future readReportingConfigurationResponse(List records) { - ReadReportingConfigurationResponse command = new ReadReportingConfigurationResponse(); - - // Set the fields - command.setRecords(records); - - return send(command); - } - - /** - * The Report Attributes Command - *

    - * The report attributes command is used by a device to report the values of one or - * more of its attributes to another device, bound a priori. Individual clusters, defined - * elsewhere in the ZCL, define which attributes are to be reported and at what - * interval. - * - * @param reports {@link List} Reports - * @return the {@link Future} command result future - */ - public Future reportAttributesCommand(List reports) { - ReportAttributesCommand command = new ReportAttributesCommand(); - - // Set the fields - command.setReports(reports); - - return send(command); - } - - /** - * The Default Response - *

    - * The default response command is generated when a device receives a unicast - * command, there is no other relevant response specified for the command, and - * either an error results or the Disable default response bit of its Frame control field - * is set to 0. - * - * @param commandIdentifier {@link Integer} Command identifier - * @param statusCode {@link ZclStatus} Status code - * @return the {@link Future} command result future - */ - public Future defaultResponse(Integer commandIdentifier, ZclStatus statusCode) { - DefaultResponse command = new DefaultResponse(); - - // Set the fields - command.setCommandIdentifier(commandIdentifier); - command.setStatusCode(statusCode); - - return send(command); - } - - /** - * The Discover Attributes Command - *

    - * The discover attributes command is generated when a remote device wishes to - * discover the identifiers and types of the attributes on a device which are supported - * within the cluster to which this command is directed. - * - * @param startAttributeIdentifier {@link Integer} Start attribute identifier - * @param maximumAttributeIdentifiers {@link Integer} Maximum attribute identifiers - * @return the {@link Future} command result future - */ - public Future discoverAttributesCommand(Integer startAttributeIdentifier, Integer maximumAttributeIdentifiers) { - DiscoverAttributesCommand command = new DiscoverAttributesCommand(); - - // Set the fields - command.setStartAttributeIdentifier(startAttributeIdentifier); - command.setMaximumAttributeIdentifiers(maximumAttributeIdentifiers); - - return send(command); - } - - /** - * The Discover Attributes Response - *

    - * The discover attributes response command is generated in response to a discover - * attributes command. - * - * @param discoveryComplete {@link Boolean} Discovery Complete - * @param attributeInformation {@link List} Attribute Information - * @return the {@link Future} command result future - */ - public Future discoverAttributesResponse(Boolean discoveryComplete, List attributeInformation) { - DiscoverAttributesResponse command = new DiscoverAttributesResponse(); - - // Set the fields - command.setDiscoveryComplete(discoveryComplete); - command.setAttributeInformation(attributeInformation); - - return send(command); - } - - /** - * The Read Attributes Structured Command - *

    - * The read attributes command is generated when a device wishes to determine the - * values of one or more attributes, or elements of attributes, located on another - * device. Each attribute identifier field shall contain the identifier of the attribute to - * be read. - * - * @param attributeSelectors {@link Object} Attribute selectors - * @return the {@link Future} command result future - */ - public Future readAttributesStructuredCommand(Object attributeSelectors) { - ReadAttributesStructuredCommand command = new ReadAttributesStructuredCommand(); - - // Set the fields - command.setAttributeSelectors(attributeSelectors); - - return send(command); - } - - /** - * The Write Attributes Structured Command - *

    - * The write attributes structured command is generated when a device wishes to - * change the values of one or more attributes located on another device. Each write - * attribute record shall contain the identifier and the actual value of the attribute, or - * element thereof, to be written. - * - * @param status {@link ZclStatus} Status - * @param attributeSelectors {@link Object} Attribute selectors - * @return the {@link Future} command result future - */ - public Future writeAttributesStructuredCommand(ZclStatus status, Object attributeSelectors) { - WriteAttributesStructuredCommand command = new WriteAttributesStructuredCommand(); - - // Set the fields - command.setStatus(status); - command.setAttributeSelectors(attributeSelectors); - - return send(command); - } - - /** - * The Write Attributes Structured Response - *

    - * The write attributes structured response command is generated in response to a - * write attributes structured command. - * - * @param status {@link ZclStatus} Status - * @param records {@link List} Records - * @return the {@link Future} command result future - */ - public Future writeAttributesStructuredResponse(ZclStatus status, List records) { - WriteAttributesStructuredResponse command = new WriteAttributesStructuredResponse(); - - // Set the fields - command.setStatus(status); - command.setRecords(records); - - return send(command); - } - - /** - * The Discover Commands Received - *

    - * The Discover Commands Received command is generated when a remote device wishes to discover the - * optional and mandatory commands the cluster to which this command is sent can process. - * - * @param startCommandIdentifier {@link Integer} Start command identifier - * @param maximumCommandIdentifiers {@link Integer} Maximum command identifiers - * @return the {@link Future} command result future - */ - public Future discoverCommandsReceived(Integer startCommandIdentifier, Integer maximumCommandIdentifiers) { - DiscoverCommandsReceived command = new DiscoverCommandsReceived(); - - // Set the fields - command.setStartCommandIdentifier(startCommandIdentifier); - command.setMaximumCommandIdentifiers(maximumCommandIdentifiers); - - return send(command); - } - - /** - * The Discover Commands Received Response - *

    - * The Discover Commands Received Response is generated in response to a Discover Commands Received - * command. - * - * @param discoveryComplete {@link Boolean} Discovery complete - * @param commandIdentifiers {@link List} Command identifiers - * @return the {@link Future} command result future - */ - public Future discoverCommandsReceivedResponse(Boolean discoveryComplete, List commandIdentifiers) { - DiscoverCommandsReceivedResponse command = new DiscoverCommandsReceivedResponse(); - - // Set the fields - command.setDiscoveryComplete(discoveryComplete); - command.setCommandIdentifiers(commandIdentifiers); - - return send(command); - } - - /** - * The Discover Commands Generated - *

    - * The Discover Commands Generated command is generated when a remote device wishes to discover the - * commands that a cluster may generate on the device to which this command is directed. - * - * @param startCommandIdentifier {@link Integer} Start command identifier - * @param maximumCommandIdentifiers {@link Integer} Maximum command identifiers - * @return the {@link Future} command result future - */ - public Future discoverCommandsGenerated(Integer startCommandIdentifier, Integer maximumCommandIdentifiers) { - DiscoverCommandsGenerated command = new DiscoverCommandsGenerated(); - - // Set the fields - command.setStartCommandIdentifier(startCommandIdentifier); - command.setMaximumCommandIdentifiers(maximumCommandIdentifiers); - - return send(command); - } - - /** - * The Discover Commands Generated Response - *

    - * The Discover Commands Generated Response is generated in response to a Discover Commands Generated - * command. - * - * @param discoveryComplete {@link Boolean} Discovery complete - * @param commandIdentifiers {@link List} Command identifiers - * @return the {@link Future} command result future - */ - public Future discoverCommandsGeneratedResponse(Boolean discoveryComplete, List commandIdentifiers) { - DiscoverCommandsGeneratedResponse command = new DiscoverCommandsGeneratedResponse(); - - // Set the fields - command.setDiscoveryComplete(discoveryComplete); - command.setCommandIdentifiers(commandIdentifiers); - - return send(command); - } - - /** - * The Discover Attributes Extended - *

    - * The Discover Attributes Extended command is generated when a remote device wishes to discover the - * identifiers and types of the attributes on a device which are supported within the cluster to which this - * command is directed, including whether the attribute is readable, writeable or reportable. - * - * @param startAttributeIdentifier {@link Integer} Start attribute identifier - * @param maximumAttributeIdentifiers {@link Integer} Maximum attribute identifiers - * @return the {@link Future} command result future - */ - public Future discoverAttributesExtended(Integer startAttributeIdentifier, Integer maximumAttributeIdentifiers) { - DiscoverAttributesExtended command = new DiscoverAttributesExtended(); - - // Set the fields - command.setStartAttributeIdentifier(startAttributeIdentifier); - command.setMaximumAttributeIdentifiers(maximumAttributeIdentifiers); - - return send(command); - } - - /** - * The Discover Attributes Extended Response - *

    - * The Discover Attributes Extended Response command is generated in response to a Discover Attributes - * Extended command. - * - * @param discoveryComplete {@link Boolean} Discovery complete - * @param attributeInformation {@link List} Attribute Information - * @return the {@link Future} command result future - */ - public Future discoverAttributesExtendedResponse(Boolean discoveryComplete, List attributeInformation) { - DiscoverAttributesExtendedResponse command = new DiscoverAttributesExtendedResponse(); - - // Set the fields - command.setDiscoveryComplete(discoveryComplete); - command.setAttributeInformation(attributeInformation); - - return send(command); - } - - @Override - public ZclCommand getCommandFromId(int commandId) { - switch (commandId) { - case 0: // READ_ATTRIBUTES_COMMAND - return new ReadAttributesCommand(); - case 1: // READ_ATTRIBUTES_RESPONSE - return new ReadAttributesResponse(); - case 2: // WRITE_ATTRIBUTES_COMMAND - return new WriteAttributesCommand(); - case 3: // WRITE_ATTRIBUTES_UNDIVIDED_COMMAND - return new WriteAttributesUndividedCommand(); - case 4: // WRITE_ATTRIBUTES_RESPONSE - return new WriteAttributesResponse(); - case 5: // WRITE_ATTRIBUTES_NO_RESPONSE - return new WriteAttributesNoResponse(); - case 6: // CONFIGURE_REPORTING_COMMAND - return new ConfigureReportingCommand(); - case 7: // CONFIGURE_REPORTING_RESPONSE - return new ConfigureReportingResponse(); - case 8: // READ_REPORTING_CONFIGURATION_COMMAND - return new ReadReportingConfigurationCommand(); - case 9: // READ_REPORTING_CONFIGURATION_RESPONSE - return new ReadReportingConfigurationResponse(); - case 10: // REPORT_ATTRIBUTES_COMMAND - return new ReportAttributesCommand(); - case 11: // DEFAULT_RESPONSE - return new DefaultResponse(); - case 12: // DISCOVER_ATTRIBUTES_COMMAND - return new DiscoverAttributesCommand(); - case 13: // DISCOVER_ATTRIBUTES_RESPONSE - return new DiscoverAttributesResponse(); - case 14: // READ_ATTRIBUTES_STRUCTURED_COMMAND - return new ReadAttributesStructuredCommand(); - case 15: // WRITE_ATTRIBUTES_STRUCTURED_COMMAND - return new WriteAttributesStructuredCommand(); - case 16: // WRITE_ATTRIBUTES_STRUCTURED_RESPONSE - return new WriteAttributesStructuredResponse(); - case 17: // DISCOVER_COMMANDS_RECEIVED - return new DiscoverCommandsReceived(); - case 18: // DISCOVER_COMMANDS_RECEIVED_RESPONSE - return new DiscoverCommandsReceivedResponse(); - case 19: // DISCOVER_COMMANDS_GENERATED - return new DiscoverCommandsGenerated(); - case 20: // DISCOVER_COMMANDS_GENERATED_RESPONSE - return new DiscoverCommandsGeneratedResponse(); - case 21: // DISCOVER_ATTRIBUTES_EXTENDED - return new DiscoverAttributesExtended(); - case 22: // DISCOVER_ATTRIBUTES_EXTENDED_RESPONSE - return new DiscoverAttributesExtendedResponse(); - default: - return null; - } - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclGenericTunnelCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclGenericTunnelCluster.java deleted file mode 100644 index 100194b9b..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclGenericTunnelCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Generic Tunnel cluster implementation (Cluster ID 0x0600). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclGenericTunnelCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0600; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Generic Tunnel"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Generic Tunnel cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclGenericTunnelCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclGroupsCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclGroupsCluster.java deleted file mode 100644 index 521f6690c..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclGroupsCluster.java +++ /dev/null @@ -1,281 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.CommandResult; -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.clusters.groups.AddGroupCommand; -import com.zsmartsystems.zigbee.zcl.clusters.groups.AddGroupIfIdentifyingCommand; -import com.zsmartsystems.zigbee.zcl.clusters.groups.AddGroupResponse; -import com.zsmartsystems.zigbee.zcl.clusters.groups.GetGroupMembershipCommand; -import com.zsmartsystems.zigbee.zcl.clusters.groups.GetGroupMembershipResponse; -import com.zsmartsystems.zigbee.zcl.clusters.groups.RemoveAllGroupsCommand; -import com.zsmartsystems.zigbee.zcl.clusters.groups.RemoveGroupCommand; -import com.zsmartsystems.zigbee.zcl.clusters.groups.RemoveGroupResponse; -import com.zsmartsystems.zigbee.zcl.clusters.groups.ViewGroupCommand; -import com.zsmartsystems.zigbee.zcl.clusters.groups.ViewGroupResponse; -import java.util.List; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Future; -import javax.annotation.Generated; - -/** - * Groups cluster implementation (Cluster ID 0x0004). - *

    - * The ZigBee specification provides the capability for group addressing. That is, - * any endpoint on any device may be assigned to one or more groups, each labeled - * with a 16-bit identifier (0x0001 – 0xfff7), which acts for all intents and purposes - * like a network address. Once a group is established, frames, sent using the - * APSDE-DATA.request primitive and having a DstAddrMode of 0x01, denoting - * group addressing, will be delivered to every endpoint assigned to the group - * address named in the DstAddr parameter of the outgoing APSDE-DATA.request - * primitive on every device in the network for which there are such endpoints. - *

    - * Management of group membership on each device and endpoint is implemented - * by the APS, but the over-the-air messages that allow for remote management and - * commissioning of groups are defined here in the cluster library on the theory that, - * while the basic group addressing facilities are integral to the operation of the - * stack, not every device will need or want to implement this management cluster. - * Furthermore, the placement of the management commands here allows developers - * of proprietary profiles to avoid implementing the library cluster but still exploit - * group addressing - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclGroupsCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0004; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Groups"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Groups cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclGroupsCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } - - /** - * The Add Group Command - * - * @param groupId {@link Integer} Group ID - * @param groupName {@link String} Group Name - * @return the {@link Future} command result future - */ - public Future addGroupCommand(Integer groupId, String groupName) { - AddGroupCommand command = new AddGroupCommand(); - - // Set the fields - command.setGroupId(groupId); - command.setGroupName(groupName); - - return send(command); - } - - /** - * The View Group Command - * - * @param groupId {@link Integer} Group ID - * @return the {@link Future} command result future - */ - public Future viewGroupCommand(Integer groupId) { - ViewGroupCommand command = new ViewGroupCommand(); - - // Set the fields - command.setGroupId(groupId); - - return send(command); - } - - /** - * The Get Group Membership Command - * - * @param groupCount {@link Integer} Group count - * @param groupList {@link List} Group list - * @return the {@link Future} command result future - */ - public Future getGroupMembershipCommand(Integer groupCount, List groupList) { - GetGroupMembershipCommand command = new GetGroupMembershipCommand(); - - // Set the fields - command.setGroupCount(groupCount); - command.setGroupList(groupList); - - return send(command); - } - - /** - * The Remove Group Command - * - * @param groupId {@link Integer} Group ID - * @return the {@link Future} command result future - */ - public Future removeGroupCommand(Integer groupId) { - RemoveGroupCommand command = new RemoveGroupCommand(); - - // Set the fields - command.setGroupId(groupId); - - return send(command); - } - - /** - * The Remove All Groups Command - * - * @return the {@link Future} command result future - */ - public Future removeAllGroupsCommand() { - RemoveAllGroupsCommand command = new RemoveAllGroupsCommand(); - - return send(command); - } - - /** - * The Add Group If Identifying Command - * - * @param groupId {@link Integer} Group ID - * @param groupName {@link String} Group Name - * @return the {@link Future} command result future - */ - public Future addGroupIfIdentifyingCommand(Integer groupId, String groupName) { - AddGroupIfIdentifyingCommand command = new AddGroupIfIdentifyingCommand(); - - // Set the fields - command.setGroupId(groupId); - command.setGroupName(groupName); - - return send(command); - } - - /** - * The Add Group Response - * - * @param status {@link Integer} Status - * @param groupId {@link Integer} Group ID - * @return the {@link Future} command result future - */ - public Future addGroupResponse(Integer status, Integer groupId) { - AddGroupResponse command = new AddGroupResponse(); - - // Set the fields - command.setStatus(status); - command.setGroupId(groupId); - - return send(command); - } - - /** - * The View Group Response - * - * @param status {@link Integer} Status - * @param groupId {@link Integer} Group ID - * @param groupName {@link String} Group Name - * @return the {@link Future} command result future - */ - public Future viewGroupResponse(Integer status, Integer groupId, String groupName) { - ViewGroupResponse command = new ViewGroupResponse(); - - // Set the fields - command.setStatus(status); - command.setGroupId(groupId); - command.setGroupName(groupName); - - return send(command); - } - - /** - * The Get Group Membership Response - * - * @param capacity {@link Integer} Capacity - * @param groupCount {@link Integer} Group count - * @param groupList {@link List} Group list - * @return the {@link Future} command result future - */ - public Future getGroupMembershipResponse(Integer capacity, Integer groupCount, List groupList) { - GetGroupMembershipResponse command = new GetGroupMembershipResponse(); - - // Set the fields - command.setCapacity(capacity); - command.setGroupCount(groupCount); - command.setGroupList(groupList); - - return send(command); - } - - /** - * The Remove Group Response - * - * @param status {@link Integer} Status - * @param groupId {@link Integer} Group ID - * @return the {@link Future} command result future - */ - public Future removeGroupResponse(Integer status, Integer groupId) { - RemoveGroupResponse command = new RemoveGroupResponse(); - - // Set the fields - command.setStatus(status); - command.setGroupId(groupId); - - return send(command); - } - - @Override - public ZclCommand getCommandFromId(int commandId) { - switch (commandId) { - case 0: // ADD_GROUP_COMMAND - return new AddGroupCommand(); - case 1: // VIEW_GROUP_COMMAND - return new ViewGroupCommand(); - case 2: // GET_GROUP_MEMBERSHIP_COMMAND - return new GetGroupMembershipCommand(); - case 3: // REMOVE_GROUP_COMMAND - return new RemoveGroupCommand(); - case 4: // REMOVE_ALL_GROUPS_COMMAND - return new RemoveAllGroupsCommand(); - case 5: // ADD_GROUP_IF_IDENTIFYING_COMMAND - return new AddGroupIfIdentifyingCommand(); - default: - return null; - } - } - - @Override - public ZclCommand getResponseFromId(int commandId) { - switch (commandId) { - case 0: // ADD_GROUP_RESPONSE - return new AddGroupResponse(); - case 1: // VIEW_GROUP_RESPONSE - return new ViewGroupResponse(); - case 2: // GET_GROUP_MEMBERSHIP_RESPONSE - return new GetGroupMembershipResponse(); - case 3: // REMOVE_GROUP_RESPONSE - return new RemoveGroupResponse(); - default: - return null; - } - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclIasAceCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclIasAceCluster.java deleted file mode 100644 index 57bd9fbbf..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclIasAceCluster.java +++ /dev/null @@ -1,530 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.CommandResult; -import com.zsmartsystems.zigbee.IeeeAddress; -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.clusters.iasace.ArmCommand; -import com.zsmartsystems.zigbee.zcl.clusters.iasace.ArmResponse; -import com.zsmartsystems.zigbee.zcl.clusters.iasace.BypassCommand; -import com.zsmartsystems.zigbee.zcl.clusters.iasace.BypassResponse; -import com.zsmartsystems.zigbee.zcl.clusters.iasace.EmergencyCommand; -import com.zsmartsystems.zigbee.zcl.clusters.iasace.FireCommand; -import com.zsmartsystems.zigbee.zcl.clusters.iasace.GetBypassedZoneListCommand; -import com.zsmartsystems.zigbee.zcl.clusters.iasace.GetPanelStatusCommand; -import com.zsmartsystems.zigbee.zcl.clusters.iasace.GetPanelStatusResponse; -import com.zsmartsystems.zigbee.zcl.clusters.iasace.GetZoneIdMapCommand; -import com.zsmartsystems.zigbee.zcl.clusters.iasace.GetZoneIdMapResponse; -import com.zsmartsystems.zigbee.zcl.clusters.iasace.GetZoneInformationCommand; -import com.zsmartsystems.zigbee.zcl.clusters.iasace.GetZoneInformationResponse; -import com.zsmartsystems.zigbee.zcl.clusters.iasace.GetZoneStatusCommand; -import com.zsmartsystems.zigbee.zcl.clusters.iasace.GetZoneStatusResponse; -import com.zsmartsystems.zigbee.zcl.clusters.iasace.PanelStatusChangedCommand; -import com.zsmartsystems.zigbee.zcl.clusters.iasace.PanicCommand; -import com.zsmartsystems.zigbee.zcl.clusters.iasace.SetBypassedZoneListCommand; -import com.zsmartsystems.zigbee.zcl.clusters.iasace.ZoneStatusChangedCommand; -import java.util.List; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Future; -import javax.annotation.Generated; - -/** - * IAS ACE cluster implementation (Cluster ID 0x0501). - *

    - * The IAS ACE cluster defines an interface to the functionality of any Ancillary - * Control Equipment of the IAS system. Using this cluster, a ZigBee enabled ACE - * device can access a IAS CIE device and manipulate the IAS system, on behalf of a - * level-2 user. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclIasAceCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0501; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "IAS ACE"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a IAS ACE cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclIasAceCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } - - /** - * The Arm Command - *

    - * On receipt of this command, the receiving device sets its arm mode according to the value of the Arm Mode field. It - * is not guaranteed that an Arm command will succeed. Based on the current state of - * the IAS CIE, and its related devices, the command can be rejected. The device SHALL generate an Arm Response command - * to indicate the resulting armed state - * - * @param armMode {@link Integer} Arm Mode - * @param armDisarmCode {@link String} Arm/Disarm Code - * @param zoneId {@link Integer} Zone ID - * @return the {@link Future} command result future - */ - public Future armCommand(Integer armMode, String armDisarmCode, Integer zoneId) { - ArmCommand command = new ArmCommand(); - - // Set the fields - command.setArmMode(armMode); - command.setArmDisarmCode(armDisarmCode); - command.setZoneId(zoneId); - - return send(command); - } - - /** - * The Bypass Command - *

    - * Provides IAS ACE clients with a method to send zone bypass requests to the IAS ACE server. - * Bypassed zones MAYbe faulted or in alarm but will not trigger the security system to go into alarm. - * For example, a user MAYwish to allow certain windows in his premises protected by an IAS Zone server to - * be left open while the user leaves the premises. The user could bypass the IAS Zone server protecting - * the window on his IAS ACE client (e.g., security keypad), and if the IAS ACE server indicates that zone is - * successfully by-passed, arm his security system while he is away. - * - * @param numberOfZones {@link Integer} Number of Zones - * @param zoneIDs {@link List} Zone IDs - * @param armDisarmCode {@link String} Arm/Disarm Code - * @return the {@link Future} command result future - */ - public Future bypassCommand(Integer numberOfZones, List zoneIDs, String armDisarmCode) { - BypassCommand command = new BypassCommand(); - - // Set the fields - command.setNumberOfZones(numberOfZones); - command.setZoneIDs(zoneIDs); - command.setArmDisarmCode(armDisarmCode); - - return send(command); - } - - /** - * The Emergency Command - * - * @return the {@link Future} command result future - */ - public Future emergencyCommand() { - EmergencyCommand command = new EmergencyCommand(); - - return send(command); - } - - /** - * The Fire Command - * - * @return the {@link Future} command result future - */ - public Future fireCommand() { - FireCommand command = new FireCommand(); - - return send(command); - } - - /** - * The Panic Command - * - * @return the {@link Future} command result future - */ - public Future panicCommand() { - PanicCommand command = new PanicCommand(); - - return send(command); - } - - /** - * The Get Zone ID Map Command - * - * @return the {@link Future} command result future - */ - public Future getZoneIdMapCommand() { - GetZoneIdMapCommand command = new GetZoneIdMapCommand(); - - return send(command); - } - - /** - * The Get Zone Information Command - * - * @param zoneId {@link Integer} Zone ID - * @return the {@link Future} command result future - */ - public Future getZoneInformationCommand(Integer zoneId) { - GetZoneInformationCommand command = new GetZoneInformationCommand(); - - // Set the fields - command.setZoneId(zoneId); - - return send(command); - } - - /** - * The Get Panel Status Command - *

    - * This command is used by ACE clients to request an update to the status (e.g., security - * system arm state) of the ACE server (i.e., the IAS CIE). In particular, this command is - * useful for battery-powered ACE clients with polling rates longer than the ZigBee standard - * check-in rate. - *
    - * On receipt of this command, the ACE server responds with the status of the security system. - * The IAS ACE server SHALL generate a Get Panel Status Response command. - * - * @return the {@link Future} command result future - */ - public Future getPanelStatusCommand() { - GetPanelStatusCommand command = new GetPanelStatusCommand(); - - return send(command); - } - - /** - * The Get Bypassed Zone List Command - *

    - * Provides IAS ACE clients with a way to retrieve the list of zones to be bypassed. This provides them with the ability - * to provide greater local functionality (i.e., at the IAS ACE client) for users to modify the Bypassed Zone List and reduce - * communications to the IAS ACE server when trying to arm the CIE security system. - * - * @return the {@link Future} command result future - */ - public Future getBypassedZoneListCommand() { - GetBypassedZoneListCommand command = new GetBypassedZoneListCommand(); - - return send(command); - } - - /** - * The Get Zone Status Command - *

    - * This command is used by ACE clients to request an update of the status of the IAS Zone devices managed by the ACE server - * (i.e., the IAS CIE). In particular, this command is useful for battery-powered ACE clients with polling rates longer than - * the ZigBee standard check-in rate. The command is similar to the Get Attributes Supported command in that it specifies a - * starting Zone ID and a number of Zone IDs for which information is requested. Depending on the number of IAS Zone devices - * managed by the IAS ACE server, sending the Zone Status of all zones MAY not fit into a single Get ZoneStatus Response command. - * IAS ACE clients MAY need to send multiple Get Zone Status commands in order to get the information they seek. - * - * @param startingZoneId {@link Integer} Starting Zone ID - * @param maxZoneIDs {@link Integer} Max Zone IDs - * @param zoneStatusMaskFlag {@link Boolean} Zone Status Mask Flag - * @param zoneStatusMask {@link Integer} Zone Status Mask - * @return the {@link Future} command result future - */ - public Future getZoneStatusCommand(Integer startingZoneId, Integer maxZoneIDs, Boolean zoneStatusMaskFlag, Integer zoneStatusMask) { - GetZoneStatusCommand command = new GetZoneStatusCommand(); - - // Set the fields - command.setStartingZoneId(startingZoneId); - command.setMaxZoneIDs(maxZoneIDs); - command.setZoneStatusMaskFlag(zoneStatusMaskFlag); - command.setZoneStatusMask(zoneStatusMask); - - return send(command); - } - - /** - * The Arm Response - * - * @param armNotification {@link Integer} Arm Notification - * @return the {@link Future} command result future - */ - public Future armResponse(Integer armNotification) { - ArmResponse command = new ArmResponse(); - - // Set the fields - command.setArmNotification(armNotification); - - return send(command); - } - - /** - * The Get Zone ID Map Response - *

    - * The 16 fields of the payload indicate whether each of the Zone IDs from 0 to 0xff is allocated or not. If bit n - * of Zone ID Map section N is set to 1, then Zone ID (16 x N + n ) is allocated, else it is not allocated - * - * @param zoneIdMapSection0 {@link Integer} Zone ID Map section 0 - * @param zoneIdMapSection1 {@link Integer} Zone ID Map section 1 - * @param zoneIdMapSection2 {@link Integer} Zone ID Map section 2 - * @param zoneIdMapSection3 {@link Integer} Zone ID Map section 3 - * @param zoneIdMapSection4 {@link Integer} Zone ID Map section 4 - * @param zoneIdMapSection5 {@link Integer} Zone ID Map section 5 - * @param zoneIdMapSection6 {@link Integer} Zone ID Map section 6 - * @param zoneIdMapSection7 {@link Integer} Zone ID Map section 7 - * @param zoneIdMapSection8 {@link Integer} Zone ID Map section 8 - * @param zoneIdMapSection9 {@link Integer} Zone ID Map section 9 - * @param zoneIdMapSection10 {@link Integer} Zone ID Map section 10 - * @param zoneIdMapSection11 {@link Integer} Zone ID Map section 11 - * @param zoneIdMapSection12 {@link Integer} Zone ID Map section 12 - * @param zoneIdMapSection13 {@link Integer} Zone ID Map section 13 - * @param zoneIdMapSection14 {@link Integer} Zone ID Map section 14 - * @param zoneIdMapSection15 {@link Integer} Zone ID Map section 15 - * @return the {@link Future} command result future - */ - public Future getZoneIdMapResponse(Integer zoneIdMapSection0, Integer zoneIdMapSection1, Integer zoneIdMapSection2, Integer zoneIdMapSection3, Integer zoneIdMapSection4, Integer zoneIdMapSection5, Integer zoneIdMapSection6, Integer zoneIdMapSection7, Integer zoneIdMapSection8, Integer zoneIdMapSection9, Integer zoneIdMapSection10, Integer zoneIdMapSection11, Integer zoneIdMapSection12, Integer zoneIdMapSection13, Integer zoneIdMapSection14, Integer zoneIdMapSection15) { - GetZoneIdMapResponse command = new GetZoneIdMapResponse(); - - // Set the fields - command.setZoneIdMapSection0(zoneIdMapSection0); - command.setZoneIdMapSection1(zoneIdMapSection1); - command.setZoneIdMapSection2(zoneIdMapSection2); - command.setZoneIdMapSection3(zoneIdMapSection3); - command.setZoneIdMapSection4(zoneIdMapSection4); - command.setZoneIdMapSection5(zoneIdMapSection5); - command.setZoneIdMapSection6(zoneIdMapSection6); - command.setZoneIdMapSection7(zoneIdMapSection7); - command.setZoneIdMapSection8(zoneIdMapSection8); - command.setZoneIdMapSection9(zoneIdMapSection9); - command.setZoneIdMapSection10(zoneIdMapSection10); - command.setZoneIdMapSection11(zoneIdMapSection11); - command.setZoneIdMapSection12(zoneIdMapSection12); - command.setZoneIdMapSection13(zoneIdMapSection13); - command.setZoneIdMapSection14(zoneIdMapSection14); - command.setZoneIdMapSection15(zoneIdMapSection15); - - return send(command); - } - - /** - * The Get Zone Information Response - * - * @param zoneId {@link Integer} Zone ID - * @param zoneType {@link Integer} Zone Type - * @param ieeeAddress {@link IeeeAddress} IEEE address - * @param zoneLabel {@link String} Zone Label - * @return the {@link Future} command result future - */ - public Future getZoneInformationResponse(Integer zoneId, Integer zoneType, IeeeAddress ieeeAddress, String zoneLabel) { - GetZoneInformationResponse command = new GetZoneInformationResponse(); - - // Set the fields - command.setZoneId(zoneId); - command.setZoneType(zoneType); - command.setIeeeAddress(ieeeAddress); - command.setZoneLabel(zoneLabel); - - return send(command); - } - - /** - * The Zone Status Changed Command - *

    - * This command updates ACE clients in the system of changes to zone status recorded by the ACE server (e.g., IAS CIE device). - * An IAS ACE server SHOULD send a Zone Status Changed command upon a change to an IAS Zone device’s ZoneStatus that it manages (i.e., - * IAS ACE server SHOULD send a Zone Status Changed command upon receipt of a Zone Status Change Notification command). - * - * @param zoneId {@link Integer} Zone ID - * @param zoneStatus {@link Integer} Zone Status - * @param audibleNotification {@link Integer} Audible Notification - * @param zoneLabel {@link String} Zone Label - * @return the {@link Future} command result future - */ - public Future zoneStatusChangedCommand(Integer zoneId, Integer zoneStatus, Integer audibleNotification, String zoneLabel) { - ZoneStatusChangedCommand command = new ZoneStatusChangedCommand(); - - // Set the fields - command.setZoneId(zoneId); - command.setZoneStatus(zoneStatus); - command.setAudibleNotification(audibleNotification); - command.setZoneLabel(zoneLabel); - - return send(command); - } - - /** - * The Panel Status Changed Command - *

    - * This command updates ACE clients in the system of changes to panel status recorded by the ACE server (e.g., IAS CIE - * device).Sending the Panel Status Changed command (vs.the Get Panel Status and Get Panel Status Response method) is - * generally useful only when there are IAS ACE clients that data poll within the retry timeout of the network (e.g., less than - * 7.68 seconds). - *
    - * An IAS ACE server SHALL send a Panel Status Changed command upon a change to the IAS CIE’s panel status (e.g., - * Disarmed to Arming Away/Stay/Night, Arming Away/Stay/Night to Armed, Armed to Disarmed) as defined in the Panel Status field. - *
    - * When Panel Status is Arming Away/Stay/Night, an IAS ACE server SHOULD send Panel Status Changed commands every second in order to - * update the Seconds Remaining. In some markets (e.g., North America), the final 10 seconds of the Arming Away/Stay/Night sequence - * requires a separate audible notification (e.g., a double tone). - * - * @param panelStatus {@link Integer} Panel Status - * @param secondsRemaining {@link Integer} Seconds Remaining - * @param audibleNotification {@link Integer} Audible Notification - * @param alarmStatus {@link Integer} Alarm Status - * @return the {@link Future} command result future - */ - public Future panelStatusChangedCommand(Integer panelStatus, Integer secondsRemaining, Integer audibleNotification, Integer alarmStatus) { - PanelStatusChangedCommand command = new PanelStatusChangedCommand(); - - // Set the fields - command.setPanelStatus(panelStatus); - command.setSecondsRemaining(secondsRemaining); - command.setAudibleNotification(audibleNotification); - command.setAlarmStatus(alarmStatus); - - return send(command); - } - - /** - * The Get Panel Status Response - *

    - * This command updates requesting IAS ACE clients in the system of changes to the security panel status recorded by - * the ACE server (e.g., IAS CIE device). - * - * @param panelStatus {@link Integer} Panel Status - * @param secondsRemaining {@link Integer} Seconds Remaining - * @param audibleNotification {@link Integer} Audible Notification - * @param alarmStatus {@link Integer} Alarm Status - * @return the {@link Future} command result future - */ - public Future getPanelStatusResponse(Integer panelStatus, Integer secondsRemaining, Integer audibleNotification, Integer alarmStatus) { - GetPanelStatusResponse command = new GetPanelStatusResponse(); - - // Set the fields - command.setPanelStatus(panelStatus); - command.setSecondsRemaining(secondsRemaining); - command.setAudibleNotification(audibleNotification); - command.setAlarmStatus(alarmStatus); - - return send(command); - } - - /** - * The Set Bypassed Zone List Command - *

    - * Sets the list of bypassed zones on the IAS ACE client. This command can be sent either as a response to the - * GetBypassedZoneList command or unsolicited when the list of bypassed zones changes on the ACE server. - * - * @param zoneId {@link List} Zone ID - * @return the {@link Future} command result future - */ - public Future setBypassedZoneListCommand(List zoneId) { - SetBypassedZoneListCommand command = new SetBypassedZoneListCommand(); - - // Set the fields - command.setZoneId(zoneId); - - return send(command); - } - - /** - * The Bypass Response - *

    - * Provides the response of the security panel to the request from the IAS ACE client to bypass zones via a Bypass command. - * - * @param bypassResult {@link List} Bypass Result - * @return the {@link Future} command result future - */ - public Future bypassResponse(List bypassResult) { - BypassResponse command = new BypassResponse(); - - // Set the fields - command.setBypassResult(bypassResult); - - return send(command); - } - - /** - * The Get Zone Status Response - *

    - * This command updates requesting IAS ACE clients in the system of changes to the IAS Zone server statuses recorded - * by the ACE server (e.g., IAS CIE device). - * - * @param zoneStatusComplete {@link Boolean} Zone Status Complete - * @param numberOfZones {@link Integer} Number of zones - * @param iasAceZoneStatus {@link Integer} Ias Ace Zone Status - * @param zoneId {@link Integer} Zone Id - * @param zoneStatus {@link Integer} Zone Status - * @return the {@link Future} command result future - */ - public Future getZoneStatusResponse(Boolean zoneStatusComplete, Integer numberOfZones, Integer iasAceZoneStatus, Integer zoneId, Integer zoneStatus) { - GetZoneStatusResponse command = new GetZoneStatusResponse(); - - // Set the fields - command.setZoneStatusComplete(zoneStatusComplete); - command.setNumberOfZones(numberOfZones); - command.setIasAceZoneStatus(iasAceZoneStatus); - command.setZoneId(zoneId); - command.setZoneStatus(zoneStatus); - - return send(command); - } - - @Override - public ZclCommand getCommandFromId(int commandId) { - switch (commandId) { - case 0: // ARM_COMMAND - return new ArmCommand(); - case 1: // BYPASS_COMMAND - return new BypassCommand(); - case 2: // EMERGENCY_COMMAND - return new EmergencyCommand(); - case 3: // FIRE_COMMAND - return new FireCommand(); - case 4: // PANIC_COMMAND - return new PanicCommand(); - case 5: // GET_ZONE_ID_MAP_COMMAND - return new GetZoneIdMapCommand(); - case 6: // GET_ZONE_INFORMATION_COMMAND - return new GetZoneInformationCommand(); - case 7: // GET_PANEL_STATUS_COMMAND - return new GetPanelStatusCommand(); - case 8: // GET_BYPASSED_ZONE_LIST_COMMAND - return new GetBypassedZoneListCommand(); - case 9: // GET_ZONE_STATUS_COMMAND - return new GetZoneStatusCommand(); - default: - return null; - } - } - - @Override - public ZclCommand getResponseFromId(int commandId) { - switch (commandId) { - case 0: // ARM_RESPONSE - return new ArmResponse(); - case 1: // GET_ZONE_ID_MAP_RESPONSE - return new GetZoneIdMapResponse(); - case 2: // GET_ZONE_INFORMATION_RESPONSE - return new GetZoneInformationResponse(); - case 3: // ZONE_STATUS_CHANGED_COMMAND - return new ZoneStatusChangedCommand(); - case 4: // PANEL_STATUS_CHANGED_COMMAND - return new PanelStatusChangedCommand(); - case 5: // GET_PANEL_STATUS_RESPONSE - return new GetPanelStatusResponse(); - case 6: // SET_BYPASSED_ZONE_LIST_COMMAND - return new SetBypassedZoneListCommand(); - case 7: // BYPASS_RESPONSE - return new BypassResponse(); - case 8: // GET_ZONE_STATUS_RESPONSE - return new GetZoneStatusResponse(); - default: - return null; - } - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclIasWdCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclIasWdCluster.java deleted file mode 100644 index 2132af480..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclIasWdCluster.java +++ /dev/null @@ -1,322 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.CommandResult; -import com.zsmartsystems.zigbee.IeeeAddress; -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.clusters.iaswd.SquawkCommand; -import com.zsmartsystems.zigbee.zcl.clusters.iaswd.StartWarningCommand; -import com.zsmartsystems.zigbee.zcl.protocol.ZclClusterType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Future; -import javax.annotation.Generated; - -/** - * IAS WD cluster implementation (Cluster ID 0x0502). - *

    - * The IAS WD cluster provides an interface to the functionality of any Warning - * Device equipment of the IAS system. Using this cluster, a ZigBee enabled CIE - * device can access a ZigBee enabled IAS WD device and issue alarm warning - * indications (siren, strobe lighting, etc.) when a system alarm condition is detected. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclIasWdCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0502; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "IAS WD"; - - // Attribute constants - /** - * The MaxDuration attribute specifies the maximum time in seconds that the siren - * will sound continuously, regardless of start/stop commands. - */ - public static final int ATTR_MAXDURATION = 0x0000; - /** - */ - public static final int ATTR_ZONETYPE = 0x0001; - /** - */ - public static final int ATTR_ZONESTATUS = 0x0002; - /** - */ - public static final int ATTR_IAS_CIE_ADDRESS = 0x0010; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(4); - - attributeMap.put(ATTR_MAXDURATION, new ZclAttribute(ZclClusterType.IAS_WD, ATTR_MAXDURATION, "MaxDuration", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, true, false)); - attributeMap.put(ATTR_ZONETYPE, new ZclAttribute(ZclClusterType.IAS_WD, ATTR_ZONETYPE, "ZoneType", ZclDataType.ENUMERATION_8_BIT, true, true, false, false)); - attributeMap.put(ATTR_ZONESTATUS, new ZclAttribute(ZclClusterType.IAS_WD, ATTR_ZONESTATUS, "ZoneStatus", ZclDataType.BITMAP_16_BIT, true, true, false, false)); - attributeMap.put(ATTR_IAS_CIE_ADDRESS, new ZclAttribute(ZclClusterType.IAS_WD, ATTR_IAS_CIE_ADDRESS, "IAS_CIE_Address", ZclDataType.IEEE_ADDRESS, true, true, true, false)); - - return attributeMap; - } - - /** - * Default constructor to create a IAS WD cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclIasWdCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } - - /** - * Set the MaxDuration attribute [attribute ID 0]. - *

    - * The MaxDuration attribute specifies the maximum time in seconds that the siren - * will sound continuously, regardless of start/stop commands. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param maxDuration the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setMaxDuration(final Object value) { - return write(attributes.get(ATTR_MAXDURATION), value); - } - - /** - * Get the MaxDuration attribute [attribute ID 0]. - *

    - * The MaxDuration attribute specifies the maximum time in seconds that the siren - * will sound continuously, regardless of start/stop commands. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getMaxDurationAsync() { - return read(attributes.get(ATTR_MAXDURATION)); - } - - /** - * Synchronously get the MaxDuration attribute [attribute ID 0]. - *

    - * The MaxDuration attribute specifies the maximum time in seconds that the siren - * will sound continuously, regardless of start/stop commands. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMaxDuration(final long refreshPeriod) { - if (attributes.get(ATTR_MAXDURATION).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MAXDURATION).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MAXDURATION)); - } - - /** - * Get the ZoneType attribute [attribute ID 1]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getZoneTypeAsync() { - return read(attributes.get(ATTR_ZONETYPE)); - } - - /** - * Synchronously get the ZoneType attribute [attribute ID 1]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getZoneType(final long refreshPeriod) { - if (attributes.get(ATTR_ZONETYPE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_ZONETYPE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_ZONETYPE)); - } - - /** - * Get the ZoneStatus attribute [attribute ID 2]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getZoneStatusAsync() { - return read(attributes.get(ATTR_ZONESTATUS)); - } - - /** - * Synchronously get the ZoneStatus attribute [attribute ID 2]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getZoneStatus(final long refreshPeriod) { - if (attributes.get(ATTR_ZONESTATUS).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_ZONESTATUS).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_ZONESTATUS)); - } - - /** - * Set the IAS_CIE_Address attribute [attribute ID 16]. - *

    - * The attribute is of type {@link IeeeAddress}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param iasCieAddress the {@link IeeeAddress} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setIasCieAddress(final Object value) { - return write(attributes.get(ATTR_IAS_CIE_ADDRESS), value); - } - - /** - * Get the IAS_CIE_Address attribute [attribute ID 16]. - *

    - * The attribute is of type {@link IeeeAddress}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getIasCieAddressAsync() { - return read(attributes.get(ATTR_IAS_CIE_ADDRESS)); - } - - /** - * Synchronously get the IAS_CIE_Address attribute [attribute ID 16]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link IeeeAddress}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link IeeeAddress} attribute value, or null on error - */ - public IeeeAddress getIasCieAddress(final long refreshPeriod) { - if (attributes.get(ATTR_IAS_CIE_ADDRESS).isLastValueCurrent(refreshPeriod)) { - return (IeeeAddress) attributes.get(ATTR_IAS_CIE_ADDRESS).getLastValue(); - } - - return (IeeeAddress) readSync(attributes.get(ATTR_IAS_CIE_ADDRESS)); - } - - /** - * The Start Warning Command - *

    - * This command starts the WD operation. The WD alerts the surrounding area by - * audible (siren) and visual (strobe) signals. - *
    - * A Start Warning command shall always terminate the effect of any previous - * command that is still current. - * - * @param header {@link Integer} Header - * @param warningDuration {@link Integer} Warning duration - * @return the {@link Future} command result future - */ - public Future startWarningCommand(Integer header, Integer warningDuration) { - StartWarningCommand command = new StartWarningCommand(); - - // Set the fields - command.setHeader(header); - command.setWarningDuration(warningDuration); - - return send(command); - } - - /** - * The Squawk Command - * - * @param header {@link Integer} Header - * @return the {@link Future} command result future - */ - public Future squawkCommand(Integer header) { - SquawkCommand command = new SquawkCommand(); - - // Set the fields - command.setHeader(header); - - return send(command); - } - - @Override - public ZclCommand getCommandFromId(int commandId) { - switch (commandId) { - case 0: // START_WARNING_COMMAND - return new StartWarningCommand(); - case 2: // SQUAWK_COMMAND - return new SquawkCommand(); - default: - return null; - } - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclIasZoneCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclIasZoneCluster.java deleted file mode 100644 index 8fb3b8631..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclIasZoneCluster.java +++ /dev/null @@ -1,668 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.CommandResult; -import com.zsmartsystems.zigbee.IeeeAddress; -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.clusters.iaszone.InitiateNormalOperationModeCommand; -import com.zsmartsystems.zigbee.zcl.clusters.iaszone.InitiateTestModeCommand; -import com.zsmartsystems.zigbee.zcl.clusters.iaszone.ZoneEnrollRequestCommand; -import com.zsmartsystems.zigbee.zcl.clusters.iaszone.ZoneEnrollResponse; -import com.zsmartsystems.zigbee.zcl.clusters.iaszone.ZoneStatusChangeNotificationCommand; -import com.zsmartsystems.zigbee.zcl.protocol.ZclClusterType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Future; -import javax.annotation.Generated; - -/** - * IAS Zone cluster implementation (Cluster ID 0x0500). - *

    - * The IAS Zone cluster defines an interface to the functionality of an IAS security - * zone device. IAS Zone supports up to two alarm types per zone, low battery - * reports and supervision of the IAS network. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclIasZoneCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0500; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "IAS Zone"; - - // Attribute constants - /** - * The Zone State attribute defines if the device is currently enrolled with a CIE or not. - */ - public static final int ATTR_ZONESTATE = 0x0000; - /** - * The Zone Type dictates the meaning of Alarm1 and Alarm2 bits of the ZoneStatus attribute - */ - public static final int ATTR_ZONETYPE = 0x0001; - /** - * The ZoneStatus attribute is a bit map. Each bit defines the state of an alarm. - */ - public static final int ATTR_ZONESTATUS = 0x0002; - /** - * The IAS_CIE_Address attribute specifies the address that commands generated by - * the server shall be sent to. All commands received by the server must also come - * from this address. - *

    - * It is up to the zone's specific implementation to permit or deny change (write) of - * this attribute at specific times. Also, it is up to the zone's specific implementation - * to implement some auto-detect for the CIE (example: by requesting the ZigBee - * cluster discovery service to locate a Zone Server cluster.) or require the - * intervention of a CT in order to configure this attribute during installation. - */ - public static final int ATTR_IASCIEADDRESS = 0x0010; - /** - * A unique reference number allocated by the CIE at zone enrollment time. - *

    - * Used by IAS devices to reference specific zones when communicating with the CIE. The ZoneID of each zone stays fixed until that zone is - * unenrolled. - */ - public static final int ATTR_ZONEID = 0x0011; - /** - * Provides the total number of sensitivity levels supported by the IAS Zone server. The purpose of this attribute is to support devices that - * can be configured to be more or less sensitive (e.g., motion sensor). It provides IAS Zone clients with the range of sensitivity levels that - * are supported so they MAY be presented to the user for configuration. - *

    - * The values 0x00 and 0x01 are reserved because a device that has zero or one sensitivity level SHOULD NOT support this attribute because no - * configuration of the IAS Zone server’s sensitivity level is possible. - *

    - * The meaning of each sensitivity level is manufacturer-specific. However, the sensitivity level of the IAS Zone server SHALL become more - * sensitive as they ascend. For example, if the server supports three sen- sitivity levels, then the value of this attribute would be 0x03 - * where 0x03 is more sensitive than 0x02, which is more sensitive than 0x01. - */ - public static final int ATTR_NUMBEROFZONESENSITIVITYLEVELSSUPPORTED = 0x0012; - /** - * Allows an IAS Zone client to query and configure the IAS Zone server’s sensitivity level. Please see - * NumberOfZoneSensitivityLevelsSupported Attribute for more detail on how to interpret this attribute. - *

    - * The default value 0x00 is the device’s default sensitivity level as configured by the manufacturer. It MAY correspond to the same - * sensitivity as another value in the NumberOfZoneSensitivityLevelsSupported, but this is the default sensitivity to be used if the - * CurrentZoneSensitivityLevel attribute is not otherwise configured by an IAS Zone client. - */ - public static final int ATTR_CURRENTZONESENSITIVITYLEVEL = 0x0013; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(7); - - attributeMap.put(ATTR_ZONESTATE, new ZclAttribute(ZclClusterType.IAS_ZONE, ATTR_ZONESTATE, "ZoneState", ZclDataType.ENUMERATION_8_BIT, true, true, false, false)); - attributeMap.put(ATTR_ZONETYPE, new ZclAttribute(ZclClusterType.IAS_ZONE, ATTR_ZONETYPE, "ZoneType", ZclDataType.ENUMERATION_16_BIT, true, true, false, false)); - attributeMap.put(ATTR_ZONESTATUS, new ZclAttribute(ZclClusterType.IAS_ZONE, ATTR_ZONESTATUS, "ZoneStatus", ZclDataType.BITMAP_16_BIT, true, true, false, false)); - attributeMap.put(ATTR_IASCIEADDRESS, new ZclAttribute(ZclClusterType.IAS_ZONE, ATTR_IASCIEADDRESS, "IASCIEAddress", ZclDataType.IEEE_ADDRESS, true, true, true, false)); - attributeMap.put(ATTR_ZONEID, new ZclAttribute(ZclClusterType.IAS_ZONE, ATTR_ZONEID, "ZoneID", ZclDataType.UNSIGNED_8_BIT_INTEGER, true, true, true, false)); - attributeMap.put(ATTR_NUMBEROFZONESENSITIVITYLEVELSSUPPORTED, new ZclAttribute(ZclClusterType.IAS_ZONE, ATTR_NUMBEROFZONESENSITIVITYLEVELSSUPPORTED, "NumberOfZoneSensitivityLevelsSupported", ZclDataType.UNSIGNED_8_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_CURRENTZONESENSITIVITYLEVEL, new ZclAttribute(ZclClusterType.IAS_ZONE, ATTR_CURRENTZONESENSITIVITYLEVEL, "CurrentZoneSensitivityLevel", ZclDataType.UNSIGNED_8_BIT_INTEGER, false, true, true, false)); - - return attributeMap; - } - - /** - * Default constructor to create a IAS Zone cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclIasZoneCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } - - /** - * Get the ZoneState attribute [attribute ID 0]. - *

    - * The Zone State attribute defines if the device is currently enrolled with a CIE or not. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getZoneStateAsync() { - return read(attributes.get(ATTR_ZONESTATE)); - } - - /** - * Synchronously get the ZoneState attribute [attribute ID 0]. - *

    - * The Zone State attribute defines if the device is currently enrolled with a CIE or not. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getZoneState(final long refreshPeriod) { - if (attributes.get(ATTR_ZONESTATE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_ZONESTATE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_ZONESTATE)); - } - - /** - * Get the ZoneType attribute [attribute ID 1]. - *

    - * The Zone Type dictates the meaning of Alarm1 and Alarm2 bits of the ZoneStatus attribute - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getZoneTypeAsync() { - return read(attributes.get(ATTR_ZONETYPE)); - } - - /** - * Synchronously get the ZoneType attribute [attribute ID 1]. - *

    - * The Zone Type dictates the meaning of Alarm1 and Alarm2 bits of the ZoneStatus attribute - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getZoneType(final long refreshPeriod) { - if (attributes.get(ATTR_ZONETYPE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_ZONETYPE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_ZONETYPE)); - } - - /** - * Get the ZoneStatus attribute [attribute ID 2]. - *

    - * The ZoneStatus attribute is a bit map. Each bit defines the state of an alarm. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getZoneStatusAsync() { - return read(attributes.get(ATTR_ZONESTATUS)); - } - - /** - * Synchronously get the ZoneStatus attribute [attribute ID 2]. - *

    - * The ZoneStatus attribute is a bit map. Each bit defines the state of an alarm. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getZoneStatus(final long refreshPeriod) { - if (attributes.get(ATTR_ZONESTATUS).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_ZONESTATUS).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_ZONESTATUS)); - } - - /** - * Set the IASCIEAddress attribute [attribute ID 16]. - *

    - * The IAS_CIE_Address attribute specifies the address that commands generated by - * the server shall be sent to. All commands received by the server must also come - * from this address. - *

    - * It is up to the zone's specific implementation to permit or deny change (write) of - * this attribute at specific times. Also, it is up to the zone's specific implementation - * to implement some auto-detect for the CIE (example: by requesting the ZigBee - * cluster discovery service to locate a Zone Server cluster.) or require the - * intervention of a CT in order to configure this attribute during installation. - *

    - * The attribute is of type {@link IeeeAddress}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param iascieAddress the {@link IeeeAddress} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setIascieAddress(final Object value) { - return write(attributes.get(ATTR_IASCIEADDRESS), value); - } - - /** - * Get the IASCIEAddress attribute [attribute ID 16]. - *

    - * The IAS_CIE_Address attribute specifies the address that commands generated by - * the server shall be sent to. All commands received by the server must also come - * from this address. - *

    - * It is up to the zone's specific implementation to permit or deny change (write) of - * this attribute at specific times. Also, it is up to the zone's specific implementation - * to implement some auto-detect for the CIE (example: by requesting the ZigBee - * cluster discovery service to locate a Zone Server cluster.) or require the - * intervention of a CT in order to configure this attribute during installation. - *

    - * The attribute is of type {@link IeeeAddress}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getIascieAddressAsync() { - return read(attributes.get(ATTR_IASCIEADDRESS)); - } - - /** - * Synchronously get the IASCIEAddress attribute [attribute ID 16]. - *

    - * The IAS_CIE_Address attribute specifies the address that commands generated by - * the server shall be sent to. All commands received by the server must also come - * from this address. - *

    - * It is up to the zone's specific implementation to permit or deny change (write) of - * this attribute at specific times. Also, it is up to the zone's specific implementation - * to implement some auto-detect for the CIE (example: by requesting the ZigBee - * cluster discovery service to locate a Zone Server cluster.) or require the - * intervention of a CT in order to configure this attribute during installation. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link IeeeAddress}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link IeeeAddress} attribute value, or null on error - */ - public IeeeAddress getIascieAddress(final long refreshPeriod) { - if (attributes.get(ATTR_IASCIEADDRESS).isLastValueCurrent(refreshPeriod)) { - return (IeeeAddress) attributes.get(ATTR_IASCIEADDRESS).getLastValue(); - } - - return (IeeeAddress) readSync(attributes.get(ATTR_IASCIEADDRESS)); - } - - /** - * Set the ZoneID attribute [attribute ID 17]. - *

    - * A unique reference number allocated by the CIE at zone enrollment time. - *

    - * Used by IAS devices to reference specific zones when communicating with the CIE. The ZoneID of each zone stays fixed until that zone is - * unenrolled. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param zoneId the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setZoneId(final Object value) { - return write(attributes.get(ATTR_ZONEID), value); - } - - /** - * Get the ZoneID attribute [attribute ID 17]. - *

    - * A unique reference number allocated by the CIE at zone enrollment time. - *

    - * Used by IAS devices to reference specific zones when communicating with the CIE. The ZoneID of each zone stays fixed until that zone is - * unenrolled. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getZoneIdAsync() { - return read(attributes.get(ATTR_ZONEID)); - } - - /** - * Synchronously get the ZoneID attribute [attribute ID 17]. - *

    - * A unique reference number allocated by the CIE at zone enrollment time. - *

    - * Used by IAS devices to reference specific zones when communicating with the CIE. The ZoneID of each zone stays fixed until that zone is - * unenrolled. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getZoneId(final long refreshPeriod) { - if (attributes.get(ATTR_ZONEID).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_ZONEID).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_ZONEID)); - } - - /** - * Get the NumberOfZoneSensitivityLevelsSupported attribute [attribute ID 18]. - *

    - * Provides the total number of sensitivity levels supported by the IAS Zone server. The purpose of this attribute is to support devices that - * can be configured to be more or less sensitive (e.g., motion sensor). It provides IAS Zone clients with the range of sensitivity levels that - * are supported so they MAY be presented to the user for configuration. - *

    - * The values 0x00 and 0x01 are reserved because a device that has zero or one sensitivity level SHOULD NOT support this attribute because no - * configuration of the IAS Zone server’s sensitivity level is possible. - *

    - * The meaning of each sensitivity level is manufacturer-specific. However, the sensitivity level of the IAS Zone server SHALL become more - * sensitive as they ascend. For example, if the server supports three sen- sitivity levels, then the value of this attribute would be 0x03 - * where 0x03 is more sensitive than 0x02, which is more sensitive than 0x01. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getNumberOfZoneSensitivityLevelsSupportedAsync() { - return read(attributes.get(ATTR_NUMBEROFZONESENSITIVITYLEVELSSUPPORTED)); - } - - /** - * Synchronously get the NumberOfZoneSensitivityLevelsSupported attribute [attribute ID 18]. - *

    - * Provides the total number of sensitivity levels supported by the IAS Zone server. The purpose of this attribute is to support devices that - * can be configured to be more or less sensitive (e.g., motion sensor). It provides IAS Zone clients with the range of sensitivity levels that - * are supported so they MAY be presented to the user for configuration. - *

    - * The values 0x00 and 0x01 are reserved because a device that has zero or one sensitivity level SHOULD NOT support this attribute because no - * configuration of the IAS Zone server’s sensitivity level is possible. - *

    - * The meaning of each sensitivity level is manufacturer-specific. However, the sensitivity level of the IAS Zone server SHALL become more - * sensitive as they ascend. For example, if the server supports three sen- sitivity levels, then the value of this attribute would be 0x03 - * where 0x03 is more sensitive than 0x02, which is more sensitive than 0x01. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getNumberOfZoneSensitivityLevelsSupported(final long refreshPeriod) { - if (attributes.get(ATTR_NUMBEROFZONESENSITIVITYLEVELSSUPPORTED).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_NUMBEROFZONESENSITIVITYLEVELSSUPPORTED).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_NUMBEROFZONESENSITIVITYLEVELSSUPPORTED)); - } - - /** - * Set the CurrentZoneSensitivityLevel attribute [attribute ID 19]. - *

    - * Allows an IAS Zone client to query and configure the IAS Zone server’s sensitivity level. Please see - * NumberOfZoneSensitivityLevelsSupported Attribute for more detail on how to interpret this attribute. - *

    - * The default value 0x00 is the device’s default sensitivity level as configured by the manufacturer. It MAY correspond to the same - * sensitivity as another value in the NumberOfZoneSensitivityLevelsSupported, but this is the default sensitivity to be used if the - * CurrentZoneSensitivityLevel attribute is not otherwise configured by an IAS Zone client. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param currentZoneSensitivityLevel the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setCurrentZoneSensitivityLevel(final Object value) { - return write(attributes.get(ATTR_CURRENTZONESENSITIVITYLEVEL), value); - } - - /** - * Get the CurrentZoneSensitivityLevel attribute [attribute ID 19]. - *

    - * Allows an IAS Zone client to query and configure the IAS Zone server’s sensitivity level. Please see - * NumberOfZoneSensitivityLevelsSupported Attribute for more detail on how to interpret this attribute. - *

    - * The default value 0x00 is the device’s default sensitivity level as configured by the manufacturer. It MAY correspond to the same - * sensitivity as another value in the NumberOfZoneSensitivityLevelsSupported, but this is the default sensitivity to be used if the - * CurrentZoneSensitivityLevel attribute is not otherwise configured by an IAS Zone client. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getCurrentZoneSensitivityLevelAsync() { - return read(attributes.get(ATTR_CURRENTZONESENSITIVITYLEVEL)); - } - - /** - * Synchronously get the CurrentZoneSensitivityLevel attribute [attribute ID 19]. - *

    - * Allows an IAS Zone client to query and configure the IAS Zone server’s sensitivity level. Please see - * NumberOfZoneSensitivityLevelsSupported Attribute for more detail on how to interpret this attribute. - *

    - * The default value 0x00 is the device’s default sensitivity level as configured by the manufacturer. It MAY correspond to the same - * sensitivity as another value in the NumberOfZoneSensitivityLevelsSupported, but this is the default sensitivity to be used if the - * CurrentZoneSensitivityLevel attribute is not otherwise configured by an IAS Zone client. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getCurrentZoneSensitivityLevel(final long refreshPeriod) { - if (attributes.get(ATTR_CURRENTZONESENSITIVITYLEVEL).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_CURRENTZONESENSITIVITYLEVEL).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_CURRENTZONESENSITIVITYLEVEL)); - } - - /** - * The Zone Enroll Response - * - * @param enrollResponseCode {@link Integer} Enroll response code - * @param zoneId {@link Integer} Zone ID - * @return the {@link Future} command result future - */ - public Future zoneEnrollResponse(Integer enrollResponseCode, Integer zoneId) { - ZoneEnrollResponse command = new ZoneEnrollResponse(); - - // Set the fields - command.setEnrollResponseCode(enrollResponseCode); - command.setZoneId(zoneId); - - return send(command); - } - - /** - * The Initiate Normal Operation Mode Command - *

    - * Used to tell the IAS Zone server to commence normal operation mode. - *
    - * Upon receipt, the IAS Zone server SHALL commence normal operational mode. - *
    - * Any configurations and changes made (e.g., CurrentZoneSensitivityLevel attribute) to the IAS Zone server SHALL be retained. - *
    - * Upon commencing normal operation mode, the IAS Zone server SHALL send a Zone Status Change Notification command updating the ZoneStatus - * attribute Test bit to zero (i.e., “operation mode”). - * - * @return the {@link Future} command result future - */ - public Future initiateNormalOperationModeCommand() { - InitiateNormalOperationModeCommand command = new InitiateNormalOperationModeCommand(); - - return send(command); - } - - /** - * The Initiate Test Mode Command - *

    - * Certain IAS Zone servers MAY have operational configurations that could be configured OTA or locally on the device. This command enables - * them to be remotely placed into a test mode so that the user or installer MAY configure their field of view, sensitivity, and other - * operational parameters. They MAY also verify the placement and proper operation of the IAS Zone server, which MAY have been placed in a - * difficult to reach location (i.e., making a physical input on the device impractical to trigger). - *
    - * Another use case for this command is large deployments, especially commercial and industrial, where placing the entire IAS system into - * test mode instead of a single IAS Zone server is infeasible due to the vulnerabilities that might arise. This command enables only a single - * IAS Zone server to be placed into test mode. - *
    - * The biggest limitation of this command is that most IAS Zone servers today are battery-powered sleepy nodes that cannot reliably receive - * commands. However, implementers MAY decide to program an IAS Zone server by factory default to maintain a limited duration of normal - * polling upon initialization/joining to a new network. Some IAS Zone servers MAY also have AC mains power and are able to receive commands. - * Some types of IAS Zone servers that MAY benefit from this command are: motion sensors and fire sensor/smoke alarm listeners (i.e., a device - * that listens for a non-communicating fire sensor to alarm and communicates this to the IAS CIE). - * - * @param testModeDuration {@link Integer} Test Mode Duration - * @param currentZoneSensitivityLevel {@link Integer} Current Zone Sensitivity Level - * @return the {@link Future} command result future - */ - public Future initiateTestModeCommand(Integer testModeDuration, Integer currentZoneSensitivityLevel) { - InitiateTestModeCommand command = new InitiateTestModeCommand(); - - // Set the fields - command.setTestModeDuration(testModeDuration); - command.setCurrentZoneSensitivityLevel(currentZoneSensitivityLevel); - - return send(command); - } - - /** - * The Zone Status Change Notification Command - * - * @param zoneStatus {@link Integer} Zone Status - * @param extendedStatus {@link Integer} Extended Status - * @return the {@link Future} command result future - */ - public Future zoneStatusChangeNotificationCommand(Integer zoneStatus, Integer extendedStatus) { - ZoneStatusChangeNotificationCommand command = new ZoneStatusChangeNotificationCommand(); - - // Set the fields - command.setZoneStatus(zoneStatus); - command.setExtendedStatus(extendedStatus); - - return send(command); - } - - /** - * The Zone Enroll Request Command - *

    - * The Zone Enroll Request command is generated when a device embodying the Zone server cluster wishes - * to be enrolled as an active alarm device. It must do this immediately it has joined the network - * (during commissioning). - * - * @param zoneType {@link Integer} Zone Type - * @param manufacturerCode {@link Integer} Manufacturer Code - * @return the {@link Future} command result future - */ - public Future zoneEnrollRequestCommand(Integer zoneType, Integer manufacturerCode) { - ZoneEnrollRequestCommand command = new ZoneEnrollRequestCommand(); - - // Set the fields - command.setZoneType(zoneType); - command.setManufacturerCode(manufacturerCode); - - return send(command); - } - - @Override - public ZclCommand getCommandFromId(int commandId) { - switch (commandId) { - case 0: // ZONE_ENROLL_RESPONSE - return new ZoneEnrollResponse(); - case 1: // INITIATE_NORMAL_OPERATION_MODE_COMMAND - return new InitiateNormalOperationModeCommand(); - case 2: // INITIATE_TEST_MODE_COMMAND - return new InitiateTestModeCommand(); - default: - return null; - } - } - - @Override - public ZclCommand getResponseFromId(int commandId) { - switch (commandId) { - case 0: // ZONE_STATUS_CHANGE_NOTIFICATION_COMMAND - return new ZoneStatusChangeNotificationCommand(); - case 1: // ZONE_ENROLL_REQUEST_COMMAND - return new ZoneEnrollRequestCommand(); - default: - return null; - } - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclIdentifyCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclIdentifyCluster.java deleted file mode 100644 index d7c98e2d7..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclIdentifyCluster.java +++ /dev/null @@ -1,238 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.CommandResult; -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.clusters.identify.IdentifyCommand; -import com.zsmartsystems.zigbee.zcl.clusters.identify.IdentifyQueryCommand; -import com.zsmartsystems.zigbee.zcl.clusters.identify.IdentifyQueryResponse; -import com.zsmartsystems.zigbee.zcl.protocol.ZclClusterType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Future; -import javax.annotation.Generated; - -/** - * Identify cluster implementation (Cluster ID 0x0003). - *

    - * Attributes and commands to put a device into an Identification mode (e.g. flashing - * a light), that indicates to an observer – e.g. an installer - which of several devices - * it is, also to request any device that is identifying itself to respond to the initiator. - *

    - * Note that this cluster cannot be disabled, and remains functional regardless of the - * setting of the DeviceEnable attribute in the Basic cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclIdentifyCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0003; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Identify"; - - // Attribute constants - /** - * The IdentifyTime attribute specifies the remaining length of time, in seconds, that - * the device will continue to identify itself. - *

    - * If this attribute is set to a value other than 0x0000 then the device shall enter its - * identification procedure, in order to indicate to an observer which of several - * devices it is. It is recommended that this procedure consists of flashing a light - * with a period of 0.5 seconds. The IdentifyTime attribute shall be decremented - * every second. - *

    - * If this attribute reaches or is set to the value 0x0000 then the device shall - * terminate its identification procedure. - */ - public static final int ATTR_IDENTIFYTIME = 0x0000; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(1); - - attributeMap.put(ATTR_IDENTIFYTIME, new ZclAttribute(ZclClusterType.IDENTIFY, ATTR_IDENTIFYTIME, "IdentifyTime", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, true, false)); - - return attributeMap; - } - - /** - * Default constructor to create a Identify cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclIdentifyCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } - - /** - * Set the IdentifyTime attribute [attribute ID 0]. - *

    - * The IdentifyTime attribute specifies the remaining length of time, in seconds, that - * the device will continue to identify itself. - *

    - * If this attribute is set to a value other than 0x0000 then the device shall enter its - * identification procedure, in order to indicate to an observer which of several - * devices it is. It is recommended that this procedure consists of flashing a light - * with a period of 0.5 seconds. The IdentifyTime attribute shall be decremented - * every second. - *

    - * If this attribute reaches or is set to the value 0x0000 then the device shall - * terminate its identification procedure. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param identifyTime the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setIdentifyTime(final Object value) { - return write(attributes.get(ATTR_IDENTIFYTIME), value); - } - - /** - * Get the IdentifyTime attribute [attribute ID 0]. - *

    - * The IdentifyTime attribute specifies the remaining length of time, in seconds, that - * the device will continue to identify itself. - *

    - * If this attribute is set to a value other than 0x0000 then the device shall enter its - * identification procedure, in order to indicate to an observer which of several - * devices it is. It is recommended that this procedure consists of flashing a light - * with a period of 0.5 seconds. The IdentifyTime attribute shall be decremented - * every second. - *

    - * If this attribute reaches or is set to the value 0x0000 then the device shall - * terminate its identification procedure. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getIdentifyTimeAsync() { - return read(attributes.get(ATTR_IDENTIFYTIME)); - } - - /** - * Synchronously get the IdentifyTime attribute [attribute ID 0]. - *

    - * The IdentifyTime attribute specifies the remaining length of time, in seconds, that - * the device will continue to identify itself. - *

    - * If this attribute is set to a value other than 0x0000 then the device shall enter its - * identification procedure, in order to indicate to an observer which of several - * devices it is. It is recommended that this procedure consists of flashing a light - * with a period of 0.5 seconds. The IdentifyTime attribute shall be decremented - * every second. - *

    - * If this attribute reaches or is set to the value 0x0000 then the device shall - * terminate its identification procedure. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getIdentifyTime(final long refreshPeriod) { - if (attributes.get(ATTR_IDENTIFYTIME).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_IDENTIFYTIME).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_IDENTIFYTIME)); - } - - /** - * The Identify Command - *

    - * The identify command starts or stops the receiving device identifying itself. - * - * @param identifyTime {@link Integer} Identify Time - * @return the {@link Future} command result future - */ - public Future identifyCommand(Integer identifyTime) { - IdentifyCommand command = new IdentifyCommand(); - - // Set the fields - command.setIdentifyTime(identifyTime); - - return send(command); - } - - /** - * The Identify Query Command - * - * @return the {@link Future} command result future - */ - public Future identifyQueryCommand() { - IdentifyQueryCommand command = new IdentifyQueryCommand(); - - return send(command); - } - - /** - * The Identify Query Response - *

    - * The identify query response command is generated in response to receiving an - * Identify Query command in the case that the device is currently identifying itself. - * - * @param identifyTime {@link Integer} Identify Time - * @return the {@link Future} command result future - */ - public Future identifyQueryResponse(Integer identifyTime) { - IdentifyQueryResponse command = new IdentifyQueryResponse(); - - // Set the fields - command.setIdentifyTime(identifyTime); - - return send(command); - } - - @Override - public ZclCommand getCommandFromId(int commandId) { - switch (commandId) { - case 0: // IDENTIFY_COMMAND - return new IdentifyCommand(); - case 1: // IDENTIFY_QUERY_COMMAND - return new IdentifyQueryCommand(); - default: - return null; - } - } - - @Override - public ZclCommand getResponseFromId(int commandId) { - switch (commandId) { - case 0: // IDENTIFY_QUERY_RESPONSE - return new IdentifyQueryResponse(); - default: - return null; - } - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclIlluminanceLevelSensingCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclIlluminanceLevelSensingCluster.java deleted file mode 100644 index f394b82a3..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclIlluminanceLevelSensingCluster.java +++ /dev/null @@ -1,264 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.CommandResult; -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import com.zsmartsystems.zigbee.zcl.protocol.ZclClusterType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Future; -import javax.annotation.Generated; - -/** - * Illuminance level sensing cluster implementation (Cluster ID 0x0401). - *

    - * The cluster provides an interface to illuminance level sensing functionality, - * including configuration and provision of notifications of whether the illuminance - * is within, above or below a target band. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclIlluminanceLevelSensingCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0401; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Illuminance level sensing"; - - // Attribute constants - /** - * The LevelStatus attribute indicates whether the measured illuminance is above, - * below, or within a band around IlluminanceTargetLevel . - */ - public static final int ATTR_LEVELSTATUS = 0x0000; - /** - * The LightSensorType attribute specifies the electronic type of the light sensor. - */ - public static final int ATTR_LIGHTSENSORTYPE = 0x0001; - /** - * The IlluminanceTargetLevel attribute specifies the target illuminance level. This - * target level is taken as the centre of a 'dead band', which must be sufficient in - * width, with hysteresis bands at both top and bottom, to provide reliable - * notifications without 'chatter'. Such a dead band and hysteresis bands must be - * provided by any implementation of this cluster. (N.B. Manufacturer specific - * attributes may be provided to configure these). - *

    - * IlluminanceTargetLevel represents illuminance in Lux (symbol lx) as follows: - *

    - * IlluminanceTargetLevel = 10,000 x log10 Illuminance - *

    - * Where 1 lx <= Illuminance <=3.576 Mlx, corresponding to a MeasuredValue in - * the range 0 to 0xfffe. - *

    - * A value of 0xffff indicates that this attribute is not valid. - */ - public static final int ATTR_ILLUMINANCETARGETLEVEL = 0x0010; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(3); - - attributeMap.put(ATTR_LEVELSTATUS, new ZclAttribute(ZclClusterType.ILLUMINANCE_LEVEL_SENSING, ATTR_LEVELSTATUS, "LevelStatus", ZclDataType.ENUMERATION_8_BIT, true, true, false, true)); - attributeMap.put(ATTR_LIGHTSENSORTYPE, new ZclAttribute(ZclClusterType.ILLUMINANCE_LEVEL_SENSING, ATTR_LIGHTSENSORTYPE, "LightSensorType", ZclDataType.ENUMERATION_8_BIT, false, true, false, false)); - attributeMap.put(ATTR_ILLUMINANCETARGETLEVEL, new ZclAttribute(ZclClusterType.ILLUMINANCE_LEVEL_SENSING, ATTR_ILLUMINANCETARGETLEVEL, "IlluminanceTargetLevel", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, false)); - - return attributeMap; - } - - /** - * Default constructor to create a Illuminance level sensing cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclIlluminanceLevelSensingCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } - - /** - * Get the LevelStatus attribute [attribute ID 0]. - *

    - * The LevelStatus attribute indicates whether the measured illuminance is above, - * below, or within a band around IlluminanceTargetLevel . - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getLevelStatusAsync() { - return read(attributes.get(ATTR_LEVELSTATUS)); - } - - /** - * Synchronously get the LevelStatus attribute [attribute ID 0]. - *

    - * The LevelStatus attribute indicates whether the measured illuminance is above, - * below, or within a band around IlluminanceTargetLevel . - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getLevelStatus(final long refreshPeriod) { - if (attributes.get(ATTR_LEVELSTATUS).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_LEVELSTATUS).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_LEVELSTATUS)); - } - - /** - * Set reporting for the LevelStatus attribute [attribute ID 0]. - *

    - * The LevelStatus attribute indicates whether the measured illuminance is above, - * below, or within a band around IlluminanceTargetLevel . - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param minInterval {@link int} minimum reporting period - * @param maxInterval {@link int} maximum reporting period - * @return the {@link Future} command result future - */ - public Future setLevelStatusReporting(final int minInterval, final int maxInterval) { - return setReporting(attributes.get(ATTR_LEVELSTATUS), minInterval, maxInterval); - } - - /** - * Get the LightSensorType attribute [attribute ID 1]. - *

    - * The LightSensorType attribute specifies the electronic type of the light sensor. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getLightSensorTypeAsync() { - return read(attributes.get(ATTR_LIGHTSENSORTYPE)); - } - - /** - * Synchronously get the LightSensorType attribute [attribute ID 1]. - *

    - * The LightSensorType attribute specifies the electronic type of the light sensor. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getLightSensorType(final long refreshPeriod) { - if (attributes.get(ATTR_LIGHTSENSORTYPE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_LIGHTSENSORTYPE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_LIGHTSENSORTYPE)); - } - - /** - * Get the IlluminanceTargetLevel attribute [attribute ID 16]. - *

    - * The IlluminanceTargetLevel attribute specifies the target illuminance level. This - * target level is taken as the centre of a 'dead band', which must be sufficient in - * width, with hysteresis bands at both top and bottom, to provide reliable - * notifications without 'chatter'. Such a dead band and hysteresis bands must be - * provided by any implementation of this cluster. (N.B. Manufacturer specific - * attributes may be provided to configure these). - *

    - * IlluminanceTargetLevel represents illuminance in Lux (symbol lx) as follows: - *

    - * IlluminanceTargetLevel = 10,000 x log10 Illuminance - *

    - * Where 1 lx <= Illuminance <=3.576 Mlx, corresponding to a MeasuredValue in - * the range 0 to 0xfffe. - *

    - * A value of 0xffff indicates that this attribute is not valid. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getIlluminanceTargetLevelAsync() { - return read(attributes.get(ATTR_ILLUMINANCETARGETLEVEL)); - } - - /** - * Synchronously get the IlluminanceTargetLevel attribute [attribute ID 16]. - *

    - * The IlluminanceTargetLevel attribute specifies the target illuminance level. This - * target level is taken as the centre of a 'dead band', which must be sufficient in - * width, with hysteresis bands at both top and bottom, to provide reliable - * notifications without 'chatter'. Such a dead band and hysteresis bands must be - * provided by any implementation of this cluster. (N.B. Manufacturer specific - * attributes may be provided to configure these). - *

    - * IlluminanceTargetLevel represents illuminance in Lux (symbol lx) as follows: - *

    - * IlluminanceTargetLevel = 10,000 x log10 Illuminance - *

    - * Where 1 lx <= Illuminance <=3.576 Mlx, corresponding to a MeasuredValue in - * the range 0 to 0xfffe. - *

    - * A value of 0xffff indicates that this attribute is not valid. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getIlluminanceTargetLevel(final long refreshPeriod) { - if (attributes.get(ATTR_ILLUMINANCETARGETLEVEL).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_ILLUMINANCETARGETLEVEL).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_ILLUMINANCETARGETLEVEL)); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclIlluminanceMeasurementCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclIlluminanceMeasurementCluster.java deleted file mode 100644 index 7c2c79574..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclIlluminanceMeasurementCluster.java +++ /dev/null @@ -1,393 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.CommandResult; -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import com.zsmartsystems.zigbee.zcl.protocol.ZclClusterType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Future; -import javax.annotation.Generated; - -/** - * Illuminance measurement cluster implementation (Cluster ID 0x0400). - *

    - * The cluster provides an interface to illuminance measurement functionality, - * including configuration and provision of notifications of illuminance - * measurements. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclIlluminanceMeasurementCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0400; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Illuminance measurement"; - - // Attribute constants - /** - * MeasuredValue represents the Illuminance in Lux (symbol lx) as follows:- - *

    - * MeasuredValue = 10,000 x log10 Illuminance + 1 - *

    - * Where 1 lx <= Illuminance <=3.576 Mlx, corresponding to a MeasuredValue in - * the range 1 to 0xfffe. - *

    - * The following special values of MeasuredValue apply. - *

  • 0x0000 indicates a value of Illuminance that is too low to be measured.
  • - *
  • 0xffff indicates that the Illuminance measurement is invalid.
  • - */ - public static final int ATTR_MEASUREDVALUE = 0x0000; - /** - * The MinMeasuredValue attribute indicates the minimum value of MeasuredValue - * that can be measured. A value of 0xffff indicates that this attribute is not defined. - */ - public static final int ATTR_MINMEASUREDVALUE = 0x0001; - /** - * The MaxMeasuredValue attribute indicates the maximum value of MeasuredValue - * that can be measured. A value of 0xffff indicates that this attribute is not defined. - *

    - * MaxMeasuredValue shall be greater than MinMeasuredValue. - *

    - * MinMeasuredValue and MaxMeasuredValue define the range of the sensor. - */ - public static final int ATTR_MAXMEASUREDVALUE = 0x0002; - /** - * The Tolerance attribute indicates the magnitude of the possible error that is - * associated with MeasuredValue . The true value is located in the range - * (MeasuredValue – Tolerance) to (MeasuredValue + Tolerance). - */ - public static final int ATTR_TOLERANCE = 0x0003; - /** - * The LightSensorType attribute specifies the electronic type of the light sensor. - */ - public static final int ATTR_LIGHTSENSORTYPE = 0x0004; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(5); - - attributeMap.put(ATTR_MEASUREDVALUE, new ZclAttribute(ZclClusterType.ILLUMINANCE_MEASUREMENT, ATTR_MEASUREDVALUE, "MeasuredValue", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, true)); - attributeMap.put(ATTR_MINMEASUREDVALUE, new ZclAttribute(ZclClusterType.ILLUMINANCE_MEASUREMENT, ATTR_MINMEASUREDVALUE, "MinMeasuredValue", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_MAXMEASUREDVALUE, new ZclAttribute(ZclClusterType.ILLUMINANCE_MEASUREMENT, ATTR_MAXMEASUREDVALUE, "MaxMeasuredValue", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_TOLERANCE, new ZclAttribute(ZclClusterType.ILLUMINANCE_MEASUREMENT, ATTR_TOLERANCE, "Tolerance", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, true)); - attributeMap.put(ATTR_LIGHTSENSORTYPE, new ZclAttribute(ZclClusterType.ILLUMINANCE_MEASUREMENT, ATTR_LIGHTSENSORTYPE, "LightSensorType", ZclDataType.ENUMERATION_8_BIT, false, true, false, false)); - - return attributeMap; - } - - /** - * Default constructor to create a Illuminance measurement cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclIlluminanceMeasurementCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } - - /** - * Get the MeasuredValue attribute [attribute ID 0]. - *

    - * MeasuredValue represents the Illuminance in Lux (symbol lx) as follows:- - *

    - * MeasuredValue = 10,000 x log10 Illuminance + 1 - *

    - * Where 1 lx <= Illuminance <=3.576 Mlx, corresponding to a MeasuredValue in - * the range 1 to 0xfffe. - *

    - * The following special values of MeasuredValue apply. - *

  • 0x0000 indicates a value of Illuminance that is too low to be measured.
  • - *
  • 0xffff indicates that the Illuminance measurement is invalid.
  • - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getMeasuredValueAsync() { - return read(attributes.get(ATTR_MEASUREDVALUE)); - } - - /** - * Synchronously get the MeasuredValue attribute [attribute ID 0]. - *

    - * MeasuredValue represents the Illuminance in Lux (symbol lx) as follows:- - *

    - * MeasuredValue = 10,000 x log10 Illuminance + 1 - *

    - * Where 1 lx <= Illuminance <=3.576 Mlx, corresponding to a MeasuredValue in - * the range 1 to 0xfffe. - *

    - * The following special values of MeasuredValue apply. - *

  • 0x0000 indicates a value of Illuminance that is too low to be measured.
  • - *
  • 0xffff indicates that the Illuminance measurement is invalid.
  • - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMeasuredValue(final long refreshPeriod) { - if (attributes.get(ATTR_MEASUREDVALUE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MEASUREDVALUE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MEASUREDVALUE)); - } - - /** - * Set reporting for the MeasuredValue attribute [attribute ID 0]. - *

    - * MeasuredValue represents the Illuminance in Lux (symbol lx) as follows:- - *

    - * MeasuredValue = 10,000 x log10 Illuminance + 1 - *

    - * Where 1 lx <= Illuminance <=3.576 Mlx, corresponding to a MeasuredValue in - * the range 1 to 0xfffe. - *

    - * The following special values of MeasuredValue apply. - *

  • 0x0000 indicates a value of Illuminance that is too low to be measured.
  • - *
  • 0xffff indicates that the Illuminance measurement is invalid.
  • - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param minInterval {@link int} minimum reporting period - * @param maxInterval {@link int} maximum reporting period - * @param reportableChange {@link Object} delta required to trigger report - * @return the {@link Future} command result future - */ - public Future setMeasuredValueReporting(final int minInterval, final int maxInterval, final Object reportableChange) { - return setReporting(attributes.get(ATTR_MEASUREDVALUE), minInterval, maxInterval, reportableChange); - } - - /** - * Get the MinMeasuredValue attribute [attribute ID 1]. - *

    - * The MinMeasuredValue attribute indicates the minimum value of MeasuredValue - * that can be measured. A value of 0xffff indicates that this attribute is not defined. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getMinMeasuredValueAsync() { - return read(attributes.get(ATTR_MINMEASUREDVALUE)); - } - - /** - * Synchronously get the MinMeasuredValue attribute [attribute ID 1]. - *

    - * The MinMeasuredValue attribute indicates the minimum value of MeasuredValue - * that can be measured. A value of 0xffff indicates that this attribute is not defined. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMinMeasuredValue(final long refreshPeriod) { - if (attributes.get(ATTR_MINMEASUREDVALUE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MINMEASUREDVALUE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MINMEASUREDVALUE)); - } - - /** - * Get the MaxMeasuredValue attribute [attribute ID 2]. - *

    - * The MaxMeasuredValue attribute indicates the maximum value of MeasuredValue - * that can be measured. A value of 0xffff indicates that this attribute is not defined. - *

    - * MaxMeasuredValue shall be greater than MinMeasuredValue. - *

    - * MinMeasuredValue and MaxMeasuredValue define the range of the sensor. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getMaxMeasuredValueAsync() { - return read(attributes.get(ATTR_MAXMEASUREDVALUE)); - } - - /** - * Synchronously get the MaxMeasuredValue attribute [attribute ID 2]. - *

    - * The MaxMeasuredValue attribute indicates the maximum value of MeasuredValue - * that can be measured. A value of 0xffff indicates that this attribute is not defined. - *

    - * MaxMeasuredValue shall be greater than MinMeasuredValue. - *

    - * MinMeasuredValue and MaxMeasuredValue define the range of the sensor. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMaxMeasuredValue(final long refreshPeriod) { - if (attributes.get(ATTR_MAXMEASUREDVALUE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MAXMEASUREDVALUE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MAXMEASUREDVALUE)); - } - - /** - * Get the Tolerance attribute [attribute ID 3]. - *

    - * The Tolerance attribute indicates the magnitude of the possible error that is - * associated with MeasuredValue . The true value is located in the range - * (MeasuredValue – Tolerance) to (MeasuredValue + Tolerance). - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getToleranceAsync() { - return read(attributes.get(ATTR_TOLERANCE)); - } - - /** - * Synchronously get the Tolerance attribute [attribute ID 3]. - *

    - * The Tolerance attribute indicates the magnitude of the possible error that is - * associated with MeasuredValue . The true value is located in the range - * (MeasuredValue – Tolerance) to (MeasuredValue + Tolerance). - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getTolerance(final long refreshPeriod) { - if (attributes.get(ATTR_TOLERANCE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_TOLERANCE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_TOLERANCE)); - } - - /** - * Set reporting for the Tolerance attribute [attribute ID 3]. - *

    - * The Tolerance attribute indicates the magnitude of the possible error that is - * associated with MeasuredValue . The true value is located in the range - * (MeasuredValue – Tolerance) to (MeasuredValue + Tolerance). - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param minInterval {@link int} minimum reporting period - * @param maxInterval {@link int} maximum reporting period - * @param reportableChange {@link Object} delta required to trigger report - * @return the {@link Future} command result future - */ - public Future setToleranceReporting(final int minInterval, final int maxInterval, final Object reportableChange) { - return setReporting(attributes.get(ATTR_TOLERANCE), minInterval, maxInterval, reportableChange); - } - - /** - * Get the LightSensorType attribute [attribute ID 4]. - *

    - * The LightSensorType attribute specifies the electronic type of the light sensor. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getLightSensorTypeAsync() { - return read(attributes.get(ATTR_LIGHTSENSORTYPE)); - } - - /** - * Synchronously get the LightSensorType attribute [attribute ID 4]. - *

    - * The LightSensorType attribute specifies the electronic type of the light sensor. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getLightSensorType(final long refreshPeriod) { - if (attributes.get(ATTR_LIGHTSENSORTYPE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_LIGHTSENSORTYPE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_LIGHTSENSORTYPE)); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclKeyEstablishmentCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclKeyEstablishmentCluster.java deleted file mode 100644 index 068bafbae..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclKeyEstablishmentCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Key Establishment cluster implementation (Cluster ID 0x0800). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclKeyEstablishmentCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0800; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Key Establishment"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Key Establishment cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclKeyEstablishmentCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclLevelControlCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclLevelControlCluster.java deleted file mode 100644 index ceb345d87..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclLevelControlCluster.java +++ /dev/null @@ -1,726 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.CommandResult; -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.clusters.levelcontrol.MoveCommand; -import com.zsmartsystems.zigbee.zcl.clusters.levelcontrol.MoveToLevelCommand; -import com.zsmartsystems.zigbee.zcl.clusters.levelcontrol.MoveToLevelWithOnOffCommand; -import com.zsmartsystems.zigbee.zcl.clusters.levelcontrol.MoveWithOnOffCommand; -import com.zsmartsystems.zigbee.zcl.clusters.levelcontrol.StepCommand; -import com.zsmartsystems.zigbee.zcl.clusters.levelcontrol.StepWithOnOffCommand; -import com.zsmartsystems.zigbee.zcl.clusters.levelcontrol.Stop2Command; -import com.zsmartsystems.zigbee.zcl.clusters.levelcontrol.StopCommand; -import com.zsmartsystems.zigbee.zcl.protocol.ZclClusterType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Future; -import javax.annotation.Generated; - -/** - * Level Control cluster implementation (Cluster ID 0x0008). - *

    - * This cluster provides an interface for controlling a characteristic of a device that - * can be set to a level, for example the brightness of a light, the degree of closure of - * a door, or the power output of a heater. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclLevelControlCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0008; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Level Control"; - - // Attribute constants - /** - * The CurrentLevel attribute represents the current level of this device. The - * meaning of 'level' is device dependent. Value is between 0 and 254. - */ - public static final int ATTR_CURRENTLEVEL = 0x0000; - /** - * The RemainingTime attribute represents the time remaining until the current - * command is complete - it is specified in 1/10ths of a second. - */ - public static final int ATTR_REMAININGTIME = 0x0001; - /** - * The OnOffTransitionTime attribute represents the time taken to move to or from - * the target level when On of Off commands are received by an On/Off cluster on - * the same endpoint. It is specified in 1/10ths of a second. - *

    - * The actual time taken should be as close to OnOffTransitionTime as the device is - * able. N.B. If the device is not able to move at a variable rate, the - * OnOffTransitionTime attribute should not be implemented. - */ - public static final int ATTR_ONOFFTRANSITIONTIME = 0x0010; - /** - * The OnLevel attribute determines the value that the CurrentLevel attribute is set to - * when the OnOff attribute of an On/Off cluster on the same endpoint is set to On. If - * the OnLevel attribute is not implemented, or is set to 0xff, it has no effect. - */ - public static final int ATTR_ONLEVEL = 0x0011; - /** - * The OnTransitionTime attribute represents the time taken to move the current level from the - * minimum level to the maximum level when an On command is received by an On/Off cluster on - * the same endpoint. It is specified in 10ths of a second. If this command is not implemented, - * or contains a value of 0xffff, the OnOffTransitionTime will be used instead. - */ - public static final int ATTR_ONTRANSITIONTIME = 0x0012; - /** - * The OffTransitionTime attribute represents the time taken to move the current level from the - * maximum level to the minimum level when an Off command is received by an On/Off cluster on - * the same endpoint. It is specified in 10ths of a second. If this command is not implemented, - * or contains a value of 0xffff, the OnOffTransitionTime will be used instead. - */ - public static final int ATTR_OFFTRANSITIONTIME = 0x0013; - /** - * The DefaultMoveRate attribute determines the movement rate, in units per second, when a Move - * command is received with a Rate parameter of 0xFF. - */ - public static final int ATTR_DEFAULTMOVERATE = 0x0014; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(7); - - attributeMap.put(ATTR_CURRENTLEVEL, new ZclAttribute(ZclClusterType.LEVEL_CONTROL, ATTR_CURRENTLEVEL, "CurrentLevel", ZclDataType.UNSIGNED_8_BIT_INTEGER, true, true, false, true)); - attributeMap.put(ATTR_REMAININGTIME, new ZclAttribute(ZclClusterType.LEVEL_CONTROL, ATTR_REMAININGTIME, "RemainingTime", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_ONOFFTRANSITIONTIME, new ZclAttribute(ZclClusterType.LEVEL_CONTROL, ATTR_ONOFFTRANSITIONTIME, "OnOffTransitionTime", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, true, false)); - attributeMap.put(ATTR_ONLEVEL, new ZclAttribute(ZclClusterType.LEVEL_CONTROL, ATTR_ONLEVEL, "OnLevel", ZclDataType.UNSIGNED_8_BIT_INTEGER, false, true, true, false)); - attributeMap.put(ATTR_ONTRANSITIONTIME, new ZclAttribute(ZclClusterType.LEVEL_CONTROL, ATTR_ONTRANSITIONTIME, "OnTransitionTime", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, true, false)); - attributeMap.put(ATTR_OFFTRANSITIONTIME, new ZclAttribute(ZclClusterType.LEVEL_CONTROL, ATTR_OFFTRANSITIONTIME, "OffTransitionTime", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, true, false)); - attributeMap.put(ATTR_DEFAULTMOVERATE, new ZclAttribute(ZclClusterType.LEVEL_CONTROL, ATTR_DEFAULTMOVERATE, "DefaultMoveRate", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, true, false)); - - return attributeMap; - } - - /** - * Default constructor to create a Level Control cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclLevelControlCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } - - /** - * Get the CurrentLevel attribute [attribute ID 0]. - *

    - * The CurrentLevel attribute represents the current level of this device. The - * meaning of 'level' is device dependent. Value is between 0 and 254. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getCurrentLevelAsync() { - return read(attributes.get(ATTR_CURRENTLEVEL)); - } - - /** - * Synchronously get the CurrentLevel attribute [attribute ID 0]. - *

    - * The CurrentLevel attribute represents the current level of this device. The - * meaning of 'level' is device dependent. Value is between 0 and 254. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getCurrentLevel(final long refreshPeriod) { - if (attributes.get(ATTR_CURRENTLEVEL).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_CURRENTLEVEL).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_CURRENTLEVEL)); - } - - /** - * Set reporting for the CurrentLevel attribute [attribute ID 0]. - *

    - * The CurrentLevel attribute represents the current level of this device. The - * meaning of 'level' is device dependent. Value is between 0 and 254. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param minInterval {@link int} minimum reporting period - * @param maxInterval {@link int} maximum reporting period - * @param reportableChange {@link Object} delta required to trigger report - * @return the {@link Future} command result future - */ - public Future setCurrentLevelReporting(final int minInterval, final int maxInterval, final Object reportableChange) { - return setReporting(attributes.get(ATTR_CURRENTLEVEL), minInterval, maxInterval, reportableChange); - } - - /** - * Get the RemainingTime attribute [attribute ID 1]. - *

    - * The RemainingTime attribute represents the time remaining until the current - * command is complete - it is specified in 1/10ths of a second. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getRemainingTimeAsync() { - return read(attributes.get(ATTR_REMAININGTIME)); - } - - /** - * Synchronously get the RemainingTime attribute [attribute ID 1]. - *

    - * The RemainingTime attribute represents the time remaining until the current - * command is complete - it is specified in 1/10ths of a second. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getRemainingTime(final long refreshPeriod) { - if (attributes.get(ATTR_REMAININGTIME).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_REMAININGTIME).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_REMAININGTIME)); - } - - /** - * Set the OnOffTransitionTime attribute [attribute ID 16]. - *

    - * The OnOffTransitionTime attribute represents the time taken to move to or from - * the target level when On of Off commands are received by an On/Off cluster on - * the same endpoint. It is specified in 1/10ths of a second. - *

    - * The actual time taken should be as close to OnOffTransitionTime as the device is - * able. N.B. If the device is not able to move at a variable rate, the - * OnOffTransitionTime attribute should not be implemented. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param onOffTransitionTime the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setOnOffTransitionTime(final Object value) { - return write(attributes.get(ATTR_ONOFFTRANSITIONTIME), value); - } - - /** - * Get the OnOffTransitionTime attribute [attribute ID 16]. - *

    - * The OnOffTransitionTime attribute represents the time taken to move to or from - * the target level when On of Off commands are received by an On/Off cluster on - * the same endpoint. It is specified in 1/10ths of a second. - *

    - * The actual time taken should be as close to OnOffTransitionTime as the device is - * able. N.B. If the device is not able to move at a variable rate, the - * OnOffTransitionTime attribute should not be implemented. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getOnOffTransitionTimeAsync() { - return read(attributes.get(ATTR_ONOFFTRANSITIONTIME)); - } - - /** - * Synchronously get the OnOffTransitionTime attribute [attribute ID 16]. - *

    - * The OnOffTransitionTime attribute represents the time taken to move to or from - * the target level when On of Off commands are received by an On/Off cluster on - * the same endpoint. It is specified in 1/10ths of a second. - *

    - * The actual time taken should be as close to OnOffTransitionTime as the device is - * able. N.B. If the device is not able to move at a variable rate, the - * OnOffTransitionTime attribute should not be implemented. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getOnOffTransitionTime(final long refreshPeriod) { - if (attributes.get(ATTR_ONOFFTRANSITIONTIME).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_ONOFFTRANSITIONTIME).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_ONOFFTRANSITIONTIME)); - } - - /** - * Set the OnLevel attribute [attribute ID 17]. - *

    - * The OnLevel attribute determines the value that the CurrentLevel attribute is set to - * when the OnOff attribute of an On/Off cluster on the same endpoint is set to On. If - * the OnLevel attribute is not implemented, or is set to 0xff, it has no effect. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param onLevel the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setOnLevel(final Object value) { - return write(attributes.get(ATTR_ONLEVEL), value); - } - - /** - * Get the OnLevel attribute [attribute ID 17]. - *

    - * The OnLevel attribute determines the value that the CurrentLevel attribute is set to - * when the OnOff attribute of an On/Off cluster on the same endpoint is set to On. If - * the OnLevel attribute is not implemented, or is set to 0xff, it has no effect. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getOnLevelAsync() { - return read(attributes.get(ATTR_ONLEVEL)); - } - - /** - * Synchronously get the OnLevel attribute [attribute ID 17]. - *

    - * The OnLevel attribute determines the value that the CurrentLevel attribute is set to - * when the OnOff attribute of an On/Off cluster on the same endpoint is set to On. If - * the OnLevel attribute is not implemented, or is set to 0xff, it has no effect. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getOnLevel(final long refreshPeriod) { - if (attributes.get(ATTR_ONLEVEL).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_ONLEVEL).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_ONLEVEL)); - } - - /** - * Set the OnTransitionTime attribute [attribute ID 18]. - *

    - * The OnTransitionTime attribute represents the time taken to move the current level from the - * minimum level to the maximum level when an On command is received by an On/Off cluster on - * the same endpoint. It is specified in 10ths of a second. If this command is not implemented, - * or contains a value of 0xffff, the OnOffTransitionTime will be used instead. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param onTransitionTime the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setOnTransitionTime(final Object value) { - return write(attributes.get(ATTR_ONTRANSITIONTIME), value); - } - - /** - * Get the OnTransitionTime attribute [attribute ID 18]. - *

    - * The OnTransitionTime attribute represents the time taken to move the current level from the - * minimum level to the maximum level when an On command is received by an On/Off cluster on - * the same endpoint. It is specified in 10ths of a second. If this command is not implemented, - * or contains a value of 0xffff, the OnOffTransitionTime will be used instead. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getOnTransitionTimeAsync() { - return read(attributes.get(ATTR_ONTRANSITIONTIME)); - } - - /** - * Synchronously get the OnTransitionTime attribute [attribute ID 18]. - *

    - * The OnTransitionTime attribute represents the time taken to move the current level from the - * minimum level to the maximum level when an On command is received by an On/Off cluster on - * the same endpoint. It is specified in 10ths of a second. If this command is not implemented, - * or contains a value of 0xffff, the OnOffTransitionTime will be used instead. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getOnTransitionTime(final long refreshPeriod) { - if (attributes.get(ATTR_ONTRANSITIONTIME).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_ONTRANSITIONTIME).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_ONTRANSITIONTIME)); - } - - /** - * Set the OffTransitionTime attribute [attribute ID 19]. - *

    - * The OffTransitionTime attribute represents the time taken to move the current level from the - * maximum level to the minimum level when an Off command is received by an On/Off cluster on - * the same endpoint. It is specified in 10ths of a second. If this command is not implemented, - * or contains a value of 0xffff, the OnOffTransitionTime will be used instead. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param offTransitionTime the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setOffTransitionTime(final Object value) { - return write(attributes.get(ATTR_OFFTRANSITIONTIME), value); - } - - /** - * Get the OffTransitionTime attribute [attribute ID 19]. - *

    - * The OffTransitionTime attribute represents the time taken to move the current level from the - * maximum level to the minimum level when an Off command is received by an On/Off cluster on - * the same endpoint. It is specified in 10ths of a second. If this command is not implemented, - * or contains a value of 0xffff, the OnOffTransitionTime will be used instead. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getOffTransitionTimeAsync() { - return read(attributes.get(ATTR_OFFTRANSITIONTIME)); - } - - /** - * Synchronously get the OffTransitionTime attribute [attribute ID 19]. - *

    - * The OffTransitionTime attribute represents the time taken to move the current level from the - * maximum level to the minimum level when an Off command is received by an On/Off cluster on - * the same endpoint. It is specified in 10ths of a second. If this command is not implemented, - * or contains a value of 0xffff, the OnOffTransitionTime will be used instead. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getOffTransitionTime(final long refreshPeriod) { - if (attributes.get(ATTR_OFFTRANSITIONTIME).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_OFFTRANSITIONTIME).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_OFFTRANSITIONTIME)); - } - - /** - * Set the DefaultMoveRate attribute [attribute ID 20]. - *

    - * The DefaultMoveRate attribute determines the movement rate, in units per second, when a Move - * command is received with a Rate parameter of 0xFF. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param defaultMoveRate the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setDefaultMoveRate(final Object value) { - return write(attributes.get(ATTR_DEFAULTMOVERATE), value); - } - - /** - * Get the DefaultMoveRate attribute [attribute ID 20]. - *

    - * The DefaultMoveRate attribute determines the movement rate, in units per second, when a Move - * command is received with a Rate parameter of 0xFF. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getDefaultMoveRateAsync() { - return read(attributes.get(ATTR_DEFAULTMOVERATE)); - } - - /** - * Synchronously get the DefaultMoveRate attribute [attribute ID 20]. - *

    - * The DefaultMoveRate attribute determines the movement rate, in units per second, when a Move - * command is received with a Rate parameter of 0xFF. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getDefaultMoveRate(final long refreshPeriod) { - if (attributes.get(ATTR_DEFAULTMOVERATE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_DEFAULTMOVERATE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_DEFAULTMOVERATE)); - } - - /** - * The Move to Level Command - *

    - * On receipt of this command, a device SHALL move from its current level to the - * value given in the Level field. The meaning of ‘level’ is device dependent –e.g., - * for a light it MAY mean brightness level.The movement SHALL be as continuous as - * technically practical, i.e., not a step function, and the time taken to move to - * the new level SHALL be equal to the value of the Transition time field, in tenths - * of a second, or as close to this as the device is able.If the Transition time field - * takes the value 0xffff then the time taken to move to the new level SHALL instead - * be determined by the OnOffTransitionTimeattribute. If OnOffTransitionTime, which is - * an optional attribute, is not present, the device SHALL move to its new level as fast - * as it is able. - * - * @param level {@link Integer} Level - * @param transitionTime {@link Integer} Transition time - * @return the {@link Future} command result future - */ - public Future moveToLevelCommand(Integer level, Integer transitionTime) { - MoveToLevelCommand command = new MoveToLevelCommand(); - - // Set the fields - command.setLevel(level); - command.setTransitionTime(transitionTime); - - return send(command); - } - - /** - * The Move Command - * - * @param moveMode {@link Integer} Move mode - * @param rate {@link Integer} Rate - * @return the {@link Future} command result future - */ - public Future moveCommand(Integer moveMode, Integer rate) { - MoveCommand command = new MoveCommand(); - - // Set the fields - command.setMoveMode(moveMode); - command.setRate(rate); - - return send(command); - } - - /** - * The Step Command - * - * @param stepMode {@link Integer} Step mode - * @param stepSize {@link Integer} Step size - * @param transitionTime {@link Integer} Transition time - * @return the {@link Future} command result future - */ - public Future stepCommand(Integer stepMode, Integer stepSize, Integer transitionTime) { - StepCommand command = new StepCommand(); - - // Set the fields - command.setStepMode(stepMode); - command.setStepSize(stepSize); - command.setTransitionTime(transitionTime); - - return send(command); - } - - /** - * The Stop Command - * - * @return the {@link Future} command result future - */ - public Future stopCommand() { - StopCommand command = new StopCommand(); - - return send(command); - } - - /** - * The Move to Level (with On/Off) Command - * - * @param level {@link Integer} Level - * @param transitionTime {@link Integer} Transition time - * @return the {@link Future} command result future - */ - public Future moveToLevelWithOnOffCommand(Integer level, Integer transitionTime) { - MoveToLevelWithOnOffCommand command = new MoveToLevelWithOnOffCommand(); - - // Set the fields - command.setLevel(level); - command.setTransitionTime(transitionTime); - - return send(command); - } - - /** - * The Move (with On/Off) Command - * - * @param moveMode {@link Integer} Move mode - * @param rate {@link Integer} Rate - * @return the {@link Future} command result future - */ - public Future moveWithOnOffCommand(Integer moveMode, Integer rate) { - MoveWithOnOffCommand command = new MoveWithOnOffCommand(); - - // Set the fields - command.setMoveMode(moveMode); - command.setRate(rate); - - return send(command); - } - - /** - * The Step (with On/Off) Command - * - * @param stepMode {@link Integer} Step mode - * @param stepSize {@link Integer} Step size - * @param transitionTime {@link Integer} Transition time - * @return the {@link Future} command result future - */ - public Future stepWithOnOffCommand(Integer stepMode, Integer stepSize, Integer transitionTime) { - StepWithOnOffCommand command = new StepWithOnOffCommand(); - - // Set the fields - command.setStepMode(stepMode); - command.setStepSize(stepSize); - command.setTransitionTime(transitionTime); - - return send(command); - } - - /** - * The Stop 2 Command - * - * @return the {@link Future} command result future - */ - public Future stop2Command() { - Stop2Command command = new Stop2Command(); - - return send(command); - } - - @Override - public ZclCommand getCommandFromId(int commandId) { - switch (commandId) { - case 0: // MOVE_TO_LEVEL_COMMAND - return new MoveToLevelCommand(); - case 1: // MOVE_COMMAND - return new MoveCommand(); - case 2: // STEP_COMMAND - return new StepCommand(); - case 3: // STOP_COMMAND - return new StopCommand(); - case 4: // MOVE_TO_LEVEL__WITH_ON_OFF__COMMAND - return new MoveToLevelWithOnOffCommand(); - case 5: // MOVE__WITH_ON_OFF__COMMAND - return new MoveWithOnOffCommand(); - case 6: // STEP__WITH_ON_OFF__COMMAND - return new StepWithOnOffCommand(); - case 7: // STOP_2_COMMAND - return new Stop2Command(); - default: - return null; - } - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclMessagingCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclMessagingCluster.java deleted file mode 100644 index 1276d2375..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclMessagingCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Messaging cluster implementation (Cluster ID 0x0703). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclMessagingCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0703; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Messaging"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Messaging cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclMessagingCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclMeteringCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclMeteringCluster.java deleted file mode 100644 index 0d42b8c1b..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclMeteringCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Metering cluster implementation (Cluster ID 0x0702). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclMeteringCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0702; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Metering"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Metering cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclMeteringCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclMultistateInputBaCnetExtendedCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclMultistateInputBaCnetExtendedCluster.java deleted file mode 100644 index a48ebc0ce..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclMultistateInputBaCnetExtendedCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Multistate Input (BACnet Extended) cluster implementation (Cluster ID 0x060F). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclMultistateInputBaCnetExtendedCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x060F; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Multistate Input (BACnet Extended)"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Multistate Input (BACnet Extended) cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclMultistateInputBaCnetExtendedCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclMultistateInputBaCnetRegularCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclMultistateInputBaCnetRegularCluster.java deleted file mode 100644 index dd857d170..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclMultistateInputBaCnetRegularCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Multistate Input (BACnet Regular) cluster implementation (Cluster ID 0x060E). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclMultistateInputBaCnetRegularCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x060E; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Multistate Input (BACnet Regular)"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Multistate Input (BACnet Regular) cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclMultistateInputBaCnetRegularCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclMultistateInputBasicCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclMultistateInputBasicCluster.java deleted file mode 100644 index 23637be02..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclMultistateInputBasicCluster.java +++ /dev/null @@ -1,775 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.CommandResult; -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import com.zsmartsystems.zigbee.zcl.protocol.ZclClusterType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Future; -import javax.annotation.Generated; - -/** - * Multistate Input (Basic) cluster implementation (Cluster ID 0x0012). - *

    - * The Multistate Input (Basic) cluster provides an interface for reading the value of a - * multistate measurement and accessing various characteristics of that measurement. The - * cluster is typically used to implement a sensor that measures a physical quantity that - * can take on one of a number of discrete states. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclMultistateInputBasicCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0012; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Multistate Input (Basic)"; - - // Attribute constants - /** - * This attribute, of type Array of Character strings, holds descriptions of all possible - * states of a multistate PresentValue. The number of descriptions matches the number of states - * defined in the NumberOfStates property. The PresentValue, interpreted as an integer, serves as - * an index into the array. If the size of this array is changed, the NumberOfStates property SHALL - * also be changed to the same value. The character set used SHALL be ASCII, and the attribute - * SHALL contain a maximum of 16 characters, which SHALL be printable but are otherwise unrestricted. - */ - public static final int ATTR_STATETEXT = 0x000E; - /** - * The Description attribute, of type Character string, MAY be used to hold a description - * of the usage of the input, output or value, as appropriate to the cluster. The character - * set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, - * which SHALL be printable but are otherwise unrestricted. - */ - public static final int ATTR_DESCRIPTION = 0x001C; - /** - * This attribute, of type Unsigned 16-bit integer, defines the number of states that a multistate - * PresentValue MAY have. The NumberOfStates property SHALL always have a value greater than zero. - * If the value of this property is changed, the size of the StateText array, if present, SHALL also - * be changed to the same value. The states are numbered consecutively, starting with 1. - */ - public static final int ATTR_NUMBEROFSTATES = 0x004A; - /** - * The OutOfService attribute, of type Boolean, indicates whether (TRUE) or not (FALSE) the physical - * input, output or value that the cluster represents is not in service. For an Input cluster, when - * OutOfService is TRUE the PresentValue attribute is decoupled from the physical input and will - * not track changes to the physical input. For an Output cluster, when OutOfService is TRUE the - * PresentValue attribute is decoupled from the physical output, so changes to PresentValue will not - * affect the physical output. For a Value cluster, when OutOfService is TRUE the PresentValue attribute - * MAY be written to freely by software local to the device that the cluster resides on. - */ - public static final int ATTR_OUTOFSERVICE = 0x0051; - /** - * The PresentValue attribute indicates the current value of the input, output or - * value, as appropriate for the cluster. For Analog clusters it is of type single precision, for Binary - * clusters it is of type Boolean, and for multistate clusters it is of type Unsigned 16-bit integer. The - * PresentValue attribute of an input cluster SHALL be writable when OutOfService is TRUE. When the PriorityArray - * attribute is implemented, writing to PresentValue SHALL be equivalent to writing to element 16 of PriorityArray, - * i.e., with a priority of 16. - */ - public static final int ATTR_PRESENTVALUE = 0x0055; - /** - * The Reliability attribute, of type 8-bit enumeration, provides an indication of whether - * the PresentValueor the operation of the physical input, output or value in question (as - * appropriate for the cluster) is “reliable” as far as can be determined and, if not, why - * not. The Reliability attribute MAY have any of the following values: - *

    - * NO-FAULT-DETECTED (0) - * OVER-RANGE (2) - * UNDER-RANGE (3) - * OPEN-LOOP (4) - * SHORTED-LOOP (5) - * UNRELIABLE-OTHER (7) - * PROCESS-ERROR (8) - * MULTI-STATE-FAULT (9) - * CONFIGURATION-ERROR (10) - */ - public static final int ATTR_RELIABILITY = 0x0067; - /** - * This attribute, of type bitmap, represents four Boolean flags that indicate the general “health” - * of the analog sensor. Three of the flags are associated with the values of other optional attributes - * of this cluster. A more detailed status could be determined by reading the optional attributes (if - * supported) that are linked to these flags. The relationship between individual flags is not defined. - *

    - * The four flags are Bit 0 = IN_ALARM, Bit 1 = FAULT, Bit 2 = OVERRIDDEN, Bit 3 = OUT OF SERVICE - *

    - * where: - *

    - * IN_ALARM -Logical FALSE (0) if the EventStateattribute has a value of NORMAL, otherwise logical TRUE (1). - * This bit is always 0 unless the cluster implementing the EventState attribute is implemented on the same - * endpoint. - *

    - * FAULT -Logical TRUE (1) if the Reliability attribute is present and does not have a value of NO FAULT DETECTED, - * otherwise logical FALSE (0). - *

    - * OVERRIDDEN -Logical TRUE (1) if the cluster has been overridden by some mechanism local to the device. - * Otherwise, the value is logical FALSE (0). In this context, for an input cluster, “overridden” is taken - * to mean that the PresentValue and Reliability(optional) attributes are no longer tracking changes to the - * physical input. For an Output cluster, “overridden” is taken to mean that the physical output is no longer - * tracking changes to the PresentValue attribute and the Reliability attribute is no longer a reflection of - * the physical output. For a Value cluster, “overridden” is taken to mean that the PresentValue attribute is - * not writeable. - *

    - * OUT OF SERVICE -Logical TRUE (1) if the OutOfService attribute has a value of TRUE, otherwise - * logical FALSE (0). - */ - public static final int ATTR_STATUSFLAGS = 0x006F; - /** - * The ApplicationType attribute is an unsigned 32 bit integer that indicates the specific - * application usage for this cluster. (Note: This attribute has no BACnet equivalent). - * ApplicationType is subdivided into Group, Type and an Index number, as follows. - *

    - * Group = Bits 24-31 An indication of the cluster this attribute is part of. - *

    - * Type = Bits 16-23 For Analog clusters, the physical quantity that the Present Value attribute - * of the cluster represents. For Binary and Multistate clusters, the application usage domain. - *

    - * Index = Bits 0-15The specific application usage of the cluster. - */ - public static final int ATTR_APPLICATIONTYPE = 0x0100; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(8); - - attributeMap.put(ATTR_STATETEXT, new ZclAttribute(ZclClusterType.MULTISTATE_INPUT__BASIC, ATTR_STATETEXT, "StateText", ZclDataType.CHARACTER_STRING, false, true, true, false)); - attributeMap.put(ATTR_DESCRIPTION, new ZclAttribute(ZclClusterType.MULTISTATE_INPUT__BASIC, ATTR_DESCRIPTION, "Description", ZclDataType.CHARACTER_STRING, false, true, true, false)); - attributeMap.put(ATTR_NUMBEROFSTATES, new ZclAttribute(ZclClusterType.MULTISTATE_INPUT__BASIC, ATTR_NUMBEROFSTATES, "NumberOfStates", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, true, false)); - attributeMap.put(ATTR_OUTOFSERVICE, new ZclAttribute(ZclClusterType.MULTISTATE_INPUT__BASIC, ATTR_OUTOFSERVICE, "OutOfService", ZclDataType.BOOLEAN, true, true, true, false)); - attributeMap.put(ATTR_PRESENTVALUE, new ZclAttribute(ZclClusterType.MULTISTATE_INPUT__BASIC, ATTR_PRESENTVALUE, "PresentValue", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, true, false)); - attributeMap.put(ATTR_RELIABILITY, new ZclAttribute(ZclClusterType.MULTISTATE_INPUT__BASIC, ATTR_RELIABILITY, "Reliability", ZclDataType.ENUMERATION_8_BIT, false, true, true, false)); - attributeMap.put(ATTR_STATUSFLAGS, new ZclAttribute(ZclClusterType.MULTISTATE_INPUT__BASIC, ATTR_STATUSFLAGS, "StatusFlags", ZclDataType.BITMAP_8_BIT, true, true, false, false)); - attributeMap.put(ATTR_APPLICATIONTYPE, new ZclAttribute(ZclClusterType.MULTISTATE_INPUT__BASIC, ATTR_APPLICATIONTYPE, "ApplicationType", ZclDataType.SIGNED_32_BIT_INTEGER, false, true, false, false)); - - return attributeMap; - } - - /** - * Default constructor to create a Multistate Input (Basic) cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclMultistateInputBasicCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } - - /** - * Set the StateText attribute [attribute ID 14]. - *

    - * This attribute, of type Array of Character strings, holds descriptions of all possible - * states of a multistate PresentValue. The number of descriptions matches the number of states - * defined in the NumberOfStates property. The PresentValue, interpreted as an integer, serves as - * an index into the array. If the size of this array is changed, the NumberOfStates property SHALL - * also be changed to the same value. The character set used SHALL be ASCII, and the attribute - * SHALL contain a maximum of 16 characters, which SHALL be printable but are otherwise unrestricted. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param stateText the {@link String} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setStateText(final Object value) { - return write(attributes.get(ATTR_STATETEXT), value); - } - - /** - * Get the StateText attribute [attribute ID 14]. - *

    - * This attribute, of type Array of Character strings, holds descriptions of all possible - * states of a multistate PresentValue. The number of descriptions matches the number of states - * defined in the NumberOfStates property. The PresentValue, interpreted as an integer, serves as - * an index into the array. If the size of this array is changed, the NumberOfStates property SHALL - * also be changed to the same value. The character set used SHALL be ASCII, and the attribute - * SHALL contain a maximum of 16 characters, which SHALL be printable but are otherwise unrestricted. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getStateTextAsync() { - return read(attributes.get(ATTR_STATETEXT)); - } - - /** - * Synchronously get the StateText attribute [attribute ID 14]. - *

    - * This attribute, of type Array of Character strings, holds descriptions of all possible - * states of a multistate PresentValue. The number of descriptions matches the number of states - * defined in the NumberOfStates property. The PresentValue, interpreted as an integer, serves as - * an index into the array. If the size of this array is changed, the NumberOfStates property SHALL - * also be changed to the same value. The character set used SHALL be ASCII, and the attribute - * SHALL contain a maximum of 16 characters, which SHALL be printable but are otherwise unrestricted. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link String} attribute value, or null on error - */ - public String getStateText(final long refreshPeriod) { - if (attributes.get(ATTR_STATETEXT).isLastValueCurrent(refreshPeriod)) { - return (String) attributes.get(ATTR_STATETEXT).getLastValue(); - } - - return (String) readSync(attributes.get(ATTR_STATETEXT)); - } - - /** - * Set the Description attribute [attribute ID 28]. - *

    - * The Description attribute, of type Character string, MAY be used to hold a description - * of the usage of the input, output or value, as appropriate to the cluster. The character - * set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, - * which SHALL be printable but are otherwise unrestricted. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param description the {@link String} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setDescription(final Object value) { - return write(attributes.get(ATTR_DESCRIPTION), value); - } - - /** - * Get the Description attribute [attribute ID 28]. - *

    - * The Description attribute, of type Character string, MAY be used to hold a description - * of the usage of the input, output or value, as appropriate to the cluster. The character - * set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, - * which SHALL be printable but are otherwise unrestricted. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getDescriptionAsync() { - return read(attributes.get(ATTR_DESCRIPTION)); - } - - /** - * Synchronously get the Description attribute [attribute ID 28]. - *

    - * The Description attribute, of type Character string, MAY be used to hold a description - * of the usage of the input, output or value, as appropriate to the cluster. The character - * set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, - * which SHALL be printable but are otherwise unrestricted. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link String} attribute value, or null on error - */ - public String getDescription(final long refreshPeriod) { - if (attributes.get(ATTR_DESCRIPTION).isLastValueCurrent(refreshPeriod)) { - return (String) attributes.get(ATTR_DESCRIPTION).getLastValue(); - } - - return (String) readSync(attributes.get(ATTR_DESCRIPTION)); - } - - /** - * Set the NumberOfStates attribute [attribute ID 74]. - *

    - * This attribute, of type Unsigned 16-bit integer, defines the number of states that a multistate - * PresentValue MAY have. The NumberOfStates property SHALL always have a value greater than zero. - * If the value of this property is changed, the size of the StateText array, if present, SHALL also - * be changed to the same value. The states are numbered consecutively, starting with 1. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param numberOfStates the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setNumberOfStates(final Object value) { - return write(attributes.get(ATTR_NUMBEROFSTATES), value); - } - - /** - * Get the NumberOfStates attribute [attribute ID 74]. - *

    - * This attribute, of type Unsigned 16-bit integer, defines the number of states that a multistate - * PresentValue MAY have. The NumberOfStates property SHALL always have a value greater than zero. - * If the value of this property is changed, the size of the StateText array, if present, SHALL also - * be changed to the same value. The states are numbered consecutively, starting with 1. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getNumberOfStatesAsync() { - return read(attributes.get(ATTR_NUMBEROFSTATES)); - } - - /** - * Synchronously get the NumberOfStates attribute [attribute ID 74]. - *

    - * This attribute, of type Unsigned 16-bit integer, defines the number of states that a multistate - * PresentValue MAY have. The NumberOfStates property SHALL always have a value greater than zero. - * If the value of this property is changed, the size of the StateText array, if present, SHALL also - * be changed to the same value. The states are numbered consecutively, starting with 1. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getNumberOfStates(final long refreshPeriod) { - if (attributes.get(ATTR_NUMBEROFSTATES).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_NUMBEROFSTATES).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_NUMBEROFSTATES)); - } - - /** - * Set the OutOfService attribute [attribute ID 81]. - *

    - * The OutOfService attribute, of type Boolean, indicates whether (TRUE) or not (FALSE) the physical - * input, output or value that the cluster represents is not in service. For an Input cluster, when - * OutOfService is TRUE the PresentValue attribute is decoupled from the physical input and will - * not track changes to the physical input. For an Output cluster, when OutOfService is TRUE the - * PresentValue attribute is decoupled from the physical output, so changes to PresentValue will not - * affect the physical output. For a Value cluster, when OutOfService is TRUE the PresentValue attribute - * MAY be written to freely by software local to the device that the cluster resides on. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param outOfService the {@link Boolean} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setOutOfService(final Object value) { - return write(attributes.get(ATTR_OUTOFSERVICE), value); - } - - /** - * Get the OutOfService attribute [attribute ID 81]. - *

    - * The OutOfService attribute, of type Boolean, indicates whether (TRUE) or not (FALSE) the physical - * input, output or value that the cluster represents is not in service. For an Input cluster, when - * OutOfService is TRUE the PresentValue attribute is decoupled from the physical input and will - * not track changes to the physical input. For an Output cluster, when OutOfService is TRUE the - * PresentValue attribute is decoupled from the physical output, so changes to PresentValue will not - * affect the physical output. For a Value cluster, when OutOfService is TRUE the PresentValue attribute - * MAY be written to freely by software local to the device that the cluster resides on. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getOutOfServiceAsync() { - return read(attributes.get(ATTR_OUTOFSERVICE)); - } - - /** - * Synchronously get the OutOfService attribute [attribute ID 81]. - *

    - * The OutOfService attribute, of type Boolean, indicates whether (TRUE) or not (FALSE) the physical - * input, output or value that the cluster represents is not in service. For an Input cluster, when - * OutOfService is TRUE the PresentValue attribute is decoupled from the physical input and will - * not track changes to the physical input. For an Output cluster, when OutOfService is TRUE the - * PresentValue attribute is decoupled from the physical output, so changes to PresentValue will not - * affect the physical output. For a Value cluster, when OutOfService is TRUE the PresentValue attribute - * MAY be written to freely by software local to the device that the cluster resides on. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Boolean} attribute value, or null on error - */ - public Boolean getOutOfService(final long refreshPeriod) { - if (attributes.get(ATTR_OUTOFSERVICE).isLastValueCurrent(refreshPeriod)) { - return (Boolean) attributes.get(ATTR_OUTOFSERVICE).getLastValue(); - } - - return (Boolean) readSync(attributes.get(ATTR_OUTOFSERVICE)); - } - - /** - * Set the PresentValue attribute [attribute ID 85]. - *

    - * The PresentValue attribute indicates the current value of the input, output or - * value, as appropriate for the cluster. For Analog clusters it is of type single precision, for Binary - * clusters it is of type Boolean, and for multistate clusters it is of type Unsigned 16-bit integer. The - * PresentValue attribute of an input cluster SHALL be writable when OutOfService is TRUE. When the PriorityArray - * attribute is implemented, writing to PresentValue SHALL be equivalent to writing to element 16 of PriorityArray, - * i.e., with a priority of 16. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param presentValue the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setPresentValue(final Object value) { - return write(attributes.get(ATTR_PRESENTVALUE), value); - } - - /** - * Get the PresentValue attribute [attribute ID 85]. - *

    - * The PresentValue attribute indicates the current value of the input, output or - * value, as appropriate for the cluster. For Analog clusters it is of type single precision, for Binary - * clusters it is of type Boolean, and for multistate clusters it is of type Unsigned 16-bit integer. The - * PresentValue attribute of an input cluster SHALL be writable when OutOfService is TRUE. When the PriorityArray - * attribute is implemented, writing to PresentValue SHALL be equivalent to writing to element 16 of PriorityArray, - * i.e., with a priority of 16. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getPresentValueAsync() { - return read(attributes.get(ATTR_PRESENTVALUE)); - } - - /** - * Synchronously get the PresentValue attribute [attribute ID 85]. - *

    - * The PresentValue attribute indicates the current value of the input, output or - * value, as appropriate for the cluster. For Analog clusters it is of type single precision, for Binary - * clusters it is of type Boolean, and for multistate clusters it is of type Unsigned 16-bit integer. The - * PresentValue attribute of an input cluster SHALL be writable when OutOfService is TRUE. When the PriorityArray - * attribute is implemented, writing to PresentValue SHALL be equivalent to writing to element 16 of PriorityArray, - * i.e., with a priority of 16. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getPresentValue(final long refreshPeriod) { - if (attributes.get(ATTR_PRESENTVALUE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_PRESENTVALUE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_PRESENTVALUE)); - } - - /** - * Set the Reliability attribute [attribute ID 103]. - *

    - * The Reliability attribute, of type 8-bit enumeration, provides an indication of whether - * the PresentValueor the operation of the physical input, output or value in question (as - * appropriate for the cluster) is “reliable” as far as can be determined and, if not, why - * not. The Reliability attribute MAY have any of the following values: - *

    - * NO-FAULT-DETECTED (0) - * OVER-RANGE (2) - * UNDER-RANGE (3) - * OPEN-LOOP (4) - * SHORTED-LOOP (5) - * UNRELIABLE-OTHER (7) - * PROCESS-ERROR (8) - * MULTI-STATE-FAULT (9) - * CONFIGURATION-ERROR (10) - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param reliability the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setReliability(final Object value) { - return write(attributes.get(ATTR_RELIABILITY), value); - } - - /** - * Get the Reliability attribute [attribute ID 103]. - *

    - * The Reliability attribute, of type 8-bit enumeration, provides an indication of whether - * the PresentValueor the operation of the physical input, output or value in question (as - * appropriate for the cluster) is “reliable” as far as can be determined and, if not, why - * not. The Reliability attribute MAY have any of the following values: - *

    - * NO-FAULT-DETECTED (0) - * OVER-RANGE (2) - * UNDER-RANGE (3) - * OPEN-LOOP (4) - * SHORTED-LOOP (5) - * UNRELIABLE-OTHER (7) - * PROCESS-ERROR (8) - * MULTI-STATE-FAULT (9) - * CONFIGURATION-ERROR (10) - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getReliabilityAsync() { - return read(attributes.get(ATTR_RELIABILITY)); - } - - /** - * Synchronously get the Reliability attribute [attribute ID 103]. - *

    - * The Reliability attribute, of type 8-bit enumeration, provides an indication of whether - * the PresentValueor the operation of the physical input, output or value in question (as - * appropriate for the cluster) is “reliable” as far as can be determined and, if not, why - * not. The Reliability attribute MAY have any of the following values: - *

    - * NO-FAULT-DETECTED (0) - * OVER-RANGE (2) - * UNDER-RANGE (3) - * OPEN-LOOP (4) - * SHORTED-LOOP (5) - * UNRELIABLE-OTHER (7) - * PROCESS-ERROR (8) - * MULTI-STATE-FAULT (9) - * CONFIGURATION-ERROR (10) - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getReliability(final long refreshPeriod) { - if (attributes.get(ATTR_RELIABILITY).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_RELIABILITY).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_RELIABILITY)); - } - - /** - * Get the StatusFlags attribute [attribute ID 111]. - *

    - * This attribute, of type bitmap, represents four Boolean flags that indicate the general “health” - * of the analog sensor. Three of the flags are associated with the values of other optional attributes - * of this cluster. A more detailed status could be determined by reading the optional attributes (if - * supported) that are linked to these flags. The relationship between individual flags is not defined. - *

    - * The four flags are Bit 0 = IN_ALARM, Bit 1 = FAULT, Bit 2 = OVERRIDDEN, Bit 3 = OUT OF SERVICE - *

    - * where: - *

    - * IN_ALARM -Logical FALSE (0) if the EventStateattribute has a value of NORMAL, otherwise logical TRUE (1). - * This bit is always 0 unless the cluster implementing the EventState attribute is implemented on the same - * endpoint. - *

    - * FAULT -Logical TRUE (1) if the Reliability attribute is present and does not have a value of NO FAULT DETECTED, - * otherwise logical FALSE (0). - *

    - * OVERRIDDEN -Logical TRUE (1) if the cluster has been overridden by some mechanism local to the device. - * Otherwise, the value is logical FALSE (0). In this context, for an input cluster, “overridden” is taken - * to mean that the PresentValue and Reliability(optional) attributes are no longer tracking changes to the - * physical input. For an Output cluster, “overridden” is taken to mean that the physical output is no longer - * tracking changes to the PresentValue attribute and the Reliability attribute is no longer a reflection of - * the physical output. For a Value cluster, “overridden” is taken to mean that the PresentValue attribute is - * not writeable. - *

    - * OUT OF SERVICE -Logical TRUE (1) if the OutOfService attribute has a value of TRUE, otherwise - * logical FALSE (0). - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getStatusFlagsAsync() { - return read(attributes.get(ATTR_STATUSFLAGS)); - } - - /** - * Synchronously get the StatusFlags attribute [attribute ID 111]. - *

    - * This attribute, of type bitmap, represents four Boolean flags that indicate the general “health” - * of the analog sensor. Three of the flags are associated with the values of other optional attributes - * of this cluster. A more detailed status could be determined by reading the optional attributes (if - * supported) that are linked to these flags. The relationship between individual flags is not defined. - *

    - * The four flags are Bit 0 = IN_ALARM, Bit 1 = FAULT, Bit 2 = OVERRIDDEN, Bit 3 = OUT OF SERVICE - *

    - * where: - *

    - * IN_ALARM -Logical FALSE (0) if the EventStateattribute has a value of NORMAL, otherwise logical TRUE (1). - * This bit is always 0 unless the cluster implementing the EventState attribute is implemented on the same - * endpoint. - *

    - * FAULT -Logical TRUE (1) if the Reliability attribute is present and does not have a value of NO FAULT DETECTED, - * otherwise logical FALSE (0). - *

    - * OVERRIDDEN -Logical TRUE (1) if the cluster has been overridden by some mechanism local to the device. - * Otherwise, the value is logical FALSE (0). In this context, for an input cluster, “overridden” is taken - * to mean that the PresentValue and Reliability(optional) attributes are no longer tracking changes to the - * physical input. For an Output cluster, “overridden” is taken to mean that the physical output is no longer - * tracking changes to the PresentValue attribute and the Reliability attribute is no longer a reflection of - * the physical output. For a Value cluster, “overridden” is taken to mean that the PresentValue attribute is - * not writeable. - *

    - * OUT OF SERVICE -Logical TRUE (1) if the OutOfService attribute has a value of TRUE, otherwise - * logical FALSE (0). - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getStatusFlags(final long refreshPeriod) { - if (attributes.get(ATTR_STATUSFLAGS).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_STATUSFLAGS).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_STATUSFLAGS)); - } - - /** - * Get the ApplicationType attribute [attribute ID 256]. - *

    - * The ApplicationType attribute is an unsigned 32 bit integer that indicates the specific - * application usage for this cluster. (Note: This attribute has no BACnet equivalent). - * ApplicationType is subdivided into Group, Type and an Index number, as follows. - *

    - * Group = Bits 24-31 An indication of the cluster this attribute is part of. - *

    - * Type = Bits 16-23 For Analog clusters, the physical quantity that the Present Value attribute - * of the cluster represents. For Binary and Multistate clusters, the application usage domain. - *

    - * Index = Bits 0-15The specific application usage of the cluster. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getApplicationTypeAsync() { - return read(attributes.get(ATTR_APPLICATIONTYPE)); - } - - /** - * Synchronously get the ApplicationType attribute [attribute ID 256]. - *

    - * The ApplicationType attribute is an unsigned 32 bit integer that indicates the specific - * application usage for this cluster. (Note: This attribute has no BACnet equivalent). - * ApplicationType is subdivided into Group, Type and an Index number, as follows. - *

    - * Group = Bits 24-31 An indication of the cluster this attribute is part of. - *

    - * Type = Bits 16-23 For Analog clusters, the physical quantity that the Present Value attribute - * of the cluster represents. For Binary and Multistate clusters, the application usage domain. - *

    - * Index = Bits 0-15The specific application usage of the cluster. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getApplicationType(final long refreshPeriod) { - if (attributes.get(ATTR_APPLICATIONTYPE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_APPLICATIONTYPE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_APPLICATIONTYPE)); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclMultistateOutputBaCnetExtendedCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclMultistateOutputBaCnetExtendedCluster.java deleted file mode 100644 index 933f7961b..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclMultistateOutputBaCnetExtendedCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Multistate Output (BACnet Extended) cluster implementation (Cluster ID 0x0611). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclMultistateOutputBaCnetExtendedCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0611; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Multistate Output (BACnet Extended)"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Multistate Output (BACnet Extended) cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclMultistateOutputBaCnetExtendedCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclMultistateOutputBaCnetRegularCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclMultistateOutputBaCnetRegularCluster.java deleted file mode 100644 index 7896130dd..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclMultistateOutputBaCnetRegularCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Multistate Output (BACnet Regular) cluster implementation (Cluster ID 0x0610). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclMultistateOutputBaCnetRegularCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0610; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Multistate Output (BACnet Regular)"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Multistate Output (BACnet Regular) cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclMultistateOutputBaCnetRegularCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclMultistateOutputBasicCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclMultistateOutputBasicCluster.java deleted file mode 100644 index c89504adf..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclMultistateOutputBasicCluster.java +++ /dev/null @@ -1,840 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.CommandResult; -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import com.zsmartsystems.zigbee.zcl.protocol.ZclClusterType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Future; -import javax.annotation.Generated; - -/** - * Multistate Output (Basic) cluster implementation (Cluster ID 0x0013). - *

    - * The Multistate Output (Basic) cluster provides an interface for setting the value of an output - * that can take one of a number of discrete values, and accessing characteristics of that value. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclMultistateOutputBasicCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0013; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Multistate Output (Basic)"; - - // Attribute constants - /** - * This attribute, of type Array of Character strings, holds descriptions of all possible - * states of a multistate PresentValue. The number of descriptions matches the number of states - * defined in the NumberOfStates property. The PresentValue, interpreted as an integer, serves as - * an index into the array. If the size of this array is changed, the NumberOfStates property SHALL - * also be changed to the same value. The character set used SHALL be ASCII, and the attribute - * SHALL contain a maximum of 16 characters, which SHALL be printable but are otherwise unrestricted. - */ - public static final int ATTR_STATETEXT = 0x000E; - /** - * The Description attribute, of type Character string, MAY be used to hold a description - * of the usage of the input, output or value, as appropriate to the cluster. The character - * set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, - * which SHALL be printable but are otherwise unrestricted. - */ - public static final int ATTR_DESCRIPTION = 0x001C; - /** - * This attribute, of type Unsigned 16-bit integer, defines the number of states that a multistate - * PresentValue MAY have. The NumberOfStates property SHALL always have a value greater than zero. - * If the value of this property is changed, the size of the StateText array, if present, SHALL also - * be changed to the same value. The states are numbered consecutively, starting with 1. - */ - public static final int ATTR_NUMBEROFSTATES = 0x004A; - /** - * The OutOfService attribute, of type Boolean, indicates whether (TRUE) or not (FALSE) the physical - * input, output or value that the cluster represents is not in service. For an Input cluster, when - * OutOfService is TRUE the PresentValue attribute is decoupled from the physical input and will - * not track changes to the physical input. For an Output cluster, when OutOfService is TRUE the - * PresentValue attribute is decoupled from the physical output, so changes to PresentValue will not - * affect the physical output. For a Value cluster, when OutOfService is TRUE the PresentValue attribute - * MAY be written to freely by software local to the device that the cluster resides on. - */ - public static final int ATTR_OUTOFSERVICE = 0x0051; - /** - * The PresentValue attribute indicates the current value of the input, output or - * value, as appropriate for the cluster. For Analog clusters it is of type single precision, for Binary - * clusters it is of type Boolean, and for multistate clusters it is of type Unsigned 16-bit integer. The - * PresentValue attribute of an input cluster SHALL be writable when OutOfService is TRUE. When the PriorityArray - * attribute is implemented, writing to PresentValue SHALL be equivalent to writing to element 16 of PriorityArray, - * i.e., with a priority of 16. - */ - public static final int ATTR_PRESENTVALUE = 0x0055; - /** - * The Reliability attribute, of type 8-bit enumeration, provides an indication of whether - * the PresentValueor the operation of the physical input, output or value in question (as - * appropriate for the cluster) is “reliable” as far as can be determined and, if not, why - * not. The Reliability attribute MAY have any of the following values: - *

    - * NO-FAULT-DETECTED (0) - * OVER-RANGE (2) - * UNDER-RANGE (3) - * OPEN-LOOP (4) - * SHORTED-LOOP (5) - * UNRELIABLE-OTHER (7) - * PROCESS-ERROR (8) - * MULTI-STATE-FAULT (9) - * CONFIGURATION-ERROR (10) - */ - public static final int ATTR_RELIABILITY = 0x0067; - /** - * The RelinquishDefault attribute is the default value to be used for the PresentValue - * attribute when all elements of the PriorityArray attribute are marked as invalid. - */ - public static final int ATTR_RELINQUISHDEFAULT = 0x0068; - /** - * This attribute, of type bitmap, represents four Boolean flags that indicate the general “health” - * of the analog sensor. Three of the flags are associated with the values of other optional attributes - * of this cluster. A more detailed status could be determined by reading the optional attributes (if - * supported) that are linked to these flags. The relationship between individual flags is not defined. - *

    - * The four flags are Bit 0 = IN_ALARM, Bit 1 = FAULT, Bit 2 = OVERRIDDEN, Bit 3 = OUT OF SERVICE - *

    - * where: - *

    - * IN_ALARM -Logical FALSE (0) if the EventStateattribute has a value of NORMAL, otherwise logical TRUE (1). - * This bit is always 0 unless the cluster implementing the EventState attribute is implemented on the same - * endpoint. - *

    - * FAULT -Logical TRUE (1) if the Reliability attribute is present and does not have a value of NO FAULT DETECTED, - * otherwise logical FALSE (0). - *

    - * OVERRIDDEN -Logical TRUE (1) if the cluster has been overridden by some mechanism local to the device. - * Otherwise, the value is logical FALSE (0). In this context, for an input cluster, “overridden” is taken - * to mean that the PresentValue and Reliability(optional) attributes are no longer tracking changes to the - * physical input. For an Output cluster, “overridden” is taken to mean that the physical output is no longer - * tracking changes to the PresentValue attribute and the Reliability attribute is no longer a reflection of - * the physical output. For a Value cluster, “overridden” is taken to mean that the PresentValue attribute is - * not writeable. - *

    - * OUT OF SERVICE -Logical TRUE (1) if the OutOfService attribute has a value of TRUE, otherwise - * logical FALSE (0). - */ - public static final int ATTR_STATUSFLAGS = 0x006F; - /** - * The ApplicationType attribute is an unsigned 32 bit integer that indicates the specific - * application usage for this cluster. (Note: This attribute has no BACnet equivalent). - * ApplicationType is subdivided into Group, Type and an Index number, as follows. - *

    - * Group = Bits 24 -31 An indication of the cluster this attribute is part of. - *

    - * Type = Bits 16 -23 For Analog clusters, the physical quantity that the Present Value attribute - * of the cluster represents. For Binary and Multistate clusters, the application usage domain. - *

    - * Index = Bits 0 -15 The specific application usage of the cluster. - */ - public static final int ATTR_APPLICATIONTYPE = 0x0100; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(9); - - attributeMap.put(ATTR_STATETEXT, new ZclAttribute(ZclClusterType.MULTISTATE_OUTPUT__BASIC, ATTR_STATETEXT, "StateText", ZclDataType.CHARACTER_STRING, false, true, true, false)); - attributeMap.put(ATTR_DESCRIPTION, new ZclAttribute(ZclClusterType.MULTISTATE_OUTPUT__BASIC, ATTR_DESCRIPTION, "Description", ZclDataType.CHARACTER_STRING, false, true, true, false)); - attributeMap.put(ATTR_NUMBEROFSTATES, new ZclAttribute(ZclClusterType.MULTISTATE_OUTPUT__BASIC, ATTR_NUMBEROFSTATES, "NumberOfStates", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, true, false)); - attributeMap.put(ATTR_OUTOFSERVICE, new ZclAttribute(ZclClusterType.MULTISTATE_OUTPUT__BASIC, ATTR_OUTOFSERVICE, "OutOfService", ZclDataType.BOOLEAN, true, true, true, false)); - attributeMap.put(ATTR_PRESENTVALUE, new ZclAttribute(ZclClusterType.MULTISTATE_OUTPUT__BASIC, ATTR_PRESENTVALUE, "PresentValue", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, true, false)); - attributeMap.put(ATTR_RELIABILITY, new ZclAttribute(ZclClusterType.MULTISTATE_OUTPUT__BASIC, ATTR_RELIABILITY, "Reliability", ZclDataType.ENUMERATION_8_BIT, false, true, true, false)); - attributeMap.put(ATTR_RELINQUISHDEFAULT, new ZclAttribute(ZclClusterType.MULTISTATE_OUTPUT__BASIC, ATTR_RELINQUISHDEFAULT, "RelinquishDefault", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, true, false)); - attributeMap.put(ATTR_STATUSFLAGS, new ZclAttribute(ZclClusterType.MULTISTATE_OUTPUT__BASIC, ATTR_STATUSFLAGS, "StatusFlags", ZclDataType.BITMAP_8_BIT, true, true, false, false)); - attributeMap.put(ATTR_APPLICATIONTYPE, new ZclAttribute(ZclClusterType.MULTISTATE_OUTPUT__BASIC, ATTR_APPLICATIONTYPE, "ApplicationType", ZclDataType.SIGNED_32_BIT_INTEGER, false, true, false, false)); - - return attributeMap; - } - - /** - * Default constructor to create a Multistate Output (Basic) cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclMultistateOutputBasicCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } - - /** - * Set the StateText attribute [attribute ID 14]. - *

    - * This attribute, of type Array of Character strings, holds descriptions of all possible - * states of a multistate PresentValue. The number of descriptions matches the number of states - * defined in the NumberOfStates property. The PresentValue, interpreted as an integer, serves as - * an index into the array. If the size of this array is changed, the NumberOfStates property SHALL - * also be changed to the same value. The character set used SHALL be ASCII, and the attribute - * SHALL contain a maximum of 16 characters, which SHALL be printable but are otherwise unrestricted. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param stateText the {@link String} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setStateText(final Object value) { - return write(attributes.get(ATTR_STATETEXT), value); - } - - /** - * Get the StateText attribute [attribute ID 14]. - *

    - * This attribute, of type Array of Character strings, holds descriptions of all possible - * states of a multistate PresentValue. The number of descriptions matches the number of states - * defined in the NumberOfStates property. The PresentValue, interpreted as an integer, serves as - * an index into the array. If the size of this array is changed, the NumberOfStates property SHALL - * also be changed to the same value. The character set used SHALL be ASCII, and the attribute - * SHALL contain a maximum of 16 characters, which SHALL be printable but are otherwise unrestricted. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getStateTextAsync() { - return read(attributes.get(ATTR_STATETEXT)); - } - - /** - * Synchronously get the StateText attribute [attribute ID 14]. - *

    - * This attribute, of type Array of Character strings, holds descriptions of all possible - * states of a multistate PresentValue. The number of descriptions matches the number of states - * defined in the NumberOfStates property. The PresentValue, interpreted as an integer, serves as - * an index into the array. If the size of this array is changed, the NumberOfStates property SHALL - * also be changed to the same value. The character set used SHALL be ASCII, and the attribute - * SHALL contain a maximum of 16 characters, which SHALL be printable but are otherwise unrestricted. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link String} attribute value, or null on error - */ - public String getStateText(final long refreshPeriod) { - if (attributes.get(ATTR_STATETEXT).isLastValueCurrent(refreshPeriod)) { - return (String) attributes.get(ATTR_STATETEXT).getLastValue(); - } - - return (String) readSync(attributes.get(ATTR_STATETEXT)); - } - - /** - * Set the Description attribute [attribute ID 28]. - *

    - * The Description attribute, of type Character string, MAY be used to hold a description - * of the usage of the input, output or value, as appropriate to the cluster. The character - * set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, - * which SHALL be printable but are otherwise unrestricted. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param description the {@link String} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setDescription(final Object value) { - return write(attributes.get(ATTR_DESCRIPTION), value); - } - - /** - * Get the Description attribute [attribute ID 28]. - *

    - * The Description attribute, of type Character string, MAY be used to hold a description - * of the usage of the input, output or value, as appropriate to the cluster. The character - * set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, - * which SHALL be printable but are otherwise unrestricted. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getDescriptionAsync() { - return read(attributes.get(ATTR_DESCRIPTION)); - } - - /** - * Synchronously get the Description attribute [attribute ID 28]. - *

    - * The Description attribute, of type Character string, MAY be used to hold a description - * of the usage of the input, output or value, as appropriate to the cluster. The character - * set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, - * which SHALL be printable but are otherwise unrestricted. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link String} attribute value, or null on error - */ - public String getDescription(final long refreshPeriod) { - if (attributes.get(ATTR_DESCRIPTION).isLastValueCurrent(refreshPeriod)) { - return (String) attributes.get(ATTR_DESCRIPTION).getLastValue(); - } - - return (String) readSync(attributes.get(ATTR_DESCRIPTION)); - } - - /** - * Set the NumberOfStates attribute [attribute ID 74]. - *

    - * This attribute, of type Unsigned 16-bit integer, defines the number of states that a multistate - * PresentValue MAY have. The NumberOfStates property SHALL always have a value greater than zero. - * If the value of this property is changed, the size of the StateText array, if present, SHALL also - * be changed to the same value. The states are numbered consecutively, starting with 1. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param numberOfStates the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setNumberOfStates(final Object value) { - return write(attributes.get(ATTR_NUMBEROFSTATES), value); - } - - /** - * Get the NumberOfStates attribute [attribute ID 74]. - *

    - * This attribute, of type Unsigned 16-bit integer, defines the number of states that a multistate - * PresentValue MAY have. The NumberOfStates property SHALL always have a value greater than zero. - * If the value of this property is changed, the size of the StateText array, if present, SHALL also - * be changed to the same value. The states are numbered consecutively, starting with 1. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getNumberOfStatesAsync() { - return read(attributes.get(ATTR_NUMBEROFSTATES)); - } - - /** - * Synchronously get the NumberOfStates attribute [attribute ID 74]. - *

    - * This attribute, of type Unsigned 16-bit integer, defines the number of states that a multistate - * PresentValue MAY have. The NumberOfStates property SHALL always have a value greater than zero. - * If the value of this property is changed, the size of the StateText array, if present, SHALL also - * be changed to the same value. The states are numbered consecutively, starting with 1. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getNumberOfStates(final long refreshPeriod) { - if (attributes.get(ATTR_NUMBEROFSTATES).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_NUMBEROFSTATES).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_NUMBEROFSTATES)); - } - - /** - * Set the OutOfService attribute [attribute ID 81]. - *

    - * The OutOfService attribute, of type Boolean, indicates whether (TRUE) or not (FALSE) the physical - * input, output or value that the cluster represents is not in service. For an Input cluster, when - * OutOfService is TRUE the PresentValue attribute is decoupled from the physical input and will - * not track changes to the physical input. For an Output cluster, when OutOfService is TRUE the - * PresentValue attribute is decoupled from the physical output, so changes to PresentValue will not - * affect the physical output. For a Value cluster, when OutOfService is TRUE the PresentValue attribute - * MAY be written to freely by software local to the device that the cluster resides on. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param outOfService the {@link Boolean} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setOutOfService(final Object value) { - return write(attributes.get(ATTR_OUTOFSERVICE), value); - } - - /** - * Get the OutOfService attribute [attribute ID 81]. - *

    - * The OutOfService attribute, of type Boolean, indicates whether (TRUE) or not (FALSE) the physical - * input, output or value that the cluster represents is not in service. For an Input cluster, when - * OutOfService is TRUE the PresentValue attribute is decoupled from the physical input and will - * not track changes to the physical input. For an Output cluster, when OutOfService is TRUE the - * PresentValue attribute is decoupled from the physical output, so changes to PresentValue will not - * affect the physical output. For a Value cluster, when OutOfService is TRUE the PresentValue attribute - * MAY be written to freely by software local to the device that the cluster resides on. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getOutOfServiceAsync() { - return read(attributes.get(ATTR_OUTOFSERVICE)); - } - - /** - * Synchronously get the OutOfService attribute [attribute ID 81]. - *

    - * The OutOfService attribute, of type Boolean, indicates whether (TRUE) or not (FALSE) the physical - * input, output or value that the cluster represents is not in service. For an Input cluster, when - * OutOfService is TRUE the PresentValue attribute is decoupled from the physical input and will - * not track changes to the physical input. For an Output cluster, when OutOfService is TRUE the - * PresentValue attribute is decoupled from the physical output, so changes to PresentValue will not - * affect the physical output. For a Value cluster, when OutOfService is TRUE the PresentValue attribute - * MAY be written to freely by software local to the device that the cluster resides on. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Boolean} attribute value, or null on error - */ - public Boolean getOutOfService(final long refreshPeriod) { - if (attributes.get(ATTR_OUTOFSERVICE).isLastValueCurrent(refreshPeriod)) { - return (Boolean) attributes.get(ATTR_OUTOFSERVICE).getLastValue(); - } - - return (Boolean) readSync(attributes.get(ATTR_OUTOFSERVICE)); - } - - /** - * Set the PresentValue attribute [attribute ID 85]. - *

    - * The PresentValue attribute indicates the current value of the input, output or - * value, as appropriate for the cluster. For Analog clusters it is of type single precision, for Binary - * clusters it is of type Boolean, and for multistate clusters it is of type Unsigned 16-bit integer. The - * PresentValue attribute of an input cluster SHALL be writable when OutOfService is TRUE. When the PriorityArray - * attribute is implemented, writing to PresentValue SHALL be equivalent to writing to element 16 of PriorityArray, - * i.e., with a priority of 16. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param presentValue the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setPresentValue(final Object value) { - return write(attributes.get(ATTR_PRESENTVALUE), value); - } - - /** - * Get the PresentValue attribute [attribute ID 85]. - *

    - * The PresentValue attribute indicates the current value of the input, output or - * value, as appropriate for the cluster. For Analog clusters it is of type single precision, for Binary - * clusters it is of type Boolean, and for multistate clusters it is of type Unsigned 16-bit integer. The - * PresentValue attribute of an input cluster SHALL be writable when OutOfService is TRUE. When the PriorityArray - * attribute is implemented, writing to PresentValue SHALL be equivalent to writing to element 16 of PriorityArray, - * i.e., with a priority of 16. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getPresentValueAsync() { - return read(attributes.get(ATTR_PRESENTVALUE)); - } - - /** - * Synchronously get the PresentValue attribute [attribute ID 85]. - *

    - * The PresentValue attribute indicates the current value of the input, output or - * value, as appropriate for the cluster. For Analog clusters it is of type single precision, for Binary - * clusters it is of type Boolean, and for multistate clusters it is of type Unsigned 16-bit integer. The - * PresentValue attribute of an input cluster SHALL be writable when OutOfService is TRUE. When the PriorityArray - * attribute is implemented, writing to PresentValue SHALL be equivalent to writing to element 16 of PriorityArray, - * i.e., with a priority of 16. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getPresentValue(final long refreshPeriod) { - if (attributes.get(ATTR_PRESENTVALUE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_PRESENTVALUE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_PRESENTVALUE)); - } - - /** - * Set the Reliability attribute [attribute ID 103]. - *

    - * The Reliability attribute, of type 8-bit enumeration, provides an indication of whether - * the PresentValueor the operation of the physical input, output or value in question (as - * appropriate for the cluster) is “reliable” as far as can be determined and, if not, why - * not. The Reliability attribute MAY have any of the following values: - *

    - * NO-FAULT-DETECTED (0) - * OVER-RANGE (2) - * UNDER-RANGE (3) - * OPEN-LOOP (4) - * SHORTED-LOOP (5) - * UNRELIABLE-OTHER (7) - * PROCESS-ERROR (8) - * MULTI-STATE-FAULT (9) - * CONFIGURATION-ERROR (10) - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param reliability the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setReliability(final Object value) { - return write(attributes.get(ATTR_RELIABILITY), value); - } - - /** - * Get the Reliability attribute [attribute ID 103]. - *

    - * The Reliability attribute, of type 8-bit enumeration, provides an indication of whether - * the PresentValueor the operation of the physical input, output or value in question (as - * appropriate for the cluster) is “reliable” as far as can be determined and, if not, why - * not. The Reliability attribute MAY have any of the following values: - *

    - * NO-FAULT-DETECTED (0) - * OVER-RANGE (2) - * UNDER-RANGE (3) - * OPEN-LOOP (4) - * SHORTED-LOOP (5) - * UNRELIABLE-OTHER (7) - * PROCESS-ERROR (8) - * MULTI-STATE-FAULT (9) - * CONFIGURATION-ERROR (10) - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getReliabilityAsync() { - return read(attributes.get(ATTR_RELIABILITY)); - } - - /** - * Synchronously get the Reliability attribute [attribute ID 103]. - *

    - * The Reliability attribute, of type 8-bit enumeration, provides an indication of whether - * the PresentValueor the operation of the physical input, output or value in question (as - * appropriate for the cluster) is “reliable” as far as can be determined and, if not, why - * not. The Reliability attribute MAY have any of the following values: - *

    - * NO-FAULT-DETECTED (0) - * OVER-RANGE (2) - * UNDER-RANGE (3) - * OPEN-LOOP (4) - * SHORTED-LOOP (5) - * UNRELIABLE-OTHER (7) - * PROCESS-ERROR (8) - * MULTI-STATE-FAULT (9) - * CONFIGURATION-ERROR (10) - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getReliability(final long refreshPeriod) { - if (attributes.get(ATTR_RELIABILITY).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_RELIABILITY).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_RELIABILITY)); - } - - /** - * Set the RelinquishDefault attribute [attribute ID 104]. - *

    - * The RelinquishDefault attribute is the default value to be used for the PresentValue - * attribute when all elements of the PriorityArray attribute are marked as invalid. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param relinquishDefault the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setRelinquishDefault(final Object value) { - return write(attributes.get(ATTR_RELINQUISHDEFAULT), value); - } - - /** - * Get the RelinquishDefault attribute [attribute ID 104]. - *

    - * The RelinquishDefault attribute is the default value to be used for the PresentValue - * attribute when all elements of the PriorityArray attribute are marked as invalid. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getRelinquishDefaultAsync() { - return read(attributes.get(ATTR_RELINQUISHDEFAULT)); - } - - /** - * Synchronously get the RelinquishDefault attribute [attribute ID 104]. - *

    - * The RelinquishDefault attribute is the default value to be used for the PresentValue - * attribute when all elements of the PriorityArray attribute are marked as invalid. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getRelinquishDefault(final long refreshPeriod) { - if (attributes.get(ATTR_RELINQUISHDEFAULT).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_RELINQUISHDEFAULT).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_RELINQUISHDEFAULT)); - } - - /** - * Get the StatusFlags attribute [attribute ID 111]. - *

    - * This attribute, of type bitmap, represents four Boolean flags that indicate the general “health” - * of the analog sensor. Three of the flags are associated with the values of other optional attributes - * of this cluster. A more detailed status could be determined by reading the optional attributes (if - * supported) that are linked to these flags. The relationship between individual flags is not defined. - *

    - * The four flags are Bit 0 = IN_ALARM, Bit 1 = FAULT, Bit 2 = OVERRIDDEN, Bit 3 = OUT OF SERVICE - *

    - * where: - *

    - * IN_ALARM -Logical FALSE (0) if the EventStateattribute has a value of NORMAL, otherwise logical TRUE (1). - * This bit is always 0 unless the cluster implementing the EventState attribute is implemented on the same - * endpoint. - *

    - * FAULT -Logical TRUE (1) if the Reliability attribute is present and does not have a value of NO FAULT DETECTED, - * otherwise logical FALSE (0). - *

    - * OVERRIDDEN -Logical TRUE (1) if the cluster has been overridden by some mechanism local to the device. - * Otherwise, the value is logical FALSE (0). In this context, for an input cluster, “overridden” is taken - * to mean that the PresentValue and Reliability(optional) attributes are no longer tracking changes to the - * physical input. For an Output cluster, “overridden” is taken to mean that the physical output is no longer - * tracking changes to the PresentValue attribute and the Reliability attribute is no longer a reflection of - * the physical output. For a Value cluster, “overridden” is taken to mean that the PresentValue attribute is - * not writeable. - *

    - * OUT OF SERVICE -Logical TRUE (1) if the OutOfService attribute has a value of TRUE, otherwise - * logical FALSE (0). - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getStatusFlagsAsync() { - return read(attributes.get(ATTR_STATUSFLAGS)); - } - - /** - * Synchronously get the StatusFlags attribute [attribute ID 111]. - *

    - * This attribute, of type bitmap, represents four Boolean flags that indicate the general “health” - * of the analog sensor. Three of the flags are associated with the values of other optional attributes - * of this cluster. A more detailed status could be determined by reading the optional attributes (if - * supported) that are linked to these flags. The relationship between individual flags is not defined. - *

    - * The four flags are Bit 0 = IN_ALARM, Bit 1 = FAULT, Bit 2 = OVERRIDDEN, Bit 3 = OUT OF SERVICE - *

    - * where: - *

    - * IN_ALARM -Logical FALSE (0) if the EventStateattribute has a value of NORMAL, otherwise logical TRUE (1). - * This bit is always 0 unless the cluster implementing the EventState attribute is implemented on the same - * endpoint. - *

    - * FAULT -Logical TRUE (1) if the Reliability attribute is present and does not have a value of NO FAULT DETECTED, - * otherwise logical FALSE (0). - *

    - * OVERRIDDEN -Logical TRUE (1) if the cluster has been overridden by some mechanism local to the device. - * Otherwise, the value is logical FALSE (0). In this context, for an input cluster, “overridden” is taken - * to mean that the PresentValue and Reliability(optional) attributes are no longer tracking changes to the - * physical input. For an Output cluster, “overridden” is taken to mean that the physical output is no longer - * tracking changes to the PresentValue attribute and the Reliability attribute is no longer a reflection of - * the physical output. For a Value cluster, “overridden” is taken to mean that the PresentValue attribute is - * not writeable. - *

    - * OUT OF SERVICE -Logical TRUE (1) if the OutOfService attribute has a value of TRUE, otherwise - * logical FALSE (0). - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getStatusFlags(final long refreshPeriod) { - if (attributes.get(ATTR_STATUSFLAGS).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_STATUSFLAGS).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_STATUSFLAGS)); - } - - /** - * Get the ApplicationType attribute [attribute ID 256]. - *

    - * The ApplicationType attribute is an unsigned 32 bit integer that indicates the specific - * application usage for this cluster. (Note: This attribute has no BACnet equivalent). - * ApplicationType is subdivided into Group, Type and an Index number, as follows. - *

    - * Group = Bits 24 -31 An indication of the cluster this attribute is part of. - *

    - * Type = Bits 16 -23 For Analog clusters, the physical quantity that the Present Value attribute - * of the cluster represents. For Binary and Multistate clusters, the application usage domain. - *

    - * Index = Bits 0 -15 The specific application usage of the cluster. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getApplicationTypeAsync() { - return read(attributes.get(ATTR_APPLICATIONTYPE)); - } - - /** - * Synchronously get the ApplicationType attribute [attribute ID 256]. - *

    - * The ApplicationType attribute is an unsigned 32 bit integer that indicates the specific - * application usage for this cluster. (Note: This attribute has no BACnet equivalent). - * ApplicationType is subdivided into Group, Type and an Index number, as follows. - *

    - * Group = Bits 24 -31 An indication of the cluster this attribute is part of. - *

    - * Type = Bits 16 -23 For Analog clusters, the physical quantity that the Present Value attribute - * of the cluster represents. For Binary and Multistate clusters, the application usage domain. - *

    - * Index = Bits 0 -15 The specific application usage of the cluster. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getApplicationType(final long refreshPeriod) { - if (attributes.get(ATTR_APPLICATIONTYPE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_APPLICATIONTYPE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_APPLICATIONTYPE)); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclMultistateValueBaCnetExtendedCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclMultistateValueBaCnetExtendedCluster.java deleted file mode 100644 index 4ef802abc..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclMultistateValueBaCnetExtendedCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Multistate Value (BACnet Extended) cluster implementation (Cluster ID 0x0613). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclMultistateValueBaCnetExtendedCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0613; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Multistate Value (BACnet Extended)"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Multistate Value (BACnet Extended) cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclMultistateValueBaCnetExtendedCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclMultistateValueBaCnetRegularCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclMultistateValueBaCnetRegularCluster.java deleted file mode 100644 index bedfd2fbe..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclMultistateValueBaCnetRegularCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Multistate Value (BACnet Regular) cluster implementation (Cluster ID 0x0612). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclMultistateValueBaCnetRegularCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0612; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Multistate Value (BACnet Regular)"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Multistate Value (BACnet Regular) cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclMultistateValueBaCnetRegularCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclMultistateValueBasicCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclMultistateValueBasicCluster.java deleted file mode 100644 index 87884c6df..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclMultistateValueBasicCluster.java +++ /dev/null @@ -1,840 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.CommandResult; -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import com.zsmartsystems.zigbee.zcl.protocol.ZclClusterType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Future; -import javax.annotation.Generated; - -/** - * Multistate Value (Basic) cluster implementation (Cluster ID 0x0014). - *

    - * The Multistate Value (Basic) cluster provides an interface for setting a multistate - * value, typically used as a control system parameter, and accessing characteristics of that value. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclMultistateValueBasicCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0014; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Multistate Value (Basic)"; - - // Attribute constants - /** - * This attribute, of type Array of Character strings, holds descriptions of all possible - * states of a multistate PresentValue. The number of descriptions matches the number of states - * defined in the NumberOfStates property. The PresentValue, interpreted as an integer, serves as - * an index into the array. If the size of this array is changed, the NumberOfStates property SHALL - * also be changed to the same value. The character set used SHALL be ASCII, and the attribute - * SHALL contain a maximum of 16 characters, which SHALL be printable but are otherwise unrestricted. - */ - public static final int ATTR_STATETEXT = 0x000E; - /** - * The Description attribute, of type Character string, MAY be used to hold a description - * of the usage of the input, output or value, as appropriate to the cluster. The character - * set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, - * which SHALL be printable but are otherwise unrestricted. - */ - public static final int ATTR_DESCRIPTION = 0x001C; - /** - * This attribute, of type Unsigned 16-bit integer, defines the number of states that a multistate - * PresentValue MAY have. The NumberOfStates property SHALL always have a value greater than zero. - * If the value of this property is changed, the size of the StateText array, if present, SHALL also - * be changed to the same value. The states are numbered consecutively, starting with 1. - */ - public static final int ATTR_NUMBEROFSTATES = 0x004A; - /** - * The OutOfService attribute, of type Boolean, indicates whether (TRUE) or not (FALSE) the physical - * input, output or value that the cluster represents is not in service. For an Input cluster, when - * OutOfService is TRUE the PresentValue attribute is decoupled from the physical input and will - * not track changes to the physical input. For an Output cluster, when OutOfService is TRUE the - * PresentValue attribute is decoupled from the physical output, so changes to PresentValue will not - * affect the physical output. For a Value cluster, when OutOfService is TRUE the PresentValue attribute - * MAY be written to freely by software local to the device that the cluster resides on. - */ - public static final int ATTR_OUTOFSERVICE = 0x0051; - /** - * The PresentValue attribute indicates the current value of the input, output or - * value, as appropriate for the cluster. For Analog clusters it is of type single precision, for Binary - * clusters it is of type Boolean, and for multistate clusters it is of type Unsigned 16-bit integer. The - * PresentValue attribute of an input cluster SHALL be writable when OutOfService is TRUE. When the PriorityArray - * attribute is implemented, writing to PresentValue SHALL be equivalent to writing to element 16 of PriorityArray, - * i.e., with a priority of 16. - */ - public static final int ATTR_PRESENTVALUE = 0x0055; - /** - * The Reliability attribute, of type 8-bit enumeration, provides an indication of whether - * the PresentValueor the operation of the physical input, output or value in question (as - * appropriate for the cluster) is “reliable” as far as can be determined and, if not, why - * not. The Reliability attribute MAY have any of the following values: - *

    - * NO-FAULT-DETECTED (0) - * OVER-RANGE (2) - * UNDER-RANGE (3) - * OPEN-LOOP (4) - * SHORTED-LOOP (5) - * UNRELIABLE-OTHER (7) - * PROCESS-ERROR (8) - * MULTI-STATE-FAULT (9) - * CONFIGURATION-ERROR (10) - */ - public static final int ATTR_RELIABILITY = 0x0067; - /** - * The RelinquishDefault attribute is the default value to be used for the PresentValue - * attribute when all elements of the PriorityArray attribute are marked as invalid. - */ - public static final int ATTR_RELINQUISHDEFAULT = 0x0068; - /** - * This attribute, of type bitmap, represents four Boolean flags that indicate the general “health” - * of the analog sensor. Three of the flags are associated with the values of other optional attributes - * of this cluster. A more detailed status could be determined by reading the optional attributes (if - * supported) that are linked to these flags. The relationship between individual flags is not defined. - *

    - * The four flags are Bit 0 = IN_ALARM, Bit 1 = FAULT, Bit 2 = OVERRIDDEN, Bit 3 = OUT OF SERVICE - *

    - * where: - *

    - * IN_ALARM -Logical FALSE (0) if the EventStateattribute has a value of NORMAL, otherwise logical TRUE (1). - * This bit is always 0 unless the cluster implementing the EventState attribute is implemented on the same - * endpoint. - *

    - * FAULT -Logical TRUE (1) if the Reliability attribute is present and does not have a value of NO FAULT DETECTED, - * otherwise logical FALSE (0). - *

    - * OVERRIDDEN -Logical TRUE (1) if the cluster has been overridden by some mechanism local to the device. - * Otherwise, the value is logical FALSE (0). In this context, for an input cluster, “overridden” is taken - * to mean that the PresentValue and Reliability(optional) attributes are no longer tracking changes to the - * physical input. For an Output cluster, “overridden” is taken to mean that the physical output is no longer - * tracking changes to the PresentValue attribute and the Reliability attribute is no longer a reflection of - * the physical output. For a Value cluster, “overridden” is taken to mean that the PresentValue attribute is - * not writeable. - *

    - * OUT OF SERVICE -Logical TRUE (1) if the OutOfService attribute has a value of TRUE, otherwise - * logical FALSE (0). - */ - public static final int ATTR_STATUSFLAGS = 0x006F; - /** - * The ApplicationType attribute is an unsigned 32 bit integer that indicates the specific - * application usage for this cluster. (Note: This attribute has no BACnet equivalent). - * ApplicationType is subdivided into Group, Type and an Index number, as follows. - *

    - * Group = Bits 24 -31 An indication of the cluster this attribute is part of. - *

    - * Type = Bits 16 -23 For Analog clusters, the physical quantity that the Present Value attribute - * of the cluster represents. For Binary and Multistate clusters, the application usage domain. - *

    - * Index = Bits 0 -15The specific application usage of the cluster. - */ - public static final int ATTR_APPLICATIONTYPE = 0x0100; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(9); - - attributeMap.put(ATTR_STATETEXT, new ZclAttribute(ZclClusterType.MULTISTATE_VALUE__BASIC, ATTR_STATETEXT, "StateText", ZclDataType.CHARACTER_STRING, false, true, true, false)); - attributeMap.put(ATTR_DESCRIPTION, new ZclAttribute(ZclClusterType.MULTISTATE_VALUE__BASIC, ATTR_DESCRIPTION, "Description", ZclDataType.CHARACTER_STRING, false, true, true, false)); - attributeMap.put(ATTR_NUMBEROFSTATES, new ZclAttribute(ZclClusterType.MULTISTATE_VALUE__BASIC, ATTR_NUMBEROFSTATES, "NumberOfStates", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, true, false)); - attributeMap.put(ATTR_OUTOFSERVICE, new ZclAttribute(ZclClusterType.MULTISTATE_VALUE__BASIC, ATTR_OUTOFSERVICE, "OutOfService", ZclDataType.BOOLEAN, true, true, true, false)); - attributeMap.put(ATTR_PRESENTVALUE, new ZclAttribute(ZclClusterType.MULTISTATE_VALUE__BASIC, ATTR_PRESENTVALUE, "PresentValue", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, true, false)); - attributeMap.put(ATTR_RELIABILITY, new ZclAttribute(ZclClusterType.MULTISTATE_VALUE__BASIC, ATTR_RELIABILITY, "Reliability", ZclDataType.ENUMERATION_8_BIT, false, true, true, false)); - attributeMap.put(ATTR_RELINQUISHDEFAULT, new ZclAttribute(ZclClusterType.MULTISTATE_VALUE__BASIC, ATTR_RELINQUISHDEFAULT, "RelinquishDefault", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, true, false)); - attributeMap.put(ATTR_STATUSFLAGS, new ZclAttribute(ZclClusterType.MULTISTATE_VALUE__BASIC, ATTR_STATUSFLAGS, "StatusFlags", ZclDataType.BITMAP_8_BIT, true, true, false, false)); - attributeMap.put(ATTR_APPLICATIONTYPE, new ZclAttribute(ZclClusterType.MULTISTATE_VALUE__BASIC, ATTR_APPLICATIONTYPE, "ApplicationType", ZclDataType.SIGNED_32_BIT_INTEGER, false, true, false, false)); - - return attributeMap; - } - - /** - * Default constructor to create a Multistate Value (Basic) cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclMultistateValueBasicCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } - - /** - * Set the StateText attribute [attribute ID 14]. - *

    - * This attribute, of type Array of Character strings, holds descriptions of all possible - * states of a multistate PresentValue. The number of descriptions matches the number of states - * defined in the NumberOfStates property. The PresentValue, interpreted as an integer, serves as - * an index into the array. If the size of this array is changed, the NumberOfStates property SHALL - * also be changed to the same value. The character set used SHALL be ASCII, and the attribute - * SHALL contain a maximum of 16 characters, which SHALL be printable but are otherwise unrestricted. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param stateText the {@link String} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setStateText(final Object value) { - return write(attributes.get(ATTR_STATETEXT), value); - } - - /** - * Get the StateText attribute [attribute ID 14]. - *

    - * This attribute, of type Array of Character strings, holds descriptions of all possible - * states of a multistate PresentValue. The number of descriptions matches the number of states - * defined in the NumberOfStates property. The PresentValue, interpreted as an integer, serves as - * an index into the array. If the size of this array is changed, the NumberOfStates property SHALL - * also be changed to the same value. The character set used SHALL be ASCII, and the attribute - * SHALL contain a maximum of 16 characters, which SHALL be printable but are otherwise unrestricted. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getStateTextAsync() { - return read(attributes.get(ATTR_STATETEXT)); - } - - /** - * Synchronously get the StateText attribute [attribute ID 14]. - *

    - * This attribute, of type Array of Character strings, holds descriptions of all possible - * states of a multistate PresentValue. The number of descriptions matches the number of states - * defined in the NumberOfStates property. The PresentValue, interpreted as an integer, serves as - * an index into the array. If the size of this array is changed, the NumberOfStates property SHALL - * also be changed to the same value. The character set used SHALL be ASCII, and the attribute - * SHALL contain a maximum of 16 characters, which SHALL be printable but are otherwise unrestricted. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link String} attribute value, or null on error - */ - public String getStateText(final long refreshPeriod) { - if (attributes.get(ATTR_STATETEXT).isLastValueCurrent(refreshPeriod)) { - return (String) attributes.get(ATTR_STATETEXT).getLastValue(); - } - - return (String) readSync(attributes.get(ATTR_STATETEXT)); - } - - /** - * Set the Description attribute [attribute ID 28]. - *

    - * The Description attribute, of type Character string, MAY be used to hold a description - * of the usage of the input, output or value, as appropriate to the cluster. The character - * set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, - * which SHALL be printable but are otherwise unrestricted. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param description the {@link String} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setDescription(final Object value) { - return write(attributes.get(ATTR_DESCRIPTION), value); - } - - /** - * Get the Description attribute [attribute ID 28]. - *

    - * The Description attribute, of type Character string, MAY be used to hold a description - * of the usage of the input, output or value, as appropriate to the cluster. The character - * set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, - * which SHALL be printable but are otherwise unrestricted. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getDescriptionAsync() { - return read(attributes.get(ATTR_DESCRIPTION)); - } - - /** - * Synchronously get the Description attribute [attribute ID 28]. - *

    - * The Description attribute, of type Character string, MAY be used to hold a description - * of the usage of the input, output or value, as appropriate to the cluster. The character - * set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, - * which SHALL be printable but are otherwise unrestricted. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link String} attribute value, or null on error - */ - public String getDescription(final long refreshPeriod) { - if (attributes.get(ATTR_DESCRIPTION).isLastValueCurrent(refreshPeriod)) { - return (String) attributes.get(ATTR_DESCRIPTION).getLastValue(); - } - - return (String) readSync(attributes.get(ATTR_DESCRIPTION)); - } - - /** - * Set the NumberOfStates attribute [attribute ID 74]. - *

    - * This attribute, of type Unsigned 16-bit integer, defines the number of states that a multistate - * PresentValue MAY have. The NumberOfStates property SHALL always have a value greater than zero. - * If the value of this property is changed, the size of the StateText array, if present, SHALL also - * be changed to the same value. The states are numbered consecutively, starting with 1. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param numberOfStates the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setNumberOfStates(final Object value) { - return write(attributes.get(ATTR_NUMBEROFSTATES), value); - } - - /** - * Get the NumberOfStates attribute [attribute ID 74]. - *

    - * This attribute, of type Unsigned 16-bit integer, defines the number of states that a multistate - * PresentValue MAY have. The NumberOfStates property SHALL always have a value greater than zero. - * If the value of this property is changed, the size of the StateText array, if present, SHALL also - * be changed to the same value. The states are numbered consecutively, starting with 1. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getNumberOfStatesAsync() { - return read(attributes.get(ATTR_NUMBEROFSTATES)); - } - - /** - * Synchronously get the NumberOfStates attribute [attribute ID 74]. - *

    - * This attribute, of type Unsigned 16-bit integer, defines the number of states that a multistate - * PresentValue MAY have. The NumberOfStates property SHALL always have a value greater than zero. - * If the value of this property is changed, the size of the StateText array, if present, SHALL also - * be changed to the same value. The states are numbered consecutively, starting with 1. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getNumberOfStates(final long refreshPeriod) { - if (attributes.get(ATTR_NUMBEROFSTATES).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_NUMBEROFSTATES).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_NUMBEROFSTATES)); - } - - /** - * Set the OutOfService attribute [attribute ID 81]. - *

    - * The OutOfService attribute, of type Boolean, indicates whether (TRUE) or not (FALSE) the physical - * input, output or value that the cluster represents is not in service. For an Input cluster, when - * OutOfService is TRUE the PresentValue attribute is decoupled from the physical input and will - * not track changes to the physical input. For an Output cluster, when OutOfService is TRUE the - * PresentValue attribute is decoupled from the physical output, so changes to PresentValue will not - * affect the physical output. For a Value cluster, when OutOfService is TRUE the PresentValue attribute - * MAY be written to freely by software local to the device that the cluster resides on. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param outOfService the {@link Boolean} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setOutOfService(final Object value) { - return write(attributes.get(ATTR_OUTOFSERVICE), value); - } - - /** - * Get the OutOfService attribute [attribute ID 81]. - *

    - * The OutOfService attribute, of type Boolean, indicates whether (TRUE) or not (FALSE) the physical - * input, output or value that the cluster represents is not in service. For an Input cluster, when - * OutOfService is TRUE the PresentValue attribute is decoupled from the physical input and will - * not track changes to the physical input. For an Output cluster, when OutOfService is TRUE the - * PresentValue attribute is decoupled from the physical output, so changes to PresentValue will not - * affect the physical output. For a Value cluster, when OutOfService is TRUE the PresentValue attribute - * MAY be written to freely by software local to the device that the cluster resides on. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getOutOfServiceAsync() { - return read(attributes.get(ATTR_OUTOFSERVICE)); - } - - /** - * Synchronously get the OutOfService attribute [attribute ID 81]. - *

    - * The OutOfService attribute, of type Boolean, indicates whether (TRUE) or not (FALSE) the physical - * input, output or value that the cluster represents is not in service. For an Input cluster, when - * OutOfService is TRUE the PresentValue attribute is decoupled from the physical input and will - * not track changes to the physical input. For an Output cluster, when OutOfService is TRUE the - * PresentValue attribute is decoupled from the physical output, so changes to PresentValue will not - * affect the physical output. For a Value cluster, when OutOfService is TRUE the PresentValue attribute - * MAY be written to freely by software local to the device that the cluster resides on. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Boolean} attribute value, or null on error - */ - public Boolean getOutOfService(final long refreshPeriod) { - if (attributes.get(ATTR_OUTOFSERVICE).isLastValueCurrent(refreshPeriod)) { - return (Boolean) attributes.get(ATTR_OUTOFSERVICE).getLastValue(); - } - - return (Boolean) readSync(attributes.get(ATTR_OUTOFSERVICE)); - } - - /** - * Set the PresentValue attribute [attribute ID 85]. - *

    - * The PresentValue attribute indicates the current value of the input, output or - * value, as appropriate for the cluster. For Analog clusters it is of type single precision, for Binary - * clusters it is of type Boolean, and for multistate clusters it is of type Unsigned 16-bit integer. The - * PresentValue attribute of an input cluster SHALL be writable when OutOfService is TRUE. When the PriorityArray - * attribute is implemented, writing to PresentValue SHALL be equivalent to writing to element 16 of PriorityArray, - * i.e., with a priority of 16. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param presentValue the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setPresentValue(final Object value) { - return write(attributes.get(ATTR_PRESENTVALUE), value); - } - - /** - * Get the PresentValue attribute [attribute ID 85]. - *

    - * The PresentValue attribute indicates the current value of the input, output or - * value, as appropriate for the cluster. For Analog clusters it is of type single precision, for Binary - * clusters it is of type Boolean, and for multistate clusters it is of type Unsigned 16-bit integer. The - * PresentValue attribute of an input cluster SHALL be writable when OutOfService is TRUE. When the PriorityArray - * attribute is implemented, writing to PresentValue SHALL be equivalent to writing to element 16 of PriorityArray, - * i.e., with a priority of 16. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getPresentValueAsync() { - return read(attributes.get(ATTR_PRESENTVALUE)); - } - - /** - * Synchronously get the PresentValue attribute [attribute ID 85]. - *

    - * The PresentValue attribute indicates the current value of the input, output or - * value, as appropriate for the cluster. For Analog clusters it is of type single precision, for Binary - * clusters it is of type Boolean, and for multistate clusters it is of type Unsigned 16-bit integer. The - * PresentValue attribute of an input cluster SHALL be writable when OutOfService is TRUE. When the PriorityArray - * attribute is implemented, writing to PresentValue SHALL be equivalent to writing to element 16 of PriorityArray, - * i.e., with a priority of 16. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getPresentValue(final long refreshPeriod) { - if (attributes.get(ATTR_PRESENTVALUE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_PRESENTVALUE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_PRESENTVALUE)); - } - - /** - * Set the Reliability attribute [attribute ID 103]. - *

    - * The Reliability attribute, of type 8-bit enumeration, provides an indication of whether - * the PresentValueor the operation of the physical input, output or value in question (as - * appropriate for the cluster) is “reliable” as far as can be determined and, if not, why - * not. The Reliability attribute MAY have any of the following values: - *

    - * NO-FAULT-DETECTED (0) - * OVER-RANGE (2) - * UNDER-RANGE (3) - * OPEN-LOOP (4) - * SHORTED-LOOP (5) - * UNRELIABLE-OTHER (7) - * PROCESS-ERROR (8) - * MULTI-STATE-FAULT (9) - * CONFIGURATION-ERROR (10) - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param reliability the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setReliability(final Object value) { - return write(attributes.get(ATTR_RELIABILITY), value); - } - - /** - * Get the Reliability attribute [attribute ID 103]. - *

    - * The Reliability attribute, of type 8-bit enumeration, provides an indication of whether - * the PresentValueor the operation of the physical input, output or value in question (as - * appropriate for the cluster) is “reliable” as far as can be determined and, if not, why - * not. The Reliability attribute MAY have any of the following values: - *

    - * NO-FAULT-DETECTED (0) - * OVER-RANGE (2) - * UNDER-RANGE (3) - * OPEN-LOOP (4) - * SHORTED-LOOP (5) - * UNRELIABLE-OTHER (7) - * PROCESS-ERROR (8) - * MULTI-STATE-FAULT (9) - * CONFIGURATION-ERROR (10) - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getReliabilityAsync() { - return read(attributes.get(ATTR_RELIABILITY)); - } - - /** - * Synchronously get the Reliability attribute [attribute ID 103]. - *

    - * The Reliability attribute, of type 8-bit enumeration, provides an indication of whether - * the PresentValueor the operation of the physical input, output or value in question (as - * appropriate for the cluster) is “reliable” as far as can be determined and, if not, why - * not. The Reliability attribute MAY have any of the following values: - *

    - * NO-FAULT-DETECTED (0) - * OVER-RANGE (2) - * UNDER-RANGE (3) - * OPEN-LOOP (4) - * SHORTED-LOOP (5) - * UNRELIABLE-OTHER (7) - * PROCESS-ERROR (8) - * MULTI-STATE-FAULT (9) - * CONFIGURATION-ERROR (10) - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getReliability(final long refreshPeriod) { - if (attributes.get(ATTR_RELIABILITY).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_RELIABILITY).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_RELIABILITY)); - } - - /** - * Set the RelinquishDefault attribute [attribute ID 104]. - *

    - * The RelinquishDefault attribute is the default value to be used for the PresentValue - * attribute when all elements of the PriorityArray attribute are marked as invalid. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param relinquishDefault the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setRelinquishDefault(final Object value) { - return write(attributes.get(ATTR_RELINQUISHDEFAULT), value); - } - - /** - * Get the RelinquishDefault attribute [attribute ID 104]. - *

    - * The RelinquishDefault attribute is the default value to be used for the PresentValue - * attribute when all elements of the PriorityArray attribute are marked as invalid. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getRelinquishDefaultAsync() { - return read(attributes.get(ATTR_RELINQUISHDEFAULT)); - } - - /** - * Synchronously get the RelinquishDefault attribute [attribute ID 104]. - *

    - * The RelinquishDefault attribute is the default value to be used for the PresentValue - * attribute when all elements of the PriorityArray attribute are marked as invalid. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getRelinquishDefault(final long refreshPeriod) { - if (attributes.get(ATTR_RELINQUISHDEFAULT).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_RELINQUISHDEFAULT).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_RELINQUISHDEFAULT)); - } - - /** - * Get the StatusFlags attribute [attribute ID 111]. - *

    - * This attribute, of type bitmap, represents four Boolean flags that indicate the general “health” - * of the analog sensor. Three of the flags are associated with the values of other optional attributes - * of this cluster. A more detailed status could be determined by reading the optional attributes (if - * supported) that are linked to these flags. The relationship between individual flags is not defined. - *

    - * The four flags are Bit 0 = IN_ALARM, Bit 1 = FAULT, Bit 2 = OVERRIDDEN, Bit 3 = OUT OF SERVICE - *

    - * where: - *

    - * IN_ALARM -Logical FALSE (0) if the EventStateattribute has a value of NORMAL, otherwise logical TRUE (1). - * This bit is always 0 unless the cluster implementing the EventState attribute is implemented on the same - * endpoint. - *

    - * FAULT -Logical TRUE (1) if the Reliability attribute is present and does not have a value of NO FAULT DETECTED, - * otherwise logical FALSE (0). - *

    - * OVERRIDDEN -Logical TRUE (1) if the cluster has been overridden by some mechanism local to the device. - * Otherwise, the value is logical FALSE (0). In this context, for an input cluster, “overridden” is taken - * to mean that the PresentValue and Reliability(optional) attributes are no longer tracking changes to the - * physical input. For an Output cluster, “overridden” is taken to mean that the physical output is no longer - * tracking changes to the PresentValue attribute and the Reliability attribute is no longer a reflection of - * the physical output. For a Value cluster, “overridden” is taken to mean that the PresentValue attribute is - * not writeable. - *

    - * OUT OF SERVICE -Logical TRUE (1) if the OutOfService attribute has a value of TRUE, otherwise - * logical FALSE (0). - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getStatusFlagsAsync() { - return read(attributes.get(ATTR_STATUSFLAGS)); - } - - /** - * Synchronously get the StatusFlags attribute [attribute ID 111]. - *

    - * This attribute, of type bitmap, represents four Boolean flags that indicate the general “health” - * of the analog sensor. Three of the flags are associated with the values of other optional attributes - * of this cluster. A more detailed status could be determined by reading the optional attributes (if - * supported) that are linked to these flags. The relationship between individual flags is not defined. - *

    - * The four flags are Bit 0 = IN_ALARM, Bit 1 = FAULT, Bit 2 = OVERRIDDEN, Bit 3 = OUT OF SERVICE - *

    - * where: - *

    - * IN_ALARM -Logical FALSE (0) if the EventStateattribute has a value of NORMAL, otherwise logical TRUE (1). - * This bit is always 0 unless the cluster implementing the EventState attribute is implemented on the same - * endpoint. - *

    - * FAULT -Logical TRUE (1) if the Reliability attribute is present and does not have a value of NO FAULT DETECTED, - * otherwise logical FALSE (0). - *

    - * OVERRIDDEN -Logical TRUE (1) if the cluster has been overridden by some mechanism local to the device. - * Otherwise, the value is logical FALSE (0). In this context, for an input cluster, “overridden” is taken - * to mean that the PresentValue and Reliability(optional) attributes are no longer tracking changes to the - * physical input. For an Output cluster, “overridden” is taken to mean that the physical output is no longer - * tracking changes to the PresentValue attribute and the Reliability attribute is no longer a reflection of - * the physical output. For a Value cluster, “overridden” is taken to mean that the PresentValue attribute is - * not writeable. - *

    - * OUT OF SERVICE -Logical TRUE (1) if the OutOfService attribute has a value of TRUE, otherwise - * logical FALSE (0). - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getStatusFlags(final long refreshPeriod) { - if (attributes.get(ATTR_STATUSFLAGS).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_STATUSFLAGS).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_STATUSFLAGS)); - } - - /** - * Get the ApplicationType attribute [attribute ID 256]. - *

    - * The ApplicationType attribute is an unsigned 32 bit integer that indicates the specific - * application usage for this cluster. (Note: This attribute has no BACnet equivalent). - * ApplicationType is subdivided into Group, Type and an Index number, as follows. - *

    - * Group = Bits 24 -31 An indication of the cluster this attribute is part of. - *

    - * Type = Bits 16 -23 For Analog clusters, the physical quantity that the Present Value attribute - * of the cluster represents. For Binary and Multistate clusters, the application usage domain. - *

    - * Index = Bits 0 -15The specific application usage of the cluster. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getApplicationTypeAsync() { - return read(attributes.get(ATTR_APPLICATIONTYPE)); - } - - /** - * Synchronously get the ApplicationType attribute [attribute ID 256]. - *

    - * The ApplicationType attribute is an unsigned 32 bit integer that indicates the specific - * application usage for this cluster. (Note: This attribute has no BACnet equivalent). - * ApplicationType is subdivided into Group, Type and an Index number, as follows. - *

    - * Group = Bits 24 -31 An indication of the cluster this attribute is part of. - *

    - * Type = Bits 16 -23 For Analog clusters, the physical quantity that the Present Value attribute - * of the cluster represents. For Binary and Multistate clusters, the application usage domain. - *

    - * Index = Bits 0 -15The specific application usage of the cluster. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getApplicationType(final long refreshPeriod) { - if (attributes.get(ATTR_APPLICATIONTYPE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_APPLICATIONTYPE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_APPLICATIONTYPE)); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclOccupancySensingCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclOccupancySensingCluster.java deleted file mode 100644 index d474cf02f..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclOccupancySensingCluster.java +++ /dev/null @@ -1,538 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.CommandResult; -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import com.zsmartsystems.zigbee.zcl.protocol.ZclClusterType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Future; -import javax.annotation.Generated; - -/** - * Occupancy sensing cluster implementation (Cluster ID 0x0406). - *

    - * The cluster provides an interface to occupancy sensing functionality, - * including configuration and provision of notifications of occupancy status. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclOccupancySensingCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0406; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Occupancy sensing"; - - // Attribute constants - /** - * The Occupancy attribute is a bitmap. - *

    - * Bit 0 specifies the sensed occupancy as follows: 1 = occupied, 0 = unoccupied. - * All other bits are reserved. - */ - public static final int ATTR_OCCUPANCY = 0x0000; - /** - * The OccupancySensorType attribute specifies the type of the occupancy sensor. - */ - public static final int ATTR_OCCUPANCYSENSORTYPE = 0x0001; - /** - * The PIROccupiedToUnoccupiedDelay attribute is 8-bits in length and specifies - * the time delay, in seconds, before the PIR sensor changes to its occupied state - * when the sensed area becomes unoccupied. This attribute, along with - * PIRUnoccupiedToOccupiedTime, may be used to reduce sensor 'chatter' when - * used in an area where occupation changes frequently. - */ - public static final int ATTR_PIROCCUPIEDTOUNOCCUPIEDDELAY = 0x0010; - /** - * The PIRUnoccupiedToOccupiedDelay attribute is 8-bits in length and specifies - * the time delay, in seconds, before the PIR sensor changes to its unoccupied state - * when the sensed area becomes occupied. - */ - public static final int ATTR_PIRUNOCCUPIEDTOOCCUPIEDDELAY = 0x0011; - /** - * The UltraSonicOccupiedToUnoccupiedTime attribute specifies the time delay, in - * seconds, before the ultrasonic sensor changes to its occupied state when the - * sensed area becomes unoccupied. This attribute, along with - * UltraSonicUnoccupiedToOccupiedTime, may be used to reduce sensor 'chatter' - * when used in an area where occupation changes frequently. - */ - public static final int ATTR_ULTRASONICOCCUPIEDTOUNOCCUPIEDDELAY = 0x0020; - /** - * The UltraSonicUnoccupiedToOccupiedTime attribute specifies the time delay, in - * seconds, before the ultrasonic sensor changes to its unoccupied state when the - * sensed area becomes occupied. - */ - public static final int ATTR_ULTRASONICUNOCCUPIEDTOOCCUPIEDDELAY = 0x0021; - /** - */ - public static final int ATTR_ULTRASONICUNOCCUPIEDTOOCCUPIEDTHRESHOLD = 0x0022; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(7); - - attributeMap.put(ATTR_OCCUPANCY, new ZclAttribute(ZclClusterType.OCCUPANCY_SENSING, ATTR_OCCUPANCY, "Occupancy", ZclDataType.BITMAP_8_BIT, true, true, false, true)); - attributeMap.put(ATTR_OCCUPANCYSENSORTYPE, new ZclAttribute(ZclClusterType.OCCUPANCY_SENSING, ATTR_OCCUPANCYSENSORTYPE, "OccupancySensorType", ZclDataType.ENUMERATION_8_BIT, true, true, false, false)); - attributeMap.put(ATTR_PIROCCUPIEDTOUNOCCUPIEDDELAY, new ZclAttribute(ZclClusterType.OCCUPANCY_SENSING, ATTR_PIROCCUPIEDTOUNOCCUPIEDDELAY, "PIROccupiedToUnoccupiedDelay", ZclDataType.UNSIGNED_8_BIT_INTEGER, false, true, true, false)); - attributeMap.put(ATTR_PIRUNOCCUPIEDTOOCCUPIEDDELAY, new ZclAttribute(ZclClusterType.OCCUPANCY_SENSING, ATTR_PIRUNOCCUPIEDTOOCCUPIEDDELAY, "PIRUnoccupiedToOccupiedDelay", ZclDataType.UNSIGNED_8_BIT_INTEGER, false, true, true, false)); - attributeMap.put(ATTR_ULTRASONICOCCUPIEDTOUNOCCUPIEDDELAY, new ZclAttribute(ZclClusterType.OCCUPANCY_SENSING, ATTR_ULTRASONICOCCUPIEDTOUNOCCUPIEDDELAY, "UltraSonicOccupiedToUnoccupiedDelay", ZclDataType.UNSIGNED_8_BIT_INTEGER, false, true, true, false)); - attributeMap.put(ATTR_ULTRASONICUNOCCUPIEDTOOCCUPIEDDELAY, new ZclAttribute(ZclClusterType.OCCUPANCY_SENSING, ATTR_ULTRASONICUNOCCUPIEDTOOCCUPIEDDELAY, "UltraSonicUnoccupiedToOccupiedDelay", ZclDataType.UNSIGNED_8_BIT_INTEGER, false, true, true, false)); - attributeMap.put(ATTR_ULTRASONICUNOCCUPIEDTOOCCUPIEDTHRESHOLD, new ZclAttribute(ZclClusterType.OCCUPANCY_SENSING, ATTR_ULTRASONICUNOCCUPIEDTOOCCUPIEDTHRESHOLD, "UltrasonicUnoccupiedToOccupiedThreshold", ZclDataType.UNSIGNED_8_BIT_INTEGER, false, true, true, false)); - - return attributeMap; - } - - /** - * Default constructor to create a Occupancy sensing cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclOccupancySensingCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } - - /** - * Get the Occupancy attribute [attribute ID 0]. - *

    - * The Occupancy attribute is a bitmap. - *

    - * Bit 0 specifies the sensed occupancy as follows: 1 = occupied, 0 = unoccupied. - * All other bits are reserved. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getOccupancyAsync() { - return read(attributes.get(ATTR_OCCUPANCY)); - } - - /** - * Synchronously get the Occupancy attribute [attribute ID 0]. - *

    - * The Occupancy attribute is a bitmap. - *

    - * Bit 0 specifies the sensed occupancy as follows: 1 = occupied, 0 = unoccupied. - * All other bits are reserved. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getOccupancy(final long refreshPeriod) { - if (attributes.get(ATTR_OCCUPANCY).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_OCCUPANCY).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_OCCUPANCY)); - } - - /** - * Set reporting for the Occupancy attribute [attribute ID 0]. - *

    - * The Occupancy attribute is a bitmap. - *

    - * Bit 0 specifies the sensed occupancy as follows: 1 = occupied, 0 = unoccupied. - * All other bits are reserved. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param minInterval {@link int} minimum reporting period - * @param maxInterval {@link int} maximum reporting period - * @return the {@link Future} command result future - */ - public Future setOccupancyReporting(final int minInterval, final int maxInterval) { - return setReporting(attributes.get(ATTR_OCCUPANCY), minInterval, maxInterval); - } - - /** - * Get the OccupancySensorType attribute [attribute ID 1]. - *

    - * The OccupancySensorType attribute specifies the type of the occupancy sensor. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getOccupancySensorTypeAsync() { - return read(attributes.get(ATTR_OCCUPANCYSENSORTYPE)); - } - - /** - * Synchronously get the OccupancySensorType attribute [attribute ID 1]. - *

    - * The OccupancySensorType attribute specifies the type of the occupancy sensor. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getOccupancySensorType(final long refreshPeriod) { - if (attributes.get(ATTR_OCCUPANCYSENSORTYPE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_OCCUPANCYSENSORTYPE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_OCCUPANCYSENSORTYPE)); - } - - /** - * Set the PIROccupiedToUnoccupiedDelay attribute [attribute ID 16]. - *

    - * The PIROccupiedToUnoccupiedDelay attribute is 8-bits in length and specifies - * the time delay, in seconds, before the PIR sensor changes to its occupied state - * when the sensed area becomes unoccupied. This attribute, along with - * PIRUnoccupiedToOccupiedTime, may be used to reduce sensor 'chatter' when - * used in an area where occupation changes frequently. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param pirOccupiedToUnoccupiedDelay the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setPirOccupiedToUnoccupiedDelay(final Object value) { - return write(attributes.get(ATTR_PIROCCUPIEDTOUNOCCUPIEDDELAY), value); - } - - /** - * Get the PIROccupiedToUnoccupiedDelay attribute [attribute ID 16]. - *

    - * The PIROccupiedToUnoccupiedDelay attribute is 8-bits in length and specifies - * the time delay, in seconds, before the PIR sensor changes to its occupied state - * when the sensed area becomes unoccupied. This attribute, along with - * PIRUnoccupiedToOccupiedTime, may be used to reduce sensor 'chatter' when - * used in an area where occupation changes frequently. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getPirOccupiedToUnoccupiedDelayAsync() { - return read(attributes.get(ATTR_PIROCCUPIEDTOUNOCCUPIEDDELAY)); - } - - /** - * Synchronously get the PIROccupiedToUnoccupiedDelay attribute [attribute ID 16]. - *

    - * The PIROccupiedToUnoccupiedDelay attribute is 8-bits in length and specifies - * the time delay, in seconds, before the PIR sensor changes to its occupied state - * when the sensed area becomes unoccupied. This attribute, along with - * PIRUnoccupiedToOccupiedTime, may be used to reduce sensor 'chatter' when - * used in an area where occupation changes frequently. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getPirOccupiedToUnoccupiedDelay(final long refreshPeriod) { - if (attributes.get(ATTR_PIROCCUPIEDTOUNOCCUPIEDDELAY).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_PIROCCUPIEDTOUNOCCUPIEDDELAY).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_PIROCCUPIEDTOUNOCCUPIEDDELAY)); - } - - /** - * Set the PIRUnoccupiedToOccupiedDelay attribute [attribute ID 17]. - *

    - * The PIRUnoccupiedToOccupiedDelay attribute is 8-bits in length and specifies - * the time delay, in seconds, before the PIR sensor changes to its unoccupied state - * when the sensed area becomes occupied. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param pirUnoccupiedToOccupiedDelay the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setPirUnoccupiedToOccupiedDelay(final Object value) { - return write(attributes.get(ATTR_PIRUNOCCUPIEDTOOCCUPIEDDELAY), value); - } - - /** - * Get the PIRUnoccupiedToOccupiedDelay attribute [attribute ID 17]. - *

    - * The PIRUnoccupiedToOccupiedDelay attribute is 8-bits in length and specifies - * the time delay, in seconds, before the PIR sensor changes to its unoccupied state - * when the sensed area becomes occupied. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getPirUnoccupiedToOccupiedDelayAsync() { - return read(attributes.get(ATTR_PIRUNOCCUPIEDTOOCCUPIEDDELAY)); - } - - /** - * Synchronously get the PIRUnoccupiedToOccupiedDelay attribute [attribute ID 17]. - *

    - * The PIRUnoccupiedToOccupiedDelay attribute is 8-bits in length and specifies - * the time delay, in seconds, before the PIR sensor changes to its unoccupied state - * when the sensed area becomes occupied. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getPirUnoccupiedToOccupiedDelay(final long refreshPeriod) { - if (attributes.get(ATTR_PIRUNOCCUPIEDTOOCCUPIEDDELAY).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_PIRUNOCCUPIEDTOOCCUPIEDDELAY).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_PIRUNOCCUPIEDTOOCCUPIEDDELAY)); - } - - /** - * Set the UltraSonicOccupiedToUnoccupiedDelay attribute [attribute ID 32]. - *

    - * The UltraSonicOccupiedToUnoccupiedTime attribute specifies the time delay, in - * seconds, before the ultrasonic sensor changes to its occupied state when the - * sensed area becomes unoccupied. This attribute, along with - * UltraSonicUnoccupiedToOccupiedTime, may be used to reduce sensor 'chatter' - * when used in an area where occupation changes frequently. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param ultraSonicOccupiedToUnoccupiedDelay the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setUltraSonicOccupiedToUnoccupiedDelay(final Object value) { - return write(attributes.get(ATTR_ULTRASONICOCCUPIEDTOUNOCCUPIEDDELAY), value); - } - - /** - * Get the UltraSonicOccupiedToUnoccupiedDelay attribute [attribute ID 32]. - *

    - * The UltraSonicOccupiedToUnoccupiedTime attribute specifies the time delay, in - * seconds, before the ultrasonic sensor changes to its occupied state when the - * sensed area becomes unoccupied. This attribute, along with - * UltraSonicUnoccupiedToOccupiedTime, may be used to reduce sensor 'chatter' - * when used in an area where occupation changes frequently. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getUltraSonicOccupiedToUnoccupiedDelayAsync() { - return read(attributes.get(ATTR_ULTRASONICOCCUPIEDTOUNOCCUPIEDDELAY)); - } - - /** - * Synchronously get the UltraSonicOccupiedToUnoccupiedDelay attribute [attribute ID 32]. - *

    - * The UltraSonicOccupiedToUnoccupiedTime attribute specifies the time delay, in - * seconds, before the ultrasonic sensor changes to its occupied state when the - * sensed area becomes unoccupied. This attribute, along with - * UltraSonicUnoccupiedToOccupiedTime, may be used to reduce sensor 'chatter' - * when used in an area where occupation changes frequently. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getUltraSonicOccupiedToUnoccupiedDelay(final long refreshPeriod) { - if (attributes.get(ATTR_ULTRASONICOCCUPIEDTOUNOCCUPIEDDELAY).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_ULTRASONICOCCUPIEDTOUNOCCUPIEDDELAY).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_ULTRASONICOCCUPIEDTOUNOCCUPIEDDELAY)); - } - - /** - * Set the UltraSonicUnoccupiedToOccupiedDelay attribute [attribute ID 33]. - *

    - * The UltraSonicUnoccupiedToOccupiedTime attribute specifies the time delay, in - * seconds, before the ultrasonic sensor changes to its unoccupied state when the - * sensed area becomes occupied. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param ultraSonicUnoccupiedToOccupiedDelay the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setUltraSonicUnoccupiedToOccupiedDelay(final Object value) { - return write(attributes.get(ATTR_ULTRASONICUNOCCUPIEDTOOCCUPIEDDELAY), value); - } - - /** - * Get the UltraSonicUnoccupiedToOccupiedDelay attribute [attribute ID 33]. - *

    - * The UltraSonicUnoccupiedToOccupiedTime attribute specifies the time delay, in - * seconds, before the ultrasonic sensor changes to its unoccupied state when the - * sensed area becomes occupied. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getUltraSonicUnoccupiedToOccupiedDelayAsync() { - return read(attributes.get(ATTR_ULTRASONICUNOCCUPIEDTOOCCUPIEDDELAY)); - } - - /** - * Synchronously get the UltraSonicUnoccupiedToOccupiedDelay attribute [attribute ID 33]. - *

    - * The UltraSonicUnoccupiedToOccupiedTime attribute specifies the time delay, in - * seconds, before the ultrasonic sensor changes to its unoccupied state when the - * sensed area becomes occupied. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getUltraSonicUnoccupiedToOccupiedDelay(final long refreshPeriod) { - if (attributes.get(ATTR_ULTRASONICUNOCCUPIEDTOOCCUPIEDDELAY).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_ULTRASONICUNOCCUPIEDTOOCCUPIEDDELAY).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_ULTRASONICUNOCCUPIEDTOOCCUPIEDDELAY)); - } - - /** - * Set the UltrasonicUnoccupiedToOccupiedThreshold attribute [attribute ID 34]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param ultrasonicUnoccupiedToOccupiedThreshold the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setUltrasonicUnoccupiedToOccupiedThreshold(final Object value) { - return write(attributes.get(ATTR_ULTRASONICUNOCCUPIEDTOOCCUPIEDTHRESHOLD), value); - } - - /** - * Get the UltrasonicUnoccupiedToOccupiedThreshold attribute [attribute ID 34]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getUltrasonicUnoccupiedToOccupiedThresholdAsync() { - return read(attributes.get(ATTR_ULTRASONICUNOCCUPIEDTOOCCUPIEDTHRESHOLD)); - } - - /** - * Synchronously get the UltrasonicUnoccupiedToOccupiedThreshold attribute [attribute ID 34]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getUltrasonicUnoccupiedToOccupiedThreshold(final long refreshPeriod) { - if (attributes.get(ATTR_ULTRASONICUNOCCUPIEDTOOCCUPIEDTHRESHOLD).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_ULTRASONICUNOCCUPIEDTOOCCUPIEDTHRESHOLD).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_ULTRASONICUNOCCUPIEDTOOCCUPIEDTHRESHOLD)); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclOnOffCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclOnOffCluster.java deleted file mode 100644 index c54c0b76c..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclOnOffCluster.java +++ /dev/null @@ -1,443 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.CommandResult; -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.clusters.onoff.OffCommand; -import com.zsmartsystems.zigbee.zcl.clusters.onoff.OffWithEffectCommand; -import com.zsmartsystems.zigbee.zcl.clusters.onoff.OnCommand; -import com.zsmartsystems.zigbee.zcl.clusters.onoff.OnWithRecallGlobalSceneCommand; -import com.zsmartsystems.zigbee.zcl.clusters.onoff.OnWithTimedOffCommand; -import com.zsmartsystems.zigbee.zcl.clusters.onoff.ToggleCommand; -import com.zsmartsystems.zigbee.zcl.protocol.ZclClusterType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Future; -import javax.annotation.Generated; - -/** - * On/Off cluster implementation (Cluster ID 0x0006). - *

    - * Attributes and commands for switching devices between ‘On’ and ‘Off’ states. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclOnOffCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0006; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "On/Off"; - - // Attribute constants - /** - * The OnOff attribute has the following values: 0 = Off, 1 = On - */ - public static final int ATTR_ONOFF = 0x0000; - /** - * In order to support the use case where the user gets back the last setting of the devices (e.g. level settings for lamps), a global scene is - * introduced which is stored when the devices are turned off and recalled when the devices are turned on. The global scene is defined as the - * scene that is stored with group identifier 0 and scene identifier 0. - *

    - * The GlobalSceneControl attribute is defined in order to prevent a second off command storing the all-devices-off situation as a global - * scene, and to prevent a second on command destroying the current settings by going back to the global scene. - *

    - * The GlobalSceneControl attribute SHALL be set to TRUE after the reception of a command which causes the OnOff attribute to be set to TRUE, - * such as a standard On command, a Move to level (with on/off) command, a Recall scene command or a On with recall global scene command. - *

    - * The GlobalSceneControl attribute is set to FALSE after reception of a Off with effect command. - */ - public static final int ATTR_GLOBALSCENECONTROL = 0x4000; - /** - */ - public static final int ATTR_OFFTIME = 0x4001; - /** - * The OffWaitTime attribute specifies the length of time (in 1/10ths second) that the “off” state SHALL be guarded to prevent an on command - * turning the device back to its “on” state (e.g., when leaving a room, the lights are turned off but an occupancy sensor detects the leaving - * person and attempts to turn the lights back on). If this attribute is set to 0x0000, the device SHALL remain in its current state. - */ - public static final int ATTR_OFFWAITTIME = 0x4002; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(4); - - attributeMap.put(ATTR_ONOFF, new ZclAttribute(ZclClusterType.ON_OFF, ATTR_ONOFF, "OnOff", ZclDataType.BOOLEAN, true, true, false, true)); - attributeMap.put(ATTR_GLOBALSCENECONTROL, new ZclAttribute(ZclClusterType.ON_OFF, ATTR_GLOBALSCENECONTROL, "GlobalSceneControl", ZclDataType.BOOLEAN, false, true, false, false)); - attributeMap.put(ATTR_OFFTIME, new ZclAttribute(ZclClusterType.ON_OFF, ATTR_OFFTIME, "OffTime", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, true, false)); - attributeMap.put(ATTR_OFFWAITTIME, new ZclAttribute(ZclClusterType.ON_OFF, ATTR_OFFWAITTIME, "OffWaitTime", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, true, false)); - - return attributeMap; - } - - /** - * Default constructor to create a On/Off cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclOnOffCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } - - /** - * Get the OnOff attribute [attribute ID 0]. - *

    - * The OnOff attribute has the following values: 0 = Off, 1 = On - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getOnOffAsync() { - return read(attributes.get(ATTR_ONOFF)); - } - - /** - * Synchronously get the OnOff attribute [attribute ID 0]. - *

    - * The OnOff attribute has the following values: 0 = Off, 1 = On - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Boolean} attribute value, or null on error - */ - public Boolean getOnOff(final long refreshPeriod) { - if (attributes.get(ATTR_ONOFF).isLastValueCurrent(refreshPeriod)) { - return (Boolean) attributes.get(ATTR_ONOFF).getLastValue(); - } - - return (Boolean) readSync(attributes.get(ATTR_ONOFF)); - } - - /** - * Set reporting for the OnOff attribute [attribute ID 0]. - *

    - * The OnOff attribute has the following values: 0 = Off, 1 = On - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param minInterval {@link int} minimum reporting period - * @param maxInterval {@link int} maximum reporting period - * @return the {@link Future} command result future - */ - public Future setOnOffReporting(final int minInterval, final int maxInterval) { - return setReporting(attributes.get(ATTR_ONOFF), minInterval, maxInterval); - } - - /** - * Get the GlobalSceneControl attribute [attribute ID 16384]. - *

    - * In order to support the use case where the user gets back the last setting of the devices (e.g. level settings for lamps), a global scene is - * introduced which is stored when the devices are turned off and recalled when the devices are turned on. The global scene is defined as the - * scene that is stored with group identifier 0 and scene identifier 0. - *

    - * The GlobalSceneControl attribute is defined in order to prevent a second off command storing the all-devices-off situation as a global - * scene, and to prevent a second on command destroying the current settings by going back to the global scene. - *

    - * The GlobalSceneControl attribute SHALL be set to TRUE after the reception of a command which causes the OnOff attribute to be set to TRUE, - * such as a standard On command, a Move to level (with on/off) command, a Recall scene command or a On with recall global scene command. - *

    - * The GlobalSceneControl attribute is set to FALSE after reception of a Off with effect command. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is - * - * @return the {@link Future} command result future - */ - public Future getGlobalSceneControlAsync() { - return read(attributes.get(ATTR_GLOBALSCENECONTROL)); - } - - /** - * Synchronously get the GlobalSceneControl attribute [attribute ID 16384]. - *

    - * In order to support the use case where the user gets back the last setting of the devices (e.g. level settings for lamps), a global scene is - * introduced which is stored when the devices are turned off and recalled when the devices are turned on. The global scene is defined as the - * scene that is stored with group identifier 0 and scene identifier 0. - *

    - * The GlobalSceneControl attribute is defined in order to prevent a second off command storing the all-devices-off situation as a global - * scene, and to prevent a second on command destroying the current settings by going back to the global scene. - *

    - * The GlobalSceneControl attribute SHALL be set to TRUE after the reception of a command which causes the OnOff attribute to be set to TRUE, - * such as a standard On command, a Move to level (with on/off) command, a Recall scene command or a On with recall global scene command. - *

    - * The GlobalSceneControl attribute is set to FALSE after reception of a Off with effect command. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Boolean} attribute value, or null on error - */ - public Boolean getGlobalSceneControl(final long refreshPeriod) { - if (attributes.get(ATTR_GLOBALSCENECONTROL).isLastValueCurrent(refreshPeriod)) { - return (Boolean) attributes.get(ATTR_GLOBALSCENECONTROL).getLastValue(); - } - - return (Boolean) readSync(attributes.get(ATTR_GLOBALSCENECONTROL)); - } - - /** - * Set the OffTime attribute [attribute ID 16385]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is - * - * @param offTime the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setOffTime(final Object value) { - return write(attributes.get(ATTR_OFFTIME), value); - } - - /** - * Get the OffTime attribute [attribute ID 16385]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is - * - * @return the {@link Future} command result future - */ - public Future getOffTimeAsync() { - return read(attributes.get(ATTR_OFFTIME)); - } - - /** - * Synchronously get the OffTime attribute [attribute ID 16385]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getOffTime(final long refreshPeriod) { - if (attributes.get(ATTR_OFFTIME).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_OFFTIME).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_OFFTIME)); - } - - /** - * Set the OffWaitTime attribute [attribute ID 16386]. - *

    - * The OffWaitTime attribute specifies the length of time (in 1/10ths second) that the “off” state SHALL be guarded to prevent an on command - * turning the device back to its “on” state (e.g., when leaving a room, the lights are turned off but an occupancy sensor detects the leaving - * person and attempts to turn the lights back on). If this attribute is set to 0x0000, the device SHALL remain in its current state. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is - * - * @param offWaitTime the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setOffWaitTime(final Object value) { - return write(attributes.get(ATTR_OFFWAITTIME), value); - } - - /** - * Get the OffWaitTime attribute [attribute ID 16386]. - *

    - * The OffWaitTime attribute specifies the length of time (in 1/10ths second) that the “off” state SHALL be guarded to prevent an on command - * turning the device back to its “on” state (e.g., when leaving a room, the lights are turned off but an occupancy sensor detects the leaving - * person and attempts to turn the lights back on). If this attribute is set to 0x0000, the device SHALL remain in its current state. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is - * - * @return the {@link Future} command result future - */ - public Future getOffWaitTimeAsync() { - return read(attributes.get(ATTR_OFFWAITTIME)); - } - - /** - * Synchronously get the OffWaitTime attribute [attribute ID 16386]. - *

    - * The OffWaitTime attribute specifies the length of time (in 1/10ths second) that the “off” state SHALL be guarded to prevent an on command - * turning the device back to its “on” state (e.g., when leaving a room, the lights are turned off but an occupancy sensor detects the leaving - * person and attempts to turn the lights back on). If this attribute is set to 0x0000, the device SHALL remain in its current state. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getOffWaitTime(final long refreshPeriod) { - if (attributes.get(ATTR_OFFWAITTIME).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_OFFWAITTIME).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_OFFWAITTIME)); - } - - /** - * The Off Command - * - * @return the {@link Future} command result future - */ - public Future offCommand() { - OffCommand command = new OffCommand(); - - return send(command); - } - - /** - * The On Command - * - * @return the {@link Future} command result future - */ - public Future onCommand() { - OnCommand command = new OnCommand(); - - return send(command); - } - - /** - * The Toggle Command - * - * @return the {@link Future} command result future - */ - public Future toggleCommand() { - ToggleCommand command = new ToggleCommand(); - - return send(command); - } - - /** - * The Off With Effect Command - *

    - * The Off With Effect command allows devices to be turned off using enhanced ways of fading. - * - * @param effectIdentifier {@link Integer} Effect Identifier - * @param effectVariant {@link Integer} Effect Variant - * @return the {@link Future} command result future - */ - public Future offWithEffectCommand(Integer effectIdentifier, Integer effectVariant) { - OffWithEffectCommand command = new OffWithEffectCommand(); - - // Set the fields - command.setEffectIdentifier(effectIdentifier); - command.setEffectVariant(effectVariant); - - return send(command); - } - - /** - * The On With Recall Global Scene Command - *

    - * The On With Recall Global Scene command allows the recall of the settings when the device was turned off. - * - * @return the {@link Future} command result future - */ - public Future onWithRecallGlobalSceneCommand() { - OnWithRecallGlobalSceneCommand command = new OnWithRecallGlobalSceneCommand(); - - return send(command); - } - - /** - * The On With Timed Off Command - *

    - * The On With Timed Off command allows devices to be turned on for a specific duration - * with a guarded off duration so that SHOULD the device be subsequently switched off, - * further On With Timed Off commands, received during this time, are prevented from - * turning the devices back on. Note that the device can be periodically re-kicked by - * subsequent On With Timed Off commands, e.g., from an on/off sensor. - * - * @param onOffControl {@link Integer} On Off Control - * @param onTime {@link Integer} On Time - * @param offWaitTime {@link Integer} Off Wait Time - * @return the {@link Future} command result future - */ - public Future onWithTimedOffCommand(Integer onOffControl, Integer onTime, Integer offWaitTime) { - OnWithTimedOffCommand command = new OnWithTimedOffCommand(); - - // Set the fields - command.setOnOffControl(onOffControl); - command.setOnTime(onTime); - command.setOffWaitTime(offWaitTime); - - return send(command); - } - - @Override - public ZclCommand getCommandFromId(int commandId) { - switch (commandId) { - case 0: // OFF_COMMAND - return new OffCommand(); - case 1: // ON_COMMAND - return new OnCommand(); - case 2: // TOGGLE_COMMAND - return new ToggleCommand(); - case 64: // OFF_WITH_EFFECT_COMMAND - return new OffWithEffectCommand(); - case 65: // ON_WITH_RECALL_GLOBAL_SCENE_COMMAND - return new OnWithRecallGlobalSceneCommand(); - case 66: // ON_WITH_TIMED_OFF_COMMAND - return new OnWithTimedOffCommand(); - default: - return null; - } - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclOnOffSwitchConfigurationCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclOnOffSwitchConfigurationCluster.java deleted file mode 100644 index e601f229c..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclOnOffSwitchConfigurationCluster.java +++ /dev/null @@ -1,172 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.CommandResult; -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import com.zsmartsystems.zigbee.zcl.protocol.ZclClusterType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Future; -import javax.annotation.Generated; - -/** - * On/off Switch Configuration cluster implementation (Cluster ID 0x0007). - *

    - * Attributes and commands for configuring On/Off switching devices - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclOnOffSwitchConfigurationCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0007; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "On/off Switch Configuration"; - - // Attribute constants - /** - * The SwitchTypeattribute specifies the basic functionality of the On/Off switching device. - */ - public static final int ATTR_SWITCHTYPE = 0x0000; - /** - * The SwitchActions attribute is 8 bits in length and specifies the commands of the On/Off cluster - * to be generated when the switch moves between its two states - */ - public static final int ATTR_SWITCHACTIONS = 0x0010; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(2); - - attributeMap.put(ATTR_SWITCHTYPE, new ZclAttribute(ZclClusterType.ON_OFF_SWITCH_CONFIGURATION, ATTR_SWITCHTYPE, "SwitchType", ZclDataType.ENUMERATION_8_BIT, true, true, false, false)); - attributeMap.put(ATTR_SWITCHACTIONS, new ZclAttribute(ZclClusterType.ON_OFF_SWITCH_CONFIGURATION, ATTR_SWITCHACTIONS, "SwitchActions", ZclDataType.ENUMERATION_8_BIT, true, true, true, false)); - - return attributeMap; - } - - /** - * Default constructor to create a On/off Switch Configuration cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclOnOffSwitchConfigurationCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } - - /** - * Get the SwitchType attribute [attribute ID 0]. - *

    - * The SwitchTypeattribute specifies the basic functionality of the On/Off switching device. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getSwitchTypeAsync() { - return read(attributes.get(ATTR_SWITCHTYPE)); - } - - /** - * Synchronously get the SwitchType attribute [attribute ID 0]. - *

    - * The SwitchTypeattribute specifies the basic functionality of the On/Off switching device. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getSwitchType(final long refreshPeriod) { - if (attributes.get(ATTR_SWITCHTYPE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_SWITCHTYPE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_SWITCHTYPE)); - } - - /** - * Set the SwitchActions attribute [attribute ID 16]. - *

    - * The SwitchActions attribute is 8 bits in length and specifies the commands of the On/Off cluster - * to be generated when the switch moves between its two states - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param switchActions the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setSwitchActions(final Object value) { - return write(attributes.get(ATTR_SWITCHACTIONS), value); - } - - /** - * Get the SwitchActions attribute [attribute ID 16]. - *

    - * The SwitchActions attribute is 8 bits in length and specifies the commands of the On/Off cluster - * to be generated when the switch moves between its two states - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getSwitchActionsAsync() { - return read(attributes.get(ATTR_SWITCHACTIONS)); - } - - /** - * Synchronously get the SwitchActions attribute [attribute ID 16]. - *

    - * The SwitchActions attribute is 8 bits in length and specifies the commands of the On/Off cluster - * to be generated when the switch moves between its two states - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getSwitchActions(final long refreshPeriod) { - if (attributes.get(ATTR_SWITCHACTIONS).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_SWITCHACTIONS).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_SWITCHACTIONS)); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclOtaUpgradeCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclOtaUpgradeCluster.java deleted file mode 100644 index 1804a8b76..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclOtaUpgradeCluster.java +++ /dev/null @@ -1,1087 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.CommandResult; -import com.zsmartsystems.zigbee.IeeeAddress; -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclStatus; -import com.zsmartsystems.zigbee.zcl.clusters.otaupgrade.ImageBlockCommand; -import com.zsmartsystems.zigbee.zcl.clusters.otaupgrade.ImageBlockResponse; -import com.zsmartsystems.zigbee.zcl.clusters.otaupgrade.ImageNotifyCommand; -import com.zsmartsystems.zigbee.zcl.clusters.otaupgrade.ImagePageCommand; -import com.zsmartsystems.zigbee.zcl.clusters.otaupgrade.QueryNextImageCommand; -import com.zsmartsystems.zigbee.zcl.clusters.otaupgrade.QueryNextImageResponse; -import com.zsmartsystems.zigbee.zcl.clusters.otaupgrade.QuerySpecificFileCommand; -import com.zsmartsystems.zigbee.zcl.clusters.otaupgrade.QuerySpecificFileResponse; -import com.zsmartsystems.zigbee.zcl.clusters.otaupgrade.UpgradeEndCommand; -import com.zsmartsystems.zigbee.zcl.clusters.otaupgrade.UpgradeEndResponse; -import com.zsmartsystems.zigbee.zcl.field.ByteArray; -import com.zsmartsystems.zigbee.zcl.protocol.ZclClusterType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Future; -import javax.annotation.Generated; - -/** - * OTA Upgrade cluster implementation (Cluster ID 0x0019). - *

    - * 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. - *

    - * It is the responsibility of the server to indicate to the clients when update images are available. The client MAY be upgraded or - * downgraded64. The upgrade server knows which client devices to upgrade and to what file version. The upgrade server MAY be notified of such - * information via the backend system. For ZR clients, the server MAY send a message to notify the device when an updated image is available. It - * is assumed that ZED clients will not be awake to receive an unsolicited notification of an available image. All clients (ZR and ZED) SHALL - * query (poll) the server periodically to determine whether the server has an image update for them. Image Notify is optional. - *

    - * The cluster is implemented in such a way that the client service works on both ZED and ZR devices. Being able to handle polling is mandatory for - * all server devices while being able to send a notify is optional. Hence, all client devices must be able to use a ‘poll’ mechanism to send query - * message to the server in order to see if the server has any new file for it. The polling mechanism also puts fewer resources on the upgrade - * server. It is ideal to have the server maintain as little state as possible since this will scale when there are hundreds of clients in the - * network. The upgrade server is not required to keep track of what pieces of an image that a particular client has received; instead the client - * SHALL do that. Lastly poll makes more sense for devices that MAY need to perform special setup to get ready to receive an image, such as - * unlocking flash or allocating space for the new image. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclOtaUpgradeCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0019; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "OTA Upgrade"; - - // Attribute constants - /** - * The attribute is used to store the IEEE address of the upgrade server resulted from the discovery of the - * upgrade server’s identity. If the value is set to a non-zero value and corresponds to an IEEE address of - * a device that is no longer accessible, a device may choose to discover a new Upgrade Server depending - * on its own security policies. - */ - public static final int ATTR_UPGRADESERVERID = 0x0000; - /** - * The parameter indicates the current location in the OTA upgrade image. It is essentially the (start of - * the) address of the image data that is being transferred from the OTA server to the client. The attribute - * is optional on the client and is made available in a case where the server wants to track the upgrade - * process of a particular client. - */ - public static final int ATTR_FILEOFFSET = 0x0001; - /** - * The file version of the running firmware image on the device. The information is available for the - * server to query via ZCL read attribute command. The attribute is optional on the client. - */ - public static final int ATTR_CURRENTFILEVERSION = 0x0002; - /** - * The ZigBee stack version of the running image on the device. The information is available for the - * server to query via ZCL read attribute command. The attribute is optional on the client. - */ - public static final int ATTR_CURRENTZIGBEESTACKVERSION = 0x0003; - /** - * The file version of the downloaded image on additional memory space on the device. The information - * is available for the server to query via ZCL read attribute command. The information is useful for the - * OTA upgrade management, so the server shall ensure that each client has downloaded the correct file - * version before initiate the upgrade. The attribute is optional on the client. - */ - public static final int ATTR_DOWNLOADEDFILEVERSION = 0x0004; - /** - * The ZigBee stack version of the downloaded image on additional memory space on the device. The - * information is available for the server to query via ZCL read attribute command. The information is - * useful for the OTA upgrade management, so the server shall ensure that each client has downloaded the - * correct ZigBee stack version before initiate the upgrade. The attribute is optional on the client. - */ - public static final int ATTR_DOWNLOADEDZIGBEESTACKVERSION = 0x0005; - /** - * The upgrade status of the client device. The status indicates where the client device is at in terms of the - * download and upgrade process. The status helps to indicate whether the client has completed the - * download process and whether it is ready to upgrade to the new image. The status may be queried by - * the server via ZCL read attribute command. Hence, the server may not be able to reliably query the - * status of ZED client since the device may have its radio off. The attribute is optional on the client. - */ - public static final int ATTR_IMAGEUPGRADESTATUS = 0x0006; - /** - */ - public static final int ATTR_MANUFACTURERID = 0x0007; - /** - */ - public static final int ATTR_IMAGETYPEID = 0x0008; - /** - * This attribute acts as a rate limiting feature for the server to slow down the client download and prevent - * saturating the network with block requests. The attribute lives on the client but can be changed during - * a download if rate limiting is supported by both devices. - * This attribute shall reflect the minimum delay between Image Block Request commands generated by - * the client in milliseconds. The value of this attribute shall be updated when the rate is changed by the - * server, but should reflect the client default when an upgrade is not in progress or a server does not - * support this feature. - * The value is in milliseconds and defaults to 0 (no delay). - */ - public static final int ATTR_MINIMUMBLOCKREQUESTDELAY = 0x0009; - /** - */ - public static final int ATTR_IMAGESTAMP = 0x000A; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(11); - - attributeMap.put(ATTR_UPGRADESERVERID, new ZclAttribute(ZclClusterType.OTA_UPGRADE, ATTR_UPGRADESERVERID, "UpgradeServerID", ZclDataType.IEEE_ADDRESS, true, true, false, false)); - attributeMap.put(ATTR_FILEOFFSET, new ZclAttribute(ZclClusterType.OTA_UPGRADE, ATTR_FILEOFFSET, "FileOffset", ZclDataType.UNSIGNED_32_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_CURRENTFILEVERSION, new ZclAttribute(ZclClusterType.OTA_UPGRADE, ATTR_CURRENTFILEVERSION, "CurrentFileVersion", ZclDataType.UNSIGNED_32_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_CURRENTZIGBEESTACKVERSION, new ZclAttribute(ZclClusterType.OTA_UPGRADE, ATTR_CURRENTZIGBEESTACKVERSION, "CurrentZigBeeStackVersion", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_DOWNLOADEDFILEVERSION, new ZclAttribute(ZclClusterType.OTA_UPGRADE, ATTR_DOWNLOADEDFILEVERSION, "DownloadedFileVersion", ZclDataType.UNSIGNED_32_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_DOWNLOADEDZIGBEESTACKVERSION, new ZclAttribute(ZclClusterType.OTA_UPGRADE, ATTR_DOWNLOADEDZIGBEESTACKVERSION, "DownloadedZigBeeStackVersion", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_IMAGEUPGRADESTATUS, new ZclAttribute(ZclClusterType.OTA_UPGRADE, ATTR_IMAGEUPGRADESTATUS, "ImageUpgradeStatus", ZclDataType.UNSIGNED_8_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_MANUFACTURERID, new ZclAttribute(ZclClusterType.OTA_UPGRADE, ATTR_MANUFACTURERID, "ManufacturerID", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_IMAGETYPEID, new ZclAttribute(ZclClusterType.OTA_UPGRADE, ATTR_IMAGETYPEID, "ImageTypeID", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_MINIMUMBLOCKREQUESTDELAY, new ZclAttribute(ZclClusterType.OTA_UPGRADE, ATTR_MINIMUMBLOCKREQUESTDELAY, "MinimumBlockRequestDelay", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_IMAGESTAMP, new ZclAttribute(ZclClusterType.OTA_UPGRADE, ATTR_IMAGESTAMP, "ImageStamp", ZclDataType.UNSIGNED_32_BIT_INTEGER, false, true, false, false)); - - return attributeMap; - } - - /** - * Default constructor to create a OTA Upgrade cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclOtaUpgradeCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } - - /** - * Get the UpgradeServerID attribute [attribute ID 0]. - *

    - * The attribute is used to store the IEEE address of the upgrade server resulted from the discovery of the - * upgrade server’s identity. If the value is set to a non-zero value and corresponds to an IEEE address of - * a device that is no longer accessible, a device may choose to discover a new Upgrade Server depending - * on its own security policies. - *

    - * The attribute is of type {@link IeeeAddress}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getUpgradeServerIdAsync() { - return read(attributes.get(ATTR_UPGRADESERVERID)); - } - - /** - * Synchronously get the UpgradeServerID attribute [attribute ID 0]. - *

    - * The attribute is used to store the IEEE address of the upgrade server resulted from the discovery of the - * upgrade server’s identity. If the value is set to a non-zero value and corresponds to an IEEE address of - * a device that is no longer accessible, a device may choose to discover a new Upgrade Server depending - * on its own security policies. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link IeeeAddress}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link IeeeAddress} attribute value, or null on error - */ - public IeeeAddress getUpgradeServerId(final long refreshPeriod) { - if (attributes.get(ATTR_UPGRADESERVERID).isLastValueCurrent(refreshPeriod)) { - return (IeeeAddress) attributes.get(ATTR_UPGRADESERVERID).getLastValue(); - } - - return (IeeeAddress) readSync(attributes.get(ATTR_UPGRADESERVERID)); - } - - /** - * Get the FileOffset attribute [attribute ID 1]. - *

    - * The parameter indicates the current location in the OTA upgrade image. It is essentially the (start of - * the) address of the image data that is being transferred from the OTA server to the client. The attribute - * is optional on the client and is made available in a case where the server wants to track the upgrade - * process of a particular client. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getFileOffsetAsync() { - return read(attributes.get(ATTR_FILEOFFSET)); - } - - /** - * Synchronously get the FileOffset attribute [attribute ID 1]. - *

    - * The parameter indicates the current location in the OTA upgrade image. It is essentially the (start of - * the) address of the image data that is being transferred from the OTA server to the client. The attribute - * is optional on the client and is made available in a case where the server wants to track the upgrade - * process of a particular client. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getFileOffset(final long refreshPeriod) { - if (attributes.get(ATTR_FILEOFFSET).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_FILEOFFSET).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_FILEOFFSET)); - } - - /** - * Get the CurrentFileVersion attribute [attribute ID 2]. - *

    - * The file version of the running firmware image on the device. The information is available for the - * server to query via ZCL read attribute command. The attribute is optional on the client. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getCurrentFileVersionAsync() { - return read(attributes.get(ATTR_CURRENTFILEVERSION)); - } - - /** - * Synchronously get the CurrentFileVersion attribute [attribute ID 2]. - *

    - * The file version of the running firmware image on the device. The information is available for the - * server to query via ZCL read attribute command. The attribute is optional on the client. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getCurrentFileVersion(final long refreshPeriod) { - if (attributes.get(ATTR_CURRENTFILEVERSION).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_CURRENTFILEVERSION).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_CURRENTFILEVERSION)); - } - - /** - * Get the CurrentZigBeeStackVersion attribute [attribute ID 3]. - *

    - * The ZigBee stack version of the running image on the device. The information is available for the - * server to query via ZCL read attribute command. The attribute is optional on the client. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getCurrentZigBeeStackVersionAsync() { - return read(attributes.get(ATTR_CURRENTZIGBEESTACKVERSION)); - } - - /** - * Synchronously get the CurrentZigBeeStackVersion attribute [attribute ID 3]. - *

    - * The ZigBee stack version of the running image on the device. The information is available for the - * server to query via ZCL read attribute command. The attribute is optional on the client. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getCurrentZigBeeStackVersion(final long refreshPeriod) { - if (attributes.get(ATTR_CURRENTZIGBEESTACKVERSION).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_CURRENTZIGBEESTACKVERSION).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_CURRENTZIGBEESTACKVERSION)); - } - - /** - * Get the DownloadedFileVersion attribute [attribute ID 4]. - *

    - * The file version of the downloaded image on additional memory space on the device. The information - * is available for the server to query via ZCL read attribute command. The information is useful for the - * OTA upgrade management, so the server shall ensure that each client has downloaded the correct file - * version before initiate the upgrade. The attribute is optional on the client. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getDownloadedFileVersionAsync() { - return read(attributes.get(ATTR_DOWNLOADEDFILEVERSION)); - } - - /** - * Synchronously get the DownloadedFileVersion attribute [attribute ID 4]. - *

    - * The file version of the downloaded image on additional memory space on the device. The information - * is available for the server to query via ZCL read attribute command. The information is useful for the - * OTA upgrade management, so the server shall ensure that each client has downloaded the correct file - * version before initiate the upgrade. The attribute is optional on the client. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getDownloadedFileVersion(final long refreshPeriod) { - if (attributes.get(ATTR_DOWNLOADEDFILEVERSION).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_DOWNLOADEDFILEVERSION).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_DOWNLOADEDFILEVERSION)); - } - - /** - * Get the DownloadedZigBeeStackVersion attribute [attribute ID 5]. - *

    - * The ZigBee stack version of the downloaded image on additional memory space on the device. The - * information is available for the server to query via ZCL read attribute command. The information is - * useful for the OTA upgrade management, so the server shall ensure that each client has downloaded the - * correct ZigBee stack version before initiate the upgrade. The attribute is optional on the client. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getDownloadedZigBeeStackVersionAsync() { - return read(attributes.get(ATTR_DOWNLOADEDZIGBEESTACKVERSION)); - } - - /** - * Synchronously get the DownloadedZigBeeStackVersion attribute [attribute ID 5]. - *

    - * The ZigBee stack version of the downloaded image on additional memory space on the device. The - * information is available for the server to query via ZCL read attribute command. The information is - * useful for the OTA upgrade management, so the server shall ensure that each client has downloaded the - * correct ZigBee stack version before initiate the upgrade. The attribute is optional on the client. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getDownloadedZigBeeStackVersion(final long refreshPeriod) { - if (attributes.get(ATTR_DOWNLOADEDZIGBEESTACKVERSION).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_DOWNLOADEDZIGBEESTACKVERSION).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_DOWNLOADEDZIGBEESTACKVERSION)); - } - - /** - * Get the ImageUpgradeStatus attribute [attribute ID 6]. - *

    - * The upgrade status of the client device. The status indicates where the client device is at in terms of the - * download and upgrade process. The status helps to indicate whether the client has completed the - * download process and whether it is ready to upgrade to the new image. The status may be queried by - * the server via ZCL read attribute command. Hence, the server may not be able to reliably query the - * status of ZED client since the device may have its radio off. The attribute is optional on the client. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getImageUpgradeStatusAsync() { - return read(attributes.get(ATTR_IMAGEUPGRADESTATUS)); - } - - /** - * Synchronously get the ImageUpgradeStatus attribute [attribute ID 6]. - *

    - * The upgrade status of the client device. The status indicates where the client device is at in terms of the - * download and upgrade process. The status helps to indicate whether the client has completed the - * download process and whether it is ready to upgrade to the new image. The status may be queried by - * the server via ZCL read attribute command. Hence, the server may not be able to reliably query the - * status of ZED client since the device may have its radio off. The attribute is optional on the client. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getImageUpgradeStatus(final long refreshPeriod) { - if (attributes.get(ATTR_IMAGEUPGRADESTATUS).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_IMAGEUPGRADESTATUS).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_IMAGEUPGRADESTATUS)); - } - - /** - * Get the ManufacturerID attribute [attribute ID 7]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getManufacturerIdAsync() { - return read(attributes.get(ATTR_MANUFACTURERID)); - } - - /** - * Synchronously get the ManufacturerID attribute [attribute ID 7]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getManufacturerId(final long refreshPeriod) { - if (attributes.get(ATTR_MANUFACTURERID).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MANUFACTURERID).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MANUFACTURERID)); - } - - /** - * Get the ImageTypeID attribute [attribute ID 8]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getImageTypeIdAsync() { - return read(attributes.get(ATTR_IMAGETYPEID)); - } - - /** - * Synchronously get the ImageTypeID attribute [attribute ID 8]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getImageTypeId(final long refreshPeriod) { - if (attributes.get(ATTR_IMAGETYPEID).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_IMAGETYPEID).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_IMAGETYPEID)); - } - - /** - * Get the MinimumBlockRequestDelay attribute [attribute ID 9]. - *

    - * This attribute acts as a rate limiting feature for the server to slow down the client download and prevent - * saturating the network with block requests. The attribute lives on the client but can be changed during - * a download if rate limiting is supported by both devices. - * This attribute shall reflect the minimum delay between Image Block Request commands generated by - * the client in milliseconds. The value of this attribute shall be updated when the rate is changed by the - * server, but should reflect the client default when an upgrade is not in progress or a server does not - * support this feature. - * The value is in milliseconds and defaults to 0 (no delay). - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getMinimumBlockRequestDelayAsync() { - return read(attributes.get(ATTR_MINIMUMBLOCKREQUESTDELAY)); - } - - /** - * Synchronously get the MinimumBlockRequestDelay attribute [attribute ID 9]. - *

    - * This attribute acts as a rate limiting feature for the server to slow down the client download and prevent - * saturating the network with block requests. The attribute lives on the client but can be changed during - * a download if rate limiting is supported by both devices. - * This attribute shall reflect the minimum delay between Image Block Request commands generated by - * the client in milliseconds. The value of this attribute shall be updated when the rate is changed by the - * server, but should reflect the client default when an upgrade is not in progress or a server does not - * support this feature. - * The value is in milliseconds and defaults to 0 (no delay). - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMinimumBlockRequestDelay(final long refreshPeriod) { - if (attributes.get(ATTR_MINIMUMBLOCKREQUESTDELAY).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MINIMUMBLOCKREQUESTDELAY).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MINIMUMBLOCKREQUESTDELAY)); - } - - /** - * Get the ImageStamp attribute [attribute ID 10]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getImageStampAsync() { - return read(attributes.get(ATTR_IMAGESTAMP)); - } - - /** - * Synchronously get the ImageStamp attribute [attribute ID 10]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getImageStamp(final long refreshPeriod) { - if (attributes.get(ATTR_IMAGESTAMP).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_IMAGESTAMP).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_IMAGESTAMP)); - } - - /** - * The Image Notify Command - *

    - * The purpose of sending Image Notify command is so the server has a way to notify client devices of - * when the OTA upgrade images are available for them. It eliminates the need for ZR client devices - * having to check with the server periodically of when the new images are available. However, all client - * devices still need to send in Query Next Image Request command in order to officially start the OTA - * upgrade process. - *
    - * For ZR client devices, the upgrade server may send out a unicast, broadcast, or multicast indicating it - * has the next upgrade image, via an Image Notify command. Since the command may not have APS - * security (if it is broadcast or multicast), it is considered purely informational and not authoritative. - * Even in the case of a unicast, ZR shall continue to perform the query process described in later section. - *
    - * When the command is sent with payload type value of zero, it generally means the server wishes to - * notify all clients disregard of their manufacturers, image types or file versions. Query jitter is needed - * to protect the server from being flooded with clients’ queries for next image. - * - * @param payloadType {@link Integer} Payload type - * @param queryJitter {@link Integer} Query jitter - * @param manufacturerCode {@link Integer} Manufacturer code - * @param imageType {@link Integer} Image type - * @param newFileVersion {@link Integer} New File Version - * @return the {@link Future} command result future - */ - public Future imageNotifyCommand(Integer payloadType, Integer queryJitter, Integer manufacturerCode, Integer imageType, Integer newFileVersion) { - ImageNotifyCommand command = new ImageNotifyCommand(); - - // Set the fields - command.setPayloadType(payloadType); - command.setQueryJitter(queryJitter); - command.setManufacturerCode(manufacturerCode); - command.setImageType(imageType); - command.setNewFileVersion(newFileVersion); - - return send(command); - } - - /** - * The Query Next Image Command - *

    - * Client devices shall send a Query Next Image Request command to the server to see if there is new - * OTA upgrade image available. ZR devices may send the command after receiving Image Notify - * command. ZED device shall periodically wake up and send the command to the upgrade server. Client - * devices query what the next image is, based on their own information. - *
    - * The server takes the client’s information in the command and determines whether it has a suitable - * image for the particular client. The decision should be based on specific policy that is specific to the - * upgrade server and outside the scope of this document.. However, a recommended default policy is for - * the server to send back a response that indicates the availability of an image that matches the - * manufacturer code, image type, and the highest available file version of that image on the - * server. However, the server may choose to upgrade, downgrade, or reinstall clients’ image, as its - * policy dictates. If client’s hardware version is included in the command, the server shall examine the - * value against the minimum and maximum hardware versions included in the OTA file header. - * - * @param fieldControl {@link Integer} Field control - * @param manufacturerCode {@link Integer} Manufacturer code - * @param imageType {@link Integer} Image type - * @param fileVersion {@link Integer} File version - * @param hardwareVersion {@link Integer} Hardware version - * @return the {@link Future} command result future - */ - public Future queryNextImageCommand(Integer fieldControl, Integer manufacturerCode, Integer imageType, Integer fileVersion, Integer hardwareVersion) { - QueryNextImageCommand command = new QueryNextImageCommand(); - - // Set the fields - command.setFieldControl(fieldControl); - command.setManufacturerCode(manufacturerCode); - command.setImageType(imageType); - command.setFileVersion(fileVersion); - command.setHardwareVersion(hardwareVersion); - - return send(command); - } - - /** - * The Image Block Command - *

    - * The client device requests the image data at its leisure by sending Image Block Request command to - * the upgrade server. The client knows the total number of request commands it needs to send from the - * image size value received in Query Next Image Response command. - *
    - * The client repeats Image Block Requests until it has successfully obtained all data. Manufacturer code, - * image type and file version are included in all further queries regarding that image. The information - * eliminates the need for the server to remember which OTA Upgrade Image is being used for each - * download process. - *
    - * If the client supports the BlockRequestDelay attribute it shall include the value of the attribute as the - * BlockRequestDelay field of the Image Block Request message. The client shall ensure that it delays at - * least BlockRequestDelay milliseconds after the previous Image Block Request was sent before sending - * the next Image Block Request message. A client may delay its next Image Block Requests longer than - * its BlockRequestDelay attribute. - * - * @param fieldControl {@link Integer} Field control - * @param manufacturerCode {@link Integer} Manufacturer code - * @param imageType {@link Integer} Image type - * @param fileVersion {@link Integer} File version - * @param fileOffset {@link Integer} File offset - * @param maximumDataSize {@link Integer} Maximum data size - * @param requestNodeAddress {@link IeeeAddress} Request node address - * @param blockRequestDelay {@link Integer} BlockRequestDelay - * @return the {@link Future} command result future - */ - public Future imageBlockCommand(Integer fieldControl, Integer manufacturerCode, Integer imageType, Integer fileVersion, Integer fileOffset, Integer maximumDataSize, IeeeAddress requestNodeAddress, Integer blockRequestDelay) { - ImageBlockCommand command = new ImageBlockCommand(); - - // Set the fields - command.setFieldControl(fieldControl); - command.setManufacturerCode(manufacturerCode); - command.setImageType(imageType); - command.setFileVersion(fileVersion); - command.setFileOffset(fileOffset); - command.setMaximumDataSize(maximumDataSize); - command.setRequestNodeAddress(requestNodeAddress); - command.setBlockRequestDelay(blockRequestDelay); - - return send(command); - } - - /** - * The Image Page Command - *

    - * The support for the command is optional. The client device may choose to request OTA upgrade data - * in one page size at a time from upgrade server. Using Image Page Request reduces the numbers of - * requests sent from the client to the upgrade server, compared to using Image Block Request command. - * In order to conserve battery life a device may use the Image Page Request command. Using the Image - * Page Request command eliminates the need for the client device to send Image Block Request - * command for every data block it needs; possibly saving the transmission of hundreds or thousands of - * messages depending on the image size. - *
    - * The client keeps track of how much data it has received by keeping a cumulative count of each data - * size it has received in each Image Block Response. Once the count has reach the value of the page size - * requested, it shall repeat Image Page Requests until it has successfully obtained all pages. Note that the - * client may choose to switch between using Image Block Request and Image Page Request during the - * upgrade process. For example, if the client does not receive all data requested in one Image Page - * Request, the client may choose to request the missing block of data using Image Block Request - * command, instead of requesting the whole page again. - * - * @param fieldControl {@link Integer} Field control - * @param manufacturerCode {@link Integer} Manufacturer code - * @param imageType {@link Integer} Image type - * @param fileVersion {@link Integer} File version - * @param fileOffset {@link Integer} File offset - * @param maximumDataSize {@link Integer} Maximum data size - * @param pageSize {@link Integer} Page size - * @param responseSpacing {@link Integer} Response spacing - * @param requestNodeAddress {@link IeeeAddress} Request node address - * @return the {@link Future} command result future - */ - public Future imagePageCommand(Integer fieldControl, Integer manufacturerCode, Integer imageType, Integer fileVersion, Integer fileOffset, Integer maximumDataSize, Integer pageSize, Integer responseSpacing, IeeeAddress requestNodeAddress) { - ImagePageCommand command = new ImagePageCommand(); - - // Set the fields - command.setFieldControl(fieldControl); - command.setManufacturerCode(manufacturerCode); - command.setImageType(imageType); - command.setFileVersion(fileVersion); - command.setFileOffset(fileOffset); - command.setMaximumDataSize(maximumDataSize); - command.setPageSize(pageSize); - command.setResponseSpacing(responseSpacing); - command.setRequestNodeAddress(requestNodeAddress); - - return send(command); - } - - /** - * The Upgrade End Command - *

    - * Upon reception all the image data, the client should verify the image to ensure its integrity and validity. - * If the device requires signed images it shall examine the image and verify the signature. Clients may perform - * additional manufacturer specific integrity checks to validate the image, for example, CRC check on the actual file data. - *
    - * If the image fails any integrity checks, the client shall send an Upgrade End Request command to the - * upgrade server with a status of INVALID_IMAGE. In this case, the client may reinitiate the upgrade - * process in order to obtain a valid OTA upgrade image. The client shall not upgrade to the bad image - * and shall discard the downloaded image data. - *
    - * If the image passes all integrity checks and the client does not require additional OTA upgrade image - * file, it shall send back an Upgrade End Request with a status of SUCCESS. However, if the client - * requires multiple OTA upgrade image files before performing an upgrade, it shall send an Upgrade End - * Request command with status REQUIRE_MORE_IMAGE. This shall indicate to the server that it - * cannot yet upgrade the image it received. - *
    - * If the client decides to cancel the download process for any other reasons, it has the option of sending - * Upgrade End Request with status of ABORT at anytime during the download process. The client shall - * then try to reinitiate the download process again at a later time. - * - * @param status {@link ZclStatus} Status - * @param manufacturerCode {@link Integer} Manufacturer code - * @param imageType {@link Integer} Image type - * @param fileVersion {@link Integer} File Version - * @return the {@link Future} command result future - */ - public Future upgradeEndCommand(ZclStatus status, Integer manufacturerCode, Integer imageType, Integer fileVersion) { - UpgradeEndCommand command = new UpgradeEndCommand(); - - // Set the fields - command.setStatus(status); - command.setManufacturerCode(manufacturerCode); - command.setImageType(imageType); - command.setFileVersion(fileVersion); - - return send(command); - } - - /** - * The Query Specific File Command - *

    - * Client devices shall send a Query Specific File Request command to the server to request for a file that - * is specific and unique to it. Such file could contain non-firmware data such as security credential - * (needed for upgrading from Smart Energy 1.1 to Smart Energy 2.0), configuration or log. When the - * device decides to send the Query Specific File Request command is manufacturer specific. However, - * one example is during upgrading from SE 1.1 to 2.0 where the client may have already obtained new - * SE 2.0 image and now needs new SE 2.0 security credential data. - * - * @param requestNodeAddress {@link IeeeAddress} Request node address - * @param manufacturerCode {@link Integer} Manufacturer code - * @param imageType {@link Integer} Image type - * @param fileVersion {@link Integer} File Version - * @param zigbeeStackVersion {@link Integer} Zigbee Stack Version - * @return the {@link Future} command result future - */ - public Future querySpecificFileCommand(IeeeAddress requestNodeAddress, Integer manufacturerCode, Integer imageType, Integer fileVersion, Integer zigbeeStackVersion) { - QuerySpecificFileCommand command = new QuerySpecificFileCommand(); - - // Set the fields - command.setRequestNodeAddress(requestNodeAddress); - command.setManufacturerCode(manufacturerCode); - command.setImageType(imageType); - command.setFileVersion(fileVersion); - command.setZigbeeStackVersion(zigbeeStackVersion); - - return send(command); - } - - /** - * The Query Next Image Response - *

    - * The upgrade server sends a Query Next Image Response with one of the following status: SUCCESS, - * NO_IMAGE_AVAILABLE or NOT_AUTHORIZED. When a SUCCESS status is sent, it is - * considered to be the explicit authorization to a device by the upgrade server that the device may - * upgrade to a specific software image. - *
    - * A status of NO_IMAGE_AVAILABLE indicates that the server is authorized to upgrade the client but - * it currently does not have the (new) OTA upgrade image available for the client. For all clients (both - * ZR and ZED)9 , they shall continue sending Query Next Image Requests to the server periodically until - * an image becomes available. - *
    - * A status of NOT_AUTHORIZED indicates the server is not authorized to upgrade the client. In this - * case, the client may perform discovery again to find another upgrade server. The client may implement - * an intelligence to avoid querying the same unauthorized server. - * - * @param status {@link ZclStatus} Status - * @param manufacturerCode {@link Integer} Manufacturer code - * @param imageType {@link Integer} Image type - * @param fileVersion {@link Integer} File Version - * @param imageSize {@link Integer} Image Size - * @return the {@link Future} command result future - */ - public Future queryNextImageResponse(ZclStatus status, Integer manufacturerCode, Integer imageType, Integer fileVersion, Integer imageSize) { - QueryNextImageResponse command = new QueryNextImageResponse(); - - // Set the fields - command.setStatus(status); - command.setManufacturerCode(manufacturerCode); - command.setImageType(imageType); - command.setFileVersion(fileVersion); - command.setImageSize(imageSize); - - return send(command); - } - - /** - * The Image Block Response - *

    - * Upon receipt of an Image Block Request command the server shall generate an Image Block Response. - * If the server is able to retrieve the data for the client and does not wish to change the image download - * rate, it will respond with a status of SUCCESS and it will include all the fields in the payload. The use - * of file offset allows the server to send packets with variable data size during the upgrade process. This - * allows the server to support a case when the network topology of a client may change during the - * upgrade process, for example, mobile client may move around during the upgrade process. If the client - * has moved a few hops away, the data size shall be smaller. Moreover, using file offset eliminates the - * need for data padding since each Image Block Response command may contain different data size. A - * simple server implementation may choose to only support largest possible data size for the worst-case - * scenario in order to avoid supporting sending packets with variable data size. - *
    - * The server shall respect the maximum data size value requested by the client and shall not send the data - * with length greater than that value. The server may send the data with length smaller than the value - * depending on the network topology of the client. For example, the client may be able to receive 100 - * bytes of data at once so it sends the request with 100 as maximum data size. But after considering all - * the security headers (perhaps from both APS and network levels) and source routing overhead (for - * example, the client is five hops away), the largest possible data size that the server can send to the - * client shall be smaller than 100 bytes. - * - * @param status {@link ZclStatus} Status - * @param manufacturerCode {@link Integer} Manufacturer code - * @param imageType {@link Integer} Image type - * @param fileVersion {@link Integer} File Version - * @param fileOffset {@link Integer} File offset - * @param imageData {@link ByteArray} Image Data - * @return the {@link Future} command result future - */ - public Future imageBlockResponse(ZclStatus status, Integer manufacturerCode, Integer imageType, Integer fileVersion, Integer fileOffset, ByteArray imageData) { - ImageBlockResponse command = new ImageBlockResponse(); - - // Set the fields - command.setStatus(status); - command.setManufacturerCode(manufacturerCode); - command.setImageType(imageType); - command.setFileVersion(fileVersion); - command.setFileOffset(fileOffset); - command.setImageData(imageData); - - return send(command); - } - - /** - * The Upgrade End Response - *

    - * When an upgrade server receives an Upgrade End Request command with a status of - * INVALID_IMAGE, REQUIRE_MORE_IMAGE, or ABORT, no additional processing shall be done - * in its part. If the upgrade server receives an Upgrade End Request command with a status of - * SUCCESS, it shall generate an Upgrade End Response with the manufacturer code and image type - * received in the Upgrade End Request along with the times indicating when the device should upgrade - * to the new image. - *
    - * The server may send an unsolicited Upgrade End Response command to the client. This may be used - * for example if the server wants to synchronize the upgrade on multiple clients simultaneously. For - * client devices, the upgrade server may unicast or broadcast Upgrade End Response command - * indicating a single client device or multiple client devices shall switch to using their new images. The - * command may not be reliably received by sleepy devices if it is sent unsolicited. - * - * @param manufacturerCode {@link Integer} Manufacturer code - * @param imageType {@link Integer} Image type - * @param fileVersion {@link Integer} File Version - * @param currentTime {@link Integer} Current Time - * @param upgradeTime {@link Integer} Upgrade Time - * @return the {@link Future} command result future - */ - public Future upgradeEndResponse(Integer manufacturerCode, Integer imageType, Integer fileVersion, Integer currentTime, Integer upgradeTime) { - UpgradeEndResponse command = new UpgradeEndResponse(); - - // Set the fields - command.setManufacturerCode(manufacturerCode); - command.setImageType(imageType); - command.setFileVersion(fileVersion); - command.setCurrentTime(currentTime); - command.setUpgradeTime(upgradeTime); - - return send(command); - } - - /** - * The Query Specific File Response - *

    - * The server sends Query Specific File Response after receiving Query Specific File Request from a - * client. The server shall determine whether it first supports the Query Specific File Request command. - * Then it shall determine whether it has the specific file being requested by the client using all the - * information included in the request. The upgrade server sends a Query Specific File Response with - * one of the following status: SUCCESS, NO_IMAGE_AVAILABLE or NOT_AUTHORIZED. - *
    - * A status of NO_IMAGE_AVAILABLE indicates that the server currently does not have the device - * specific file available for the client. A status of NOT_AUTHORIZED indicates the server is not - * authorized to send the file to the client. - * - * @param status {@link ZclStatus} Status - * @param manufacturerCode {@link Integer} Manufacturer code - * @param imageType {@link Integer} Image type - * @param fileVersion {@link Integer} File Version - * @param imageSize {@link Integer} Image Size - * @return the {@link Future} command result future - */ - public Future querySpecificFileResponse(ZclStatus status, Integer manufacturerCode, Integer imageType, Integer fileVersion, Integer imageSize) { - QuerySpecificFileResponse command = new QuerySpecificFileResponse(); - - // Set the fields - command.setStatus(status); - command.setManufacturerCode(manufacturerCode); - command.setImageType(imageType); - command.setFileVersion(fileVersion); - command.setImageSize(imageSize); - - return send(command); - } - - @Override - public ZclCommand getCommandFromId(int commandId) { - switch (commandId) { - case 0: // IMAGE_NOTIFY_COMMAND - return new ImageNotifyCommand(); - case 1: // QUERY_NEXT_IMAGE_COMMAND - return new QueryNextImageCommand(); - case 3: // IMAGE_BLOCK_COMMAND - return new ImageBlockCommand(); - case 4: // IMAGE_PAGE_COMMAND - return new ImagePageCommand(); - case 6: // UPGRADE_END_COMMAND - return new UpgradeEndCommand(); - case 8: // QUERY_SPECIFIC_FILE_COMMAND - return new QuerySpecificFileCommand(); - default: - return null; - } - } - - @Override - public ZclCommand getResponseFromId(int commandId) { - switch (commandId) { - case 2: // QUERY_NEXT_IMAGE_RESPONSE - return new QueryNextImageResponse(); - case 5: // IMAGE_BLOCK_RESPONSE - return new ImageBlockResponse(); - case 7: // UPGRADE_END_RESPONSE - return new UpgradeEndResponse(); - case 9: // QUERY_SPECIFIC_FILE_RESPONSE - return new QuerySpecificFileResponse(); - default: - return null; - } - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclPollControlCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclPollControlCluster.java deleted file mode 100644 index 17376356b..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclPollControlCluster.java +++ /dev/null @@ -1,750 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.CommandResult; -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.clusters.pollcontrol.CheckInCommand; -import com.zsmartsystems.zigbee.zcl.clusters.pollcontrol.CheckInResponse; -import com.zsmartsystems.zigbee.zcl.clusters.pollcontrol.FastPollStopCommand; -import com.zsmartsystems.zigbee.zcl.clusters.pollcontrol.SetLongPollIntervalCommand; -import com.zsmartsystems.zigbee.zcl.clusters.pollcontrol.SetShortPollIntervalCommand; -import com.zsmartsystems.zigbee.zcl.protocol.ZclClusterType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Future; -import javax.annotation.Generated; - -/** - * Poll Control cluster implementation (Cluster ID 0x0020). - *

    - * 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. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclPollControlCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0020; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Poll Control"; - - // Attribute constants - /** - * The Poll Control server is responsible for checking in with the poll control client periodically to see if the poll control client wants to - * modify the poll rate of the poll control server. This is due to the fact that the PollControl server is implemented on an end device that MAY - * have an unpredictable sleep-wake cycle. The CheckinInterval represents the default amount of time between check-ins by the poll control - * server with the poll control client. The CheckinInterval is measured in quarter-seconds. A value of 0 indicates that the Poll Control - * Server is turned off and the poll control server will not check-in with the poll control client. The Poll Control Server checks in with the - * Poll Control Client by sending a Checkin command to the Client. This value SHOULDbe longer than the LongPoll Interval attribute. If the - * Client writes an invalid attribute value (Example: Out of Range or a value smaller than the optional Check-inIntervalMinattribute value - * or a value smaller than the LongPollInterval attribute value), the Server SHOULD return Write Attributes Response with an error status not - * equal to ZCL_SUCCESS. The Poll Control Client will hold onto the actions or messages for the Poll Control Server at the application level - * until the Poll Control Server checks in with the Poll Control Client. - */ - public static final int ATTR_CHECKININTERVAL = 0x0000; - /** - * An end device that implements the Poll Control server MAY optionally expose a LongPollInterval attribute. - * The Long Poll Interval represents the maximum amount of time in quarter-seconds between MAC Data Requests - * from the end device to its parent. - *

    - * The LongPollInterval defines the frequency of polling that an end device does when it is NOT in fast poll mode. The LongPollInterval SHOULD - * be longer than the ShortPollInterval attribute but shorter than the CheckinInterval attribute.A value of 0xffffffff is reserved to - * indicate that the device does not have or does not know its long poll interval - */ - public static final int ATTR_LONGPOLLINTERVAL = 0x0001; - /** - * An end device that implements the Poll Control server MAY optionally expose the ShortPollInterval attribute. The - * ShortPollIntervalrepresents the number of quarterseconds that an end device waits between MAC Data Requests to its parent when it is - * expecting data (i.e.,in fast poll mode). - */ - public static final int ATTR_SHORTPOLLINTERVAL = 0x0002; - /** - * The FastPollTimeout attribute represents the number of quarterseconds that an end device will stay in fast poll mode by default. It is - * suggested that the FastPollTimeoutattribute value be greater than 7.68 seconds.The Poll Control Cluster Client MAYoverride this value - * by indicating a different value in the Fast Poll Duration argument in the Check-in Response command. If the Client writes a value out of range - * or greater than the optional FastPollTimeoutMax attribute value if supported, the Server SHOULD return a Write Attributes Response with a - * status of INVALID_VALUE30. An end device that implements the Poll Control server can be put into a fast poll mode during which it will send MAC - * Data Requests to its parent at the frequency of its configured ShortPollInterval attribute. During this period of time, fast polling is - * considered active. When the device goes into fast poll mode, it is required to send MAC DataRequests to its parent at an accelerated rate and - * is thus more responsive on the network and can receive data asynchronously from the device implementing the Poll Control Cluster Client. - */ - public static final int ATTR_FASTPOLLTIMEOUT = 0x0003; - /** - * The Poll Control Server MAY optionally provide its own minimum value for the Check-inInterval to protect against the Check-inInterval - * being set too low and draining the battery on the end device implementing the Poll Control Server. - */ - public static final int ATTR_CHECKININTERVALMIN = 0x0004; - /** - * The Poll Control Server MAYoptionally provide its own minimum value for the LongPollIntervalto protect against another device setting - * the value to too short a time resulting in an inadvertent power drain on the device. - */ - public static final int ATTR_LONGPOLLINTERVALMIN = 0x0005; - /** - * The Poll Control Server MAY optionally provide its own maximum value for the FastPollTimeout to avoid it being set to too high a value - * resulting in an inadvertent power drain on the device. - */ - public static final int ATTR_FASTPOLLTIMEOUTMIN = 0x0006; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(7); - - attributeMap.put(ATTR_CHECKININTERVAL, new ZclAttribute(ZclClusterType.POLL_CONTROL, ATTR_CHECKININTERVAL, "CheckinInterval", ZclDataType.UNSIGNED_32_BIT_INTEGER, true, true, true, true)); - attributeMap.put(ATTR_LONGPOLLINTERVAL, new ZclAttribute(ZclClusterType.POLL_CONTROL, ATTR_LONGPOLLINTERVAL, "LongPollInterval", ZclDataType.UNSIGNED_32_BIT_INTEGER, true, true, false, true)); - attributeMap.put(ATTR_SHORTPOLLINTERVAL, new ZclAttribute(ZclClusterType.POLL_CONTROL, ATTR_SHORTPOLLINTERVAL, "ShortPollInterval", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, true)); - attributeMap.put(ATTR_FASTPOLLTIMEOUT, new ZclAttribute(ZclClusterType.POLL_CONTROL, ATTR_FASTPOLLTIMEOUT, "FastPollTimeout", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, true)); - attributeMap.put(ATTR_CHECKININTERVALMIN, new ZclAttribute(ZclClusterType.POLL_CONTROL, ATTR_CHECKININTERVALMIN, "CheckinIntervalMin", ZclDataType.UNSIGNED_32_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_LONGPOLLINTERVALMIN, new ZclAttribute(ZclClusterType.POLL_CONTROL, ATTR_LONGPOLLINTERVALMIN, "LongPollIntervalMin", ZclDataType.UNSIGNED_32_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_FASTPOLLTIMEOUTMIN, new ZclAttribute(ZclClusterType.POLL_CONTROL, ATTR_FASTPOLLTIMEOUTMIN, "FastPollTimeoutMin", ZclDataType.UNSIGNED_32_BIT_INTEGER, false, true, false, false)); - - return attributeMap; - } - - /** - * Default constructor to create a Poll Control cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclPollControlCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } - - /** - * Set the CheckinInterval attribute [attribute ID 0]. - *

    - * The Poll Control server is responsible for checking in with the poll control client periodically to see if the poll control client wants to - * modify the poll rate of the poll control server. This is due to the fact that the PollControl server is implemented on an end device that MAY - * have an unpredictable sleep-wake cycle. The CheckinInterval represents the default amount of time between check-ins by the poll control - * server with the poll control client. The CheckinInterval is measured in quarter-seconds. A value of 0 indicates that the Poll Control - * Server is turned off and the poll control server will not check-in with the poll control client. The Poll Control Server checks in with the - * Poll Control Client by sending a Checkin command to the Client. This value SHOULDbe longer than the LongPoll Interval attribute. If the - * Client writes an invalid attribute value (Example: Out of Range or a value smaller than the optional Check-inIntervalMinattribute value - * or a value smaller than the LongPollInterval attribute value), the Server SHOULD return Write Attributes Response with an error status not - * equal to ZCL_SUCCESS. The Poll Control Client will hold onto the actions or messages for the Poll Control Server at the application level - * until the Poll Control Server checks in with the Poll Control Client. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param checkinInterval the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setCheckinInterval(final Object value) { - return write(attributes.get(ATTR_CHECKININTERVAL), value); - } - - /** - * Get the CheckinInterval attribute [attribute ID 0]. - *

    - * The Poll Control server is responsible for checking in with the poll control client periodically to see if the poll control client wants to - * modify the poll rate of the poll control server. This is due to the fact that the PollControl server is implemented on an end device that MAY - * have an unpredictable sleep-wake cycle. The CheckinInterval represents the default amount of time between check-ins by the poll control - * server with the poll control client. The CheckinInterval is measured in quarter-seconds. A value of 0 indicates that the Poll Control - * Server is turned off and the poll control server will not check-in with the poll control client. The Poll Control Server checks in with the - * Poll Control Client by sending a Checkin command to the Client. This value SHOULDbe longer than the LongPoll Interval attribute. If the - * Client writes an invalid attribute value (Example: Out of Range or a value smaller than the optional Check-inIntervalMinattribute value - * or a value smaller than the LongPollInterval attribute value), the Server SHOULD return Write Attributes Response with an error status not - * equal to ZCL_SUCCESS. The Poll Control Client will hold onto the actions or messages for the Poll Control Server at the application level - * until the Poll Control Server checks in with the Poll Control Client. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getCheckinIntervalAsync() { - return read(attributes.get(ATTR_CHECKININTERVAL)); - } - - /** - * Synchronously get the CheckinInterval attribute [attribute ID 0]. - *

    - * The Poll Control server is responsible for checking in with the poll control client periodically to see if the poll control client wants to - * modify the poll rate of the poll control server. This is due to the fact that the PollControl server is implemented on an end device that MAY - * have an unpredictable sleep-wake cycle. The CheckinInterval represents the default amount of time between check-ins by the poll control - * server with the poll control client. The CheckinInterval is measured in quarter-seconds. A value of 0 indicates that the Poll Control - * Server is turned off and the poll control server will not check-in with the poll control client. The Poll Control Server checks in with the - * Poll Control Client by sending a Checkin command to the Client. This value SHOULDbe longer than the LongPoll Interval attribute. If the - * Client writes an invalid attribute value (Example: Out of Range or a value smaller than the optional Check-inIntervalMinattribute value - * or a value smaller than the LongPollInterval attribute value), the Server SHOULD return Write Attributes Response with an error status not - * equal to ZCL_SUCCESS. The Poll Control Client will hold onto the actions or messages for the Poll Control Server at the application level - * until the Poll Control Server checks in with the Poll Control Client. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getCheckinInterval(final long refreshPeriod) { - if (attributes.get(ATTR_CHECKININTERVAL).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_CHECKININTERVAL).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_CHECKININTERVAL)); - } - - /** - * Set reporting for the CheckinInterval attribute [attribute ID 0]. - *

    - * The Poll Control server is responsible for checking in with the poll control client periodically to see if the poll control client wants to - * modify the poll rate of the poll control server. This is due to the fact that the PollControl server is implemented on an end device that MAY - * have an unpredictable sleep-wake cycle. The CheckinInterval represents the default amount of time between check-ins by the poll control - * server with the poll control client. The CheckinInterval is measured in quarter-seconds. A value of 0 indicates that the Poll Control - * Server is turned off and the poll control server will not check-in with the poll control client. The Poll Control Server checks in with the - * Poll Control Client by sending a Checkin command to the Client. This value SHOULDbe longer than the LongPoll Interval attribute. If the - * Client writes an invalid attribute value (Example: Out of Range or a value smaller than the optional Check-inIntervalMinattribute value - * or a value smaller than the LongPollInterval attribute value), the Server SHOULD return Write Attributes Response with an error status not - * equal to ZCL_SUCCESS. The Poll Control Client will hold onto the actions or messages for the Poll Control Server at the application level - * until the Poll Control Server checks in with the Poll Control Client. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param minInterval {@link int} minimum reporting period - * @param maxInterval {@link int} maximum reporting period - * @param reportableChange {@link Object} delta required to trigger report - * @return the {@link Future} command result future - */ - public Future setCheckinIntervalReporting(final int minInterval, final int maxInterval, final Object reportableChange) { - return setReporting(attributes.get(ATTR_CHECKININTERVAL), minInterval, maxInterval, reportableChange); - } - - /** - * Get the LongPollInterval attribute [attribute ID 1]. - *

    - * An end device that implements the Poll Control server MAY optionally expose a LongPollInterval attribute. - * The Long Poll Interval represents the maximum amount of time in quarter-seconds between MAC Data Requests - * from the end device to its parent. - *

    - * The LongPollInterval defines the frequency of polling that an end device does when it is NOT in fast poll mode. The LongPollInterval SHOULD - * be longer than the ShortPollInterval attribute but shorter than the CheckinInterval attribute.A value of 0xffffffff is reserved to - * indicate that the device does not have or does not know its long poll interval - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getLongPollIntervalAsync() { - return read(attributes.get(ATTR_LONGPOLLINTERVAL)); - } - - /** - * Synchronously get the LongPollInterval attribute [attribute ID 1]. - *

    - * An end device that implements the Poll Control server MAY optionally expose a LongPollInterval attribute. - * The Long Poll Interval represents the maximum amount of time in quarter-seconds between MAC Data Requests - * from the end device to its parent. - *

    - * The LongPollInterval defines the frequency of polling that an end device does when it is NOT in fast poll mode. The LongPollInterval SHOULD - * be longer than the ShortPollInterval attribute but shorter than the CheckinInterval attribute.A value of 0xffffffff is reserved to - * indicate that the device does not have or does not know its long poll interval - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getLongPollInterval(final long refreshPeriod) { - if (attributes.get(ATTR_LONGPOLLINTERVAL).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_LONGPOLLINTERVAL).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_LONGPOLLINTERVAL)); - } - - /** - * Set reporting for the LongPollInterval attribute [attribute ID 1]. - *

    - * An end device that implements the Poll Control server MAY optionally expose a LongPollInterval attribute. - * The Long Poll Interval represents the maximum amount of time in quarter-seconds between MAC Data Requests - * from the end device to its parent. - *

    - * The LongPollInterval defines the frequency of polling that an end device does when it is NOT in fast poll mode. The LongPollInterval SHOULD - * be longer than the ShortPollInterval attribute but shorter than the CheckinInterval attribute.A value of 0xffffffff is reserved to - * indicate that the device does not have or does not know its long poll interval - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param minInterval {@link int} minimum reporting period - * @param maxInterval {@link int} maximum reporting period - * @param reportableChange {@link Object} delta required to trigger report - * @return the {@link Future} command result future - */ - public Future setLongPollIntervalReporting(final int minInterval, final int maxInterval, final Object reportableChange) { - return setReporting(attributes.get(ATTR_LONGPOLLINTERVAL), minInterval, maxInterval, reportableChange); - } - - /** - * Get the ShortPollInterval attribute [attribute ID 2]. - *

    - * An end device that implements the Poll Control server MAY optionally expose the ShortPollInterval attribute. The - * ShortPollIntervalrepresents the number of quarterseconds that an end device waits between MAC Data Requests to its parent when it is - * expecting data (i.e.,in fast poll mode). - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getShortPollIntervalAsync() { - return read(attributes.get(ATTR_SHORTPOLLINTERVAL)); - } - - /** - * Synchronously get the ShortPollInterval attribute [attribute ID 2]. - *

    - * An end device that implements the Poll Control server MAY optionally expose the ShortPollInterval attribute. The - * ShortPollIntervalrepresents the number of quarterseconds that an end device waits between MAC Data Requests to its parent when it is - * expecting data (i.e.,in fast poll mode). - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getShortPollInterval(final long refreshPeriod) { - if (attributes.get(ATTR_SHORTPOLLINTERVAL).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_SHORTPOLLINTERVAL).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_SHORTPOLLINTERVAL)); - } - - /** - * Set reporting for the ShortPollInterval attribute [attribute ID 2]. - *

    - * An end device that implements the Poll Control server MAY optionally expose the ShortPollInterval attribute. The - * ShortPollIntervalrepresents the number of quarterseconds that an end device waits between MAC Data Requests to its parent when it is - * expecting data (i.e.,in fast poll mode). - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param minInterval {@link int} minimum reporting period - * @param maxInterval {@link int} maximum reporting period - * @param reportableChange {@link Object} delta required to trigger report - * @return the {@link Future} command result future - */ - public Future setShortPollIntervalReporting(final int minInterval, final int maxInterval, final Object reportableChange) { - return setReporting(attributes.get(ATTR_SHORTPOLLINTERVAL), minInterval, maxInterval, reportableChange); - } - - /** - * Get the FastPollTimeout attribute [attribute ID 3]. - *

    - * The FastPollTimeout attribute represents the number of quarterseconds that an end device will stay in fast poll mode by default. It is - * suggested that the FastPollTimeoutattribute value be greater than 7.68 seconds.The Poll Control Cluster Client MAYoverride this value - * by indicating a different value in the Fast Poll Duration argument in the Check-in Response command. If the Client writes a value out of range - * or greater than the optional FastPollTimeoutMax attribute value if supported, the Server SHOULD return a Write Attributes Response with a - * status of INVALID_VALUE30. An end device that implements the Poll Control server can be put into a fast poll mode during which it will send MAC - * Data Requests to its parent at the frequency of its configured ShortPollInterval attribute. During this period of time, fast polling is - * considered active. When the device goes into fast poll mode, it is required to send MAC DataRequests to its parent at an accelerated rate and - * is thus more responsive on the network and can receive data asynchronously from the device implementing the Poll Control Cluster Client. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getFastPollTimeoutAsync() { - return read(attributes.get(ATTR_FASTPOLLTIMEOUT)); - } - - /** - * Synchronously get the FastPollTimeout attribute [attribute ID 3]. - *

    - * The FastPollTimeout attribute represents the number of quarterseconds that an end device will stay in fast poll mode by default. It is - * suggested that the FastPollTimeoutattribute value be greater than 7.68 seconds.The Poll Control Cluster Client MAYoverride this value - * by indicating a different value in the Fast Poll Duration argument in the Check-in Response command. If the Client writes a value out of range - * or greater than the optional FastPollTimeoutMax attribute value if supported, the Server SHOULD return a Write Attributes Response with a - * status of INVALID_VALUE30. An end device that implements the Poll Control server can be put into a fast poll mode during which it will send MAC - * Data Requests to its parent at the frequency of its configured ShortPollInterval attribute. During this period of time, fast polling is - * considered active. When the device goes into fast poll mode, it is required to send MAC DataRequests to its parent at an accelerated rate and - * is thus more responsive on the network and can receive data asynchronously from the device implementing the Poll Control Cluster Client. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getFastPollTimeout(final long refreshPeriod) { - if (attributes.get(ATTR_FASTPOLLTIMEOUT).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_FASTPOLLTIMEOUT).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_FASTPOLLTIMEOUT)); - } - - /** - * Set reporting for the FastPollTimeout attribute [attribute ID 3]. - *

    - * The FastPollTimeout attribute represents the number of quarterseconds that an end device will stay in fast poll mode by default. It is - * suggested that the FastPollTimeoutattribute value be greater than 7.68 seconds.The Poll Control Cluster Client MAYoverride this value - * by indicating a different value in the Fast Poll Duration argument in the Check-in Response command. If the Client writes a value out of range - * or greater than the optional FastPollTimeoutMax attribute value if supported, the Server SHOULD return a Write Attributes Response with a - * status of INVALID_VALUE30. An end device that implements the Poll Control server can be put into a fast poll mode during which it will send MAC - * Data Requests to its parent at the frequency of its configured ShortPollInterval attribute. During this period of time, fast polling is - * considered active. When the device goes into fast poll mode, it is required to send MAC DataRequests to its parent at an accelerated rate and - * is thus more responsive on the network and can receive data asynchronously from the device implementing the Poll Control Cluster Client. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param minInterval {@link int} minimum reporting period - * @param maxInterval {@link int} maximum reporting period - * @param reportableChange {@link Object} delta required to trigger report - * @return the {@link Future} command result future - */ - public Future setFastPollTimeoutReporting(final int minInterval, final int maxInterval, final Object reportableChange) { - return setReporting(attributes.get(ATTR_FASTPOLLTIMEOUT), minInterval, maxInterval, reportableChange); - } - - /** - * Get the CheckinIntervalMin attribute [attribute ID 4]. - *

    - * The Poll Control Server MAY optionally provide its own minimum value for the Check-inInterval to protect against the Check-inInterval - * being set too low and draining the battery on the end device implementing the Poll Control Server. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is - * - * @return the {@link Future} command result future - */ - public Future getCheckinIntervalMinAsync() { - return read(attributes.get(ATTR_CHECKININTERVALMIN)); - } - - /** - * Synchronously get the CheckinIntervalMin attribute [attribute ID 4]. - *

    - * The Poll Control Server MAY optionally provide its own minimum value for the Check-inInterval to protect against the Check-inInterval - * being set too low and draining the battery on the end device implementing the Poll Control Server. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getCheckinIntervalMin(final long refreshPeriod) { - if (attributes.get(ATTR_CHECKININTERVALMIN).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_CHECKININTERVALMIN).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_CHECKININTERVALMIN)); - } - - /** - * Get the LongPollIntervalMin attribute [attribute ID 5]. - *

    - * The Poll Control Server MAYoptionally provide its own minimum value for the LongPollIntervalto protect against another device setting - * the value to too short a time resulting in an inadvertent power drain on the device. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is - * - * @return the {@link Future} command result future - */ - public Future getLongPollIntervalMinAsync() { - return read(attributes.get(ATTR_LONGPOLLINTERVALMIN)); - } - - /** - * Synchronously get the LongPollIntervalMin attribute [attribute ID 5]. - *

    - * The Poll Control Server MAYoptionally provide its own minimum value for the LongPollIntervalto protect against another device setting - * the value to too short a time resulting in an inadvertent power drain on the device. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getLongPollIntervalMin(final long refreshPeriod) { - if (attributes.get(ATTR_LONGPOLLINTERVALMIN).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_LONGPOLLINTERVALMIN).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_LONGPOLLINTERVALMIN)); - } - - /** - * Get the FastPollTimeoutMin attribute [attribute ID 6]. - *

    - * The Poll Control Server MAY optionally provide its own maximum value for the FastPollTimeout to avoid it being set to too high a value - * resulting in an inadvertent power drain on the device. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is - * - * @return the {@link Future} command result future - */ - public Future getFastPollTimeoutMinAsync() { - return read(attributes.get(ATTR_FASTPOLLTIMEOUTMIN)); - } - - /** - * Synchronously get the FastPollTimeoutMin attribute [attribute ID 6]. - *

    - * The Poll Control Server MAY optionally provide its own maximum value for the FastPollTimeout to avoid it being set to too high a value - * resulting in an inadvertent power drain on the device. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getFastPollTimeoutMin(final long refreshPeriod) { - if (attributes.get(ATTR_FASTPOLLTIMEOUTMIN).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_FASTPOLLTIMEOUTMIN).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_FASTPOLLTIMEOUTMIN)); - } - - /** - * The Check In Response - *

    - * The Check-in Response is sent in response to the receipt of a Check-in command. The Check-in Response is used by the Poll Control Client to - * indicate whether it would like the device implementing the Poll Control Cluster Server to go into a fast poll mode and for how long. If the Poll - * Control Cluster Client indicates that it would like the device to go into a fast poll mode, it is responsible for telling the device to stop - * fast polling when it is done sending messages to the fast polling device. - *
    - * If the Poll Control Server receives a Check-In Response from a client for which there is no binding (unbound), it SHOULD respond with a - * Default Response with a status value indicating ACTION_DENIED. - *
    - * If the Poll Control Server receives a Check-In Response from a client for which there is a binding (bound) with an invalid fast poll interval - * it SHOULD respond with a Default Response with status INVALID_VALUE. - *
    - * If the Poll Control Server receives a Check-In Response from a bound client after temporary fast poll mode is completed it SHOULD respond - * with a Default Response with a status value indicating TIMEOUT. - *
    - * In all of the above cases, the Server SHALL respond with a Default Response not equal to ZCL_SUCCESS. - * - * @param startFastPolling {@link Boolean} Start Fast Polling - * @param fastPollTimeout {@link Integer} Fast Poll Timeout - * @return the {@link Future} command result future - */ - public Future checkInResponse(Boolean startFastPolling, Integer fastPollTimeout) { - CheckInResponse command = new CheckInResponse(); - - // Set the fields - command.setStartFastPolling(startFastPolling); - command.setFastPollTimeout(fastPollTimeout); - - return send(command); - } - - /** - * The Fast Poll Stop Command - *

    - * The Fast Poll Stop command is used to stop the fast poll mode initiated by the Check-in response. The Fast Poll Stop command has no payload. - *
    - * If the Poll Control Server receives a Fast Poll Stop from an unbound client it SHOULD send back a DefaultResponse with a value field - * indicating “ACTION_DENIED” . The Server SHALL respond with a DefaultResponse not equal to ZCL_SUCCESS. - *
    - * If the Poll Control Server receives a Fast Poll Stop command from a bound client but it is unable to stop fast polling due to the fact that there - * is another bound client which has requested that polling continue it SHOULD respond with a Default Response with a status of - * “ACTION_DENIED” - *
    - * If a Poll Control Server receives a Fast Poll Stop command from a bound client but it is not FastPolling it SHOULD respond with a Default - * Response with a status of ACTION_DENIED. - * - * @return the {@link Future} command result future - */ - public Future fastPollStopCommand() { - FastPollStopCommand command = new FastPollStopCommand(); - - return send(command); - } - - /** - * The Set Long Poll Interval Command - *

    - * The Set Long Poll Interval command is used to set the Read Only LongPollInterval attribute. - *
    - * When the Poll Control Server receives the Set Long Poll Interval Command, it SHOULD check its internal minimal limit and the attributes - * relationship if the new Long Poll Interval is acceptable. If the new value is acceptable, the new value SHALL be saved to the - * LongPollInterval attribute. If the new value is not acceptable, the Poll Control Server SHALL send a default response of INVALID_VALUE and - * the LongPollInterval attribute value is not updated. - * - * @param newLongPollInterval {@link Integer} New Long Poll Interval - * @return the {@link Future} command result future - */ - public Future setLongPollIntervalCommand(Integer newLongPollInterval) { - SetLongPollIntervalCommand command = new SetLongPollIntervalCommand(); - - // Set the fields - command.setNewLongPollInterval(newLongPollInterval); - - return send(command); - } - - /** - * The Set Short Poll Interval Command - *

    - * The Set Short Poll Interval command is used to set the Read Only ShortPollInterval attribute. - *
    - * When the Poll Control Server receives the Set Short Poll Interval Command, it SHOULD check its internal minimal limit and the attributes - * relationship if the new Short Poll Interval is acceptable. If the new value is acceptable, the new value SHALL be saved to the - * ShortPollInterval attribute. If the new value is not acceptable, the Poll Control Server SHALL send a default response of INVALID_VALUE - * and the ShortPollInterval attribute value is not updated. - * - * @param newShortPollInterval {@link Integer} New Short Poll Interval - * @return the {@link Future} command result future - */ - public Future setShortPollIntervalCommand(Integer newShortPollInterval) { - SetShortPollIntervalCommand command = new SetShortPollIntervalCommand(); - - // Set the fields - command.setNewShortPollInterval(newShortPollInterval); - - return send(command); - } - - /** - * The Check In Command - *

    - * The Poll Control Cluster server sends out a Check-in command to the devices to which it is paired based on the server’s Check-inInterval - * attribute. It does this to find out if any of the Poll Control Cluster Clients with which it is paired are interested in having it enter fast - * poll mode so that it can be managed. This request is sent out based on either the Check-inInterval, or the next Check-in value in the Fast Poll - * Stop Request generated by the Poll Control Cluster Client. - *
    - * The Check-in command expects a Check-in Response command to be sent back from the Poll Control Client. If the Poll Control Server does not - * receive a Check-in response back from the Poll Control Client up to 7.68 seconds it is free to return to polling according to the - * LongPollInterval. - * - * @return the {@link Future} command result future - */ - public Future checkInCommand() { - CheckInCommand command = new CheckInCommand(); - - return send(command); - } - - @Override - public ZclCommand getCommandFromId(int commandId) { - switch (commandId) { - case 0: // CHECK_IN_RESPONSE - return new CheckInResponse(); - case 1: // FAST_POLL_STOP_COMMAND - return new FastPollStopCommand(); - case 2: // SET_LONG_POLL_INTERVAL_COMMAND - return new SetLongPollIntervalCommand(); - case 3: // SET_SHORT_POLL_INTERVAL_COMMAND - return new SetShortPollIntervalCommand(); - default: - return null; - } - } - - @Override - public ZclCommand getResponseFromId(int commandId) { - switch (commandId) { - case 0: // CHECK_IN_COMMAND - return new CheckInCommand(); - default: - return null; - } - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclPowerConfigurationCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclPowerConfigurationCluster.java deleted file mode 100644 index 9e80d4142..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclPowerConfigurationCluster.java +++ /dev/null @@ -1,1624 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.CommandResult; -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import com.zsmartsystems.zigbee.zcl.protocol.ZclClusterType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Future; -import javax.annotation.Generated; - -/** - * Power configuration cluster implementation (Cluster ID 0x0001). - *

    - * Attributes for determining detailed information about a device’s power source(s), - * and for configuring under/over voltage alarms. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclPowerConfigurationCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0001; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Power configuration"; - - // Attribute constants - /** - * The MainsVoltage attribute is 16-bits in length and specifies the actual (measured) - * RMS voltage (or DC voltage in the case of a DC supply) currently applied to the - * device, measured in units of 100mV. - */ - public static final int ATTR_MAINSVOLTAGE = 0x0000; - /** - * The MainsFrequency attribute is 8-bits in length and represents the frequency, in - * Hertz, of the mains as determined by the device as follows:- - *

    - * MainsFrequency = 0.5 x measured frequency - *

    - * Where 2 Hz <= measured frequency <= 506 Hz, corresponding to a - *

    - * MainsFrequency in the range 1 to 0xfd. - *

    - * The maximum resolution this format allows is 2 Hz. - * The following special values of MainsFrequency apply. - *

  • 0x00 indicates a frequency that is too low to be measured.
  • - *
  • 0xfe indicates a frequency that is too high to be measured.
  • - *
  • 0xff indicates that the frequency could not be measured.
  • - */ - public static final int ATTR_MAINSFREQUENCY = 0x0001; - /** - * The MainsAlarmMask attribute is 8-bits in length and specifies which mains - * alarms may be generated. A ‘1’ in each bit position enables the alarm. - */ - public static final int ATTR_MAINSALARMMASK = 0x0010; - /** - * The MainsVoltageMinThreshold attribute is 16-bits in length and specifies the - * lower alarm threshold, measured in units of 100mV, for the MainsVoltage - * attribute. The value of this attribute shall be less than MainsVoltageMaxThreshold. - *

    - * If the value of MainsVoltage drops below the threshold specified by - * MainsVoltageMinThreshold, the device shall start a timer to expire after - * MainsVoltageDwellTripPoint seconds. If the value of this attribute increases to - * greater than or equal to MainsVoltageMinThreshold before the timer expires, the - * device shall stop and reset the timer. If the timer expires, an alarm shall be - * generated. - *

    - * The Alarm Code field included in the generated alarm shall be 0x00. - *

    - * If this attribute takes the value 0xffff then this alarm shall not be generated. - */ - public static final int ATTR_MAINSVOLTAGEMINTHRESHOLD = 0x0011; - /** - * The MainsVoltageMaxThreshold attribute is 16-bits in length and specifies the - * upper alarm threshold, measured in units of 100mV, for the MainsVoltage - * attribute. The value of this attribute shall be greater than - * MainsVoltageMinThreshold. - *

    - * If the value of MainsVoltage rises above the threshold specified by - * MainsVoltageMaxThreshold, the device shall start a timer to expire after - * MainsVoltageDwellTripPoint seconds. If the value of this attribute drops to lower - * than or equal to MainsVoltageMaxThreshold before the timer expires, the device - * shall stop and reset the timer. If the timer expires, an alarm shall be generated. - *

    - * The Alarm Code field included in the generated alarm shall be 0x01. - *

    - * If this attribute takes the value 0xffff then this alarm shall not be generated. - */ - public static final int ATTR_MAINSVOLTAGEMAXTHRESHOLD = 0x0012; - /** - * The MainsVoltageDwellTripPoint attribute is 16-bits in length and specifies the - * length of time, in seconds that the value of MainsVoltage may exist beyond either - * of its thresholds before an alarm is generated. - *

    - * If this attribute takes the value 0xffff then the associated alarms shall not be - * generated. - */ - public static final int ATTR_MAINSVOLTAGEDWELLTRIPPOINT = 0x0013; - /** - * The BatteryVoltage attribute is 8-bits in length and specifies the current actual - * (measured) battery voltage, in units of 100mV. - * The value 0xff indicates an invalid or unknown reading. - */ - public static final int ATTR_BATTERYVOLTAGE = 0x0020; - /** - */ - public static final int ATTR_BATTERYPERCENTAGEREMAINING = 0x0021; - /** - * The BatteryManufacturer attribute is a maximum of 16 bytes in length and - * specifies the name of the battery manufacturer as a ZigBee character string. - */ - public static final int ATTR_BATTERYMANUFACTURER = 0x0030; - /** - * The BatterySize attribute is an enumeration which specifies the type of battery - * being used by the device. - */ - public static final int ATTR_BATTERYSIZE = 0x0031; - /** - * The BatteryAHrRating attribute is 16-bits in length and specifies the Ampere-hour - * rating of the battery, measured in units of 10mAHr. - */ - public static final int ATTR_BATTERYAHRRATING = 0x0032; - /** - * The BatteryQuantity attribute is 8-bits in length and specifies the number of - * battery cells used to power the device. - */ - public static final int ATTR_BATTERYQUANTITY = 0x0033; - /** - * The BatteryRatedVoltage attribute is 8-bits in length and specifies the rated - * voltage of the battery being used in the device, measured in units of 100mV. - */ - public static final int ATTR_BATTERYRATEDVOLTAGE = 0x0034; - /** - * The BatteryAlarmMask attribute is 8-bits in length and specifies which battery - * alarms may be generated. - */ - public static final int ATTR_BATTERYALARMMASK = 0x0035; - /** - * The BatteryVoltageMinThreshold attribute is 8-bits in length and specifies the low - * voltage alarm threshold, measured in units of 100mV, for the BatteryVoltage - * attribute. - *

    - * If the value of BatteryVoltage drops below the threshold specified by - * BatteryVoltageMinThreshold an alarm shall be generated. - *

    - * The Alarm Code field included in the generated alarm shall be 0x10. - *

    - * If this attribute takes the value 0xff then this alarm shall not be generated. - */ - public static final int ATTR_BATTERYVOLTAGEMINTHRESHOLD = 0x0036; - /** - */ - public static final int ATTR_BATTERYVOLTAGETHRESHOLD1 = 0x0037; - /** - */ - public static final int ATTR_BATTERYVOLTAGETHRESHOLD2 = 0x0038; - /** - */ - public static final int ATTR_BATTERYVOLTAGETHRESHOLD3 = 0x0039; - /** - */ - public static final int ATTR_BATTERYPERCENTAGEMINTHRESHOLD = 0x003A; - /** - */ - public static final int ATTR_BATTERYPERCENTAGETHRESHOLD1 = 0x003B; - /** - */ - public static final int ATTR_BATTERYPERCENTAGETHRESHOLD2 = 0x003C; - /** - */ - public static final int ATTR_BATTERYPERCENTAGETHRESHOLD3 = 0x003D; - /** - */ - public static final int ATTR_BATTERYALARMSTATE = 0x003E; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(23); - - attributeMap.put(ATTR_MAINSVOLTAGE, new ZclAttribute(ZclClusterType.POWER_CONFIGURATION, ATTR_MAINSVOLTAGE, "MainsVoltage", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_MAINSFREQUENCY, new ZclAttribute(ZclClusterType.POWER_CONFIGURATION, ATTR_MAINSFREQUENCY, "MainsFrequency", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_MAINSALARMMASK, new ZclAttribute(ZclClusterType.POWER_CONFIGURATION, ATTR_MAINSALARMMASK, "MainsAlarmMask", ZclDataType.BITMAP_8_BIT, false, true, true, false)); - attributeMap.put(ATTR_MAINSVOLTAGEMINTHRESHOLD, new ZclAttribute(ZclClusterType.POWER_CONFIGURATION, ATTR_MAINSVOLTAGEMINTHRESHOLD, "MainsVoltageMinThreshold", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, true, false)); - attributeMap.put(ATTR_MAINSVOLTAGEMAXTHRESHOLD, new ZclAttribute(ZclClusterType.POWER_CONFIGURATION, ATTR_MAINSVOLTAGEMAXTHRESHOLD, "MainsVoltageMaxThreshold", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, true, false)); - attributeMap.put(ATTR_MAINSVOLTAGEDWELLTRIPPOINT, new ZclAttribute(ZclClusterType.POWER_CONFIGURATION, ATTR_MAINSVOLTAGEDWELLTRIPPOINT, "MainsVoltageDwellTripPoint", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, true, false)); - attributeMap.put(ATTR_BATTERYVOLTAGE, new ZclAttribute(ZclClusterType.POWER_CONFIGURATION, ATTR_BATTERYVOLTAGE, "BatteryVoltage", ZclDataType.UNSIGNED_8_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_BATTERYPERCENTAGEREMAINING, new ZclAttribute(ZclClusterType.POWER_CONFIGURATION, ATTR_BATTERYPERCENTAGEREMAINING, "BatteryPercentageRemaining", ZclDataType.UNSIGNED_8_BIT_INTEGER, false, true, false, true)); - attributeMap.put(ATTR_BATTERYMANUFACTURER, new ZclAttribute(ZclClusterType.POWER_CONFIGURATION, ATTR_BATTERYMANUFACTURER, "BatteryManufacturer", ZclDataType.CHARACTER_STRING, false, true, true, false)); - attributeMap.put(ATTR_BATTERYSIZE, new ZclAttribute(ZclClusterType.POWER_CONFIGURATION, ATTR_BATTERYSIZE, "BatterySize", ZclDataType.ENUMERATION_8_BIT, false, true, true, false)); - attributeMap.put(ATTR_BATTERYAHRRATING, new ZclAttribute(ZclClusterType.POWER_CONFIGURATION, ATTR_BATTERYAHRRATING, "BatteryAHrRating", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, true, false)); - attributeMap.put(ATTR_BATTERYQUANTITY, new ZclAttribute(ZclClusterType.POWER_CONFIGURATION, ATTR_BATTERYQUANTITY, "BatteryQuantity", ZclDataType.UNSIGNED_8_BIT_INTEGER, false, true, true, false)); - attributeMap.put(ATTR_BATTERYRATEDVOLTAGE, new ZclAttribute(ZclClusterType.POWER_CONFIGURATION, ATTR_BATTERYRATEDVOLTAGE, "BatteryRatedVoltage", ZclDataType.UNSIGNED_8_BIT_INTEGER, false, true, true, false)); - attributeMap.put(ATTR_BATTERYALARMMASK, new ZclAttribute(ZclClusterType.POWER_CONFIGURATION, ATTR_BATTERYALARMMASK, "BatteryAlarmMask", ZclDataType.BITMAP_8_BIT, false, true, true, false)); - attributeMap.put(ATTR_BATTERYVOLTAGEMINTHRESHOLD, new ZclAttribute(ZclClusterType.POWER_CONFIGURATION, ATTR_BATTERYVOLTAGEMINTHRESHOLD, "BatteryVoltageMinThreshold", ZclDataType.UNSIGNED_8_BIT_INTEGER, false, true, true, false)); - attributeMap.put(ATTR_BATTERYVOLTAGETHRESHOLD1, new ZclAttribute(ZclClusterType.POWER_CONFIGURATION, ATTR_BATTERYVOLTAGETHRESHOLD1, "BatteryVoltageThreshold1", ZclDataType.UNSIGNED_8_BIT_INTEGER, false, true, true, false)); - attributeMap.put(ATTR_BATTERYVOLTAGETHRESHOLD2, new ZclAttribute(ZclClusterType.POWER_CONFIGURATION, ATTR_BATTERYVOLTAGETHRESHOLD2, "BatteryVoltageThreshold2", ZclDataType.UNSIGNED_8_BIT_INTEGER, false, true, true, false)); - attributeMap.put(ATTR_BATTERYVOLTAGETHRESHOLD3, new ZclAttribute(ZclClusterType.POWER_CONFIGURATION, ATTR_BATTERYVOLTAGETHRESHOLD3, "BatteryVoltageThreshold3", ZclDataType.UNSIGNED_8_BIT_INTEGER, false, true, true, false)); - attributeMap.put(ATTR_BATTERYPERCENTAGEMINTHRESHOLD, new ZclAttribute(ZclClusterType.POWER_CONFIGURATION, ATTR_BATTERYPERCENTAGEMINTHRESHOLD, "BatteryPercentageMinThreshold", ZclDataType.UNSIGNED_8_BIT_INTEGER, false, true, true, false)); - attributeMap.put(ATTR_BATTERYPERCENTAGETHRESHOLD1, new ZclAttribute(ZclClusterType.POWER_CONFIGURATION, ATTR_BATTERYPERCENTAGETHRESHOLD1, "BatteryPercentageThreshold1", ZclDataType.UNSIGNED_8_BIT_INTEGER, false, true, true, false)); - attributeMap.put(ATTR_BATTERYPERCENTAGETHRESHOLD2, new ZclAttribute(ZclClusterType.POWER_CONFIGURATION, ATTR_BATTERYPERCENTAGETHRESHOLD2, "BatteryPercentageThreshold2", ZclDataType.UNSIGNED_8_BIT_INTEGER, false, true, true, false)); - attributeMap.put(ATTR_BATTERYPERCENTAGETHRESHOLD3, new ZclAttribute(ZclClusterType.POWER_CONFIGURATION, ATTR_BATTERYPERCENTAGETHRESHOLD3, "BatteryPercentageThreshold3", ZclDataType.UNSIGNED_8_BIT_INTEGER, false, true, true, false)); - attributeMap.put(ATTR_BATTERYALARMSTATE, new ZclAttribute(ZclClusterType.POWER_CONFIGURATION, ATTR_BATTERYALARMSTATE, "BatteryAlarmState", ZclDataType.BITMAP_32_BIT, false, true, false, false)); - - return attributeMap; - } - - /** - * Default constructor to create a Power configuration cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclPowerConfigurationCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } - - /** - * Get the MainsVoltage attribute [attribute ID 0]. - *

    - * The MainsVoltage attribute is 16-bits in length and specifies the actual (measured) - * RMS voltage (or DC voltage in the case of a DC supply) currently applied to the - * device, measured in units of 100mV. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getMainsVoltageAsync() { - return read(attributes.get(ATTR_MAINSVOLTAGE)); - } - - /** - * Synchronously get the MainsVoltage attribute [attribute ID 0]. - *

    - * The MainsVoltage attribute is 16-bits in length and specifies the actual (measured) - * RMS voltage (or DC voltage in the case of a DC supply) currently applied to the - * device, measured in units of 100mV. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMainsVoltage(final long refreshPeriod) { - if (attributes.get(ATTR_MAINSVOLTAGE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MAINSVOLTAGE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MAINSVOLTAGE)); - } - - /** - * Get the MainsFrequency attribute [attribute ID 1]. - *

    - * The MainsFrequency attribute is 8-bits in length and represents the frequency, in - * Hertz, of the mains as determined by the device as follows:- - *

    - * MainsFrequency = 0.5 x measured frequency - *

    - * Where 2 Hz <= measured frequency <= 506 Hz, corresponding to a - *

    - * MainsFrequency in the range 1 to 0xfd. - *

    - * The maximum resolution this format allows is 2 Hz. - * The following special values of MainsFrequency apply. - *

  • 0x00 indicates a frequency that is too low to be measured.
  • - *
  • 0xfe indicates a frequency that is too high to be measured.
  • - *
  • 0xff indicates that the frequency could not be measured.
  • - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getMainsFrequencyAsync() { - return read(attributes.get(ATTR_MAINSFREQUENCY)); - } - - /** - * Synchronously get the MainsFrequency attribute [attribute ID 1]. - *

    - * The MainsFrequency attribute is 8-bits in length and represents the frequency, in - * Hertz, of the mains as determined by the device as follows:- - *

    - * MainsFrequency = 0.5 x measured frequency - *

    - * Where 2 Hz <= measured frequency <= 506 Hz, corresponding to a - *

    - * MainsFrequency in the range 1 to 0xfd. - *

    - * The maximum resolution this format allows is 2 Hz. - * The following special values of MainsFrequency apply. - *

  • 0x00 indicates a frequency that is too low to be measured.
  • - *
  • 0xfe indicates a frequency that is too high to be measured.
  • - *
  • 0xff indicates that the frequency could not be measured.
  • - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMainsFrequency(final long refreshPeriod) { - if (attributes.get(ATTR_MAINSFREQUENCY).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MAINSFREQUENCY).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MAINSFREQUENCY)); - } - - /** - * Set the MainsAlarmMask attribute [attribute ID 16]. - *

    - * The MainsAlarmMask attribute is 8-bits in length and specifies which mains - * alarms may be generated. A ‘1’ in each bit position enables the alarm. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param mainsAlarmMask the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setMainsAlarmMask(final Object value) { - return write(attributes.get(ATTR_MAINSALARMMASK), value); - } - - /** - * Get the MainsAlarmMask attribute [attribute ID 16]. - *

    - * The MainsAlarmMask attribute is 8-bits in length and specifies which mains - * alarms may be generated. A ‘1’ in each bit position enables the alarm. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getMainsAlarmMaskAsync() { - return read(attributes.get(ATTR_MAINSALARMMASK)); - } - - /** - * Synchronously get the MainsAlarmMask attribute [attribute ID 16]. - *

    - * The MainsAlarmMask attribute is 8-bits in length and specifies which mains - * alarms may be generated. A ‘1’ in each bit position enables the alarm. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMainsAlarmMask(final long refreshPeriod) { - if (attributes.get(ATTR_MAINSALARMMASK).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MAINSALARMMASK).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MAINSALARMMASK)); - } - - /** - * Set the MainsVoltageMinThreshold attribute [attribute ID 17]. - *

    - * The MainsVoltageMinThreshold attribute is 16-bits in length and specifies the - * lower alarm threshold, measured in units of 100mV, for the MainsVoltage - * attribute. The value of this attribute shall be less than MainsVoltageMaxThreshold. - *

    - * If the value of MainsVoltage drops below the threshold specified by - * MainsVoltageMinThreshold, the device shall start a timer to expire after - * MainsVoltageDwellTripPoint seconds. If the value of this attribute increases to - * greater than or equal to MainsVoltageMinThreshold before the timer expires, the - * device shall stop and reset the timer. If the timer expires, an alarm shall be - * generated. - *

    - * The Alarm Code field included in the generated alarm shall be 0x00. - *

    - * If this attribute takes the value 0xffff then this alarm shall not be generated. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param mainsVoltageMinThreshold the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setMainsVoltageMinThreshold(final Object value) { - return write(attributes.get(ATTR_MAINSVOLTAGEMINTHRESHOLD), value); - } - - /** - * Get the MainsVoltageMinThreshold attribute [attribute ID 17]. - *

    - * The MainsVoltageMinThreshold attribute is 16-bits in length and specifies the - * lower alarm threshold, measured in units of 100mV, for the MainsVoltage - * attribute. The value of this attribute shall be less than MainsVoltageMaxThreshold. - *

    - * If the value of MainsVoltage drops below the threshold specified by - * MainsVoltageMinThreshold, the device shall start a timer to expire after - * MainsVoltageDwellTripPoint seconds. If the value of this attribute increases to - * greater than or equal to MainsVoltageMinThreshold before the timer expires, the - * device shall stop and reset the timer. If the timer expires, an alarm shall be - * generated. - *

    - * The Alarm Code field included in the generated alarm shall be 0x00. - *

    - * If this attribute takes the value 0xffff then this alarm shall not be generated. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getMainsVoltageMinThresholdAsync() { - return read(attributes.get(ATTR_MAINSVOLTAGEMINTHRESHOLD)); - } - - /** - * Synchronously get the MainsVoltageMinThreshold attribute [attribute ID 17]. - *

    - * The MainsVoltageMinThreshold attribute is 16-bits in length and specifies the - * lower alarm threshold, measured in units of 100mV, for the MainsVoltage - * attribute. The value of this attribute shall be less than MainsVoltageMaxThreshold. - *

    - * If the value of MainsVoltage drops below the threshold specified by - * MainsVoltageMinThreshold, the device shall start a timer to expire after - * MainsVoltageDwellTripPoint seconds. If the value of this attribute increases to - * greater than or equal to MainsVoltageMinThreshold before the timer expires, the - * device shall stop and reset the timer. If the timer expires, an alarm shall be - * generated. - *

    - * The Alarm Code field included in the generated alarm shall be 0x00. - *

    - * If this attribute takes the value 0xffff then this alarm shall not be generated. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMainsVoltageMinThreshold(final long refreshPeriod) { - if (attributes.get(ATTR_MAINSVOLTAGEMINTHRESHOLD).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MAINSVOLTAGEMINTHRESHOLD).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MAINSVOLTAGEMINTHRESHOLD)); - } - - /** - * Set the MainsVoltageMaxThreshold attribute [attribute ID 18]. - *

    - * The MainsVoltageMaxThreshold attribute is 16-bits in length and specifies the - * upper alarm threshold, measured in units of 100mV, for the MainsVoltage - * attribute. The value of this attribute shall be greater than - * MainsVoltageMinThreshold. - *

    - * If the value of MainsVoltage rises above the threshold specified by - * MainsVoltageMaxThreshold, the device shall start a timer to expire after - * MainsVoltageDwellTripPoint seconds. If the value of this attribute drops to lower - * than or equal to MainsVoltageMaxThreshold before the timer expires, the device - * shall stop and reset the timer. If the timer expires, an alarm shall be generated. - *

    - * The Alarm Code field included in the generated alarm shall be 0x01. - *

    - * If this attribute takes the value 0xffff then this alarm shall not be generated. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param mainsVoltageMaxThreshold the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setMainsVoltageMaxThreshold(final Object value) { - return write(attributes.get(ATTR_MAINSVOLTAGEMAXTHRESHOLD), value); - } - - /** - * Get the MainsVoltageMaxThreshold attribute [attribute ID 18]. - *

    - * The MainsVoltageMaxThreshold attribute is 16-bits in length and specifies the - * upper alarm threshold, measured in units of 100mV, for the MainsVoltage - * attribute. The value of this attribute shall be greater than - * MainsVoltageMinThreshold. - *

    - * If the value of MainsVoltage rises above the threshold specified by - * MainsVoltageMaxThreshold, the device shall start a timer to expire after - * MainsVoltageDwellTripPoint seconds. If the value of this attribute drops to lower - * than or equal to MainsVoltageMaxThreshold before the timer expires, the device - * shall stop and reset the timer. If the timer expires, an alarm shall be generated. - *

    - * The Alarm Code field included in the generated alarm shall be 0x01. - *

    - * If this attribute takes the value 0xffff then this alarm shall not be generated. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getMainsVoltageMaxThresholdAsync() { - return read(attributes.get(ATTR_MAINSVOLTAGEMAXTHRESHOLD)); - } - - /** - * Synchronously get the MainsVoltageMaxThreshold attribute [attribute ID 18]. - *

    - * The MainsVoltageMaxThreshold attribute is 16-bits in length and specifies the - * upper alarm threshold, measured in units of 100mV, for the MainsVoltage - * attribute. The value of this attribute shall be greater than - * MainsVoltageMinThreshold. - *

    - * If the value of MainsVoltage rises above the threshold specified by - * MainsVoltageMaxThreshold, the device shall start a timer to expire after - * MainsVoltageDwellTripPoint seconds. If the value of this attribute drops to lower - * than or equal to MainsVoltageMaxThreshold before the timer expires, the device - * shall stop and reset the timer. If the timer expires, an alarm shall be generated. - *

    - * The Alarm Code field included in the generated alarm shall be 0x01. - *

    - * If this attribute takes the value 0xffff then this alarm shall not be generated. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMainsVoltageMaxThreshold(final long refreshPeriod) { - if (attributes.get(ATTR_MAINSVOLTAGEMAXTHRESHOLD).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MAINSVOLTAGEMAXTHRESHOLD).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MAINSVOLTAGEMAXTHRESHOLD)); - } - - /** - * Set the MainsVoltageDwellTripPoint attribute [attribute ID 19]. - *

    - * The MainsVoltageDwellTripPoint attribute is 16-bits in length and specifies the - * length of time, in seconds that the value of MainsVoltage may exist beyond either - * of its thresholds before an alarm is generated. - *

    - * If this attribute takes the value 0xffff then the associated alarms shall not be - * generated. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param mainsVoltageDwellTripPoint the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setMainsVoltageDwellTripPoint(final Object value) { - return write(attributes.get(ATTR_MAINSVOLTAGEDWELLTRIPPOINT), value); - } - - /** - * Get the MainsVoltageDwellTripPoint attribute [attribute ID 19]. - *

    - * The MainsVoltageDwellTripPoint attribute is 16-bits in length and specifies the - * length of time, in seconds that the value of MainsVoltage may exist beyond either - * of its thresholds before an alarm is generated. - *

    - * If this attribute takes the value 0xffff then the associated alarms shall not be - * generated. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getMainsVoltageDwellTripPointAsync() { - return read(attributes.get(ATTR_MAINSVOLTAGEDWELLTRIPPOINT)); - } - - /** - * Synchronously get the MainsVoltageDwellTripPoint attribute [attribute ID 19]. - *

    - * The MainsVoltageDwellTripPoint attribute is 16-bits in length and specifies the - * length of time, in seconds that the value of MainsVoltage may exist beyond either - * of its thresholds before an alarm is generated. - *

    - * If this attribute takes the value 0xffff then the associated alarms shall not be - * generated. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMainsVoltageDwellTripPoint(final long refreshPeriod) { - if (attributes.get(ATTR_MAINSVOLTAGEDWELLTRIPPOINT).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MAINSVOLTAGEDWELLTRIPPOINT).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MAINSVOLTAGEDWELLTRIPPOINT)); - } - - /** - * Get the BatteryVoltage attribute [attribute ID 32]. - *

    - * The BatteryVoltage attribute is 8-bits in length and specifies the current actual - * (measured) battery voltage, in units of 100mV. - * The value 0xff indicates an invalid or unknown reading. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getBatteryVoltageAsync() { - return read(attributes.get(ATTR_BATTERYVOLTAGE)); - } - - /** - * Synchronously get the BatteryVoltage attribute [attribute ID 32]. - *

    - * The BatteryVoltage attribute is 8-bits in length and specifies the current actual - * (measured) battery voltage, in units of 100mV. - * The value 0xff indicates an invalid or unknown reading. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getBatteryVoltage(final long refreshPeriod) { - if (attributes.get(ATTR_BATTERYVOLTAGE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_BATTERYVOLTAGE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_BATTERYVOLTAGE)); - } - - /** - * Get the BatteryPercentageRemaining attribute [attribute ID 33]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getBatteryPercentageRemainingAsync() { - return read(attributes.get(ATTR_BATTERYPERCENTAGEREMAINING)); - } - - /** - * Synchronously get the BatteryPercentageRemaining attribute [attribute ID 33]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getBatteryPercentageRemaining(final long refreshPeriod) { - if (attributes.get(ATTR_BATTERYPERCENTAGEREMAINING).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_BATTERYPERCENTAGEREMAINING).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_BATTERYPERCENTAGEREMAINING)); - } - - /** - * Set reporting for the BatteryPercentageRemaining attribute [attribute ID 33]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param minInterval {@link int} minimum reporting period - * @param maxInterval {@link int} maximum reporting period - * @param reportableChange {@link Object} delta required to trigger report - * @return the {@link Future} command result future - */ - public Future setBatteryPercentageRemainingReporting(final int minInterval, final int maxInterval, final Object reportableChange) { - return setReporting(attributes.get(ATTR_BATTERYPERCENTAGEREMAINING), minInterval, maxInterval, reportableChange); - } - - /** - * Set the BatteryManufacturer attribute [attribute ID 48]. - *

    - * The BatteryManufacturer attribute is a maximum of 16 bytes in length and - * specifies the name of the battery manufacturer as a ZigBee character string. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param batteryManufacturer the {@link String} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setBatteryManufacturer(final Object value) { - return write(attributes.get(ATTR_BATTERYMANUFACTURER), value); - } - - /** - * Get the BatteryManufacturer attribute [attribute ID 48]. - *

    - * The BatteryManufacturer attribute is a maximum of 16 bytes in length and - * specifies the name of the battery manufacturer as a ZigBee character string. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getBatteryManufacturerAsync() { - return read(attributes.get(ATTR_BATTERYMANUFACTURER)); - } - - /** - * Synchronously get the BatteryManufacturer attribute [attribute ID 48]. - *

    - * The BatteryManufacturer attribute is a maximum of 16 bytes in length and - * specifies the name of the battery manufacturer as a ZigBee character string. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link String}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link String} attribute value, or null on error - */ - public String getBatteryManufacturer(final long refreshPeriod) { - if (attributes.get(ATTR_BATTERYMANUFACTURER).isLastValueCurrent(refreshPeriod)) { - return (String) attributes.get(ATTR_BATTERYMANUFACTURER).getLastValue(); - } - - return (String) readSync(attributes.get(ATTR_BATTERYMANUFACTURER)); - } - - /** - * Set the BatterySize attribute [attribute ID 49]. - *

    - * The BatterySize attribute is an enumeration which specifies the type of battery - * being used by the device. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param batterySize the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setBatterySize(final Object value) { - return write(attributes.get(ATTR_BATTERYSIZE), value); - } - - /** - * Get the BatterySize attribute [attribute ID 49]. - *

    - * The BatterySize attribute is an enumeration which specifies the type of battery - * being used by the device. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getBatterySizeAsync() { - return read(attributes.get(ATTR_BATTERYSIZE)); - } - - /** - * Synchronously get the BatterySize attribute [attribute ID 49]. - *

    - * The BatterySize attribute is an enumeration which specifies the type of battery - * being used by the device. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getBatterySize(final long refreshPeriod) { - if (attributes.get(ATTR_BATTERYSIZE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_BATTERYSIZE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_BATTERYSIZE)); - } - - /** - * Set the BatteryAHrRating attribute [attribute ID 50]. - *

    - * The BatteryAHrRating attribute is 16-bits in length and specifies the Ampere-hour - * rating of the battery, measured in units of 10mAHr. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param batteryAHrRating the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setBatteryAHrRating(final Object value) { - return write(attributes.get(ATTR_BATTERYAHRRATING), value); - } - - /** - * Get the BatteryAHrRating attribute [attribute ID 50]. - *

    - * The BatteryAHrRating attribute is 16-bits in length and specifies the Ampere-hour - * rating of the battery, measured in units of 10mAHr. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getBatteryAHrRatingAsync() { - return read(attributes.get(ATTR_BATTERYAHRRATING)); - } - - /** - * Synchronously get the BatteryAHrRating attribute [attribute ID 50]. - *

    - * The BatteryAHrRating attribute is 16-bits in length and specifies the Ampere-hour - * rating of the battery, measured in units of 10mAHr. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getBatteryAHrRating(final long refreshPeriod) { - if (attributes.get(ATTR_BATTERYAHRRATING).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_BATTERYAHRRATING).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_BATTERYAHRRATING)); - } - - /** - * Set the BatteryQuantity attribute [attribute ID 51]. - *

    - * The BatteryQuantity attribute is 8-bits in length and specifies the number of - * battery cells used to power the device. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param batteryQuantity the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setBatteryQuantity(final Object value) { - return write(attributes.get(ATTR_BATTERYQUANTITY), value); - } - - /** - * Get the BatteryQuantity attribute [attribute ID 51]. - *

    - * The BatteryQuantity attribute is 8-bits in length and specifies the number of - * battery cells used to power the device. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getBatteryQuantityAsync() { - return read(attributes.get(ATTR_BATTERYQUANTITY)); - } - - /** - * Synchronously get the BatteryQuantity attribute [attribute ID 51]. - *

    - * The BatteryQuantity attribute is 8-bits in length and specifies the number of - * battery cells used to power the device. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getBatteryQuantity(final long refreshPeriod) { - if (attributes.get(ATTR_BATTERYQUANTITY).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_BATTERYQUANTITY).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_BATTERYQUANTITY)); - } - - /** - * Set the BatteryRatedVoltage attribute [attribute ID 52]. - *

    - * The BatteryRatedVoltage attribute is 8-bits in length and specifies the rated - * voltage of the battery being used in the device, measured in units of 100mV. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param batteryRatedVoltage the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setBatteryRatedVoltage(final Object value) { - return write(attributes.get(ATTR_BATTERYRATEDVOLTAGE), value); - } - - /** - * Get the BatteryRatedVoltage attribute [attribute ID 52]. - *

    - * The BatteryRatedVoltage attribute is 8-bits in length and specifies the rated - * voltage of the battery being used in the device, measured in units of 100mV. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getBatteryRatedVoltageAsync() { - return read(attributes.get(ATTR_BATTERYRATEDVOLTAGE)); - } - - /** - * Synchronously get the BatteryRatedVoltage attribute [attribute ID 52]. - *

    - * The BatteryRatedVoltage attribute is 8-bits in length and specifies the rated - * voltage of the battery being used in the device, measured in units of 100mV. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getBatteryRatedVoltage(final long refreshPeriod) { - if (attributes.get(ATTR_BATTERYRATEDVOLTAGE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_BATTERYRATEDVOLTAGE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_BATTERYRATEDVOLTAGE)); - } - - /** - * Set the BatteryAlarmMask attribute [attribute ID 53]. - *

    - * The BatteryAlarmMask attribute is 8-bits in length and specifies which battery - * alarms may be generated. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param batteryAlarmMask the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setBatteryAlarmMask(final Object value) { - return write(attributes.get(ATTR_BATTERYALARMMASK), value); - } - - /** - * Get the BatteryAlarmMask attribute [attribute ID 53]. - *

    - * The BatteryAlarmMask attribute is 8-bits in length and specifies which battery - * alarms may be generated. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getBatteryAlarmMaskAsync() { - return read(attributes.get(ATTR_BATTERYALARMMASK)); - } - - /** - * Synchronously get the BatteryAlarmMask attribute [attribute ID 53]. - *

    - * The BatteryAlarmMask attribute is 8-bits in length and specifies which battery - * alarms may be generated. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getBatteryAlarmMask(final long refreshPeriod) { - if (attributes.get(ATTR_BATTERYALARMMASK).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_BATTERYALARMMASK).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_BATTERYALARMMASK)); - } - - /** - * Set the BatteryVoltageMinThreshold attribute [attribute ID 54]. - *

    - * The BatteryVoltageMinThreshold attribute is 8-bits in length and specifies the low - * voltage alarm threshold, measured in units of 100mV, for the BatteryVoltage - * attribute. - *

    - * If the value of BatteryVoltage drops below the threshold specified by - * BatteryVoltageMinThreshold an alarm shall be generated. - *

    - * The Alarm Code field included in the generated alarm shall be 0x10. - *

    - * If this attribute takes the value 0xff then this alarm shall not be generated. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param batteryVoltageMinThreshold the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setBatteryVoltageMinThreshold(final Object value) { - return write(attributes.get(ATTR_BATTERYVOLTAGEMINTHRESHOLD), value); - } - - /** - * Get the BatteryVoltageMinThreshold attribute [attribute ID 54]. - *

    - * The BatteryVoltageMinThreshold attribute is 8-bits in length and specifies the low - * voltage alarm threshold, measured in units of 100mV, for the BatteryVoltage - * attribute. - *

    - * If the value of BatteryVoltage drops below the threshold specified by - * BatteryVoltageMinThreshold an alarm shall be generated. - *

    - * The Alarm Code field included in the generated alarm shall be 0x10. - *

    - * If this attribute takes the value 0xff then this alarm shall not be generated. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getBatteryVoltageMinThresholdAsync() { - return read(attributes.get(ATTR_BATTERYVOLTAGEMINTHRESHOLD)); - } - - /** - * Synchronously get the BatteryVoltageMinThreshold attribute [attribute ID 54]. - *

    - * The BatteryVoltageMinThreshold attribute is 8-bits in length and specifies the low - * voltage alarm threshold, measured in units of 100mV, for the BatteryVoltage - * attribute. - *

    - * If the value of BatteryVoltage drops below the threshold specified by - * BatteryVoltageMinThreshold an alarm shall be generated. - *

    - * The Alarm Code field included in the generated alarm shall be 0x10. - *

    - * If this attribute takes the value 0xff then this alarm shall not be generated. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getBatteryVoltageMinThreshold(final long refreshPeriod) { - if (attributes.get(ATTR_BATTERYVOLTAGEMINTHRESHOLD).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_BATTERYVOLTAGEMINTHRESHOLD).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_BATTERYVOLTAGEMINTHRESHOLD)); - } - - /** - * Set the BatteryVoltageThreshold1 attribute [attribute ID 55]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param batteryVoltageThreshold1 the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setBatteryVoltageThreshold1(final Object value) { - return write(attributes.get(ATTR_BATTERYVOLTAGETHRESHOLD1), value); - } - - /** - * Get the BatteryVoltageThreshold1 attribute [attribute ID 55]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getBatteryVoltageThreshold1Async() { - return read(attributes.get(ATTR_BATTERYVOLTAGETHRESHOLD1)); - } - - /** - * Synchronously get the BatteryVoltageThreshold1 attribute [attribute ID 55]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getBatteryVoltageThreshold1(final long refreshPeriod) { - if (attributes.get(ATTR_BATTERYVOLTAGETHRESHOLD1).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_BATTERYVOLTAGETHRESHOLD1).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_BATTERYVOLTAGETHRESHOLD1)); - } - - /** - * Set the BatteryVoltageThreshold2 attribute [attribute ID 56]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param batteryVoltageThreshold2 the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setBatteryVoltageThreshold2(final Object value) { - return write(attributes.get(ATTR_BATTERYVOLTAGETHRESHOLD2), value); - } - - /** - * Get the BatteryVoltageThreshold2 attribute [attribute ID 56]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getBatteryVoltageThreshold2Async() { - return read(attributes.get(ATTR_BATTERYVOLTAGETHRESHOLD2)); - } - - /** - * Synchronously get the BatteryVoltageThreshold2 attribute [attribute ID 56]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getBatteryVoltageThreshold2(final long refreshPeriod) { - if (attributes.get(ATTR_BATTERYVOLTAGETHRESHOLD2).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_BATTERYVOLTAGETHRESHOLD2).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_BATTERYVOLTAGETHRESHOLD2)); - } - - /** - * Set the BatteryVoltageThreshold3 attribute [attribute ID 57]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param batteryVoltageThreshold3 the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setBatteryVoltageThreshold3(final Object value) { - return write(attributes.get(ATTR_BATTERYVOLTAGETHRESHOLD3), value); - } - - /** - * Get the BatteryVoltageThreshold3 attribute [attribute ID 57]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getBatteryVoltageThreshold3Async() { - return read(attributes.get(ATTR_BATTERYVOLTAGETHRESHOLD3)); - } - - /** - * Synchronously get the BatteryVoltageThreshold3 attribute [attribute ID 57]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getBatteryVoltageThreshold3(final long refreshPeriod) { - if (attributes.get(ATTR_BATTERYVOLTAGETHRESHOLD3).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_BATTERYVOLTAGETHRESHOLD3).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_BATTERYVOLTAGETHRESHOLD3)); - } - - /** - * Set the BatteryPercentageMinThreshold attribute [attribute ID 58]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param batteryPercentageMinThreshold the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setBatteryPercentageMinThreshold(final Object value) { - return write(attributes.get(ATTR_BATTERYPERCENTAGEMINTHRESHOLD), value); - } - - /** - * Get the BatteryPercentageMinThreshold attribute [attribute ID 58]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getBatteryPercentageMinThresholdAsync() { - return read(attributes.get(ATTR_BATTERYPERCENTAGEMINTHRESHOLD)); - } - - /** - * Synchronously get the BatteryPercentageMinThreshold attribute [attribute ID 58]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getBatteryPercentageMinThreshold(final long refreshPeriod) { - if (attributes.get(ATTR_BATTERYPERCENTAGEMINTHRESHOLD).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_BATTERYPERCENTAGEMINTHRESHOLD).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_BATTERYPERCENTAGEMINTHRESHOLD)); - } - - /** - * Set the BatteryPercentageThreshold1 attribute [attribute ID 59]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param batteryPercentageThreshold1 the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setBatteryPercentageThreshold1(final Object value) { - return write(attributes.get(ATTR_BATTERYPERCENTAGETHRESHOLD1), value); - } - - /** - * Get the BatteryPercentageThreshold1 attribute [attribute ID 59]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getBatteryPercentageThreshold1Async() { - return read(attributes.get(ATTR_BATTERYPERCENTAGETHRESHOLD1)); - } - - /** - * Synchronously get the BatteryPercentageThreshold1 attribute [attribute ID 59]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getBatteryPercentageThreshold1(final long refreshPeriod) { - if (attributes.get(ATTR_BATTERYPERCENTAGETHRESHOLD1).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_BATTERYPERCENTAGETHRESHOLD1).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_BATTERYPERCENTAGETHRESHOLD1)); - } - - /** - * Set the BatteryPercentageThreshold2 attribute [attribute ID 60]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param batteryPercentageThreshold2 the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setBatteryPercentageThreshold2(final Object value) { - return write(attributes.get(ATTR_BATTERYPERCENTAGETHRESHOLD2), value); - } - - /** - * Get the BatteryPercentageThreshold2 attribute [attribute ID 60]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getBatteryPercentageThreshold2Async() { - return read(attributes.get(ATTR_BATTERYPERCENTAGETHRESHOLD2)); - } - - /** - * Synchronously get the BatteryPercentageThreshold2 attribute [attribute ID 60]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getBatteryPercentageThreshold2(final long refreshPeriod) { - if (attributes.get(ATTR_BATTERYPERCENTAGETHRESHOLD2).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_BATTERYPERCENTAGETHRESHOLD2).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_BATTERYPERCENTAGETHRESHOLD2)); - } - - /** - * Set the BatteryPercentageThreshold3 attribute [attribute ID 61]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param batteryPercentageThreshold3 the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setBatteryPercentageThreshold3(final Object value) { - return write(attributes.get(ATTR_BATTERYPERCENTAGETHRESHOLD3), value); - } - - /** - * Get the BatteryPercentageThreshold3 attribute [attribute ID 61]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getBatteryPercentageThreshold3Async() { - return read(attributes.get(ATTR_BATTERYPERCENTAGETHRESHOLD3)); - } - - /** - * Synchronously get the BatteryPercentageThreshold3 attribute [attribute ID 61]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getBatteryPercentageThreshold3(final long refreshPeriod) { - if (attributes.get(ATTR_BATTERYPERCENTAGETHRESHOLD3).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_BATTERYPERCENTAGETHRESHOLD3).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_BATTERYPERCENTAGETHRESHOLD3)); - } - - /** - * Get the BatteryAlarmState attribute [attribute ID 62]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getBatteryAlarmStateAsync() { - return read(attributes.get(ATTR_BATTERYALARMSTATE)); - } - - /** - * Synchronously get the BatteryAlarmState attribute [attribute ID 62]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getBatteryAlarmState(final long refreshPeriod) { - if (attributes.get(ATTR_BATTERYALARMSTATE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_BATTERYALARMSTATE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_BATTERYALARMSTATE)); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclPressureMeasurementCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclPressureMeasurementCluster.java deleted file mode 100644 index eab3fece9..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclPressureMeasurementCluster.java +++ /dev/null @@ -1,594 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.CommandResult; -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import com.zsmartsystems.zigbee.zcl.protocol.ZclClusterType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Future; -import javax.annotation.Generated; - -/** - * Pressure measurement cluster implementation (Cluster ID 0x0403). - *

    - * The cluster provides an interface to pressure measurement functionality, - * including configuration and provision of notifications of pressure measurements. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclPressureMeasurementCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0403; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Pressure measurement"; - - // Attribute constants - /** - * MeasuredValue represents the pressure in kPa as follows:- - *

    - * MeasuredValue = 10 x Pressure - *

    - * Where -3276.7 kPa <= Pressure <= 3276.7 kPa, corresponding to a - * MeasuredValue in the range 0x8001 to 0x7fff. - *

    - * Note:- The maximum resolution this format allows is 0.1 kPa. - *

    - * A MeasuredValue of 0x8000 indicates that the pressure measurement is invalid. - * MeasuredValue is updated continuously as new measurements are made. - */ - public static final int ATTR_MEASUREDVALUE = 0x0000; - /** - * The MinMeasuredValue attribute indicates the minimum value of MeasuredValue - * that can be measured. A value of 0x8000 means this attribute is not defined. - */ - public static final int ATTR_MINMEASUREDVALUE = 0x0001; - /** - * The MaxMeasuredValue attribute indicates the maximum value of MeasuredValue - * that can be measured. A value of 0x8000 means this attribute is not defined. - *

    - * MaxMeasuredValue shall be greater than MinMeasuredValue. - *

    - * MinMeasuredValue and MaxMeasuredValue define the range of the sensor. - */ - public static final int ATTR_MAXMEASUREDVALUE = 0x0002; - /** - * The Tolerance attribute indicates the magnitude of the possible error that is - * associated with MeasuredValue . The true value is located in the range - * (MeasuredValue – Tolerance) to (MeasuredValue + Tolerance). - */ - public static final int ATTR_TOLERANCE = 0x0003; - /** - */ - public static final int ATTR_SCALEDVALUE = 0x0010; - /** - */ - public static final int ATTR_MINSCALEDVALUE = 0x0011; - /** - */ - public static final int ATTR_MAXSCALEDVALUE = 0x0012; - /** - */ - public static final int ATTR_SCALEDTOLERANCE = 0x0013; - /** - */ - public static final int ATTR_SCALE = 0x0014; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(9); - - attributeMap.put(ATTR_MEASUREDVALUE, new ZclAttribute(ZclClusterType.PRESSURE_MEASUREMENT, ATTR_MEASUREDVALUE, "MeasuredValue", ZclDataType.SIGNED_16_BIT_INTEGER, true, true, false, true)); - attributeMap.put(ATTR_MINMEASUREDVALUE, new ZclAttribute(ZclClusterType.PRESSURE_MEASUREMENT, ATTR_MINMEASUREDVALUE, "MinMeasuredValue", ZclDataType.SIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_MAXMEASUREDVALUE, new ZclAttribute(ZclClusterType.PRESSURE_MEASUREMENT, ATTR_MAXMEASUREDVALUE, "MaxMeasuredValue", ZclDataType.SIGNED_16_BIT_INTEGER, true, true, false, true)); - attributeMap.put(ATTR_TOLERANCE, new ZclAttribute(ZclClusterType.PRESSURE_MEASUREMENT, ATTR_TOLERANCE, "Tolerance", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_SCALEDVALUE, new ZclAttribute(ZclClusterType.PRESSURE_MEASUREMENT, ATTR_SCALEDVALUE, "ScaledValue", ZclDataType.SIGNED_16_BIT_INTEGER, false, true, false, true)); - attributeMap.put(ATTR_MINSCALEDVALUE, new ZclAttribute(ZclClusterType.PRESSURE_MEASUREMENT, ATTR_MINSCALEDVALUE, "MinScaledValue", ZclDataType.SIGNED_16_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_MAXSCALEDVALUE, new ZclAttribute(ZclClusterType.PRESSURE_MEASUREMENT, ATTR_MAXSCALEDVALUE, "MaxScaledValue", ZclDataType.SIGNED_16_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_SCALEDTOLERANCE, new ZclAttribute(ZclClusterType.PRESSURE_MEASUREMENT, ATTR_SCALEDTOLERANCE, "ScaledTolerance", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, true)); - attributeMap.put(ATTR_SCALE, new ZclAttribute(ZclClusterType.PRESSURE_MEASUREMENT, ATTR_SCALE, "Scale", ZclDataType.UNSIGNED_8_BIT_INTEGER, false, true, false, false)); - - return attributeMap; - } - - /** - * Default constructor to create a Pressure measurement cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclPressureMeasurementCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } - - /** - * Get the MeasuredValue attribute [attribute ID 0]. - *

    - * MeasuredValue represents the pressure in kPa as follows:- - *

    - * MeasuredValue = 10 x Pressure - *

    - * Where -3276.7 kPa <= Pressure <= 3276.7 kPa, corresponding to a - * MeasuredValue in the range 0x8001 to 0x7fff. - *

    - * Note:- The maximum resolution this format allows is 0.1 kPa. - *

    - * A MeasuredValue of 0x8000 indicates that the pressure measurement is invalid. - * MeasuredValue is updated continuously as new measurements are made. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getMeasuredValueAsync() { - return read(attributes.get(ATTR_MEASUREDVALUE)); - } - - /** - * Synchronously get the MeasuredValue attribute [attribute ID 0]. - *

    - * MeasuredValue represents the pressure in kPa as follows:- - *

    - * MeasuredValue = 10 x Pressure - *

    - * Where -3276.7 kPa <= Pressure <= 3276.7 kPa, corresponding to a - * MeasuredValue in the range 0x8001 to 0x7fff. - *

    - * Note:- The maximum resolution this format allows is 0.1 kPa. - *

    - * A MeasuredValue of 0x8000 indicates that the pressure measurement is invalid. - * MeasuredValue is updated continuously as new measurements are made. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMeasuredValue(final long refreshPeriod) { - if (attributes.get(ATTR_MEASUREDVALUE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MEASUREDVALUE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MEASUREDVALUE)); - } - - /** - * Set reporting for the MeasuredValue attribute [attribute ID 0]. - *

    - * MeasuredValue represents the pressure in kPa as follows:- - *

    - * MeasuredValue = 10 x Pressure - *

    - * Where -3276.7 kPa <= Pressure <= 3276.7 kPa, corresponding to a - * MeasuredValue in the range 0x8001 to 0x7fff. - *

    - * Note:- The maximum resolution this format allows is 0.1 kPa. - *

    - * A MeasuredValue of 0x8000 indicates that the pressure measurement is invalid. - * MeasuredValue is updated continuously as new measurements are made. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param minInterval {@link int} minimum reporting period - * @param maxInterval {@link int} maximum reporting period - * @param reportableChange {@link Object} delta required to trigger report - * @return the {@link Future} command result future - */ - public Future setMeasuredValueReporting(final int minInterval, final int maxInterval, final Object reportableChange) { - return setReporting(attributes.get(ATTR_MEASUREDVALUE), minInterval, maxInterval, reportableChange); - } - - /** - * Get the MinMeasuredValue attribute [attribute ID 1]. - *

    - * The MinMeasuredValue attribute indicates the minimum value of MeasuredValue - * that can be measured. A value of 0x8000 means this attribute is not defined. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getMinMeasuredValueAsync() { - return read(attributes.get(ATTR_MINMEASUREDVALUE)); - } - - /** - * Synchronously get the MinMeasuredValue attribute [attribute ID 1]. - *

    - * The MinMeasuredValue attribute indicates the minimum value of MeasuredValue - * that can be measured. A value of 0x8000 means this attribute is not defined. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMinMeasuredValue(final long refreshPeriod) { - if (attributes.get(ATTR_MINMEASUREDVALUE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MINMEASUREDVALUE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MINMEASUREDVALUE)); - } - - /** - * Get the MaxMeasuredValue attribute [attribute ID 2]. - *

    - * The MaxMeasuredValue attribute indicates the maximum value of MeasuredValue - * that can be measured. A value of 0x8000 means this attribute is not defined. - *

    - * MaxMeasuredValue shall be greater than MinMeasuredValue. - *

    - * MinMeasuredValue and MaxMeasuredValue define the range of the sensor. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getMaxMeasuredValueAsync() { - return read(attributes.get(ATTR_MAXMEASUREDVALUE)); - } - - /** - * Synchronously get the MaxMeasuredValue attribute [attribute ID 2]. - *

    - * The MaxMeasuredValue attribute indicates the maximum value of MeasuredValue - * that can be measured. A value of 0x8000 means this attribute is not defined. - *

    - * MaxMeasuredValue shall be greater than MinMeasuredValue. - *

    - * MinMeasuredValue and MaxMeasuredValue define the range of the sensor. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMaxMeasuredValue(final long refreshPeriod) { - if (attributes.get(ATTR_MAXMEASUREDVALUE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MAXMEASUREDVALUE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MAXMEASUREDVALUE)); - } - - /** - * Set reporting for the MaxMeasuredValue attribute [attribute ID 2]. - *

    - * The MaxMeasuredValue attribute indicates the maximum value of MeasuredValue - * that can be measured. A value of 0x8000 means this attribute is not defined. - *

    - * MaxMeasuredValue shall be greater than MinMeasuredValue. - *

    - * MinMeasuredValue and MaxMeasuredValue define the range of the sensor. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param minInterval {@link int} minimum reporting period - * @param maxInterval {@link int} maximum reporting period - * @param reportableChange {@link Object} delta required to trigger report - * @return the {@link Future} command result future - */ - public Future setMaxMeasuredValueReporting(final int minInterval, final int maxInterval, final Object reportableChange) { - return setReporting(attributes.get(ATTR_MAXMEASUREDVALUE), minInterval, maxInterval, reportableChange); - } - - /** - * Get the Tolerance attribute [attribute ID 3]. - *

    - * The Tolerance attribute indicates the magnitude of the possible error that is - * associated with MeasuredValue . The true value is located in the range - * (MeasuredValue – Tolerance) to (MeasuredValue + Tolerance). - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getToleranceAsync() { - return read(attributes.get(ATTR_TOLERANCE)); - } - - /** - * Synchronously get the Tolerance attribute [attribute ID 3]. - *

    - * The Tolerance attribute indicates the magnitude of the possible error that is - * associated with MeasuredValue . The true value is located in the range - * (MeasuredValue – Tolerance) to (MeasuredValue + Tolerance). - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getTolerance(final long refreshPeriod) { - if (attributes.get(ATTR_TOLERANCE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_TOLERANCE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_TOLERANCE)); - } - - /** - * Get the ScaledValue attribute [attribute ID 16]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getScaledValueAsync() { - return read(attributes.get(ATTR_SCALEDVALUE)); - } - - /** - * Synchronously get the ScaledValue attribute [attribute ID 16]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getScaledValue(final long refreshPeriod) { - if (attributes.get(ATTR_SCALEDVALUE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_SCALEDVALUE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_SCALEDVALUE)); - } - - /** - * Set reporting for the ScaledValue attribute [attribute ID 16]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param minInterval {@link int} minimum reporting period - * @param maxInterval {@link int} maximum reporting period - * @param reportableChange {@link Object} delta required to trigger report - * @return the {@link Future} command result future - */ - public Future setScaledValueReporting(final int minInterval, final int maxInterval, final Object reportableChange) { - return setReporting(attributes.get(ATTR_SCALEDVALUE), minInterval, maxInterval, reportableChange); - } - - /** - * Get the MinScaledValue attribute [attribute ID 17]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getMinScaledValueAsync() { - return read(attributes.get(ATTR_MINSCALEDVALUE)); - } - - /** - * Synchronously get the MinScaledValue attribute [attribute ID 17]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMinScaledValue(final long refreshPeriod) { - if (attributes.get(ATTR_MINSCALEDVALUE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MINSCALEDVALUE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MINSCALEDVALUE)); - } - - /** - * Get the MaxScaledValue attribute [attribute ID 18]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getMaxScaledValueAsync() { - return read(attributes.get(ATTR_MAXSCALEDVALUE)); - } - - /** - * Synchronously get the MaxScaledValue attribute [attribute ID 18]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMaxScaledValue(final long refreshPeriod) { - if (attributes.get(ATTR_MAXSCALEDVALUE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MAXSCALEDVALUE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MAXSCALEDVALUE)); - } - - /** - * Get the ScaledTolerance attribute [attribute ID 19]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getScaledToleranceAsync() { - return read(attributes.get(ATTR_SCALEDTOLERANCE)); - } - - /** - * Synchronously get the ScaledTolerance attribute [attribute ID 19]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getScaledTolerance(final long refreshPeriod) { - if (attributes.get(ATTR_SCALEDTOLERANCE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_SCALEDTOLERANCE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_SCALEDTOLERANCE)); - } - - /** - * Set reporting for the ScaledTolerance attribute [attribute ID 19]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param minInterval {@link int} minimum reporting period - * @param maxInterval {@link int} maximum reporting period - * @param reportableChange {@link Object} delta required to trigger report - * @return the {@link Future} command result future - */ - public Future setScaledToleranceReporting(final int minInterval, final int maxInterval, final Object reportableChange) { - return setReporting(attributes.get(ATTR_SCALEDTOLERANCE), minInterval, maxInterval, reportableChange); - } - - /** - * Get the Scale attribute [attribute ID 20]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getScaleAsync() { - return read(attributes.get(ATTR_SCALE)); - } - - /** - * Synchronously get the Scale attribute [attribute ID 20]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getScale(final long refreshPeriod) { - if (attributes.get(ATTR_SCALE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_SCALE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_SCALE)); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclPriceCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclPriceCluster.java deleted file mode 100644 index f5f933b81..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclPriceCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Price cluster implementation (Cluster ID 0x0700). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclPriceCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0700; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Price"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Price cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclPriceCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclPumpConfigurationAndControlCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclPumpConfigurationAndControlCluster.java deleted file mode 100644 index 8b496df5c..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclPumpConfigurationAndControlCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Pump Configuration and Control cluster implementation (Cluster ID 0x0200). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclPumpConfigurationAndControlCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0200; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Pump Configuration and Control"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Pump Configuration and Control cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclPumpConfigurationAndControlCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclRelativeHumidityMeasurementCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclRelativeHumidityMeasurementCluster.java deleted file mode 100644 index 927c7170d..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclRelativeHumidityMeasurementCluster.java +++ /dev/null @@ -1,354 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.CommandResult; -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import com.zsmartsystems.zigbee.zcl.protocol.ZclClusterType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Future; -import javax.annotation.Generated; - -/** - * Relative humidity measurement cluster implementation (Cluster ID 0x0405). - *

    - * The server cluster provides an interface to relative humidity measurement - * functionality, including configuration and provision of notifications of relative - * humidity measurements. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclRelativeHumidityMeasurementCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0405; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Relative humidity measurement"; - - // Attribute constants - /** - * MeasuredValue represents the relative humidity in % as follows:- - *

    - * MeasuredValue = 100 x Relative humidity - *

    - * Where 0% <= Relative humidity <= 100%, corresponding to a MeasuredValue in - * the range 0 to 0x2710. - *

    - * The maximum resolution this format allows is 0.01%. - *

    - * A MeasuredValue of 0xffff indicates that the measurement is invalid. - *

    - * MeasuredValue is updated continuously as new measurements are made. - */ - public static final int ATTR_MEASUREDVALUE = 0x0000; - /** - * The MinMeasuredValue attribute indicates the minimum value of MeasuredValue - * that can be measured. A value of 0xffff means this attribute is not defined - */ - public static final int ATTR_MINMEASUREDVALUE = 0x0001; - /** - * The MaxMeasuredValue attribute indicates the maximum value of MeasuredValue - * that can be measured. A value of 0xffff means this attribute is not defined. - *

    - * MaxMeasuredValue shall be greater than MinMeasuredValue. - *

    - * MinMeasuredValue and MaxMeasuredValue define the range of the sensor. - */ - public static final int ATTR_MAXMEASUREDVALUE = 0x0002; - /** - * The Tolerance attribute indicates the magnitude of the possible error that is - * associated with MeasuredValue . The true value is located in the range - * (MeasuredValue – Tolerance) to (MeasuredValue + Tolerance). - */ - public static final int ATTR_TOLERANCE = 0x0003; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(4); - - attributeMap.put(ATTR_MEASUREDVALUE, new ZclAttribute(ZclClusterType.RELATIVE_HUMIDITY_MEASUREMENT, ATTR_MEASUREDVALUE, "MeasuredValue", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, true)); - attributeMap.put(ATTR_MINMEASUREDVALUE, new ZclAttribute(ZclClusterType.RELATIVE_HUMIDITY_MEASUREMENT, ATTR_MINMEASUREDVALUE, "MinMeasuredValue", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_MAXMEASUREDVALUE, new ZclAttribute(ZclClusterType.RELATIVE_HUMIDITY_MEASUREMENT, ATTR_MAXMEASUREDVALUE, "MaxMeasuredValue", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_TOLERANCE, new ZclAttribute(ZclClusterType.RELATIVE_HUMIDITY_MEASUREMENT, ATTR_TOLERANCE, "Tolerance", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, true)); - - return attributeMap; - } - - /** - * Default constructor to create a Relative humidity measurement cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclRelativeHumidityMeasurementCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } - - /** - * Get the MeasuredValue attribute [attribute ID 0]. - *

    - * MeasuredValue represents the relative humidity in % as follows:- - *

    - * MeasuredValue = 100 x Relative humidity - *

    - * Where 0% <= Relative humidity <= 100%, corresponding to a MeasuredValue in - * the range 0 to 0x2710. - *

    - * The maximum resolution this format allows is 0.01%. - *

    - * A MeasuredValue of 0xffff indicates that the measurement is invalid. - *

    - * MeasuredValue is updated continuously as new measurements are made. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getMeasuredValueAsync() { - return read(attributes.get(ATTR_MEASUREDVALUE)); - } - - /** - * Synchronously get the MeasuredValue attribute [attribute ID 0]. - *

    - * MeasuredValue represents the relative humidity in % as follows:- - *

    - * MeasuredValue = 100 x Relative humidity - *

    - * Where 0% <= Relative humidity <= 100%, corresponding to a MeasuredValue in - * the range 0 to 0x2710. - *

    - * The maximum resolution this format allows is 0.01%. - *

    - * A MeasuredValue of 0xffff indicates that the measurement is invalid. - *

    - * MeasuredValue is updated continuously as new measurements are made. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMeasuredValue(final long refreshPeriod) { - if (attributes.get(ATTR_MEASUREDVALUE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MEASUREDVALUE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MEASUREDVALUE)); - } - - /** - * Set reporting for the MeasuredValue attribute [attribute ID 0]. - *

    - * MeasuredValue represents the relative humidity in % as follows:- - *

    - * MeasuredValue = 100 x Relative humidity - *

    - * Where 0% <= Relative humidity <= 100%, corresponding to a MeasuredValue in - * the range 0 to 0x2710. - *

    - * The maximum resolution this format allows is 0.01%. - *

    - * A MeasuredValue of 0xffff indicates that the measurement is invalid. - *

    - * MeasuredValue is updated continuously as new measurements are made. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param minInterval {@link int} minimum reporting period - * @param maxInterval {@link int} maximum reporting period - * @param reportableChange {@link Object} delta required to trigger report - * @return the {@link Future} command result future - */ - public Future setMeasuredValueReporting(final int minInterval, final int maxInterval, final Object reportableChange) { - return setReporting(attributes.get(ATTR_MEASUREDVALUE), minInterval, maxInterval, reportableChange); - } - - /** - * Get the MinMeasuredValue attribute [attribute ID 1]. - *

    - * The MinMeasuredValue attribute indicates the minimum value of MeasuredValue - * that can be measured. A value of 0xffff means this attribute is not defined - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getMinMeasuredValueAsync() { - return read(attributes.get(ATTR_MINMEASUREDVALUE)); - } - - /** - * Synchronously get the MinMeasuredValue attribute [attribute ID 1]. - *

    - * The MinMeasuredValue attribute indicates the minimum value of MeasuredValue - * that can be measured. A value of 0xffff means this attribute is not defined - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMinMeasuredValue(final long refreshPeriod) { - if (attributes.get(ATTR_MINMEASUREDVALUE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MINMEASUREDVALUE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MINMEASUREDVALUE)); - } - - /** - * Get the MaxMeasuredValue attribute [attribute ID 2]. - *

    - * The MaxMeasuredValue attribute indicates the maximum value of MeasuredValue - * that can be measured. A value of 0xffff means this attribute is not defined. - *

    - * MaxMeasuredValue shall be greater than MinMeasuredValue. - *

    - * MinMeasuredValue and MaxMeasuredValue define the range of the sensor. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getMaxMeasuredValueAsync() { - return read(attributes.get(ATTR_MAXMEASUREDVALUE)); - } - - /** - * Synchronously get the MaxMeasuredValue attribute [attribute ID 2]. - *

    - * The MaxMeasuredValue attribute indicates the maximum value of MeasuredValue - * that can be measured. A value of 0xffff means this attribute is not defined. - *

    - * MaxMeasuredValue shall be greater than MinMeasuredValue. - *

    - * MinMeasuredValue and MaxMeasuredValue define the range of the sensor. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMaxMeasuredValue(final long refreshPeriod) { - if (attributes.get(ATTR_MAXMEASUREDVALUE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MAXMEASUREDVALUE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MAXMEASUREDVALUE)); - } - - /** - * Get the Tolerance attribute [attribute ID 3]. - *

    - * The Tolerance attribute indicates the magnitude of the possible error that is - * associated with MeasuredValue . The true value is located in the range - * (MeasuredValue – Tolerance) to (MeasuredValue + Tolerance). - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getToleranceAsync() { - return read(attributes.get(ATTR_TOLERANCE)); - } - - /** - * Synchronously get the Tolerance attribute [attribute ID 3]. - *

    - * The Tolerance attribute indicates the magnitude of the possible error that is - * associated with MeasuredValue . The true value is located in the range - * (MeasuredValue – Tolerance) to (MeasuredValue + Tolerance). - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getTolerance(final long refreshPeriod) { - if (attributes.get(ATTR_TOLERANCE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_TOLERANCE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_TOLERANCE)); - } - - /** - * Set reporting for the Tolerance attribute [attribute ID 3]. - *

    - * The Tolerance attribute indicates the magnitude of the possible error that is - * associated with MeasuredValue . The true value is located in the range - * (MeasuredValue – Tolerance) to (MeasuredValue + Tolerance). - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param minInterval {@link int} minimum reporting period - * @param maxInterval {@link int} maximum reporting period - * @param reportableChange {@link Object} delta required to trigger report - * @return the {@link Future} command result future - */ - public Future setToleranceReporting(final int minInterval, final int maxInterval, final Object reportableChange) { - return setReporting(attributes.get(ATTR_TOLERANCE), minInterval, maxInterval, reportableChange); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclRssiLocationCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclRssiLocationCluster.java deleted file mode 100644 index 50a98dc1f..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclRssiLocationCluster.java +++ /dev/null @@ -1,1361 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.CommandResult; -import com.zsmartsystems.zigbee.IeeeAddress; -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.clusters.rssilocation.AnchorNodeAnnounceCommand; -import com.zsmartsystems.zigbee.zcl.clusters.rssilocation.CompactLocationDataNotificationCommand; -import com.zsmartsystems.zigbee.zcl.clusters.rssilocation.DeviceConfigurationResponse; -import com.zsmartsystems.zigbee.zcl.clusters.rssilocation.GetDeviceConfigurationCommand; -import com.zsmartsystems.zigbee.zcl.clusters.rssilocation.GetLocationDataCommand; -import com.zsmartsystems.zigbee.zcl.clusters.rssilocation.LocationDataNotificationCommand; -import com.zsmartsystems.zigbee.zcl.clusters.rssilocation.LocationDataResponse; -import com.zsmartsystems.zigbee.zcl.clusters.rssilocation.ReportRssiMeasurementsCommand; -import com.zsmartsystems.zigbee.zcl.clusters.rssilocation.RequestOwnLocationCommand; -import com.zsmartsystems.zigbee.zcl.clusters.rssilocation.RssiPingCommand; -import com.zsmartsystems.zigbee.zcl.clusters.rssilocation.RssiRequestCommand; -import com.zsmartsystems.zigbee.zcl.clusters.rssilocation.RssiResponse; -import com.zsmartsystems.zigbee.zcl.clusters.rssilocation.SendPingsCommand; -import com.zsmartsystems.zigbee.zcl.clusters.rssilocation.SetAbsoluteLocationCommand; -import com.zsmartsystems.zigbee.zcl.clusters.rssilocation.SetDeviceConfigurationCommand; -import com.zsmartsystems.zigbee.zcl.field.NeighborInformation; -import com.zsmartsystems.zigbee.zcl.protocol.ZclClusterType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import java.util.List; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Future; -import javax.annotation.Generated; - -/** - * RSSI Location cluster implementation (Cluster ID 0x000B). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclRssiLocationCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x000B; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "RSSI Location"; - - // Attribute constants - /** - * The LocationType attribute is 8 bits long and is divided into bit fields. - */ - public static final int ATTR_LOCATIONTYPE = 0x0000; - /** - */ - public static final int ATTR_LOCATIONMETHOD = 0x0001; - /** - * The LocationAge attribute indicates the amount of time, measured in seconds, that - * has transpired since the location information was last calculated. This attribute is - * not valid if the Absolute bit of the LocationType attribute is set to one. - */ - public static final int ATTR_LOCATIONAGE = 0x0002; - /** - * The QualityMeasure attribute is a measure of confidence in the corresponding - * location information. The higher the value, the more confident the transmitting - * device is in the location information. A value of 0x64 indicates complete (100%) - * confidence and a value of 0x00 indicates zero confidence. (Note: no fixed - * confidence metric is mandated – the metric may be application and manufacturer - * dependent). - *

    - * This field is not valid if the Absolute bit of the LocationType attribute is set to one. - */ - public static final int ATTR_QUALITYMEASURE = 0x0003; - /** - * The NumberOfDevices attribute is the number of devices whose location data - * were used to calculate the last location value. This attribute is related to the - * QualityMeasure attribute. - */ - public static final int ATTR_NUMBEROFDEVICES = 0x0004; - /** - * The Coordinate1, Coordinate2 and Coordinate3 attributes are signed 16-bit - * integers, and represent orthogonal linear coordinates x, y, z in meters as follows. - *

    - * x = Coordinate1 / 10, y = Coordinate2 / 10, z = Coordinate3 / 10 - *

    - * The range of x is -3276.7 to 3276.7 meters, corresponding to Coordinate1 - * between 0x8001 and 0x7fff. The same range applies to y and z. A value of - * 0x8000 for any of the coordinates indicates that the coordinate is unknown. - */ - public static final int ATTR_COORDINATE1 = 0x0010; - /** - * The Coordinate1, Coordinate2 and Coordinate3 attributes are signed 16-bit - * integers, and represent orthogonal linear coordinates x, y, z in meters as follows. - *

    - * x = Coordinate1 / 10, y = Coordinate2 / 10, z = Coordinate3 / 10 - *

    - * The range of x is -3276.7 to 3276.7 meters, corresponding to Coordinate1 - * between 0x8001 and 0x7fff. The same range applies to y and z. A value of - * 0x8000 for any of the coordinates indicates that the coordinate is unknown. - */ - public static final int ATTR_COORDINATE2 = 0x0011; - /** - * The Coordinate1, Coordinate2 and Coordinate3 attributes are signed 16-bit - * integers, and represent orthogonal linear coordinates x, y, z in meters as follows. - *

    - * x = Coordinate1 / 10, y = Coordinate2 / 10, z = Coordinate3 / 10 - *

    - * The range of x is -3276.7 to 3276.7 meters, corresponding to Coordinate1 - * between 0x8001 and 0x7fff. The same range applies to y and z. A value of - * 0x8000 for any of the coordinates indicates that the coordinate is unknown. - */ - public static final int ATTR_COORDINATE3 = 0x0012; - /** - * The Power attribute specifies the value of the average power P0, measured in - * dBm, received at a reference distance of one meter from the transmitter. - *

    - * P0 = Power / 100 - *

    - * A value of 0x8000 indicates that Power is unknown. - */ - public static final int ATTR_POWER = 0x0013; - /** - * The PathLossExponent attribute specifies the value of the Path Loss Exponent n, - * an exponent that describes the rate at which the signal power decays with - * increasing distance from the transmitter. - *

    - * n = PathLossExponent / 100 - *

    - * A value of 0xffff indicates that PathLossExponent is unknown. - */ - public static final int ATTR_PATHLOSSEXPONENT = 0x0014; - /** - * The ReportingPeriod attribute specifies the time in seconds between successive - * reports of the device's location by means of the Location Data Notification - * command. The minimum value this attribute can take is specified by the profile in - * use. If ReportingPeriod is zero, the device does not automatically report its - * location. Note that location information can always be polled at any time. - */ - public static final int ATTR_REPORTINGPERIOD = 0x0015; - /** - * The CalculationPeriod attribute specifies the time in seconds between successive - * calculations of the device's location. If CalculationPeriod is less than the - * physically possible minimum period that the calculation can be performed, the - * calculation will be repeated as frequently as possible. - */ - public static final int ATTR_CALCULATIONPERIOD = 0x0016; - /** - * The NumberRSSIMeasurements attribute specifies the number of RSSI - * measurements to be used to generate one location estimate. The measurements are - * averaged to improve accuracy. NumberRSSIMeasurements must be greater than or - * equal to 1. - */ - public static final int ATTR_NUMBERRSSIMEASUREMENTS = 0x0017; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(13); - - attributeMap.put(ATTR_LOCATIONTYPE, new ZclAttribute(ZclClusterType.RSSI_LOCATION, ATTR_LOCATIONTYPE, "LocationType", ZclDataType.DATA_8_BIT, true, true, false, false)); - attributeMap.put(ATTR_LOCATIONMETHOD, new ZclAttribute(ZclClusterType.RSSI_LOCATION, ATTR_LOCATIONMETHOD, "LocationMethod", ZclDataType.ENUMERATION_8_BIT, true, true, false, false)); - attributeMap.put(ATTR_LOCATIONAGE, new ZclAttribute(ZclClusterType.RSSI_LOCATION, ATTR_LOCATIONAGE, "LocationAge", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_QUALITYMEASURE, new ZclAttribute(ZclClusterType.RSSI_LOCATION, ATTR_QUALITYMEASURE, "QualityMeasure", ZclDataType.UNSIGNED_8_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_NUMBEROFDEVICES, new ZclAttribute(ZclClusterType.RSSI_LOCATION, ATTR_NUMBEROFDEVICES, "NumberOfDevices", ZclDataType.UNSIGNED_8_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_COORDINATE1, new ZclAttribute(ZclClusterType.RSSI_LOCATION, ATTR_COORDINATE1, "Coordinate1", ZclDataType.SIGNED_16_BIT_INTEGER, true, true, true, false)); - attributeMap.put(ATTR_COORDINATE2, new ZclAttribute(ZclClusterType.RSSI_LOCATION, ATTR_COORDINATE2, "Coordinate2", ZclDataType.SIGNED_16_BIT_INTEGER, true, true, true, false)); - attributeMap.put(ATTR_COORDINATE3, new ZclAttribute(ZclClusterType.RSSI_LOCATION, ATTR_COORDINATE3, "Coordinate3", ZclDataType.SIGNED_16_BIT_INTEGER, false, true, true, false)); - attributeMap.put(ATTR_POWER, new ZclAttribute(ZclClusterType.RSSI_LOCATION, ATTR_POWER, "Power", ZclDataType.SIGNED_16_BIT_INTEGER, true, true, true, false)); - attributeMap.put(ATTR_PATHLOSSEXPONENT, new ZclAttribute(ZclClusterType.RSSI_LOCATION, ATTR_PATHLOSSEXPONENT, "PathLossExponent", ZclDataType.SIGNED_16_BIT_INTEGER, true, true, true, false)); - attributeMap.put(ATTR_REPORTINGPERIOD, new ZclAttribute(ZclClusterType.RSSI_LOCATION, ATTR_REPORTINGPERIOD, "ReportingPeriod", ZclDataType.SIGNED_16_BIT_INTEGER, false, true, true, false)); - attributeMap.put(ATTR_CALCULATIONPERIOD, new ZclAttribute(ZclClusterType.RSSI_LOCATION, ATTR_CALCULATIONPERIOD, "CalculationPeriod", ZclDataType.SIGNED_16_BIT_INTEGER, false, true, true, false)); - attributeMap.put(ATTR_NUMBERRSSIMEASUREMENTS, new ZclAttribute(ZclClusterType.RSSI_LOCATION, ATTR_NUMBERRSSIMEASUREMENTS, "NumberRSSIMeasurements", ZclDataType.SIGNED_16_BIT_INTEGER, false, true, true, false)); - - return attributeMap; - } - - /** - * Default constructor to create a RSSI Location cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclRssiLocationCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } - - /** - * Get the LocationType attribute [attribute ID 0]. - *

    - * The LocationType attribute is 8 bits long and is divided into bit fields. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getLocationTypeAsync() { - return read(attributes.get(ATTR_LOCATIONTYPE)); - } - - /** - * Synchronously get the LocationType attribute [attribute ID 0]. - *

    - * The LocationType attribute is 8 bits long and is divided into bit fields. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getLocationType(final long refreshPeriod) { - if (attributes.get(ATTR_LOCATIONTYPE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_LOCATIONTYPE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_LOCATIONTYPE)); - } - - /** - * Get the LocationMethod attribute [attribute ID 1]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getLocationMethodAsync() { - return read(attributes.get(ATTR_LOCATIONMETHOD)); - } - - /** - * Synchronously get the LocationMethod attribute [attribute ID 1]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getLocationMethod(final long refreshPeriod) { - if (attributes.get(ATTR_LOCATIONMETHOD).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_LOCATIONMETHOD).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_LOCATIONMETHOD)); - } - - /** - * Get the LocationAge attribute [attribute ID 2]. - *

    - * The LocationAge attribute indicates the amount of time, measured in seconds, that - * has transpired since the location information was last calculated. This attribute is - * not valid if the Absolute bit of the LocationType attribute is set to one. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getLocationAgeAsync() { - return read(attributes.get(ATTR_LOCATIONAGE)); - } - - /** - * Synchronously get the LocationAge attribute [attribute ID 2]. - *

    - * The LocationAge attribute indicates the amount of time, measured in seconds, that - * has transpired since the location information was last calculated. This attribute is - * not valid if the Absolute bit of the LocationType attribute is set to one. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getLocationAge(final long refreshPeriod) { - if (attributes.get(ATTR_LOCATIONAGE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_LOCATIONAGE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_LOCATIONAGE)); - } - - /** - * Get the QualityMeasure attribute [attribute ID 3]. - *

    - * The QualityMeasure attribute is a measure of confidence in the corresponding - * location information. The higher the value, the more confident the transmitting - * device is in the location information. A value of 0x64 indicates complete (100%) - * confidence and a value of 0x00 indicates zero confidence. (Note: no fixed - * confidence metric is mandated – the metric may be application and manufacturer - * dependent). - *

    - * This field is not valid if the Absolute bit of the LocationType attribute is set to one. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getQualityMeasureAsync() { - return read(attributes.get(ATTR_QUALITYMEASURE)); - } - - /** - * Synchronously get the QualityMeasure attribute [attribute ID 3]. - *

    - * The QualityMeasure attribute is a measure of confidence in the corresponding - * location information. The higher the value, the more confident the transmitting - * device is in the location information. A value of 0x64 indicates complete (100%) - * confidence and a value of 0x00 indicates zero confidence. (Note: no fixed - * confidence metric is mandated – the metric may be application and manufacturer - * dependent). - *

    - * This field is not valid if the Absolute bit of the LocationType attribute is set to one. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getQualityMeasure(final long refreshPeriod) { - if (attributes.get(ATTR_QUALITYMEASURE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_QUALITYMEASURE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_QUALITYMEASURE)); - } - - /** - * Get the NumberOfDevices attribute [attribute ID 4]. - *

    - * The NumberOfDevices attribute is the number of devices whose location data - * were used to calculate the last location value. This attribute is related to the - * QualityMeasure attribute. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getNumberOfDevicesAsync() { - return read(attributes.get(ATTR_NUMBEROFDEVICES)); - } - - /** - * Synchronously get the NumberOfDevices attribute [attribute ID 4]. - *

    - * The NumberOfDevices attribute is the number of devices whose location data - * were used to calculate the last location value. This attribute is related to the - * QualityMeasure attribute. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getNumberOfDevices(final long refreshPeriod) { - if (attributes.get(ATTR_NUMBEROFDEVICES).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_NUMBEROFDEVICES).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_NUMBEROFDEVICES)); - } - - /** - * Set the Coordinate1 attribute [attribute ID 16]. - *

    - * The Coordinate1, Coordinate2 and Coordinate3 attributes are signed 16-bit - * integers, and represent orthogonal linear coordinates x, y, z in meters as follows. - *

    - * x = Coordinate1 / 10, y = Coordinate2 / 10, z = Coordinate3 / 10 - *

    - * The range of x is -3276.7 to 3276.7 meters, corresponding to Coordinate1 - * between 0x8001 and 0x7fff. The same range applies to y and z. A value of - * 0x8000 for any of the coordinates indicates that the coordinate is unknown. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param coordinate1 the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setCoordinate1(final Object value) { - return write(attributes.get(ATTR_COORDINATE1), value); - } - - /** - * Get the Coordinate1 attribute [attribute ID 16]. - *

    - * The Coordinate1, Coordinate2 and Coordinate3 attributes are signed 16-bit - * integers, and represent orthogonal linear coordinates x, y, z in meters as follows. - *

    - * x = Coordinate1 / 10, y = Coordinate2 / 10, z = Coordinate3 / 10 - *

    - * The range of x is -3276.7 to 3276.7 meters, corresponding to Coordinate1 - * between 0x8001 and 0x7fff. The same range applies to y and z. A value of - * 0x8000 for any of the coordinates indicates that the coordinate is unknown. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getCoordinate1Async() { - return read(attributes.get(ATTR_COORDINATE1)); - } - - /** - * Synchronously get the Coordinate1 attribute [attribute ID 16]. - *

    - * The Coordinate1, Coordinate2 and Coordinate3 attributes are signed 16-bit - * integers, and represent orthogonal linear coordinates x, y, z in meters as follows. - *

    - * x = Coordinate1 / 10, y = Coordinate2 / 10, z = Coordinate3 / 10 - *

    - * The range of x is -3276.7 to 3276.7 meters, corresponding to Coordinate1 - * between 0x8001 and 0x7fff. The same range applies to y and z. A value of - * 0x8000 for any of the coordinates indicates that the coordinate is unknown. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getCoordinate1(final long refreshPeriod) { - if (attributes.get(ATTR_COORDINATE1).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_COORDINATE1).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_COORDINATE1)); - } - - /** - * Set the Coordinate2 attribute [attribute ID 17]. - *

    - * The Coordinate1, Coordinate2 and Coordinate3 attributes are signed 16-bit - * integers, and represent orthogonal linear coordinates x, y, z in meters as follows. - *

    - * x = Coordinate1 / 10, y = Coordinate2 / 10, z = Coordinate3 / 10 - *

    - * The range of x is -3276.7 to 3276.7 meters, corresponding to Coordinate1 - * between 0x8001 and 0x7fff. The same range applies to y and z. A value of - * 0x8000 for any of the coordinates indicates that the coordinate is unknown. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param coordinate2 the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setCoordinate2(final Object value) { - return write(attributes.get(ATTR_COORDINATE2), value); - } - - /** - * Get the Coordinate2 attribute [attribute ID 17]. - *

    - * The Coordinate1, Coordinate2 and Coordinate3 attributes are signed 16-bit - * integers, and represent orthogonal linear coordinates x, y, z in meters as follows. - *

    - * x = Coordinate1 / 10, y = Coordinate2 / 10, z = Coordinate3 / 10 - *

    - * The range of x is -3276.7 to 3276.7 meters, corresponding to Coordinate1 - * between 0x8001 and 0x7fff. The same range applies to y and z. A value of - * 0x8000 for any of the coordinates indicates that the coordinate is unknown. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getCoordinate2Async() { - return read(attributes.get(ATTR_COORDINATE2)); - } - - /** - * Synchronously get the Coordinate2 attribute [attribute ID 17]. - *

    - * The Coordinate1, Coordinate2 and Coordinate3 attributes are signed 16-bit - * integers, and represent orthogonal linear coordinates x, y, z in meters as follows. - *

    - * x = Coordinate1 / 10, y = Coordinate2 / 10, z = Coordinate3 / 10 - *

    - * The range of x is -3276.7 to 3276.7 meters, corresponding to Coordinate1 - * between 0x8001 and 0x7fff. The same range applies to y and z. A value of - * 0x8000 for any of the coordinates indicates that the coordinate is unknown. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getCoordinate2(final long refreshPeriod) { - if (attributes.get(ATTR_COORDINATE2).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_COORDINATE2).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_COORDINATE2)); - } - - /** - * Set the Coordinate3 attribute [attribute ID 18]. - *

    - * The Coordinate1, Coordinate2 and Coordinate3 attributes are signed 16-bit - * integers, and represent orthogonal linear coordinates x, y, z in meters as follows. - *

    - * x = Coordinate1 / 10, y = Coordinate2 / 10, z = Coordinate3 / 10 - *

    - * The range of x is -3276.7 to 3276.7 meters, corresponding to Coordinate1 - * between 0x8001 and 0x7fff. The same range applies to y and z. A value of - * 0x8000 for any of the coordinates indicates that the coordinate is unknown. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param coordinate3 the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setCoordinate3(final Object value) { - return write(attributes.get(ATTR_COORDINATE3), value); - } - - /** - * Get the Coordinate3 attribute [attribute ID 18]. - *

    - * The Coordinate1, Coordinate2 and Coordinate3 attributes are signed 16-bit - * integers, and represent orthogonal linear coordinates x, y, z in meters as follows. - *

    - * x = Coordinate1 / 10, y = Coordinate2 / 10, z = Coordinate3 / 10 - *

    - * The range of x is -3276.7 to 3276.7 meters, corresponding to Coordinate1 - * between 0x8001 and 0x7fff. The same range applies to y and z. A value of - * 0x8000 for any of the coordinates indicates that the coordinate is unknown. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getCoordinate3Async() { - return read(attributes.get(ATTR_COORDINATE3)); - } - - /** - * Synchronously get the Coordinate3 attribute [attribute ID 18]. - *

    - * The Coordinate1, Coordinate2 and Coordinate3 attributes are signed 16-bit - * integers, and represent orthogonal linear coordinates x, y, z in meters as follows. - *

    - * x = Coordinate1 / 10, y = Coordinate2 / 10, z = Coordinate3 / 10 - *

    - * The range of x is -3276.7 to 3276.7 meters, corresponding to Coordinate1 - * between 0x8001 and 0x7fff. The same range applies to y and z. A value of - * 0x8000 for any of the coordinates indicates that the coordinate is unknown. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getCoordinate3(final long refreshPeriod) { - if (attributes.get(ATTR_COORDINATE3).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_COORDINATE3).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_COORDINATE3)); - } - - /** - * Set the Power attribute [attribute ID 19]. - *

    - * The Power attribute specifies the value of the average power P0, measured in - * dBm, received at a reference distance of one meter from the transmitter. - *

    - * P0 = Power / 100 - *

    - * A value of 0x8000 indicates that Power is unknown. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param power the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setPower(final Object value) { - return write(attributes.get(ATTR_POWER), value); - } - - /** - * Get the Power attribute [attribute ID 19]. - *

    - * The Power attribute specifies the value of the average power P0, measured in - * dBm, received at a reference distance of one meter from the transmitter. - *

    - * P0 = Power / 100 - *

    - * A value of 0x8000 indicates that Power is unknown. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getPowerAsync() { - return read(attributes.get(ATTR_POWER)); - } - - /** - * Synchronously get the Power attribute [attribute ID 19]. - *

    - * The Power attribute specifies the value of the average power P0, measured in - * dBm, received at a reference distance of one meter from the transmitter. - *

    - * P0 = Power / 100 - *

    - * A value of 0x8000 indicates that Power is unknown. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getPower(final long refreshPeriod) { - if (attributes.get(ATTR_POWER).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_POWER).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_POWER)); - } - - /** - * Set the PathLossExponent attribute [attribute ID 20]. - *

    - * The PathLossExponent attribute specifies the value of the Path Loss Exponent n, - * an exponent that describes the rate at which the signal power decays with - * increasing distance from the transmitter. - *

    - * n = PathLossExponent / 100 - *

    - * A value of 0xffff indicates that PathLossExponent is unknown. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param pathLossExponent the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setPathLossExponent(final Object value) { - return write(attributes.get(ATTR_PATHLOSSEXPONENT), value); - } - - /** - * Get the PathLossExponent attribute [attribute ID 20]. - *

    - * The PathLossExponent attribute specifies the value of the Path Loss Exponent n, - * an exponent that describes the rate at which the signal power decays with - * increasing distance from the transmitter. - *

    - * n = PathLossExponent / 100 - *

    - * A value of 0xffff indicates that PathLossExponent is unknown. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getPathLossExponentAsync() { - return read(attributes.get(ATTR_PATHLOSSEXPONENT)); - } - - /** - * Synchronously get the PathLossExponent attribute [attribute ID 20]. - *

    - * The PathLossExponent attribute specifies the value of the Path Loss Exponent n, - * an exponent that describes the rate at which the signal power decays with - * increasing distance from the transmitter. - *

    - * n = PathLossExponent / 100 - *

    - * A value of 0xffff indicates that PathLossExponent is unknown. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getPathLossExponent(final long refreshPeriod) { - if (attributes.get(ATTR_PATHLOSSEXPONENT).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_PATHLOSSEXPONENT).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_PATHLOSSEXPONENT)); - } - - /** - * Set the ReportingPeriod attribute [attribute ID 21]. - *

    - * The ReportingPeriod attribute specifies the time in seconds between successive - * reports of the device's location by means of the Location Data Notification - * command. The minimum value this attribute can take is specified by the profile in - * use. If ReportingPeriod is zero, the device does not automatically report its - * location. Note that location information can always be polled at any time. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param reportingPeriod the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setReportingPeriod(final Object value) { - return write(attributes.get(ATTR_REPORTINGPERIOD), value); - } - - /** - * Get the ReportingPeriod attribute [attribute ID 21]. - *

    - * The ReportingPeriod attribute specifies the time in seconds between successive - * reports of the device's location by means of the Location Data Notification - * command. The minimum value this attribute can take is specified by the profile in - * use. If ReportingPeriod is zero, the device does not automatically report its - * location. Note that location information can always be polled at any time. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getReportingPeriodAsync() { - return read(attributes.get(ATTR_REPORTINGPERIOD)); - } - - /** - * Synchronously get the ReportingPeriod attribute [attribute ID 21]. - *

    - * The ReportingPeriod attribute specifies the time in seconds between successive - * reports of the device's location by means of the Location Data Notification - * command. The minimum value this attribute can take is specified by the profile in - * use. If ReportingPeriod is zero, the device does not automatically report its - * location. Note that location information can always be polled at any time. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getReportingPeriod(final long refreshPeriod) { - if (attributes.get(ATTR_REPORTINGPERIOD).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_REPORTINGPERIOD).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_REPORTINGPERIOD)); - } - - /** - * Set the CalculationPeriod attribute [attribute ID 22]. - *

    - * The CalculationPeriod attribute specifies the time in seconds between successive - * calculations of the device's location. If CalculationPeriod is less than the - * physically possible minimum period that the calculation can be performed, the - * calculation will be repeated as frequently as possible. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param calculationPeriod the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setCalculationPeriod(final Object value) { - return write(attributes.get(ATTR_CALCULATIONPERIOD), value); - } - - /** - * Get the CalculationPeriod attribute [attribute ID 22]. - *

    - * The CalculationPeriod attribute specifies the time in seconds between successive - * calculations of the device's location. If CalculationPeriod is less than the - * physically possible minimum period that the calculation can be performed, the - * calculation will be repeated as frequently as possible. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getCalculationPeriodAsync() { - return read(attributes.get(ATTR_CALCULATIONPERIOD)); - } - - /** - * Synchronously get the CalculationPeriod attribute [attribute ID 22]. - *

    - * The CalculationPeriod attribute specifies the time in seconds between successive - * calculations of the device's location. If CalculationPeriod is less than the - * physically possible minimum period that the calculation can be performed, the - * calculation will be repeated as frequently as possible. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getCalculationPeriod(final long refreshPeriod) { - if (attributes.get(ATTR_CALCULATIONPERIOD).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_CALCULATIONPERIOD).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_CALCULATIONPERIOD)); - } - - /** - * Set the NumberRSSIMeasurements attribute [attribute ID 23]. - *

    - * The NumberRSSIMeasurements attribute specifies the number of RSSI - * measurements to be used to generate one location estimate. The measurements are - * averaged to improve accuracy. NumberRSSIMeasurements must be greater than or - * equal to 1. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param numberRssiMeasurements the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setNumberRssiMeasurements(final Object value) { - return write(attributes.get(ATTR_NUMBERRSSIMEASUREMENTS), value); - } - - /** - * Get the NumberRSSIMeasurements attribute [attribute ID 23]. - *

    - * The NumberRSSIMeasurements attribute specifies the number of RSSI - * measurements to be used to generate one location estimate. The measurements are - * averaged to improve accuracy. NumberRSSIMeasurements must be greater than or - * equal to 1. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getNumberRssiMeasurementsAsync() { - return read(attributes.get(ATTR_NUMBERRSSIMEASUREMENTS)); - } - - /** - * Synchronously get the NumberRSSIMeasurements attribute [attribute ID 23]. - *

    - * The NumberRSSIMeasurements attribute specifies the number of RSSI - * measurements to be used to generate one location estimate. The measurements are - * averaged to improve accuracy. NumberRSSIMeasurements must be greater than or - * equal to 1. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getNumberRssiMeasurements(final long refreshPeriod) { - if (attributes.get(ATTR_NUMBERRSSIMEASUREMENTS).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_NUMBERRSSIMEASUREMENTS).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_NUMBERRSSIMEASUREMENTS)); - } - - /** - * The Set Absolute Location Command - * - * @param coordinate1 {@link Integer} Coordinate 1 - * @param coordinate2 {@link Integer} Coordinate 2 - * @param coordinate3 {@link Integer} Coordinate 3 - * @param power {@link Integer} Power - * @param pathLossExponent {@link Integer} Path Loss Exponent - * @return the {@link Future} command result future - */ - public Future setAbsoluteLocationCommand(Integer coordinate1, Integer coordinate2, Integer coordinate3, Integer power, Integer pathLossExponent) { - SetAbsoluteLocationCommand command = new SetAbsoluteLocationCommand(); - - // Set the fields - command.setCoordinate1(coordinate1); - command.setCoordinate2(coordinate2); - command.setCoordinate3(coordinate3); - command.setPower(power); - command.setPathLossExponent(pathLossExponent); - - return send(command); - } - - /** - * The Set Device Configuration Command - * - * @param power {@link Integer} Power - * @param pathLossExponent {@link Integer} Path Loss Exponent - * @param calculationPeriod {@link Integer} Calculation Period - * @param numberRssiMeasurements {@link Integer} Number RSSI Measurements - * @param reportingPeriod {@link Integer} Reporting Period - * @return the {@link Future} command result future - */ - public Future setDeviceConfigurationCommand(Integer power, Integer pathLossExponent, Integer calculationPeriod, Integer numberRssiMeasurements, Integer reportingPeriod) { - SetDeviceConfigurationCommand command = new SetDeviceConfigurationCommand(); - - // Set the fields - command.setPower(power); - command.setPathLossExponent(pathLossExponent); - command.setCalculationPeriod(calculationPeriod); - command.setNumberRssiMeasurements(numberRssiMeasurements); - command.setReportingPeriod(reportingPeriod); - - return send(command); - } - - /** - * The Get Device Configuration Command - * - * @param targetAddress {@link IeeeAddress} Target Address - * @return the {@link Future} command result future - */ - public Future getDeviceConfigurationCommand(IeeeAddress targetAddress) { - GetDeviceConfigurationCommand command = new GetDeviceConfigurationCommand(); - - // Set the fields - command.setTargetAddress(targetAddress); - - return send(command); - } - - /** - * The Get Location Data Command - * - * @param header {@link Integer} Header - * @param numberResponses {@link Integer} Number Responses - * @param targetAddress {@link IeeeAddress} Target Address - * @return the {@link Future} command result future - */ - public Future getLocationDataCommand(Integer header, Integer numberResponses, IeeeAddress targetAddress) { - GetLocationDataCommand command = new GetLocationDataCommand(); - - // Set the fields - command.setHeader(header); - command.setNumberResponses(numberResponses); - command.setTargetAddress(targetAddress); - - return send(command); - } - - /** - * The RSSI Response - * - * @param replyingDevice {@link IeeeAddress} Replying Device - * @param coordinate1 {@link Integer} Coordinate 1 - * @param coordinate2 {@link Integer} Coordinate 2 - * @param coordinate3 {@link Integer} Coordinate 3 - * @param rssi {@link Integer} RSSI - * @param numberRssiMeasurements {@link Integer} Number RSSI Measurements - * @return the {@link Future} command result future - */ - public Future rssiResponse(IeeeAddress replyingDevice, Integer coordinate1, Integer coordinate2, Integer coordinate3, Integer rssi, Integer numberRssiMeasurements) { - RssiResponse command = new RssiResponse(); - - // Set the fields - command.setReplyingDevice(replyingDevice); - command.setCoordinate1(coordinate1); - command.setCoordinate2(coordinate2); - command.setCoordinate3(coordinate3); - command.setRssi(rssi); - command.setNumberRssiMeasurements(numberRssiMeasurements); - - return send(command); - } - - /** - * The Send Pings Command - * - * @param targetAddress {@link IeeeAddress} Target Address - * @param numberRssiMeasurements {@link Integer} Number RSSI Measurements - * @param calculationPeriod {@link Integer} Calculation Period - * @return the {@link Future} command result future - */ - public Future sendPingsCommand(IeeeAddress targetAddress, Integer numberRssiMeasurements, Integer calculationPeriod) { - SendPingsCommand command = new SendPingsCommand(); - - // Set the fields - command.setTargetAddress(targetAddress); - command.setNumberRssiMeasurements(numberRssiMeasurements); - command.setCalculationPeriod(calculationPeriod); - - return send(command); - } - - /** - * The Anchor Node Announce Command - * - * @param anchorNodeAddress {@link IeeeAddress} Anchor Node Address - * @param coordinate1 {@link Integer} Coordinate 1 - * @param coordinate2 {@link Integer} Coordinate 2 - * @param coordinate3 {@link Integer} Coordinate 3 - * @return the {@link Future} command result future - */ - public Future anchorNodeAnnounceCommand(IeeeAddress anchorNodeAddress, Integer coordinate1, Integer coordinate2, Integer coordinate3) { - AnchorNodeAnnounceCommand command = new AnchorNodeAnnounceCommand(); - - // Set the fields - command.setAnchorNodeAddress(anchorNodeAddress); - command.setCoordinate1(coordinate1); - command.setCoordinate2(coordinate2); - command.setCoordinate3(coordinate3); - - return send(command); - } - - /** - * The Device Configuration Response - * - * @param status {@link Integer} Status - * @param power {@link Integer} Power - * @param pathLossExponent {@link Integer} Path Loss Exponent - * @param calculationPeriod {@link Integer} Calculation Period - * @param numberRssiMeasurements {@link Integer} Number RSSI Measurements - * @param reportingPeriod {@link Integer} Reporting Period - * @return the {@link Future} command result future - */ - public Future deviceConfigurationResponse(Integer status, Integer power, Integer pathLossExponent, Integer calculationPeriod, Integer numberRssiMeasurements, Integer reportingPeriod) { - DeviceConfigurationResponse command = new DeviceConfigurationResponse(); - - // Set the fields - command.setStatus(status); - command.setPower(power); - command.setPathLossExponent(pathLossExponent); - command.setCalculationPeriod(calculationPeriod); - command.setNumberRssiMeasurements(numberRssiMeasurements); - command.setReportingPeriod(reportingPeriod); - - return send(command); - } - - /** - * The Location Data Response - * - * @param status {@link Integer} Status - * @param locationType {@link Integer} Location Type - * @param coordinate1 {@link Integer} Coordinate 1 - * @param coordinate2 {@link Integer} Coordinate 2 - * @param coordinate3 {@link Integer} Coordinate 3 - * @param power {@link Integer} Power - * @param pathLossExponent {@link Integer} Path Loss Exponent - * @param locationMethod {@link Integer} Location Method - * @param qualityMeasure {@link Integer} Quality Measure - * @param locationAge {@link Integer} Location Age - * @return the {@link Future} command result future - */ - public Future locationDataResponse(Integer status, Integer locationType, Integer coordinate1, Integer coordinate2, Integer coordinate3, Integer power, Integer pathLossExponent, Integer locationMethod, Integer qualityMeasure, Integer locationAge) { - LocationDataResponse command = new LocationDataResponse(); - - // Set the fields - command.setStatus(status); - command.setLocationType(locationType); - command.setCoordinate1(coordinate1); - command.setCoordinate2(coordinate2); - command.setCoordinate3(coordinate3); - command.setPower(power); - command.setPathLossExponent(pathLossExponent); - command.setLocationMethod(locationMethod); - command.setQualityMeasure(qualityMeasure); - command.setLocationAge(locationAge); - - return send(command); - } - - /** - * The Location Data Notification Command - * - * @param locationType {@link Integer} Location Type - * @param coordinate1 {@link Integer} Coordinate 1 - * @param coordinate2 {@link Integer} Coordinate 2 - * @param coordinate3 {@link Integer} Coordinate 3 - * @param power {@link Integer} Power - * @param pathLossExponent {@link Integer} Path Loss Exponent - * @param locationMethod {@link Integer} Location Method - * @param qualityMeasure {@link Integer} Quality Measure - * @param locationAge {@link Integer} Location Age - * @return the {@link Future} command result future - */ - public Future locationDataNotificationCommand(Integer locationType, Integer coordinate1, Integer coordinate2, Integer coordinate3, Integer power, Integer pathLossExponent, Integer locationMethod, Integer qualityMeasure, Integer locationAge) { - LocationDataNotificationCommand command = new LocationDataNotificationCommand(); - - // Set the fields - command.setLocationType(locationType); - command.setCoordinate1(coordinate1); - command.setCoordinate2(coordinate2); - command.setCoordinate3(coordinate3); - command.setPower(power); - command.setPathLossExponent(pathLossExponent); - command.setLocationMethod(locationMethod); - command.setQualityMeasure(qualityMeasure); - command.setLocationAge(locationAge); - - return send(command); - } - - /** - * The Compact Location Data Notification Command - * - * @return the {@link Future} command result future - */ - public Future compactLocationDataNotificationCommand() { - CompactLocationDataNotificationCommand command = new CompactLocationDataNotificationCommand(); - - return send(command); - } - - /** - * The RSSI Ping Command - * - * @param locationType {@link Integer} Location Type - * @return the {@link Future} command result future - */ - public Future rssiPingCommand(Integer locationType) { - RssiPingCommand command = new RssiPingCommand(); - - // Set the fields - command.setLocationType(locationType); - - return send(command); - } - - /** - * The RSSI Request Command - * - * @return the {@link Future} command result future - */ - public Future rssiRequestCommand() { - RssiRequestCommand command = new RssiRequestCommand(); - - return send(command); - } - - /** - * The Report RSSI Measurements Command - * - * @param reportingAddress {@link IeeeAddress} Reporting Address - * @param numberOfNeighbors {@link Integer} Number of Neighbors - * @param neighborsInformation {@link List} Neighbors Information - * @return the {@link Future} command result future - */ - public Future reportRssiMeasurementsCommand(IeeeAddress reportingAddress, Integer numberOfNeighbors, List neighborsInformation) { - ReportRssiMeasurementsCommand command = new ReportRssiMeasurementsCommand(); - - // Set the fields - command.setReportingAddress(reportingAddress); - command.setNumberOfNeighbors(numberOfNeighbors); - command.setNeighborsInformation(neighborsInformation); - - return send(command); - } - - /** - * The Request Own Location Command - * - * @param requestingAddress {@link IeeeAddress} Requesting Address - * @return the {@link Future} command result future - */ - public Future requestOwnLocationCommand(IeeeAddress requestingAddress) { - RequestOwnLocationCommand command = new RequestOwnLocationCommand(); - - // Set the fields - command.setRequestingAddress(requestingAddress); - - return send(command); - } - - @Override - public ZclCommand getCommandFromId(int commandId) { - switch (commandId) { - case 0: // SET_ABSOLUTE_LOCATION_COMMAND - return new SetAbsoluteLocationCommand(); - case 1: // SET_DEVICE_CONFIGURATION_COMMAND - return new SetDeviceConfigurationCommand(); - case 2: // GET_DEVICE_CONFIGURATION_COMMAND - return new GetDeviceConfigurationCommand(); - case 3: // GET_LOCATION_DATA_COMMAND - return new GetLocationDataCommand(); - case 4: // RSSI_RESPONSE - return new RssiResponse(); - case 5: // SEND_PINGS_COMMAND - return new SendPingsCommand(); - case 6: // ANCHOR_NODE_ANNOUNCE_COMMAND - return new AnchorNodeAnnounceCommand(); - default: - return null; - } - } - - @Override - public ZclCommand getResponseFromId(int commandId) { - switch (commandId) { - case 0: // DEVICE_CONFIGURATION_RESPONSE - return new DeviceConfigurationResponse(); - case 1: // LOCATION_DATA_RESPONSE - return new LocationDataResponse(); - case 2: // LOCATION_DATA_NOTIFICATION_COMMAND - return new LocationDataNotificationCommand(); - case 3: // COMPACT_LOCATION_DATA_NOTIFICATION_COMMAND - return new CompactLocationDataNotificationCommand(); - case 4: // RSSI_PING_COMMAND - return new RssiPingCommand(); - case 5: // RSSI_REQUEST_COMMAND - return new RssiRequestCommand(); - case 6: // REPORT_RSSI_MEASUREMENTS_COMMAND - return new ReportRssiMeasurementsCommand(); - case 7: // REQUEST_OWN_LOCATION_COMMAND - return new RequestOwnLocationCommand(); - default: - return null; - } - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclScenesCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclScenesCluster.java deleted file mode 100644 index 5645fb6d7..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclScenesCluster.java +++ /dev/null @@ -1,712 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.CommandResult; -import com.zsmartsystems.zigbee.IeeeAddress; -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.clusters.scenes.AddSceneCommand; -import com.zsmartsystems.zigbee.zcl.clusters.scenes.AddSceneResponse; -import com.zsmartsystems.zigbee.zcl.clusters.scenes.GetSceneMembershipCommand; -import com.zsmartsystems.zigbee.zcl.clusters.scenes.GetSceneMembershipResponse; -import com.zsmartsystems.zigbee.zcl.clusters.scenes.RecallSceneCommand; -import com.zsmartsystems.zigbee.zcl.clusters.scenes.RemoveAllScenesCommand; -import com.zsmartsystems.zigbee.zcl.clusters.scenes.RemoveAllScenesResponse; -import com.zsmartsystems.zigbee.zcl.clusters.scenes.RemoveSceneCommand; -import com.zsmartsystems.zigbee.zcl.clusters.scenes.RemoveSceneResponse; -import com.zsmartsystems.zigbee.zcl.clusters.scenes.StoreSceneCommand; -import com.zsmartsystems.zigbee.zcl.clusters.scenes.StoreSceneResponse; -import com.zsmartsystems.zigbee.zcl.clusters.scenes.ViewSceneCommand; -import com.zsmartsystems.zigbee.zcl.clusters.scenes.ViewSceneResponse; -import com.zsmartsystems.zigbee.zcl.field.ExtensionFieldSet; -import com.zsmartsystems.zigbee.zcl.protocol.ZclClusterType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import java.util.List; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Future; -import javax.annotation.Generated; - -/** - * Scenes cluster implementation (Cluster ID 0x0005). - *

    - * The scenes cluster provides attributes and commands for setting up and recalling - * scenes. Each scene corresponds to a set of stored values of specified attributes for - * one or more clusters on the same end point as the scenes cluster. - *

    - * In most cases scenes are associated with a particular group ID. Scenes may also - * exist without a group, in which case the value 0x0000 replaces the group ID. Note - * that extra care is required in these cases to avoid a scene ID collision, and that - * commands related to scenes without a group may only be unicast, i.e.: they may - * not be multicast or broadcast. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclScenesCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0005; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Scenes"; - - // Attribute constants - /** - * The SceneCount attribute specifies the number of scenes currently in the device's - * scene table. - */ - public static final int ATTR_SCENECOUNT = 0x0000; - /** - * The CurrentScene attribute holds the Scene ID of the scene last invoked. - */ - public static final int ATTR_CURRENTSCENE = 0x0001; - /** - * The CurrentGroup attribute holds the Group ID of the scene last invoked, or - * 0x0000 if the scene last invoked is not associated with a group. - */ - public static final int ATTR_CURRENTGROUP = 0x0002; - /** - * The SceneValid attribute indicates whether the state of the device corresponds to - * that associated with the CurrentScene and CurrentGroup attributes. TRUE - * indicates that these attributes are valid, FALSE indicates that they are not valid. - *

    - * Before a scene has been stored or recalled, this attribute is set to FALSE. After a - * successful Store Scene or Recall Scene command it is set to TRUE. If, after a - * scene is stored or recalled, the state of the device is modified, this attribute is set to - * FALSE. - */ - public static final int ATTR_SCENEVALID = 0x0003; - /** - * The most significant bit of the NameSupport attribute indicates whether or not - * scene names are supported. A value of 1 indicates that they are supported, and a - * value of 0 indicates that they are not supported. - */ - public static final int ATTR_NAMESUPPORT = 0x0004; - /** - * The LastConfiguredBy attribute is 64-bits in length and specifies the IEEE address - * of the device that last configured the scene table. - *

    - * The value 0xffffffffffffffff indicates that the device has not been configured, or - * that the address of the device that last configured the scenes cluster is not known. - */ - public static final int ATTR_LASTCONFIGUREDBY = 0x0005; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(6); - - attributeMap.put(ATTR_SCENECOUNT, new ZclAttribute(ZclClusterType.SCENES, ATTR_SCENECOUNT, "SceneCount", ZclDataType.UNSIGNED_8_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_CURRENTSCENE, new ZclAttribute(ZclClusterType.SCENES, ATTR_CURRENTSCENE, "CurrentScene", ZclDataType.UNSIGNED_8_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_CURRENTGROUP, new ZclAttribute(ZclClusterType.SCENES, ATTR_CURRENTGROUP, "CurrentGroup", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_SCENEVALID, new ZclAttribute(ZclClusterType.SCENES, ATTR_SCENEVALID, "SceneValid", ZclDataType.BOOLEAN, true, true, false, false)); - attributeMap.put(ATTR_NAMESUPPORT, new ZclAttribute(ZclClusterType.SCENES, ATTR_NAMESUPPORT, "NameSupport", ZclDataType.BITMAP_8_BIT, true, true, false, false)); - attributeMap.put(ATTR_LASTCONFIGUREDBY, new ZclAttribute(ZclClusterType.SCENES, ATTR_LASTCONFIGUREDBY, "LastConfiguredBy", ZclDataType.IEEE_ADDRESS, false, true, false, false)); - - return attributeMap; - } - - /** - * Default constructor to create a Scenes cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclScenesCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } - - /** - * Get the SceneCount attribute [attribute ID 0]. - *

    - * The SceneCount attribute specifies the number of scenes currently in the device's - * scene table. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getSceneCountAsync() { - return read(attributes.get(ATTR_SCENECOUNT)); - } - - /** - * Synchronously get the SceneCount attribute [attribute ID 0]. - *

    - * The SceneCount attribute specifies the number of scenes currently in the device's - * scene table. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getSceneCount(final long refreshPeriod) { - if (attributes.get(ATTR_SCENECOUNT).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_SCENECOUNT).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_SCENECOUNT)); - } - - /** - * Get the CurrentScene attribute [attribute ID 1]. - *

    - * The CurrentScene attribute holds the Scene ID of the scene last invoked. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getCurrentSceneAsync() { - return read(attributes.get(ATTR_CURRENTSCENE)); - } - - /** - * Synchronously get the CurrentScene attribute [attribute ID 1]. - *

    - * The CurrentScene attribute holds the Scene ID of the scene last invoked. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getCurrentScene(final long refreshPeriod) { - if (attributes.get(ATTR_CURRENTSCENE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_CURRENTSCENE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_CURRENTSCENE)); - } - - /** - * Get the CurrentGroup attribute [attribute ID 2]. - *

    - * The CurrentGroup attribute holds the Group ID of the scene last invoked, or - * 0x0000 if the scene last invoked is not associated with a group. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getCurrentGroupAsync() { - return read(attributes.get(ATTR_CURRENTGROUP)); - } - - /** - * Synchronously get the CurrentGroup attribute [attribute ID 2]. - *

    - * The CurrentGroup attribute holds the Group ID of the scene last invoked, or - * 0x0000 if the scene last invoked is not associated with a group. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getCurrentGroup(final long refreshPeriod) { - if (attributes.get(ATTR_CURRENTGROUP).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_CURRENTGROUP).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_CURRENTGROUP)); - } - - /** - * Get the SceneValid attribute [attribute ID 3]. - *

    - * The SceneValid attribute indicates whether the state of the device corresponds to - * that associated with the CurrentScene and CurrentGroup attributes. TRUE - * indicates that these attributes are valid, FALSE indicates that they are not valid. - *

    - * Before a scene has been stored or recalled, this attribute is set to FALSE. After a - * successful Store Scene or Recall Scene command it is set to TRUE. If, after a - * scene is stored or recalled, the state of the device is modified, this attribute is set to - * FALSE. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getSceneValidAsync() { - return read(attributes.get(ATTR_SCENEVALID)); - } - - /** - * Synchronously get the SceneValid attribute [attribute ID 3]. - *

    - * The SceneValid attribute indicates whether the state of the device corresponds to - * that associated with the CurrentScene and CurrentGroup attributes. TRUE - * indicates that these attributes are valid, FALSE indicates that they are not valid. - *

    - * Before a scene has been stored or recalled, this attribute is set to FALSE. After a - * successful Store Scene or Recall Scene command it is set to TRUE. If, after a - * scene is stored or recalled, the state of the device is modified, this attribute is set to - * FALSE. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Boolean}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Boolean} attribute value, or null on error - */ - public Boolean getSceneValid(final long refreshPeriod) { - if (attributes.get(ATTR_SCENEVALID).isLastValueCurrent(refreshPeriod)) { - return (Boolean) attributes.get(ATTR_SCENEVALID).getLastValue(); - } - - return (Boolean) readSync(attributes.get(ATTR_SCENEVALID)); - } - - /** - * Get the NameSupport attribute [attribute ID 4]. - *

    - * The most significant bit of the NameSupport attribute indicates whether or not - * scene names are supported. A value of 1 indicates that they are supported, and a - * value of 0 indicates that they are not supported. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getNameSupportAsync() { - return read(attributes.get(ATTR_NAMESUPPORT)); - } - - /** - * Synchronously get the NameSupport attribute [attribute ID 4]. - *

    - * The most significant bit of the NameSupport attribute indicates whether or not - * scene names are supported. A value of 1 indicates that they are supported, and a - * value of 0 indicates that they are not supported. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getNameSupport(final long refreshPeriod) { - if (attributes.get(ATTR_NAMESUPPORT).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_NAMESUPPORT).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_NAMESUPPORT)); - } - - /** - * Get the LastConfiguredBy attribute [attribute ID 5]. - *

    - * The LastConfiguredBy attribute is 64-bits in length and specifies the IEEE address - * of the device that last configured the scene table. - *

    - * The value 0xffffffffffffffff indicates that the device has not been configured, or - * that the address of the device that last configured the scenes cluster is not known. - *

    - * The attribute is of type {@link IeeeAddress}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getLastConfiguredByAsync() { - return read(attributes.get(ATTR_LASTCONFIGUREDBY)); - } - - /** - * Synchronously get the LastConfiguredBy attribute [attribute ID 5]. - *

    - * The LastConfiguredBy attribute is 64-bits in length and specifies the IEEE address - * of the device that last configured the scene table. - *

    - * The value 0xffffffffffffffff indicates that the device has not been configured, or - * that the address of the device that last configured the scenes cluster is not known. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link IeeeAddress}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link IeeeAddress} attribute value, or null on error - */ - public IeeeAddress getLastConfiguredBy(final long refreshPeriod) { - if (attributes.get(ATTR_LASTCONFIGUREDBY).isLastValueCurrent(refreshPeriod)) { - return (IeeeAddress) attributes.get(ATTR_LASTCONFIGUREDBY).getLastValue(); - } - - return (IeeeAddress) readSync(attributes.get(ATTR_LASTCONFIGUREDBY)); - } - - /** - * The Add Scene Command - *

    - * The Add Scene command shall be addressed to a single device (not a group). - * - * @param groupId {@link Integer} Group ID - * @param sceneId {@link Integer} Scene ID - * @param transitionTime {@link Integer} Transition time - * @param sceneName {@link String} Scene Name - * @param extensionFieldSets {@link List} Extension field sets - * @return the {@link Future} command result future - */ - public Future addSceneCommand(Integer groupId, Integer sceneId, Integer transitionTime, String sceneName, List extensionFieldSets) { - AddSceneCommand command = new AddSceneCommand(); - - // Set the fields - command.setGroupId(groupId); - command.setSceneId(sceneId); - command.setTransitionTime(transitionTime); - command.setSceneName(sceneName); - command.setExtensionFieldSets(extensionFieldSets); - - return send(command); - } - - /** - * The View Scene Command - *

    - * The View Scene command shall be addressed to a single device (not a group). - * - * @param groupId {@link Integer} Group ID - * @param sceneId {@link Integer} Scene ID - * @return the {@link Future} command result future - */ - public Future viewSceneCommand(Integer groupId, Integer sceneId) { - ViewSceneCommand command = new ViewSceneCommand(); - - // Set the fields - command.setGroupId(groupId); - command.setSceneId(sceneId); - - return send(command); - } - - /** - * The Remove Scene Command - *

    - * The Remove All Scenes may be addressed to a single device or to a group. - * - * @param groupId {@link Integer} Group ID - * @param sceneId {@link Integer} Scene ID - * @return the {@link Future} command result future - */ - public Future removeSceneCommand(Integer groupId, Integer sceneId) { - RemoveSceneCommand command = new RemoveSceneCommand(); - - // Set the fields - command.setGroupId(groupId); - command.setSceneId(sceneId); - - return send(command); - } - - /** - * The Remove All Scenes Command - *

    - * The Remove All Scenes may be addressed to a single device or to a group. - * - * @param groupId {@link Integer} Group ID - * @return the {@link Future} command result future - */ - public Future removeAllScenesCommand(Integer groupId) { - RemoveAllScenesCommand command = new RemoveAllScenesCommand(); - - // Set the fields - command.setGroupId(groupId); - - return send(command); - } - - /** - * The Store Scene Command - *

    - * The Store Scene command may be addressed to a single device or to a group. - * - * @param groupId {@link Integer} Group ID - * @param sceneId {@link Integer} Scene ID - * @return the {@link Future} command result future - */ - public Future storeSceneCommand(Integer groupId, Integer sceneId) { - StoreSceneCommand command = new StoreSceneCommand(); - - // Set the fields - command.setGroupId(groupId); - command.setSceneId(sceneId); - - return send(command); - } - - /** - * The Recall Scene Command - *

    - * The Recall Scene command may be addressed to a single device or to a group. - * - * @param groupId {@link Integer} Group ID - * @param sceneId {@link Integer} Scene ID - * @return the {@link Future} command result future - */ - public Future recallSceneCommand(Integer groupId, Integer sceneId) { - RecallSceneCommand command = new RecallSceneCommand(); - - // Set the fields - command.setGroupId(groupId); - command.setSceneId(sceneId); - - return send(command); - } - - /** - * The Get Scene Membership Command - *

    - * The Get Scene Membership command can be used to find an unused scene - * number within the group when no commissioning tool is in the network, or for a - * commissioning tool to get used scenes for a group on a single device or on all - * devices in the group. - * - * @param groupId {@link Integer} Group ID - * @return the {@link Future} command result future - */ - public Future getSceneMembershipCommand(Integer groupId) { - GetSceneMembershipCommand command = new GetSceneMembershipCommand(); - - // Set the fields - command.setGroupId(groupId); - - return send(command); - } - - /** - * The Add Scene Response - * - * @param status {@link Integer} Status - * @param groupId {@link Integer} Group ID - * @param sceneId {@link Integer} Scene ID - * @return the {@link Future} command result future - */ - public Future addSceneResponse(Integer status, Integer groupId, Integer sceneId) { - AddSceneResponse command = new AddSceneResponse(); - - // Set the fields - command.setStatus(status); - command.setGroupId(groupId); - command.setSceneId(sceneId); - - return send(command); - } - - /** - * The View Scene Response - * - * @param status {@link Integer} Status - * @param groupId {@link Integer} Group ID - * @param sceneId {@link Integer} Scene ID - * @param transitionTime {@link Integer} Transition time - * @param sceneName {@link String} Scene Name - * @param extensionFieldSets {@link List} Extension field sets - * @return the {@link Future} command result future - */ - public Future viewSceneResponse(Integer status, Integer groupId, Integer sceneId, Integer transitionTime, String sceneName, List extensionFieldSets) { - ViewSceneResponse command = new ViewSceneResponse(); - - // Set the fields - command.setStatus(status); - command.setGroupId(groupId); - command.setSceneId(sceneId); - command.setTransitionTime(transitionTime); - command.setSceneName(sceneName); - command.setExtensionFieldSets(extensionFieldSets); - - return send(command); - } - - /** - * The Remove Scene Response - * - * @param status {@link Integer} Status - * @param groupId {@link Integer} Group ID - * @param sceneId {@link Integer} Scene ID - * @return the {@link Future} command result future - */ - public Future removeSceneResponse(Integer status, Integer groupId, Integer sceneId) { - RemoveSceneResponse command = new RemoveSceneResponse(); - - // Set the fields - command.setStatus(status); - command.setGroupId(groupId); - command.setSceneId(sceneId); - - return send(command); - } - - /** - * The Remove All Scenes Response - * - * @param status {@link Integer} Status - * @param groupId {@link Integer} Group ID - * @return the {@link Future} command result future - */ - public Future removeAllScenesResponse(Integer status, Integer groupId) { - RemoveAllScenesResponse command = new RemoveAllScenesResponse(); - - // Set the fields - command.setStatus(status); - command.setGroupId(groupId); - - return send(command); - } - - /** - * The Store Scene Response - * - * @param status {@link Integer} Status - * @param groupId {@link Integer} Group ID - * @param sceneId {@link Integer} Scene ID - * @return the {@link Future} command result future - */ - public Future storeSceneResponse(Integer status, Integer groupId, Integer sceneId) { - StoreSceneResponse command = new StoreSceneResponse(); - - // Set the fields - command.setStatus(status); - command.setGroupId(groupId); - command.setSceneId(sceneId); - - return send(command); - } - - /** - * The Get Scene Membership Response - * - * @param status {@link Integer} Status - * @param capacity {@link Integer} Capacity - * @param groupId {@link Integer} Group ID - * @param sceneCount {@link Integer} Scene count - * @param sceneList {@link List} Scene list - * @return the {@link Future} command result future - */ - public Future getSceneMembershipResponse(Integer status, Integer capacity, Integer groupId, Integer sceneCount, List sceneList) { - GetSceneMembershipResponse command = new GetSceneMembershipResponse(); - - // Set the fields - command.setStatus(status); - command.setCapacity(capacity); - command.setGroupId(groupId); - command.setSceneCount(sceneCount); - command.setSceneList(sceneList); - - return send(command); - } - - @Override - public ZclCommand getCommandFromId(int commandId) { - switch (commandId) { - case 0: // ADD_SCENE_COMMAND - return new AddSceneCommand(); - case 1: // VIEW_SCENE_COMMAND - return new ViewSceneCommand(); - case 2: // REMOVE_SCENE_COMMAND - return new RemoveSceneCommand(); - case 3: // REMOVE_ALL_SCENES_COMMAND - return new RemoveAllScenesCommand(); - case 4: // STORE_SCENE_COMMAND - return new StoreSceneCommand(); - case 5: // RECALL_SCENE_COMMAND - return new RecallSceneCommand(); - case 6: // GET_SCENE_MEMBERSHIP_COMMAND - return new GetSceneMembershipCommand(); - default: - return null; - } - } - - @Override - public ZclCommand getResponseFromId(int commandId) { - switch (commandId) { - case 0: // ADD_SCENE_RESPONSE - return new AddSceneResponse(); - case 1: // VIEW_SCENE_RESPONSE - return new ViewSceneResponse(); - case 2: // REMOVE_SCENE_RESPONSE - return new RemoveSceneResponse(); - case 3: // REMOVE_ALL_SCENES_RESPONSE - return new RemoveAllScenesResponse(); - case 4: // STORE_SCENE_RESPONSE - return new StoreSceneResponse(); - case 5: // GET_SCENE_MEMBERSHIP_RESPONSE - return new GetSceneMembershipResponse(); - default: - return null; - } - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclShadeConfigurationCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclShadeConfigurationCluster.java deleted file mode 100644 index 52d838cbc..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclShadeConfigurationCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Shade Configuration cluster implementation (Cluster ID 0x0100). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclShadeConfigurationCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0100; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Shade Configuration"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Shade Configuration cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclShadeConfigurationCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclTemperatureMeasurementCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclTemperatureMeasurementCluster.java deleted file mode 100644 index 1ef977d97..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclTemperatureMeasurementCluster.java +++ /dev/null @@ -1,359 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.CommandResult; -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import com.zsmartsystems.zigbee.zcl.protocol.ZclClusterType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Future; -import javax.annotation.Generated; - -/** - * Temperature measurement cluster implementation (Cluster ID 0x0402). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclTemperatureMeasurementCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0402; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Temperature measurement"; - - // Attribute constants - /** - * MeasuredValue represents the temperature in degrees Celsius as follows:- - * MeasuredValue = 100 x temperature in degrees Celsius. - *

    - * Where -273.15°C <= temperature <= 327.67 ºC, corresponding to a - *

    - * MeasuredValue in the range 0x954d to 0x7fff. The maximum resolution this - * format allows is 0.01 ºC. - *

    - * A MeasuredValue of 0x8000 indicates that the temperature measurement is - * invalid. - *

    - * MeasuredValue is updated continuously as new measurements are made. - */ - public static final int ATTR_MEASUREDVALUE = 0x0000; - /** - * The MinMeasuredValue attribute indicates the minimum value of MeasuredValue - * that is capable of being measured. A MinMeasuredValue of 0x8000 indicates that - * the minimum value is unknown. - */ - public static final int ATTR_MINMEASUREDVALUE = 0x0001; - /** - * The MaxMeasuredValue attribute indicates the maximum value of MeasuredValue - * that is capable of being measured. - *

    - * MaxMeasuredValue shall be greater than MinMeasuredValue. - *

    - * MinMeasuredValue and MaxMeasuredValue define the range of the sensor. - *

    - * A MaxMeasuredValue of 0x8000 indicates that the maximum value is unknown. - */ - public static final int ATTR_MAXMEASUREDVALUE = 0x0002; - /** - * The Tolerance attribute indicates the magnitude of the possible error that is - * associated with MeasuredValue . The true value is located in the range - * (MeasuredValue – Tolerance) to (MeasuredValue + Tolerance). - */ - public static final int ATTR_TOLERANCE = 0x0003; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(4); - - attributeMap.put(ATTR_MEASUREDVALUE, new ZclAttribute(ZclClusterType.TEMPERATURE_MEASUREMENT, ATTR_MEASUREDVALUE, "MeasuredValue", ZclDataType.SIGNED_16_BIT_INTEGER, true, true, false, true)); - attributeMap.put(ATTR_MINMEASUREDVALUE, new ZclAttribute(ZclClusterType.TEMPERATURE_MEASUREMENT, ATTR_MINMEASUREDVALUE, "MinMeasuredValue", ZclDataType.SIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_MAXMEASUREDVALUE, new ZclAttribute(ZclClusterType.TEMPERATURE_MEASUREMENT, ATTR_MAXMEASUREDVALUE, "MaxMeasuredValue", ZclDataType.SIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_TOLERANCE, new ZclAttribute(ZclClusterType.TEMPERATURE_MEASUREMENT, ATTR_TOLERANCE, "Tolerance", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, true)); - - return attributeMap; - } - - /** - * Default constructor to create a Temperature measurement cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclTemperatureMeasurementCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } - - /** - * Get the MeasuredValue attribute [attribute ID 0]. - *

    - * MeasuredValue represents the temperature in degrees Celsius as follows:- - * MeasuredValue = 100 x temperature in degrees Celsius. - *

    - * Where -273.15°C <= temperature <= 327.67 ºC, corresponding to a - *

    - * MeasuredValue in the range 0x954d to 0x7fff. The maximum resolution this - * format allows is 0.01 ºC. - *

    - * A MeasuredValue of 0x8000 indicates that the temperature measurement is - * invalid. - *

    - * MeasuredValue is updated continuously as new measurements are made. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getMeasuredValueAsync() { - return read(attributes.get(ATTR_MEASUREDVALUE)); - } - - /** - * Synchronously get the MeasuredValue attribute [attribute ID 0]. - *

    - * MeasuredValue represents the temperature in degrees Celsius as follows:- - * MeasuredValue = 100 x temperature in degrees Celsius. - *

    - * Where -273.15°C <= temperature <= 327.67 ºC, corresponding to a - *

    - * MeasuredValue in the range 0x954d to 0x7fff. The maximum resolution this - * format allows is 0.01 ºC. - *

    - * A MeasuredValue of 0x8000 indicates that the temperature measurement is - * invalid. - *

    - * MeasuredValue is updated continuously as new measurements are made. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMeasuredValue(final long refreshPeriod) { - if (attributes.get(ATTR_MEASUREDVALUE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MEASUREDVALUE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MEASUREDVALUE)); - } - - /** - * Set reporting for the MeasuredValue attribute [attribute ID 0]. - *

    - * MeasuredValue represents the temperature in degrees Celsius as follows:- - * MeasuredValue = 100 x temperature in degrees Celsius. - *

    - * Where -273.15°C <= temperature <= 327.67 ºC, corresponding to a - *

    - * MeasuredValue in the range 0x954d to 0x7fff. The maximum resolution this - * format allows is 0.01 ºC. - *

    - * A MeasuredValue of 0x8000 indicates that the temperature measurement is - * invalid. - *

    - * MeasuredValue is updated continuously as new measurements are made. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param minInterval {@link int} minimum reporting period - * @param maxInterval {@link int} maximum reporting period - * @param reportableChange {@link Object} delta required to trigger report - * @return the {@link Future} command result future - */ - public Future setMeasuredValueReporting(final int minInterval, final int maxInterval, final Object reportableChange) { - return setReporting(attributes.get(ATTR_MEASUREDVALUE), minInterval, maxInterval, reportableChange); - } - - /** - * Get the MinMeasuredValue attribute [attribute ID 1]. - *

    - * The MinMeasuredValue attribute indicates the minimum value of MeasuredValue - * that is capable of being measured. A MinMeasuredValue of 0x8000 indicates that - * the minimum value is unknown. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getMinMeasuredValueAsync() { - return read(attributes.get(ATTR_MINMEASUREDVALUE)); - } - - /** - * Synchronously get the MinMeasuredValue attribute [attribute ID 1]. - *

    - * The MinMeasuredValue attribute indicates the minimum value of MeasuredValue - * that is capable of being measured. A MinMeasuredValue of 0x8000 indicates that - * the minimum value is unknown. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMinMeasuredValue(final long refreshPeriod) { - if (attributes.get(ATTR_MINMEASUREDVALUE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MINMEASUREDVALUE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MINMEASUREDVALUE)); - } - - /** - * Get the MaxMeasuredValue attribute [attribute ID 2]. - *

    - * The MaxMeasuredValue attribute indicates the maximum value of MeasuredValue - * that is capable of being measured. - *

    - * MaxMeasuredValue shall be greater than MinMeasuredValue. - *

    - * MinMeasuredValue and MaxMeasuredValue define the range of the sensor. - *

    - * A MaxMeasuredValue of 0x8000 indicates that the maximum value is unknown. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getMaxMeasuredValueAsync() { - return read(attributes.get(ATTR_MAXMEASUREDVALUE)); - } - - /** - * Synchronously get the MaxMeasuredValue attribute [attribute ID 2]. - *

    - * The MaxMeasuredValue attribute indicates the maximum value of MeasuredValue - * that is capable of being measured. - *

    - * MaxMeasuredValue shall be greater than MinMeasuredValue. - *

    - * MinMeasuredValue and MaxMeasuredValue define the range of the sensor. - *

    - * A MaxMeasuredValue of 0x8000 indicates that the maximum value is unknown. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMaxMeasuredValue(final long refreshPeriod) { - if (attributes.get(ATTR_MAXMEASUREDVALUE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MAXMEASUREDVALUE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MAXMEASUREDVALUE)); - } - - /** - * Get the Tolerance attribute [attribute ID 3]. - *

    - * The Tolerance attribute indicates the magnitude of the possible error that is - * associated with MeasuredValue . The true value is located in the range - * (MeasuredValue – Tolerance) to (MeasuredValue + Tolerance). - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getToleranceAsync() { - return read(attributes.get(ATTR_TOLERANCE)); - } - - /** - * Synchronously get the Tolerance attribute [attribute ID 3]. - *

    - * The Tolerance attribute indicates the magnitude of the possible error that is - * associated with MeasuredValue . The true value is located in the range - * (MeasuredValue – Tolerance) to (MeasuredValue + Tolerance). - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getTolerance(final long refreshPeriod) { - if (attributes.get(ATTR_TOLERANCE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_TOLERANCE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_TOLERANCE)); - } - - /** - * Set reporting for the Tolerance attribute [attribute ID 3]. - *

    - * The Tolerance attribute indicates the magnitude of the possible error that is - * associated with MeasuredValue . The true value is located in the range - * (MeasuredValue – Tolerance) to (MeasuredValue + Tolerance). - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param minInterval {@link int} minimum reporting period - * @param maxInterval {@link int} maximum reporting period - * @param reportableChange {@link Object} delta required to trigger report - * @return the {@link Future} command result future - */ - public Future setToleranceReporting(final int minInterval, final int maxInterval, final Object reportableChange) { - return setReporting(attributes.get(ATTR_TOLERANCE), minInterval, maxInterval, reportableChange); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclThermostatCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclThermostatCluster.java deleted file mode 100644 index 103894b3a..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclThermostatCluster.java +++ /dev/null @@ -1,1479 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.CommandResult; -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.clusters.thermostat.ClearWeeklySchedule; -import com.zsmartsystems.zigbee.zcl.clusters.thermostat.GetRelayStatusLog; -import com.zsmartsystems.zigbee.zcl.clusters.thermostat.GetRelayStatusLogResponse; -import com.zsmartsystems.zigbee.zcl.clusters.thermostat.GetWeeklySchedule; -import com.zsmartsystems.zigbee.zcl.clusters.thermostat.GetWeeklyScheduleResponse; -import com.zsmartsystems.zigbee.zcl.clusters.thermostat.SetWeeklySchedule; -import com.zsmartsystems.zigbee.zcl.clusters.thermostat.SetpointRaiseLowerCommand; -import com.zsmartsystems.zigbee.zcl.protocol.ZclClusterType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Future; -import javax.annotation.Generated; - -/** - * Thermostat cluster implementation (Cluster ID 0x0201). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclThermostatCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0201; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Thermostat"; - - // Attribute constants - /** - * LocalTemperature represents the temperature in degrees Celsius, as measured locally. - */ - public static final int ATTR_LOCALTEMPERATURE = 0x0000; - /** - * OutdoorTemperature represents the temperature in degrees Celsius, as measured locally. - */ - public static final int ATTR_OUTDOORTEMPERATURE = 0x0001; - /** - * Occupancy specifies whether the heated/cooled space is occupied or not - */ - public static final int ATTR_OCCUPANCY = 0x0002; - /** - * The MinHeatSetpointLimit attribute specifies the absolute minimum level that the heating setpoint MAY be - * set to. This is a limitation imposed by the manufacturer. - */ - public static final int ATTR_ABSMINHEATSETPOINTLIMIT = 0x0003; - /** - * The MaxHeatSetpointLimit attribute specifies the absolute maximum level that the heating setpoint MAY be - * set to. This is a limitation imposed by the manufacturer. - */ - public static final int ATTR_ABSMAXHEATSETPOINTLIMIT = 0x0004; - /** - * The MinCoolSetpointLimit attribute specifies the absolute minimum level that the cooling setpoint MAY be - * set to. This is a limitation imposed by the manufacturer. - */ - public static final int ATTR_ABSMINCOOLSETPOINTLIMIT = 0x0005; - /** - * The MaxCoolSetpointLimit attribute specifies the absolute maximum level that the cooling setpoint MAY be - * set to. This is a limitation imposed by the manufacturer. - */ - public static final int ATTR_ABSMAXCOOLSETPOINTLIMIT = 0x0006; - /** - * The PICoolingDemandattribute is 8 bits in length and specifies the level of cooling demanded by the PI - * (proportional integral) control loop in use by the thermostat (if any), in percent. This value is 0 when the - * thermostat is in “off” or “heating” mode. - */ - public static final int ATTR_PICOOLINGDEMAND = 0x0007; - /** - * The PIHeatingDemand attribute is 8 bits in length and specifies the level of heating demanded by the PI - * (proportional integral) control loop in use by the thermostat (if any), in percent. This value is 0 when the - * thermostat is in “off” or “cooling” mode. - */ - public static final int ATTR_PIHEATINGDEMAND = 0x0008; - /** - */ - public static final int ATTR_HVACSYSTEMTYPECONFIGURATION = 0x0009; - /** - */ - public static final int ATTR_LOCALTEMPERATURECALIBRATION = 0x0010; - /** - */ - public static final int ATTR_OCCUPIEDCOOLINGSETPOINT = 0x0011; - /** - */ - public static final int ATTR_OCCUPIEDHEATINGSETPOINT = 0x0012; - /** - */ - public static final int ATTR_UNOCCUPIEDCOOLINGSETPOINT = 0x0013; - /** - */ - public static final int ATTR_UNOCCUPIEDHEATINGSETPOINT = 0x0014; - /** - */ - public static final int ATTR_MINHEATSETPOINTLIMIT = 0x0015; - /** - */ - public static final int ATTR_MAXHEATSETPOINTLIMIT = 0x0016; - /** - */ - public static final int ATTR_MINCOOLSETPOINTLIMIT = 0x0017; - /** - */ - public static final int ATTR_MAXCOOLSETPOINTLIMIT = 0x0018; - /** - */ - public static final int ATTR_MINSETPOINTDEADBAND = 0x0019; - /** - */ - public static final int ATTR_REMOTESENSING = 0x001A; - /** - */ - public static final int ATTR_CONTROLSEQUENCEOFOPERATION = 0x001B; - /** - */ - public static final int ATTR_SYSTEMMODE = 0x001C; - /** - */ - public static final int ATTR_ALARMMASK = 0x001D; - /** - */ - public static final int ATTR_THERMOSTATRUNNINGMODE = 0x001E; - /** - * This indicates the type of errors encountered within the Mini Split AC. Error values are reported with four bytes - * values. Each bit within the four bytes indicates the unique error. - */ - public static final int ATTR_ACERRORCODE = 0x0044; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(26); - - attributeMap.put(ATTR_LOCALTEMPERATURE, new ZclAttribute(ZclClusterType.THERMOSTAT, ATTR_LOCALTEMPERATURE, "LocalTemperature", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, true)); - attributeMap.put(ATTR_OUTDOORTEMPERATURE, new ZclAttribute(ZclClusterType.THERMOSTAT, ATTR_OUTDOORTEMPERATURE, "OutdoorTemperature", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_OCCUPANCY, new ZclAttribute(ZclClusterType.THERMOSTAT, ATTR_OCCUPANCY, "Occupancy", ZclDataType.BITMAP_8_BIT, false, true, false, false)); - attributeMap.put(ATTR_ABSMINHEATSETPOINTLIMIT, new ZclAttribute(ZclClusterType.THERMOSTAT, ATTR_ABSMINHEATSETPOINTLIMIT, "AbsMinHeatSetpointLimit", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_ABSMAXHEATSETPOINTLIMIT, new ZclAttribute(ZclClusterType.THERMOSTAT, ATTR_ABSMAXHEATSETPOINTLIMIT, "AbsMaxHeatSetpointLimit", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_ABSMINCOOLSETPOINTLIMIT, new ZclAttribute(ZclClusterType.THERMOSTAT, ATTR_ABSMINCOOLSETPOINTLIMIT, "AbsMinCoolSetpointLimit", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_ABSMAXCOOLSETPOINTLIMIT, new ZclAttribute(ZclClusterType.THERMOSTAT, ATTR_ABSMAXCOOLSETPOINTLIMIT, "AbsMaxCoolSetpointLimit", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_PICOOLINGDEMAND, new ZclAttribute(ZclClusterType.THERMOSTAT, ATTR_PICOOLINGDEMAND, "PICoolingDemand", ZclDataType.UNSIGNED_8_BIT_INTEGER, false, true, false, true)); - attributeMap.put(ATTR_PIHEATINGDEMAND, new ZclAttribute(ZclClusterType.THERMOSTAT, ATTR_PIHEATINGDEMAND, "PIHeatingDemand", ZclDataType.UNSIGNED_8_BIT_INTEGER, false, true, false, true)); - attributeMap.put(ATTR_HVACSYSTEMTYPECONFIGURATION, new ZclAttribute(ZclClusterType.THERMOSTAT, ATTR_HVACSYSTEMTYPECONFIGURATION, "HVACSystemTypeConfiguration", ZclDataType.BITMAP_8_BIT, false, true, false, false)); - attributeMap.put(ATTR_LOCALTEMPERATURECALIBRATION, new ZclAttribute(ZclClusterType.THERMOSTAT, ATTR_LOCALTEMPERATURECALIBRATION, "LocalTemperatureCalibration", ZclDataType.UNSIGNED_8_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_OCCUPIEDCOOLINGSETPOINT, new ZclAttribute(ZclClusterType.THERMOSTAT, ATTR_OCCUPIEDCOOLINGSETPOINT, "OccupiedCoolingSetpoint", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_OCCUPIEDHEATINGSETPOINT, new ZclAttribute(ZclClusterType.THERMOSTAT, ATTR_OCCUPIEDHEATINGSETPOINT, "OccupiedHeatingSetpoint", ZclDataType.UNSIGNED_16_BIT_INTEGER, true, true, false, false)); - attributeMap.put(ATTR_UNOCCUPIEDCOOLINGSETPOINT, new ZclAttribute(ZclClusterType.THERMOSTAT, ATTR_UNOCCUPIEDCOOLINGSETPOINT, "UnoccupiedCoolingSetpoint", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_UNOCCUPIEDHEATINGSETPOINT, new ZclAttribute(ZclClusterType.THERMOSTAT, ATTR_UNOCCUPIEDHEATINGSETPOINT, "UnoccupiedHeatingSetpoint", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_MINHEATSETPOINTLIMIT, new ZclAttribute(ZclClusterType.THERMOSTAT, ATTR_MINHEATSETPOINTLIMIT, "MinHeatSetpointLimit", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_MAXHEATSETPOINTLIMIT, new ZclAttribute(ZclClusterType.THERMOSTAT, ATTR_MAXHEATSETPOINTLIMIT, "MaxHeatSetpointLimit", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_MINCOOLSETPOINTLIMIT, new ZclAttribute(ZclClusterType.THERMOSTAT, ATTR_MINCOOLSETPOINTLIMIT, "MinCoolSetpointLimit", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_MAXCOOLSETPOINTLIMIT, new ZclAttribute(ZclClusterType.THERMOSTAT, ATTR_MAXCOOLSETPOINTLIMIT, "MaxCoolSetpointLimit", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_MINSETPOINTDEADBAND, new ZclAttribute(ZclClusterType.THERMOSTAT, ATTR_MINSETPOINTDEADBAND, "MinSetpointDeadBand", ZclDataType.UNSIGNED_8_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_REMOTESENSING, new ZclAttribute(ZclClusterType.THERMOSTAT, ATTR_REMOTESENSING, "RemoteSensing", ZclDataType.BITMAP_8_BIT, false, true, false, false)); - attributeMap.put(ATTR_CONTROLSEQUENCEOFOPERATION, new ZclAttribute(ZclClusterType.THERMOSTAT, ATTR_CONTROLSEQUENCEOFOPERATION, "ControlSequenceOfOperation", ZclDataType.ENUMERATION_8_BIT, true, true, false, false)); - attributeMap.put(ATTR_SYSTEMMODE, new ZclAttribute(ZclClusterType.THERMOSTAT, ATTR_SYSTEMMODE, "SystemMode", ZclDataType.ENUMERATION_8_BIT, true, true, false, false)); - attributeMap.put(ATTR_ALARMMASK, new ZclAttribute(ZclClusterType.THERMOSTAT, ATTR_ALARMMASK, "AlarmMask", ZclDataType.ENUMERATION_8_BIT, false, true, false, false)); - attributeMap.put(ATTR_THERMOSTATRUNNINGMODE, new ZclAttribute(ZclClusterType.THERMOSTAT, ATTR_THERMOSTATRUNNINGMODE, "ThermostatRunningMode", ZclDataType.ENUMERATION_8_BIT, false, true, false, false)); - attributeMap.put(ATTR_ACERRORCODE, new ZclAttribute(ZclClusterType.THERMOSTAT, ATTR_ACERRORCODE, "ACErrorCode", ZclDataType.BITMAP_32_BIT, false, true, false, false)); - - return attributeMap; - } - - /** - * Default constructor to create a Thermostat cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclThermostatCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } - - /** - * Get the LocalTemperature attribute [attribute ID 0]. - *

    - * LocalTemperature represents the temperature in degrees Celsius, as measured locally. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getLocalTemperatureAsync() { - return read(attributes.get(ATTR_LOCALTEMPERATURE)); - } - - /** - * Synchronously get the LocalTemperature attribute [attribute ID 0]. - *

    - * LocalTemperature represents the temperature in degrees Celsius, as measured locally. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getLocalTemperature(final long refreshPeriod) { - if (attributes.get(ATTR_LOCALTEMPERATURE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_LOCALTEMPERATURE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_LOCALTEMPERATURE)); - } - - /** - * Set reporting for the LocalTemperature attribute [attribute ID 0]. - *

    - * LocalTemperature represents the temperature in degrees Celsius, as measured locally. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param minInterval {@link int} minimum reporting period - * @param maxInterval {@link int} maximum reporting period - * @param reportableChange {@link Object} delta required to trigger report - * @return the {@link Future} command result future - */ - public Future setLocalTemperatureReporting(final int minInterval, final int maxInterval, final Object reportableChange) { - return setReporting(attributes.get(ATTR_LOCALTEMPERATURE), minInterval, maxInterval, reportableChange); - } - - /** - * Get the OutdoorTemperature attribute [attribute ID 1]. - *

    - * OutdoorTemperature represents the temperature in degrees Celsius, as measured locally. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getOutdoorTemperatureAsync() { - return read(attributes.get(ATTR_OUTDOORTEMPERATURE)); - } - - /** - * Synchronously get the OutdoorTemperature attribute [attribute ID 1]. - *

    - * OutdoorTemperature represents the temperature in degrees Celsius, as measured locally. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getOutdoorTemperature(final long refreshPeriod) { - if (attributes.get(ATTR_OUTDOORTEMPERATURE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_OUTDOORTEMPERATURE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_OUTDOORTEMPERATURE)); - } - - /** - * Get the Occupancy attribute [attribute ID 2]. - *

    - * Occupancy specifies whether the heated/cooled space is occupied or not - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getOccupancyAsync() { - return read(attributes.get(ATTR_OCCUPANCY)); - } - - /** - * Synchronously get the Occupancy attribute [attribute ID 2]. - *

    - * Occupancy specifies whether the heated/cooled space is occupied or not - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getOccupancy(final long refreshPeriod) { - if (attributes.get(ATTR_OCCUPANCY).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_OCCUPANCY).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_OCCUPANCY)); - } - - /** - * Get the AbsMinHeatSetpointLimit attribute [attribute ID 3]. - *

    - * The MinHeatSetpointLimit attribute specifies the absolute minimum level that the heating setpoint MAY be - * set to. This is a limitation imposed by the manufacturer. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getAbsMinHeatSetpointLimitAsync() { - return read(attributes.get(ATTR_ABSMINHEATSETPOINTLIMIT)); - } - - /** - * Synchronously get the AbsMinHeatSetpointLimit attribute [attribute ID 3]. - *

    - * The MinHeatSetpointLimit attribute specifies the absolute minimum level that the heating setpoint MAY be - * set to. This is a limitation imposed by the manufacturer. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getAbsMinHeatSetpointLimit(final long refreshPeriod) { - if (attributes.get(ATTR_ABSMINHEATSETPOINTLIMIT).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_ABSMINHEATSETPOINTLIMIT).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_ABSMINHEATSETPOINTLIMIT)); - } - - /** - * Get the AbsMaxHeatSetpointLimit attribute [attribute ID 4]. - *

    - * The MaxHeatSetpointLimit attribute specifies the absolute maximum level that the heating setpoint MAY be - * set to. This is a limitation imposed by the manufacturer. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getAbsMaxHeatSetpointLimitAsync() { - return read(attributes.get(ATTR_ABSMAXHEATSETPOINTLIMIT)); - } - - /** - * Synchronously get the AbsMaxHeatSetpointLimit attribute [attribute ID 4]. - *

    - * The MaxHeatSetpointLimit attribute specifies the absolute maximum level that the heating setpoint MAY be - * set to. This is a limitation imposed by the manufacturer. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getAbsMaxHeatSetpointLimit(final long refreshPeriod) { - if (attributes.get(ATTR_ABSMAXHEATSETPOINTLIMIT).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_ABSMAXHEATSETPOINTLIMIT).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_ABSMAXHEATSETPOINTLIMIT)); - } - - /** - * Get the AbsMinCoolSetpointLimit attribute [attribute ID 5]. - *

    - * The MinCoolSetpointLimit attribute specifies the absolute minimum level that the cooling setpoint MAY be - * set to. This is a limitation imposed by the manufacturer. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getAbsMinCoolSetpointLimitAsync() { - return read(attributes.get(ATTR_ABSMINCOOLSETPOINTLIMIT)); - } - - /** - * Synchronously get the AbsMinCoolSetpointLimit attribute [attribute ID 5]. - *

    - * The MinCoolSetpointLimit attribute specifies the absolute minimum level that the cooling setpoint MAY be - * set to. This is a limitation imposed by the manufacturer. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getAbsMinCoolSetpointLimit(final long refreshPeriod) { - if (attributes.get(ATTR_ABSMINCOOLSETPOINTLIMIT).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_ABSMINCOOLSETPOINTLIMIT).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_ABSMINCOOLSETPOINTLIMIT)); - } - - /** - * Get the AbsMaxCoolSetpointLimit attribute [attribute ID 6]. - *

    - * The MaxCoolSetpointLimit attribute specifies the absolute maximum level that the cooling setpoint MAY be - * set to. This is a limitation imposed by the manufacturer. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getAbsMaxCoolSetpointLimitAsync() { - return read(attributes.get(ATTR_ABSMAXCOOLSETPOINTLIMIT)); - } - - /** - * Synchronously get the AbsMaxCoolSetpointLimit attribute [attribute ID 6]. - *

    - * The MaxCoolSetpointLimit attribute specifies the absolute maximum level that the cooling setpoint MAY be - * set to. This is a limitation imposed by the manufacturer. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getAbsMaxCoolSetpointLimit(final long refreshPeriod) { - if (attributes.get(ATTR_ABSMAXCOOLSETPOINTLIMIT).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_ABSMAXCOOLSETPOINTLIMIT).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_ABSMAXCOOLSETPOINTLIMIT)); - } - - /** - * Get the PICoolingDemand attribute [attribute ID 7]. - *

    - * The PICoolingDemandattribute is 8 bits in length and specifies the level of cooling demanded by the PI - * (proportional integral) control loop in use by the thermostat (if any), in percent. This value is 0 when the - * thermostat is in “off” or “heating” mode. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getPiCoolingDemandAsync() { - return read(attributes.get(ATTR_PICOOLINGDEMAND)); - } - - /** - * Synchronously get the PICoolingDemand attribute [attribute ID 7]. - *

    - * The PICoolingDemandattribute is 8 bits in length and specifies the level of cooling demanded by the PI - * (proportional integral) control loop in use by the thermostat (if any), in percent. This value is 0 when the - * thermostat is in “off” or “heating” mode. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getPiCoolingDemand(final long refreshPeriod) { - if (attributes.get(ATTR_PICOOLINGDEMAND).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_PICOOLINGDEMAND).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_PICOOLINGDEMAND)); - } - - /** - * Set reporting for the PICoolingDemand attribute [attribute ID 7]. - *

    - * The PICoolingDemandattribute is 8 bits in length and specifies the level of cooling demanded by the PI - * (proportional integral) control loop in use by the thermostat (if any), in percent. This value is 0 when the - * thermostat is in “off” or “heating” mode. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param minInterval {@link int} minimum reporting period - * @param maxInterval {@link int} maximum reporting period - * @param reportableChange {@link Object} delta required to trigger report - * @return the {@link Future} command result future - */ - public Future setPiCoolingDemandReporting(final int minInterval, final int maxInterval, final Object reportableChange) { - return setReporting(attributes.get(ATTR_PICOOLINGDEMAND), minInterval, maxInterval, reportableChange); - } - - /** - * Get the PIHeatingDemand attribute [attribute ID 8]. - *

    - * The PIHeatingDemand attribute is 8 bits in length and specifies the level of heating demanded by the PI - * (proportional integral) control loop in use by the thermostat (if any), in percent. This value is 0 when the - * thermostat is in “off” or “cooling” mode. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getPiHeatingDemandAsync() { - return read(attributes.get(ATTR_PIHEATINGDEMAND)); - } - - /** - * Synchronously get the PIHeatingDemand attribute [attribute ID 8]. - *

    - * The PIHeatingDemand attribute is 8 bits in length and specifies the level of heating demanded by the PI - * (proportional integral) control loop in use by the thermostat (if any), in percent. This value is 0 when the - * thermostat is in “off” or “cooling” mode. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getPiHeatingDemand(final long refreshPeriod) { - if (attributes.get(ATTR_PIHEATINGDEMAND).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_PIHEATINGDEMAND).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_PIHEATINGDEMAND)); - } - - /** - * Set reporting for the PIHeatingDemand attribute [attribute ID 8]. - *

    - * The PIHeatingDemand attribute is 8 bits in length and specifies the level of heating demanded by the PI - * (proportional integral) control loop in use by the thermostat (if any), in percent. This value is 0 when the - * thermostat is in “off” or “cooling” mode. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param minInterval {@link int} minimum reporting period - * @param maxInterval {@link int} maximum reporting period - * @param reportableChange {@link Object} delta required to trigger report - * @return the {@link Future} command result future - */ - public Future setPiHeatingDemandReporting(final int minInterval, final int maxInterval, final Object reportableChange) { - return setReporting(attributes.get(ATTR_PIHEATINGDEMAND), minInterval, maxInterval, reportableChange); - } - - /** - * Get the HVACSystemTypeConfiguration attribute [attribute ID 9]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getHvacSystemTypeConfigurationAsync() { - return read(attributes.get(ATTR_HVACSYSTEMTYPECONFIGURATION)); - } - - /** - * Synchronously get the HVACSystemTypeConfiguration attribute [attribute ID 9]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getHvacSystemTypeConfiguration(final long refreshPeriod) { - if (attributes.get(ATTR_HVACSYSTEMTYPECONFIGURATION).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_HVACSYSTEMTYPECONFIGURATION).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_HVACSYSTEMTYPECONFIGURATION)); - } - - /** - * Get the LocalTemperatureCalibration attribute [attribute ID 16]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getLocalTemperatureCalibrationAsync() { - return read(attributes.get(ATTR_LOCALTEMPERATURECALIBRATION)); - } - - /** - * Synchronously get the LocalTemperatureCalibration attribute [attribute ID 16]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getLocalTemperatureCalibration(final long refreshPeriod) { - if (attributes.get(ATTR_LOCALTEMPERATURECALIBRATION).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_LOCALTEMPERATURECALIBRATION).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_LOCALTEMPERATURECALIBRATION)); - } - - /** - * Get the OccupiedCoolingSetpoint attribute [attribute ID 17]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getOccupiedCoolingSetpointAsync() { - return read(attributes.get(ATTR_OCCUPIEDCOOLINGSETPOINT)); - } - - /** - * Synchronously get the OccupiedCoolingSetpoint attribute [attribute ID 17]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getOccupiedCoolingSetpoint(final long refreshPeriod) { - if (attributes.get(ATTR_OCCUPIEDCOOLINGSETPOINT).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_OCCUPIEDCOOLINGSETPOINT).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_OCCUPIEDCOOLINGSETPOINT)); - } - - /** - * Get the OccupiedHeatingSetpoint attribute [attribute ID 18]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getOccupiedHeatingSetpointAsync() { - return read(attributes.get(ATTR_OCCUPIEDHEATINGSETPOINT)); - } - - /** - * Synchronously get the OccupiedHeatingSetpoint attribute [attribute ID 18]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getOccupiedHeatingSetpoint(final long refreshPeriod) { - if (attributes.get(ATTR_OCCUPIEDHEATINGSETPOINT).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_OCCUPIEDHEATINGSETPOINT).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_OCCUPIEDHEATINGSETPOINT)); - } - - /** - * Get the UnoccupiedCoolingSetpoint attribute [attribute ID 19]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getUnoccupiedCoolingSetpointAsync() { - return read(attributes.get(ATTR_UNOCCUPIEDCOOLINGSETPOINT)); - } - - /** - * Synchronously get the UnoccupiedCoolingSetpoint attribute [attribute ID 19]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getUnoccupiedCoolingSetpoint(final long refreshPeriod) { - if (attributes.get(ATTR_UNOCCUPIEDCOOLINGSETPOINT).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_UNOCCUPIEDCOOLINGSETPOINT).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_UNOCCUPIEDCOOLINGSETPOINT)); - } - - /** - * Get the UnoccupiedHeatingSetpoint attribute [attribute ID 20]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getUnoccupiedHeatingSetpointAsync() { - return read(attributes.get(ATTR_UNOCCUPIEDHEATINGSETPOINT)); - } - - /** - * Synchronously get the UnoccupiedHeatingSetpoint attribute [attribute ID 20]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getUnoccupiedHeatingSetpoint(final long refreshPeriod) { - if (attributes.get(ATTR_UNOCCUPIEDHEATINGSETPOINT).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_UNOCCUPIEDHEATINGSETPOINT).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_UNOCCUPIEDHEATINGSETPOINT)); - } - - /** - * Get the MinHeatSetpointLimit attribute [attribute ID 21]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getMinHeatSetpointLimitAsync() { - return read(attributes.get(ATTR_MINHEATSETPOINTLIMIT)); - } - - /** - * Synchronously get the MinHeatSetpointLimit attribute [attribute ID 21]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMinHeatSetpointLimit(final long refreshPeriod) { - if (attributes.get(ATTR_MINHEATSETPOINTLIMIT).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MINHEATSETPOINTLIMIT).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MINHEATSETPOINTLIMIT)); - } - - /** - * Get the MaxHeatSetpointLimit attribute [attribute ID 22]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getMaxHeatSetpointLimitAsync() { - return read(attributes.get(ATTR_MAXHEATSETPOINTLIMIT)); - } - - /** - * Synchronously get the MaxHeatSetpointLimit attribute [attribute ID 22]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMaxHeatSetpointLimit(final long refreshPeriod) { - if (attributes.get(ATTR_MAXHEATSETPOINTLIMIT).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MAXHEATSETPOINTLIMIT).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MAXHEATSETPOINTLIMIT)); - } - - /** - * Get the MinCoolSetpointLimit attribute [attribute ID 23]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getMinCoolSetpointLimitAsync() { - return read(attributes.get(ATTR_MINCOOLSETPOINTLIMIT)); - } - - /** - * Synchronously get the MinCoolSetpointLimit attribute [attribute ID 23]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMinCoolSetpointLimit(final long refreshPeriod) { - if (attributes.get(ATTR_MINCOOLSETPOINTLIMIT).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MINCOOLSETPOINTLIMIT).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MINCOOLSETPOINTLIMIT)); - } - - /** - * Get the MaxCoolSetpointLimit attribute [attribute ID 24]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getMaxCoolSetpointLimitAsync() { - return read(attributes.get(ATTR_MAXCOOLSETPOINTLIMIT)); - } - - /** - * Synchronously get the MaxCoolSetpointLimit attribute [attribute ID 24]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMaxCoolSetpointLimit(final long refreshPeriod) { - if (attributes.get(ATTR_MAXCOOLSETPOINTLIMIT).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MAXCOOLSETPOINTLIMIT).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MAXCOOLSETPOINTLIMIT)); - } - - /** - * Get the MinSetpointDeadBand attribute [attribute ID 25]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getMinSetpointDeadBandAsync() { - return read(attributes.get(ATTR_MINSETPOINTDEADBAND)); - } - - /** - * Synchronously get the MinSetpointDeadBand attribute [attribute ID 25]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getMinSetpointDeadBand(final long refreshPeriod) { - if (attributes.get(ATTR_MINSETPOINTDEADBAND).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_MINSETPOINTDEADBAND).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_MINSETPOINTDEADBAND)); - } - - /** - * Get the RemoteSensing attribute [attribute ID 26]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getRemoteSensingAsync() { - return read(attributes.get(ATTR_REMOTESENSING)); - } - - /** - * Synchronously get the RemoteSensing attribute [attribute ID 26]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getRemoteSensing(final long refreshPeriod) { - if (attributes.get(ATTR_REMOTESENSING).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_REMOTESENSING).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_REMOTESENSING)); - } - - /** - * Get the ControlSequenceOfOperation attribute [attribute ID 27]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getControlSequenceOfOperationAsync() { - return read(attributes.get(ATTR_CONTROLSEQUENCEOFOPERATION)); - } - - /** - * Synchronously get the ControlSequenceOfOperation attribute [attribute ID 27]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getControlSequenceOfOperation(final long refreshPeriod) { - if (attributes.get(ATTR_CONTROLSEQUENCEOFOPERATION).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_CONTROLSEQUENCEOFOPERATION).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_CONTROLSEQUENCEOFOPERATION)); - } - - /** - * Get the SystemMode attribute [attribute ID 28]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getSystemModeAsync() { - return read(attributes.get(ATTR_SYSTEMMODE)); - } - - /** - * Synchronously get the SystemMode attribute [attribute ID 28]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getSystemMode(final long refreshPeriod) { - if (attributes.get(ATTR_SYSTEMMODE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_SYSTEMMODE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_SYSTEMMODE)); - } - - /** - * Get the AlarmMask attribute [attribute ID 29]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getAlarmMaskAsync() { - return read(attributes.get(ATTR_ALARMMASK)); - } - - /** - * Synchronously get the AlarmMask attribute [attribute ID 29]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getAlarmMask(final long refreshPeriod) { - if (attributes.get(ATTR_ALARMMASK).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_ALARMMASK).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_ALARMMASK)); - } - - /** - * Get the ThermostatRunningMode attribute [attribute ID 30]. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getThermostatRunningModeAsync() { - return read(attributes.get(ATTR_THERMOSTATRUNNINGMODE)); - } - - /** - * Synchronously get the ThermostatRunningMode attribute [attribute ID 30]. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getThermostatRunningMode(final long refreshPeriod) { - if (attributes.get(ATTR_THERMOSTATRUNNINGMODE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_THERMOSTATRUNNINGMODE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_THERMOSTATRUNNINGMODE)); - } - - /** - * Get the ACErrorCode attribute [attribute ID 68]. - *

    - * This indicates the type of errors encountered within the Mini Split AC. Error values are reported with four bytes - * values. Each bit within the four bytes indicates the unique error. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getAcErrorCodeAsync() { - return read(attributes.get(ATTR_ACERRORCODE)); - } - - /** - * Synchronously get the ACErrorCode attribute [attribute ID 68]. - *

    - * This indicates the type of errors encountered within the Mini Split AC. Error values are reported with four bytes - * values. Each bit within the four bytes indicates the unique error. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getAcErrorCode(final long refreshPeriod) { - if (attributes.get(ATTR_ACERRORCODE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_ACERRORCODE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_ACERRORCODE)); - } - - /** - * The Setpoint Raise/Lower Command - * - * @param mode {@link Integer} Mode - * @param amount {@link Integer} Amount - * @return the {@link Future} command result future - */ - public Future setpointRaiseLowerCommand(Integer mode, Integer amount) { - SetpointRaiseLowerCommand command = new SetpointRaiseLowerCommand(); - - // Set the fields - command.setMode(mode); - command.setAmount(amount); - - return send(command); - } - - /** - * The Set Weekly Schedule - *

    - * The set weekly schedule command is used to update the thermostat weekly set point schedule from a management system. - * If the thermostat already has a weekly set point schedule programmed then it SHOULD replace each daily set point set - * as it receives the updates from the management system. For example if the thermostat has 4 set points for every day of - * the week and is sent a Set Weekly Schedule command with one set point for Saturday then the thermostat SHOULD remove - * all 4 set points for Saturday and replace those with the updated set point but leave all other days unchanged. - *
    - * If the schedule is larger than what fits in one ZigBee frame or contains more than 10 transitions, the schedule SHALL - * then be sent using multipleSet Weekly Schedule Commands. - * - * @param numberOfTransitions {@link Integer} Number of Transitions - * @param dayOfWeek {@link Integer} Day of Week - * @param mode {@link Integer} Mode - * @param transition {@link Integer} Transition - * @param heatSet {@link Integer} Heat Set - * @param coolSet {@link Integer} Cool Set - * @return the {@link Future} command result future - */ - public Future setWeeklySchedule(Integer numberOfTransitions, Integer dayOfWeek, Integer mode, Integer transition, Integer heatSet, Integer coolSet) { - SetWeeklySchedule command = new SetWeeklySchedule(); - - // Set the fields - command.setNumberOfTransitions(numberOfTransitions); - command.setDayOfWeek(dayOfWeek); - command.setMode(mode); - command.setTransition(transition); - command.setHeatSet(heatSet); - command.setCoolSet(coolSet); - - return send(command); - } - - /** - * The Get Weekly Schedule - * - * @param daysToReturn {@link Integer} Days To Return - * @param modeToReturn {@link Integer} Mode To Return - * @return the {@link Future} command result future - */ - public Future getWeeklySchedule(Integer daysToReturn, Integer modeToReturn) { - GetWeeklySchedule command = new GetWeeklySchedule(); - - // Set the fields - command.setDaysToReturn(daysToReturn); - command.setModeToReturn(modeToReturn); - - return send(command); - } - - /** - * The Clear Weekly Schedule - * - * @return the {@link Future} command result future - */ - public Future clearWeeklySchedule() { - ClearWeeklySchedule command = new ClearWeeklySchedule(); - - return send(command); - } - - /** - * The Get Relay Status Log - *

    - * The Get Relay Status Log command is used to query the thermostat internal relay status log. This command has no payload. - *
    - * The log storing order is First in First Out (FIFO) when the log is generated and stored into the Queue. - *
    - * The first record in the log (i.e., the oldest) one, is the first to be replaced when there is a new record and there is - * no more space in the log. Thus, the newest record will overwrite the oldest one if there is no space left. - *
    - * The log storing order is Last In First Out (LIFO) when the log is being retrieved from the Queue by a client device. - * Once the "Get Relay Status Log Response" frame is sent by the Server, the "Unread Entries" attribute - * SHOULD be decremented to indicate the number of unread records that remain in the queue. - *
    - * If the "Unread Entries"attribute reaches zero and the Client sends a new "Get Relay Status Log Request", the Server - * MAY send one of the following items as a response: - *
    - * i) resend the last Get Relay Status Log Response - * or - * ii) generate new log record at the time of request and send Get Relay Status Log Response with the new data - * - * @return the {@link Future} command result future - */ - public Future getRelayStatusLog() { - GetRelayStatusLog command = new GetRelayStatusLog(); - - return send(command); - } - - /** - * The Get Weekly Schedule Response - * - * @param numberOfTransitions {@link Integer} Number of Transitions - * @param dayOfWeek {@link Integer} Day of Week - * @param mode {@link Integer} Mode - * @param transition {@link Integer} Transition - * @param heatSet {@link Integer} Heat Set - * @param coolSet {@link Integer} Cool Set - * @return the {@link Future} command result future - */ - public Future getWeeklyScheduleResponse(Integer numberOfTransitions, Integer dayOfWeek, Integer mode, Integer transition, Integer heatSet, Integer coolSet) { - GetWeeklyScheduleResponse command = new GetWeeklyScheduleResponse(); - - // Set the fields - command.setNumberOfTransitions(numberOfTransitions); - command.setDayOfWeek(dayOfWeek); - command.setMode(mode); - command.setTransition(transition); - command.setHeatSet(heatSet); - command.setCoolSet(coolSet); - - return send(command); - } - - /** - * The Get Relay Status Log Response - * - * @param timeOfDay {@link Integer} Time of day - * @param relayStatus {@link Integer} Relay Status - * @param localTemperature {@link Integer} Local Temperature - * @param humidity {@link Integer} Humidity - * @param setpoint {@link Integer} Setpoint - * @param unreadEntries {@link Integer} Unread Entries - * @return the {@link Future} command result future - */ - public Future getRelayStatusLogResponse(Integer timeOfDay, Integer relayStatus, Integer localTemperature, Integer humidity, Integer setpoint, Integer unreadEntries) { - GetRelayStatusLogResponse command = new GetRelayStatusLogResponse(); - - // Set the fields - command.setTimeOfDay(timeOfDay); - command.setRelayStatus(relayStatus); - command.setLocalTemperature(localTemperature); - command.setHumidity(humidity); - command.setSetpoint(setpoint); - command.setUnreadEntries(unreadEntries); - - return send(command); - } - - @Override - public ZclCommand getCommandFromId(int commandId) { - switch (commandId) { - case 0: // SETPOINT_RAISE_LOWER_COMMAND - return new SetpointRaiseLowerCommand(); - case 1: // SET_WEEKLY_SCHEDULE - return new SetWeeklySchedule(); - case 2: // GET_WEEKLY_SCHEDULE - return new GetWeeklySchedule(); - case 3: // CLEAR_WEEKLY_SCHEDULE - return new ClearWeeklySchedule(); - case 4: // GET_RELAY_STATUS_LOG - return new GetRelayStatusLog(); - default: - return null; - } - } - - @Override - public ZclCommand getResponseFromId(int commandId) { - switch (commandId) { - case 0: // GET_WEEKLY_SCHEDULE_RESPONSE - return new GetWeeklyScheduleResponse(); - case 1: // GET_RELAY_STATUS_LOG_RESPONSE - return new GetRelayStatusLogResponse(); - default: - return null; - } - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclThermostatUserInterfaceConfigurationCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclThermostatUserInterfaceConfigurationCluster.java deleted file mode 100644 index 108a0ca7d..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclThermostatUserInterfaceConfigurationCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Thermostat User Interface Configuration cluster implementation (Cluster ID 0x0204). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclThermostatUserInterfaceConfigurationCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0204; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Thermostat User Interface Configuration"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Thermostat User Interface Configuration cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclThermostatUserInterfaceConfigurationCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclTimeCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclTimeCluster.java deleted file mode 100644 index d80704c1a..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclTimeCluster.java +++ /dev/null @@ -1,655 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.CommandResult; -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import com.zsmartsystems.zigbee.zcl.protocol.ZclClusterType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import java.util.Calendar; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Future; -import javax.annotation.Generated; - -/** - * Time cluster implementation (Cluster ID 0x000A). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclTimeCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x000A; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Time"; - - // Attribute constants - /** - * The Time attribute is 32-bits in length and holds the time value of a real time - * clock. This attribute has data type UTCTime, but note that it may not actually be - * synchronised to UTC - see discussion of the TimeStatus attribute below. - *

    - * If the Master bit of the TimeStatus attribute has a value of 0, writing to this - * attribute shall set the real time clock to the written value, otherwise it cannot be - * written. The value 0xffffffff indicates an invalid time. - */ - public static final int ATTR_TIME = 0x0000; - /** - * The TimeStatus attribute holds a number of bit fields. - */ - public static final int ATTR_TIMESTATUS = 0x0001; - /** - * The TimeZone attribute indicates the local time zone, as a signed offset in seconds - * from the Time attribute value. The value 0xffffffff indicates an invalid time zone. - */ - public static final int ATTR_TIMEZONE = 0x0002; - /** - * The DstStart attribute indicates the DST start time in seconds. The value 0xffffffff - * indicates an invalid DST start time. - */ - public static final int ATTR_DSTSTART = 0x0003; - /** - * The DstEnd attribute indicates the DST end time in seconds. The value 0xffffffff - * indicates an invalid DST end time. - *

    - * Note that the three attributes DstStart, DstEnd and DstShift are optional, but if any - * one of them is implemented the other two must also be implemented. - * Note that this attribute should be set to a new value once every year. - *

    - * Note that this attribute should be set to a new value once every year, and should be - * written synchronously with the DstStart attribute. - * The DstEnd attribute indicates the DST end time in seconds. The value 0xffffffff - * indicates an invalid DST end time. - *

    - * Note that this attribute should be set to a new value once every year, and should be - * written synchronously with the DstStart attribute - */ - public static final int ATTR_DSTEND = 0x0004; - /** - * The DstShift attribute represents a signed offset in seconds from the standard time, - * to be applied between the times DstStart and DstEnd to calculate the Local Time. - * The value 0xffffffff indicates an invalid DST shift. - *

    - * The range of this attribute is +/- one day. Note that the actual range of DST values - * employed by countries is much smaller than this, so the manufacturer has the - * option to impose a smaller range. - */ - public static final int ATTR_DSTSHIFT = 0x0005; - /** - * A device may derive the time by reading the Time and TimeZone attributes - * and adding them together. If implemented however, the optional StandardTime - * attribute indicates this time directly. The value 0xffffffff indicates an invalid - * Standard Time. - */ - public static final int ATTR_STANDARDTIME = 0x0006; - /** - * A device may derive the time by reading the Time, TimeZone, DstStart, DstEnd - * and DstShift attributes and performing the calculation. If implemented however, - * the optional LocalTime attribute indicates this time directly. The value 0xffffffff - * indicates an invalid Local Time. - */ - public static final int ATTR_LOCALTIME = 0x0007; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(8); - - attributeMap.put(ATTR_TIME, new ZclAttribute(ZclClusterType.TIME, ATTR_TIME, "Time", ZclDataType.UTCTIME, true, true, true, false)); - attributeMap.put(ATTR_TIMESTATUS, new ZclAttribute(ZclClusterType.TIME, ATTR_TIMESTATUS, "TimeStatus", ZclDataType.UNSIGNED_16_BIT_INTEGER, false, true, true, false)); - attributeMap.put(ATTR_TIMEZONE, new ZclAttribute(ZclClusterType.TIME, ATTR_TIMEZONE, "TimeZone", ZclDataType.SIGNED_32_BIT_INTEGER, false, true, true, false)); - attributeMap.put(ATTR_DSTSTART, new ZclAttribute(ZclClusterType.TIME, ATTR_DSTSTART, "DstStart", ZclDataType.UNSIGNED_32_BIT_INTEGER, false, true, true, false)); - attributeMap.put(ATTR_DSTEND, new ZclAttribute(ZclClusterType.TIME, ATTR_DSTEND, "DstEnd", ZclDataType.UNSIGNED_32_BIT_INTEGER, false, true, true, false)); - attributeMap.put(ATTR_DSTSHIFT, new ZclAttribute(ZclClusterType.TIME, ATTR_DSTSHIFT, "DstShift", ZclDataType.SIGNED_32_BIT_INTEGER, false, true, true, false)); - attributeMap.put(ATTR_STANDARDTIME, new ZclAttribute(ZclClusterType.TIME, ATTR_STANDARDTIME, "StandardTime", ZclDataType.SIGNED_32_BIT_INTEGER, false, true, false, false)); - attributeMap.put(ATTR_LOCALTIME, new ZclAttribute(ZclClusterType.TIME, ATTR_LOCALTIME, "LocalTime", ZclDataType.SIGNED_32_BIT_INTEGER, false, true, false, false)); - - return attributeMap; - } - - /** - * Default constructor to create a Time cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclTimeCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } - - /** - * Set the Time attribute [attribute ID 0]. - *

    - * The Time attribute is 32-bits in length and holds the time value of a real time - * clock. This attribute has data type UTCTime, but note that it may not actually be - * synchronised to UTC - see discussion of the TimeStatus attribute below. - *

    - * If the Master bit of the TimeStatus attribute has a value of 0, writing to this - * attribute shall set the real time clock to the written value, otherwise it cannot be - * written. The value 0xffffffff indicates an invalid time. - *

    - * The attribute is of type {@link Calendar}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param time the {@link Calendar} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setTime(final Object value) { - return write(attributes.get(ATTR_TIME), value); - } - - /** - * Get the Time attribute [attribute ID 0]. - *

    - * The Time attribute is 32-bits in length and holds the time value of a real time - * clock. This attribute has data type UTCTime, but note that it may not actually be - * synchronised to UTC - see discussion of the TimeStatus attribute below. - *

    - * If the Master bit of the TimeStatus attribute has a value of 0, writing to this - * attribute shall set the real time clock to the written value, otherwise it cannot be - * written. The value 0xffffffff indicates an invalid time. - *

    - * The attribute is of type {@link Calendar}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @return the {@link Future} command result future - */ - public Future getTimeAsync() { - return read(attributes.get(ATTR_TIME)); - } - - /** - * Synchronously get the Time attribute [attribute ID 0]. - *

    - * The Time attribute is 32-bits in length and holds the time value of a real time - * clock. This attribute has data type UTCTime, but note that it may not actually be - * synchronised to UTC - see discussion of the TimeStatus attribute below. - *

    - * If the Master bit of the TimeStatus attribute has a value of 0, writing to this - * attribute shall set the real time clock to the written value, otherwise it cannot be - * written. The value 0xffffffff indicates an invalid time. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Calendar}. - *

    - * The implementation of this attribute by a device is MANDATORY - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Calendar} attribute value, or null on error - */ - public Calendar getTime(final long refreshPeriod) { - if (attributes.get(ATTR_TIME).isLastValueCurrent(refreshPeriod)) { - return (Calendar) attributes.get(ATTR_TIME).getLastValue(); - } - - return (Calendar) readSync(attributes.get(ATTR_TIME)); - } - - /** - * Set the TimeStatus attribute [attribute ID 1]. - *

    - * The TimeStatus attribute holds a number of bit fields. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param timeStatus the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setTimeStatus(final Object value) { - return write(attributes.get(ATTR_TIMESTATUS), value); - } - - /** - * Get the TimeStatus attribute [attribute ID 1]. - *

    - * The TimeStatus attribute holds a number of bit fields. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getTimeStatusAsync() { - return read(attributes.get(ATTR_TIMESTATUS)); - } - - /** - * Synchronously get the TimeStatus attribute [attribute ID 1]. - *

    - * The TimeStatus attribute holds a number of bit fields. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getTimeStatus(final long refreshPeriod) { - if (attributes.get(ATTR_TIMESTATUS).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_TIMESTATUS).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_TIMESTATUS)); - } - - /** - * Set the TimeZone attribute [attribute ID 2]. - *

    - * The TimeZone attribute indicates the local time zone, as a signed offset in seconds - * from the Time attribute value. The value 0xffffffff indicates an invalid time zone. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param timeZone the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setTimeZone(final Object value) { - return write(attributes.get(ATTR_TIMEZONE), value); - } - - /** - * Get the TimeZone attribute [attribute ID 2]. - *

    - * The TimeZone attribute indicates the local time zone, as a signed offset in seconds - * from the Time attribute value. The value 0xffffffff indicates an invalid time zone. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getTimeZoneAsync() { - return read(attributes.get(ATTR_TIMEZONE)); - } - - /** - * Synchronously get the TimeZone attribute [attribute ID 2]. - *

    - * The TimeZone attribute indicates the local time zone, as a signed offset in seconds - * from the Time attribute value. The value 0xffffffff indicates an invalid time zone. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getTimeZone(final long refreshPeriod) { - if (attributes.get(ATTR_TIMEZONE).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_TIMEZONE).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_TIMEZONE)); - } - - /** - * Set the DstStart attribute [attribute ID 3]. - *

    - * The DstStart attribute indicates the DST start time in seconds. The value 0xffffffff - * indicates an invalid DST start time. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param dstStart the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setDstStart(final Object value) { - return write(attributes.get(ATTR_DSTSTART), value); - } - - /** - * Get the DstStart attribute [attribute ID 3]. - *

    - * The DstStart attribute indicates the DST start time in seconds. The value 0xffffffff - * indicates an invalid DST start time. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getDstStartAsync() { - return read(attributes.get(ATTR_DSTSTART)); - } - - /** - * Synchronously get the DstStart attribute [attribute ID 3]. - *

    - * The DstStart attribute indicates the DST start time in seconds. The value 0xffffffff - * indicates an invalid DST start time. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getDstStart(final long refreshPeriod) { - if (attributes.get(ATTR_DSTSTART).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_DSTSTART).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_DSTSTART)); - } - - /** - * Set the DstEnd attribute [attribute ID 4]. - *

    - * The DstEnd attribute indicates the DST end time in seconds. The value 0xffffffff - * indicates an invalid DST end time. - *

    - * Note that the three attributes DstStart, DstEnd and DstShift are optional, but if any - * one of them is implemented the other two must also be implemented. - * Note that this attribute should be set to a new value once every year. - *

    - * Note that this attribute should be set to a new value once every year, and should be - * written synchronously with the DstStart attribute. - * The DstEnd attribute indicates the DST end time in seconds. The value 0xffffffff - * indicates an invalid DST end time. - *

    - * Note that this attribute should be set to a new value once every year, and should be - * written synchronously with the DstStart attribute - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param dstEnd the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setDstEnd(final Object value) { - return write(attributes.get(ATTR_DSTEND), value); - } - - /** - * Get the DstEnd attribute [attribute ID 4]. - *

    - * The DstEnd attribute indicates the DST end time in seconds. The value 0xffffffff - * indicates an invalid DST end time. - *

    - * Note that the three attributes DstStart, DstEnd and DstShift are optional, but if any - * one of them is implemented the other two must also be implemented. - * Note that this attribute should be set to a new value once every year. - *

    - * Note that this attribute should be set to a new value once every year, and should be - * written synchronously with the DstStart attribute. - * The DstEnd attribute indicates the DST end time in seconds. The value 0xffffffff - * indicates an invalid DST end time. - *

    - * Note that this attribute should be set to a new value once every year, and should be - * written synchronously with the DstStart attribute - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getDstEndAsync() { - return read(attributes.get(ATTR_DSTEND)); - } - - /** - * Synchronously get the DstEnd attribute [attribute ID 4]. - *

    - * The DstEnd attribute indicates the DST end time in seconds. The value 0xffffffff - * indicates an invalid DST end time. - *

    - * Note that the three attributes DstStart, DstEnd and DstShift are optional, but if any - * one of them is implemented the other two must also be implemented. - * Note that this attribute should be set to a new value once every year. - *

    - * Note that this attribute should be set to a new value once every year, and should be - * written synchronously with the DstStart attribute. - * The DstEnd attribute indicates the DST end time in seconds. The value 0xffffffff - * indicates an invalid DST end time. - *

    - * Note that this attribute should be set to a new value once every year, and should be - * written synchronously with the DstStart attribute - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getDstEnd(final long refreshPeriod) { - if (attributes.get(ATTR_DSTEND).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_DSTEND).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_DSTEND)); - } - - /** - * Set the DstShift attribute [attribute ID 5]. - *

    - * The DstShift attribute represents a signed offset in seconds from the standard time, - * to be applied between the times DstStart and DstEnd to calculate the Local Time. - * The value 0xffffffff indicates an invalid DST shift. - *

    - * The range of this attribute is +/- one day. Note that the actual range of DST values - * employed by countries is much smaller than this, so the manufacturer has the - * option to impose a smaller range. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param dstShift the {@link Integer} attribute value to be set - * @return the {@link Future} command result future - */ - public Future setDstShift(final Object value) { - return write(attributes.get(ATTR_DSTSHIFT), value); - } - - /** - * Get the DstShift attribute [attribute ID 5]. - *

    - * The DstShift attribute represents a signed offset in seconds from the standard time, - * to be applied between the times DstStart and DstEnd to calculate the Local Time. - * The value 0xffffffff indicates an invalid DST shift. - *

    - * The range of this attribute is +/- one day. Note that the actual range of DST values - * employed by countries is much smaller than this, so the manufacturer has the - * option to impose a smaller range. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getDstShiftAsync() { - return read(attributes.get(ATTR_DSTSHIFT)); - } - - /** - * Synchronously get the DstShift attribute [attribute ID 5]. - *

    - * The DstShift attribute represents a signed offset in seconds from the standard time, - * to be applied between the times DstStart and DstEnd to calculate the Local Time. - * The value 0xffffffff indicates an invalid DST shift. - *

    - * The range of this attribute is +/- one day. Note that the actual range of DST values - * employed by countries is much smaller than this, so the manufacturer has the - * option to impose a smaller range. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getDstShift(final long refreshPeriod) { - if (attributes.get(ATTR_DSTSHIFT).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_DSTSHIFT).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_DSTSHIFT)); - } - - /** - * Get the StandardTime attribute [attribute ID 6]. - *

    - * A device may derive the time by reading the Time and TimeZone attributes - * and adding them together. If implemented however, the optional StandardTime - * attribute indicates this time directly. The value 0xffffffff indicates an invalid - * Standard Time. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getStandardTimeAsync() { - return read(attributes.get(ATTR_STANDARDTIME)); - } - - /** - * Synchronously get the StandardTime attribute [attribute ID 6]. - *

    - * A device may derive the time by reading the Time and TimeZone attributes - * and adding them together. If implemented however, the optional StandardTime - * attribute indicates this time directly. The value 0xffffffff indicates an invalid - * Standard Time. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getStandardTime(final long refreshPeriod) { - if (attributes.get(ATTR_STANDARDTIME).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_STANDARDTIME).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_STANDARDTIME)); - } - - /** - * Get the LocalTime attribute [attribute ID 7]. - *

    - * A device may derive the time by reading the Time, TimeZone, DstStart, DstEnd - * and DstShift attributes and performing the calculation. If implemented however, - * the optional LocalTime attribute indicates this time directly. The value 0xffffffff - * indicates an invalid Local Time. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @return the {@link Future} command result future - */ - public Future getLocalTimeAsync() { - return read(attributes.get(ATTR_LOCALTIME)); - } - - /** - * Synchronously get the LocalTime attribute [attribute ID 7]. - *

    - * A device may derive the time by reading the Time, TimeZone, DstStart, DstEnd - * and DstShift attributes and performing the calculation. If implemented however, - * the optional LocalTime attribute indicates this time directly. The value 0xffffffff - * indicates an invalid Local Time. - *

    - * This method can return cached data if the attribute has already been received. - * The parameter refreshPeriod is used to control this. If the attribute has been received - * within refreshPeriod milliseconds, then the method will immediately return the last value - * received. If refreshPeriod is set to 0, then the attribute will always be updated. - *

    - * This method will block until the response is received or a timeout occurs unless the current value is returned. - *

    - * The attribute is of type {@link Integer}. - *

    - * The implementation of this attribute by a device is OPTIONAL - * - * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed - * @return the {@link Integer} attribute value, or null on error - */ - public Integer getLocalTime(final long refreshPeriod) { - if (attributes.get(ATTR_LOCALTIME).isLastValueCurrent(refreshPeriod)) { - return (Integer) attributes.get(ATTR_LOCALTIME).getLastValue(); - } - - return (Integer) readSync(attributes.get(ATTR_LOCALTIME)); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclTouchlinkCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclTouchlinkCluster.java deleted file mode 100644 index dc032025b..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclTouchlinkCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Touchlink cluster implementation (Cluster ID 0x1000). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclTouchlinkCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x1000; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Touchlink"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Touchlink cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclTouchlinkCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclTunnelingCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclTunnelingCluster.java deleted file mode 100644 index a8174edf7..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclTunnelingCluster.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters; - -import com.zsmartsystems.zigbee.ZigBeeEndpoint; -import com.zsmartsystems.zigbee.zcl.ZclAttribute; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Generated; - -/** - * Tunneling cluster implementation (Cluster ID 0x0704). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") -public class ZclTunnelingCluster extends ZclCluster { - /** - * The ZigBee Cluster Library Cluster ID - */ - public static final int CLUSTER_ID = 0x0704; - - /** - * The ZigBee Cluster Library Cluster Name - */ - public static final String CLUSTER_NAME = "Tunneling"; - - // Attribute initialisation - protected Map initializeAttributes() { - Map attributeMap = new ConcurrentHashMap(0); - - return attributeMap; - } - - /** - * Default constructor to create a Tunneling cluster. - * - * @param zigbeeEndpoint the {@link ZigBeeEndpoint} - */ - public ZclTunnelingCluster(final ZigBeeEndpoint zigbeeEndpoint) { - super(zigbeeEndpoint, CLUSTER_ID, CLUSTER_NAME); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/alarms/AlarmCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/alarms/AlarmCommand.java deleted file mode 100644 index f6c364767..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/alarms/AlarmCommand.java +++ /dev/null @@ -1,115 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.alarms; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Alarm Command value object class. - *

    - * Cluster: Alarms. Command is sent FROM the server. - * This command is a specific command used for the Alarms cluster. - *

    - * The alarm command signals an alarm situation on the sending device. - *
    - * An alarm command is generated when a cluster which has alarm functionality detects an alarm - * condition, e.g., an attribute has taken on a value that is outside a ‘safe’ range. The details - * are given by individual cluster specifications. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class AlarmCommand extends ZclCommand { - /** - * Alarm code command message field. - */ - private Integer alarmCode; - - /** - * Cluster identifier command message field. - */ - private Integer clusterIdentifier; - - /** - * Default constructor. - */ - public AlarmCommand() { - genericCommand = false; - clusterId = 9; - commandId = 0; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Alarm code. - * - * @return the Alarm code - */ - public Integer getAlarmCode() { - return alarmCode; - } - - /** - * Sets Alarm code. - * - * @param alarmCode the Alarm code - */ - public void setAlarmCode(final Integer alarmCode) { - this.alarmCode = alarmCode; - } - - /** - * Gets Cluster identifier. - * - * @return the Cluster identifier - */ - public Integer getClusterIdentifier() { - return clusterIdentifier; - } - - /** - * Sets Cluster identifier. - * - * @param clusterIdentifier the Cluster identifier - */ - public void setClusterIdentifier(final Integer clusterIdentifier) { - this.clusterIdentifier = clusterIdentifier; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(alarmCode, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(clusterIdentifier, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - alarmCode = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - clusterIdentifier = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(81); - builder.append("AlarmCommand ["); - builder.append(super.toString()); - builder.append(", alarmCode="); - builder.append(alarmCode); - builder.append(", clusterIdentifier="); - builder.append(clusterIdentifier); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/alarms/GetAlarmCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/alarms/GetAlarmCommand.java deleted file mode 100644 index 5172ce6da..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/alarms/GetAlarmCommand.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.alarms; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Get Alarm Command value object class. - *

    - * Cluster: Alarms. Command is sent TO the server. - * This command is a specific command used for the Alarms cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class GetAlarmCommand extends ZclCommand { - /** - * Default constructor. - */ - public GetAlarmCommand() { - genericCommand = false; - clusterId = 9; - commandId = 2; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(18); - builder.append("GetAlarmCommand ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/alarms/GetAlarmResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/alarms/GetAlarmResponse.java deleted file mode 100644 index eefcc8e95..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/alarms/GetAlarmResponse.java +++ /dev/null @@ -1,169 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.alarms; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Get Alarm Response value object class. - *

    - * Cluster: Alarms. Command is sent FROM the server. - * This command is a specific command used for the Alarms cluster. - *

    - * If there is at least one alarm record in the alarm table then the status field is set to SUCCESS. - * The alarm code, cluster identifier and time stamp fields SHALL all be present and SHALL take their - * values from the item in the alarm table that they are reporting.If there are no more alarms logged - * in the alarm table then the status field is set to NOT_FOUND and the alarm code, cluster - * identifier and time stamp fields SHALL be omitted. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class GetAlarmResponse extends ZclCommand { - /** - * Status command message field. - */ - private Integer status; - - /** - * Alarm code command message field. - */ - private Integer alarmCode; - - /** - * Cluster identifier command message field. - */ - private Integer clusterIdentifier; - - /** - * Timestamp command message field. - */ - private Integer timestamp; - - /** - * Default constructor. - */ - public GetAlarmResponse() { - genericCommand = false; - clusterId = 9; - commandId = 1; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Status. - * - * @return the Status - */ - public Integer getStatus() { - return status; - } - - /** - * Sets Status. - * - * @param status the Status - */ - public void setStatus(final Integer status) { - this.status = status; - } - - /** - * Gets Alarm code. - * - * @return the Alarm code - */ - public Integer getAlarmCode() { - return alarmCode; - } - - /** - * Sets Alarm code. - * - * @param alarmCode the Alarm code - */ - public void setAlarmCode(final Integer alarmCode) { - this.alarmCode = alarmCode; - } - - /** - * Gets Cluster identifier. - * - * @return the Cluster identifier - */ - public Integer getClusterIdentifier() { - return clusterIdentifier; - } - - /** - * Sets Cluster identifier. - * - * @param clusterIdentifier the Cluster identifier - */ - public void setClusterIdentifier(final Integer clusterIdentifier) { - this.clusterIdentifier = clusterIdentifier; - } - - /** - * Gets Timestamp. - * - * @return the Timestamp - */ - public Integer getTimestamp() { - return timestamp; - } - - /** - * Sets Timestamp. - * - * @param timestamp the Timestamp - */ - public void setTimestamp(final Integer timestamp) { - this.timestamp = timestamp; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(status, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(alarmCode, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(clusterIdentifier, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(timestamp, ZclDataType.UNSIGNED_32_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - status = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - alarmCode = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - clusterIdentifier = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - timestamp = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_32_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(140); - builder.append("GetAlarmResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(", alarmCode="); - builder.append(alarmCode); - builder.append(", clusterIdentifier="); - builder.append(clusterIdentifier); - builder.append(", timestamp="); - builder.append(timestamp); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/alarms/ResetAlarmCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/alarms/ResetAlarmCommand.java deleted file mode 100644 index 63b327a71..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/alarms/ResetAlarmCommand.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.alarms; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Reset Alarm Command value object class. - *

    - * Cluster: Alarms. Command is sent TO the server. - * This command is a specific command used for the Alarms cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class ResetAlarmCommand extends ZclCommand { - /** - * Alarm code command message field. - */ - private Integer alarmCode; - - /** - * Cluster identifier command message field. - */ - private Integer clusterIdentifier; - - /** - * Default constructor. - */ - public ResetAlarmCommand() { - genericCommand = false; - clusterId = 9; - commandId = 0; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Alarm code. - * - * @return the Alarm code - */ - public Integer getAlarmCode() { - return alarmCode; - } - - /** - * Sets Alarm code. - * - * @param alarmCode the Alarm code - */ - public void setAlarmCode(final Integer alarmCode) { - this.alarmCode = alarmCode; - } - - /** - * Gets Cluster identifier. - * - * @return the Cluster identifier - */ - public Integer getClusterIdentifier() { - return clusterIdentifier; - } - - /** - * Sets Cluster identifier. - * - * @param clusterIdentifier the Cluster identifier - */ - public void setClusterIdentifier(final Integer clusterIdentifier) { - this.clusterIdentifier = clusterIdentifier; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(alarmCode, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(clusterIdentifier, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - alarmCode = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - clusterIdentifier = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(86); - builder.append("ResetAlarmCommand ["); - builder.append(super.toString()); - builder.append(", alarmCode="); - builder.append(alarmCode); - builder.append(", clusterIdentifier="); - builder.append(clusterIdentifier); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/alarms/ResetAlarmLogCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/alarms/ResetAlarmLogCommand.java deleted file mode 100644 index 9037bef9d..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/alarms/ResetAlarmLogCommand.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.alarms; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Reset Alarm Log Command value object class. - *

    - * Cluster: Alarms. Command is sent TO the server. - * This command is a specific command used for the Alarms cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class ResetAlarmLogCommand extends ZclCommand { - /** - * Default constructor. - */ - public ResetAlarmLogCommand() { - genericCommand = false; - clusterId = 9; - commandId = 3; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(23); - builder.append("ResetAlarmLogCommand ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/alarms/ResetAllAlarmsCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/alarms/ResetAllAlarmsCommand.java deleted file mode 100644 index fab333afd..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/alarms/ResetAllAlarmsCommand.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.alarms; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Reset All Alarms Command value object class. - *

    - * Cluster: Alarms. Command is sent TO the server. - * This command is a specific command used for the Alarms cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class ResetAllAlarmsCommand extends ZclCommand { - /** - * Default constructor. - */ - public ResetAllAlarmsCommand() { - genericCommand = false; - clusterId = 9; - commandId = 1; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(24); - builder.append("ResetAllAlarmsCommand ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/basic/PhysicalEnvironmentEnum.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/basic/PhysicalEnvironmentEnum.java deleted file mode 100644 index 71f6a1bbf..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/basic/PhysicalEnvironmentEnum.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.basic; - -import java.util.HashMap; -import java.util.Map; - -import javax.annotation.Generated; - -/** - * Enumeration of Basic attribute PhysicalEnvironment options. - *

    - * Code is auto-generated. Modifications may be overwritten! - * - * @author Chris Jackson - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-31T12:00:43Z") -public enum PhysicalEnvironmentEnum { - UNKNOWN(0x0000), - ATRIUM(0x0001), - BAR(0x0002), - COURTYARD(0x0003), - BATHROOM(0x0004), - EDROOM(0x0005); - - /** - * A mapping between the integer code and its corresponding PhysicalEnvironmentEnum type to facilitate lookup by value. - */ - private static Map idMap; - - static { - idMap = new HashMap(); - for (PhysicalEnvironmentEnum enumValue : values()) { - idMap.put(enumValue.key, enumValue); - } - } - - private final int key; - - PhysicalEnvironmentEnum(final int key) { - this.key = key; - } - - public int getKey() { - return key; - } - - public static PhysicalEnvironmentEnum getByValue(final int value) { - return idMap.get(value); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/basic/PowerSourceEnum.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/basic/PowerSourceEnum.java deleted file mode 100644 index 2b79536fc..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/basic/PowerSourceEnum.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.basic; - -import java.util.HashMap; -import java.util.Map; - -import javax.annotation.Generated; - -/** - * Enumeration of Basic attribute PowerSource options. - *

    - * Code is auto-generated. Modifications may be overwritten! - * - * @author Chris Jackson - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-31T12:00:43Z") -public enum PowerSourceEnum { - UNKNOWN(0x0000), - MAINS_SINGLE_PHASE(0x0001), - MAINS_THREE_PHASE(0x0002), - BATTERY(0x0003), - DC_SOURCE(0x0004), - EMERGENCY_MAINS_CONSTANT(0x0005), - EMERGENCY_MAINS_CHANGEOVER(0x0006); - - /** - * A mapping between the integer code and its corresponding PowerSourceEnum type to facilitate lookup by value. - */ - private static Map idMap; - - static { - idMap = new HashMap(); - for (PowerSourceEnum enumValue : values()) { - idMap.put(enumValue.key, enumValue); - } - } - - private final int key; - - PowerSourceEnum(final int key) { - this.key = key; - } - - public int getKey() { - return key; - } - - public static PowerSourceEnum getByValue(final int value) { - return idMap.get(value); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/basic/ResetToFactoryDefaultsCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/basic/ResetToFactoryDefaultsCommand.java deleted file mode 100644 index 1a635992e..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/basic/ResetToFactoryDefaultsCommand.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.basic; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Reset to Factory Defaults Command value object class. - *

    - * Cluster: Basic. Command is sent TO the server. - * This command is a specific command used for the Basic cluster. - *

    - * On receipt of this command, the device resets all the attributes of all its clusters - * to their factory defaults. Note that ZigBee networking functionality,bindings, groups - * or other persistent data are not affected by this command - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class ResetToFactoryDefaultsCommand extends ZclCommand { - /** - * Default constructor. - */ - public ResetToFactoryDefaultsCommand() { - genericCommand = false; - clusterId = 0; - commandId = 0; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(32); - builder.append("ResetToFactoryDefaultsCommand ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/binaryinputbasic/ReliabilityEnum.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/binaryinputbasic/ReliabilityEnum.java deleted file mode 100644 index c6606668a..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/binaryinputbasic/ReliabilityEnum.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.binaryinputbasic; - -import java.util.HashMap; -import java.util.Map; - -import javax.annotation.Generated; - -/** - * Enumeration of Binary Input (Basic) attribute Reliability options. - *

    - * Code is auto-generated. Modifications may be overwritten! - * - * @author Chris Jackson - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-05-26T18:19:06Z") -public enum ReliabilityEnum { - NO_FAULT_DETECTED(0x0000), - OVER_RANGE(0x0002), - UNDER_RANGE(0x0003), - OPEN_LOOP(0x0004), - SHORTED_LOOP(0x0005), - UNRELIABLE_OTHER(0x0007), - PROCESS_ERROR(0x0008), - MULTI_STATE_FAULT(0x0009), - CONFIGURATION_ERROR(0x000A); - - /** - * A mapping between the integer code and its corresponding ReliabilityEnum type to facilitate lookup by value. - */ - private static Map idMap; - - static { - idMap = new HashMap(); - for (ReliabilityEnum enumValue : values()) { - idMap.put(enumValue.key, enumValue); - } - } - - private final int key; - - ReliabilityEnum(final int key) { - this.key = key; - } - - public int getKey() { - return key; - } - - public static ReliabilityEnum getByValue(final int value) { - return idMap.get(value); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/binaryinputbasic/StatusFlagsEnum.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/binaryinputbasic/StatusFlagsEnum.java deleted file mode 100644 index 4fb81a5b4..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/binaryinputbasic/StatusFlagsEnum.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.binaryinputbasic; - -import java.util.HashMap; -import java.util.Map; - -import javax.annotation.Generated; - -/** - * Enumeration of Binary Input (Basic) attribute StatusFlags options. - *

    - * Code is auto-generated. Modifications may be overwritten! - * - * @author Chris Jackson - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-05-26T18:19:06Z") -public enum StatusFlagsEnum { - IN_ALARM(0x0001), - FAULT(0x0002), - OVERRIDDEN(0x0004), - OUT_OF_SERVICE(0x0008); - - /** - * A mapping between the integer code and its corresponding StatusFlagsEnum type to facilitate lookup by value. - */ - private static Map idMap; - - static { - idMap = new HashMap(); - for (StatusFlagsEnum enumValue : values()) { - idMap.put(enumValue.key, enumValue); - } - } - - private final int key; - - StatusFlagsEnum(final int key) { - this.key = key; - } - - public int getKey() { - return key; - } - - public static StatusFlagsEnum getByValue(final int value) { - return idMap.get(value); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/ColorCapabilitiesEnum.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/ColorCapabilitiesEnum.java deleted file mode 100644 index 68e7a481d..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/ColorCapabilitiesEnum.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.colorcontrol; - -import java.util.HashMap; -import java.util.Map; - -import javax.annotation.Generated; - -/** - * Enumeration of Color control attribute ColorCapabilities options. - *

    - * Code is auto-generated. Modifications may be overwritten! - * - * @author Chris Jackson - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-31T12:00:43Z") -public enum ColorCapabilitiesEnum { - HUE_AND_SATURATION(0x0001), - ENHANCED_HUE(0x0002), - COLOR_LOOP(0x0004), - XY_ATTRIBUTE(0x0008), - COLOR_TEMPERATURE(0x0010); - - /** - * A mapping between the integer code and its corresponding ColorCapabilitiesEnum type to facilitate lookup by value. - */ - private static Map idMap; - - static { - idMap = new HashMap(); - for (ColorCapabilitiesEnum enumValue : values()) { - idMap.put(enumValue.key, enumValue); - } - } - - private final int key; - - ColorCapabilitiesEnum(final int key) { - this.key = key; - } - - public int getKey() { - return key; - } - - public static ColorCapabilitiesEnum getByValue(final int value) { - return idMap.get(value); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/ColorLoopSetCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/ColorLoopSetCommand.java deleted file mode 100644 index 029a9c7f4..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/ColorLoopSetCommand.java +++ /dev/null @@ -1,190 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.colorcontrol; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Color Loop Set Command value object class. - *

    - * Cluster: Color Control. Command is sent TO the server. - * This command is a specific command used for the Color Control cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class ColorLoopSetCommand extends ZclCommand { - /** - * Update Flags command message field. - */ - private Integer updateFlags; - - /** - * Action command message field. - */ - private Integer action; - - /** - * Direction command message field. - */ - private Integer direction; - - /** - * Transition time command message field. - */ - private Integer transitionTime; - - /** - * Start Hue command message field. - */ - private Integer startHue; - - /** - * Default constructor. - */ - public ColorLoopSetCommand() { - genericCommand = false; - clusterId = 768; - commandId = 67; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Update Flags. - * - * @return the Update Flags - */ - public Integer getUpdateFlags() { - return updateFlags; - } - - /** - * Sets Update Flags. - * - * @param updateFlags the Update Flags - */ - public void setUpdateFlags(final Integer updateFlags) { - this.updateFlags = updateFlags; - } - - /** - * Gets Action. - * - * @return the Action - */ - public Integer getAction() { - return action; - } - - /** - * Sets Action. - * - * @param action the Action - */ - public void setAction(final Integer action) { - this.action = action; - } - - /** - * Gets Direction. - * - * @return the Direction - */ - public Integer getDirection() { - return direction; - } - - /** - * Sets Direction. - * - * @param direction the Direction - */ - public void setDirection(final Integer direction) { - this.direction = direction; - } - - /** - * Gets Transition time. - * - * @return the Transition time - */ - public Integer getTransitionTime() { - return transitionTime; - } - - /** - * Sets Transition time. - * - * @param transitionTime the Transition time - */ - public void setTransitionTime(final Integer transitionTime) { - this.transitionTime = transitionTime; - } - - /** - * Gets Start Hue. - * - * @return the Start Hue - */ - public Integer getStartHue() { - return startHue; - } - - /** - * Sets Start Hue. - * - * @param startHue the Start Hue - */ - public void setStartHue(final Integer startHue) { - this.startHue = startHue; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(updateFlags, ZclDataType.BITMAP_8_BIT); - serializer.serialize(action, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(direction, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(transitionTime, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(startHue, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - updateFlags = (Integer) deserializer.deserialize(ZclDataType.BITMAP_8_BIT); - action = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - direction = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - transitionTime = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - startHue = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(170); - builder.append("ColorLoopSetCommand ["); - builder.append(super.toString()); - builder.append(", updateFlags="); - builder.append(updateFlags); - builder.append(", action="); - builder.append(action); - builder.append(", direction="); - builder.append(direction); - builder.append(", transitionTime="); - builder.append(transitionTime); - builder.append(", startHue="); - builder.append(startHue); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/ColorModeEnum.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/ColorModeEnum.java deleted file mode 100644 index 63ed7454d..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/ColorModeEnum.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.colorcontrol; - -import java.util.HashMap; -import java.util.Map; - -import javax.annotation.Generated; - -/** - * Enumeration of Color control attribute ColorMode options. - *

    - * Code is auto-generated. Modifications may be overwritten! - * - * @author Chris Jackson - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-31T12:00:43Z") -public enum ColorModeEnum { - CURRENTHUE_AND_CURRENTSATURATION(0x0000), - CURRENTX_AND_CURRENTY(0x0001), - COLORTEMPERATURE(0x0002); - - /** - * A mapping between the integer code and its corresponding ColorModeEnum type to facilitate lookup by value. - */ - private static Map idMap; - - static { - idMap = new HashMap(); - for (ColorModeEnum enumValue : values()) { - idMap.put(enumValue.key, enumValue); - } - } - - private final int key; - - ColorModeEnum(final int key) { - this.key = key; - } - - public int getKey() { - return key; - } - - public static ColorModeEnum getByValue(final int value) { - return idMap.get(value); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/EnhancedColorModeEnum.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/EnhancedColorModeEnum.java deleted file mode 100644 index 5ae468505..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/EnhancedColorModeEnum.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.colorcontrol; - -import java.util.HashMap; -import java.util.Map; - -import javax.annotation.Generated; - -/** - * Enumeration of Color control attribute EnhancedColorMode options. - *

    - * Code is auto-generated. Modifications may be overwritten! - * - * @author Chris Jackson - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-31T12:00:43Z") -public enum EnhancedColorModeEnum { - CURRENTHUE_AND_CURRENTSATURATION(0x0000), - CURRENTX_AND_CURRENTY(0x0001), - ENHANCEDCURRENTHUE_AND_CURRENTSATURATION(0x0002); - - /** - * A mapping between the integer code and its corresponding EnhancedColorModeEnum type to facilitate lookup by value. - */ - private static Map idMap; - - static { - idMap = new HashMap(); - for (EnhancedColorModeEnum enumValue : values()) { - idMap.put(enumValue.key, enumValue); - } - } - - private final int key; - - EnhancedColorModeEnum(final int key) { - this.key = key; - } - - public int getKey() { - return key; - } - - public static EnhancedColorModeEnum getByValue(final int value) { - return idMap.get(value); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/EnhancedMoveToHueAndSaturationCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/EnhancedMoveToHueAndSaturationCommand.java deleted file mode 100644 index b57bbc19f..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/EnhancedMoveToHueAndSaturationCommand.java +++ /dev/null @@ -1,136 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.colorcontrol; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Enhanced Move To Hue and Saturation Command value object class. - *

    - * Cluster: Color Control. Command is sent TO the server. - * This command is a specific command used for the Color Control cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class EnhancedMoveToHueAndSaturationCommand extends ZclCommand { - /** - * Hue command message field. - */ - private Integer hue; - - /** - * Saturation command message field. - */ - private Integer saturation; - - /** - * Transition time command message field. - */ - private Integer transitionTime; - - /** - * Default constructor. - */ - public EnhancedMoveToHueAndSaturationCommand() { - genericCommand = false; - clusterId = 768; - commandId = 66; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Hue. - * - * @return the Hue - */ - public Integer getHue() { - return hue; - } - - /** - * Sets Hue. - * - * @param hue the Hue - */ - public void setHue(final Integer hue) { - this.hue = hue; - } - - /** - * Gets Saturation. - * - * @return the Saturation - */ - public Integer getSaturation() { - return saturation; - } - - /** - * Sets Saturation. - * - * @param saturation the Saturation - */ - public void setSaturation(final Integer saturation) { - this.saturation = saturation; - } - - /** - * Gets Transition time. - * - * @return the Transition time - */ - public Integer getTransitionTime() { - return transitionTime; - } - - /** - * Sets Transition time. - * - * @param transitionTime the Transition time - */ - public void setTransitionTime(final Integer transitionTime) { - this.transitionTime = transitionTime; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(hue, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(saturation, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(transitionTime, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - hue = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - saturation = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - transitionTime = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(127); - builder.append("EnhancedMoveToHueAndSaturationCommand ["); - builder.append(super.toString()); - builder.append(", hue="); - builder.append(hue); - builder.append(", saturation="); - builder.append(saturation); - builder.append(", transitionTime="); - builder.append(transitionTime); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/EnhancedMoveToHueCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/EnhancedMoveToHueCommand.java deleted file mode 100644 index 600b91195..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/EnhancedMoveToHueCommand.java +++ /dev/null @@ -1,136 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.colorcontrol; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Enhanced Move To Hue Command value object class. - *

    - * Cluster: Color Control. Command is sent TO the server. - * This command is a specific command used for the Color Control cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class EnhancedMoveToHueCommand extends ZclCommand { - /** - * Hue command message field. - */ - private Integer hue; - - /** - * Direction command message field. - */ - private Integer direction; - - /** - * Transition time command message field. - */ - private Integer transitionTime; - - /** - * Default constructor. - */ - public EnhancedMoveToHueCommand() { - genericCommand = false; - clusterId = 768; - commandId = 64; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Hue. - * - * @return the Hue - */ - public Integer getHue() { - return hue; - } - - /** - * Sets Hue. - * - * @param hue the Hue - */ - public void setHue(final Integer hue) { - this.hue = hue; - } - - /** - * Gets Direction. - * - * @return the Direction - */ - public Integer getDirection() { - return direction; - } - - /** - * Sets Direction. - * - * @param direction the Direction - */ - public void setDirection(final Integer direction) { - this.direction = direction; - } - - /** - * Gets Transition time. - * - * @return the Transition time - */ - public Integer getTransitionTime() { - return transitionTime; - } - - /** - * Sets Transition time. - * - * @param transitionTime the Transition time - */ - public void setTransitionTime(final Integer transitionTime) { - this.transitionTime = transitionTime; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(hue, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(direction, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(transitionTime, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - hue = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - direction = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - transitionTime = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(113); - builder.append("EnhancedMoveToHueCommand ["); - builder.append(super.toString()); - builder.append(", hue="); - builder.append(hue); - builder.append(", direction="); - builder.append(direction); - builder.append(", transitionTime="); - builder.append(transitionTime); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/EnhancedStepHueCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/EnhancedStepHueCommand.java deleted file mode 100644 index cd90cffcf..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/EnhancedStepHueCommand.java +++ /dev/null @@ -1,136 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.colorcontrol; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Enhanced Step Hue Command value object class. - *

    - * Cluster: Color Control. Command is sent TO the server. - * This command is a specific command used for the Color Control cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class EnhancedStepHueCommand extends ZclCommand { - /** - * Step Mode command message field. - */ - private Integer stepMode; - - /** - * Step Size command message field. - */ - private Integer stepSize; - - /** - * Transition time command message field. - */ - private Integer transitionTime; - - /** - * Default constructor. - */ - public EnhancedStepHueCommand() { - genericCommand = false; - clusterId = 768; - commandId = 65; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Step Mode. - * - * @return the Step Mode - */ - public Integer getStepMode() { - return stepMode; - } - - /** - * Sets Step Mode. - * - * @param stepMode the Step Mode - */ - public void setStepMode(final Integer stepMode) { - this.stepMode = stepMode; - } - - /** - * Gets Step Size. - * - * @return the Step Size - */ - public Integer getStepSize() { - return stepSize; - } - - /** - * Sets Step Size. - * - * @param stepSize the Step Size - */ - public void setStepSize(final Integer stepSize) { - this.stepSize = stepSize; - } - - /** - * Gets Transition time. - * - * @return the Transition time - */ - public Integer getTransitionTime() { - return transitionTime; - } - - /** - * Sets Transition time. - * - * @param transitionTime the Transition time - */ - public void setTransitionTime(final Integer transitionTime) { - this.transitionTime = transitionTime; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(stepMode, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(stepSize, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(transitionTime, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - stepMode = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - stepSize = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - transitionTime = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(115); - builder.append("EnhancedStepHueCommand ["); - builder.append(super.toString()); - builder.append(", stepMode="); - builder.append(stepMode); - builder.append(", stepSize="); - builder.append(stepSize); - builder.append(", transitionTime="); - builder.append(transitionTime); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/MoveColorCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/MoveColorCommand.java deleted file mode 100644 index d711b2d62..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/MoveColorCommand.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.colorcontrol; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Move Color Command value object class. - *

    - * Cluster: Color Control. Command is sent TO the server. - * This command is a specific command used for the Color Control cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class MoveColorCommand extends ZclCommand { - /** - * RateX command message field. - */ - private Integer rateX; - - /** - * RateY command message field. - */ - private Integer rateY; - - /** - * Default constructor. - */ - public MoveColorCommand() { - genericCommand = false; - clusterId = 768; - commandId = 8; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets RateX. - * - * @return the RateX - */ - public Integer getRateX() { - return rateX; - } - - /** - * Sets RateX. - * - * @param rateX the RateX - */ - public void setRateX(final Integer rateX) { - this.rateX = rateX; - } - - /** - * Gets RateY. - * - * @return the RateY - */ - public Integer getRateY() { - return rateY; - } - - /** - * Sets RateY. - * - * @param rateY the RateY - */ - public void setRateY(final Integer rateY) { - this.rateY = rateY; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(rateX, ZclDataType.SIGNED_16_BIT_INTEGER); - serializer.serialize(rateY, ZclDataType.SIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - rateX = (Integer) deserializer.deserialize(ZclDataType.SIGNED_16_BIT_INTEGER); - rateY = (Integer) deserializer.deserialize(ZclDataType.SIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(69); - builder.append("MoveColorCommand ["); - builder.append(super.toString()); - builder.append(", rateX="); - builder.append(rateX); - builder.append(", rateY="); - builder.append(rateY); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/MoveHueCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/MoveHueCommand.java deleted file mode 100644 index 36e1bb101..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/MoveHueCommand.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.colorcontrol; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Move Hue Command value object class. - *

    - * Cluster: Color Control. Command is sent TO the server. - * This command is a specific command used for the Color Control cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class MoveHueCommand extends ZclCommand { - /** - * Move mode command message field. - */ - private Integer moveMode; - - /** - * Rate command message field. - */ - private Integer rate; - - /** - * Default constructor. - */ - public MoveHueCommand() { - genericCommand = false; - clusterId = 768; - commandId = 1; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Move mode. - * - * @return the Move mode - */ - public Integer getMoveMode() { - return moveMode; - } - - /** - * Sets Move mode. - * - * @param moveMode the Move mode - */ - public void setMoveMode(final Integer moveMode) { - this.moveMode = moveMode; - } - - /** - * Gets Rate. - * - * @return the Rate - */ - public Integer getRate() { - return rate; - } - - /** - * Sets Rate. - * - * @param rate the Rate - */ - public void setRate(final Integer rate) { - this.rate = rate; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(moveMode, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(rate, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - moveMode = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - rate = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(69); - builder.append("MoveHueCommand ["); - builder.append(super.toString()); - builder.append(", moveMode="); - builder.append(moveMode); - builder.append(", rate="); - builder.append(rate); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/MoveSaturationCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/MoveSaturationCommand.java deleted file mode 100644 index 6de391145..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/MoveSaturationCommand.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.colorcontrol; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Move Saturation Command value object class. - *

    - * Cluster: Color Control. Command is sent TO the server. - * This command is a specific command used for the Color Control cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class MoveSaturationCommand extends ZclCommand { - /** - * Move mode command message field. - */ - private Integer moveMode; - - /** - * Rate command message field. - */ - private Integer rate; - - /** - * Default constructor. - */ - public MoveSaturationCommand() { - genericCommand = false; - clusterId = 768; - commandId = 4; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Move mode. - * - * @return the Move mode - */ - public Integer getMoveMode() { - return moveMode; - } - - /** - * Sets Move mode. - * - * @param moveMode the Move mode - */ - public void setMoveMode(final Integer moveMode) { - this.moveMode = moveMode; - } - - /** - * Gets Rate. - * - * @return the Rate - */ - public Integer getRate() { - return rate; - } - - /** - * Sets Rate. - * - * @param rate the Rate - */ - public void setRate(final Integer rate) { - this.rate = rate; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(moveMode, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(rate, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - moveMode = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - rate = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(76); - builder.append("MoveSaturationCommand ["); - builder.append(super.toString()); - builder.append(", moveMode="); - builder.append(moveMode); - builder.append(", rate="); - builder.append(rate); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/MoveToColorCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/MoveToColorCommand.java deleted file mode 100644 index 0d1cfa707..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/MoveToColorCommand.java +++ /dev/null @@ -1,136 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.colorcontrol; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Move to Color Command value object class. - *

    - * Cluster: Color Control. Command is sent TO the server. - * This command is a specific command used for the Color Control cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class MoveToColorCommand extends ZclCommand { - /** - * ColorX command message field. - */ - private Integer colorX; - - /** - * ColorY command message field. - */ - private Integer colorY; - - /** - * Transition time command message field. - */ - private Integer transitionTime; - - /** - * Default constructor. - */ - public MoveToColorCommand() { - genericCommand = false; - clusterId = 768; - commandId = 7; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets ColorX. - * - * @return the ColorX - */ - public Integer getColorX() { - return colorX; - } - - /** - * Sets ColorX. - * - * @param colorX the ColorX - */ - public void setColorX(final Integer colorX) { - this.colorX = colorX; - } - - /** - * Gets ColorY. - * - * @return the ColorY - */ - public Integer getColorY() { - return colorY; - } - - /** - * Sets ColorY. - * - * @param colorY the ColorY - */ - public void setColorY(final Integer colorY) { - this.colorY = colorY; - } - - /** - * Gets Transition time. - * - * @return the Transition time - */ - public Integer getTransitionTime() { - return transitionTime; - } - - /** - * Sets Transition time. - * - * @param transitionTime the Transition time - */ - public void setTransitionTime(final Integer transitionTime) { - this.transitionTime = transitionTime; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(colorX, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(colorY, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(transitionTime, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - colorX = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - colorY = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - transitionTime = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(107); - builder.append("MoveToColorCommand ["); - builder.append(super.toString()); - builder.append(", colorX="); - builder.append(colorX); - builder.append(", colorY="); - builder.append(colorY); - builder.append(", transitionTime="); - builder.append(transitionTime); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/MoveToColorTemperatureCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/MoveToColorTemperatureCommand.java deleted file mode 100644 index 0c3733abd..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/MoveToColorTemperatureCommand.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.colorcontrol; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Move to Color Temperature Command value object class. - *

    - * Cluster: Color Control. Command is sent TO the server. - * This command is a specific command used for the Color Control cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class MoveToColorTemperatureCommand extends ZclCommand { - /** - * Color Temperature command message field. - */ - private Integer colorTemperature; - - /** - * Transition time command message field. - */ - private Integer transitionTime; - - /** - * Default constructor. - */ - public MoveToColorTemperatureCommand() { - genericCommand = false; - clusterId = 768; - commandId = 10; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Color Temperature. - * - * @return the Color Temperature - */ - public Integer getColorTemperature() { - return colorTemperature; - } - - /** - * Sets Color Temperature. - * - * @param colorTemperature the Color Temperature - */ - public void setColorTemperature(final Integer colorTemperature) { - this.colorTemperature = colorTemperature; - } - - /** - * Gets Transition time. - * - * @return the Transition time - */ - public Integer getTransitionTime() { - return transitionTime; - } - - /** - * Sets Transition time. - * - * @param transitionTime the Transition time - */ - public void setTransitionTime(final Integer transitionTime) { - this.transitionTime = transitionTime; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(colorTemperature, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(transitionTime, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - colorTemperature = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - transitionTime = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(102); - builder.append("MoveToColorTemperatureCommand ["); - builder.append(super.toString()); - builder.append(", colorTemperature="); - builder.append(colorTemperature); - builder.append(", transitionTime="); - builder.append(transitionTime); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/MoveToHueAndSaturationCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/MoveToHueAndSaturationCommand.java deleted file mode 100644 index 457e9722b..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/MoveToHueAndSaturationCommand.java +++ /dev/null @@ -1,136 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.colorcontrol; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Move to Hue and Saturation Command value object class. - *

    - * Cluster: Color Control. Command is sent TO the server. - * This command is a specific command used for the Color Control cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class MoveToHueAndSaturationCommand extends ZclCommand { - /** - * Hue command message field. - */ - private Integer hue; - - /** - * Saturation command message field. - */ - private Integer saturation; - - /** - * Transition time command message field. - */ - private Integer transitionTime; - - /** - * Default constructor. - */ - public MoveToHueAndSaturationCommand() { - genericCommand = false; - clusterId = 768; - commandId = 6; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Hue. - * - * @return the Hue - */ - public Integer getHue() { - return hue; - } - - /** - * Sets Hue. - * - * @param hue the Hue - */ - public void setHue(final Integer hue) { - this.hue = hue; - } - - /** - * Gets Saturation. - * - * @return the Saturation - */ - public Integer getSaturation() { - return saturation; - } - - /** - * Sets Saturation. - * - * @param saturation the Saturation - */ - public void setSaturation(final Integer saturation) { - this.saturation = saturation; - } - - /** - * Gets Transition time. - * - * @return the Transition time - */ - public Integer getTransitionTime() { - return transitionTime; - } - - /** - * Sets Transition time. - * - * @param transitionTime the Transition time - */ - public void setTransitionTime(final Integer transitionTime) { - this.transitionTime = transitionTime; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(hue, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(saturation, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(transitionTime, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - hue = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - saturation = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - transitionTime = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(119); - builder.append("MoveToHueAndSaturationCommand ["); - builder.append(super.toString()); - builder.append(", hue="); - builder.append(hue); - builder.append(", saturation="); - builder.append(saturation); - builder.append(", transitionTime="); - builder.append(transitionTime); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/MoveToHueCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/MoveToHueCommand.java deleted file mode 100644 index dba670fa2..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/MoveToHueCommand.java +++ /dev/null @@ -1,136 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.colorcontrol; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Move to Hue Command value object class. - *

    - * Cluster: Color Control. Command is sent TO the server. - * This command is a specific command used for the Color Control cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class MoveToHueCommand extends ZclCommand { - /** - * Hue command message field. - */ - private Integer hue; - - /** - * Direction command message field. - */ - private Integer direction; - - /** - * Transition time command message field. - */ - private Integer transitionTime; - - /** - * Default constructor. - */ - public MoveToHueCommand() { - genericCommand = false; - clusterId = 768; - commandId = 0; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Hue. - * - * @return the Hue - */ - public Integer getHue() { - return hue; - } - - /** - * Sets Hue. - * - * @param hue the Hue - */ - public void setHue(final Integer hue) { - this.hue = hue; - } - - /** - * Gets Direction. - * - * @return the Direction - */ - public Integer getDirection() { - return direction; - } - - /** - * Sets Direction. - * - * @param direction the Direction - */ - public void setDirection(final Integer direction) { - this.direction = direction; - } - - /** - * Gets Transition time. - * - * @return the Transition time - */ - public Integer getTransitionTime() { - return transitionTime; - } - - /** - * Sets Transition time. - * - * @param transitionTime the Transition time - */ - public void setTransitionTime(final Integer transitionTime) { - this.transitionTime = transitionTime; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(hue, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(direction, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(transitionTime, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - hue = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - direction = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - transitionTime = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(105); - builder.append("MoveToHueCommand ["); - builder.append(super.toString()); - builder.append(", hue="); - builder.append(hue); - builder.append(", direction="); - builder.append(direction); - builder.append(", transitionTime="); - builder.append(transitionTime); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/MoveToSaturationCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/MoveToSaturationCommand.java deleted file mode 100644 index 5b53707ce..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/MoveToSaturationCommand.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.colorcontrol; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Move to Saturation Command value object class. - *

    - * Cluster: Color Control. Command is sent TO the server. - * This command is a specific command used for the Color Control cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class MoveToSaturationCommand extends ZclCommand { - /** - * Saturation command message field. - */ - private Integer saturation; - - /** - * Transition time command message field. - */ - private Integer transitionTime; - - /** - * Default constructor. - */ - public MoveToSaturationCommand() { - genericCommand = false; - clusterId = 768; - commandId = 3; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Saturation. - * - * @return the Saturation - */ - public Integer getSaturation() { - return saturation; - } - - /** - * Sets Saturation. - * - * @param saturation the Saturation - */ - public void setSaturation(final Integer saturation) { - this.saturation = saturation; - } - - /** - * Gets Transition time. - * - * @return the Transition time - */ - public Integer getTransitionTime() { - return transitionTime; - } - - /** - * Sets Transition time. - * - * @param transitionTime the Transition time - */ - public void setTransitionTime(final Integer transitionTime) { - this.transitionTime = transitionTime; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(saturation, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(transitionTime, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - saturation = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - transitionTime = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(90); - builder.append("MoveToSaturationCommand ["); - builder.append(super.toString()); - builder.append(", saturation="); - builder.append(saturation); - builder.append(", transitionTime="); - builder.append(transitionTime); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/StepColorCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/StepColorCommand.java deleted file mode 100644 index 23f954b56..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/StepColorCommand.java +++ /dev/null @@ -1,136 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.colorcontrol; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Step Color Command value object class. - *

    - * Cluster: Color Control. Command is sent TO the server. - * This command is a specific command used for the Color Control cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class StepColorCommand extends ZclCommand { - /** - * StepX command message field. - */ - private Integer stepX; - - /** - * StepY command message field. - */ - private Integer stepY; - - /** - * Transition time command message field. - */ - private Integer transitionTime; - - /** - * Default constructor. - */ - public StepColorCommand() { - genericCommand = false; - clusterId = 768; - commandId = 9; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets StepX. - * - * @return the StepX - */ - public Integer getStepX() { - return stepX; - } - - /** - * Sets StepX. - * - * @param stepX the StepX - */ - public void setStepX(final Integer stepX) { - this.stepX = stepX; - } - - /** - * Gets StepY. - * - * @return the StepY - */ - public Integer getStepY() { - return stepY; - } - - /** - * Sets StepY. - * - * @param stepY the StepY - */ - public void setStepY(final Integer stepY) { - this.stepY = stepY; - } - - /** - * Gets Transition time. - * - * @return the Transition time - */ - public Integer getTransitionTime() { - return transitionTime; - } - - /** - * Sets Transition time. - * - * @param transitionTime the Transition time - */ - public void setTransitionTime(final Integer transitionTime) { - this.transitionTime = transitionTime; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(stepX, ZclDataType.SIGNED_16_BIT_INTEGER); - serializer.serialize(stepY, ZclDataType.SIGNED_16_BIT_INTEGER); - serializer.serialize(transitionTime, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - stepX = (Integer) deserializer.deserialize(ZclDataType.SIGNED_16_BIT_INTEGER); - stepY = (Integer) deserializer.deserialize(ZclDataType.SIGNED_16_BIT_INTEGER); - transitionTime = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(103); - builder.append("StepColorCommand ["); - builder.append(super.toString()); - builder.append(", stepX="); - builder.append(stepX); - builder.append(", stepY="); - builder.append(stepY); - builder.append(", transitionTime="); - builder.append(transitionTime); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/StepHueCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/StepHueCommand.java deleted file mode 100644 index c9e2c2fd0..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/StepHueCommand.java +++ /dev/null @@ -1,136 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.colorcontrol; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Step Hue Command value object class. - *

    - * Cluster: Color Control. Command is sent TO the server. - * This command is a specific command used for the Color Control cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class StepHueCommand extends ZclCommand { - /** - * Step mode command message field. - */ - private Integer stepMode; - - /** - * Step size command message field. - */ - private Integer stepSize; - - /** - * Transition time command message field. - */ - private Integer transitionTime; - - /** - * Default constructor. - */ - public StepHueCommand() { - genericCommand = false; - clusterId = 768; - commandId = 2; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Step mode. - * - * @return the Step mode - */ - public Integer getStepMode() { - return stepMode; - } - - /** - * Sets Step mode. - * - * @param stepMode the Step mode - */ - public void setStepMode(final Integer stepMode) { - this.stepMode = stepMode; - } - - /** - * Gets Step size. - * - * @return the Step size - */ - public Integer getStepSize() { - return stepSize; - } - - /** - * Sets Step size. - * - * @param stepSize the Step size - */ - public void setStepSize(final Integer stepSize) { - this.stepSize = stepSize; - } - - /** - * Gets Transition time. - * - * @return the Transition time - */ - public Integer getTransitionTime() { - return transitionTime; - } - - /** - * Sets Transition time. - * - * @param transitionTime the Transition time - */ - public void setTransitionTime(final Integer transitionTime) { - this.transitionTime = transitionTime; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(stepMode, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(stepSize, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(transitionTime, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - stepMode = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - stepSize = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - transitionTime = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(107); - builder.append("StepHueCommand ["); - builder.append(super.toString()); - builder.append(", stepMode="); - builder.append(stepMode); - builder.append(", stepSize="); - builder.append(stepSize); - builder.append(", transitionTime="); - builder.append(transitionTime); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/StepSaturationCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/StepSaturationCommand.java deleted file mode 100644 index 7814aac10..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/colorcontrol/StepSaturationCommand.java +++ /dev/null @@ -1,136 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.colorcontrol; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Step Saturation Command value object class. - *

    - * Cluster: Color Control. Command is sent TO the server. - * This command is a specific command used for the Color Control cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class StepSaturationCommand extends ZclCommand { - /** - * Step mode command message field. - */ - private Integer stepMode; - - /** - * Step size command message field. - */ - private Integer stepSize; - - /** - * Transition time command message field. - */ - private Integer transitionTime; - - /** - * Default constructor. - */ - public StepSaturationCommand() { - genericCommand = false; - clusterId = 768; - commandId = 5; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Step mode. - * - * @return the Step mode - */ - public Integer getStepMode() { - return stepMode; - } - - /** - * Sets Step mode. - * - * @param stepMode the Step mode - */ - public void setStepMode(final Integer stepMode) { - this.stepMode = stepMode; - } - - /** - * Gets Step size. - * - * @return the Step size - */ - public Integer getStepSize() { - return stepSize; - } - - /** - * Sets Step size. - * - * @param stepSize the Step size - */ - public void setStepSize(final Integer stepSize) { - this.stepSize = stepSize; - } - - /** - * Gets Transition time. - * - * @return the Transition time - */ - public Integer getTransitionTime() { - return transitionTime; - } - - /** - * Sets Transition time. - * - * @param transitionTime the Transition time - */ - public void setTransitionTime(final Integer transitionTime) { - this.transitionTime = transitionTime; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(stepMode, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(stepSize, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(transitionTime, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - stepMode = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - stepSize = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - transitionTime = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(114); - builder.append("StepSaturationCommand ["); - builder.append(super.toString()); - builder.append(", stepMode="); - builder.append(stepMode); - builder.append(", stepSize="); - builder.append(stepSize); - builder.append(", transitionTime="); - builder.append(transitionTime); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/commissioning/ResetStartupParametersCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/commissioning/ResetStartupParametersCommand.java deleted file mode 100644 index 6d28ec57b..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/commissioning/ResetStartupParametersCommand.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.commissioning; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Reset Startup Parameters Command value object class. - *

    - * Cluster: Commissioning. Command is sent TO the server. - * This command is a specific command used for the Commissioning cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class ResetStartupParametersCommand extends ZclCommand { - /** - * Option command message field. - */ - private Integer option; - - /** - * Index command message field. - */ - private Integer index; - - /** - * Default constructor. - */ - public ResetStartupParametersCommand() { - genericCommand = false; - clusterId = 21; - commandId = 3; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Option. - * - * @return the Option - */ - public Integer getOption() { - return option; - } - - /** - * Sets Option. - * - * @param option the Option - */ - public void setOption(final Integer option) { - this.option = option; - } - - /** - * Gets Index. - * - * @return the Index - */ - public Integer getIndex() { - return index; - } - - /** - * Sets Index. - * - * @param index the Index - */ - public void setIndex(final Integer index) { - this.index = index; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(option, ZclDataType.BITMAP_8_BIT); - serializer.serialize(index, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - option = (Integer) deserializer.deserialize(ZclDataType.BITMAP_8_BIT); - index = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(83); - builder.append("ResetStartupParametersCommand ["); - builder.append(super.toString()); - builder.append(", option="); - builder.append(option); - builder.append(", index="); - builder.append(index); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/commissioning/ResetStartupParametersResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/commissioning/ResetStartupParametersResponse.java deleted file mode 100644 index 06cae061b..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/commissioning/ResetStartupParametersResponse.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.commissioning; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Reset Startup Parameters Response value object class. - *

    - * Cluster: Commissioning. Command is sent FROM the server. - * This command is a specific command used for the Commissioning cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class ResetStartupParametersResponse extends ZclCommand { - /** - * Status command message field. - */ - private Integer status; - - /** - * Default constructor. - */ - public ResetStartupParametersResponse() { - genericCommand = false; - clusterId = 21; - commandId = 3; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Status. - * - * @return the Status - */ - public Integer getStatus() { - return status; - } - - /** - * Sets Status. - * - * @param status the Status - */ - public void setStatus(final Integer status) { - this.status = status; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(status, ZclDataType.ENUMERATION_8_BIT); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - status = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(59); - builder.append("ResetStartupParametersResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/commissioning/RestartDeviceCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/commissioning/RestartDeviceCommand.java deleted file mode 100644 index 5ab6f4e50..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/commissioning/RestartDeviceCommand.java +++ /dev/null @@ -1,136 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.commissioning; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Restart Device Command value object class. - *

    - * Cluster: Commissioning. Command is sent TO the server. - * This command is a specific command used for the Commissioning cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class RestartDeviceCommand extends ZclCommand { - /** - * Option command message field. - */ - private Integer option; - - /** - * Delay command message field. - */ - private Integer delay; - - /** - * Jitter command message field. - */ - private Integer jitter; - - /** - * Default constructor. - */ - public RestartDeviceCommand() { - genericCommand = false; - clusterId = 21; - commandId = 0; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Option. - * - * @return the Option - */ - public Integer getOption() { - return option; - } - - /** - * Sets Option. - * - * @param option the Option - */ - public void setOption(final Integer option) { - this.option = option; - } - - /** - * Gets Delay. - * - * @return the Delay - */ - public Integer getDelay() { - return delay; - } - - /** - * Sets Delay. - * - * @param delay the Delay - */ - public void setDelay(final Integer delay) { - this.delay = delay; - } - - /** - * Gets Jitter. - * - * @return the Jitter - */ - public Integer getJitter() { - return jitter; - } - - /** - * Sets Jitter. - * - * @param jitter the Jitter - */ - public void setJitter(final Integer jitter) { - this.jitter = jitter; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(option, ZclDataType.BITMAP_8_BIT); - serializer.serialize(delay, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(jitter, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - option = (Integer) deserializer.deserialize(ZclDataType.BITMAP_8_BIT); - delay = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - jitter = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(100); - builder.append("RestartDeviceCommand ["); - builder.append(super.toString()); - builder.append(", option="); - builder.append(option); - builder.append(", delay="); - builder.append(delay); - builder.append(", jitter="); - builder.append(jitter); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/commissioning/RestartDeviceResponseResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/commissioning/RestartDeviceResponseResponse.java deleted file mode 100644 index ab6f14ddf..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/commissioning/RestartDeviceResponseResponse.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.commissioning; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Restart Device Response Response value object class. - *

    - * Cluster: Commissioning. Command is sent FROM the server. - * This command is a specific command used for the Commissioning cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class RestartDeviceResponseResponse extends ZclCommand { - /** - * Status command message field. - */ - private Integer status; - - /** - * Default constructor. - */ - public RestartDeviceResponseResponse() { - genericCommand = false; - clusterId = 21; - commandId = 0; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Status. - * - * @return the Status - */ - public Integer getStatus() { - return status; - } - - /** - * Sets Status. - * - * @param status the Status - */ - public void setStatus(final Integer status) { - this.status = status; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(status, ZclDataType.ENUMERATION_8_BIT); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - status = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(58); - builder.append("RestartDeviceResponseResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/commissioning/RestoreStartupParametersCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/commissioning/RestoreStartupParametersCommand.java deleted file mode 100644 index 3c9cde4d8..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/commissioning/RestoreStartupParametersCommand.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.commissioning; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Restore Startup Parameters Command value object class. - *

    - * Cluster: Commissioning. Command is sent TO the server. - * This command is a specific command used for the Commissioning cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class RestoreStartupParametersCommand extends ZclCommand { - /** - * Option command message field. - */ - private Integer option; - - /** - * Index command message field. - */ - private Integer index; - - /** - * Default constructor. - */ - public RestoreStartupParametersCommand() { - genericCommand = false; - clusterId = 21; - commandId = 2; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Option. - * - * @return the Option - */ - public Integer getOption() { - return option; - } - - /** - * Sets Option. - * - * @param option the Option - */ - public void setOption(final Integer option) { - this.option = option; - } - - /** - * Gets Index. - * - * @return the Index - */ - public Integer getIndex() { - return index; - } - - /** - * Sets Index. - * - * @param index the Index - */ - public void setIndex(final Integer index) { - this.index = index; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(option, ZclDataType.BITMAP_8_BIT); - serializer.serialize(index, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - option = (Integer) deserializer.deserialize(ZclDataType.BITMAP_8_BIT); - index = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(85); - builder.append("RestoreStartupParametersCommand ["); - builder.append(super.toString()); - builder.append(", option="); - builder.append(option); - builder.append(", index="); - builder.append(index); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/commissioning/RestoreStartupParametersResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/commissioning/RestoreStartupParametersResponse.java deleted file mode 100644 index 6d6ea37c2..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/commissioning/RestoreStartupParametersResponse.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.commissioning; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Restore Startup Parameters Response value object class. - *

    - * Cluster: Commissioning. Command is sent FROM the server. - * This command is a specific command used for the Commissioning cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class RestoreStartupParametersResponse extends ZclCommand { - /** - * Status command message field. - */ - private Integer status; - - /** - * Default constructor. - */ - public RestoreStartupParametersResponse() { - genericCommand = false; - clusterId = 21; - commandId = 2; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Status. - * - * @return the Status - */ - public Integer getStatus() { - return status; - } - - /** - * Sets Status. - * - * @param status the Status - */ - public void setStatus(final Integer status) { - this.status = status; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(status, ZclDataType.ENUMERATION_8_BIT); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - status = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(61); - builder.append("RestoreStartupParametersResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/commissioning/SaveStartupParametersCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/commissioning/SaveStartupParametersCommand.java deleted file mode 100644 index 1adc50fd8..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/commissioning/SaveStartupParametersCommand.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.commissioning; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Save Startup Parameters Command value object class. - *

    - * Cluster: Commissioning. Command is sent TO the server. - * This command is a specific command used for the Commissioning cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class SaveStartupParametersCommand extends ZclCommand { - /** - * Option command message field. - */ - private Integer option; - - /** - * Index command message field. - */ - private Integer index; - - /** - * Default constructor. - */ - public SaveStartupParametersCommand() { - genericCommand = false; - clusterId = 21; - commandId = 1; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Option. - * - * @return the Option - */ - public Integer getOption() { - return option; - } - - /** - * Sets Option. - * - * @param option the Option - */ - public void setOption(final Integer option) { - this.option = option; - } - - /** - * Gets Index. - * - * @return the Index - */ - public Integer getIndex() { - return index; - } - - /** - * Sets Index. - * - * @param index the Index - */ - public void setIndex(final Integer index) { - this.index = index; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(option, ZclDataType.BITMAP_8_BIT); - serializer.serialize(index, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - option = (Integer) deserializer.deserialize(ZclDataType.BITMAP_8_BIT); - index = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(82); - builder.append("SaveStartupParametersCommand ["); - builder.append(super.toString()); - builder.append(", option="); - builder.append(option); - builder.append(", index="); - builder.append(index); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/commissioning/SaveStartupParametersResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/commissioning/SaveStartupParametersResponse.java deleted file mode 100644 index 6ace5b1ff..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/commissioning/SaveStartupParametersResponse.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.commissioning; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Save Startup Parameters Response value object class. - *

    - * Cluster: Commissioning. Command is sent FROM the server. - * This command is a specific command used for the Commissioning cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class SaveStartupParametersResponse extends ZclCommand { - /** - * Status command message field. - */ - private Integer status; - - /** - * Default constructor. - */ - public SaveStartupParametersResponse() { - genericCommand = false; - clusterId = 21; - commandId = 1; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Status. - * - * @return the Status - */ - public Integer getStatus() { - return status; - } - - /** - * Sets Status. - * - * @param status the Status - */ - public void setStatus(final Integer status) { - this.status = status; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(status, ZclDataType.ENUMERATION_8_BIT); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - status = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(58); - builder.append("SaveStartupParametersResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/doorlock/LockDoorCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/doorlock/LockDoorCommand.java deleted file mode 100644 index 619363f6a..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/doorlock/LockDoorCommand.java +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.doorlock; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; -import com.zsmartsystems.zigbee.zcl.field.ByteArray; - -/** - * Lock Door Command value object class. - *

    - * Cluster: Door Lock. Command is sent TO the server. - * This command is a specific command used for the Door Lock cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:39:59Z") -public class LockDoorCommand extends ZclCommand { - /** - * Pin code command message field. - */ - private ByteArray pinCode; - - /** - * Default constructor. - */ - public LockDoorCommand() { - genericCommand = false; - clusterId = 257; - commandId = 0; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Pin code. - * - * @return the Pin code - */ - public ByteArray getPinCode() { - return pinCode; - } - - /** - * Sets Pin code. - * - * @param pinCode the Pin code - */ - public void setPinCode(final ByteArray pinCode) { - this.pinCode = pinCode; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(pinCode, ZclDataType.OCTET_STRING); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - pinCode = (ByteArray) deserializer.deserialize(ZclDataType.OCTET_STRING); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(45); - builder.append("LockDoorCommand ["); - builder.append(super.toString()); - builder.append(", pinCode="); - builder.append(pinCode); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/doorlock/LockDoorResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/doorlock/LockDoorResponse.java deleted file mode 100644 index 8e0340cbd..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/doorlock/LockDoorResponse.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.doorlock; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Lock Door Response value object class. - *

    - * Cluster: Door Lock. Command is sent FROM the server. - * This command is a specific command used for the Door Lock cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:39:59Z") -public class LockDoorResponse extends ZclCommand { - /** - * Status command message field. - */ - private Integer status; - - /** - * Default constructor. - */ - public LockDoorResponse() { - genericCommand = false; - clusterId = 257; - commandId = 0; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Status. - * - * @return the Status - */ - public Integer getStatus() { - return status; - } - - /** - * Sets Status. - * - * @param status the Status - */ - public void setStatus(final Integer status) { - this.status = status; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(status, ZclDataType.ENUMERATION_8_BIT); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - status = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(45); - builder.append("LockDoorResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/doorlock/Toggle.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/doorlock/Toggle.java deleted file mode 100644 index 030afd4dc..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/doorlock/Toggle.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.doorlock; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; - -/** - * Toggle value object class. - *

    - * Cluster: Door Lock. Command is sent TO the server. - * This command is a specific command used for the Door Lock cluster. - *

    - * Request the status of the lock. As of HA 1.2, this command includes an optional code for the - * lock. The door lock MAY require a code depending on the value of the [Require PIN for RF - * Operation attribute] - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-08-13T17:13:06Z") -public class Toggle extends ZclCommand { - /** - * PIN command message field. - */ - private String pin; - - /** - * Default constructor. - */ - public Toggle() { - genericCommand = false; - clusterId = 0x0101; - commandId = 2; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets PIN. - * - * @return the PIN - */ - public String getPin() { - return pin; - } - - /** - * Sets PIN. - * - * @param pin the PIN - */ - public void setPin(final String pin) { - this.pin = pin; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(pin, ZclDataType.CHARACTER_STRING); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - pin = (String) deserializer.deserialize(ZclDataType.CHARACTER_STRING); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(32); - builder.append("Toggle ["); - builder.append(super.toString()); - builder.append(", pin="); - builder.append(pin); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/doorlock/ToggleResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/doorlock/ToggleResponse.java deleted file mode 100644 index 14b3c51e2..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/doorlock/ToggleResponse.java +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.doorlock; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; - -/** - * Toggle Response value object class. - *

    - * Cluster: Door Lock. Command is sent FROM the server. - * This command is a specific command used for the Door Lock cluster. - *

    - * This command is sent in response to a Toggle command with one status byte payload. The Status - * field SHALL be set to SUCCESS or FAILURE. - *

    - * The status byte only indicates if the message has received successfully. To determine the - * lock and/or door status, the client SHOULD query to [Lock State attribute] and [Door State - * attribute]. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-08-13T17:13:06Z") -public class ToggleResponse extends ZclCommand { - /** - * Status command message field. - */ - private Integer status; - - /** - * Default constructor. - */ - public ToggleResponse() { - genericCommand = false; - clusterId = 0x0101; - commandId = 2; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Status. - * - * @return the Status - */ - public Integer getStatus() { - return status; - } - - /** - * Sets Status. - * - * @param status the Status - */ - public void setStatus(final Integer status) { - this.status = status; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(status, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - status = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(43); - builder.append("ToggleResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/doorlock/UnlockDoorCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/doorlock/UnlockDoorCommand.java deleted file mode 100644 index 6797894db..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/doorlock/UnlockDoorCommand.java +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.doorlock; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; -import com.zsmartsystems.zigbee.zcl.field.ByteArray; - -/** - * Unlock Door Command value object class. - *

    - * Cluster: Door Lock. Command is sent TO the server. - * This command is a specific command used for the Door Lock cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:39:59Z") -public class UnlockDoorCommand extends ZclCommand { - /** - * Pin code command message field. - */ - private ByteArray pinCode; - - /** - * Default constructor. - */ - public UnlockDoorCommand() { - genericCommand = false; - clusterId = 257; - commandId = 1; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Pin code. - * - * @return the Pin code - */ - public ByteArray getPinCode() { - return pinCode; - } - - /** - * Sets Pin code. - * - * @param pinCode the Pin code - */ - public void setPinCode(final ByteArray pinCode) { - this.pinCode = pinCode; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(pinCode, ZclDataType.OCTET_STRING); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - pinCode = (ByteArray) deserializer.deserialize(ZclDataType.OCTET_STRING); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(47); - builder.append("UnlockDoorCommand ["); - builder.append(super.toString()); - builder.append(", pinCode="); - builder.append(pinCode); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/doorlock/UnlockDoorResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/doorlock/UnlockDoorResponse.java deleted file mode 100644 index d492a11c0..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/doorlock/UnlockDoorResponse.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.doorlock; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Unlock Door Response value object class. - *

    - * Cluster: Door Lock. Command is sent FROM the server. - * This command is a specific command used for the Door Lock cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:39:59Z") -public class UnlockDoorResponse extends ZclCommand { - /** - * Status command message field. - */ - private Integer status; - - /** - * Default constructor. - */ - public UnlockDoorResponse() { - genericCommand = false; - clusterId = 257; - commandId = 1; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Status. - * - * @return the Status - */ - public Integer getStatus() { - return status; - } - - /** - * Sets Status. - * - * @param status the Status - */ - public void setStatus(final Integer status) { - this.status = status; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(status, ZclDataType.ENUMERATION_8_BIT); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - status = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(47); - builder.append("UnlockDoorResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/doorlock/UnlockWithTimeout.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/doorlock/UnlockWithTimeout.java deleted file mode 100644 index 97ae30bfa..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/doorlock/UnlockWithTimeout.java +++ /dev/null @@ -1,116 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.doorlock; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; - -/** - * Unlock With Timeout value object class. - *

    - * Cluster: Door Lock. Command is sent TO the server. - * This command is a specific command used for the Door Lock cluster. - *

    - * This command causes the lock device to unlock the door with a timeout parameter. After the - * time in seconds specified in the timeout field, the lock device will relock itself - * automatically. This timeout parameter is only temporary for this message transition only - * and overrides the default relock time as specified in the [Auto Relock Time attribute] - * attribute. If the door lock device is not capable of or does not want to support temporary - * Relock Timeout, it SHOULD not support this optional command. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-08-13T17:13:06Z") -public class UnlockWithTimeout extends ZclCommand { - /** - * Timeout In Seconds command message field. - */ - private Integer timeoutInSeconds; - - /** - * PIN command message field. - */ - private String pin; - - /** - * Default constructor. - */ - public UnlockWithTimeout() { - genericCommand = false; - clusterId = 0x0101; - commandId = 3; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Timeout In Seconds. - * - * @return the Timeout In Seconds - */ - public Integer getTimeoutInSeconds() { - return timeoutInSeconds; - } - - /** - * Sets Timeout In Seconds. - * - * @param timeoutInSeconds the Timeout In Seconds - */ - public void setTimeoutInSeconds(final Integer timeoutInSeconds) { - this.timeoutInSeconds = timeoutInSeconds; - } - - /** - * Gets PIN. - * - * @return the PIN - */ - public String getPin() { - return pin; - } - - /** - * Sets PIN. - * - * @param pin the PIN - */ - public void setPin(final String pin) { - this.pin = pin; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(timeoutInSeconds, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(pin, ZclDataType.CHARACTER_STRING); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - timeoutInSeconds = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - pin = (String) deserializer.deserialize(ZclDataType.CHARACTER_STRING); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(79); - builder.append("UnlockWithTimeout ["); - builder.append(super.toString()); - builder.append(", timeoutInSeconds="); - builder.append(timeoutInSeconds); - builder.append(", pin="); - builder.append(pin); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/doorlock/UnlockWithTimeoutResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/doorlock/UnlockWithTimeoutResponse.java deleted file mode 100644 index 8d9c1725b..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/doorlock/UnlockWithTimeoutResponse.java +++ /dev/null @@ -1,88 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.doorlock; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; - -/** - * Unlock With Timeout Response value object class. - *

    - * Cluster: Door Lock. Command is sent FROM the server. - * This command is a specific command used for the Door Lock cluster. - *

    - * This command is sent in response to an Unlock with Timeout command with one status byte - * payload. The Status field SHALL be set to SUCCESS or FAILURE. - *

    - * The status byte only indicates if the message has received successfully. To determine - * status, the client SHOULD query to [Lock State attribute] and [Door State attribute]. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-08-13T17:13:06Z") -public class UnlockWithTimeoutResponse extends ZclCommand { - /** - * Status command message field. - */ - private Integer status; - - /** - * Default constructor. - */ - public UnlockWithTimeoutResponse() { - genericCommand = false; - clusterId = 0x0101; - commandId = 3; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Status. - * - * @return the Status - */ - public Integer getStatus() { - return status; - } - - /** - * Sets Status. - * - * @param status the Status - */ - public void setStatus(final Integer status) { - this.status = status; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(status, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - status = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(54); - builder.append("UnlockWithTimeoutResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/electricalmeasurement/MeasurementTypeEnum.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/electricalmeasurement/MeasurementTypeEnum.java deleted file mode 100644 index 89a78bb7d..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/electricalmeasurement/MeasurementTypeEnum.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.electricalmeasurement; - -import java.util.HashMap; -import java.util.Map; - -import javax.annotation.Generated; - -/** - * Enumeration of Electrical Measurement attribute MeasurementType options. - *

    - * Code is auto-generated. Modifications may be overwritten! - * - * @author Chris Jackson - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-31T12:00:43Z") -public enum MeasurementTypeEnum { - AC_ACTIVE_MEASUREMENT(0x0000), - AC_REACTIVE_MEASUREMENT(0x0001), - AC_APPARENT_MEASUREMENT(0x0002), - PHASE_A_MEASUREMENT(0x0004), - PHASE_B_MEASUREMENT(0x0008), - PHASE_C_MEASUREMENT(0x0010), - DC_MEASUREMENT(0x0020), - HARMONICS_MEASUREMENT(0x0040), - POWER_QUALITY_MEASUREMENT(0x0080); - - /** - * A mapping between the integer code and its corresponding MeasurementTypeEnum type to facilitate lookup by value. - */ - private static Map idMap; - - static { - idMap = new HashMap(); - for (MeasurementTypeEnum enumValue : values()) { - idMap.put(enumValue.key, enumValue); - } - } - - private final int key; - - MeasurementTypeEnum(final int key) { - this.key = key; - } - - public int getKey() { - return key; - } - - public static MeasurementTypeEnum getByValue(final int value) { - return idMap.get(value); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/ConfigureReportingCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/ConfigureReportingCommand.java deleted file mode 100644 index 6ea5dacdb..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/ConfigureReportingCommand.java +++ /dev/null @@ -1,104 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.general; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -import java.util.List; -import com.zsmartsystems.zigbee.zcl.field.AttributeReportingConfigurationRecord; - -/** - * Configure Reporting Command value object class. - *

    - * Cluster: General. Command is sent TO the server. - * This command is a generic command used across the profile. - *

    - * The Configure Reporting command is used to configure the reporting mechanism - * for one or more of the attributes of a cluster. - *
    - * The individual cluster definitions specify which attributes shall be available to this - * reporting mechanism, however specific implementations of a cluster may make - * additional attributes available. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class ConfigureReportingCommand extends ZclCommand { - /** - * Records command message field. - */ - private List records; - - /** - * Default constructor. - */ - public ConfigureReportingCommand() { - genericCommand = true; - commandId = 6; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Sets the cluster ID for generic commands. {@link ConfigureReportingCommand} is a generic command. - *

    - * For commands that are not generic, this method will do nothing as the cluster ID is fixed. - * To test if a command is generic, use the {@link #isGenericCommand} method. - * - * @param clusterId the cluster ID used for generic commands as an {@link Integer} - */ - @Override - public void setClusterId(Integer clusterId) { - this.clusterId = clusterId; - } - - /** - * Gets Records. - * - * @return the Records - */ - public List getRecords() { - return records; - } - - /** - * Sets Records. - * - * @param records the Records - */ - public void setRecords(final List records) { - this.records = records; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(records, ZclDataType.N_X_ATTRIBUTE_REPORTING_CONFIGURATION_RECORD); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - records = (List) deserializer.deserialize(ZclDataType.N_X_ATTRIBUTE_REPORTING_CONFIGURATION_RECORD); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(55); - builder.append("ConfigureReportingCommand ["); - builder.append(super.toString()); - builder.append(", records="); - builder.append(records); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/ConfigureReportingResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/ConfigureReportingResponse.java deleted file mode 100644 index 623c9bef7..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/ConfigureReportingResponse.java +++ /dev/null @@ -1,164 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.general; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -import java.util.List; -import com.zsmartsystems.zigbee.zcl.ZclStatus; -import com.zsmartsystems.zigbee.zcl.field.AttributeStatusRecord; - -/** - * Configure Reporting Response value object class. - *

    - * Cluster: General. Command is sent TO the server. - * This command is a generic command used across the profile. - *

    - * The Configure Reporting Response command is generated in response to a - * Configure Reporting command. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class ConfigureReportingResponse extends ZclCommand { - /** - * Status command message field. - *

    - * Status is only provided if the command was successful, and the - * attribute status records are not included for successfully - * written attributes, in order to save bandwidth. - */ - private ZclStatus status; - - /** - * Records command message field. - *

    - * Note that attribute status records are not included for successfully - * configured attributes in order to save bandwidth. In the case of successful - * configuration of all attributes, only a single attribute status record SHALL - * be included in the command, with the status field set to SUCCESS and the direction and - * attribute identifier fields omitted. - */ - private List records; - - /** - * Default constructor. - */ - public ConfigureReportingResponse() { - genericCommand = true; - commandId = 7; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Sets the cluster ID for generic commands. {@link ConfigureReportingResponse} is a generic command. - *

    - * For commands that are not generic, this method will do nothing as the cluster ID is fixed. - * To test if a command is generic, use the {@link #isGenericCommand} method. - * - * @param clusterId the cluster ID used for generic commands as an {@link Integer} - */ - @Override - public void setClusterId(Integer clusterId) { - this.clusterId = clusterId; - } - - /** - * Gets Status. - * - * Status is only provided if the command was successful, and the - * attribute status records are not included for successfully - * written attributes, in order to save bandwidth. - * - * @return the Status - */ - public ZclStatus getStatus() { - return status; - } - - /** - * Sets Status. - * - * Status is only provided if the command was successful, and the - * attribute status records are not included for successfully - * written attributes, in order to save bandwidth. - * - * @param status the Status - */ - public void setStatus(final ZclStatus status) { - this.status = status; - } - - /** - * Gets Records. - * - * Note that attribute status records are not included for successfully - * configured attributes in order to save bandwidth. In the case of successful - * configuration of all attributes, only a single attribute status record SHALL - * be included in the command, with the status field set to SUCCESS and the direction and - * attribute identifier fields omitted. - * - * @return the Records - */ - public List getRecords() { - return records; - } - - /** - * Sets Records. - * - * Note that attribute status records are not included for successfully - * configured attributes in order to save bandwidth. In the case of successful - * configuration of all attributes, only a single attribute status record SHALL - * be included in the command, with the status field set to SUCCESS and the direction and - * attribute identifier fields omitted. - * - * @param records the Records - */ - public void setRecords(final List records) { - this.records = records; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - if (status == ZclStatus.SUCCESS) { - serializer.serialize(status, ZclDataType.ZCL_STATUS); - return; - } - serializer.serialize(records, ZclDataType.N_X_ATTRIBUTE_STATUS_RECORD); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - if (deserializer.getRemainingLength() == 1) { - status = (ZclStatus) deserializer.deserialize(ZclDataType.ZCL_STATUS); - return; - } - records = (List) deserializer.deserialize(ZclDataType.N_X_ATTRIBUTE_STATUS_RECORD); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(82); - builder.append("ConfigureReportingResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(", records="); - builder.append(records); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/DefaultResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/DefaultResponse.java deleted file mode 100644 index 9797d9364..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/DefaultResponse.java +++ /dev/null @@ -1,127 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.general; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; -import com.zsmartsystems.zigbee.zcl.ZclStatus; - -/** - * Default Response value object class. - *

    - * Cluster: General. Command is sent TO the server. - * This command is a generic command used across the profile. - *

    - * The default response command is generated when a device receives a unicast - * command, there is no other relevant response specified for the command, and - * either an error results or the Disable default response bit of its Frame control field - * is set to 0. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class DefaultResponse extends ZclCommand { - /** - * Command identifier command message field. - */ - private Integer commandIdentifier; - - /** - * Status code command message field. - */ - private ZclStatus statusCode; - - /** - * Default constructor. - */ - public DefaultResponse() { - genericCommand = true; - commandId = 11; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Sets the cluster ID for generic commands. {@link DefaultResponse} is a generic command. - *

    - * For commands that are not generic, this method will do nothing as the cluster ID is fixed. - * To test if a command is generic, use the {@link #isGenericCommand} method. - * - * @param clusterId the cluster ID used for generic commands as an {@link Integer} - */ - @Override - public void setClusterId(Integer clusterId) { - this.clusterId = clusterId; - } - - /** - * Gets Command identifier. - * - * @return the Command identifier - */ - public Integer getCommandIdentifier() { - return commandIdentifier; - } - - /** - * Sets Command identifier. - * - * @param commandIdentifier the Command identifier - */ - public void setCommandIdentifier(final Integer commandIdentifier) { - this.commandIdentifier = commandIdentifier; - } - - /** - * Gets Status code. - * - * @return the Status code - */ - public ZclStatus getStatusCode() { - return statusCode; - } - - /** - * Sets Status code. - * - * @param statusCode the Status code - */ - public void setStatusCode(final ZclStatus statusCode) { - this.statusCode = statusCode; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(commandIdentifier, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(statusCode, ZclDataType.ZCL_STATUS); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - commandIdentifier = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - statusCode = (ZclStatus) deserializer.deserialize(ZclDataType.ZCL_STATUS); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(85); - builder.append("DefaultResponse ["); - builder.append(super.toString()); - builder.append(", commandIdentifier="); - builder.append(commandIdentifier); - builder.append(", statusCode="); - builder.append(statusCode); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/DiscoverAttributesCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/DiscoverAttributesCommand.java deleted file mode 100644 index 2e8b8904e..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/DiscoverAttributesCommand.java +++ /dev/null @@ -1,146 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.general; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Discover Attributes Command value object class. - *

    - * Cluster: General. Command is sent TO the server. - * This command is a generic command used across the profile. - *

    - * The discover attributes command is generated when a remote device wishes to - * discover the identifiers and types of the attributes on a device which are supported - * within the cluster to which this command is directed. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class DiscoverAttributesCommand extends ZclCommand { - /** - * Start attribute identifier command message field. - *

    - * The start attribute identifier field is 16 bits in length and specifies the value - * of the identifier at which to begin the attribute discovery. - */ - private Integer startAttributeIdentifier; - - /** - * Maximum attribute identifiers command message field. - *

    - * The maximum attribute identifiers field is 8 bits in length and specifies the - * maximum number of attribute identifiers that are to be returned in the resulting - * Discover Attributes Response command. - */ - private Integer maximumAttributeIdentifiers; - - /** - * Default constructor. - */ - public DiscoverAttributesCommand() { - genericCommand = true; - commandId = 12; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Sets the cluster ID for generic commands. {@link DiscoverAttributesCommand} is a generic command. - *

    - * For commands that are not generic, this method will do nothing as the cluster ID is fixed. - * To test if a command is generic, use the {@link #isGenericCommand} method. - * - * @param clusterId the cluster ID used for generic commands as an {@link Integer} - */ - @Override - public void setClusterId(Integer clusterId) { - this.clusterId = clusterId; - } - - /** - * Gets Start attribute identifier. - * - * The start attribute identifier field is 16 bits in length and specifies the value - * of the identifier at which to begin the attribute discovery. - * - * @return the Start attribute identifier - */ - public Integer getStartAttributeIdentifier() { - return startAttributeIdentifier; - } - - /** - * Sets Start attribute identifier. - * - * The start attribute identifier field is 16 bits in length and specifies the value - * of the identifier at which to begin the attribute discovery. - * - * @param startAttributeIdentifier the Start attribute identifier - */ - public void setStartAttributeIdentifier(final Integer startAttributeIdentifier) { - this.startAttributeIdentifier = startAttributeIdentifier; - } - - /** - * Gets Maximum attribute identifiers. - * - * The maximum attribute identifiers field is 8 bits in length and specifies the - * maximum number of attribute identifiers that are to be returned in the resulting - * Discover Attributes Response command. - * - * @return the Maximum attribute identifiers - */ - public Integer getMaximumAttributeIdentifiers() { - return maximumAttributeIdentifiers; - } - - /** - * Sets Maximum attribute identifiers. - * - * The maximum attribute identifiers field is 8 bits in length and specifies the - * maximum number of attribute identifiers that are to be returned in the resulting - * Discover Attributes Response command. - * - * @param maximumAttributeIdentifiers the Maximum attribute identifiers - */ - public void setMaximumAttributeIdentifiers(final Integer maximumAttributeIdentifiers) { - this.maximumAttributeIdentifiers = maximumAttributeIdentifiers; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(startAttributeIdentifier, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(maximumAttributeIdentifiers, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - startAttributeIdentifier = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - maximumAttributeIdentifiers = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(119); - builder.append("DiscoverAttributesCommand ["); - builder.append(super.toString()); - builder.append(", startAttributeIdentifier="); - builder.append(startAttributeIdentifier); - builder.append(", maximumAttributeIdentifiers="); - builder.append(maximumAttributeIdentifiers); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/DiscoverAttributesExtended.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/DiscoverAttributesExtended.java deleted file mode 100644 index b98e9119e..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/DiscoverAttributesExtended.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.general; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Discover Attributes Extended value object class. - *

    - * Cluster: General. Command is sent TO the server. - * This command is a generic command used across the profile. - *

    - * The Discover Attributes Extended command is generated when a remote device wishes to discover the - * identifiers and types of the attributes on a device which are supported within the cluster to which this - * command is directed, including whether the attribute is readable, writeable or reportable. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class DiscoverAttributesExtended extends ZclCommand { - /** - * Start attribute identifier command message field. - */ - private Integer startAttributeIdentifier; - - /** - * Maximum attribute identifiers command message field. - */ - private Integer maximumAttributeIdentifiers; - - /** - * Default constructor. - */ - public DiscoverAttributesExtended() { - genericCommand = true; - commandId = 21; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Sets the cluster ID for generic commands. {@link DiscoverAttributesExtended} is a generic command. - *

    - * For commands that are not generic, this method will do nothing as the cluster ID is fixed. - * To test if a command is generic, use the {@link #isGenericCommand} method. - * - * @param clusterId the cluster ID used for generic commands as an {@link Integer} - */ - @Override - public void setClusterId(Integer clusterId) { - this.clusterId = clusterId; - } - - /** - * Gets Start attribute identifier. - * - * @return the Start attribute identifier - */ - public Integer getStartAttributeIdentifier() { - return startAttributeIdentifier; - } - - /** - * Sets Start attribute identifier. - * - * @param startAttributeIdentifier the Start attribute identifier - */ - public void setStartAttributeIdentifier(final Integer startAttributeIdentifier) { - this.startAttributeIdentifier = startAttributeIdentifier; - } - - /** - * Gets Maximum attribute identifiers. - * - * @return the Maximum attribute identifiers - */ - public Integer getMaximumAttributeIdentifiers() { - return maximumAttributeIdentifiers; - } - - /** - * Sets Maximum attribute identifiers. - * - * @param maximumAttributeIdentifiers the Maximum attribute identifiers - */ - public void setMaximumAttributeIdentifiers(final Integer maximumAttributeIdentifiers) { - this.maximumAttributeIdentifiers = maximumAttributeIdentifiers; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(startAttributeIdentifier, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(maximumAttributeIdentifiers, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - startAttributeIdentifier = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - maximumAttributeIdentifiers = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(120); - builder.append("DiscoverAttributesExtended ["); - builder.append(super.toString()); - builder.append(", startAttributeIdentifier="); - builder.append(startAttributeIdentifier); - builder.append(", maximumAttributeIdentifiers="); - builder.append(maximumAttributeIdentifiers); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/DiscoverAttributesExtendedResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/DiscoverAttributesExtendedResponse.java deleted file mode 100644 index b52f796b5..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/DiscoverAttributesExtendedResponse.java +++ /dev/null @@ -1,127 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.general; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -import java.util.List; -import com.zsmartsystems.zigbee.zcl.field.ExtendedAttributeInformation; - -/** - * Discover Attributes Extended Response value object class. - *

    - * Cluster: General. Command is sent TO the server. - * This command is a generic command used across the profile. - *

    - * The Discover Attributes Extended Response command is generated in response to a Discover Attributes - * Extended command. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class DiscoverAttributesExtendedResponse extends ZclCommand { - /** - * Discovery complete command message field. - */ - private Boolean discoveryComplete; - - /** - * Attribute Information command message field. - */ - private List attributeInformation; - - /** - * Default constructor. - */ - public DiscoverAttributesExtendedResponse() { - genericCommand = true; - commandId = 22; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Sets the cluster ID for generic commands. {@link DiscoverAttributesExtendedResponse} is a generic command. - *

    - * For commands that are not generic, this method will do nothing as the cluster ID is fixed. - * To test if a command is generic, use the {@link #isGenericCommand} method. - * - * @param clusterId the cluster ID used for generic commands as an {@link Integer} - */ - @Override - public void setClusterId(Integer clusterId) { - this.clusterId = clusterId; - } - - /** - * Gets Discovery complete. - * - * @return the Discovery complete - */ - public Boolean getDiscoveryComplete() { - return discoveryComplete; - } - - /** - * Sets Discovery complete. - * - * @param discoveryComplete the Discovery complete - */ - public void setDiscoveryComplete(final Boolean discoveryComplete) { - this.discoveryComplete = discoveryComplete; - } - - /** - * Gets Attribute Information. - * - * @return the Attribute Information - */ - public List getAttributeInformation() { - return attributeInformation; - } - - /** - * Sets Attribute Information. - * - * @param attributeInformation the Attribute Information - */ - public void setAttributeInformation(final List attributeInformation) { - this.attributeInformation = attributeInformation; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(discoveryComplete, ZclDataType.BOOLEAN); - serializer.serialize(attributeInformation, ZclDataType.N_X_EXTENDED_ATTRIBUTE_INFORMATION); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - discoveryComplete = (Boolean) deserializer.deserialize(ZclDataType.BOOLEAN); - attributeInformation = (List) deserializer.deserialize(ZclDataType.N_X_EXTENDED_ATTRIBUTE_INFORMATION); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(114); - builder.append("DiscoverAttributesExtendedResponse ["); - builder.append(super.toString()); - builder.append(", discoveryComplete="); - builder.append(discoveryComplete); - builder.append(", attributeInformation="); - builder.append(attributeInformation); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/DiscoverAttributesResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/DiscoverAttributesResponse.java deleted file mode 100644 index 4db2bf5e4..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/DiscoverAttributesResponse.java +++ /dev/null @@ -1,154 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.general; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -import java.util.List; -import com.zsmartsystems.zigbee.zcl.field.AttributeInformation; - -/** - * Discover Attributes Response value object class. - *

    - * Cluster: General. Command is sent TO the server. - * This command is a generic command used across the profile. - *

    - * The discover attributes response command is generated in response to a discover - * attributes command. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class DiscoverAttributesResponse extends ZclCommand { - /** - * Discovery Complete command message field. - *

    - * The discovery complete field is a Boolean field. A value of 0 indicates that there - * are more attributes to be discovered that have an attribute identifier value greater - * than the last attribute identifier in the last attribute information field. A value - * of 1 indicates that there are no more attributes to be discovered. - * The attribute identifier field SHALL contain the identifier of a discovered attribute. - * Attributes SHALL be included in ascending order, starting with the lowest attribute - * identifier that is greater than or equal to the start attribute identifier field of the - * received Discover Attributes command. - */ - private Boolean discoveryComplete; - - /** - * Attribute Information command message field. - */ - private List attributeInformation; - - /** - * Default constructor. - */ - public DiscoverAttributesResponse() { - genericCommand = true; - commandId = 13; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Sets the cluster ID for generic commands. {@link DiscoverAttributesResponse} is a generic command. - *

    - * For commands that are not generic, this method will do nothing as the cluster ID is fixed. - * To test if a command is generic, use the {@link #isGenericCommand} method. - * - * @param clusterId the cluster ID used for generic commands as an {@link Integer} - */ - @Override - public void setClusterId(Integer clusterId) { - this.clusterId = clusterId; - } - - /** - * Gets Discovery Complete. - * - * The discovery complete field is a Boolean field. A value of 0 indicates that there - * are more attributes to be discovered that have an attribute identifier value greater - * than the last attribute identifier in the last attribute information field. A value - * of 1 indicates that there are no more attributes to be discovered. - * The attribute identifier field SHALL contain the identifier of a discovered attribute. - * Attributes SHALL be included in ascending order, starting with the lowest attribute - * identifier that is greater than or equal to the start attribute identifier field of the - * received Discover Attributes command. - * - * @return the Discovery Complete - */ - public Boolean getDiscoveryComplete() { - return discoveryComplete; - } - - /** - * Sets Discovery Complete. - * - * The discovery complete field is a Boolean field. A value of 0 indicates that there - * are more attributes to be discovered that have an attribute identifier value greater - * than the last attribute identifier in the last attribute information field. A value - * of 1 indicates that there are no more attributes to be discovered. - * The attribute identifier field SHALL contain the identifier of a discovered attribute. - * Attributes SHALL be included in ascending order, starting with the lowest attribute - * identifier that is greater than or equal to the start attribute identifier field of the - * received Discover Attributes command. - * - * @param discoveryComplete the Discovery Complete - */ - public void setDiscoveryComplete(final Boolean discoveryComplete) { - this.discoveryComplete = discoveryComplete; - } - - /** - * Gets Attribute Information. - * - * @return the Attribute Information - */ - public List getAttributeInformation() { - return attributeInformation; - } - - /** - * Sets Attribute Information. - * - * @param attributeInformation the Attribute Information - */ - public void setAttributeInformation(final List attributeInformation) { - this.attributeInformation = attributeInformation; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(discoveryComplete, ZclDataType.BOOLEAN); - serializer.serialize(attributeInformation, ZclDataType.N_X_ATTRIBUTE_INFORMATION); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - discoveryComplete = (Boolean) deserializer.deserialize(ZclDataType.BOOLEAN); - attributeInformation = (List) deserializer.deserialize(ZclDataType.N_X_ATTRIBUTE_INFORMATION); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(106); - builder.append("DiscoverAttributesResponse ["); - builder.append(super.toString()); - builder.append(", discoveryComplete="); - builder.append(discoveryComplete); - builder.append(", attributeInformation="); - builder.append(attributeInformation); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/DiscoverCommandsGenerated.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/DiscoverCommandsGenerated.java deleted file mode 100644 index c24f0f26a..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/DiscoverCommandsGenerated.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.general; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Discover Commands Generated value object class. - *

    - * Cluster: General. Command is sent TO the server. - * This command is a generic command used across the profile. - *

    - * The Discover Commands Generated command is generated when a remote device wishes to discover the - * commands that a cluster may generate on the device to which this command is directed. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class DiscoverCommandsGenerated extends ZclCommand { - /** - * Start command identifier command message field. - */ - private Integer startCommandIdentifier; - - /** - * Maximum command identifiers command message field. - */ - private Integer maximumCommandIdentifiers; - - /** - * Default constructor. - */ - public DiscoverCommandsGenerated() { - genericCommand = true; - commandId = 19; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Sets the cluster ID for generic commands. {@link DiscoverCommandsGenerated} is a generic command. - *

    - * For commands that are not generic, this method will do nothing as the cluster ID is fixed. - * To test if a command is generic, use the {@link #isGenericCommand} method. - * - * @param clusterId the cluster ID used for generic commands as an {@link Integer} - */ - @Override - public void setClusterId(Integer clusterId) { - this.clusterId = clusterId; - } - - /** - * Gets Start command identifier. - * - * @return the Start command identifier - */ - public Integer getStartCommandIdentifier() { - return startCommandIdentifier; - } - - /** - * Sets Start command identifier. - * - * @param startCommandIdentifier the Start command identifier - */ - public void setStartCommandIdentifier(final Integer startCommandIdentifier) { - this.startCommandIdentifier = startCommandIdentifier; - } - - /** - * Gets Maximum command identifiers. - * - * @return the Maximum command identifiers - */ - public Integer getMaximumCommandIdentifiers() { - return maximumCommandIdentifiers; - } - - /** - * Sets Maximum command identifiers. - * - * @param maximumCommandIdentifiers the Maximum command identifiers - */ - public void setMaximumCommandIdentifiers(final Integer maximumCommandIdentifiers) { - this.maximumCommandIdentifiers = maximumCommandIdentifiers; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(startCommandIdentifier, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(maximumCommandIdentifiers, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - startCommandIdentifier = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - maximumCommandIdentifiers = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(115); - builder.append("DiscoverCommandsGenerated ["); - builder.append(super.toString()); - builder.append(", startCommandIdentifier="); - builder.append(startCommandIdentifier); - builder.append(", maximumCommandIdentifiers="); - builder.append(maximumCommandIdentifiers); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/DiscoverCommandsGeneratedResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/DiscoverCommandsGeneratedResponse.java deleted file mode 100644 index 2a4863d81..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/DiscoverCommandsGeneratedResponse.java +++ /dev/null @@ -1,126 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.general; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -import java.util.List; - -/** - * Discover Commands Generated Response value object class. - *

    - * Cluster: General. Command is sent TO the server. - * This command is a generic command used across the profile. - *

    - * The Discover Commands Generated Response is generated in response to a Discover Commands Generated - * command. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class DiscoverCommandsGeneratedResponse extends ZclCommand { - /** - * Discovery complete command message field. - */ - private Boolean discoveryComplete; - - /** - * Command identifiers command message field. - */ - private List commandIdentifiers; - - /** - * Default constructor. - */ - public DiscoverCommandsGeneratedResponse() { - genericCommand = true; - commandId = 20; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Sets the cluster ID for generic commands. {@link DiscoverCommandsGeneratedResponse} is a generic command. - *

    - * For commands that are not generic, this method will do nothing as the cluster ID is fixed. - * To test if a command is generic, use the {@link #isGenericCommand} method. - * - * @param clusterId the cluster ID used for generic commands as an {@link Integer} - */ - @Override - public void setClusterId(Integer clusterId) { - this.clusterId = clusterId; - } - - /** - * Gets Discovery complete. - * - * @return the Discovery complete - */ - public Boolean getDiscoveryComplete() { - return discoveryComplete; - } - - /** - * Sets Discovery complete. - * - * @param discoveryComplete the Discovery complete - */ - public void setDiscoveryComplete(final Boolean discoveryComplete) { - this.discoveryComplete = discoveryComplete; - } - - /** - * Gets Command identifiers. - * - * @return the Command identifiers - */ - public List getCommandIdentifiers() { - return commandIdentifiers; - } - - /** - * Sets Command identifiers. - * - * @param commandIdentifiers the Command identifiers - */ - public void setCommandIdentifiers(final List commandIdentifiers) { - this.commandIdentifiers = commandIdentifiers; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(discoveryComplete, ZclDataType.BOOLEAN); - serializer.serialize(commandIdentifiers, ZclDataType.X_UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - discoveryComplete = (Boolean) deserializer.deserialize(ZclDataType.BOOLEAN); - commandIdentifiers = (List) deserializer.deserialize(ZclDataType.X_UNSIGNED_8_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(111); - builder.append("DiscoverCommandsGeneratedResponse ["); - builder.append(super.toString()); - builder.append(", discoveryComplete="); - builder.append(discoveryComplete); - builder.append(", commandIdentifiers="); - builder.append(commandIdentifiers); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/DiscoverCommandsReceived.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/DiscoverCommandsReceived.java deleted file mode 100644 index dc3a676cd..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/DiscoverCommandsReceived.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.general; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Discover Commands Received value object class. - *

    - * Cluster: General. Command is sent TO the server. - * This command is a generic command used across the profile. - *

    - * The Discover Commands Received command is generated when a remote device wishes to discover the - * optional and mandatory commands the cluster to which this command is sent can process. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class DiscoverCommandsReceived extends ZclCommand { - /** - * Start command identifier command message field. - */ - private Integer startCommandIdentifier; - - /** - * Maximum command identifiers command message field. - */ - private Integer maximumCommandIdentifiers; - - /** - * Default constructor. - */ - public DiscoverCommandsReceived() { - genericCommand = true; - commandId = 17; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Sets the cluster ID for generic commands. {@link DiscoverCommandsReceived} is a generic command. - *

    - * For commands that are not generic, this method will do nothing as the cluster ID is fixed. - * To test if a command is generic, use the {@link #isGenericCommand} method. - * - * @param clusterId the cluster ID used for generic commands as an {@link Integer} - */ - @Override - public void setClusterId(Integer clusterId) { - this.clusterId = clusterId; - } - - /** - * Gets Start command identifier. - * - * @return the Start command identifier - */ - public Integer getStartCommandIdentifier() { - return startCommandIdentifier; - } - - /** - * Sets Start command identifier. - * - * @param startCommandIdentifier the Start command identifier - */ - public void setStartCommandIdentifier(final Integer startCommandIdentifier) { - this.startCommandIdentifier = startCommandIdentifier; - } - - /** - * Gets Maximum command identifiers. - * - * @return the Maximum command identifiers - */ - public Integer getMaximumCommandIdentifiers() { - return maximumCommandIdentifiers; - } - - /** - * Sets Maximum command identifiers. - * - * @param maximumCommandIdentifiers the Maximum command identifiers - */ - public void setMaximumCommandIdentifiers(final Integer maximumCommandIdentifiers) { - this.maximumCommandIdentifiers = maximumCommandIdentifiers; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(startCommandIdentifier, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(maximumCommandIdentifiers, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - startCommandIdentifier = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - maximumCommandIdentifiers = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(114); - builder.append("DiscoverCommandsReceived ["); - builder.append(super.toString()); - builder.append(", startCommandIdentifier="); - builder.append(startCommandIdentifier); - builder.append(", maximumCommandIdentifiers="); - builder.append(maximumCommandIdentifiers); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/DiscoverCommandsReceivedResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/DiscoverCommandsReceivedResponse.java deleted file mode 100644 index 76c66de84..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/DiscoverCommandsReceivedResponse.java +++ /dev/null @@ -1,126 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.general; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -import java.util.List; - -/** - * Discover Commands Received Response value object class. - *

    - * Cluster: General. Command is sent TO the server. - * This command is a generic command used across the profile. - *

    - * The Discover Commands Received Response is generated in response to a Discover Commands Received - * command. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class DiscoverCommandsReceivedResponse extends ZclCommand { - /** - * Discovery complete command message field. - */ - private Boolean discoveryComplete; - - /** - * Command identifiers command message field. - */ - private List commandIdentifiers; - - /** - * Default constructor. - */ - public DiscoverCommandsReceivedResponse() { - genericCommand = true; - commandId = 18; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Sets the cluster ID for generic commands. {@link DiscoverCommandsReceivedResponse} is a generic command. - *

    - * For commands that are not generic, this method will do nothing as the cluster ID is fixed. - * To test if a command is generic, use the {@link #isGenericCommand} method. - * - * @param clusterId the cluster ID used for generic commands as an {@link Integer} - */ - @Override - public void setClusterId(Integer clusterId) { - this.clusterId = clusterId; - } - - /** - * Gets Discovery complete. - * - * @return the Discovery complete - */ - public Boolean getDiscoveryComplete() { - return discoveryComplete; - } - - /** - * Sets Discovery complete. - * - * @param discoveryComplete the Discovery complete - */ - public void setDiscoveryComplete(final Boolean discoveryComplete) { - this.discoveryComplete = discoveryComplete; - } - - /** - * Gets Command identifiers. - * - * @return the Command identifiers - */ - public List getCommandIdentifiers() { - return commandIdentifiers; - } - - /** - * Sets Command identifiers. - * - * @param commandIdentifiers the Command identifiers - */ - public void setCommandIdentifiers(final List commandIdentifiers) { - this.commandIdentifiers = commandIdentifiers; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(discoveryComplete, ZclDataType.BOOLEAN); - serializer.serialize(commandIdentifiers, ZclDataType.X_UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - discoveryComplete = (Boolean) deserializer.deserialize(ZclDataType.BOOLEAN); - commandIdentifiers = (List) deserializer.deserialize(ZclDataType.X_UNSIGNED_8_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(110); - builder.append("DiscoverCommandsReceivedResponse ["); - builder.append(super.toString()); - builder.append(", discoveryComplete="); - builder.append(discoveryComplete); - builder.append(", commandIdentifiers="); - builder.append(commandIdentifiers); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/ReadAttributesCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/ReadAttributesCommand.java deleted file mode 100644 index f2d854541..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/ReadAttributesCommand.java +++ /dev/null @@ -1,100 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.general; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -import java.util.List; - -/** - * Read Attributes Command value object class. - *

    - * Cluster: General. Command is sent TO the server. - * This command is a generic command used across the profile. - *

    - * The read attributes command is generated when a device wishes to determine the - * values of one or more attributes located on another device. Each attribute - * identifier field shall contain the identifier of the attribute to be read. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class ReadAttributesCommand extends ZclCommand { - /** - * Identifiers command message field. - */ - private List identifiers; - - /** - * Default constructor. - */ - public ReadAttributesCommand() { - genericCommand = true; - commandId = 0; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Sets the cluster ID for generic commands. {@link ReadAttributesCommand} is a generic command. - *

    - * For commands that are not generic, this method will do nothing as the cluster ID is fixed. - * To test if a command is generic, use the {@link #isGenericCommand} method. - * - * @param clusterId the cluster ID used for generic commands as an {@link Integer} - */ - @Override - public void setClusterId(Integer clusterId) { - this.clusterId = clusterId; - } - - /** - * Gets Identifiers. - * - * @return the Identifiers - */ - public List getIdentifiers() { - return identifiers; - } - - /** - * Sets Identifiers. - * - * @param identifiers the Identifiers - */ - public void setIdentifiers(final List identifiers) { - this.identifiers = identifiers; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(identifiers, ZclDataType.N_X_ATTRIBUTE_IDENTIFIER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - identifiers = (List) deserializer.deserialize(ZclDataType.N_X_ATTRIBUTE_IDENTIFIER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(55); - builder.append("ReadAttributesCommand ["); - builder.append(super.toString()); - builder.append(", identifiers="); - builder.append(identifiers); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/ReadAttributesResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/ReadAttributesResponse.java deleted file mode 100644 index 60439f7e3..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/ReadAttributesResponse.java +++ /dev/null @@ -1,104 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.general; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -import java.util.List; -import com.zsmartsystems.zigbee.zcl.field.ReadAttributeStatusRecord; - -/** - * Read Attributes Response value object class. - *

    - * Cluster: General. Command is sent TO the server. - * This command is a generic command used across the profile. - *

    - * The read attributes response command is generated in response to a read attributes - * or read attributes structured command. The command frame shall contain a read - * attribute status record for each attribute identifier specified in the original read - * attributes or read attributes structured command. For each read attribute status - * record, the attribute identifier field shall contain the identifier specified in the - * original read attributes or read attributes structured command. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class ReadAttributesResponse extends ZclCommand { - /** - * Records command message field. - */ - private List records; - - /** - * Default constructor. - */ - public ReadAttributesResponse() { - genericCommand = true; - commandId = 1; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Sets the cluster ID for generic commands. {@link ReadAttributesResponse} is a generic command. - *

    - * For commands that are not generic, this method will do nothing as the cluster ID is fixed. - * To test if a command is generic, use the {@link #isGenericCommand} method. - * - * @param clusterId the cluster ID used for generic commands as an {@link Integer} - */ - @Override - public void setClusterId(Integer clusterId) { - this.clusterId = clusterId; - } - - /** - * Gets Records. - * - * @return the Records - */ - public List getRecords() { - return records; - } - - /** - * Sets Records. - * - * @param records the Records - */ - public void setRecords(final List records) { - this.records = records; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(records, ZclDataType.N_X_READ_ATTRIBUTE_STATUS_RECORD); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - records = (List) deserializer.deserialize(ZclDataType.N_X_READ_ATTRIBUTE_STATUS_RECORD); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(52); - builder.append("ReadAttributesResponse ["); - builder.append(super.toString()); - builder.append(", records="); - builder.append(records); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/ReadAttributesStructuredCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/ReadAttributesStructuredCommand.java deleted file mode 100644 index 21a61ea1a..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/ReadAttributesStructuredCommand.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.general; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Read Attributes Structured Command value object class. - *

    - * Cluster: General. Command is sent TO the server. - * This command is a generic command used across the profile. - *

    - * The read attributes command is generated when a device wishes to determine the - * values of one or more attributes, or elements of attributes, located on another - * device. Each attribute identifier field shall contain the identifier of the attribute to - * be read. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class ReadAttributesStructuredCommand extends ZclCommand { - /** - * Attribute selectors command message field. - */ - private Object attributeSelectors; - - /** - * Default constructor. - */ - public ReadAttributesStructuredCommand() { - genericCommand = true; - commandId = 14; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Sets the cluster ID for generic commands. {@link ReadAttributesStructuredCommand} is a generic command. - *

    - * For commands that are not generic, this method will do nothing as the cluster ID is fixed. - * To test if a command is generic, use the {@link #isGenericCommand} method. - * - * @param clusterId the cluster ID used for generic commands as an {@link Integer} - */ - @Override - public void setClusterId(Integer clusterId) { - this.clusterId = clusterId; - } - - /** - * Gets Attribute selectors. - * - * @return the Attribute selectors - */ - public Object getAttributeSelectors() { - return attributeSelectors; - } - - /** - * Sets Attribute selectors. - * - * @param attributeSelectors the Attribute selectors - */ - public void setAttributeSelectors(final Object attributeSelectors) { - this.attributeSelectors = attributeSelectors; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(attributeSelectors, ZclDataType.N_X_ATTRIBUTE_SELECTOR); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - attributeSelectors = (Object) deserializer.deserialize(ZclDataType.N_X_ATTRIBUTE_SELECTOR); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(72); - builder.append("ReadAttributesStructuredCommand ["); - builder.append(super.toString()); - builder.append(", attributeSelectors="); - builder.append(attributeSelectors); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/ReadReportingConfigurationCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/ReadReportingConfigurationCommand.java deleted file mode 100644 index 4291b0886..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/ReadReportingConfigurationCommand.java +++ /dev/null @@ -1,100 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.general; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -import java.util.List; -import com.zsmartsystems.zigbee.zcl.field.AttributeRecord; - -/** - * Read Reporting Configuration Command value object class. - *

    - * Cluster: General. Command is sent TO the server. - * This command is a generic command used across the profile. - *

    - * The Read Reporting Configuration command is used to read the configuration - * details of the reporting mechanism for one or more of the attributes of a cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class ReadReportingConfigurationCommand extends ZclCommand { - /** - * Records command message field. - */ - private List records; - - /** - * Default constructor. - */ - public ReadReportingConfigurationCommand() { - genericCommand = true; - commandId = 8; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Sets the cluster ID for generic commands. {@link ReadReportingConfigurationCommand} is a generic command. - *

    - * For commands that are not generic, this method will do nothing as the cluster ID is fixed. - * To test if a command is generic, use the {@link #isGenericCommand} method. - * - * @param clusterId the cluster ID used for generic commands as an {@link Integer} - */ - @Override - public void setClusterId(Integer clusterId) { - this.clusterId = clusterId; - } - - /** - * Gets Records. - * - * @return the Records - */ - public List getRecords() { - return records; - } - - /** - * Sets Records. - * - * @param records the Records - */ - public void setRecords(final List records) { - this.records = records; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(records, ZclDataType.N_X_ATTRIBUTE_RECORD); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - records = (List) deserializer.deserialize(ZclDataType.N_X_ATTRIBUTE_RECORD); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(63); - builder.append("ReadReportingConfigurationCommand ["); - builder.append(super.toString()); - builder.append(", records="); - builder.append(records); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/ReadReportingConfigurationResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/ReadReportingConfigurationResponse.java deleted file mode 100644 index a4932f044..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/ReadReportingConfigurationResponse.java +++ /dev/null @@ -1,100 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.general; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -import java.util.List; -import com.zsmartsystems.zigbee.zcl.field.AttributeReportingConfigurationRecord; - -/** - * Read Reporting Configuration Response value object class. - *

    - * Cluster: General. Command is sent TO the server. - * This command is a generic command used across the profile. - *

    - * The Read Reporting Configuration Response command is used to respond to a - * Read Reporting Configuration command. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class ReadReportingConfigurationResponse extends ZclCommand { - /** - * Records command message field. - */ - private List records; - - /** - * Default constructor. - */ - public ReadReportingConfigurationResponse() { - genericCommand = true; - commandId = 9; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Sets the cluster ID for generic commands. {@link ReadReportingConfigurationResponse} is a generic command. - *

    - * For commands that are not generic, this method will do nothing as the cluster ID is fixed. - * To test if a command is generic, use the {@link #isGenericCommand} method. - * - * @param clusterId the cluster ID used for generic commands as an {@link Integer} - */ - @Override - public void setClusterId(Integer clusterId) { - this.clusterId = clusterId; - } - - /** - * Gets Records. - * - * @return the Records - */ - public List getRecords() { - return records; - } - - /** - * Sets Records. - * - * @param records the Records - */ - public void setRecords(final List records) { - this.records = records; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(records, ZclDataType.N_X_ATTRIBUTE_REPORTING_CONFIGURATION_RECORD); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - records = (List) deserializer.deserialize(ZclDataType.N_X_ATTRIBUTE_REPORTING_CONFIGURATION_RECORD); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(64); - builder.append("ReadReportingConfigurationResponse ["); - builder.append(super.toString()); - builder.append(", records="); - builder.append(records); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/ReportAttributesCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/ReportAttributesCommand.java deleted file mode 100644 index 086895343..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/ReportAttributesCommand.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.general; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -import java.util.List; -import com.zsmartsystems.zigbee.zcl.field.AttributeReport; - -/** - * Report Attributes Command value object class. - *

    - * Cluster: General. Command is sent TO the server. - * This command is a generic command used across the profile. - *

    - * The report attributes command is used by a device to report the values of one or - * more of its attributes to another device, bound a priori. Individual clusters, defined - * elsewhere in the ZCL, define which attributes are to be reported and at what - * interval. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class ReportAttributesCommand extends ZclCommand { - /** - * Reports command message field. - */ - private List reports; - - /** - * Default constructor. - */ - public ReportAttributesCommand() { - genericCommand = true; - commandId = 10; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Sets the cluster ID for generic commands. {@link ReportAttributesCommand} is a generic command. - *

    - * For commands that are not generic, this method will do nothing as the cluster ID is fixed. - * To test if a command is generic, use the {@link #isGenericCommand} method. - * - * @param clusterId the cluster ID used for generic commands as an {@link Integer} - */ - @Override - public void setClusterId(Integer clusterId) { - this.clusterId = clusterId; - } - - /** - * Gets Reports. - * - * @return the Reports - */ - public List getReports() { - return reports; - } - - /** - * Sets Reports. - * - * @param reports the Reports - */ - public void setReports(final List reports) { - this.reports = reports; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(reports, ZclDataType.N_X_ATTRIBUTE_REPORT); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - reports = (List) deserializer.deserialize(ZclDataType.N_X_ATTRIBUTE_REPORT); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(53); - builder.append("ReportAttributesCommand ["); - builder.append(super.toString()); - builder.append(", reports="); - builder.append(reports); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/WriteAttributesCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/WriteAttributesCommand.java deleted file mode 100644 index e1ae7ca91..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/WriteAttributesCommand.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.general; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -import java.util.List; -import com.zsmartsystems.zigbee.zcl.field.WriteAttributeRecord; - -/** - * Write Attributes Command value object class. - *

    - * Cluster: General. Command is sent TO the server. - * This command is a generic command used across the profile. - *

    - * The write attributes command is generated when a device wishes to change the - * values of one or more attributes located on another device. Each write attribute - * record shall contain the identifier and the actual value of the attribute to be - * written. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class WriteAttributesCommand extends ZclCommand { - /** - * Records command message field. - */ - private List records; - - /** - * Default constructor. - */ - public WriteAttributesCommand() { - genericCommand = true; - commandId = 2; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Sets the cluster ID for generic commands. {@link WriteAttributesCommand} is a generic command. - *

    - * For commands that are not generic, this method will do nothing as the cluster ID is fixed. - * To test if a command is generic, use the {@link #isGenericCommand} method. - * - * @param clusterId the cluster ID used for generic commands as an {@link Integer} - */ - @Override - public void setClusterId(Integer clusterId) { - this.clusterId = clusterId; - } - - /** - * Gets Records. - * - * @return the Records - */ - public List getRecords() { - return records; - } - - /** - * Sets Records. - * - * @param records the Records - */ - public void setRecords(final List records) { - this.records = records; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(records, ZclDataType.N_X_WRITE_ATTRIBUTE_RECORD); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - records = (List) deserializer.deserialize(ZclDataType.N_X_WRITE_ATTRIBUTE_RECORD); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(52); - builder.append("WriteAttributesCommand ["); - builder.append(super.toString()); - builder.append(", records="); - builder.append(records); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/WriteAttributesNoResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/WriteAttributesNoResponse.java deleted file mode 100644 index 169bba364..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/WriteAttributesNoResponse.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.general; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -import java.util.List; -import com.zsmartsystems.zigbee.zcl.field.WriteAttributeRecord; - -/** - * Write Attributes No Response value object class. - *

    - * Cluster: General. Command is sent TO the server. - * This command is a generic command used across the profile. - *

    - * The write attributes no response command is generated when a device wishes to - * change the value of one or more attributes located on another device but does not - * require a response. Each write attribute record shall contain the identifier and the - * actual value of the attribute to be written. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class WriteAttributesNoResponse extends ZclCommand { - /** - * Records command message field. - */ - private List records; - - /** - * Default constructor. - */ - public WriteAttributesNoResponse() { - genericCommand = true; - commandId = 5; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Sets the cluster ID for generic commands. {@link WriteAttributesNoResponse} is a generic command. - *

    - * For commands that are not generic, this method will do nothing as the cluster ID is fixed. - * To test if a command is generic, use the {@link #isGenericCommand} method. - * - * @param clusterId the cluster ID used for generic commands as an {@link Integer} - */ - @Override - public void setClusterId(Integer clusterId) { - this.clusterId = clusterId; - } - - /** - * Gets Records. - * - * @return the Records - */ - public List getRecords() { - return records; - } - - /** - * Sets Records. - * - * @param records the Records - */ - public void setRecords(final List records) { - this.records = records; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(records, ZclDataType.N_X_WRITE_ATTRIBUTE_RECORD); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - records = (List) deserializer.deserialize(ZclDataType.N_X_WRITE_ATTRIBUTE_RECORD); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(55); - builder.append("WriteAttributesNoResponse ["); - builder.append(super.toString()); - builder.append(", records="); - builder.append(records); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/WriteAttributesResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/WriteAttributesResponse.java deleted file mode 100644 index b7cb4169e..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/WriteAttributesResponse.java +++ /dev/null @@ -1,100 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.general; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -import java.util.List; -import com.zsmartsystems.zigbee.zcl.field.WriteAttributeStatusRecord; - -/** - * Write Attributes Response value object class. - *

    - * Cluster: General. Command is sent TO the server. - * This command is a generic command used across the profile. - *

    - * The write attributes response command is generated in response to a write - * attributes command. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class WriteAttributesResponse extends ZclCommand { - /** - * Records command message field. - */ - private List records; - - /** - * Default constructor. - */ - public WriteAttributesResponse() { - genericCommand = true; - commandId = 4; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Sets the cluster ID for generic commands. {@link WriteAttributesResponse} is a generic command. - *

    - * For commands that are not generic, this method will do nothing as the cluster ID is fixed. - * To test if a command is generic, use the {@link #isGenericCommand} method. - * - * @param clusterId the cluster ID used for generic commands as an {@link Integer} - */ - @Override - public void setClusterId(Integer clusterId) { - this.clusterId = clusterId; - } - - /** - * Gets Records. - * - * @return the Records - */ - public List getRecords() { - return records; - } - - /** - * Sets Records. - * - * @param records the Records - */ - public void setRecords(final List records) { - this.records = records; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(records, ZclDataType.N_X_WRITE_ATTRIBUTE_STATUS_RECORD); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - records = (List) deserializer.deserialize(ZclDataType.N_X_WRITE_ATTRIBUTE_STATUS_RECORD); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(53); - builder.append("WriteAttributesResponse ["); - builder.append(super.toString()); - builder.append(", records="); - builder.append(records); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/WriteAttributesStructuredCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/WriteAttributesStructuredCommand.java deleted file mode 100644 index d135dcc0d..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/WriteAttributesStructuredCommand.java +++ /dev/null @@ -1,163 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.general; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; -import com.zsmartsystems.zigbee.zcl.ZclStatus; - -/** - * Write Attributes Structured Command value object class. - *

    - * Cluster: General. Command is sent TO the server. - * This command is a generic command used across the profile. - *

    - * The write attributes structured command is generated when a device wishes to - * change the values of one or more attributes located on another device. Each write - * attribute record shall contain the identifier and the actual value of the attribute, or - * element thereof, to be written. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class WriteAttributesStructuredCommand extends ZclCommand { - /** - * Status command message field. - *

    - * Status is only provided if the command was successful, and the - * attribute selector records are not included for successfully - * written attributes, in order to save bandwidth. - */ - private ZclStatus status; - - /** - * Attribute selectors command message field. - *

    - * Note that write attribute status records are not included for successfully - * written attributes, in order to save bandwidth. In the case of successful - * writing of all attributes, only a single write attribute status record - * SHALL be included in the command, with the status field set to SUCCESS and the - * attribute identifier and selector fields omitted. - */ - private Object attributeSelectors; - - /** - * Default constructor. - */ - public WriteAttributesStructuredCommand() { - genericCommand = true; - commandId = 15; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Sets the cluster ID for generic commands. {@link WriteAttributesStructuredCommand} is a generic command. - *

    - * For commands that are not generic, this method will do nothing as the cluster ID is fixed. - * To test if a command is generic, use the {@link #isGenericCommand} method. - * - * @param clusterId the cluster ID used for generic commands as an {@link Integer} - */ - @Override - public void setClusterId(Integer clusterId) { - this.clusterId = clusterId; - } - - /** - * Gets Status. - * - * Status is only provided if the command was successful, and the - * attribute selector records are not included for successfully - * written attributes, in order to save bandwidth. - * - * @return the Status - */ - public ZclStatus getStatus() { - return status; - } - - /** - * Sets Status. - * - * Status is only provided if the command was successful, and the - * attribute selector records are not included for successfully - * written attributes, in order to save bandwidth. - * - * @param status the Status - */ - public void setStatus(final ZclStatus status) { - this.status = status; - } - - /** - * Gets Attribute selectors. - * - * Note that write attribute status records are not included for successfully - * written attributes, in order to save bandwidth. In the case of successful - * writing of all attributes, only a single write attribute status record - * SHALL be included in the command, with the status field set to SUCCESS and the - * attribute identifier and selector fields omitted. - * - * @return the Attribute selectors - */ - public Object getAttributeSelectors() { - return attributeSelectors; - } - - /** - * Sets Attribute selectors. - * - * Note that write attribute status records are not included for successfully - * written attributes, in order to save bandwidth. In the case of successful - * writing of all attributes, only a single write attribute status record - * SHALL be included in the command, with the status field set to SUCCESS and the - * attribute identifier and selector fields omitted. - * - * @param attributeSelectors the Attribute selectors - */ - public void setAttributeSelectors(final Object attributeSelectors) { - this.attributeSelectors = attributeSelectors; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - if (status == ZclStatus.SUCCESS) { - serializer.serialize(status, ZclDataType.ZCL_STATUS); - return; - } - serializer.serialize(attributeSelectors, ZclDataType.N_X_ATTRIBUTE_SELECTOR); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - if (deserializer.getRemainingLength() == 1) { - status = (ZclStatus) deserializer.deserialize(ZclDataType.ZCL_STATUS); - return; - } - attributeSelectors = (Object) deserializer.deserialize(ZclDataType.N_X_ATTRIBUTE_SELECTOR); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(99); - builder.append("WriteAttributesStructuredCommand ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(", attributeSelectors="); - builder.append(attributeSelectors); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/WriteAttributesStructuredResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/WriteAttributesStructuredResponse.java deleted file mode 100644 index ed76b3ca1..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/WriteAttributesStructuredResponse.java +++ /dev/null @@ -1,164 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.general; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -import java.util.List; -import com.zsmartsystems.zigbee.zcl.ZclStatus; -import com.zsmartsystems.zigbee.zcl.field.WriteAttributeStatusRecord; - -/** - * Write Attributes Structured Response value object class. - *

    - * Cluster: General. Command is sent TO the server. - * This command is a generic command used across the profile. - *

    - * The write attributes structured response command is generated in response to a - * write attributes structured command. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class WriteAttributesStructuredResponse extends ZclCommand { - /** - * Status command message field. - *

    - * Status is only provided if the command was successful, and the write - * attribute status records are not included for successfully - * written attributes, in order to save bandwidth. - */ - private ZclStatus status; - - /** - * Records command message field. - *

    - * Note that write attribute status records are not included for successfully - * written attributes, in order to save bandwidth. In the case of successful - * writing of all attributes, only a single write attribute status record - * SHALL be included in the command, with the status field set to SUCCESS and the - * attribute identifier field omitted. - */ - private List records; - - /** - * Default constructor. - */ - public WriteAttributesStructuredResponse() { - genericCommand = true; - commandId = 16; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Sets the cluster ID for generic commands. {@link WriteAttributesStructuredResponse} is a generic command. - *

    - * For commands that are not generic, this method will do nothing as the cluster ID is fixed. - * To test if a command is generic, use the {@link #isGenericCommand} method. - * - * @param clusterId the cluster ID used for generic commands as an {@link Integer} - */ - @Override - public void setClusterId(Integer clusterId) { - this.clusterId = clusterId; - } - - /** - * Gets Status. - * - * Status is only provided if the command was successful, and the write - * attribute status records are not included for successfully - * written attributes, in order to save bandwidth. - * - * @return the Status - */ - public ZclStatus getStatus() { - return status; - } - - /** - * Sets Status. - * - * Status is only provided if the command was successful, and the write - * attribute status records are not included for successfully - * written attributes, in order to save bandwidth. - * - * @param status the Status - */ - public void setStatus(final ZclStatus status) { - this.status = status; - } - - /** - * Gets Records. - * - * Note that write attribute status records are not included for successfully - * written attributes, in order to save bandwidth. In the case of successful - * writing of all attributes, only a single write attribute status record - * SHALL be included in the command, with the status field set to SUCCESS and the - * attribute identifier field omitted. - * - * @return the Records - */ - public List getRecords() { - return records; - } - - /** - * Sets Records. - * - * Note that write attribute status records are not included for successfully - * written attributes, in order to save bandwidth. In the case of successful - * writing of all attributes, only a single write attribute status record - * SHALL be included in the command, with the status field set to SUCCESS and the - * attribute identifier field omitted. - * - * @param records the Records - */ - public void setRecords(final List records) { - this.records = records; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - if (status == ZclStatus.SUCCESS) { - serializer.serialize(status, ZclDataType.ZCL_STATUS); - return; - } - serializer.serialize(records, ZclDataType.N_X_WRITE_ATTRIBUTE_STATUS_RECORD); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - if (deserializer.getRemainingLength() == 1) { - status = (ZclStatus) deserializer.deserialize(ZclDataType.ZCL_STATUS); - return; - } - records = (List) deserializer.deserialize(ZclDataType.N_X_WRITE_ATTRIBUTE_STATUS_RECORD); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(89); - builder.append("WriteAttributesStructuredResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(", records="); - builder.append(records); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/WriteAttributesUndividedCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/WriteAttributesUndividedCommand.java deleted file mode 100644 index 0ba8f2fdf..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/general/WriteAttributesUndividedCommand.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.general; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -import java.util.List; -import com.zsmartsystems.zigbee.zcl.field.WriteAttributeRecord; - -/** - * Write Attributes Undivided Command value object class. - *

    - * Cluster: General. Command is sent TO the server. - * This command is a generic command used across the profile. - *

    - * The write attributes undivided command is generated when a device wishes to - * change the values of one or more attributes located on another device, in such a - * way that if any attribute cannot be written (e.g. if an attribute is not implemented - * on the device, or a value to be written is outside its valid range), no attribute - * values are changed. - *
    - * In all other respects, including generation of a write attributes response command, - * the format and operation of the command is the same as that of the write attributes - * command, except that the command identifier field shall be set to indicate the - * write attributes undivided command. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class WriteAttributesUndividedCommand extends ZclCommand { - /** - * Records command message field. - */ - private List records; - - /** - * Default constructor. - */ - public WriteAttributesUndividedCommand() { - genericCommand = true; - commandId = 3; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Sets the cluster ID for generic commands. {@link WriteAttributesUndividedCommand} is a generic command. - *

    - * For commands that are not generic, this method will do nothing as the cluster ID is fixed. - * To test if a command is generic, use the {@link #isGenericCommand} method. - * - * @param clusterId the cluster ID used for generic commands as an {@link Integer} - */ - @Override - public void setClusterId(Integer clusterId) { - this.clusterId = clusterId; - } - - /** - * Gets Records. - * - * @return the Records - */ - public List getRecords() { - return records; - } - - /** - * Sets Records. - * - * @param records the Records - */ - public void setRecords(final List records) { - this.records = records; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(records, ZclDataType.N_X_WRITE_ATTRIBUTE_RECORD); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - records = (List) deserializer.deserialize(ZclDataType.N_X_WRITE_ATTRIBUTE_RECORD); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(61); - builder.append("WriteAttributesUndividedCommand ["); - builder.append(super.toString()); - builder.append(", records="); - builder.append(records); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/groups/AddGroupCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/groups/AddGroupCommand.java deleted file mode 100644 index bd50a6817..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/groups/AddGroupCommand.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.groups; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Add Group Command value object class. - *

    - * Cluster: Groups. Command is sent TO the server. - * This command is a specific command used for the Groups cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class AddGroupCommand extends ZclCommand { - /** - * Group ID command message field. - */ - private Integer groupId; - - /** - * Group Name command message field. - */ - private String groupName; - - /** - * Default constructor. - */ - public AddGroupCommand() { - genericCommand = false; - clusterId = 4; - commandId = 0; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Group ID. - * - * @return the Group ID - */ - public Integer getGroupId() { - return groupId; - } - - /** - * Sets Group ID. - * - * @param groupId the Group ID - */ - public void setGroupId(final Integer groupId) { - this.groupId = groupId; - } - - /** - * Gets Group Name. - * - * @return the Group Name - */ - public String getGroupName() { - return groupName; - } - - /** - * Sets Group Name. - * - * @param groupName the Group Name - */ - public void setGroupName(final String groupName) { - this.groupName = groupName; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(groupId, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(groupName, ZclDataType.CHARACTER_STRING); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - groupId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - groupName = (String) deserializer.deserialize(ZclDataType.CHARACTER_STRING); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(74); - builder.append("AddGroupCommand ["); - builder.append(super.toString()); - builder.append(", groupId="); - builder.append(groupId); - builder.append(", groupName="); - builder.append(groupName); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/groups/AddGroupIfIdentifyingCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/groups/AddGroupIfIdentifyingCommand.java deleted file mode 100644 index 5fd496265..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/groups/AddGroupIfIdentifyingCommand.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.groups; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Add Group If Identifying Command value object class. - *

    - * Cluster: Groups. Command is sent TO the server. - * This command is a specific command used for the Groups cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class AddGroupIfIdentifyingCommand extends ZclCommand { - /** - * Group ID command message field. - */ - private Integer groupId; - - /** - * Group Name command message field. - */ - private String groupName; - - /** - * Default constructor. - */ - public AddGroupIfIdentifyingCommand() { - genericCommand = false; - clusterId = 4; - commandId = 5; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Group ID. - * - * @return the Group ID - */ - public Integer getGroupId() { - return groupId; - } - - /** - * Sets Group ID. - * - * @param groupId the Group ID - */ - public void setGroupId(final Integer groupId) { - this.groupId = groupId; - } - - /** - * Gets Group Name. - * - * @return the Group Name - */ - public String getGroupName() { - return groupName; - } - - /** - * Sets Group Name. - * - * @param groupName the Group Name - */ - public void setGroupName(final String groupName) { - this.groupName = groupName; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(groupId, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(groupName, ZclDataType.CHARACTER_STRING); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - groupId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - groupName = (String) deserializer.deserialize(ZclDataType.CHARACTER_STRING); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(87); - builder.append("AddGroupIfIdentifyingCommand ["); - builder.append(super.toString()); - builder.append(", groupId="); - builder.append(groupId); - builder.append(", groupName="); - builder.append(groupName); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/groups/AddGroupResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/groups/AddGroupResponse.java deleted file mode 100644 index 8bc043756..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/groups/AddGroupResponse.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.groups; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Add Group Response value object class. - *

    - * Cluster: Groups. Command is sent FROM the server. - * This command is a specific command used for the Groups cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class AddGroupResponse extends ZclCommand { - /** - * Status command message field. - */ - private Integer status; - - /** - * Group ID command message field. - */ - private Integer groupId; - - /** - * Default constructor. - */ - public AddGroupResponse() { - genericCommand = false; - clusterId = 4; - commandId = 0; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Status. - * - * @return the Status - */ - public Integer getStatus() { - return status; - } - - /** - * Sets Status. - * - * @param status the Status - */ - public void setStatus(final Integer status) { - this.status = status; - } - - /** - * Gets Group ID. - * - * @return the Group ID - */ - public Integer getGroupId() { - return groupId; - } - - /** - * Sets Group ID. - * - * @param groupId the Group ID - */ - public void setGroupId(final Integer groupId) { - this.groupId = groupId; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(status, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(groupId, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - status = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - groupId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(72); - builder.append("AddGroupResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(", groupId="); - builder.append(groupId); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/groups/GetGroupMembershipCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/groups/GetGroupMembershipCommand.java deleted file mode 100644 index 9d60e9358..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/groups/GetGroupMembershipCommand.java +++ /dev/null @@ -1,111 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.groups; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -import java.util.List; - -/** - * Get Group Membership Command value object class. - *

    - * Cluster: Groups. Command is sent TO the server. - * This command is a specific command used for the Groups cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class GetGroupMembershipCommand extends ZclCommand { - /** - * Group count command message field. - */ - private Integer groupCount; - - /** - * Group list command message field. - */ - private List groupList; - - /** - * Default constructor. - */ - public GetGroupMembershipCommand() { - genericCommand = false; - clusterId = 4; - commandId = 2; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Group count. - * - * @return the Group count - */ - public Integer getGroupCount() { - return groupCount; - } - - /** - * Sets Group count. - * - * @param groupCount the Group count - */ - public void setGroupCount(final Integer groupCount) { - this.groupCount = groupCount; - } - - /** - * Gets Group list. - * - * @return the Group list - */ - public List getGroupList() { - return groupList; - } - - /** - * Sets Group list. - * - * @param groupList the Group list - */ - public void setGroupList(final List groupList) { - this.groupList = groupList; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(groupCount, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(groupList, ZclDataType.N_X_UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - groupCount = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - groupList = (List) deserializer.deserialize(ZclDataType.N_X_UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(87); - builder.append("GetGroupMembershipCommand ["); - builder.append(super.toString()); - builder.append(", groupCount="); - builder.append(groupCount); - builder.append(", groupList="); - builder.append(groupList); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/groups/GetGroupMembershipResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/groups/GetGroupMembershipResponse.java deleted file mode 100644 index 7b31e78de..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/groups/GetGroupMembershipResponse.java +++ /dev/null @@ -1,138 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.groups; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -import java.util.List; - -/** - * Get Group Membership Response value object class. - *

    - * Cluster: Groups. Command is sent FROM the server. - * This command is a specific command used for the Groups cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class GetGroupMembershipResponse extends ZclCommand { - /** - * Capacity command message field. - */ - private Integer capacity; - - /** - * Group count command message field. - */ - private Integer groupCount; - - /** - * Group list command message field. - */ - private List groupList; - - /** - * Default constructor. - */ - public GetGroupMembershipResponse() { - genericCommand = false; - clusterId = 4; - commandId = 2; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Capacity. - * - * @return the Capacity - */ - public Integer getCapacity() { - return capacity; - } - - /** - * Sets Capacity. - * - * @param capacity the Capacity - */ - public void setCapacity(final Integer capacity) { - this.capacity = capacity; - } - - /** - * Gets Group count. - * - * @return the Group count - */ - public Integer getGroupCount() { - return groupCount; - } - - /** - * Sets Group count. - * - * @param groupCount the Group count - */ - public void setGroupCount(final Integer groupCount) { - this.groupCount = groupCount; - } - - /** - * Gets Group list. - * - * @return the Group list - */ - public List getGroupList() { - return groupList; - } - - /** - * Sets Group list. - * - * @param groupList the Group list - */ - public void setGroupList(final List groupList) { - this.groupList = groupList; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(capacity, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(groupCount, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(groupList, ZclDataType.N_X_UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - capacity = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - groupCount = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - groupList = (List) deserializer.deserialize(ZclDataType.N_X_UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(116); - builder.append("GetGroupMembershipResponse ["); - builder.append(super.toString()); - builder.append(", capacity="); - builder.append(capacity); - builder.append(", groupCount="); - builder.append(groupCount); - builder.append(", groupList="); - builder.append(groupList); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/groups/RemoveAllGroupsCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/groups/RemoveAllGroupsCommand.java deleted file mode 100644 index f417a4d09..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/groups/RemoveAllGroupsCommand.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.groups; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Remove All Groups Command value object class. - *

    - * Cluster: Groups. Command is sent TO the server. - * This command is a specific command used for the Groups cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class RemoveAllGroupsCommand extends ZclCommand { - /** - * Default constructor. - */ - public RemoveAllGroupsCommand() { - genericCommand = false; - clusterId = 4; - commandId = 4; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(25); - builder.append("RemoveAllGroupsCommand ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/groups/RemoveGroupCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/groups/RemoveGroupCommand.java deleted file mode 100644 index 29d05e8f1..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/groups/RemoveGroupCommand.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.groups; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Remove Group Command value object class. - *

    - * Cluster: Groups. Command is sent TO the server. - * This command is a specific command used for the Groups cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class RemoveGroupCommand extends ZclCommand { - /** - * Group ID command message field. - */ - private Integer groupId; - - /** - * Default constructor. - */ - public RemoveGroupCommand() { - genericCommand = false; - clusterId = 4; - commandId = 3; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Group ID. - * - * @return the Group ID - */ - public Integer getGroupId() { - return groupId; - } - - /** - * Sets Group ID. - * - * @param groupId the Group ID - */ - public void setGroupId(final Integer groupId) { - this.groupId = groupId; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(groupId, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - groupId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(48); - builder.append("RemoveGroupCommand ["); - builder.append(super.toString()); - builder.append(", groupId="); - builder.append(groupId); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/groups/RemoveGroupResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/groups/RemoveGroupResponse.java deleted file mode 100644 index 74573a38b..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/groups/RemoveGroupResponse.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.groups; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Remove Group Response value object class. - *

    - * Cluster: Groups. Command is sent FROM the server. - * This command is a specific command used for the Groups cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class RemoveGroupResponse extends ZclCommand { - /** - * Status command message field. - */ - private Integer status; - - /** - * Group ID command message field. - */ - private Integer groupId; - - /** - * Default constructor. - */ - public RemoveGroupResponse() { - genericCommand = false; - clusterId = 4; - commandId = 3; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Status. - * - * @return the Status - */ - public Integer getStatus() { - return status; - } - - /** - * Sets Status. - * - * @param status the Status - */ - public void setStatus(final Integer status) { - this.status = status; - } - - /** - * Gets Group ID. - * - * @return the Group ID - */ - public Integer getGroupId() { - return groupId; - } - - /** - * Sets Group ID. - * - * @param groupId the Group ID - */ - public void setGroupId(final Integer groupId) { - this.groupId = groupId; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(status, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(groupId, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - status = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - groupId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(75); - builder.append("RemoveGroupResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(", groupId="); - builder.append(groupId); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/groups/ViewGroupCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/groups/ViewGroupCommand.java deleted file mode 100644 index 10e65d62e..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/groups/ViewGroupCommand.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.groups; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * View Group Command value object class. - *

    - * Cluster: Groups. Command is sent TO the server. - * This command is a specific command used for the Groups cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class ViewGroupCommand extends ZclCommand { - /** - * Group ID command message field. - */ - private Integer groupId; - - /** - * Default constructor. - */ - public ViewGroupCommand() { - genericCommand = false; - clusterId = 4; - commandId = 1; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Group ID. - * - * @return the Group ID - */ - public Integer getGroupId() { - return groupId; - } - - /** - * Sets Group ID. - * - * @param groupId the Group ID - */ - public void setGroupId(final Integer groupId) { - this.groupId = groupId; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(groupId, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - groupId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(46); - builder.append("ViewGroupCommand ["); - builder.append(super.toString()); - builder.append(", groupId="); - builder.append(groupId); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/groups/ViewGroupResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/groups/ViewGroupResponse.java deleted file mode 100644 index 0e7450e55..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/groups/ViewGroupResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.groups; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * View Group Response value object class. - *

    - * Cluster: Groups. Command is sent FROM the server. - * This command is a specific command used for the Groups cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class ViewGroupResponse extends ZclCommand { - /** - * Status command message field. - */ - private Integer status; - - /** - * Group ID command message field. - */ - private Integer groupId; - - /** - * Group Name command message field. - */ - private String groupName; - - /** - * Default constructor. - */ - public ViewGroupResponse() { - genericCommand = false; - clusterId = 4; - commandId = 1; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Status. - * - * @return the Status - */ - public Integer getStatus() { - return status; - } - - /** - * Sets Status. - * - * @param status the Status - */ - public void setStatus(final Integer status) { - this.status = status; - } - - /** - * Gets Group ID. - * - * @return the Group ID - */ - public Integer getGroupId() { - return groupId; - } - - /** - * Sets Group ID. - * - * @param groupId the Group ID - */ - public void setGroupId(final Integer groupId) { - this.groupId = groupId; - } - - /** - * Gets Group Name. - * - * @return the Group Name - */ - public String getGroupName() { - return groupName; - } - - /** - * Sets Group Name. - * - * @param groupName the Group Name - */ - public void setGroupName(final String groupName) { - this.groupName = groupName; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(status, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(groupId, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(groupName, ZclDataType.CHARACTER_STRING); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - status = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - groupId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - groupName = (String) deserializer.deserialize(ZclDataType.CHARACTER_STRING); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(102); - builder.append("ViewGroupResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(", groupId="); - builder.append(groupId); - builder.append(", groupName="); - builder.append(groupName); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/AlarmStatusEnum.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/AlarmStatusEnum.java deleted file mode 100644 index 4b05aabf7..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/AlarmStatusEnum.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.iasace; - -import java.util.HashMap; -import java.util.Map; - -import javax.annotation.Generated; - -/** - * Enumeration of IAS ACE attribute Alarm Status options. - *

    - * Code is auto-generated. Modifications may be overwritten! - * - * @author Chris Jackson - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-10T07:28:44Z") -public enum AlarmStatusEnum { - NO_ALARM(0x0000), - BURGLAR(0x0001), - FIRE(0x0002), - EMERGENCY(0x0003), - POLICE_PANIC(0x0004), - FIRE_PANIC(0x0005), - EMERGENCY_PANIC(0x0006); - - /** - * A mapping between the integer code and its corresponding AlarmStatusEnum type to facilitate lookup by value. - */ - private static Map idMap; - - static { - idMap = new HashMap(); - for (AlarmStatusEnum enumValue : values()) { - idMap.put(enumValue.key, enumValue); - } - } - - private final int key; - - AlarmStatusEnum(final int key) { - this.key = key; - } - - public int getKey() { - return key; - } - - public static AlarmStatusEnum getByValue(final int value) { - return idMap.get(value); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/ArmCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/ArmCommand.java deleted file mode 100644 index de3e0e96d..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/ArmCommand.java +++ /dev/null @@ -1,183 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.iasace; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Arm Command value object class. - *

    - * Cluster: IAS ACE. Command is sent TO the server. - * This command is a specific command used for the IAS ACE cluster. - *

    - * On receipt of this command, the receiving device sets its arm mode according to the value of the Arm Mode field. It - * is not guaranteed that an Arm command will succeed. Based on the current state of - * the IAS CIE, and its related devices, the command can be rejected. The device SHALL generate an Arm Response command - * to indicate the resulting armed state - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-05-06T20:50:13Z") -public class ArmCommand extends ZclCommand { - /** - * Arm Mode command message field. - */ - private Integer armMode; - - /** - * Arm/Disarm Code command message field. - *

    - * The Arm/DisarmCode SHALL be a code entered into the ACE client (e.g., security keypad) or system by the - * user upon arming/disarming. The server MAY validate the Arm/Disarm Code received from the IAS ACE client - * in Arm command payload before arming or disarming the system. If the client does not have the capability - * to input an Arm/Disarm Code (e.g., keyfob),or the system does not require one, the client SHALL a transmit - * a string with a length of zero. - *

    - * There is no minimum or maximum length to the Arm/Disarm Code; however, the - * Arm/Disarm Code SHOULD be between four and eight alphanumeric characters in length. - *

    - * The string encoding SHALL be UTF-8. - */ - private String armDisarmCode; - - /** - * Zone ID command message field. - *

    - * Zone ID is the index of the Zone in the CIE's zone table. If none is programmed, the Zone - * ID default value SHALL be indicated in this field. - */ - private Integer zoneId; - - /** - * Default constructor. - */ - public ArmCommand() { - genericCommand = false; - clusterId = 1281; - commandId = 0; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Arm Mode. - * - * @return the Arm Mode - */ - public Integer getArmMode() { - return armMode; - } - - /** - * Sets Arm Mode. - * - * @param armMode the Arm Mode - */ - public void setArmMode(final Integer armMode) { - this.armMode = armMode; - } - - /** - * Gets Arm/Disarm Code. - * - * The Arm/DisarmCode SHALL be a code entered into the ACE client (e.g., security keypad) or system by the - * user upon arming/disarming. The server MAY validate the Arm/Disarm Code received from the IAS ACE client - * in Arm command payload before arming or disarming the system. If the client does not have the capability - * to input an Arm/Disarm Code (e.g., keyfob),or the system does not require one, the client SHALL a transmit - * a string with a length of zero. - *

    - * There is no minimum or maximum length to the Arm/Disarm Code; however, the - * Arm/Disarm Code SHOULD be between four and eight alphanumeric characters in length. - *

    - * The string encoding SHALL be UTF-8. - * - * @return the Arm/Disarm Code - */ - public String getArmDisarmCode() { - return armDisarmCode; - } - - /** - * Sets Arm/Disarm Code. - * - * The Arm/DisarmCode SHALL be a code entered into the ACE client (e.g., security keypad) or system by the - * user upon arming/disarming. The server MAY validate the Arm/Disarm Code received from the IAS ACE client - * in Arm command payload before arming or disarming the system. If the client does not have the capability - * to input an Arm/Disarm Code (e.g., keyfob),or the system does not require one, the client SHALL a transmit - * a string with a length of zero. - *

    - * There is no minimum or maximum length to the Arm/Disarm Code; however, the - * Arm/Disarm Code SHOULD be between four and eight alphanumeric characters in length. - *

    - * The string encoding SHALL be UTF-8. - * - * @param armDisarmCode the Arm/Disarm Code - */ - public void setArmDisarmCode(final String armDisarmCode) { - this.armDisarmCode = armDisarmCode; - } - - /** - * Gets Zone ID. - * - * Zone ID is the index of the Zone in the CIE's zone table. If none is programmed, the Zone - * ID default value SHALL be indicated in this field. - * - * @return the Zone ID - */ - public Integer getZoneId() { - return zoneId; - } - - /** - * Sets Zone ID. - * - * Zone ID is the index of the Zone in the CIE's zone table. If none is programmed, the Zone - * ID default value SHALL be indicated in this field. - * - * @param zoneId the Zone ID - */ - public void setZoneId(final Integer zoneId) { - this.zoneId = zoneId; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(armMode, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(armDisarmCode, ZclDataType.CHARACTER_STRING); - serializer.serialize(zoneId, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - armMode = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - armDisarmCode = (String) deserializer.deserialize(ZclDataType.CHARACTER_STRING); - zoneId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(99); - builder.append("ArmCommand ["); - builder.append(super.toString()); - builder.append(", armMode="); - builder.append(armMode); - builder.append(", armDisarmCode="); - builder.append(armDisarmCode); - builder.append(", zoneId="); - builder.append(zoneId); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/ArmModeEnum.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/ArmModeEnum.java deleted file mode 100644 index 376e0e7f7..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/ArmModeEnum.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.iasace; - -import java.util.HashMap; -import java.util.Map; - -import javax.annotation.Generated; - -/** - * Enumeration of IAS ACE attribute Arm Mode options. - *

    - * Code is auto-generated. Modifications may be overwritten! - * - * @author Chris Jackson - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-10T07:28:44Z") -public enum ArmModeEnum { - DISARM(0x0000), - ARM_DAY(0x0001), - ARM_NIGHT(0x0002), - ARM_ALL_ZONES(0x0003); - - /** - * A mapping between the integer code and its corresponding ArmModeEnum type to facilitate lookup by value. - */ - private static Map idMap; - - static { - idMap = new HashMap(); - for (ArmModeEnum enumValue : values()) { - idMap.put(enumValue.key, enumValue); - } - } - - private final int key; - - ArmModeEnum(final int key) { - this.key = key; - } - - public int getKey() { - return key; - } - - public static ArmModeEnum getByValue(final int value) { - return idMap.get(value); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/ArmNotificationEnum.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/ArmNotificationEnum.java deleted file mode 100644 index 77ddfbd37..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/ArmNotificationEnum.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.iasace; - -import java.util.HashMap; -import java.util.Map; - -import javax.annotation.Generated; - -/** - * Enumeration of IAS ACE attribute Arm Notification options. - *

    - * Code is auto-generated. Modifications may be overwritten! - * - * @author Chris Jackson - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-10T07:28:44Z") -public enum ArmNotificationEnum { - ALL_ZONES_DISARMED(0x0000), - DAY_ZONES_ARMED(0x0001), - NIGHT_ZONES_ARMED(0x0002), - ALL_ZONES_ARMED(0x0003), - INVALID_ARM_CODE(0x0004), - NOT_READY_TO_ARM(0x0005), - ALREADY_DISARMED(0x0006); - - /** - * A mapping between the integer code and its corresponding ArmNotificationEnum type to facilitate lookup by value. - */ - private static Map idMap; - - static { - idMap = new HashMap(); - for (ArmNotificationEnum enumValue : values()) { - idMap.put(enumValue.key, enumValue); - } - } - - private final int key; - - ArmNotificationEnum(final int key) { - this.key = key; - } - - public int getKey() { - return key; - } - - public static ArmNotificationEnum getByValue(final int value) { - return idMap.get(value); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/ArmResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/ArmResponse.java deleted file mode 100644 index ee68429cb..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/ArmResponse.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.iasace; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Arm Response value object class. - *

    - * Cluster: IAS ACE. Command is sent FROM the server. - * This command is a specific command used for the IAS ACE cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class ArmResponse extends ZclCommand { - /** - * Arm Notification command message field. - */ - private Integer armNotification; - - /** - * Default constructor. - */ - public ArmResponse() { - genericCommand = false; - clusterId = 1281; - commandId = 0; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Arm Notification. - * - * @return the Arm Notification - */ - public Integer getArmNotification() { - return armNotification; - } - - /** - * Sets Arm Notification. - * - * @param armNotification the Arm Notification - */ - public void setArmNotification(final Integer armNotification) { - this.armNotification = armNotification; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(armNotification, ZclDataType.ENUMERATION_8_BIT); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - armNotification = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(49); - builder.append("ArmResponse ["); - builder.append(super.toString()); - builder.append(", armNotification="); - builder.append(armNotification); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/BypassCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/BypassCommand.java deleted file mode 100644 index e01ff2192..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/BypassCommand.java +++ /dev/null @@ -1,163 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.iasace; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -import java.util.List; - -/** - * Bypass Command value object class. - *

    - * Cluster: IAS ACE. Command is sent TO the server. - * This command is a specific command used for the IAS ACE cluster. - *

    - * Provides IAS ACE clients with a method to send zone bypass requests to the IAS ACE server. - * Bypassed zones MAYbe faulted or in alarm but will not trigger the security system to go into alarm. - * For example, a user MAYwish to allow certain windows in his premises protected by an IAS Zone server to - * be left open while the user leaves the premises. The user could bypass the IAS Zone server protecting - * the window on his IAS ACE client (e.g., security keypad), and if the IAS ACE server indicates that zone is - * successfully by-passed, arm his security system while he is away. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class BypassCommand extends ZclCommand { - /** - * Number of Zones command message field. - */ - private Integer numberOfZones; - - /** - * Zone IDs command message field. - */ - private List zoneIDs; - - /** - * Arm/Disarm Code command message field. - *

    - * The Arm/DisarmCode SHALL be a code entered into the ACE client (e.g., security keypad) or system by the - * user upon arming/disarming. The server MAY validate the Arm/Disarm Code received from the IAS ACE client - * in Arm command payload before arming or disarming the system. If the client does not have the capability - * to input an Arm/Disarm Code (e.g., keyfob),or the system does not require one, the client SHALL a transmit - * a string with a length of zero. - */ - private String armDisarmCode; - - /** - * Default constructor. - */ - public BypassCommand() { - genericCommand = false; - clusterId = 1281; - commandId = 1; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Number of Zones. - * - * @return the Number of Zones - */ - public Integer getNumberOfZones() { - return numberOfZones; - } - - /** - * Sets Number of Zones. - * - * @param numberOfZones the Number of Zones - */ - public void setNumberOfZones(final Integer numberOfZones) { - this.numberOfZones = numberOfZones; - } - - /** - * Gets Zone IDs. - * - * @return the Zone IDs - */ - public List getZoneIDs() { - return zoneIDs; - } - - /** - * Sets Zone IDs. - * - * @param zoneIDs the Zone IDs - */ - public void setZoneIDs(final List zoneIDs) { - this.zoneIDs = zoneIDs; - } - - /** - * Gets Arm/Disarm Code. - * - * The Arm/DisarmCode SHALL be a code entered into the ACE client (e.g., security keypad) or system by the - * user upon arming/disarming. The server MAY validate the Arm/Disarm Code received from the IAS ACE client - * in Arm command payload before arming or disarming the system. If the client does not have the capability - * to input an Arm/Disarm Code (e.g., keyfob),or the system does not require one, the client SHALL a transmit - * a string with a length of zero. - * - * @return the Arm/Disarm Code - */ - public String getArmDisarmCode() { - return armDisarmCode; - } - - /** - * Sets Arm/Disarm Code. - * - * The Arm/DisarmCode SHALL be a code entered into the ACE client (e.g., security keypad) or system by the - * user upon arming/disarming. The server MAY validate the Arm/Disarm Code received from the IAS ACE client - * in Arm command payload before arming or disarming the system. If the client does not have the capability - * to input an Arm/Disarm Code (e.g., keyfob),or the system does not require one, the client SHALL a transmit - * a string with a length of zero. - * - * @param armDisarmCode the Arm/Disarm Code - */ - public void setArmDisarmCode(final String armDisarmCode) { - this.armDisarmCode = armDisarmCode; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(numberOfZones, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(zoneIDs, ZclDataType.N_X_UNSIGNED_8_BIT_INTEGER); - serializer.serialize(armDisarmCode, ZclDataType.CHARACTER_STRING); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - numberOfZones = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - zoneIDs = (List) deserializer.deserialize(ZclDataType.N_X_UNSIGNED_8_BIT_INTEGER); - armDisarmCode = (String) deserializer.deserialize(ZclDataType.CHARACTER_STRING); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(109); - builder.append("BypassCommand ["); - builder.append(super.toString()); - builder.append(", numberOfZones="); - builder.append(numberOfZones); - builder.append(", zoneIDs="); - builder.append(zoneIDs); - builder.append(", armDisarmCode="); - builder.append(armDisarmCode); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/BypassResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/BypassResponse.java deleted file mode 100644 index 1b2d52763..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/BypassResponse.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.iasace; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -import java.util.List; - -/** - * Bypass Response value object class. - *

    - * Cluster: IAS ACE. Command is sent FROM the server. - * This command is a specific command used for the IAS ACE cluster. - *

    - * Provides the response of the security panel to the request from the IAS ACE client to bypass zones via a Bypass command. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class BypassResponse extends ZclCommand { - /** - * Bypass Result command message field. - *

    - * An array of Zone IDs for each zone requested to be bypassed via the Bypass command where X is equal to the value of - * the Number of Zones field. The order of results for Zone IDs SHALL be the same as the order of Zone IDs sent in - * the Bypass command by the IAS ACE client. - */ - private List bypassResult; - - /** - * Default constructor. - */ - public BypassResponse() { - genericCommand = false; - clusterId = 1281; - commandId = 7; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Bypass Result. - * - * An array of Zone IDs for each zone requested to be bypassed via the Bypass command where X is equal to the value of - * the Number of Zones field. The order of results for Zone IDs SHALL be the same as the order of Zone IDs sent in - * the Bypass command by the IAS ACE client. - * - * @return the Bypass Result - */ - public List getBypassResult() { - return bypassResult; - } - - /** - * Sets Bypass Result. - * - * An array of Zone IDs for each zone requested to be bypassed via the Bypass command where X is equal to the value of - * the Number of Zones field. The order of results for Zone IDs SHALL be the same as the order of Zone IDs sent in - * the Bypass command by the IAS ACE client. - * - * @param bypassResult the Bypass Result - */ - public void setBypassResult(final List bypassResult) { - this.bypassResult = bypassResult; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(bypassResult, ZclDataType.N_X_UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - bypassResult = (List) deserializer.deserialize(ZclDataType.N_X_UNSIGNED_8_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(49); - builder.append("BypassResponse ["); - builder.append(super.toString()); - builder.append(", bypassResult="); - builder.append(bypassResult); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/BypassResultEnum.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/BypassResultEnum.java deleted file mode 100644 index 81b875d69..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/BypassResultEnum.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.iasace; - -import java.util.HashMap; -import java.util.Map; - -import javax.annotation.Generated; - -/** - * Enumeration of IAS ACE attribute Bypass Result options. - *

    - * Code is auto-generated. Modifications may be overwritten! - * - * @author Chris Jackson - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-31T12:00:43Z") -public enum BypassResultEnum { - ZONE_BYPASSED(0x0000), - ZONE_NOT_BYPASSED(0x0001), - NOT_ALLOWED(0x0002), - INVALID_ZONE_ID(0x0003), - UNKNOWN_ZONE_ID(0x0004), - INVALID_ARM_CODE(0x0005); - - /** - * A mapping between the integer code and its corresponding BypassResultEnum type to facilitate lookup by value. - */ - private static Map idMap; - - static { - idMap = new HashMap(); - for (BypassResultEnum enumValue : values()) { - idMap.put(enumValue.key, enumValue); - } - } - - private final int key; - - BypassResultEnum(final int key) { - this.key = key; - } - - public int getKey() { - return key; - } - - public static BypassResultEnum getByValue(final int value) { - return idMap.get(value); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/EmergencyCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/EmergencyCommand.java deleted file mode 100644 index 8bc3984fa..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/EmergencyCommand.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.iasace; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Emergency Command value object class. - *

    - * Cluster: IAS ACE. Command is sent TO the server. - * This command is a specific command used for the IAS ACE cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class EmergencyCommand extends ZclCommand { - /** - * Default constructor. - */ - public EmergencyCommand() { - genericCommand = false; - clusterId = 1281; - commandId = 2; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(19); - builder.append("EmergencyCommand ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/FireCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/FireCommand.java deleted file mode 100644 index fd73b157d..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/FireCommand.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.iasace; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Fire Command value object class. - *

    - * Cluster: IAS ACE. Command is sent TO the server. - * This command is a specific command used for the IAS ACE cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class FireCommand extends ZclCommand { - /** - * Default constructor. - */ - public FireCommand() { - genericCommand = false; - clusterId = 1281; - commandId = 3; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(14); - builder.append("FireCommand ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/GetBypassedZoneListCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/GetBypassedZoneListCommand.java deleted file mode 100644 index 61dfac3ad..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/GetBypassedZoneListCommand.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.iasace; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Get Bypassed Zone List Command value object class. - *

    - * Cluster: IAS ACE. Command is sent TO the server. - * This command is a specific command used for the IAS ACE cluster. - *

    - * Provides IAS ACE clients with a way to retrieve the list of zones to be bypassed. This provides them with the ability - * to provide greater local functionality (i.e., at the IAS ACE client) for users to modify the Bypassed Zone List and reduce - * communications to the IAS ACE server when trying to arm the CIE security system. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class GetBypassedZoneListCommand extends ZclCommand { - /** - * Default constructor. - */ - public GetBypassedZoneListCommand() { - genericCommand = false; - clusterId = 1281; - commandId = 8; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(29); - builder.append("GetBypassedZoneListCommand ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/GetPanelStatusCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/GetPanelStatusCommand.java deleted file mode 100644 index b89edf6b3..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/GetPanelStatusCommand.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.iasace; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Get Panel Status Command value object class. - *

    - * Cluster: IAS ACE. Command is sent TO the server. - * This command is a specific command used for the IAS ACE cluster. - *

    - * This command is used by ACE clients to request an update to the status (e.g., security - * system arm state) of the ACE server (i.e., the IAS CIE). In particular, this command is - * useful for battery-powered ACE clients with polling rates longer than the ZigBee standard - * check-in rate. - *
    - * On receipt of this command, the ACE server responds with the status of the security system. - * The IAS ACE server SHALL generate a Get Panel Status Response command. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class GetPanelStatusCommand extends ZclCommand { - /** - * Default constructor. - */ - public GetPanelStatusCommand() { - genericCommand = false; - clusterId = 1281; - commandId = 7; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(24); - builder.append("GetPanelStatusCommand ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/GetPanelStatusResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/GetPanelStatusResponse.java deleted file mode 100644 index 7774c0135..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/GetPanelStatusResponse.java +++ /dev/null @@ -1,207 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.iasace; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Get Panel Status Response value object class. - *

    - * Cluster: IAS ACE. Command is sent FROM the server. - * This command is a specific command used for the IAS ACE cluster. - *

    - * This command updates requesting IAS ACE clients in the system of changes to the security panel status recorded by - * the ACE server (e.g., IAS CIE device). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class GetPanelStatusResponse extends ZclCommand { - /** - * Panel Status command message field. - *

    - * Defines the current status of the alarm panel. - */ - private Integer panelStatus; - - /** - * Seconds Remaining command message field. - *

    - * Indicates the number of seconds remaining for the server to be in the state indicated in the PanelStatus parameter. - * The SecondsRemaining parameter SHALL be provided if the PanelStatus parameter has a value of 0x04 (Exit delay) or 0x05 (Entry delay). - *

    - * The default value SHALL be 0x00. - */ - private Integer secondsRemaining; - - /** - * Audible Notification command message field. - *

    - * Provide the ACE client with information on which type of audible notification it SHOULD make for the zone status change. This field is useful - * for telling the ACE client to play a standard chime or other audio indication or to mute and not sound an audible notification at all. This - * field also allows manufacturers to create additional audible alert types (e.g., dog barking, windchimes, conga drums) to enable users to - * customise their system. - */ - private Integer audibleNotification; - - /** - * Alarm Status command message field. - *

    - * Provides the ACE client with information on the type of alarm the panel is in if its Panel Status field indicates it is “in alarm.” This field - * MAY be useful for ACE clients to display or otherwise initiate notification for users. - */ - private Integer alarmStatus; - - /** - * Default constructor. - */ - public GetPanelStatusResponse() { - genericCommand = false; - clusterId = 1281; - commandId = 5; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Panel Status. - * - * Defines the current status of the alarm panel. - * - * @return the Panel Status - */ - public Integer getPanelStatus() { - return panelStatus; - } - - /** - * Sets Panel Status. - * - * Defines the current status of the alarm panel. - * - * @param panelStatus the Panel Status - */ - public void setPanelStatus(final Integer panelStatus) { - this.panelStatus = panelStatus; - } - - /** - * Gets Seconds Remaining. - * - * Indicates the number of seconds remaining for the server to be in the state indicated in the PanelStatus parameter. - * The SecondsRemaining parameter SHALL be provided if the PanelStatus parameter has a value of 0x04 (Exit delay) or 0x05 (Entry delay). - *

    - * The default value SHALL be 0x00. - * - * @return the Seconds Remaining - */ - public Integer getSecondsRemaining() { - return secondsRemaining; - } - - /** - * Sets Seconds Remaining. - * - * Indicates the number of seconds remaining for the server to be in the state indicated in the PanelStatus parameter. - * The SecondsRemaining parameter SHALL be provided if the PanelStatus parameter has a value of 0x04 (Exit delay) or 0x05 (Entry delay). - *

    - * The default value SHALL be 0x00. - * - * @param secondsRemaining the Seconds Remaining - */ - public void setSecondsRemaining(final Integer secondsRemaining) { - this.secondsRemaining = secondsRemaining; - } - - /** - * Gets Audible Notification. - * - * Provide the ACE client with information on which type of audible notification it SHOULD make for the zone status change. This field is useful for telling the ACE client to play a standard chime or other audio indication or to mute and not sound an audible notification at all. This field also allows manufacturers to create additional audible alert types (e.g., dog barking, windchimes, conga drums) to enable users to customise their system. - * - * @return the Audible Notification - */ - public Integer getAudibleNotification() { - return audibleNotification; - } - - /** - * Sets Audible Notification. - * - * Provide the ACE client with information on which type of audible notification it SHOULD make for the zone status change. This field is useful - * for telling the ACE client to play a standard chime or other audio indication or to mute and not sound an audible notification at all. This - * field also allows manufacturers to create additional audible alert types (e.g., dog barking, windchimes, conga drums) to enable users to - * customise their system. - * - * @param audibleNotification the Audible Notification - */ - public void setAudibleNotification(final Integer audibleNotification) { - this.audibleNotification = audibleNotification; - } - - /** - * Gets Alarm Status. - * - * Provides the ACE client with information on the type of alarm the panel is in if its Panel Status field indicates it is “in alarm.” This field MAY be useful for ACE clients to display or otherwise initiate notification for users. - * - * @return the Alarm Status - */ - public Integer getAlarmStatus() { - return alarmStatus; - } - - /** - * Sets Alarm Status. - * - * Provides the ACE client with information on the type of alarm the panel is in if its Panel Status field indicates it is “in alarm.” This field - * MAY be useful for ACE clients to display or otherwise initiate notification for users. - * - * @param alarmStatus the Alarm Status - */ - public void setAlarmStatus(final Integer alarmStatus) { - this.alarmStatus = alarmStatus; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(panelStatus, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(secondsRemaining, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(audibleNotification, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(alarmStatus, ZclDataType.ENUMERATION_8_BIT); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - panelStatus = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - secondsRemaining = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - audibleNotification = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - alarmStatus = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(162); - builder.append("GetPanelStatusResponse ["); - builder.append(super.toString()); - builder.append(", panelStatus="); - builder.append(panelStatus); - builder.append(", secondsRemaining="); - builder.append(secondsRemaining); - builder.append(", audibleNotification="); - builder.append(audibleNotification); - builder.append(", alarmStatus="); - builder.append(alarmStatus); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/GetZoneIdMapCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/GetZoneIdMapCommand.java deleted file mode 100644 index 1880432ba..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/GetZoneIdMapCommand.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.iasace; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Get Zone ID Map Command value object class. - *

    - * Cluster: IAS ACE. Command is sent TO the server. - * This command is a specific command used for the IAS ACE cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class GetZoneIdMapCommand extends ZclCommand { - /** - * Default constructor. - */ - public GetZoneIdMapCommand() { - genericCommand = false; - clusterId = 1281; - commandId = 5; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(22); - builder.append("GetZoneIdMapCommand ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/GetZoneIdMapResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/GetZoneIdMapResponse.java deleted file mode 100644 index 325f14556..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/GetZoneIdMapResponse.java +++ /dev/null @@ -1,490 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.iasace; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Get Zone ID Map Response value object class. - *

    - * Cluster: IAS ACE. Command is sent FROM the server. - * This command is a specific command used for the IAS ACE cluster. - *

    - * The 16 fields of the payload indicate whether each of the Zone IDs from 0 to 0xff is allocated or not. If bit n - * of Zone ID Map section N is set to 1, then Zone ID (16 x N + n ) is allocated, else it is not allocated - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class GetZoneIdMapResponse extends ZclCommand { - /** - * Zone ID Map section 0 command message field. - */ - private Integer zoneIdMapSection0; - - /** - * Zone ID Map section 1 command message field. - */ - private Integer zoneIdMapSection1; - - /** - * Zone ID Map section 2 command message field. - */ - private Integer zoneIdMapSection2; - - /** - * Zone ID Map section 3 command message field. - */ - private Integer zoneIdMapSection3; - - /** - * Zone ID Map section 4 command message field. - */ - private Integer zoneIdMapSection4; - - /** - * Zone ID Map section 5 command message field. - */ - private Integer zoneIdMapSection5; - - /** - * Zone ID Map section 6 command message field. - */ - private Integer zoneIdMapSection6; - - /** - * Zone ID Map section 7 command message field. - */ - private Integer zoneIdMapSection7; - - /** - * Zone ID Map section 8 command message field. - */ - private Integer zoneIdMapSection8; - - /** - * Zone ID Map section 9 command message field. - */ - private Integer zoneIdMapSection9; - - /** - * Zone ID Map section 10 command message field. - */ - private Integer zoneIdMapSection10; - - /** - * Zone ID Map section 11 command message field. - */ - private Integer zoneIdMapSection11; - - /** - * Zone ID Map section 12 command message field. - */ - private Integer zoneIdMapSection12; - - /** - * Zone ID Map section 13 command message field. - */ - private Integer zoneIdMapSection13; - - /** - * Zone ID Map section 14 command message field. - */ - private Integer zoneIdMapSection14; - - /** - * Zone ID Map section 15 command message field. - */ - private Integer zoneIdMapSection15; - - /** - * Default constructor. - */ - public GetZoneIdMapResponse() { - genericCommand = false; - clusterId = 1281; - commandId = 1; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Zone ID Map section 0. - * - * @return the Zone ID Map section 0 - */ - public Integer getZoneIdMapSection0() { - return zoneIdMapSection0; - } - - /** - * Sets Zone ID Map section 0. - * - * @param zoneIdMapSection0 the Zone ID Map section 0 - */ - public void setZoneIdMapSection0(final Integer zoneIdMapSection0) { - this.zoneIdMapSection0 = zoneIdMapSection0; - } - - /** - * Gets Zone ID Map section 1. - * - * @return the Zone ID Map section 1 - */ - public Integer getZoneIdMapSection1() { - return zoneIdMapSection1; - } - - /** - * Sets Zone ID Map section 1. - * - * @param zoneIdMapSection1 the Zone ID Map section 1 - */ - public void setZoneIdMapSection1(final Integer zoneIdMapSection1) { - this.zoneIdMapSection1 = zoneIdMapSection1; - } - - /** - * Gets Zone ID Map section 2. - * - * @return the Zone ID Map section 2 - */ - public Integer getZoneIdMapSection2() { - return zoneIdMapSection2; - } - - /** - * Sets Zone ID Map section 2. - * - * @param zoneIdMapSection2 the Zone ID Map section 2 - */ - public void setZoneIdMapSection2(final Integer zoneIdMapSection2) { - this.zoneIdMapSection2 = zoneIdMapSection2; - } - - /** - * Gets Zone ID Map section 3. - * - * @return the Zone ID Map section 3 - */ - public Integer getZoneIdMapSection3() { - return zoneIdMapSection3; - } - - /** - * Sets Zone ID Map section 3. - * - * @param zoneIdMapSection3 the Zone ID Map section 3 - */ - public void setZoneIdMapSection3(final Integer zoneIdMapSection3) { - this.zoneIdMapSection3 = zoneIdMapSection3; - } - - /** - * Gets Zone ID Map section 4. - * - * @return the Zone ID Map section 4 - */ - public Integer getZoneIdMapSection4() { - return zoneIdMapSection4; - } - - /** - * Sets Zone ID Map section 4. - * - * @param zoneIdMapSection4 the Zone ID Map section 4 - */ - public void setZoneIdMapSection4(final Integer zoneIdMapSection4) { - this.zoneIdMapSection4 = zoneIdMapSection4; - } - - /** - * Gets Zone ID Map section 5. - * - * @return the Zone ID Map section 5 - */ - public Integer getZoneIdMapSection5() { - return zoneIdMapSection5; - } - - /** - * Sets Zone ID Map section 5. - * - * @param zoneIdMapSection5 the Zone ID Map section 5 - */ - public void setZoneIdMapSection5(final Integer zoneIdMapSection5) { - this.zoneIdMapSection5 = zoneIdMapSection5; - } - - /** - * Gets Zone ID Map section 6. - * - * @return the Zone ID Map section 6 - */ - public Integer getZoneIdMapSection6() { - return zoneIdMapSection6; - } - - /** - * Sets Zone ID Map section 6. - * - * @param zoneIdMapSection6 the Zone ID Map section 6 - */ - public void setZoneIdMapSection6(final Integer zoneIdMapSection6) { - this.zoneIdMapSection6 = zoneIdMapSection6; - } - - /** - * Gets Zone ID Map section 7. - * - * @return the Zone ID Map section 7 - */ - public Integer getZoneIdMapSection7() { - return zoneIdMapSection7; - } - - /** - * Sets Zone ID Map section 7. - * - * @param zoneIdMapSection7 the Zone ID Map section 7 - */ - public void setZoneIdMapSection7(final Integer zoneIdMapSection7) { - this.zoneIdMapSection7 = zoneIdMapSection7; - } - - /** - * Gets Zone ID Map section 8. - * - * @return the Zone ID Map section 8 - */ - public Integer getZoneIdMapSection8() { - return zoneIdMapSection8; - } - - /** - * Sets Zone ID Map section 8. - * - * @param zoneIdMapSection8 the Zone ID Map section 8 - */ - public void setZoneIdMapSection8(final Integer zoneIdMapSection8) { - this.zoneIdMapSection8 = zoneIdMapSection8; - } - - /** - * Gets Zone ID Map section 9. - * - * @return the Zone ID Map section 9 - */ - public Integer getZoneIdMapSection9() { - return zoneIdMapSection9; - } - - /** - * Sets Zone ID Map section 9. - * - * @param zoneIdMapSection9 the Zone ID Map section 9 - */ - public void setZoneIdMapSection9(final Integer zoneIdMapSection9) { - this.zoneIdMapSection9 = zoneIdMapSection9; - } - - /** - * Gets Zone ID Map section 10. - * - * @return the Zone ID Map section 10 - */ - public Integer getZoneIdMapSection10() { - return zoneIdMapSection10; - } - - /** - * Sets Zone ID Map section 10. - * - * @param zoneIdMapSection10 the Zone ID Map section 10 - */ - public void setZoneIdMapSection10(final Integer zoneIdMapSection10) { - this.zoneIdMapSection10 = zoneIdMapSection10; - } - - /** - * Gets Zone ID Map section 11. - * - * @return the Zone ID Map section 11 - */ - public Integer getZoneIdMapSection11() { - return zoneIdMapSection11; - } - - /** - * Sets Zone ID Map section 11. - * - * @param zoneIdMapSection11 the Zone ID Map section 11 - */ - public void setZoneIdMapSection11(final Integer zoneIdMapSection11) { - this.zoneIdMapSection11 = zoneIdMapSection11; - } - - /** - * Gets Zone ID Map section 12. - * - * @return the Zone ID Map section 12 - */ - public Integer getZoneIdMapSection12() { - return zoneIdMapSection12; - } - - /** - * Sets Zone ID Map section 12. - * - * @param zoneIdMapSection12 the Zone ID Map section 12 - */ - public void setZoneIdMapSection12(final Integer zoneIdMapSection12) { - this.zoneIdMapSection12 = zoneIdMapSection12; - } - - /** - * Gets Zone ID Map section 13. - * - * @return the Zone ID Map section 13 - */ - public Integer getZoneIdMapSection13() { - return zoneIdMapSection13; - } - - /** - * Sets Zone ID Map section 13. - * - * @param zoneIdMapSection13 the Zone ID Map section 13 - */ - public void setZoneIdMapSection13(final Integer zoneIdMapSection13) { - this.zoneIdMapSection13 = zoneIdMapSection13; - } - - /** - * Gets Zone ID Map section 14. - * - * @return the Zone ID Map section 14 - */ - public Integer getZoneIdMapSection14() { - return zoneIdMapSection14; - } - - /** - * Sets Zone ID Map section 14. - * - * @param zoneIdMapSection14 the Zone ID Map section 14 - */ - public void setZoneIdMapSection14(final Integer zoneIdMapSection14) { - this.zoneIdMapSection14 = zoneIdMapSection14; - } - - /** - * Gets Zone ID Map section 15. - * - * @return the Zone ID Map section 15 - */ - public Integer getZoneIdMapSection15() { - return zoneIdMapSection15; - } - - /** - * Sets Zone ID Map section 15. - * - * @param zoneIdMapSection15 the Zone ID Map section 15 - */ - public void setZoneIdMapSection15(final Integer zoneIdMapSection15) { - this.zoneIdMapSection15 = zoneIdMapSection15; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(zoneIdMapSection0, ZclDataType.BITMAP_16_BIT); - serializer.serialize(zoneIdMapSection1, ZclDataType.BITMAP_16_BIT); - serializer.serialize(zoneIdMapSection2, ZclDataType.BITMAP_16_BIT); - serializer.serialize(zoneIdMapSection3, ZclDataType.BITMAP_16_BIT); - serializer.serialize(zoneIdMapSection4, ZclDataType.BITMAP_16_BIT); - serializer.serialize(zoneIdMapSection5, ZclDataType.BITMAP_16_BIT); - serializer.serialize(zoneIdMapSection6, ZclDataType.BITMAP_16_BIT); - serializer.serialize(zoneIdMapSection7, ZclDataType.BITMAP_16_BIT); - serializer.serialize(zoneIdMapSection8, ZclDataType.BITMAP_16_BIT); - serializer.serialize(zoneIdMapSection9, ZclDataType.BITMAP_16_BIT); - serializer.serialize(zoneIdMapSection10, ZclDataType.BITMAP_16_BIT); - serializer.serialize(zoneIdMapSection11, ZclDataType.BITMAP_16_BIT); - serializer.serialize(zoneIdMapSection12, ZclDataType.BITMAP_16_BIT); - serializer.serialize(zoneIdMapSection13, ZclDataType.BITMAP_16_BIT); - serializer.serialize(zoneIdMapSection14, ZclDataType.BITMAP_16_BIT); - serializer.serialize(zoneIdMapSection15, ZclDataType.BITMAP_16_BIT); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - zoneIdMapSection0 = (Integer) deserializer.deserialize(ZclDataType.BITMAP_16_BIT); - zoneIdMapSection1 = (Integer) deserializer.deserialize(ZclDataType.BITMAP_16_BIT); - zoneIdMapSection2 = (Integer) deserializer.deserialize(ZclDataType.BITMAP_16_BIT); - zoneIdMapSection3 = (Integer) deserializer.deserialize(ZclDataType.BITMAP_16_BIT); - zoneIdMapSection4 = (Integer) deserializer.deserialize(ZclDataType.BITMAP_16_BIT); - zoneIdMapSection5 = (Integer) deserializer.deserialize(ZclDataType.BITMAP_16_BIT); - zoneIdMapSection6 = (Integer) deserializer.deserialize(ZclDataType.BITMAP_16_BIT); - zoneIdMapSection7 = (Integer) deserializer.deserialize(ZclDataType.BITMAP_16_BIT); - zoneIdMapSection8 = (Integer) deserializer.deserialize(ZclDataType.BITMAP_16_BIT); - zoneIdMapSection9 = (Integer) deserializer.deserialize(ZclDataType.BITMAP_16_BIT); - zoneIdMapSection10 = (Integer) deserializer.deserialize(ZclDataType.BITMAP_16_BIT); - zoneIdMapSection11 = (Integer) deserializer.deserialize(ZclDataType.BITMAP_16_BIT); - zoneIdMapSection12 = (Integer) deserializer.deserialize(ZclDataType.BITMAP_16_BIT); - zoneIdMapSection13 = (Integer) deserializer.deserialize(ZclDataType.BITMAP_16_BIT); - zoneIdMapSection14 = (Integer) deserializer.deserialize(ZclDataType.BITMAP_16_BIT); - zoneIdMapSection15 = (Integer) deserializer.deserialize(ZclDataType.BITMAP_16_BIT); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(621); - builder.append("GetZoneIdMapResponse ["); - builder.append(super.toString()); - builder.append(", zoneIdMapSection0="); - builder.append(zoneIdMapSection0); - builder.append(", zoneIdMapSection1="); - builder.append(zoneIdMapSection1); - builder.append(", zoneIdMapSection2="); - builder.append(zoneIdMapSection2); - builder.append(", zoneIdMapSection3="); - builder.append(zoneIdMapSection3); - builder.append(", zoneIdMapSection4="); - builder.append(zoneIdMapSection4); - builder.append(", zoneIdMapSection5="); - builder.append(zoneIdMapSection5); - builder.append(", zoneIdMapSection6="); - builder.append(zoneIdMapSection6); - builder.append(", zoneIdMapSection7="); - builder.append(zoneIdMapSection7); - builder.append(", zoneIdMapSection8="); - builder.append(zoneIdMapSection8); - builder.append(", zoneIdMapSection9="); - builder.append(zoneIdMapSection9); - builder.append(", zoneIdMapSection10="); - builder.append(zoneIdMapSection10); - builder.append(", zoneIdMapSection11="); - builder.append(zoneIdMapSection11); - builder.append(", zoneIdMapSection12="); - builder.append(zoneIdMapSection12); - builder.append(", zoneIdMapSection13="); - builder.append(zoneIdMapSection13); - builder.append(", zoneIdMapSection14="); - builder.append(zoneIdMapSection14); - builder.append(", zoneIdMapSection15="); - builder.append(zoneIdMapSection15); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/GetZoneInformationCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/GetZoneInformationCommand.java deleted file mode 100644 index 84c47a193..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/GetZoneInformationCommand.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.iasace; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Get Zone Information Command value object class. - *

    - * Cluster: IAS ACE. Command is sent TO the server. - * This command is a specific command used for the IAS ACE cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class GetZoneInformationCommand extends ZclCommand { - /** - * Zone ID command message field. - */ - private Integer zoneId; - - /** - * Default constructor. - */ - public GetZoneInformationCommand() { - genericCommand = false; - clusterId = 1281; - commandId = 6; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Zone ID. - * - * @return the Zone ID - */ - public Integer getZoneId() { - return zoneId; - } - - /** - * Sets Zone ID. - * - * @param zoneId the Zone ID - */ - public void setZoneId(final Integer zoneId) { - this.zoneId = zoneId; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(zoneId, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - zoneId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(54); - builder.append("GetZoneInformationCommand ["); - builder.append(super.toString()); - builder.append(", zoneId="); - builder.append(zoneId); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/GetZoneInformationResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/GetZoneInformationResponse.java deleted file mode 100644 index 9dda0d2ad..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/GetZoneInformationResponse.java +++ /dev/null @@ -1,182 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.iasace; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; -import com.zsmartsystems.zigbee.IeeeAddress; - -/** - * Get Zone Information Response value object class. - *

    - * Cluster: IAS ACE. Command is sent FROM the server. - * This command is a specific command used for the IAS ACE cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class GetZoneInformationResponse extends ZclCommand { - /** - * Zone ID command message field. - */ - private Integer zoneId; - - /** - * Zone Type command message field. - */ - private Integer zoneType; - - /** - * IEEE address command message field. - */ - private IeeeAddress ieeeAddress; - - /** - * Zone Label command message field. - *

    - * Provides the ZoneLabel stored in the IAS CIE. If none is programmed, the IAS ACE server SHALL transmit a string with a length - * of zero.There is no minimum or maximum length to the Zone Label field; however, the Zone Label SHOULD be between 16 to 24 - * alphanumeric characters in length. - *

    - * The string encoding SHALL be UTF-8. - */ - private String zoneLabel; - - /** - * Default constructor. - */ - public GetZoneInformationResponse() { - genericCommand = false; - clusterId = 1281; - commandId = 2; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Zone ID. - * - * @return the Zone ID - */ - public Integer getZoneId() { - return zoneId; - } - - /** - * Sets Zone ID. - * - * @param zoneId the Zone ID - */ - public void setZoneId(final Integer zoneId) { - this.zoneId = zoneId; - } - - /** - * Gets Zone Type. - * - * @return the Zone Type - */ - public Integer getZoneType() { - return zoneType; - } - - /** - * Sets Zone Type. - * - * @param zoneType the Zone Type - */ - public void setZoneType(final Integer zoneType) { - this.zoneType = zoneType; - } - - /** - * Gets IEEE address. - * - * @return the IEEE address - */ - public IeeeAddress getIeeeAddress() { - return ieeeAddress; - } - - /** - * Sets IEEE address. - * - * @param ieeeAddress the IEEE address - */ - public void setIeeeAddress(final IeeeAddress ieeeAddress) { - this.ieeeAddress = ieeeAddress; - } - - /** - * Gets Zone Label. - * - * Provides the ZoneLabel stored in the IAS CIE. If none is programmed, the IAS ACE server SHALL transmit a string with a length - * of zero.There is no minimum or maximum length to the Zone Label field; however, the Zone Label SHOULD be between 16 to 24 - * alphanumeric characters in length. - *

    - * The string encoding SHALL be UTF-8. - * - * @return the Zone Label - */ - public String getZoneLabel() { - return zoneLabel; - } - - /** - * Sets Zone Label. - * - * Provides the ZoneLabel stored in the IAS CIE. If none is programmed, the IAS ACE server SHALL transmit a string with a length - * of zero.There is no minimum or maximum length to the Zone Label field; however, the Zone Label SHOULD be between 16 to 24 - * alphanumeric characters in length. - *

    - * The string encoding SHALL be UTF-8. - * - * @param zoneLabel the Zone Label - */ - public void setZoneLabel(final String zoneLabel) { - this.zoneLabel = zoneLabel; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(zoneId, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(zoneType, ZclDataType.ENUMERATION_16_BIT); - serializer.serialize(ieeeAddress, ZclDataType.IEEE_ADDRESS); - serializer.serialize(zoneLabel, ZclDataType.CHARACTER_STRING); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - zoneId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - zoneType = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_16_BIT); - ieeeAddress = (IeeeAddress) deserializer.deserialize(ZclDataType.IEEE_ADDRESS); - zoneLabel = (String) deserializer.deserialize(ZclDataType.CHARACTER_STRING); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(143); - builder.append("GetZoneInformationResponse ["); - builder.append(super.toString()); - builder.append(", zoneId="); - builder.append(zoneId); - builder.append(", zoneType="); - builder.append(zoneType); - builder.append(", ieeeAddress="); - builder.append(ieeeAddress); - builder.append(", zoneLabel="); - builder.append(zoneLabel); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/GetZoneStatusCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/GetZoneStatusCommand.java deleted file mode 100644 index e32e52137..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/GetZoneStatusCommand.java +++ /dev/null @@ -1,239 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.iasace; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Get Zone Status Command value object class. - *

    - * Cluster: IAS ACE. Command is sent TO the server. - * This command is a specific command used for the IAS ACE cluster. - *

    - * This command is used by ACE clients to request an update of the status of the IAS Zone devices managed by the ACE server - * (i.e., the IAS CIE). In particular, this command is useful for battery-powered ACE clients with polling rates longer than - * the ZigBee standard check-in rate. The command is similar to the Get Attributes Supported command in that it specifies a - * starting Zone ID and a number of Zone IDs for which information is requested. Depending on the number of IAS Zone devices - * managed by the IAS ACE server, sending the Zone Status of all zones MAY not fit into a single Get ZoneStatus Response command. - * IAS ACE clients MAY need to send multiple Get Zone Status commands in order to get the information they seek. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class GetZoneStatusCommand extends ZclCommand { - /** - * Starting Zone ID command message field. - *

    - * Specifies the starting Zone ID at which the IAS Client would like to obtain zone status information. - */ - private Integer startingZoneId; - - /** - * Max Zone IDs command message field. - *

    - * Specifies the maximum number of Zone IDs and corresponding Zone Statuses that are to be returned by the IAS ACE server - * when it responds with a Get Zone Status Response command - */ - private Integer maxZoneIDs; - - /** - * Zone Status Mask Flag command message field. - *

    - * Functions as a query operand with the Zone Status Mask field. If set to zero (i.e., FALSE), the IAS ACE server SHALL include all Zone - * IDs and their status, regardless of their Zone Status when it responds with a Get Zone Status Response command. If set to one (i.e., TRUE), - * the IAS ACE server SHALL include only those Zone IDs whose Zone Status attribute is equal to one or more of the Zone Statuses requested - * in the Zone Status Mask field of the Get Zone Status command. - *

    - * Use of Zone Status Mask Flag and Zone Status Mask fields allow a client to obtain updated information for the subset of Zone IDs - * they’re interested in, which is beneficial when the number of IAS Zone devices in a system is large. - */ - private Boolean zoneStatusMaskFlag; - - /** - * Zone Status Mask command message field. - *

    - * Coupled with the Zone Status Mask Flag field, functions as a mask to enable IAS ACE clients to get information about the Zone IDs whose - * ZoneStatus attribute is equal to any of the bits indicated by the IAS ACE client in the Zone Status Mask field. The format of this field - * is the same as the ZoneStatus attribute in the IAS Zone cluster. Per the Zone Status Mask Flag field, IAS ACE servers SHALL respond with - * only the Zone IDs whose ZoneStatus attributes are equal to at least one of the Zone Status bits set in the Zone Status Mask field requested - * by the IAS ACE client.For example, if the Zone Status Mask field set to “0x0003” would match IAS Zones whose ZoneStatus attributes are - * 0x0001, 0x0002, and 0x0003. - *

    - * In other words, if a logical 'AND' between the Zone Status Mask field and the IAS Zone’s ZoneStatus attribute yields a non-zero result, - * the IAS ACE server SHALL include that IAS Zone in the Get Zone Status Response command - */ - private Integer zoneStatusMask; - - /** - * Default constructor. - */ - public GetZoneStatusCommand() { - genericCommand = false; - clusterId = 1281; - commandId = 9; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Starting Zone ID. - * - * Specifies the starting Zone ID at which the IAS Client would like to obtain zone status information. - * - * @return the Starting Zone ID - */ - public Integer getStartingZoneId() { - return startingZoneId; - } - - /** - * Sets Starting Zone ID. - * - * Specifies the starting Zone ID at which the IAS Client would like to obtain zone status information. - * - * @param startingZoneId the Starting Zone ID - */ - public void setStartingZoneId(final Integer startingZoneId) { - this.startingZoneId = startingZoneId; - } - - /** - * Gets Max Zone IDs. - * - * Specifies the maximum number of Zone IDs and corresponding Zone Statuses that are to be returned by the IAS ACE server - * when it responds with a Get Zone Status Response command - * - * @return the Max Zone IDs - */ - public Integer getMaxZoneIDs() { - return maxZoneIDs; - } - - /** - * Sets Max Zone IDs. - * - * Specifies the maximum number of Zone IDs and corresponding Zone Statuses that are to be returned by the IAS ACE server - * when it responds with a Get Zone Status Response command - * - * @param maxZoneIDs the Max Zone IDs - */ - public void setMaxZoneIDs(final Integer maxZoneIDs) { - this.maxZoneIDs = maxZoneIDs; - } - - /** - * Gets Zone Status Mask Flag. - * - * Functions as a query operand with the Zone Status Mask field. If set to zero (i.e., FALSE), the IAS ACE server SHALL include all Zone - * IDs and their status, regardless of their Zone Status when it responds with a Get Zone Status Response command. If set to one (i.e., TRUE), - * the IAS ACE server SHALL include only those Zone IDs whose Zone Status attribute is equal to one or more of the Zone Statuses requested - * in the Zone Status Mask field of the Get Zone Status command. - *

    - * Use of Zone Status Mask Flag and Zone Status Mask fields allow a client to obtain updated information for the subset of Zone IDs - * they’re interested in, which is beneficial when the number of IAS Zone devices in a system is large. - * - * @return the Zone Status Mask Flag - */ - public Boolean getZoneStatusMaskFlag() { - return zoneStatusMaskFlag; - } - - /** - * Sets Zone Status Mask Flag. - * - * Functions as a query operand with the Zone Status Mask field. If set to zero (i.e., FALSE), the IAS ACE server SHALL include all Zone - * IDs and their status, regardless of their Zone Status when it responds with a Get Zone Status Response command. If set to one (i.e., TRUE), - * the IAS ACE server SHALL include only those Zone IDs whose Zone Status attribute is equal to one or more of the Zone Statuses requested - * in the Zone Status Mask field of the Get Zone Status command. - *

    - * Use of Zone Status Mask Flag and Zone Status Mask fields allow a client to obtain updated information for the subset of Zone IDs - * they’re interested in, which is beneficial when the number of IAS Zone devices in a system is large. - * - * @param zoneStatusMaskFlag the Zone Status Mask Flag - */ - public void setZoneStatusMaskFlag(final Boolean zoneStatusMaskFlag) { - this.zoneStatusMaskFlag = zoneStatusMaskFlag; - } - - /** - * Gets Zone Status Mask. - * - * Coupled with the Zone Status Mask Flag field, functions as a mask to enable IAS ACE clients to get information about the Zone IDs whose - * ZoneStatus attribute is equal to any of the bits indicated by the IAS ACE client in the Zone Status Mask field. The format of this field - * is the same as the ZoneStatus attribute in the IAS Zone cluster. Per the Zone Status Mask Flag field, IAS ACE servers SHALL respond with - * only the Zone IDs whose ZoneStatus attributes are equal to at least one of the Zone Status bits set in the Zone Status Mask field requested - * by the IAS ACE client.For example, if the Zone Status Mask field set to “0x0003” would match IAS Zones whose ZoneStatus attributes are - * 0x0001, 0x0002, and 0x0003. - *

    - * In other words, if a logical 'AND' between the Zone Status Mask field and the IAS Zone’s ZoneStatus attribute yields a non-zero result, - * the IAS ACE server SHALL include that IAS Zone in the Get Zone Status Response command - * - * @return the Zone Status Mask - */ - public Integer getZoneStatusMask() { - return zoneStatusMask; - } - - /** - * Sets Zone Status Mask. - * - * Coupled with the Zone Status Mask Flag field, functions as a mask to enable IAS ACE clients to get information about the Zone IDs whose - * ZoneStatus attribute is equal to any of the bits indicated by the IAS ACE client in the Zone Status Mask field. The format of this field - * is the same as the ZoneStatus attribute in the IAS Zone cluster. Per the Zone Status Mask Flag field, IAS ACE servers SHALL respond with - * only the Zone IDs whose ZoneStatus attributes are equal to at least one of the Zone Status bits set in the Zone Status Mask field requested - * by the IAS ACE client.For example, if the Zone Status Mask field set to “0x0003” would match IAS Zones whose ZoneStatus attributes are - * 0x0001, 0x0002, and 0x0003. - *

    - * In other words, if a logical 'AND' between the Zone Status Mask field and the IAS Zone’s ZoneStatus attribute yields a non-zero result, - * the IAS ACE server SHALL include that IAS Zone in the Get Zone Status Response command - * - * @param zoneStatusMask the Zone Status Mask - */ - public void setZoneStatusMask(final Integer zoneStatusMask) { - this.zoneStatusMask = zoneStatusMask; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(startingZoneId, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(maxZoneIDs, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(zoneStatusMaskFlag, ZclDataType.BOOLEAN); - serializer.serialize(zoneStatusMask, ZclDataType.BITMAP_16_BIT); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - startingZoneId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - maxZoneIDs = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - zoneStatusMaskFlag = (Boolean) deserializer.deserialize(ZclDataType.BOOLEAN); - zoneStatusMask = (Integer) deserializer.deserialize(ZclDataType.BITMAP_16_BIT); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(159); - builder.append("GetZoneStatusCommand ["); - builder.append(super.toString()); - builder.append(", startingZoneId="); - builder.append(startingZoneId); - builder.append(", maxZoneIDs="); - builder.append(maxZoneIDs); - builder.append(", zoneStatusMaskFlag="); - builder.append(zoneStatusMaskFlag); - builder.append(", zoneStatusMask="); - builder.append(zoneStatusMask); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/GetZoneStatusResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/GetZoneStatusResponse.java deleted file mode 100644 index 1985c9a1a..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/GetZoneStatusResponse.java +++ /dev/null @@ -1,217 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.iasace; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Get Zone Status Response value object class. - *

    - * Cluster: IAS ACE. Command is sent FROM the server. - * This command is a specific command used for the IAS ACE cluster. - *

    - * This command updates requesting IAS ACE clients in the system of changes to the IAS Zone server statuses recorded - * by the ACE server (e.g., IAS CIE device). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class GetZoneStatusResponse extends ZclCommand { - /** - * Zone Status Complete command message field. - *

    - * Indicates whether there are additional Zone IDs managed by the IAS ACE Server with Zone Status information to be obtained. - * A value of zero (i.e. FALSE) indicates there are additional Zone IDs for which Zone Status information is available and - * that the IAS ACE client SHOULD send another Get Zone Status command.A value of one (i.e. TRUE) indicates there are no - * more Zone IDs for the IAS ACE client to query and the IAS ACE client has received all the Zone Status information for all - * IAS Zones managed by the IAS ACE server. - *

    - * The IAS ACE client SHOULD NOT typically send another Get Zone Status command. - */ - private Boolean zoneStatusComplete; - - /** - * Number of zones command message field. - */ - private Integer numberOfZones; - - /** - * Ias Ace Zone Status command message field. - */ - private Integer iasAceZoneStatus; - - /** - * Zone Id command message field. - */ - private Integer zoneId; - - /** - * Zone Status command message field. - */ - private Integer zoneStatus; - - /** - * Default constructor. - */ - public GetZoneStatusResponse() { - genericCommand = false; - clusterId = 1281; - commandId = 8; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Zone Status Complete. - * - * Indicates whether there are additional Zone IDs managed by the IAS ACE Server with Zone Status information to be obtained. - * A value of zero (i.e. FALSE) indicates there are additional Zone IDs for which Zone Status information is available and - * that the IAS ACE client SHOULD send another Get Zone Status command.A value of one (i.e. TRUE) indicates there are no - * more Zone IDs for the IAS ACE client to query and the IAS ACE client has received all the Zone Status information for all - * IAS Zones managed by the IAS ACE server. - *

    - * The IAS ACE client SHOULD NOT typically send another Get Zone Status command. - * - * @return the Zone Status Complete - */ - public Boolean getZoneStatusComplete() { - return zoneStatusComplete; - } - - /** - * Sets Zone Status Complete. - * - * Indicates whether there are additional Zone IDs managed by the IAS ACE Server with Zone Status information to be obtained. - * A value of zero (i.e. FALSE) indicates there are additional Zone IDs for which Zone Status information is available and - * that the IAS ACE client SHOULD send another Get Zone Status command.A value of one (i.e. TRUE) indicates there are no - * more Zone IDs for the IAS ACE client to query and the IAS ACE client has received all the Zone Status information for all - * IAS Zones managed by the IAS ACE server. - *

    - * The IAS ACE client SHOULD NOT typically send another Get Zone Status command. - * - * @param zoneStatusComplete the Zone Status Complete - */ - public void setZoneStatusComplete(final Boolean zoneStatusComplete) { - this.zoneStatusComplete = zoneStatusComplete; - } - - /** - * Gets Number of zones. - * - * @return the Number of zones - */ - public Integer getNumberOfZones() { - return numberOfZones; - } - - /** - * Sets Number of zones. - * - * @param numberOfZones the Number of zones - */ - public void setNumberOfZones(final Integer numberOfZones) { - this.numberOfZones = numberOfZones; - } - - /** - * Gets Ias Ace Zone Status. - * - * @return the Ias Ace Zone Status - */ - public Integer getIasAceZoneStatus() { - return iasAceZoneStatus; - } - - /** - * Sets Ias Ace Zone Status. - * - * @param iasAceZoneStatus the Ias Ace Zone Status - */ - public void setIasAceZoneStatus(final Integer iasAceZoneStatus) { - this.iasAceZoneStatus = iasAceZoneStatus; - } - - /** - * Gets Zone Id. - * - * @return the Zone Id - */ - public Integer getZoneId() { - return zoneId; - } - - /** - * Sets Zone Id. - * - * @param zoneId the Zone Id - */ - public void setZoneId(final Integer zoneId) { - this.zoneId = zoneId; - } - - /** - * Gets Zone Status. - * - * @return the Zone Status - */ - public Integer getZoneStatus() { - return zoneStatus; - } - - /** - * Sets Zone Status. - * - * @param zoneStatus the Zone Status - */ - public void setZoneStatus(final Integer zoneStatus) { - this.zoneStatus = zoneStatus; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(zoneStatusComplete, ZclDataType.BOOLEAN); - serializer.serialize(numberOfZones, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(iasAceZoneStatus, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(zoneId, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(zoneStatus, ZclDataType.BITMAP_16_BIT); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - zoneStatusComplete = (Boolean) deserializer.deserialize(ZclDataType.BOOLEAN); - numberOfZones = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - iasAceZoneStatus = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - zoneId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - zoneStatus = (Integer) deserializer.deserialize(ZclDataType.BITMAP_16_BIT); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(187); - builder.append("GetZoneStatusResponse ["); - builder.append(super.toString()); - builder.append(", zoneStatusComplete="); - builder.append(zoneStatusComplete); - builder.append(", numberOfZones="); - builder.append(numberOfZones); - builder.append(", iasAceZoneStatus="); - builder.append(iasAceZoneStatus); - builder.append(", zoneId="); - builder.append(zoneId); - builder.append(", zoneStatus="); - builder.append(zoneStatus); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/PanelStatusChangedCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/PanelStatusChangedCommand.java deleted file mode 100644 index 8ff78a2aa..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/PanelStatusChangedCommand.java +++ /dev/null @@ -1,190 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.iasace; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Panel Status Changed Command value object class. - *

    - * Cluster: IAS ACE. Command is sent FROM the server. - * This command is a specific command used for the IAS ACE cluster. - *

    - * This command updates ACE clients in the system of changes to panel status recorded by the ACE server (e.g., IAS CIE - * device).Sending the Panel Status Changed command (vs.the Get Panel Status and Get Panel Status Response method) is - * generally useful only when there are IAS ACE clients that data poll within the retry timeout of the network (e.g., less than - * 7.68 seconds). - *
    - * An IAS ACE server SHALL send a Panel Status Changed command upon a change to the IAS CIE’s panel status (e.g., - * Disarmed to Arming Away/Stay/Night, Arming Away/Stay/Night to Armed, Armed to Disarmed) as defined in the Panel Status field. - *
    - * When Panel Status is Arming Away/Stay/Night, an IAS ACE server SHOULD send Panel Status Changed commands every second in order to - * update the Seconds Remaining. In some markets (e.g., North America), the final 10 seconds of the Arming Away/Stay/Night sequence - * requires a separate audible notification (e.g., a double tone). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class PanelStatusChangedCommand extends ZclCommand { - /** - * Panel Status command message field. - *

    - * Indicates the number of seconds remaining for the server to be in the state indicated in the PanelStatus parameter. - * The SecondsRemaining parameter SHALL be provided if the PanelStatus parameter has a value of 0x04 (Exit delay) or 0x05 (Entry delay). - *

    - * The default value SHALL be 0x00. - */ - private Integer panelStatus; - - /** - * Seconds Remaining command message field. - */ - private Integer secondsRemaining; - - /** - * Audible Notification command message field. - */ - private Integer audibleNotification; - - /** - * Alarm Status command message field. - */ - private Integer alarmStatus; - - /** - * Default constructor. - */ - public PanelStatusChangedCommand() { - genericCommand = false; - clusterId = 1281; - commandId = 4; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Panel Status. - * - * Indicates the number of seconds remaining for the server to be in the state indicated in the PanelStatus parameter. - * The SecondsRemaining parameter SHALL be provided if the PanelStatus parameter has a value of 0x04 (Exit delay) or 0x05 (Entry delay). - *

    - * The default value SHALL be 0x00. - * - * @return the Panel Status - */ - public Integer getPanelStatus() { - return panelStatus; - } - - /** - * Sets Panel Status. - * - * Indicates the number of seconds remaining for the server to be in the state indicated in the PanelStatus parameter. - * The SecondsRemaining parameter SHALL be provided if the PanelStatus parameter has a value of 0x04 (Exit delay) or 0x05 (Entry delay). - *

    - * The default value SHALL be 0x00. - * - * @param panelStatus the Panel Status - */ - public void setPanelStatus(final Integer panelStatus) { - this.panelStatus = panelStatus; - } - - /** - * Gets Seconds Remaining. - * - * @return the Seconds Remaining - */ - public Integer getSecondsRemaining() { - return secondsRemaining; - } - - /** - * Sets Seconds Remaining. - * - * @param secondsRemaining the Seconds Remaining - */ - public void setSecondsRemaining(final Integer secondsRemaining) { - this.secondsRemaining = secondsRemaining; - } - - /** - * Gets Audible Notification. - * - * @return the Audible Notification - */ - public Integer getAudibleNotification() { - return audibleNotification; - } - - /** - * Sets Audible Notification. - * - * @param audibleNotification the Audible Notification - */ - public void setAudibleNotification(final Integer audibleNotification) { - this.audibleNotification = audibleNotification; - } - - /** - * Gets Alarm Status. - * - * @return the Alarm Status - */ - public Integer getAlarmStatus() { - return alarmStatus; - } - - /** - * Sets Alarm Status. - * - * @param alarmStatus the Alarm Status - */ - public void setAlarmStatus(final Integer alarmStatus) { - this.alarmStatus = alarmStatus; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(panelStatus, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(secondsRemaining, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(audibleNotification, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(alarmStatus, ZclDataType.ENUMERATION_8_BIT); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - panelStatus = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - secondsRemaining = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - audibleNotification = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - alarmStatus = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(165); - builder.append("PanelStatusChangedCommand ["); - builder.append(super.toString()); - builder.append(", panelStatus="); - builder.append(panelStatus); - builder.append(", secondsRemaining="); - builder.append(secondsRemaining); - builder.append(", audibleNotification="); - builder.append(audibleNotification); - builder.append(", alarmStatus="); - builder.append(alarmStatus); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/PanelStatusEnum.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/PanelStatusEnum.java deleted file mode 100644 index a28d86064..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/PanelStatusEnum.java +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.iasace; - -import java.util.HashMap; -import java.util.Map; - -import javax.annotation.Generated; - -/** - * Enumeration of IAS ACE attribute Panel Status options. - *

    - * Code is auto-generated. Modifications may be overwritten! - * - * @author Chris Jackson - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-31T12:00:43Z") -public enum PanelStatusEnum { - PANEL_DISARMED(0x0000), - ARMED_STAY(0x0001), - ARMED_NIGHT(0x0002), - ARMED_AWAY(0x0003), - EXIT_DELAY(0x0004), - ENTRY_DELAY(0x0005), - NOT_READY_TO_ARM(0x0006), - IN_ALARM(0x0007), - ARMING_STAY(0x0008), - ARMING_NIGHT(0x0009), - ARMING_AWAY(0x000A); - - /** - * A mapping between the integer code and its corresponding PanelStatusEnum type to facilitate lookup by value. - */ - private static Map idMap; - - static { - idMap = new HashMap(); - for (PanelStatusEnum enumValue : values()) { - idMap.put(enumValue.key, enumValue); - } - } - - private final int key; - - PanelStatusEnum(final int key) { - this.key = key; - } - - public int getKey() { - return key; - } - - public static PanelStatusEnum getByValue(final int value) { - return idMap.get(value); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/PanicCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/PanicCommand.java deleted file mode 100644 index 81918f2ac..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/PanicCommand.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.iasace; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Panic Command value object class. - *

    - * Cluster: IAS ACE. Command is sent TO the server. - * This command is a specific command used for the IAS ACE cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class PanicCommand extends ZclCommand { - /** - * Default constructor. - */ - public PanicCommand() { - genericCommand = false; - clusterId = 1281; - commandId = 4; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(15); - builder.append("PanicCommand ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/SetBypassedZoneListCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/SetBypassedZoneListCommand.java deleted file mode 100644 index e23d954e4..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/SetBypassedZoneListCommand.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.iasace; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -import java.util.List; - -/** - * Set Bypassed Zone List Command value object class. - *

    - * Cluster: IAS ACE. Command is sent FROM the server. - * This command is a specific command used for the IAS ACE cluster. - *

    - * Sets the list of bypassed zones on the IAS ACE client. This command can be sent either as a response to the - * GetBypassedZoneList command or unsolicited when the list of bypassed zones changes on the ACE server. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class SetBypassedZoneListCommand extends ZclCommand { - /** - * Zone ID command message field. - *

    - * Zone ID is the index of the Zone in the CIE's zone table and is an array of Zone IDs for each zone that is bypassed - * where X is equal to the value of the Number of Zones field. There is no order imposed by the numbering of the Zone ID - * field in this command payload. IAS ACE servers SHOULD provide the array of Zone IDs in ascending order. - */ - private List zoneId; - - /** - * Default constructor. - */ - public SetBypassedZoneListCommand() { - genericCommand = false; - clusterId = 1281; - commandId = 6; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Zone ID. - * - * Zone ID is the index of the Zone in the CIE's zone table and is an array of Zone IDs for each zone that is bypassed - * where X is equal to the value of the Number of Zones field. There is no order imposed by the numbering of the Zone ID - * field in this command payload. IAS ACE servers SHOULD provide the array of Zone IDs in ascending order. - * - * @return the Zone ID - */ - public List getZoneId() { - return zoneId; - } - - /** - * Sets Zone ID. - * - * Zone ID is the index of the Zone in the CIE's zone table and is an array of Zone IDs for each zone that is bypassed - * where X is equal to the value of the Number of Zones field. There is no order imposed by the numbering of the Zone ID - * field in this command payload. IAS ACE servers SHOULD provide the array of Zone IDs in ascending order. - * - * @param zoneId the Zone ID - */ - public void setZoneId(final List zoneId) { - this.zoneId = zoneId; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(zoneId, ZclDataType.N_X_UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - zoneId = (List) deserializer.deserialize(ZclDataType.N_X_UNSIGNED_8_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(55); - builder.append("SetBypassedZoneListCommand ["); - builder.append(super.toString()); - builder.append(", zoneId="); - builder.append(zoneId); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/ZoneIdEnum.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/ZoneIdEnum.java deleted file mode 100644 index eb820bb51..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/ZoneIdEnum.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.iasace; - -import java.util.HashMap; -import java.util.Map; - -import javax.annotation.Generated; - -/** - * Enumeration of IAS ACE attribute Zone ID options. - *

    - * Code is auto-generated. Modifications may be overwritten! - * - * @author Chris Jackson - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-09T22:43:58Z") -public enum ZoneIdEnum { - ZONE_BYPASSED(0x0000), - ZONE_NOT_BYPASSED(0x0001), - NOT_ALLOWED(0x0002), - INVALID_ZONE_ID(0x0003), - UNKNOWN_ZONE_ID(0x0004), - INVALID_ARM_CODE(0x0005); - - /** - * A mapping between the integer code and its corresponding ZoneIdEnum type to facilitate lookup by value. - */ - private static Map idMap; - - static { - idMap = new HashMap(); - for (ZoneIdEnum enumValue : values()) { - idMap.put(enumValue.key, enumValue); - } - } - - private final int key; - - ZoneIdEnum(final int key) { - this.key = key; - } - - public int getKey() { - return key; - } - - public static ZoneIdEnum getByValue(final int value) { - return idMap.get(value); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/ZoneStatusChangedCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/ZoneStatusChangedCommand.java deleted file mode 100644 index 9c1dcf279..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iasace/ZoneStatusChangedCommand.java +++ /dev/null @@ -1,188 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.iasace; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Zone Status Changed Command value object class. - *

    - * Cluster: IAS ACE. Command is sent FROM the server. - * This command is a specific command used for the IAS ACE cluster. - *

    - * This command updates ACE clients in the system of changes to zone status recorded by the ACE server (e.g., IAS CIE device). - * An IAS ACE server SHOULD send a Zone Status Changed command upon a change to an IAS Zone device’s ZoneStatus that it manages (i.e., - * IAS ACE server SHOULD send a Zone Status Changed command upon receipt of a Zone Status Change Notification command). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class ZoneStatusChangedCommand extends ZclCommand { - /** - * Zone ID command message field. - *

    - * The index of the Zone in the CIE’s zone table (Table 8-11). If none is programmed, the ZoneID attribute default - * value SHALL be indicated in this field. - */ - private Integer zoneId; - - /** - * Zone Status command message field. - */ - private Integer zoneStatus; - - /** - * Audible Notification command message field. - */ - private Integer audibleNotification; - - /** - * Zone Label command message field. - *

    - * Provides the ZoneLabel stored in the IAS CIE. If none is programmed, the IAS ACE server SHALL transmit a string with a length - * of zero. There is no minimum or maximum length to the Zone Label field; however, the Zone Label SHOULD be between 16 to 24 - * alphanumeric characters in length. - */ - private String zoneLabel; - - /** - * Default constructor. - */ - public ZoneStatusChangedCommand() { - genericCommand = false; - clusterId = 1281; - commandId = 3; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Zone ID. - * - * The index of the Zone in the CIE’s zone table (Table 8-11). If none is programmed, the ZoneID attribute default - * value SHALL be indicated in this field. - * - * @return the Zone ID - */ - public Integer getZoneId() { - return zoneId; - } - - /** - * Sets Zone ID. - * - * The index of the Zone in the CIE’s zone table (Table 8-11). If none is programmed, the ZoneID attribute default - * value SHALL be indicated in this field. - * - * @param zoneId the Zone ID - */ - public void setZoneId(final Integer zoneId) { - this.zoneId = zoneId; - } - - /** - * Gets Zone Status. - * - * @return the Zone Status - */ - public Integer getZoneStatus() { - return zoneStatus; - } - - /** - * Sets Zone Status. - * - * @param zoneStatus the Zone Status - */ - public void setZoneStatus(final Integer zoneStatus) { - this.zoneStatus = zoneStatus; - } - - /** - * Gets Audible Notification. - * - * @return the Audible Notification - */ - public Integer getAudibleNotification() { - return audibleNotification; - } - - /** - * Sets Audible Notification. - * - * @param audibleNotification the Audible Notification - */ - public void setAudibleNotification(final Integer audibleNotification) { - this.audibleNotification = audibleNotification; - } - - /** - * Gets Zone Label. - * - * Provides the ZoneLabel stored in the IAS CIE. If none is programmed, the IAS ACE server SHALL transmit a string with a length - * of zero. There is no minimum or maximum length to the Zone Label field; however, the Zone Label SHOULD be between 16 to 24 - * alphanumeric characters in length. - * - * @return the Zone Label - */ - public String getZoneLabel() { - return zoneLabel; - } - - /** - * Sets Zone Label. - * - * Provides the ZoneLabel stored in the IAS CIE. If none is programmed, the IAS ACE server SHALL transmit a string with a length - * of zero. There is no minimum or maximum length to the Zone Label field; however, the Zone Label SHOULD be between 16 to 24 - * alphanumeric characters in length. - * - * @param zoneLabel the Zone Label - */ - public void setZoneLabel(final String zoneLabel) { - this.zoneLabel = zoneLabel; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(zoneId, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(zoneStatus, ZclDataType.ENUMERATION_16_BIT); - serializer.serialize(audibleNotification, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(zoneLabel, ZclDataType.CHARACTER_STRING); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - zoneId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - zoneStatus = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_16_BIT); - audibleNotification = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - zoneLabel = (String) deserializer.deserialize(ZclDataType.CHARACTER_STRING); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(151); - builder.append("ZoneStatusChangedCommand ["); - builder.append(super.toString()); - builder.append(", zoneId="); - builder.append(zoneId); - builder.append(", zoneStatus="); - builder.append(zoneStatus); - builder.append(", audibleNotification="); - builder.append(audibleNotification); - builder.append(", zoneLabel="); - builder.append(zoneLabel); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iaswd/SquawkCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iaswd/SquawkCommand.java deleted file mode 100644 index 7a6a1f4dc..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iaswd/SquawkCommand.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.iaswd; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Squawk Command value object class. - *

    - * Cluster: IAS WD. Command is sent TO the server. - * This command is a specific command used for the IAS WD cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class SquawkCommand extends ZclCommand { - /** - * Header command message field. - */ - private Integer header; - - /** - * Default constructor. - */ - public SquawkCommand() { - genericCommand = false; - clusterId = 1282; - commandId = 2; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Header. - * - * @return the Header - */ - public Integer getHeader() { - return header; - } - - /** - * Sets Header. - * - * @param header the Header - */ - public void setHeader(final Integer header) { - this.header = header; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(header, ZclDataType.DATA_8_BIT); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - header = (Integer) deserializer.deserialize(ZclDataType.DATA_8_BIT); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(42); - builder.append("SquawkCommand ["); - builder.append(super.toString()); - builder.append(", header="); - builder.append(header); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iaswd/StartWarningCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iaswd/StartWarningCommand.java deleted file mode 100644 index cf2ac1ba6..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iaswd/StartWarningCommand.java +++ /dev/null @@ -1,115 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.iaswd; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Start Warning Command value object class. - *

    - * Cluster: IAS WD. Command is sent TO the server. - * This command is a specific command used for the IAS WD cluster. - *

    - * This command starts the WD operation. The WD alerts the surrounding area by - * audible (siren) and visual (strobe) signals. - *
    - * A Start Warning command shall always terminate the effect of any previous - * command that is still current. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class StartWarningCommand extends ZclCommand { - /** - * Header command message field. - */ - private Integer header; - - /** - * Warning duration command message field. - */ - private Integer warningDuration; - - /** - * Default constructor. - */ - public StartWarningCommand() { - genericCommand = false; - clusterId = 1282; - commandId = 0; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Header. - * - * @return the Header - */ - public Integer getHeader() { - return header; - } - - /** - * Sets Header. - * - * @param header the Header - */ - public void setHeader(final Integer header) { - this.header = header; - } - - /** - * Gets Warning duration. - * - * @return the Warning duration - */ - public Integer getWarningDuration() { - return warningDuration; - } - - /** - * Sets Warning duration. - * - * @param warningDuration the Warning duration - */ - public void setWarningDuration(final Integer warningDuration) { - this.warningDuration = warningDuration; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(header, ZclDataType.DATA_8_BIT); - serializer.serialize(warningDuration, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - header = (Integer) deserializer.deserialize(ZclDataType.DATA_8_BIT); - warningDuration = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(83); - builder.append("StartWarningCommand ["); - builder.append(super.toString()); - builder.append(", header="); - builder.append(header); - builder.append(", warningDuration="); - builder.append(warningDuration); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iaszone/EnrollResponseCodeEnum.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iaszone/EnrollResponseCodeEnum.java deleted file mode 100644 index 061ace7fa..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iaszone/EnrollResponseCodeEnum.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.iaszone; - -import java.util.HashMap; -import java.util.Map; - -import javax.annotation.Generated; - -/** - * Enumeration of IAS Zone attribute Enroll response code options. - *

    - * Code is auto-generated. Modifications may be overwritten! - * - * @author Chris Jackson - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-31T12:00:43Z") -public enum EnrollResponseCodeEnum { - SUCCESS(0x0000), - NOT_SUPPORTED(0x0001), - NO_ENROLL_PERMIT(0x0002), - TOO_MANY_ZONES(0x0003); - - /** - * A mapping between the integer code and its corresponding EnrollResponseCodeEnum type to facilitate lookup by value. - */ - private static Map idMap; - - static { - idMap = new HashMap(); - for (EnrollResponseCodeEnum enumValue : values()) { - idMap.put(enumValue.key, enumValue); - } - } - - private final int key; - - EnrollResponseCodeEnum(final int key) { - this.key = key; - } - - public int getKey() { - return key; - } - - public static EnrollResponseCodeEnum getByValue(final int value) { - return idMap.get(value); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iaszone/InitiateNormalOperationModeCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iaszone/InitiateNormalOperationModeCommand.java deleted file mode 100644 index 028d429f0..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iaszone/InitiateNormalOperationModeCommand.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.iaszone; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Initiate Normal Operation Mode Command value object class. - *

    - * Cluster: IAS Zone. Command is sent TO the server. - * This command is a specific command used for the IAS Zone cluster. - *

    - * Used to tell the IAS Zone server to commence normal operation mode. - *
    - * Upon receipt, the IAS Zone server SHALL commence normal operational mode. - *
    - * Any configurations and changes made (e.g., CurrentZoneSensitivityLevel attribute) to the IAS Zone server SHALL be retained. - *
    - * Upon commencing normal operation mode, the IAS Zone server SHALL send a Zone Status Change Notification command updating the ZoneStatus - * attribute Test bit to zero (i.e., “operation mode”). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-05-06T20:48:39Z") -public class InitiateNormalOperationModeCommand extends ZclCommand { - /** - * Default constructor. - */ - public InitiateNormalOperationModeCommand() { - genericCommand = false; - clusterId = 1280; - commandId = 1; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(37); - builder.append("InitiateNormalOperationModeCommand ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iaszone/InitiateTestModeCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iaszone/InitiateTestModeCommand.java deleted file mode 100644 index 95ef0c969..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iaszone/InitiateTestModeCommand.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.iaszone; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Initiate Test Mode Command value object class. - *

    - * Cluster: IAS Zone. Command is sent TO the server. - * This command is a specific command used for the IAS Zone cluster. - *

    - * Certain IAS Zone servers MAY have operational configurations that could be configured OTA or locally on the device. This command enables - * them to be remotely placed into a test mode so that the user or installer MAY configure their field of view, sensitivity, and other - * operational parameters. They MAY also verify the placement and proper operation of the IAS Zone server, which MAY have been placed in a - * difficult to reach location (i.e., making a physical input on the device impractical to trigger). - *
    - * Another use case for this command is large deployments, especially commercial and industrial, where placing the entire IAS system into - * test mode instead of a single IAS Zone server is infeasible due to the vulnerabilities that might arise. This command enables only a single - * IAS Zone server to be placed into test mode. - *
    - * The biggest limitation of this command is that most IAS Zone servers today are battery-powered sleepy nodes that cannot reliably receive - * commands. However, implementers MAY decide to program an IAS Zone server by factory default to maintain a limited duration of normal - * polling upon initialization/joining to a new network. Some IAS Zone servers MAY also have AC mains power and are able to receive commands. - * Some types of IAS Zone servers that MAY benefit from this command are: motion sensors and fire sensor/smoke alarm listeners (i.e., a device - * that listens for a non-communicating fire sensor to alarm and communicates this to the IAS CIE). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-05-06T20:27:25Z") -public class InitiateTestModeCommand extends ZclCommand { - /** - * Test Mode Duration command message field. - */ - private Integer testModeDuration; - - /** - * Current Zone Sensitivity Level command message field. - */ - private Integer currentZoneSensitivityLevel; - - /** - * Default constructor. - */ - public InitiateTestModeCommand() { - genericCommand = false; - clusterId = 1280; - commandId = 2; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Test Mode Duration. - * - * @return the Test Mode Duration - */ - public Integer getTestModeDuration() { - return testModeDuration; - } - - /** - * Sets Test Mode Duration. - * - * @param testModeDuration the Test Mode Duration - */ - public void setTestModeDuration(final Integer testModeDuration) { - this.testModeDuration = testModeDuration; - } - - /** - * Gets Current Zone Sensitivity Level. - * - * @return the Current Zone Sensitivity Level - */ - public Integer getCurrentZoneSensitivityLevel() { - return currentZoneSensitivityLevel; - } - - /** - * Sets Current Zone Sensitivity Level. - * - * @param currentZoneSensitivityLevel the Current Zone Sensitivity Level - */ - public void setCurrentZoneSensitivityLevel(final Integer currentZoneSensitivityLevel) { - this.currentZoneSensitivityLevel = currentZoneSensitivityLevel; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(testModeDuration, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(currentZoneSensitivityLevel, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - testModeDuration = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - currentZoneSensitivityLevel = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(109); - builder.append("InitiateTestModeCommand ["); - builder.append(super.toString()); - builder.append(", testModeDuration="); - builder.append(testModeDuration); - builder.append(", currentZoneSensitivityLevel="); - builder.append(currentZoneSensitivityLevel); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iaszone/ZoneEnrollRequestCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iaszone/ZoneEnrollRequestCommand.java deleted file mode 100644 index d21edefca..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iaszone/ZoneEnrollRequestCommand.java +++ /dev/null @@ -1,113 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.iaszone; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Zone Enroll Request Command value object class. - *

    - * Cluster: IAS Zone. Command is sent FROM the server. - * This command is a specific command used for the IAS Zone cluster. - *

    - * The Zone Enroll Request command is generated when a device embodying the Zone server cluster wishes - * to be enrolled as an active alarm device. It must do this immediately it has joined the network - * (during commissioning). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class ZoneEnrollRequestCommand extends ZclCommand { - /** - * Zone Type command message field. - */ - private Integer zoneType; - - /** - * Manufacturer Code command message field. - */ - private Integer manufacturerCode; - - /** - * Default constructor. - */ - public ZoneEnrollRequestCommand() { - genericCommand = false; - clusterId = 1280; - commandId = 1; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Zone Type. - * - * @return the Zone Type - */ - public Integer getZoneType() { - return zoneType; - } - - /** - * Sets Zone Type. - * - * @param zoneType the Zone Type - */ - public void setZoneType(final Integer zoneType) { - this.zoneType = zoneType; - } - - /** - * Gets Manufacturer Code. - * - * @return the Manufacturer Code - */ - public Integer getManufacturerCode() { - return manufacturerCode; - } - - /** - * Sets Manufacturer Code. - * - * @param manufacturerCode the Manufacturer Code - */ - public void setManufacturerCode(final Integer manufacturerCode) { - this.manufacturerCode = manufacturerCode; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(zoneType, ZclDataType.ENUMERATION_16_BIT); - serializer.serialize(manufacturerCode, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - zoneType = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_16_BIT); - manufacturerCode = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(91); - builder.append("ZoneEnrollRequestCommand ["); - builder.append(super.toString()); - builder.append(", zoneType="); - builder.append(zoneType); - builder.append(", manufacturerCode="); - builder.append(manufacturerCode); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iaszone/ZoneEnrollResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iaszone/ZoneEnrollResponse.java deleted file mode 100644 index d5e38eab6..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iaszone/ZoneEnrollResponse.java +++ /dev/null @@ -1,126 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.iaszone; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Zone Enroll Response value object class. - *

    - * Cluster: IAS Zone. Command is sent TO the server. - * This command is a specific command used for the IAS Zone cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-05-06T20:27:25Z") -public class ZoneEnrollResponse extends ZclCommand { - /** - * Enroll response code command message field. - *

    - * Specifies the duration, in seconds, for which the IAS Zone server SHALL operate in its test mode. - * Specifies the sensitivity level the IAS Zone server SHALL use for the duration of the Test Mode and with which it must update its - * CurrentZoneSensitivityLevel attribute. - *

    - * The permitted values of Current Zone Sensitivity Level are shown defined for the CurrentZoneSensitivityLevel Attribute. - */ - private Integer enrollResponseCode; - - /** - * Zone ID command message field. - */ - private Integer zoneId; - - /** - * Default constructor. - */ - public ZoneEnrollResponse() { - genericCommand = false; - clusterId = 1280; - commandId = 0; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Enroll response code. - * - * Specifies the duration, in seconds, for which the IAS Zone server SHALL operate in its test mode. - * Specifies the sensitivity level the IAS Zone server SHALL use for the duration of the Test Mode and with which it must update its CurrentZoneSensitivityLevel attribute. - *

    - * The permitted values of Current Zone Sensitivity Level are shown defined for the CurrentZoneSensitivityLevel Attribute. - * - * @return the Enroll response code - */ - public Integer getEnrollResponseCode() { - return enrollResponseCode; - } - - /** - * Sets Enroll response code. - * - * Specifies the duration, in seconds, for which the IAS Zone server SHALL operate in its test mode. - * Specifies the sensitivity level the IAS Zone server SHALL use for the duration of the Test Mode and with which it must update its - * CurrentZoneSensitivityLevel attribute. - *

    - * The permitted values of Current Zone Sensitivity Level are shown defined for the CurrentZoneSensitivityLevel Attribute. - * - * @param enrollResponseCode the Enroll response code - */ - public void setEnrollResponseCode(final Integer enrollResponseCode) { - this.enrollResponseCode = enrollResponseCode; - } - - /** - * Gets Zone ID. - * - * @return the Zone ID - */ - public Integer getZoneId() { - return zoneId; - } - - /** - * Sets Zone ID. - * - * @param zoneId the Zone ID - */ - public void setZoneId(final Integer zoneId) { - this.zoneId = zoneId; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(enrollResponseCode, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(zoneId, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - enrollResponseCode = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - zoneId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(85); - builder.append("ZoneEnrollResponse ["); - builder.append(super.toString()); - builder.append(", enrollResponseCode="); - builder.append(enrollResponseCode); - builder.append(", zoneId="); - builder.append(zoneId); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iaszone/ZoneStateEnum.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iaszone/ZoneStateEnum.java deleted file mode 100644 index b3611c122..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iaszone/ZoneStateEnum.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.iaszone; - -import java.util.HashMap; -import java.util.Map; - -import javax.annotation.Generated; - -/** - * Enumeration of IAS Zone attribute ZoneState options. - *

    - * Code is auto-generated. Modifications may be overwritten! - * - * @author Chris Jackson - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-31T12:00:43Z") -public enum ZoneStateEnum { - NOT_ENROLLED(0x0000), - ENROLLED(0x0001); - - /** - * A mapping between the integer code and its corresponding ZoneStateEnum type to facilitate lookup by value. - */ - private static Map idMap; - - static { - idMap = new HashMap(); - for (ZoneStateEnum enumValue : values()) { - idMap.put(enumValue.key, enumValue); - } - } - - private final int key; - - ZoneStateEnum(final int key) { - this.key = key; - } - - public int getKey() { - return key; - } - - public static ZoneStateEnum getByValue(final int value) { - return idMap.get(value); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iaszone/ZoneStatusChangeNotificationCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iaszone/ZoneStatusChangeNotificationCommand.java deleted file mode 100644 index 6a2ca7930..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iaszone/ZoneStatusChangeNotificationCommand.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.iaszone; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Zone Status Change Notification Command value object class. - *

    - * Cluster: IAS Zone. Command is sent FROM the server. - * This command is a specific command used for the IAS Zone cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class ZoneStatusChangeNotificationCommand extends ZclCommand { - /** - * Zone Status command message field. - */ - private Integer zoneStatus; - - /** - * Extended Status command message field. - */ - private Integer extendedStatus; - - /** - * Default constructor. - */ - public ZoneStatusChangeNotificationCommand() { - genericCommand = false; - clusterId = 1280; - commandId = 0; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Zone Status. - * - * @return the Zone Status - */ - public Integer getZoneStatus() { - return zoneStatus; - } - - /** - * Sets Zone Status. - * - * @param zoneStatus the Zone Status - */ - public void setZoneStatus(final Integer zoneStatus) { - this.zoneStatus = zoneStatus; - } - - /** - * Gets Extended Status. - * - * @return the Extended Status - */ - public Integer getExtendedStatus() { - return extendedStatus; - } - - /** - * Sets Extended Status. - * - * @param extendedStatus the Extended Status - */ - public void setExtendedStatus(final Integer extendedStatus) { - this.extendedStatus = extendedStatus; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(zoneStatus, ZclDataType.ENUMERATION_16_BIT); - serializer.serialize(extendedStatus, ZclDataType.ENUMERATION_8_BIT); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - zoneStatus = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_16_BIT); - extendedStatus = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(102); - builder.append("ZoneStatusChangeNotificationCommand ["); - builder.append(super.toString()); - builder.append(", zoneStatus="); - builder.append(zoneStatus); - builder.append(", extendedStatus="); - builder.append(extendedStatus); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iaszone/ZoneTypeEnum.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iaszone/ZoneTypeEnum.java deleted file mode 100644 index adee64a52..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/iaszone/ZoneTypeEnum.java +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.iaszone; - -import java.util.HashMap; -import java.util.Map; - -import javax.annotation.Generated; - -/** - * Enumeration of IAS Zone attribute ZoneType options. - *

    - * Code is auto-generated. Modifications may be overwritten! - * - * @author Chris Jackson - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-05-09T17:59:58Z") -public enum ZoneTypeEnum { - STANDARD_CIE(0x0000), - MOTION_SENSOR(0x000D), - CONTACT_SWITCH(0x0015), - FIRE_SENSOR(0x0028), - WATER_SENSOR(0x002A), - CO_SENSOR(0x002B), - PERSONAL_EMERGENCY_DEVICE(0x002C), - VIBRATION_MOVEMENT_SENSOR(0x002D), - REMOTE_CONTROL(0x010F), - KEY_FOB(0x0115), - KEY_PAD(0x021D), - STANDARD_WARNING_DEVICE(0x0225), - GLASS_BREAK_SENSOR(0x0226), - SECURITY_REPEATER(0x0229); - - /** - * A mapping between the integer code and its corresponding ZoneTypeEnum type to facilitate lookup by value. - */ - private static Map idMap; - - static { - idMap = new HashMap(); - for (ZoneTypeEnum enumValue : values()) { - idMap.put(enumValue.key, enumValue); - } - } - - private final int key; - - ZoneTypeEnum(final int key) { - this.key = key; - } - - public int getKey() { - return key; - } - - public static ZoneTypeEnum getByValue(final int value) { - return idMap.get(value); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/identify/IdentifyCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/identify/IdentifyCommand.java deleted file mode 100644 index 231b603a9..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/identify/IdentifyCommand.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.identify; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Identify Command value object class. - *

    - * Cluster: Identify. Command is sent TO the server. - * This command is a specific command used for the Identify cluster. - *

    - * The identify command starts or stops the receiving device identifying itself. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class IdentifyCommand extends ZclCommand { - /** - * Identify Time command message field. - */ - private Integer identifyTime; - - /** - * Default constructor. - */ - public IdentifyCommand() { - genericCommand = false; - clusterId = 3; - commandId = 0; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Identify Time. - * - * @return the Identify Time - */ - public Integer getIdentifyTime() { - return identifyTime; - } - - /** - * Sets Identify Time. - * - * @param identifyTime the Identify Time - */ - public void setIdentifyTime(final Integer identifyTime) { - this.identifyTime = identifyTime; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(identifyTime, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - identifyTime = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(50); - builder.append("IdentifyCommand ["); - builder.append(super.toString()); - builder.append(", identifyTime="); - builder.append(identifyTime); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/identify/IdentifyQueryCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/identify/IdentifyQueryCommand.java deleted file mode 100644 index aad26b29a..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/identify/IdentifyQueryCommand.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.identify; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Identify Query Command value object class. - *

    - * Cluster: Identify. Command is sent TO the server. - * This command is a specific command used for the Identify cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class IdentifyQueryCommand extends ZclCommand { - /** - * Default constructor. - */ - public IdentifyQueryCommand() { - genericCommand = false; - clusterId = 3; - commandId = 1; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(23); - builder.append("IdentifyQueryCommand ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/identify/IdentifyQueryResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/identify/IdentifyQueryResponse.java deleted file mode 100644 index 548d6bfd1..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/identify/IdentifyQueryResponse.java +++ /dev/null @@ -1,85 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.identify; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Identify Query Response value object class. - *

    - * Cluster: Identify. Command is sent FROM the server. - * This command is a specific command used for the Identify cluster. - *

    - * The identify query response command is generated in response to receiving an - * Identify Query command in the case that the device is currently identifying itself. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class IdentifyQueryResponse extends ZclCommand { - /** - * Identify Time command message field. - */ - private Integer identifyTime; - - /** - * Default constructor. - */ - public IdentifyQueryResponse() { - genericCommand = false; - clusterId = 3; - commandId = 0; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Identify Time. - * - * @return the Identify Time - */ - public Integer getIdentifyTime() { - return identifyTime; - } - - /** - * Sets Identify Time. - * - * @param identifyTime the Identify Time - */ - public void setIdentifyTime(final Integer identifyTime) { - this.identifyTime = identifyTime; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(identifyTime, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - identifyTime = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(56); - builder.append("IdentifyQueryResponse ["); - builder.append(super.toString()); - builder.append(", identifyTime="); - builder.append(identifyTime); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/levelcontrol/MoveCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/levelcontrol/MoveCommand.java deleted file mode 100644 index 63aba71e0..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/levelcontrol/MoveCommand.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.levelcontrol; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Move Command value object class. - *

    - * Cluster: Level Control. Command is sent TO the server. - * This command is a specific command used for the Level Control cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class MoveCommand extends ZclCommand { - /** - * Move mode command message field. - */ - private Integer moveMode; - - /** - * Rate command message field. - */ - private Integer rate; - - /** - * Default constructor. - */ - public MoveCommand() { - genericCommand = false; - clusterId = 8; - commandId = 1; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Move mode. - * - * @return the Move mode - */ - public Integer getMoveMode() { - return moveMode; - } - - /** - * Sets Move mode. - * - * @param moveMode the Move mode - */ - public void setMoveMode(final Integer moveMode) { - this.moveMode = moveMode; - } - - /** - * Gets Rate. - * - * @return the Rate - */ - public Integer getRate() { - return rate; - } - - /** - * Sets Rate. - * - * @param rate the Rate - */ - public void setRate(final Integer rate) { - this.rate = rate; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(moveMode, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(rate, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - moveMode = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - rate = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(66); - builder.append("MoveCommand ["); - builder.append(super.toString()); - builder.append(", moveMode="); - builder.append(moveMode); - builder.append(", rate="); - builder.append(rate); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/levelcontrol/MoveToLevelCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/levelcontrol/MoveToLevelCommand.java deleted file mode 100644 index 94d178ead..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/levelcontrol/MoveToLevelCommand.java +++ /dev/null @@ -1,120 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.levelcontrol; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Move to Level Command value object class. - *

    - * Cluster: Level Control. Command is sent TO the server. - * This command is a specific command used for the Level Control cluster. - *

    - * On receipt of this command, a device SHALL move from its current level to the - * value given in the Level field. The meaning of ‘level’ is device dependent –e.g., - * for a light it MAY mean brightness level.The movement SHALL be as continuous as - * technically practical, i.e., not a step function, and the time taken to move to - * the new level SHALL be equal to the value of the Transition time field, in tenths - * of a second, or as close to this as the device is able.If the Transition time field - * takes the value 0xffff then the time taken to move to the new level SHALL instead - * be determined by the OnOffTransitionTimeattribute. If OnOffTransitionTime, which is - * an optional attribute, is not present, the device SHALL move to its new level as fast - * as it is able. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class MoveToLevelCommand extends ZclCommand { - /** - * Level command message field. - */ - private Integer level; - - /** - * Transition time command message field. - */ - private Integer transitionTime; - - /** - * Default constructor. - */ - public MoveToLevelCommand() { - genericCommand = false; - clusterId = 8; - commandId = 0; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Level. - * - * @return the Level - */ - public Integer getLevel() { - return level; - } - - /** - * Sets Level. - * - * @param level the Level - */ - public void setLevel(final Integer level) { - this.level = level; - } - - /** - * Gets Transition time. - * - * @return the Transition time - */ - public Integer getTransitionTime() { - return transitionTime; - } - - /** - * Sets Transition time. - * - * @param transitionTime the Transition time - */ - public void setTransitionTime(final Integer transitionTime) { - this.transitionTime = transitionTime; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(level, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(transitionTime, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - level = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - transitionTime = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(80); - builder.append("MoveToLevelCommand ["); - builder.append(super.toString()); - builder.append(", level="); - builder.append(level); - builder.append(", transitionTime="); - builder.append(transitionTime); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/levelcontrol/MoveToLevelWithOnOffCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/levelcontrol/MoveToLevelWithOnOffCommand.java deleted file mode 100644 index aac9719bc..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/levelcontrol/MoveToLevelWithOnOffCommand.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.levelcontrol; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Move to Level (with On/Off) Command value object class. - *

    - * Cluster: Level Control. Command is sent TO the server. - * This command is a specific command used for the Level Control cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class MoveToLevelWithOnOffCommand extends ZclCommand { - /** - * Level command message field. - */ - private Integer level; - - /** - * Transition time command message field. - */ - private Integer transitionTime; - - /** - * Default constructor. - */ - public MoveToLevelWithOnOffCommand() { - genericCommand = false; - clusterId = 8; - commandId = 4; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Level. - * - * @return the Level - */ - public Integer getLevel() { - return level; - } - - /** - * Sets Level. - * - * @param level the Level - */ - public void setLevel(final Integer level) { - this.level = level; - } - - /** - * Gets Transition time. - * - * @return the Transition time - */ - public Integer getTransitionTime() { - return transitionTime; - } - - /** - * Sets Transition time. - * - * @param transitionTime the Transition time - */ - public void setTransitionTime(final Integer transitionTime) { - this.transitionTime = transitionTime; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(level, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(transitionTime, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - level = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - transitionTime = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(89); - builder.append("MoveToLevelWithOnOffCommand ["); - builder.append(super.toString()); - builder.append(", level="); - builder.append(level); - builder.append(", transitionTime="); - builder.append(transitionTime); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/levelcontrol/MoveWithOnOffCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/levelcontrol/MoveWithOnOffCommand.java deleted file mode 100644 index e85915864..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/levelcontrol/MoveWithOnOffCommand.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.levelcontrol; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Move (with On/Off) Command value object class. - *

    - * Cluster: Level Control. Command is sent TO the server. - * This command is a specific command used for the Level Control cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class MoveWithOnOffCommand extends ZclCommand { - /** - * Move mode command message field. - */ - private Integer moveMode; - - /** - * Rate command message field. - */ - private Integer rate; - - /** - * Default constructor. - */ - public MoveWithOnOffCommand() { - genericCommand = false; - clusterId = 8; - commandId = 5; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Move mode. - * - * @return the Move mode - */ - public Integer getMoveMode() { - return moveMode; - } - - /** - * Sets Move mode. - * - * @param moveMode the Move mode - */ - public void setMoveMode(final Integer moveMode) { - this.moveMode = moveMode; - } - - /** - * Gets Rate. - * - * @return the Rate - */ - public Integer getRate() { - return rate; - } - - /** - * Sets Rate. - * - * @param rate the Rate - */ - public void setRate(final Integer rate) { - this.rate = rate; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(moveMode, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(rate, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - moveMode = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - rate = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(75); - builder.append("MoveWithOnOffCommand ["); - builder.append(super.toString()); - builder.append(", moveMode="); - builder.append(moveMode); - builder.append(", rate="); - builder.append(rate); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/levelcontrol/StepCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/levelcontrol/StepCommand.java deleted file mode 100644 index c7c96dd99..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/levelcontrol/StepCommand.java +++ /dev/null @@ -1,136 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.levelcontrol; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Step Command value object class. - *

    - * Cluster: Level Control. Command is sent TO the server. - * This command is a specific command used for the Level Control cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class StepCommand extends ZclCommand { - /** - * Step mode command message field. - */ - private Integer stepMode; - - /** - * Step size command message field. - */ - private Integer stepSize; - - /** - * Transition time command message field. - */ - private Integer transitionTime; - - /** - * Default constructor. - */ - public StepCommand() { - genericCommand = false; - clusterId = 8; - commandId = 2; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Step mode. - * - * @return the Step mode - */ - public Integer getStepMode() { - return stepMode; - } - - /** - * Sets Step mode. - * - * @param stepMode the Step mode - */ - public void setStepMode(final Integer stepMode) { - this.stepMode = stepMode; - } - - /** - * Gets Step size. - * - * @return the Step size - */ - public Integer getStepSize() { - return stepSize; - } - - /** - * Sets Step size. - * - * @param stepSize the Step size - */ - public void setStepSize(final Integer stepSize) { - this.stepSize = stepSize; - } - - /** - * Gets Transition time. - * - * @return the Transition time - */ - public Integer getTransitionTime() { - return transitionTime; - } - - /** - * Sets Transition time. - * - * @param transitionTime the Transition time - */ - public void setTransitionTime(final Integer transitionTime) { - this.transitionTime = transitionTime; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(stepMode, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(stepSize, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(transitionTime, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - stepMode = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - stepSize = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - transitionTime = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(104); - builder.append("StepCommand ["); - builder.append(super.toString()); - builder.append(", stepMode="); - builder.append(stepMode); - builder.append(", stepSize="); - builder.append(stepSize); - builder.append(", transitionTime="); - builder.append(transitionTime); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/levelcontrol/StepWithOnOffCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/levelcontrol/StepWithOnOffCommand.java deleted file mode 100644 index 09017f757..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/levelcontrol/StepWithOnOffCommand.java +++ /dev/null @@ -1,136 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.levelcontrol; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Step (with On/Off) Command value object class. - *

    - * Cluster: Level Control. Command is sent TO the server. - * This command is a specific command used for the Level Control cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class StepWithOnOffCommand extends ZclCommand { - /** - * Step mode command message field. - */ - private Integer stepMode; - - /** - * Step size command message field. - */ - private Integer stepSize; - - /** - * Transition time command message field. - */ - private Integer transitionTime; - - /** - * Default constructor. - */ - public StepWithOnOffCommand() { - genericCommand = false; - clusterId = 8; - commandId = 6; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Step mode. - * - * @return the Step mode - */ - public Integer getStepMode() { - return stepMode; - } - - /** - * Sets Step mode. - * - * @param stepMode the Step mode - */ - public void setStepMode(final Integer stepMode) { - this.stepMode = stepMode; - } - - /** - * Gets Step size. - * - * @return the Step size - */ - public Integer getStepSize() { - return stepSize; - } - - /** - * Sets Step size. - * - * @param stepSize the Step size - */ - public void setStepSize(final Integer stepSize) { - this.stepSize = stepSize; - } - - /** - * Gets Transition time. - * - * @return the Transition time - */ - public Integer getTransitionTime() { - return transitionTime; - } - - /** - * Sets Transition time. - * - * @param transitionTime the Transition time - */ - public void setTransitionTime(final Integer transitionTime) { - this.transitionTime = transitionTime; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(stepMode, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(stepSize, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(transitionTime, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - stepMode = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - stepSize = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - transitionTime = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(113); - builder.append("StepWithOnOffCommand ["); - builder.append(super.toString()); - builder.append(", stepMode="); - builder.append(stepMode); - builder.append(", stepSize="); - builder.append(stepSize); - builder.append(", transitionTime="); - builder.append(transitionTime); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/levelcontrol/Stop2Command.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/levelcontrol/Stop2Command.java deleted file mode 100644 index 03a8502d2..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/levelcontrol/Stop2Command.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.levelcontrol; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Stop 2 Command value object class. - *

    - * Cluster: Level Control. Command is sent TO the server. - * This command is a specific command used for the Level Control cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class Stop2Command extends ZclCommand { - /** - * Default constructor. - */ - public Stop2Command() { - genericCommand = false; - clusterId = 8; - commandId = 7; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(15); - builder.append("Stop2Command ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/levelcontrol/StopCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/levelcontrol/StopCommand.java deleted file mode 100644 index 7cdfc28bc..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/levelcontrol/StopCommand.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.levelcontrol; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Stop Command value object class. - *

    - * Cluster: Level Control. Command is sent TO the server. - * This command is a specific command used for the Level Control cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class StopCommand extends ZclCommand { - /** - * Default constructor. - */ - public StopCommand() { - genericCommand = false; - clusterId = 8; - commandId = 3; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(14); - builder.append("StopCommand ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/multistateinputbasic/ReliabilityEnum.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/multistateinputbasic/ReliabilityEnum.java deleted file mode 100644 index 23d7504bd..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/multistateinputbasic/ReliabilityEnum.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.multistateinputbasic; - -import java.util.HashMap; -import java.util.Map; - -import javax.annotation.Generated; - -/** - * Enumeration of Multistate Input (Basic) attribute Reliability options. - *

    - * Code is auto-generated. Modifications may be overwritten! - * - * @author Chris Jackson - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-31T12:00:43Z") -public enum ReliabilityEnum { - NO_FAULT_DETECTED(0x0000), - OVER_RANGE(0x0002), - UNDER_RANGE(0x0003), - OPEN_LOOP(0x0004), - SHORTED_LOOP(0x0005), - UNRELIABLE_OTHER(0x0007), - PROCESS_ERROR(0x0008), - MULTI_STATE_FAULT(0x0009), - CONFIGURATION_ERROR(0x000A); - - /** - * A mapping between the integer code and its corresponding ReliabilityEnum type to facilitate lookup by value. - */ - private static Map idMap; - - static { - idMap = new HashMap(); - for (ReliabilityEnum enumValue : values()) { - idMap.put(enumValue.key, enumValue); - } - } - - private final int key; - - ReliabilityEnum(final int key) { - this.key = key; - } - - public int getKey() { - return key; - } - - public static ReliabilityEnum getByValue(final int value) { - return idMap.get(value); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/multistateinputbasic/StatusFlagsEnum.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/multistateinputbasic/StatusFlagsEnum.java deleted file mode 100644 index 7101d9b5d..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/multistateinputbasic/StatusFlagsEnum.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.multistateinputbasic; - -import java.util.HashMap; -import java.util.Map; - -import javax.annotation.Generated; - -/** - * Enumeration of Multistate Input (Basic) attribute StatusFlags options. - *

    - * Code is auto-generated. Modifications may be overwritten! - * - * @author Chris Jackson - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-31T12:00:43Z") -public enum StatusFlagsEnum { - IN_ALARM(0x0001), - FAULT(0x0002), - OVERRIDDEN(0x0004), - OUT_OF_SERVICE(0x0008); - - /** - * A mapping between the integer code and its corresponding StatusFlagsEnum type to facilitate lookup by value. - */ - private static Map idMap; - - static { - idMap = new HashMap(); - for (StatusFlagsEnum enumValue : values()) { - idMap.put(enumValue.key, enumValue); - } - } - - private final int key; - - StatusFlagsEnum(final int key) { - this.key = key; - } - - public int getKey() { - return key; - } - - public static StatusFlagsEnum getByValue(final int value) { - return idMap.get(value); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/multistateoutputbasic/ReliabilityEnum.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/multistateoutputbasic/ReliabilityEnum.java deleted file mode 100644 index 979e059e5..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/multistateoutputbasic/ReliabilityEnum.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.multistateoutputbasic; - -import java.util.HashMap; -import java.util.Map; - -import javax.annotation.Generated; - -/** - * Enumeration of Multistate Output (Basic) attribute Reliability options. - *

    - * Code is auto-generated. Modifications may be overwritten! - * - * @author Chris Jackson - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-31T12:00:43Z") -public enum ReliabilityEnum { - NO_FAULT_DETECTED(0x0000), - OVER_RANGE(0x0002), - UNDER_RANGE(0x0003), - OPEN_LOOP(0x0004), - SHORTED_LOOP(0x0005), - UNRELIABLE_OTHER(0x0007), - PROCESS_ERROR(0x0008), - MULTI_STATE_FAULT(0x0009), - CONFIGURATION_ERROR(0x000A); - - /** - * A mapping between the integer code and its corresponding ReliabilityEnum type to facilitate lookup by value. - */ - private static Map idMap; - - static { - idMap = new HashMap(); - for (ReliabilityEnum enumValue : values()) { - idMap.put(enumValue.key, enumValue); - } - } - - private final int key; - - ReliabilityEnum(final int key) { - this.key = key; - } - - public int getKey() { - return key; - } - - public static ReliabilityEnum getByValue(final int value) { - return idMap.get(value); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/multistateoutputbasic/StatusFlagsEnum.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/multistateoutputbasic/StatusFlagsEnum.java deleted file mode 100644 index 69c3c7210..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/multistateoutputbasic/StatusFlagsEnum.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.multistateoutputbasic; - -import java.util.HashMap; -import java.util.Map; - -import javax.annotation.Generated; - -/** - * Enumeration of Multistate Output (Basic) attribute StatusFlags options. - *

    - * Code is auto-generated. Modifications may be overwritten! - * - * @author Chris Jackson - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-31T12:00:43Z") -public enum StatusFlagsEnum { - IN_ALARM(0x0001), - FAULT(0x0002), - OVERRIDDEN(0x0004), - OUT_OF_SERVICE(0x0008); - - /** - * A mapping between the integer code and its corresponding StatusFlagsEnum type to facilitate lookup by value. - */ - private static Map idMap; - - static { - idMap = new HashMap(); - for (StatusFlagsEnum enumValue : values()) { - idMap.put(enumValue.key, enumValue); - } - } - - private final int key; - - StatusFlagsEnum(final int key) { - this.key = key; - } - - public int getKey() { - return key; - } - - public static StatusFlagsEnum getByValue(final int value) { - return idMap.get(value); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/multistatevaluebasic/ReliabilityEnum.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/multistatevaluebasic/ReliabilityEnum.java deleted file mode 100644 index 740eeacc7..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/multistatevaluebasic/ReliabilityEnum.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.multistatevaluebasic; - -import java.util.HashMap; -import java.util.Map; - -import javax.annotation.Generated; - -/** - * Enumeration of Multistate Value (Basic) attribute Reliability options. - *

    - * Code is auto-generated. Modifications may be overwritten! - * - * @author Chris Jackson - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-31T12:00:43Z") -public enum ReliabilityEnum { - NO_FAULT_DETECTED(0x0000), - OVER_RANGE(0x0002), - UNDER_RANGE(0x0003), - OPEN_LOOP(0x0004), - SHORTED_LOOP(0x0005), - UNRELIABLE_OTHER(0x0007), - PROCESS_ERROR(0x0008), - MULTI_STATE_FAULT(0x0009), - CONFIGURATION_ERROR(0x000A); - - /** - * A mapping between the integer code and its corresponding ReliabilityEnum type to facilitate lookup by value. - */ - private static Map idMap; - - static { - idMap = new HashMap(); - for (ReliabilityEnum enumValue : values()) { - idMap.put(enumValue.key, enumValue); - } - } - - private final int key; - - ReliabilityEnum(final int key) { - this.key = key; - } - - public int getKey() { - return key; - } - - public static ReliabilityEnum getByValue(final int value) { - return idMap.get(value); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/multistatevaluebasic/StatusFlagsEnum.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/multistatevaluebasic/StatusFlagsEnum.java deleted file mode 100644 index 0f1df12d6..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/multistatevaluebasic/StatusFlagsEnum.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.multistatevaluebasic; - -import java.util.HashMap; -import java.util.Map; - -import javax.annotation.Generated; - -/** - * Enumeration of Multistate Value (Basic) attribute StatusFlags options. - *

    - * Code is auto-generated. Modifications may be overwritten! - * - * @author Chris Jackson - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-31T12:00:43Z") -public enum StatusFlagsEnum { - IN_ALARM(0x0001), - FAULT(0x0002), - OVERRIDDEN(0x0004), - OUT_OF_SERVICE(0x0008); - - /** - * A mapping between the integer code and its corresponding StatusFlagsEnum type to facilitate lookup by value. - */ - private static Map idMap; - - static { - idMap = new HashMap(); - for (StatusFlagsEnum enumValue : values()) { - idMap.put(enumValue.key, enumValue); - } - } - - private final int key; - - StatusFlagsEnum(final int key) { - this.key = key; - } - - public int getKey() { - return key; - } - - public static StatusFlagsEnum getByValue(final int value) { - return idMap.get(value); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/onoff/OffCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/onoff/OffCommand.java deleted file mode 100644 index 0ef4e8e83..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/onoff/OffCommand.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.onoff; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Off Command value object class. - *

    - * Cluster: On/Off. Command is sent TO the server. - * This command is a specific command used for the On/Off cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class OffCommand extends ZclCommand { - /** - * Default constructor. - */ - public OffCommand() { - genericCommand = false; - clusterId = 6; - commandId = 0; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(13); - builder.append("OffCommand ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/onoff/OffWithEffectCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/onoff/OffWithEffectCommand.java deleted file mode 100644 index f211e95cf..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/onoff/OffWithEffectCommand.java +++ /dev/null @@ -1,111 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.onoff; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Off With Effect Command value object class. - *

    - * Cluster: On/Off. Command is sent TO the server. - * This command is a specific command used for the On/Off cluster. - *

    - * The Off With Effect command allows devices to be turned off using enhanced ways of fading. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class OffWithEffectCommand extends ZclCommand { - /** - * Effect Identifier command message field. - */ - private Integer effectIdentifier; - - /** - * Effect Variant command message field. - */ - private Integer effectVariant; - - /** - * Default constructor. - */ - public OffWithEffectCommand() { - genericCommand = false; - clusterId = 6; - commandId = 64; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Effect Identifier. - * - * @return the Effect Identifier - */ - public Integer getEffectIdentifier() { - return effectIdentifier; - } - - /** - * Sets Effect Identifier. - * - * @param effectIdentifier the Effect Identifier - */ - public void setEffectIdentifier(final Integer effectIdentifier) { - this.effectIdentifier = effectIdentifier; - } - - /** - * Gets Effect Variant. - * - * @return the Effect Variant - */ - public Integer getEffectVariant() { - return effectVariant; - } - - /** - * Sets Effect Variant. - * - * @param effectVariant the Effect Variant - */ - public void setEffectVariant(final Integer effectVariant) { - this.effectVariant = effectVariant; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(effectIdentifier, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(effectVariant, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - effectIdentifier = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - effectVariant = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(92); - builder.append("OffWithEffectCommand ["); - builder.append(super.toString()); - builder.append(", effectIdentifier="); - builder.append(effectIdentifier); - builder.append(", effectVariant="); - builder.append(effectVariant); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/onoff/OnCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/onoff/OnCommand.java deleted file mode 100644 index 52ce6c8db..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/onoff/OnCommand.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.onoff; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * On Command value object class. - *

    - * Cluster: On/Off. Command is sent TO the server. - * This command is a specific command used for the On/Off cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class OnCommand extends ZclCommand { - /** - * Default constructor. - */ - public OnCommand() { - genericCommand = false; - clusterId = 6; - commandId = 1; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(12); - builder.append("OnCommand ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/onoff/OnWithRecallGlobalSceneCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/onoff/OnWithRecallGlobalSceneCommand.java deleted file mode 100644 index 2b89dcd33..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/onoff/OnWithRecallGlobalSceneCommand.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.onoff; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * On With Recall Global Scene Command value object class. - *

    - * Cluster: On/Off. Command is sent TO the server. - * This command is a specific command used for the On/Off cluster. - *

    - * The On With Recall Global Scene command allows the recall of the settings when the device was turned off. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class OnWithRecallGlobalSceneCommand extends ZclCommand { - /** - * Default constructor. - */ - public OnWithRecallGlobalSceneCommand() { - genericCommand = false; - clusterId = 6; - commandId = 65; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(33); - builder.append("OnWithRecallGlobalSceneCommand ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/onoff/OnWithTimedOffCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/onoff/OnWithTimedOffCommand.java deleted file mode 100644 index a44b0745b..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/onoff/OnWithTimedOffCommand.java +++ /dev/null @@ -1,142 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.onoff; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * On With Timed Off Command value object class. - *

    - * Cluster: On/Off. Command is sent TO the server. - * This command is a specific command used for the On/Off cluster. - *

    - * The On With Timed Off command allows devices to be turned on for a specific duration - * with a guarded off duration so that SHOULD the device be subsequently switched off, - * further On With Timed Off commands, received during this time, are prevented from - * turning the devices back on. Note that the device can be periodically re-kicked by - * subsequent On With Timed Off commands, e.g., from an on/off sensor. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class OnWithTimedOffCommand extends ZclCommand { - /** - * On Off Control command message field. - */ - private Integer onOffControl; - - /** - * On Time command message field. - */ - private Integer onTime; - - /** - * Off Wait Time command message field. - */ - private Integer offWaitTime; - - /** - * Default constructor. - */ - public OnWithTimedOffCommand() { - genericCommand = false; - clusterId = 6; - commandId = 66; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets On Off Control. - * - * @return the On Off Control - */ - public Integer getOnOffControl() { - return onOffControl; - } - - /** - * Sets On Off Control. - * - * @param onOffControl the On Off Control - */ - public void setOnOffControl(final Integer onOffControl) { - this.onOffControl = onOffControl; - } - - /** - * Gets On Time. - * - * @return the On Time - */ - public Integer getOnTime() { - return onTime; - } - - /** - * Sets On Time. - * - * @param onTime the On Time - */ - public void setOnTime(final Integer onTime) { - this.onTime = onTime; - } - - /** - * Gets Off Wait Time. - * - * @return the Off Wait Time - */ - public Integer getOffWaitTime() { - return offWaitTime; - } - - /** - * Sets Off Wait Time. - * - * @param offWaitTime the Off Wait Time - */ - public void setOffWaitTime(final Integer offWaitTime) { - this.offWaitTime = offWaitTime; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(onOffControl, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(onTime, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(offWaitTime, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - onOffControl = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - onTime = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - offWaitTime = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(113); - builder.append("OnWithTimedOffCommand ["); - builder.append(super.toString()); - builder.append(", onOffControl="); - builder.append(onOffControl); - builder.append(", onTime="); - builder.append(onTime); - builder.append(", offWaitTime="); - builder.append(offWaitTime); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/onoff/ToggleCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/onoff/ToggleCommand.java deleted file mode 100644 index 7b9ddf431..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/onoff/ToggleCommand.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.onoff; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Toggle Command value object class. - *

    - * Cluster: On/Off. Command is sent TO the server. - * This command is a specific command used for the On/Off cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class ToggleCommand extends ZclCommand { - /** - * Default constructor. - */ - public ToggleCommand() { - genericCommand = false; - clusterId = 6; - commandId = 2; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(16); - builder.append("ToggleCommand ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/onoffswitchconfiguration/SwitchActionsEnum.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/onoffswitchconfiguration/SwitchActionsEnum.java deleted file mode 100644 index e721d63a0..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/onoffswitchconfiguration/SwitchActionsEnum.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.onoffswitchconfiguration; - -import java.util.HashMap; -import java.util.Map; - -import javax.annotation.Generated; - -/** - * Enumeration of On/off Switch Configuration attribute SwitchActions options. - *

    - * Code is auto-generated. Modifications may be overwritten! - * - * @author Chris Jackson - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-31T12:00:43Z") -public enum SwitchActionsEnum { - ON(0x0000), - OFF(0x0001), - TOGGLE(0x0002); - - /** - * A mapping between the integer code and its corresponding SwitchActionsEnum type to facilitate lookup by value. - */ - private static Map idMap; - - static { - idMap = new HashMap(); - for (SwitchActionsEnum enumValue : values()) { - idMap.put(enumValue.key, enumValue); - } - } - - private final int key; - - SwitchActionsEnum(final int key) { - this.key = key; - } - - public int getKey() { - return key; - } - - public static SwitchActionsEnum getByValue(final int value) { - return idMap.get(value); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/onoffswitchconfiguration/SwitchTypeEnum.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/onoffswitchconfiguration/SwitchTypeEnum.java deleted file mode 100644 index e98f7d098..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/onoffswitchconfiguration/SwitchTypeEnum.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.onoffswitchconfiguration; - -import java.util.HashMap; -import java.util.Map; - -import javax.annotation.Generated; - -/** - * Enumeration of On/off Switch Configuration attribute SwitchType options. - *

    - * Code is auto-generated. Modifications may be overwritten! - * - * @author Chris Jackson - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-31T12:00:43Z") -public enum SwitchTypeEnum { - TOGGLE(0x0000), - MOMENTARY(0x0001), - MULTIFUNCTION(0x0002); - - /** - * A mapping between the integer code and its corresponding SwitchTypeEnum type to facilitate lookup by value. - */ - private static Map idMap; - - static { - idMap = new HashMap(); - for (SwitchTypeEnum enumValue : values()) { - idMap.put(enumValue.key, enumValue); - } - } - - private final int key; - - SwitchTypeEnum(final int key) { - this.key = key; - } - - public int getKey() { - return key; - } - - public static SwitchTypeEnum getByValue(final int value) { - return idMap.get(value); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/otaupgrade/ImageBlockCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/otaupgrade/ImageBlockCommand.java deleted file mode 100644 index b6924dbf4..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/otaupgrade/ImageBlockCommand.java +++ /dev/null @@ -1,295 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.otaupgrade; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; -import com.zsmartsystems.zigbee.IeeeAddress; - -/** - * Image Block Command value object class. - *

    - * Cluster: OTA Upgrade. Command is sent TO the server. - * This command is a specific command used for the OTA Upgrade cluster. - *

    - * The client device requests the image data at its leisure by sending Image Block Request command to - * the upgrade server. The client knows the total number of request commands it needs to send from the - * image size value received in Query Next Image Response command. - *
    - * The client repeats Image Block Requests until it has successfully obtained all data. Manufacturer code, - * image type and file version are included in all further queries regarding that image. The information - * eliminates the need for the server to remember which OTA Upgrade Image is being used for each - * download process. - *
    - * If the client supports the BlockRequestDelay attribute it shall include the value of the attribute as the - * BlockRequestDelay field of the Image Block Request message. The client shall ensure that it delays at - * least BlockRequestDelay milliseconds after the previous Image Block Request was sent before sending - * the next Image Block Request message. A client may delay its next Image Block Requests longer than - * its BlockRequestDelay attribute. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class ImageBlockCommand extends ZclCommand { - /** - * Field control command message field. - */ - private Integer fieldControl; - - /** - * Manufacturer code command message field. - */ - private Integer manufacturerCode; - - /** - * Image type command message field. - */ - private Integer imageType; - - /** - * File version command message field. - */ - private Integer fileVersion; - - /** - * File offset command message field. - */ - private Integer fileOffset; - - /** - * Maximum data size command message field. - */ - private Integer maximumDataSize; - - /** - * Request node address command message field. - */ - private IeeeAddress requestNodeAddress; - - /** - * BlockRequestDelay command message field. - */ - private Integer blockRequestDelay; - - /** - * Default constructor. - */ - public ImageBlockCommand() { - genericCommand = false; - clusterId = 25; - commandId = 3; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Field control. - * - * @return the Field control - */ - public Integer getFieldControl() { - return fieldControl; - } - - /** - * Sets Field control. - * - * @param fieldControl the Field control - */ - public void setFieldControl(final Integer fieldControl) { - this.fieldControl = fieldControl; - } - - /** - * Gets Manufacturer code. - * - * @return the Manufacturer code - */ - public Integer getManufacturerCode() { - return manufacturerCode; - } - - /** - * Sets Manufacturer code. - * - * @param manufacturerCode the Manufacturer code - */ - public void setManufacturerCode(final Integer manufacturerCode) { - this.manufacturerCode = manufacturerCode; - } - - /** - * Gets Image type. - * - * @return the Image type - */ - public Integer getImageType() { - return imageType; - } - - /** - * Sets Image type. - * - * @param imageType the Image type - */ - public void setImageType(final Integer imageType) { - this.imageType = imageType; - } - - /** - * Gets File version. - * - * @return the File version - */ - public Integer getFileVersion() { - return fileVersion; - } - - /** - * Sets File version. - * - * @param fileVersion the File version - */ - public void setFileVersion(final Integer fileVersion) { - this.fileVersion = fileVersion; - } - - /** - * Gets File offset. - * - * @return the File offset - */ - public Integer getFileOffset() { - return fileOffset; - } - - /** - * Sets File offset. - * - * @param fileOffset the File offset - */ - public void setFileOffset(final Integer fileOffset) { - this.fileOffset = fileOffset; - } - - /** - * Gets Maximum data size. - * - * @return the Maximum data size - */ - public Integer getMaximumDataSize() { - return maximumDataSize; - } - - /** - * Sets Maximum data size. - * - * @param maximumDataSize the Maximum data size - */ - public void setMaximumDataSize(final Integer maximumDataSize) { - this.maximumDataSize = maximumDataSize; - } - - /** - * Gets Request node address. - * - * @return the Request node address - */ - public IeeeAddress getRequestNodeAddress() { - return requestNodeAddress; - } - - /** - * Sets Request node address. - * - * @param requestNodeAddress the Request node address - */ - public void setRequestNodeAddress(final IeeeAddress requestNodeAddress) { - this.requestNodeAddress = requestNodeAddress; - } - - /** - * Gets BlockRequestDelay. - * - * @return the BlockRequestDelay - */ - public Integer getBlockRequestDelay() { - return blockRequestDelay; - } - - /** - * Sets BlockRequestDelay. - * - * @param blockRequestDelay the BlockRequestDelay - */ - public void setBlockRequestDelay(final Integer blockRequestDelay) { - this.blockRequestDelay = blockRequestDelay; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(fieldControl, ZclDataType.BITMAP_8_BIT); - serializer.serialize(manufacturerCode, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(imageType, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(fileVersion, ZclDataType.UNSIGNED_32_BIT_INTEGER); - serializer.serialize(fileOffset, ZclDataType.UNSIGNED_32_BIT_INTEGER); - serializer.serialize(maximumDataSize, ZclDataType.UNSIGNED_8_BIT_INTEGER); - if ((fieldControl & 0x01) != 0) { - serializer.serialize(requestNodeAddress, ZclDataType.IEEE_ADDRESS); - } - if ((fieldControl & 0x02) != 0) { - serializer.serialize(blockRequestDelay, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - fieldControl = (Integer) deserializer.deserialize(ZclDataType.BITMAP_8_BIT); - manufacturerCode = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - imageType = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - fileVersion = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_32_BIT_INTEGER); - fileOffset = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_32_BIT_INTEGER); - maximumDataSize = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - if ((fieldControl & 0x01) != 0) { - requestNodeAddress = (IeeeAddress) deserializer.deserialize(ZclDataType.IEEE_ADDRESS); - } - if ((fieldControl & 0x02) != 0) { - blockRequestDelay = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(288); - builder.append("ImageBlockCommand ["); - builder.append(super.toString()); - builder.append(", fieldControl="); - builder.append(fieldControl); - builder.append(", manufacturerCode="); - builder.append(manufacturerCode); - builder.append(", imageType="); - builder.append(imageType); - builder.append(", fileVersion="); - builder.append(fileVersion); - builder.append(", fileOffset="); - builder.append(fileOffset); - builder.append(", maximumDataSize="); - builder.append(maximumDataSize); - builder.append(", requestNodeAddress="); - builder.append(requestNodeAddress); - builder.append(", blockRequestDelay="); - builder.append(blockRequestDelay); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/otaupgrade/ImageBlockResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/otaupgrade/ImageBlockResponse.java deleted file mode 100644 index a37f7c4eb..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/otaupgrade/ImageBlockResponse.java +++ /dev/null @@ -1,238 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.otaupgrade; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; -import com.zsmartsystems.zigbee.zcl.ZclStatus; -import com.zsmartsystems.zigbee.zcl.field.ByteArray; - -/** - * Image Block Response value object class. - *

    - * Cluster: OTA Upgrade. Command is sent FROM the server. - * This command is a specific command used for the OTA Upgrade cluster. - *

    - * Upon receipt of an Image Block Request command the server shall generate an Image Block Response. - * If the server is able to retrieve the data for the client and does not wish to change the image download - * rate, it will respond with a status of SUCCESS and it will include all the fields in the payload. The use - * of file offset allows the server to send packets with variable data size during the upgrade process. This - * allows the server to support a case when the network topology of a client may change during the - * upgrade process, for example, mobile client may move around during the upgrade process. If the client - * has moved a few hops away, the data size shall be smaller. Moreover, using file offset eliminates the - * need for data padding since each Image Block Response command may contain different data size. A - * simple server implementation may choose to only support largest possible data size for the worst-case - * scenario in order to avoid supporting sending packets with variable data size. - *
    - * The server shall respect the maximum data size value requested by the client and shall not send the data - * with length greater than that value. The server may send the data with length smaller than the value - * depending on the network topology of the client. For example, the client may be able to receive 100 - * bytes of data at once so it sends the request with 100 as maximum data size. But after considering all - * the security headers (perhaps from both APS and network levels) and source routing overhead (for - * example, the client is five hops away), the largest possible data size that the server can send to the - * client shall be smaller than 100 bytes. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class ImageBlockResponse extends ZclCommand { - /** - * Status command message field. - */ - private ZclStatus status; - - /** - * Manufacturer code command message field. - */ - private Integer manufacturerCode; - - /** - * Image type command message field. - */ - private Integer imageType; - - /** - * File Version command message field. - */ - private Integer fileVersion; - - /** - * File offset command message field. - */ - private Integer fileOffset; - - /** - * Image Data command message field. - */ - private ByteArray imageData; - - /** - * Default constructor. - */ - public ImageBlockResponse() { - genericCommand = false; - clusterId = 25; - commandId = 5; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Status. - * - * @return the Status - */ - public ZclStatus getStatus() { - return status; - } - - /** - * Sets Status. - * - * @param status the Status - */ - public void setStatus(final ZclStatus status) { - this.status = status; - } - - /** - * Gets Manufacturer code. - * - * @return the Manufacturer code - */ - public Integer getManufacturerCode() { - return manufacturerCode; - } - - /** - * Sets Manufacturer code. - * - * @param manufacturerCode the Manufacturer code - */ - public void setManufacturerCode(final Integer manufacturerCode) { - this.manufacturerCode = manufacturerCode; - } - - /** - * Gets Image type. - * - * @return the Image type - */ - public Integer getImageType() { - return imageType; - } - - /** - * Sets Image type. - * - * @param imageType the Image type - */ - public void setImageType(final Integer imageType) { - this.imageType = imageType; - } - - /** - * Gets File Version. - * - * @return the File Version - */ - public Integer getFileVersion() { - return fileVersion; - } - - /** - * Sets File Version. - * - * @param fileVersion the File Version - */ - public void setFileVersion(final Integer fileVersion) { - this.fileVersion = fileVersion; - } - - /** - * Gets File offset. - * - * @return the File offset - */ - public Integer getFileOffset() { - return fileOffset; - } - - /** - * Sets File offset. - * - * @param fileOffset the File offset - */ - public void setFileOffset(final Integer fileOffset) { - this.fileOffset = fileOffset; - } - - /** - * Gets Image Data. - * - * @return the Image Data - */ - public ByteArray getImageData() { - return imageData; - } - - /** - * Sets Image Data. - * - * @param imageData the Image Data - */ - public void setImageData(final ByteArray imageData) { - this.imageData = imageData; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(status, ZclDataType.ZCL_STATUS); - serializer.serialize(manufacturerCode, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(imageType, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(fileVersion, ZclDataType.UNSIGNED_32_BIT_INTEGER); - serializer.serialize(fileOffset, ZclDataType.UNSIGNED_32_BIT_INTEGER); - serializer.serialize(imageData, ZclDataType.BYTE_ARRAY); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - status = (ZclStatus) deserializer.deserialize(ZclDataType.ZCL_STATUS); - manufacturerCode = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - imageType = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - fileVersion = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_32_BIT_INTEGER); - fileOffset = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_32_BIT_INTEGER); - imageData = (ByteArray) deserializer.deserialize(ZclDataType.BYTE_ARRAY); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(202); - builder.append("ImageBlockResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(", manufacturerCode="); - builder.append(manufacturerCode); - builder.append(", imageType="); - builder.append(imageType); - builder.append(", fileVersion="); - builder.append(fileVersion); - builder.append(", fileOffset="); - builder.append(fileOffset); - builder.append(", imageData="); - builder.append(imageData); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/otaupgrade/ImageNotifyCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/otaupgrade/ImageNotifyCommand.java deleted file mode 100644 index bf51043c7..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/otaupgrade/ImageNotifyCommand.java +++ /dev/null @@ -1,221 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.otaupgrade; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Image Notify Command value object class. - *

    - * Cluster: OTA Upgrade. Command is sent TO the server. - * This command is a specific command used for the OTA Upgrade cluster. - *

    - * The purpose of sending Image Notify command is so the server has a way to notify client devices of - * when the OTA upgrade images are available for them. It eliminates the need for ZR client devices - * having to check with the server periodically of when the new images are available. However, all client - * devices still need to send in Query Next Image Request command in order to officially start the OTA - * upgrade process. - *
    - * For ZR client devices, the upgrade server may send out a unicast, broadcast, or multicast indicating it - * has the next upgrade image, via an Image Notify command. Since the command may not have APS - * security (if it is broadcast or multicast), it is considered purely informational and not authoritative. - * Even in the case of a unicast, ZR shall continue to perform the query process described in later section. - *
    - * When the command is sent with payload type value of zero, it generally means the server wishes to - * notify all clients disregard of their manufacturers, image types or file versions. Query jitter is needed - * to protect the server from being flooded with clients’ queries for next image. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class ImageNotifyCommand extends ZclCommand { - /** - * Payload type command message field. - */ - private Integer payloadType; - - /** - * Query jitter command message field. - */ - private Integer queryJitter; - - /** - * Manufacturer code command message field. - */ - private Integer manufacturerCode; - - /** - * Image type command message field. - */ - private Integer imageType; - - /** - * New File Version command message field. - */ - private Integer newFileVersion; - - /** - * Default constructor. - */ - public ImageNotifyCommand() { - genericCommand = false; - clusterId = 25; - commandId = 0; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Payload type. - * - * @return the Payload type - */ - public Integer getPayloadType() { - return payloadType; - } - - /** - * Sets Payload type. - * - * @param payloadType the Payload type - */ - public void setPayloadType(final Integer payloadType) { - this.payloadType = payloadType; - } - - /** - * Gets Query jitter. - * - * @return the Query jitter - */ - public Integer getQueryJitter() { - return queryJitter; - } - - /** - * Sets Query jitter. - * - * @param queryJitter the Query jitter - */ - public void setQueryJitter(final Integer queryJitter) { - this.queryJitter = queryJitter; - } - - /** - * Gets Manufacturer code. - * - * @return the Manufacturer code - */ - public Integer getManufacturerCode() { - return manufacturerCode; - } - - /** - * Sets Manufacturer code. - * - * @param manufacturerCode the Manufacturer code - */ - public void setManufacturerCode(final Integer manufacturerCode) { - this.manufacturerCode = manufacturerCode; - } - - /** - * Gets Image type. - * - * @return the Image type - */ - public Integer getImageType() { - return imageType; - } - - /** - * Sets Image type. - * - * @param imageType the Image type - */ - public void setImageType(final Integer imageType) { - this.imageType = imageType; - } - - /** - * Gets New File Version. - * - * @return the New File Version - */ - public Integer getNewFileVersion() { - return newFileVersion; - } - - /** - * Sets New File Version. - * - * @param newFileVersion the New File Version - */ - public void setNewFileVersion(final Integer newFileVersion) { - this.newFileVersion = newFileVersion; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(payloadType, ZclDataType.ENUMERATION_8_BIT); - if (payloadType >= 0) { - serializer.serialize(queryJitter, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - if (payloadType >= 1) { - serializer.serialize(manufacturerCode, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - if (payloadType >= 2) { - serializer.serialize(imageType, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - if (payloadType >= 3) { - serializer.serialize(newFileVersion, ZclDataType.UNSIGNED_32_BIT_INTEGER); - } - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - payloadType = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - if (payloadType >= 0) { - queryJitter = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - if (payloadType >= 1) { - manufacturerCode = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - if (payloadType >= 2) { - imageType = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - if (payloadType >= 3) { - newFileVersion = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_32_BIT_INTEGER); - } - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(182); - builder.append("ImageNotifyCommand ["); - builder.append(super.toString()); - builder.append(", payloadType="); - builder.append(payloadType); - builder.append(", queryJitter="); - builder.append(queryJitter); - builder.append(", manufacturerCode="); - builder.append(manufacturerCode); - builder.append(", imageType="); - builder.append(imageType); - builder.append(", newFileVersion="); - builder.append(newFileVersion); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/otaupgrade/ImagePageCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/otaupgrade/ImagePageCommand.java deleted file mode 100644 index 0a4a60290..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/otaupgrade/ImagePageCommand.java +++ /dev/null @@ -1,319 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.otaupgrade; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; -import com.zsmartsystems.zigbee.IeeeAddress; - -/** - * Image Page Command value object class. - *

    - * Cluster: OTA Upgrade. Command is sent TO the server. - * This command is a specific command used for the OTA Upgrade cluster. - *

    - * The support for the command is optional. The client device may choose to request OTA upgrade data - * in one page size at a time from upgrade server. Using Image Page Request reduces the numbers of - * requests sent from the client to the upgrade server, compared to using Image Block Request command. - * In order to conserve battery life a device may use the Image Page Request command. Using the Image - * Page Request command eliminates the need for the client device to send Image Block Request - * command for every data block it needs; possibly saving the transmission of hundreds or thousands of - * messages depending on the image size. - *
    - * The client keeps track of how much data it has received by keeping a cumulative count of each data - * size it has received in each Image Block Response. Once the count has reach the value of the page size - * requested, it shall repeat Image Page Requests until it has successfully obtained all pages. Note that the - * client may choose to switch between using Image Block Request and Image Page Request during the - * upgrade process. For example, if the client does not receive all data requested in one Image Page - * Request, the client may choose to request the missing block of data using Image Block Request - * command, instead of requesting the whole page again. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class ImagePageCommand extends ZclCommand { - /** - * Field control command message field. - */ - private Integer fieldControl; - - /** - * Manufacturer code command message field. - */ - private Integer manufacturerCode; - - /** - * Image type command message field. - */ - private Integer imageType; - - /** - * File version command message field. - */ - private Integer fileVersion; - - /** - * File offset command message field. - */ - private Integer fileOffset; - - /** - * Maximum data size command message field. - */ - private Integer maximumDataSize; - - /** - * Page size command message field. - */ - private Integer pageSize; - - /** - * Response spacing command message field. - */ - private Integer responseSpacing; - - /** - * Request node address command message field. - */ - private IeeeAddress requestNodeAddress; - - /** - * Default constructor. - */ - public ImagePageCommand() { - genericCommand = false; - clusterId = 25; - commandId = 4; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Field control. - * - * @return the Field control - */ - public Integer getFieldControl() { - return fieldControl; - } - - /** - * Sets Field control. - * - * @param fieldControl the Field control - */ - public void setFieldControl(final Integer fieldControl) { - this.fieldControl = fieldControl; - } - - /** - * Gets Manufacturer code. - * - * @return the Manufacturer code - */ - public Integer getManufacturerCode() { - return manufacturerCode; - } - - /** - * Sets Manufacturer code. - * - * @param manufacturerCode the Manufacturer code - */ - public void setManufacturerCode(final Integer manufacturerCode) { - this.manufacturerCode = manufacturerCode; - } - - /** - * Gets Image type. - * - * @return the Image type - */ - public Integer getImageType() { - return imageType; - } - - /** - * Sets Image type. - * - * @param imageType the Image type - */ - public void setImageType(final Integer imageType) { - this.imageType = imageType; - } - - /** - * Gets File version. - * - * @return the File version - */ - public Integer getFileVersion() { - return fileVersion; - } - - /** - * Sets File version. - * - * @param fileVersion the File version - */ - public void setFileVersion(final Integer fileVersion) { - this.fileVersion = fileVersion; - } - - /** - * Gets File offset. - * - * @return the File offset - */ - public Integer getFileOffset() { - return fileOffset; - } - - /** - * Sets File offset. - * - * @param fileOffset the File offset - */ - public void setFileOffset(final Integer fileOffset) { - this.fileOffset = fileOffset; - } - - /** - * Gets Maximum data size. - * - * @return the Maximum data size - */ - public Integer getMaximumDataSize() { - return maximumDataSize; - } - - /** - * Sets Maximum data size. - * - * @param maximumDataSize the Maximum data size - */ - public void setMaximumDataSize(final Integer maximumDataSize) { - this.maximumDataSize = maximumDataSize; - } - - /** - * Gets Page size. - * - * @return the Page size - */ - public Integer getPageSize() { - return pageSize; - } - - /** - * Sets Page size. - * - * @param pageSize the Page size - */ - public void setPageSize(final Integer pageSize) { - this.pageSize = pageSize; - } - - /** - * Gets Response spacing. - * - * @return the Response spacing - */ - public Integer getResponseSpacing() { - return responseSpacing; - } - - /** - * Sets Response spacing. - * - * @param responseSpacing the Response spacing - */ - public void setResponseSpacing(final Integer responseSpacing) { - this.responseSpacing = responseSpacing; - } - - /** - * Gets Request node address. - * - * @return the Request node address - */ - public IeeeAddress getRequestNodeAddress() { - return requestNodeAddress; - } - - /** - * Sets Request node address. - * - * @param requestNodeAddress the Request node address - */ - public void setRequestNodeAddress(final IeeeAddress requestNodeAddress) { - this.requestNodeAddress = requestNodeAddress; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(fieldControl, ZclDataType.BITMAP_8_BIT); - serializer.serialize(manufacturerCode, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(imageType, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(fileVersion, ZclDataType.UNSIGNED_32_BIT_INTEGER); - serializer.serialize(fileOffset, ZclDataType.UNSIGNED_32_BIT_INTEGER); - serializer.serialize(maximumDataSize, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(pageSize, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(responseSpacing, ZclDataType.UNSIGNED_16_BIT_INTEGER); - if ((fieldControl & 0x01) != 0) { - serializer.serialize(requestNodeAddress, ZclDataType.IEEE_ADDRESS); - } - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - fieldControl = (Integer) deserializer.deserialize(ZclDataType.BITMAP_8_BIT); - manufacturerCode = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - imageType = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - fileVersion = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_32_BIT_INTEGER); - fileOffset = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_32_BIT_INTEGER); - maximumDataSize = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - pageSize = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - responseSpacing = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - if ((fieldControl & 0x01) != 0) { - requestNodeAddress = (IeeeAddress) deserializer.deserialize(ZclDataType.IEEE_ADDRESS); - } - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(313); - builder.append("ImagePageCommand ["); - builder.append(super.toString()); - builder.append(", fieldControl="); - builder.append(fieldControl); - builder.append(", manufacturerCode="); - builder.append(manufacturerCode); - builder.append(", imageType="); - builder.append(imageType); - builder.append(", fileVersion="); - builder.append(fileVersion); - builder.append(", fileOffset="); - builder.append(fileOffset); - builder.append(", maximumDataSize="); - builder.append(maximumDataSize); - builder.append(", pageSize="); - builder.append(pageSize); - builder.append(", responseSpacing="); - builder.append(responseSpacing); - builder.append(", requestNodeAddress="); - builder.append(requestNodeAddress); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/otaupgrade/QueryNextImageCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/otaupgrade/QueryNextImageCommand.java deleted file mode 100644 index 4451a2bcf..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/otaupgrade/QueryNextImageCommand.java +++ /dev/null @@ -1,208 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.otaupgrade; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Query Next Image Command value object class. - *

    - * Cluster: OTA Upgrade. Command is sent TO the server. - * This command is a specific command used for the OTA Upgrade cluster. - *

    - * Client devices shall send a Query Next Image Request command to the server to see if there is new - * OTA upgrade image available. ZR devices may send the command after receiving Image Notify - * command. ZED device shall periodically wake up and send the command to the upgrade server. Client - * devices query what the next image is, based on their own information. - *
    - * The server takes the client’s information in the command and determines whether it has a suitable - * image for the particular client. The decision should be based on specific policy that is specific to the - * upgrade server and outside the scope of this document.. However, a recommended default policy is for - * the server to send back a response that indicates the availability of an image that matches the - * manufacturer code, image type, and the highest available file version of that image on the - * server. However, the server may choose to upgrade, downgrade, or reinstall clients’ image, as its - * policy dictates. If client’s hardware version is included in the command, the server shall examine the - * value against the minimum and maximum hardware versions included in the OTA file header. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class QueryNextImageCommand extends ZclCommand { - /** - * Field control command message field. - */ - private Integer fieldControl; - - /** - * Manufacturer code command message field. - */ - private Integer manufacturerCode; - - /** - * Image type command message field. - */ - private Integer imageType; - - /** - * File version command message field. - */ - private Integer fileVersion; - - /** - * Hardware version command message field. - */ - private Integer hardwareVersion; - - /** - * Default constructor. - */ - public QueryNextImageCommand() { - genericCommand = false; - clusterId = 25; - commandId = 1; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Field control. - * - * @return the Field control - */ - public Integer getFieldControl() { - return fieldControl; - } - - /** - * Sets Field control. - * - * @param fieldControl the Field control - */ - public void setFieldControl(final Integer fieldControl) { - this.fieldControl = fieldControl; - } - - /** - * Gets Manufacturer code. - * - * @return the Manufacturer code - */ - public Integer getManufacturerCode() { - return manufacturerCode; - } - - /** - * Sets Manufacturer code. - * - * @param manufacturerCode the Manufacturer code - */ - public void setManufacturerCode(final Integer manufacturerCode) { - this.manufacturerCode = manufacturerCode; - } - - /** - * Gets Image type. - * - * @return the Image type - */ - public Integer getImageType() { - return imageType; - } - - /** - * Sets Image type. - * - * @param imageType the Image type - */ - public void setImageType(final Integer imageType) { - this.imageType = imageType; - } - - /** - * Gets File version. - * - * @return the File version - */ - public Integer getFileVersion() { - return fileVersion; - } - - /** - * Sets File version. - * - * @param fileVersion the File version - */ - public void setFileVersion(final Integer fileVersion) { - this.fileVersion = fileVersion; - } - - /** - * Gets Hardware version. - * - * @return the Hardware version - */ - public Integer getHardwareVersion() { - return hardwareVersion; - } - - /** - * Sets Hardware version. - * - * @param hardwareVersion the Hardware version - */ - public void setHardwareVersion(final Integer hardwareVersion) { - this.hardwareVersion = hardwareVersion; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(fieldControl, ZclDataType.BITMAP_8_BIT); - serializer.serialize(manufacturerCode, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(imageType, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(fileVersion, ZclDataType.UNSIGNED_32_BIT_INTEGER); - if ((fieldControl & 0x01) != 0) { - serializer.serialize(hardwareVersion, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - fieldControl = (Integer) deserializer.deserialize(ZclDataType.BITMAP_8_BIT); - manufacturerCode = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - imageType = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - fileVersion = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_32_BIT_INTEGER); - if ((fieldControl & 0x01) != 0) { - hardwareVersion = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(187); - builder.append("QueryNextImageCommand ["); - builder.append(super.toString()); - builder.append(", fieldControl="); - builder.append(fieldControl); - builder.append(", manufacturerCode="); - builder.append(manufacturerCode); - builder.append(", imageType="); - builder.append(imageType); - builder.append(", fileVersion="); - builder.append(fileVersion); - builder.append(", hardwareVersion="); - builder.append(hardwareVersion); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/otaupgrade/QueryNextImageResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/otaupgrade/QueryNextImageResponse.java deleted file mode 100644 index 11f41848b..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/otaupgrade/QueryNextImageResponse.java +++ /dev/null @@ -1,221 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.otaupgrade; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; -import com.zsmartsystems.zigbee.zcl.ZclStatus; - -/** - * Query Next Image Response value object class. - *

    - * Cluster: OTA Upgrade. Command is sent FROM the server. - * This command is a specific command used for the OTA Upgrade cluster. - *

    - * The upgrade server sends a Query Next Image Response with one of the following status: SUCCESS, - * NO_IMAGE_AVAILABLE or NOT_AUTHORIZED. When a SUCCESS status is sent, it is - * considered to be the explicit authorization to a device by the upgrade server that the device may - * upgrade to a specific software image. - *
    - * A status of NO_IMAGE_AVAILABLE indicates that the server is authorized to upgrade the client but - * it currently does not have the (new) OTA upgrade image available for the client. For all clients (both - * ZR and ZED)9 , they shall continue sending Query Next Image Requests to the server periodically until - * an image becomes available. - *
    - * A status of NOT_AUTHORIZED indicates the server is not authorized to upgrade the client. In this - * case, the client may perform discovery again to find another upgrade server. The client may implement - * an intelligence to avoid querying the same unauthorized server. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class QueryNextImageResponse extends ZclCommand { - /** - * Status command message field. - */ - private ZclStatus status; - - /** - * Manufacturer code command message field. - */ - private Integer manufacturerCode; - - /** - * Image type command message field. - */ - private Integer imageType; - - /** - * File Version command message field. - */ - private Integer fileVersion; - - /** - * Image Size command message field. - */ - private Integer imageSize; - - /** - * Default constructor. - */ - public QueryNextImageResponse() { - genericCommand = false; - clusterId = 25; - commandId = 2; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Status. - * - * @return the Status - */ - public ZclStatus getStatus() { - return status; - } - - /** - * Sets Status. - * - * @param status the Status - */ - public void setStatus(final ZclStatus status) { - this.status = status; - } - - /** - * Gets Manufacturer code. - * - * @return the Manufacturer code - */ - public Integer getManufacturerCode() { - return manufacturerCode; - } - - /** - * Sets Manufacturer code. - * - * @param manufacturerCode the Manufacturer code - */ - public void setManufacturerCode(final Integer manufacturerCode) { - this.manufacturerCode = manufacturerCode; - } - - /** - * Gets Image type. - * - * @return the Image type - */ - public Integer getImageType() { - return imageType; - } - - /** - * Sets Image type. - * - * @param imageType the Image type - */ - public void setImageType(final Integer imageType) { - this.imageType = imageType; - } - - /** - * Gets File Version. - * - * @return the File Version - */ - public Integer getFileVersion() { - return fileVersion; - } - - /** - * Sets File Version. - * - * @param fileVersion the File Version - */ - public void setFileVersion(final Integer fileVersion) { - this.fileVersion = fileVersion; - } - - /** - * Gets Image Size. - * - * @return the Image Size - */ - public Integer getImageSize() { - return imageSize; - } - - /** - * Sets Image Size. - * - * @param imageSize the Image Size - */ - public void setImageSize(final Integer imageSize) { - this.imageSize = imageSize; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(status, ZclDataType.ZCL_STATUS); - if (status == ZclStatus.SUCCESS) { - serializer.serialize(manufacturerCode, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - if (status == ZclStatus.SUCCESS) { - serializer.serialize(imageType, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - if (status == ZclStatus.SUCCESS) { - serializer.serialize(fileVersion, ZclDataType.UNSIGNED_32_BIT_INTEGER); - } - if (status == ZclStatus.SUCCESS) { - serializer.serialize(imageSize, ZclDataType.UNSIGNED_32_BIT_INTEGER); - } - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - status = (ZclStatus) deserializer.deserialize(ZclDataType.ZCL_STATUS); - if (status == ZclStatus.SUCCESS) { - manufacturerCode = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - if (status == ZclStatus.SUCCESS) { - imageType = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - if (status == ZclStatus.SUCCESS) { - fileVersion = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_32_BIT_INTEGER); - } - if (status == ZclStatus.SUCCESS) { - imageSize = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_32_BIT_INTEGER); - } - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(176); - builder.append("QueryNextImageResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(", manufacturerCode="); - builder.append(manufacturerCode); - builder.append(", imageType="); - builder.append(imageType); - builder.append(", fileVersion="); - builder.append(fileVersion); - builder.append(", imageSize="); - builder.append(imageSize); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/otaupgrade/QuerySpecificFileCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/otaupgrade/QuerySpecificFileCommand.java deleted file mode 100644 index 8dff064e8..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/otaupgrade/QuerySpecificFileCommand.java +++ /dev/null @@ -1,198 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.otaupgrade; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; -import com.zsmartsystems.zigbee.IeeeAddress; - -/** - * Query Specific File Command value object class. - *

    - * Cluster: OTA Upgrade. Command is sent TO the server. - * This command is a specific command used for the OTA Upgrade cluster. - *

    - * Client devices shall send a Query Specific File Request command to the server to request for a file that - * is specific and unique to it. Such file could contain non-firmware data such as security credential - * (needed for upgrading from Smart Energy 1.1 to Smart Energy 2.0), configuration or log. When the - * device decides to send the Query Specific File Request command is manufacturer specific. However, - * one example is during upgrading from SE 1.1 to 2.0 where the client may have already obtained new - * SE 2.0 image and now needs new SE 2.0 security credential data. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class QuerySpecificFileCommand extends ZclCommand { - /** - * Request node address command message field. - */ - private IeeeAddress requestNodeAddress; - - /** - * Manufacturer code command message field. - */ - private Integer manufacturerCode; - - /** - * Image type command message field. - */ - private Integer imageType; - - /** - * File Version command message field. - */ - private Integer fileVersion; - - /** - * Zigbee Stack Version command message field. - */ - private Integer zigbeeStackVersion; - - /** - * Default constructor. - */ - public QuerySpecificFileCommand() { - genericCommand = false; - clusterId = 25; - commandId = 8; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Request node address. - * - * @return the Request node address - */ - public IeeeAddress getRequestNodeAddress() { - return requestNodeAddress; - } - - /** - * Sets Request node address. - * - * @param requestNodeAddress the Request node address - */ - public void setRequestNodeAddress(final IeeeAddress requestNodeAddress) { - this.requestNodeAddress = requestNodeAddress; - } - - /** - * Gets Manufacturer code. - * - * @return the Manufacturer code - */ - public Integer getManufacturerCode() { - return manufacturerCode; - } - - /** - * Sets Manufacturer code. - * - * @param manufacturerCode the Manufacturer code - */ - public void setManufacturerCode(final Integer manufacturerCode) { - this.manufacturerCode = manufacturerCode; - } - - /** - * Gets Image type. - * - * @return the Image type - */ - public Integer getImageType() { - return imageType; - } - - /** - * Sets Image type. - * - * @param imageType the Image type - */ - public void setImageType(final Integer imageType) { - this.imageType = imageType; - } - - /** - * Gets File Version. - * - * @return the File Version - */ - public Integer getFileVersion() { - return fileVersion; - } - - /** - * Sets File Version. - * - * @param fileVersion the File Version - */ - public void setFileVersion(final Integer fileVersion) { - this.fileVersion = fileVersion; - } - - /** - * Gets Zigbee Stack Version. - * - * @return the Zigbee Stack Version - */ - public Integer getZigbeeStackVersion() { - return zigbeeStackVersion; - } - - /** - * Sets Zigbee Stack Version. - * - * @param zigbeeStackVersion the Zigbee Stack Version - */ - public void setZigbeeStackVersion(final Integer zigbeeStackVersion) { - this.zigbeeStackVersion = zigbeeStackVersion; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(requestNodeAddress, ZclDataType.IEEE_ADDRESS); - serializer.serialize(manufacturerCode, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(imageType, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(fileVersion, ZclDataType.UNSIGNED_32_BIT_INTEGER); - serializer.serialize(zigbeeStackVersion, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - requestNodeAddress = (IeeeAddress) deserializer.deserialize(ZclDataType.IEEE_ADDRESS); - manufacturerCode = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - imageType = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - fileVersion = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_32_BIT_INTEGER); - zigbeeStackVersion = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(199); - builder.append("QuerySpecificFileCommand ["); - builder.append(super.toString()); - builder.append(", requestNodeAddress="); - builder.append(requestNodeAddress); - builder.append(", manufacturerCode="); - builder.append(manufacturerCode); - builder.append(", imageType="); - builder.append(imageType); - builder.append(", fileVersion="); - builder.append(fileVersion); - builder.append(", zigbeeStackVersion="); - builder.append(zigbeeStackVersion); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/otaupgrade/QuerySpecificFileResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/otaupgrade/QuerySpecificFileResponse.java deleted file mode 100644 index 420727923..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/otaupgrade/QuerySpecificFileResponse.java +++ /dev/null @@ -1,217 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.otaupgrade; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; -import com.zsmartsystems.zigbee.zcl.ZclStatus; - -/** - * Query Specific File Response value object class. - *

    - * Cluster: OTA Upgrade. Command is sent FROM the server. - * This command is a specific command used for the OTA Upgrade cluster. - *

    - * The server sends Query Specific File Response after receiving Query Specific File Request from a - * client. The server shall determine whether it first supports the Query Specific File Request command. - * Then it shall determine whether it has the specific file being requested by the client using all the - * information included in the request. The upgrade server sends a Query Specific File Response with - * one of the following status: SUCCESS, NO_IMAGE_AVAILABLE or NOT_AUTHORIZED. - *
    - * A status of NO_IMAGE_AVAILABLE indicates that the server currently does not have the device - * specific file available for the client. A status of NOT_AUTHORIZED indicates the server is not - * authorized to send the file to the client. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class QuerySpecificFileResponse extends ZclCommand { - /** - * Status command message field. - */ - private ZclStatus status; - - /** - * Manufacturer code command message field. - */ - private Integer manufacturerCode; - - /** - * Image type command message field. - */ - private Integer imageType; - - /** - * File Version command message field. - */ - private Integer fileVersion; - - /** - * Image Size command message field. - */ - private Integer imageSize; - - /** - * Default constructor. - */ - public QuerySpecificFileResponse() { - genericCommand = false; - clusterId = 25; - commandId = 9; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Status. - * - * @return the Status - */ - public ZclStatus getStatus() { - return status; - } - - /** - * Sets Status. - * - * @param status the Status - */ - public void setStatus(final ZclStatus status) { - this.status = status; - } - - /** - * Gets Manufacturer code. - * - * @return the Manufacturer code - */ - public Integer getManufacturerCode() { - return manufacturerCode; - } - - /** - * Sets Manufacturer code. - * - * @param manufacturerCode the Manufacturer code - */ - public void setManufacturerCode(final Integer manufacturerCode) { - this.manufacturerCode = manufacturerCode; - } - - /** - * Gets Image type. - * - * @return the Image type - */ - public Integer getImageType() { - return imageType; - } - - /** - * Sets Image type. - * - * @param imageType the Image type - */ - public void setImageType(final Integer imageType) { - this.imageType = imageType; - } - - /** - * Gets File Version. - * - * @return the File Version - */ - public Integer getFileVersion() { - return fileVersion; - } - - /** - * Sets File Version. - * - * @param fileVersion the File Version - */ - public void setFileVersion(final Integer fileVersion) { - this.fileVersion = fileVersion; - } - - /** - * Gets Image Size. - * - * @return the Image Size - */ - public Integer getImageSize() { - return imageSize; - } - - /** - * Sets Image Size. - * - * @param imageSize the Image Size - */ - public void setImageSize(final Integer imageSize) { - this.imageSize = imageSize; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(status, ZclDataType.ZCL_STATUS); - if (status == ZclStatus.SUCCESS) { - serializer.serialize(manufacturerCode, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - if (status == ZclStatus.SUCCESS) { - serializer.serialize(imageType, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - if (status == ZclStatus.SUCCESS) { - serializer.serialize(fileVersion, ZclDataType.UNSIGNED_32_BIT_INTEGER); - } - if (status == ZclStatus.SUCCESS) { - serializer.serialize(imageSize, ZclDataType.UNSIGNED_32_BIT_INTEGER); - } - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - status = (ZclStatus) deserializer.deserialize(ZclDataType.ZCL_STATUS); - if (status == ZclStatus.SUCCESS) { - manufacturerCode = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - if (status == ZclStatus.SUCCESS) { - imageType = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - if (status == ZclStatus.SUCCESS) { - fileVersion = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_32_BIT_INTEGER); - } - if (status == ZclStatus.SUCCESS) { - imageSize = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_32_BIT_INTEGER); - } - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(179); - builder.append("QuerySpecificFileResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(", manufacturerCode="); - builder.append(manufacturerCode); - builder.append(", imageType="); - builder.append(imageType); - builder.append(", fileVersion="); - builder.append(fileVersion); - builder.append(", imageSize="); - builder.append(imageSize); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/otaupgrade/UpgradeEndCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/otaupgrade/UpgradeEndCommand.java deleted file mode 100644 index dadade867..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/otaupgrade/UpgradeEndCommand.java +++ /dev/null @@ -1,183 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.otaupgrade; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; -import com.zsmartsystems.zigbee.zcl.ZclStatus; - -/** - * Upgrade End Command value object class. - *

    - * Cluster: OTA Upgrade. Command is sent TO the server. - * This command is a specific command used for the OTA Upgrade cluster. - *

    - * Upon reception all the image data, the client should verify the image to ensure its integrity and validity. - * If the device requires signed images it shall examine the image and verify the signature. Clients may perform - * additional manufacturer specific integrity checks to validate the image, for example, CRC check on the actual file data. - *
    - * If the image fails any integrity checks, the client shall send an Upgrade End Request command to the - * upgrade server with a status of INVALID_IMAGE. In this case, the client may reinitiate the upgrade - * process in order to obtain a valid OTA upgrade image. The client shall not upgrade to the bad image - * and shall discard the downloaded image data. - *
    - * If the image passes all integrity checks and the client does not require additional OTA upgrade image - * file, it shall send back an Upgrade End Request with a status of SUCCESS. However, if the client - * requires multiple OTA upgrade image files before performing an upgrade, it shall send an Upgrade End - * Request command with status REQUIRE_MORE_IMAGE. This shall indicate to the server that it - * cannot yet upgrade the image it received. - *
    - * If the client decides to cancel the download process for any other reasons, it has the option of sending - * Upgrade End Request with status of ABORT at anytime during the download process. The client shall - * then try to reinitiate the download process again at a later time. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class UpgradeEndCommand extends ZclCommand { - /** - * Status command message field. - */ - private ZclStatus status; - - /** - * Manufacturer code command message field. - */ - private Integer manufacturerCode; - - /** - * Image type command message field. - */ - private Integer imageType; - - /** - * File Version command message field. - */ - private Integer fileVersion; - - /** - * Default constructor. - */ - public UpgradeEndCommand() { - genericCommand = false; - clusterId = 25; - commandId = 6; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Status. - * - * @return the Status - */ - public ZclStatus getStatus() { - return status; - } - - /** - * Sets Status. - * - * @param status the Status - */ - public void setStatus(final ZclStatus status) { - this.status = status; - } - - /** - * Gets Manufacturer code. - * - * @return the Manufacturer code - */ - public Integer getManufacturerCode() { - return manufacturerCode; - } - - /** - * Sets Manufacturer code. - * - * @param manufacturerCode the Manufacturer code - */ - public void setManufacturerCode(final Integer manufacturerCode) { - this.manufacturerCode = manufacturerCode; - } - - /** - * Gets Image type. - * - * @return the Image type - */ - public Integer getImageType() { - return imageType; - } - - /** - * Sets Image type. - * - * @param imageType the Image type - */ - public void setImageType(final Integer imageType) { - this.imageType = imageType; - } - - /** - * Gets File Version. - * - * @return the File Version - */ - public Integer getFileVersion() { - return fileVersion; - } - - /** - * Sets File Version. - * - * @param fileVersion the File Version - */ - public void setFileVersion(final Integer fileVersion) { - this.fileVersion = fileVersion; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(status, ZclDataType.ZCL_STATUS); - serializer.serialize(manufacturerCode, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(imageType, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(fileVersion, ZclDataType.UNSIGNED_32_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - status = (ZclStatus) deserializer.deserialize(ZclDataType.ZCL_STATUS); - manufacturerCode = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - imageType = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - fileVersion = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_32_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(142); - builder.append("UpgradeEndCommand ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(", manufacturerCode="); - builder.append(manufacturerCode); - builder.append(", imageType="); - builder.append(imageType); - builder.append(", fileVersion="); - builder.append(fileVersion); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/otaupgrade/UpgradeEndResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/otaupgrade/UpgradeEndResponse.java deleted file mode 100644 index b5404e60f..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/otaupgrade/UpgradeEndResponse.java +++ /dev/null @@ -1,203 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.otaupgrade; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Upgrade End Response value object class. - *

    - * Cluster: OTA Upgrade. Command is sent FROM the server. - * This command is a specific command used for the OTA Upgrade cluster. - *

    - * When an upgrade server receives an Upgrade End Request command with a status of - * INVALID_IMAGE, REQUIRE_MORE_IMAGE, or ABORT, no additional processing shall be done - * in its part. If the upgrade server receives an Upgrade End Request command with a status of - * SUCCESS, it shall generate an Upgrade End Response with the manufacturer code and image type - * received in the Upgrade End Request along with the times indicating when the device should upgrade - * to the new image. - *
    - * The server may send an unsolicited Upgrade End Response command to the client. This may be used - * for example if the server wants to synchronize the upgrade on multiple clients simultaneously. For - * client devices, the upgrade server may unicast or broadcast Upgrade End Response command - * indicating a single client device or multiple client devices shall switch to using their new images. The - * command may not be reliably received by sleepy devices if it is sent unsolicited. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class UpgradeEndResponse extends ZclCommand { - /** - * Manufacturer code command message field. - */ - private Integer manufacturerCode; - - /** - * Image type command message field. - */ - private Integer imageType; - - /** - * File Version command message field. - */ - private Integer fileVersion; - - /** - * Current Time command message field. - */ - private Integer currentTime; - - /** - * Upgrade Time command message field. - */ - private Integer upgradeTime; - - /** - * Default constructor. - */ - public UpgradeEndResponse() { - genericCommand = false; - clusterId = 25; - commandId = 7; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Manufacturer code. - * - * @return the Manufacturer code - */ - public Integer getManufacturerCode() { - return manufacturerCode; - } - - /** - * Sets Manufacturer code. - * - * @param manufacturerCode the Manufacturer code - */ - public void setManufacturerCode(final Integer manufacturerCode) { - this.manufacturerCode = manufacturerCode; - } - - /** - * Gets Image type. - * - * @return the Image type - */ - public Integer getImageType() { - return imageType; - } - - /** - * Sets Image type. - * - * @param imageType the Image type - */ - public void setImageType(final Integer imageType) { - this.imageType = imageType; - } - - /** - * Gets File Version. - * - * @return the File Version - */ - public Integer getFileVersion() { - return fileVersion; - } - - /** - * Sets File Version. - * - * @param fileVersion the File Version - */ - public void setFileVersion(final Integer fileVersion) { - this.fileVersion = fileVersion; - } - - /** - * Gets Current Time. - * - * @return the Current Time - */ - public Integer getCurrentTime() { - return currentTime; - } - - /** - * Sets Current Time. - * - * @param currentTime the Current Time - */ - public void setCurrentTime(final Integer currentTime) { - this.currentTime = currentTime; - } - - /** - * Gets Upgrade Time. - * - * @return the Upgrade Time - */ - public Integer getUpgradeTime() { - return upgradeTime; - } - - /** - * Sets Upgrade Time. - * - * @param upgradeTime the Upgrade Time - */ - public void setUpgradeTime(final Integer upgradeTime) { - this.upgradeTime = upgradeTime; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(manufacturerCode, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(imageType, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(fileVersion, ZclDataType.UNSIGNED_32_BIT_INTEGER); - serializer.serialize(currentTime, ZclDataType.UNSIGNED_32_BIT_INTEGER); - serializer.serialize(upgradeTime, ZclDataType.UNSIGNED_32_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - manufacturerCode = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - imageType = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - fileVersion = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_32_BIT_INTEGER); - currentTime = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_32_BIT_INTEGER); - upgradeTime = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_32_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(179); - builder.append("UpgradeEndResponse ["); - builder.append(super.toString()); - builder.append(", manufacturerCode="); - builder.append(manufacturerCode); - builder.append(", imageType="); - builder.append(imageType); - builder.append(", fileVersion="); - builder.append(fileVersion); - builder.append(", currentTime="); - builder.append(currentTime); - builder.append(", upgradeTime="); - builder.append(upgradeTime); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/pollcontrol/CheckInCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/pollcontrol/CheckInCommand.java deleted file mode 100644 index 60a9f88f1..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/pollcontrol/CheckInCommand.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.pollcontrol; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Check In Command value object class. - *

    - * Cluster: Poll Control. Command is sent FROM the server. - * This command is a specific command used for the Poll Control cluster. - *

    - * The Poll Control Cluster server sends out a Check-in command to the devices to which it is paired based on the server’s Check-inInterval - * attribute. It does this to find out if any of the Poll Control Cluster Clients with which it is paired are interested in having it enter fast - * poll mode so that it can be managed. This request is sent out based on either the Check-inInterval, or the next Check-in value in the Fast Poll - * Stop Request generated by the Poll Control Cluster Client. - *
    - * The Check-in command expects a Check-in Response command to be sent back from the Poll Control Client. If the Poll Control Server does not - * receive a Check-in response back from the Poll Control Client up to 7.68 seconds it is free to return to polling according to the - * LongPollInterval. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-05-06T20:48:39Z") -public class CheckInCommand extends ZclCommand { - /** - * Default constructor. - */ - public CheckInCommand() { - genericCommand = false; - clusterId = 32; - commandId = 0; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(17); - builder.append("CheckInCommand ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/pollcontrol/CheckInResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/pollcontrol/CheckInResponse.java deleted file mode 100644 index 7331f75f8..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/pollcontrol/CheckInResponse.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.pollcontrol; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Check In Response value object class. - *

    - * Cluster: Poll Control. Command is sent TO the server. - * This command is a specific command used for the Poll Control cluster. - *

    - * The Check-in Response is sent in response to the receipt of a Check-in command. The Check-in Response is used by the Poll Control Client to - * indicate whether it would like the device implementing the Poll Control Cluster Server to go into a fast poll mode and for how long. If the Poll - * Control Cluster Client indicates that it would like the device to go into a fast poll mode, it is responsible for telling the device to stop - * fast polling when it is done sending messages to the fast polling device. - *
    - * If the Poll Control Server receives a Check-In Response from a client for which there is no binding (unbound), it SHOULD respond with a - * Default Response with a status value indicating ACTION_DENIED. - *
    - * If the Poll Control Server receives a Check-In Response from a client for which there is a binding (bound) with an invalid fast poll interval - * it SHOULD respond with a Default Response with status INVALID_VALUE. - *
    - * If the Poll Control Server receives a Check-In Response from a bound client after temporary fast poll mode is completed it SHOULD respond - * with a Default Response with a status value indicating TIMEOUT. - *
    - * In all of the above cases, the Server SHALL respond with a Default Response not equal to ZCL_SUCCESS. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-05-06T20:48:39Z") -public class CheckInResponse extends ZclCommand { - /** - * Start Fast Polling command message field. - */ - private Boolean startFastPolling; - - /** - * Fast Poll Timeout command message field. - */ - private Integer fastPollTimeout; - - /** - * Default constructor. - */ - public CheckInResponse() { - genericCommand = false; - clusterId = 32; - commandId = 0; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Start Fast Polling. - * - * @return the Start Fast Polling - */ - public Boolean getStartFastPolling() { - return startFastPolling; - } - - /** - * Sets Start Fast Polling. - * - * @param startFastPolling the Start Fast Polling - */ - public void setStartFastPolling(final Boolean startFastPolling) { - this.startFastPolling = startFastPolling; - } - - /** - * Gets Fast Poll Timeout. - * - * @return the Fast Poll Timeout - */ - public Integer getFastPollTimeout() { - return fastPollTimeout; - } - - /** - * Sets Fast Poll Timeout. - * - * @param fastPollTimeout the Fast Poll Timeout - */ - public void setFastPollTimeout(final Integer fastPollTimeout) { - this.fastPollTimeout = fastPollTimeout; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(startFastPolling, ZclDataType.BOOLEAN); - serializer.serialize(fastPollTimeout, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - startFastPolling = (Boolean) deserializer.deserialize(ZclDataType.BOOLEAN); - fastPollTimeout = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(89); - builder.append("CheckInResponse ["); - builder.append(super.toString()); - builder.append(", startFastPolling="); - builder.append(startFastPolling); - builder.append(", fastPollTimeout="); - builder.append(fastPollTimeout); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/pollcontrol/FastPollStopCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/pollcontrol/FastPollStopCommand.java deleted file mode 100644 index e3655fe30..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/pollcontrol/FastPollStopCommand.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.pollcontrol; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Fast Poll Stop Command value object class. - *

    - * Cluster: Poll Control. Command is sent TO the server. - * This command is a specific command used for the Poll Control cluster. - *

    - * The Fast Poll Stop command is used to stop the fast poll mode initiated by the Check-in response. The Fast Poll Stop command has no payload. - *
    - * If the Poll Control Server receives a Fast Poll Stop from an unbound client it SHOULD send back a DefaultResponse with a value field - * indicating “ACTION_DENIED” . The Server SHALL respond with a DefaultResponse not equal to ZCL_SUCCESS. - *
    - * If the Poll Control Server receives a Fast Poll Stop command from a bound client but it is unable to stop fast polling due to the fact that there - * is another bound client which has requested that polling continue it SHOULD respond with a Default Response with a status of - * “ACTION_DENIED” - *
    - * If a Poll Control Server receives a Fast Poll Stop command from a bound client but it is not FastPolling it SHOULD respond with a Default - * Response with a status of ACTION_DENIED. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class FastPollStopCommand extends ZclCommand { - /** - * Default constructor. - */ - public FastPollStopCommand() { - genericCommand = false; - clusterId = 32; - commandId = 1; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(22); - builder.append("FastPollStopCommand ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/pollcontrol/SetLongPollIntervalCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/pollcontrol/SetLongPollIntervalCommand.java deleted file mode 100644 index 806546dea..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/pollcontrol/SetLongPollIntervalCommand.java +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.pollcontrol; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Set Long Poll Interval Command value object class. - *

    - * Cluster: Poll Control. Command is sent TO the server. - * This command is a specific command used for the Poll Control cluster. - *

    - * The Set Long Poll Interval command is used to set the Read Only LongPollInterval attribute. - *
    - * When the Poll Control Server receives the Set Long Poll Interval Command, it SHOULD check its internal minimal limit and the attributes - * relationship if the new Long Poll Interval is acceptable. If the new value is acceptable, the new value SHALL be saved to the - * LongPollInterval attribute. If the new value is not acceptable, the Poll Control Server SHALL send a default response of INVALID_VALUE and - * the LongPollInterval attribute value is not updated. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class SetLongPollIntervalCommand extends ZclCommand { - /** - * New Long Poll Interval command message field. - */ - private Integer newLongPollInterval; - - /** - * Default constructor. - */ - public SetLongPollIntervalCommand() { - genericCommand = false; - clusterId = 32; - commandId = 2; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets New Long Poll Interval. - * - * @return the New Long Poll Interval - */ - public Integer getNewLongPollInterval() { - return newLongPollInterval; - } - - /** - * Sets New Long Poll Interval. - * - * @param newLongPollInterval the New Long Poll Interval - */ - public void setNewLongPollInterval(final Integer newLongPollInterval) { - this.newLongPollInterval = newLongPollInterval; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(newLongPollInterval, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - newLongPollInterval = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(68); - builder.append("SetLongPollIntervalCommand ["); - builder.append(super.toString()); - builder.append(", newLongPollInterval="); - builder.append(newLongPollInterval); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/pollcontrol/SetShortPollIntervalCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/pollcontrol/SetShortPollIntervalCommand.java deleted file mode 100644 index bfdce284a..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/pollcontrol/SetShortPollIntervalCommand.java +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.pollcontrol; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Set Short Poll Interval Command value object class. - *

    - * Cluster: Poll Control. Command is sent TO the server. - * This command is a specific command used for the Poll Control cluster. - *

    - * The Set Short Poll Interval command is used to set the Read Only ShortPollInterval attribute. - *
    - * When the Poll Control Server receives the Set Short Poll Interval Command, it SHOULD check its internal minimal limit and the attributes - * relationship if the new Short Poll Interval is acceptable. If the new value is acceptable, the new value SHALL be saved to the - * ShortPollInterval attribute. If the new value is not acceptable, the Poll Control Server SHALL send a default response of INVALID_VALUE - * and the ShortPollInterval attribute value is not updated. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class SetShortPollIntervalCommand extends ZclCommand { - /** - * New Short Poll Interval command message field. - */ - private Integer newShortPollInterval; - - /** - * Default constructor. - */ - public SetShortPollIntervalCommand() { - genericCommand = false; - clusterId = 32; - commandId = 3; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets New Short Poll Interval. - * - * @return the New Short Poll Interval - */ - public Integer getNewShortPollInterval() { - return newShortPollInterval; - } - - /** - * Sets New Short Poll Interval. - * - * @param newShortPollInterval the New Short Poll Interval - */ - public void setNewShortPollInterval(final Integer newShortPollInterval) { - this.newShortPollInterval = newShortPollInterval; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(newShortPollInterval, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - newShortPollInterval = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(70); - builder.append("SetShortPollIntervalCommand ["); - builder.append(super.toString()); - builder.append(", newShortPollInterval="); - builder.append(newShortPollInterval); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/powerconfiguration/BatterySizeEnum.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/powerconfiguration/BatterySizeEnum.java deleted file mode 100644 index 50849b713..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/powerconfiguration/BatterySizeEnum.java +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.powerconfiguration; - -import java.util.HashMap; -import java.util.Map; - -import javax.annotation.Generated; - -/** - * Enumeration of Power configuration attribute BatterySize options. - *

    - * Code is auto-generated. Modifications may be overwritten! - * - * @author Chris Jackson - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-31T12:00:43Z") -public enum BatterySizeEnum { - NO_BATTERY(0x0000), - BUILD_IN(0x0001), - OTHER(0x0002), - AA__CELL(0x0003), - AAA_CELL(0x0004), - C_CELL(0x0005), - D_CELL(0x0006), - CR2_CELL(0x0007), - CR123A_CELL(0x0008), - UNKNOWN(0x00FF); - - /** - * A mapping between the integer code and its corresponding BatterySizeEnum type to facilitate lookup by value. - */ - private static Map idMap; - - static { - idMap = new HashMap(); - for (BatterySizeEnum enumValue : values()) { - idMap.put(enumValue.key, enumValue); - } - } - - private final int key; - - BatterySizeEnum(final int key) { - this.key = key; - } - - public int getKey() { - return key; - } - - public static BatterySizeEnum getByValue(final int value) { - return idMap.get(value); - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/AnchorNodeAnnounceCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/AnchorNodeAnnounceCommand.java deleted file mode 100644 index 0a1107531..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/AnchorNodeAnnounceCommand.java +++ /dev/null @@ -1,164 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.rssilocation; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; -import com.zsmartsystems.zigbee.IeeeAddress; - -/** - * Anchor Node Announce Command value object class. - *

    - * Cluster: RSSI Location. Command is sent TO the server. - * This command is a specific command used for the RSSI Location cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class AnchorNodeAnnounceCommand extends ZclCommand { - /** - * Anchor Node Address command message field. - */ - private IeeeAddress anchorNodeAddress; - - /** - * Coordinate 1 command message field. - */ - private Integer coordinate1; - - /** - * Coordinate 2 command message field. - */ - private Integer coordinate2; - - /** - * Coordinate 3 command message field. - */ - private Integer coordinate3; - - /** - * Default constructor. - */ - public AnchorNodeAnnounceCommand() { - genericCommand = false; - clusterId = 11; - commandId = 6; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Anchor Node Address. - * - * @return the Anchor Node Address - */ - public IeeeAddress getAnchorNodeAddress() { - return anchorNodeAddress; - } - - /** - * Sets Anchor Node Address. - * - * @param anchorNodeAddress the Anchor Node Address - */ - public void setAnchorNodeAddress(final IeeeAddress anchorNodeAddress) { - this.anchorNodeAddress = anchorNodeAddress; - } - - /** - * Gets Coordinate 1. - * - * @return the Coordinate 1 - */ - public Integer getCoordinate1() { - return coordinate1; - } - - /** - * Sets Coordinate 1. - * - * @param coordinate1 the Coordinate 1 - */ - public void setCoordinate1(final Integer coordinate1) { - this.coordinate1 = coordinate1; - } - - /** - * Gets Coordinate 2. - * - * @return the Coordinate 2 - */ - public Integer getCoordinate2() { - return coordinate2; - } - - /** - * Sets Coordinate 2. - * - * @param coordinate2 the Coordinate 2 - */ - public void setCoordinate2(final Integer coordinate2) { - this.coordinate2 = coordinate2; - } - - /** - * Gets Coordinate 3. - * - * @return the Coordinate 3 - */ - public Integer getCoordinate3() { - return coordinate3; - } - - /** - * Sets Coordinate 3. - * - * @param coordinate3 the Coordinate 3 - */ - public void setCoordinate3(final Integer coordinate3) { - this.coordinate3 = coordinate3; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(anchorNodeAddress, ZclDataType.IEEE_ADDRESS); - serializer.serialize(coordinate1, ZclDataType.SIGNED_16_BIT_INTEGER); - serializer.serialize(coordinate2, ZclDataType.SIGNED_16_BIT_INTEGER); - serializer.serialize(coordinate3, ZclDataType.SIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - anchorNodeAddress = (IeeeAddress) deserializer.deserialize(ZclDataType.IEEE_ADDRESS); - coordinate1 = (Integer) deserializer.deserialize(ZclDataType.SIGNED_16_BIT_INTEGER); - coordinate2 = (Integer) deserializer.deserialize(ZclDataType.SIGNED_16_BIT_INTEGER); - coordinate3 = (Integer) deserializer.deserialize(ZclDataType.SIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(158); - builder.append("AnchorNodeAnnounceCommand ["); - builder.append(super.toString()); - builder.append(", anchorNodeAddress="); - builder.append(anchorNodeAddress); - builder.append(", coordinate1="); - builder.append(coordinate1); - builder.append(", coordinate2="); - builder.append(coordinate2); - builder.append(", coordinate3="); - builder.append(coordinate3); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/CompactLocationDataNotificationCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/CompactLocationDataNotificationCommand.java deleted file mode 100644 index 9c8db642f..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/CompactLocationDataNotificationCommand.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.rssilocation; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Compact Location Data Notification Command value object class. - *

    - * Cluster: RSSI Location. Command is sent FROM the server. - * This command is a specific command used for the RSSI Location cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class CompactLocationDataNotificationCommand extends ZclCommand { - /** - * Default constructor. - */ - public CompactLocationDataNotificationCommand() { - genericCommand = false; - clusterId = 11; - commandId = 3; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(41); - builder.append("CompactLocationDataNotificationCommand ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/DeviceConfigurationResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/DeviceConfigurationResponse.java deleted file mode 100644 index 3c03596a7..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/DeviceConfigurationResponse.java +++ /dev/null @@ -1,217 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.rssilocation; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Device Configuration Response value object class. - *

    - * Cluster: RSSI Location. Command is sent FROM the server. - * This command is a specific command used for the RSSI Location cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class DeviceConfigurationResponse extends ZclCommand { - /** - * Status command message field. - */ - private Integer status; - - /** - * Power command message field. - */ - private Integer power; - - /** - * Path Loss Exponent command message field. - */ - private Integer pathLossExponent; - - /** - * Calculation Period command message field. - */ - private Integer calculationPeriod; - - /** - * Number RSSI Measurements command message field. - */ - private Integer numberRssiMeasurements; - - /** - * Reporting Period command message field. - */ - private Integer reportingPeriod; - - /** - * Default constructor. - */ - public DeviceConfigurationResponse() { - genericCommand = false; - clusterId = 11; - commandId = 0; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Status. - * - * @return the Status - */ - public Integer getStatus() { - return status; - } - - /** - * Sets Status. - * - * @param status the Status - */ - public void setStatus(final Integer status) { - this.status = status; - } - - /** - * Gets Power. - * - * @return the Power - */ - public Integer getPower() { - return power; - } - - /** - * Sets Power. - * - * @param power the Power - */ - public void setPower(final Integer power) { - this.power = power; - } - - /** - * Gets Path Loss Exponent. - * - * @return the Path Loss Exponent - */ - public Integer getPathLossExponent() { - return pathLossExponent; - } - - /** - * Sets Path Loss Exponent. - * - * @param pathLossExponent the Path Loss Exponent - */ - public void setPathLossExponent(final Integer pathLossExponent) { - this.pathLossExponent = pathLossExponent; - } - - /** - * Gets Calculation Period. - * - * @return the Calculation Period - */ - public Integer getCalculationPeriod() { - return calculationPeriod; - } - - /** - * Sets Calculation Period. - * - * @param calculationPeriod the Calculation Period - */ - public void setCalculationPeriod(final Integer calculationPeriod) { - this.calculationPeriod = calculationPeriod; - } - - /** - * Gets Number RSSI Measurements. - * - * @return the Number RSSI Measurements - */ - public Integer getNumberRssiMeasurements() { - return numberRssiMeasurements; - } - - /** - * Sets Number RSSI Measurements. - * - * @param numberRssiMeasurements the Number RSSI Measurements - */ - public void setNumberRssiMeasurements(final Integer numberRssiMeasurements) { - this.numberRssiMeasurements = numberRssiMeasurements; - } - - /** - * Gets Reporting Period. - * - * @return the Reporting Period - */ - public Integer getReportingPeriod() { - return reportingPeriod; - } - - /** - * Sets Reporting Period. - * - * @param reportingPeriod the Reporting Period - */ - public void setReportingPeriod(final Integer reportingPeriod) { - this.reportingPeriod = reportingPeriod; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(status, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(power, ZclDataType.SIGNED_16_BIT_INTEGER); - serializer.serialize(pathLossExponent, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(calculationPeriod, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(numberRssiMeasurements, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(reportingPeriod, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - status = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - power = (Integer) deserializer.deserialize(ZclDataType.SIGNED_16_BIT_INTEGER); - pathLossExponent = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - calculationPeriod = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - numberRssiMeasurements = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - reportingPeriod = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(231); - builder.append("DeviceConfigurationResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(", power="); - builder.append(power); - builder.append(", pathLossExponent="); - builder.append(pathLossExponent); - builder.append(", calculationPeriod="); - builder.append(calculationPeriod); - builder.append(", numberRssiMeasurements="); - builder.append(numberRssiMeasurements); - builder.append(", reportingPeriod="); - builder.append(reportingPeriod); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/GetDeviceConfigurationCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/GetDeviceConfigurationCommand.java deleted file mode 100644 index 660664909..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/GetDeviceConfigurationCommand.java +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.rssilocation; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; -import com.zsmartsystems.zigbee.IeeeAddress; - -/** - * Get Device Configuration Command value object class. - *

    - * Cluster: RSSI Location. Command is sent TO the server. - * This command is a specific command used for the RSSI Location cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class GetDeviceConfigurationCommand extends ZclCommand { - /** - * Target Address command message field. - */ - private IeeeAddress targetAddress; - - /** - * Default constructor. - */ - public GetDeviceConfigurationCommand() { - genericCommand = false; - clusterId = 11; - commandId = 2; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Target Address. - * - * @return the Target Address - */ - public IeeeAddress getTargetAddress() { - return targetAddress; - } - - /** - * Sets Target Address. - * - * @param targetAddress the Target Address - */ - public void setTargetAddress(final IeeeAddress targetAddress) { - this.targetAddress = targetAddress; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(targetAddress, ZclDataType.IEEE_ADDRESS); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - targetAddress = (IeeeAddress) deserializer.deserialize(ZclDataType.IEEE_ADDRESS); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(65); - builder.append("GetDeviceConfigurationCommand ["); - builder.append(super.toString()); - builder.append(", targetAddress="); - builder.append(targetAddress); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/GetLocationDataCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/GetLocationDataCommand.java deleted file mode 100644 index eb767b45a..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/GetLocationDataCommand.java +++ /dev/null @@ -1,137 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.rssilocation; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; -import com.zsmartsystems.zigbee.IeeeAddress; - -/** - * Get Location Data Command value object class. - *

    - * Cluster: RSSI Location. Command is sent TO the server. - * This command is a specific command used for the RSSI Location cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class GetLocationDataCommand extends ZclCommand { - /** - * Header command message field. - */ - private Integer header; - - /** - * Number Responses command message field. - */ - private Integer numberResponses; - - /** - * Target Address command message field. - */ - private IeeeAddress targetAddress; - - /** - * Default constructor. - */ - public GetLocationDataCommand() { - genericCommand = false; - clusterId = 11; - commandId = 3; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Header. - * - * @return the Header - */ - public Integer getHeader() { - return header; - } - - /** - * Sets Header. - * - * @param header the Header - */ - public void setHeader(final Integer header) { - this.header = header; - } - - /** - * Gets Number Responses. - * - * @return the Number Responses - */ - public Integer getNumberResponses() { - return numberResponses; - } - - /** - * Sets Number Responses. - * - * @param numberResponses the Number Responses - */ - public void setNumberResponses(final Integer numberResponses) { - this.numberResponses = numberResponses; - } - - /** - * Gets Target Address. - * - * @return the Target Address - */ - public IeeeAddress getTargetAddress() { - return targetAddress; - } - - /** - * Sets Target Address. - * - * @param targetAddress the Target Address - */ - public void setTargetAddress(final IeeeAddress targetAddress) { - this.targetAddress = targetAddress; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(header, ZclDataType.BITMAP_8_BIT); - serializer.serialize(numberResponses, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(targetAddress, ZclDataType.IEEE_ADDRESS); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - header = (Integer) deserializer.deserialize(ZclDataType.BITMAP_8_BIT); - numberResponses = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - targetAddress = (IeeeAddress) deserializer.deserialize(ZclDataType.IEEE_ADDRESS); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(119); - builder.append("GetLocationDataCommand ["); - builder.append(super.toString()); - builder.append(", header="); - builder.append(header); - builder.append(", numberResponses="); - builder.append(numberResponses); - builder.append(", targetAddress="); - builder.append(targetAddress); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/LocationDataNotificationCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/LocationDataNotificationCommand.java deleted file mode 100644 index a3fde39f8..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/LocationDataNotificationCommand.java +++ /dev/null @@ -1,298 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.rssilocation; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Location Data Notification Command value object class. - *

    - * Cluster: RSSI Location. Command is sent FROM the server. - * This command is a specific command used for the RSSI Location cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class LocationDataNotificationCommand extends ZclCommand { - /** - * Location Type command message field. - */ - private Integer locationType; - - /** - * Coordinate 1 command message field. - */ - private Integer coordinate1; - - /** - * Coordinate 2 command message field. - */ - private Integer coordinate2; - - /** - * Coordinate 3 command message field. - */ - private Integer coordinate3; - - /** - * Power command message field. - */ - private Integer power; - - /** - * Path Loss Exponent command message field. - */ - private Integer pathLossExponent; - - /** - * Location Method command message field. - */ - private Integer locationMethod; - - /** - * Quality Measure command message field. - */ - private Integer qualityMeasure; - - /** - * Location Age command message field. - */ - private Integer locationAge; - - /** - * Default constructor. - */ - public LocationDataNotificationCommand() { - genericCommand = false; - clusterId = 11; - commandId = 2; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Location Type. - * - * @return the Location Type - */ - public Integer getLocationType() { - return locationType; - } - - /** - * Sets Location Type. - * - * @param locationType the Location Type - */ - public void setLocationType(final Integer locationType) { - this.locationType = locationType; - } - - /** - * Gets Coordinate 1. - * - * @return the Coordinate 1 - */ - public Integer getCoordinate1() { - return coordinate1; - } - - /** - * Sets Coordinate 1. - * - * @param coordinate1 the Coordinate 1 - */ - public void setCoordinate1(final Integer coordinate1) { - this.coordinate1 = coordinate1; - } - - /** - * Gets Coordinate 2. - * - * @return the Coordinate 2 - */ - public Integer getCoordinate2() { - return coordinate2; - } - - /** - * Sets Coordinate 2. - * - * @param coordinate2 the Coordinate 2 - */ - public void setCoordinate2(final Integer coordinate2) { - this.coordinate2 = coordinate2; - } - - /** - * Gets Coordinate 3. - * - * @return the Coordinate 3 - */ - public Integer getCoordinate3() { - return coordinate3; - } - - /** - * Sets Coordinate 3. - * - * @param coordinate3 the Coordinate 3 - */ - public void setCoordinate3(final Integer coordinate3) { - this.coordinate3 = coordinate3; - } - - /** - * Gets Power. - * - * @return the Power - */ - public Integer getPower() { - return power; - } - - /** - * Sets Power. - * - * @param power the Power - */ - public void setPower(final Integer power) { - this.power = power; - } - - /** - * Gets Path Loss Exponent. - * - * @return the Path Loss Exponent - */ - public Integer getPathLossExponent() { - return pathLossExponent; - } - - /** - * Sets Path Loss Exponent. - * - * @param pathLossExponent the Path Loss Exponent - */ - public void setPathLossExponent(final Integer pathLossExponent) { - this.pathLossExponent = pathLossExponent; - } - - /** - * Gets Location Method. - * - * @return the Location Method - */ - public Integer getLocationMethod() { - return locationMethod; - } - - /** - * Sets Location Method. - * - * @param locationMethod the Location Method - */ - public void setLocationMethod(final Integer locationMethod) { - this.locationMethod = locationMethod; - } - - /** - * Gets Quality Measure. - * - * @return the Quality Measure - */ - public Integer getQualityMeasure() { - return qualityMeasure; - } - - /** - * Sets Quality Measure. - * - * @param qualityMeasure the Quality Measure - */ - public void setQualityMeasure(final Integer qualityMeasure) { - this.qualityMeasure = qualityMeasure; - } - - /** - * Gets Location Age. - * - * @return the Location Age - */ - public Integer getLocationAge() { - return locationAge; - } - - /** - * Sets Location Age. - * - * @param locationAge the Location Age - */ - public void setLocationAge(final Integer locationAge) { - this.locationAge = locationAge; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(locationType, ZclDataType.DATA_8_BIT); - serializer.serialize(coordinate1, ZclDataType.SIGNED_16_BIT_INTEGER); - serializer.serialize(coordinate2, ZclDataType.SIGNED_16_BIT_INTEGER); - serializer.serialize(coordinate3, ZclDataType.SIGNED_16_BIT_INTEGER); - serializer.serialize(power, ZclDataType.SIGNED_16_BIT_INTEGER); - serializer.serialize(pathLossExponent, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(locationMethod, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(qualityMeasure, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(locationAge, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - locationType = (Integer) deserializer.deserialize(ZclDataType.DATA_8_BIT); - coordinate1 = (Integer) deserializer.deserialize(ZclDataType.SIGNED_16_BIT_INTEGER); - coordinate2 = (Integer) deserializer.deserialize(ZclDataType.SIGNED_16_BIT_INTEGER); - coordinate3 = (Integer) deserializer.deserialize(ZclDataType.SIGNED_16_BIT_INTEGER); - power = (Integer) deserializer.deserialize(ZclDataType.SIGNED_16_BIT_INTEGER); - pathLossExponent = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - locationMethod = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - qualityMeasure = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - locationAge = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(319); - builder.append("LocationDataNotificationCommand ["); - builder.append(super.toString()); - builder.append(", locationType="); - builder.append(locationType); - builder.append(", coordinate1="); - builder.append(coordinate1); - builder.append(", coordinate2="); - builder.append(coordinate2); - builder.append(", coordinate3="); - builder.append(coordinate3); - builder.append(", power="); - builder.append(power); - builder.append(", pathLossExponent="); - builder.append(pathLossExponent); - builder.append(", locationMethod="); - builder.append(locationMethod); - builder.append(", qualityMeasure="); - builder.append(qualityMeasure); - builder.append(", locationAge="); - builder.append(locationAge); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/LocationDataResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/LocationDataResponse.java deleted file mode 100644 index 62e47a1fe..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/LocationDataResponse.java +++ /dev/null @@ -1,325 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.rssilocation; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Location Data Response value object class. - *

    - * Cluster: RSSI Location. Command is sent FROM the server. - * This command is a specific command used for the RSSI Location cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class LocationDataResponse extends ZclCommand { - /** - * Status command message field. - */ - private Integer status; - - /** - * Location Type command message field. - */ - private Integer locationType; - - /** - * Coordinate 1 command message field. - */ - private Integer coordinate1; - - /** - * Coordinate 2 command message field. - */ - private Integer coordinate2; - - /** - * Coordinate 3 command message field. - */ - private Integer coordinate3; - - /** - * Power command message field. - */ - private Integer power; - - /** - * Path Loss Exponent command message field. - */ - private Integer pathLossExponent; - - /** - * Location Method command message field. - */ - private Integer locationMethod; - - /** - * Quality Measure command message field. - */ - private Integer qualityMeasure; - - /** - * Location Age command message field. - */ - private Integer locationAge; - - /** - * Default constructor. - */ - public LocationDataResponse() { - genericCommand = false; - clusterId = 11; - commandId = 1; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Status. - * - * @return the Status - */ - public Integer getStatus() { - return status; - } - - /** - * Sets Status. - * - * @param status the Status - */ - public void setStatus(final Integer status) { - this.status = status; - } - - /** - * Gets Location Type. - * - * @return the Location Type - */ - public Integer getLocationType() { - return locationType; - } - - /** - * Sets Location Type. - * - * @param locationType the Location Type - */ - public void setLocationType(final Integer locationType) { - this.locationType = locationType; - } - - /** - * Gets Coordinate 1. - * - * @return the Coordinate 1 - */ - public Integer getCoordinate1() { - return coordinate1; - } - - /** - * Sets Coordinate 1. - * - * @param coordinate1 the Coordinate 1 - */ - public void setCoordinate1(final Integer coordinate1) { - this.coordinate1 = coordinate1; - } - - /** - * Gets Coordinate 2. - * - * @return the Coordinate 2 - */ - public Integer getCoordinate2() { - return coordinate2; - } - - /** - * Sets Coordinate 2. - * - * @param coordinate2 the Coordinate 2 - */ - public void setCoordinate2(final Integer coordinate2) { - this.coordinate2 = coordinate2; - } - - /** - * Gets Coordinate 3. - * - * @return the Coordinate 3 - */ - public Integer getCoordinate3() { - return coordinate3; - } - - /** - * Sets Coordinate 3. - * - * @param coordinate3 the Coordinate 3 - */ - public void setCoordinate3(final Integer coordinate3) { - this.coordinate3 = coordinate3; - } - - /** - * Gets Power. - * - * @return the Power - */ - public Integer getPower() { - return power; - } - - /** - * Sets Power. - * - * @param power the Power - */ - public void setPower(final Integer power) { - this.power = power; - } - - /** - * Gets Path Loss Exponent. - * - * @return the Path Loss Exponent - */ - public Integer getPathLossExponent() { - return pathLossExponent; - } - - /** - * Sets Path Loss Exponent. - * - * @param pathLossExponent the Path Loss Exponent - */ - public void setPathLossExponent(final Integer pathLossExponent) { - this.pathLossExponent = pathLossExponent; - } - - /** - * Gets Location Method. - * - * @return the Location Method - */ - public Integer getLocationMethod() { - return locationMethod; - } - - /** - * Sets Location Method. - * - * @param locationMethod the Location Method - */ - public void setLocationMethod(final Integer locationMethod) { - this.locationMethod = locationMethod; - } - - /** - * Gets Quality Measure. - * - * @return the Quality Measure - */ - public Integer getQualityMeasure() { - return qualityMeasure; - } - - /** - * Sets Quality Measure. - * - * @param qualityMeasure the Quality Measure - */ - public void setQualityMeasure(final Integer qualityMeasure) { - this.qualityMeasure = qualityMeasure; - } - - /** - * Gets Location Age. - * - * @return the Location Age - */ - public Integer getLocationAge() { - return locationAge; - } - - /** - * Sets Location Age. - * - * @param locationAge the Location Age - */ - public void setLocationAge(final Integer locationAge) { - this.locationAge = locationAge; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(status, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(locationType, ZclDataType.DATA_8_BIT); - serializer.serialize(coordinate1, ZclDataType.SIGNED_16_BIT_INTEGER); - serializer.serialize(coordinate2, ZclDataType.SIGNED_16_BIT_INTEGER); - serializer.serialize(coordinate3, ZclDataType.SIGNED_16_BIT_INTEGER); - serializer.serialize(power, ZclDataType.SIGNED_16_BIT_INTEGER); - serializer.serialize(pathLossExponent, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(locationMethod, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(qualityMeasure, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(locationAge, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - status = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - locationType = (Integer) deserializer.deserialize(ZclDataType.DATA_8_BIT); - coordinate1 = (Integer) deserializer.deserialize(ZclDataType.SIGNED_16_BIT_INTEGER); - coordinate2 = (Integer) deserializer.deserialize(ZclDataType.SIGNED_16_BIT_INTEGER); - coordinate3 = (Integer) deserializer.deserialize(ZclDataType.SIGNED_16_BIT_INTEGER); - power = (Integer) deserializer.deserialize(ZclDataType.SIGNED_16_BIT_INTEGER); - pathLossExponent = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - locationMethod = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - qualityMeasure = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - locationAge = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(334); - builder.append("LocationDataResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(", locationType="); - builder.append(locationType); - builder.append(", coordinate1="); - builder.append(coordinate1); - builder.append(", coordinate2="); - builder.append(coordinate2); - builder.append(", coordinate3="); - builder.append(coordinate3); - builder.append(", power="); - builder.append(power); - builder.append(", pathLossExponent="); - builder.append(pathLossExponent); - builder.append(", locationMethod="); - builder.append(locationMethod); - builder.append(", qualityMeasure="); - builder.append(qualityMeasure); - builder.append(", locationAge="); - builder.append(locationAge); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/ReportRssiMeasurementsCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/ReportRssiMeasurementsCommand.java deleted file mode 100644 index 7aba762dd..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/ReportRssiMeasurementsCommand.java +++ /dev/null @@ -1,140 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.rssilocation; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -import java.util.List; -import com.zsmartsystems.zigbee.IeeeAddress; -import com.zsmartsystems.zigbee.zcl.field.NeighborInformation; - -/** - * Report RSSI Measurements Command value object class. - *

    - * Cluster: RSSI Location. Command is sent FROM the server. - * This command is a specific command used for the RSSI Location cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class ReportRssiMeasurementsCommand extends ZclCommand { - /** - * Reporting Address command message field. - */ - private IeeeAddress reportingAddress; - - /** - * Number of Neighbors command message field. - */ - private Integer numberOfNeighbors; - - /** - * Neighbors Information command message field. - */ - private List neighborsInformation; - - /** - * Default constructor. - */ - public ReportRssiMeasurementsCommand() { - genericCommand = false; - clusterId = 11; - commandId = 6; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Reporting Address. - * - * @return the Reporting Address - */ - public IeeeAddress getReportingAddress() { - return reportingAddress; - } - - /** - * Sets Reporting Address. - * - * @param reportingAddress the Reporting Address - */ - public void setReportingAddress(final IeeeAddress reportingAddress) { - this.reportingAddress = reportingAddress; - } - - /** - * Gets Number of Neighbors. - * - * @return the Number of Neighbors - */ - public Integer getNumberOfNeighbors() { - return numberOfNeighbors; - } - - /** - * Sets Number of Neighbors. - * - * @param numberOfNeighbors the Number of Neighbors - */ - public void setNumberOfNeighbors(final Integer numberOfNeighbors) { - this.numberOfNeighbors = numberOfNeighbors; - } - - /** - * Gets Neighbors Information. - * - * @return the Neighbors Information - */ - public List getNeighborsInformation() { - return neighborsInformation; - } - - /** - * Sets Neighbors Information. - * - * @param neighborsInformation the Neighbors Information - */ - public void setNeighborsInformation(final List neighborsInformation) { - this.neighborsInformation = neighborsInformation; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(reportingAddress, ZclDataType.IEEE_ADDRESS); - serializer.serialize(numberOfNeighbors, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(neighborsInformation, ZclDataType.N_X_NEIGHBORS_INFORMATION); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - reportingAddress = (IeeeAddress) deserializer.deserialize(ZclDataType.IEEE_ADDRESS); - numberOfNeighbors = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - neighborsInformation = (List) deserializer.deserialize(ZclDataType.N_X_NEIGHBORS_INFORMATION); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(145); - builder.append("ReportRssiMeasurementsCommand ["); - builder.append(super.toString()); - builder.append(", reportingAddress="); - builder.append(reportingAddress); - builder.append(", numberOfNeighbors="); - builder.append(numberOfNeighbors); - builder.append(", neighborsInformation="); - builder.append(neighborsInformation); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/RequestOwnLocationCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/RequestOwnLocationCommand.java deleted file mode 100644 index f623b764f..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/RequestOwnLocationCommand.java +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.rssilocation; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; -import com.zsmartsystems.zigbee.IeeeAddress; - -/** - * Request Own Location Command value object class. - *

    - * Cluster: RSSI Location. Command is sent FROM the server. - * This command is a specific command used for the RSSI Location cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class RequestOwnLocationCommand extends ZclCommand { - /** - * Requesting Address command message field. - */ - private IeeeAddress requestingAddress; - - /** - * Default constructor. - */ - public RequestOwnLocationCommand() { - genericCommand = false; - clusterId = 11; - commandId = 7; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Requesting Address. - * - * @return the Requesting Address - */ - public IeeeAddress getRequestingAddress() { - return requestingAddress; - } - - /** - * Sets Requesting Address. - * - * @param requestingAddress the Requesting Address - */ - public void setRequestingAddress(final IeeeAddress requestingAddress) { - this.requestingAddress = requestingAddress; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(requestingAddress, ZclDataType.IEEE_ADDRESS); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - requestingAddress = (IeeeAddress) deserializer.deserialize(ZclDataType.IEEE_ADDRESS); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(65); - builder.append("RequestOwnLocationCommand ["); - builder.append(super.toString()); - builder.append(", requestingAddress="); - builder.append(requestingAddress); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/RssiPingCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/RssiPingCommand.java deleted file mode 100644 index 411960fc3..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/RssiPingCommand.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.rssilocation; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * RSSI Ping Command value object class. - *

    - * Cluster: RSSI Location. Command is sent FROM the server. - * This command is a specific command used for the RSSI Location cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class RssiPingCommand extends ZclCommand { - /** - * Location Type command message field. - */ - private Integer locationType; - - /** - * Default constructor. - */ - public RssiPingCommand() { - genericCommand = false; - clusterId = 11; - commandId = 4; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Location Type. - * - * @return the Location Type - */ - public Integer getLocationType() { - return locationType; - } - - /** - * Sets Location Type. - * - * @param locationType the Location Type - */ - public void setLocationType(final Integer locationType) { - this.locationType = locationType; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(locationType, ZclDataType.DATA_8_BIT); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - locationType = (Integer) deserializer.deserialize(ZclDataType.DATA_8_BIT); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(50); - builder.append("RssiPingCommand ["); - builder.append(super.toString()); - builder.append(", locationType="); - builder.append(locationType); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/RssiRequestCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/RssiRequestCommand.java deleted file mode 100644 index 3a86e0b71..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/RssiRequestCommand.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.rssilocation; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * RSSI Request Command value object class. - *

    - * Cluster: RSSI Location. Command is sent FROM the server. - * This command is a specific command used for the RSSI Location cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class RssiRequestCommand extends ZclCommand { - /** - * Default constructor. - */ - public RssiRequestCommand() { - genericCommand = false; - clusterId = 11; - commandId = 5; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(21); - builder.append("RssiRequestCommand ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/RssiResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/RssiResponse.java deleted file mode 100644 index 7ee0e7c5e..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/RssiResponse.java +++ /dev/null @@ -1,218 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.rssilocation; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; -import com.zsmartsystems.zigbee.IeeeAddress; - -/** - * RSSI Response value object class. - *

    - * Cluster: RSSI Location. Command is sent TO the server. - * This command is a specific command used for the RSSI Location cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class RssiResponse extends ZclCommand { - /** - * Replying Device command message field. - */ - private IeeeAddress replyingDevice; - - /** - * Coordinate 1 command message field. - */ - private Integer coordinate1; - - /** - * Coordinate 2 command message field. - */ - private Integer coordinate2; - - /** - * Coordinate 3 command message field. - */ - private Integer coordinate3; - - /** - * RSSI command message field. - */ - private Integer rssi; - - /** - * Number RSSI Measurements command message field. - */ - private Integer numberRssiMeasurements; - - /** - * Default constructor. - */ - public RssiResponse() { - genericCommand = false; - clusterId = 11; - commandId = 4; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Replying Device. - * - * @return the Replying Device - */ - public IeeeAddress getReplyingDevice() { - return replyingDevice; - } - - /** - * Sets Replying Device. - * - * @param replyingDevice the Replying Device - */ - public void setReplyingDevice(final IeeeAddress replyingDevice) { - this.replyingDevice = replyingDevice; - } - - /** - * Gets Coordinate 1. - * - * @return the Coordinate 1 - */ - public Integer getCoordinate1() { - return coordinate1; - } - - /** - * Sets Coordinate 1. - * - * @param coordinate1 the Coordinate 1 - */ - public void setCoordinate1(final Integer coordinate1) { - this.coordinate1 = coordinate1; - } - - /** - * Gets Coordinate 2. - * - * @return the Coordinate 2 - */ - public Integer getCoordinate2() { - return coordinate2; - } - - /** - * Sets Coordinate 2. - * - * @param coordinate2 the Coordinate 2 - */ - public void setCoordinate2(final Integer coordinate2) { - this.coordinate2 = coordinate2; - } - - /** - * Gets Coordinate 3. - * - * @return the Coordinate 3 - */ - public Integer getCoordinate3() { - return coordinate3; - } - - /** - * Sets Coordinate 3. - * - * @param coordinate3 the Coordinate 3 - */ - public void setCoordinate3(final Integer coordinate3) { - this.coordinate3 = coordinate3; - } - - /** - * Gets RSSI. - * - * @return the RSSI - */ - public Integer getRssi() { - return rssi; - } - - /** - * Sets RSSI. - * - * @param rssi the RSSI - */ - public void setRssi(final Integer rssi) { - this.rssi = rssi; - } - - /** - * Gets Number RSSI Measurements. - * - * @return the Number RSSI Measurements - */ - public Integer getNumberRssiMeasurements() { - return numberRssiMeasurements; - } - - /** - * Sets Number RSSI Measurements. - * - * @param numberRssiMeasurements the Number RSSI Measurements - */ - public void setNumberRssiMeasurements(final Integer numberRssiMeasurements) { - this.numberRssiMeasurements = numberRssiMeasurements; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(replyingDevice, ZclDataType.IEEE_ADDRESS); - serializer.serialize(coordinate1, ZclDataType.SIGNED_16_BIT_INTEGER); - serializer.serialize(coordinate2, ZclDataType.SIGNED_16_BIT_INTEGER); - serializer.serialize(coordinate3, ZclDataType.SIGNED_16_BIT_INTEGER); - serializer.serialize(rssi, ZclDataType.SIGNED_8_BIT_INTEGER); - serializer.serialize(numberRssiMeasurements, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - replyingDevice = (IeeeAddress) deserializer.deserialize(ZclDataType.IEEE_ADDRESS); - coordinate1 = (Integer) deserializer.deserialize(ZclDataType.SIGNED_16_BIT_INTEGER); - coordinate2 = (Integer) deserializer.deserialize(ZclDataType.SIGNED_16_BIT_INTEGER); - coordinate3 = (Integer) deserializer.deserialize(ZclDataType.SIGNED_16_BIT_INTEGER); - rssi = (Integer) deserializer.deserialize(ZclDataType.SIGNED_8_BIT_INTEGER); - numberRssiMeasurements = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(208); - builder.append("RssiResponse ["); - builder.append(super.toString()); - builder.append(", replyingDevice="); - builder.append(replyingDevice); - builder.append(", coordinate1="); - builder.append(coordinate1); - builder.append(", coordinate2="); - builder.append(coordinate2); - builder.append(", coordinate3="); - builder.append(coordinate3); - builder.append(", rssi="); - builder.append(rssi); - builder.append(", numberRssiMeasurements="); - builder.append(numberRssiMeasurements); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/SendPingsCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/SendPingsCommand.java deleted file mode 100644 index 8ab5bec29..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/SendPingsCommand.java +++ /dev/null @@ -1,137 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.rssilocation; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; -import com.zsmartsystems.zigbee.IeeeAddress; - -/** - * Send Pings Command value object class. - *

    - * Cluster: RSSI Location. Command is sent TO the server. - * This command is a specific command used for the RSSI Location cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class SendPingsCommand extends ZclCommand { - /** - * Target Address command message field. - */ - private IeeeAddress targetAddress; - - /** - * Number RSSI Measurements command message field. - */ - private Integer numberRssiMeasurements; - - /** - * Calculation Period command message field. - */ - private Integer calculationPeriod; - - /** - * Default constructor. - */ - public SendPingsCommand() { - genericCommand = false; - clusterId = 11; - commandId = 5; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Target Address. - * - * @return the Target Address - */ - public IeeeAddress getTargetAddress() { - return targetAddress; - } - - /** - * Sets Target Address. - * - * @param targetAddress the Target Address - */ - public void setTargetAddress(final IeeeAddress targetAddress) { - this.targetAddress = targetAddress; - } - - /** - * Gets Number RSSI Measurements. - * - * @return the Number RSSI Measurements - */ - public Integer getNumberRssiMeasurements() { - return numberRssiMeasurements; - } - - /** - * Sets Number RSSI Measurements. - * - * @param numberRssiMeasurements the Number RSSI Measurements - */ - public void setNumberRssiMeasurements(final Integer numberRssiMeasurements) { - this.numberRssiMeasurements = numberRssiMeasurements; - } - - /** - * Gets Calculation Period. - * - * @return the Calculation Period - */ - public Integer getCalculationPeriod() { - return calculationPeriod; - } - - /** - * Sets Calculation Period. - * - * @param calculationPeriod the Calculation Period - */ - public void setCalculationPeriod(final Integer calculationPeriod) { - this.calculationPeriod = calculationPeriod; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(targetAddress, ZclDataType.IEEE_ADDRESS); - serializer.serialize(numberRssiMeasurements, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(calculationPeriod, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - targetAddress = (IeeeAddress) deserializer.deserialize(ZclDataType.IEEE_ADDRESS); - numberRssiMeasurements = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - calculationPeriod = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(131); - builder.append("SendPingsCommand ["); - builder.append(super.toString()); - builder.append(", targetAddress="); - builder.append(targetAddress); - builder.append(", numberRssiMeasurements="); - builder.append(numberRssiMeasurements); - builder.append(", calculationPeriod="); - builder.append(calculationPeriod); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/SetAbsoluteLocationCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/SetAbsoluteLocationCommand.java deleted file mode 100644 index f3894bbd3..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/SetAbsoluteLocationCommand.java +++ /dev/null @@ -1,190 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.rssilocation; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Set Absolute Location Command value object class. - *

    - * Cluster: RSSI Location. Command is sent TO the server. - * This command is a specific command used for the RSSI Location cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class SetAbsoluteLocationCommand extends ZclCommand { - /** - * Coordinate 1 command message field. - */ - private Integer coordinate1; - - /** - * Coordinate 2 command message field. - */ - private Integer coordinate2; - - /** - * Coordinate 3 command message field. - */ - private Integer coordinate3; - - /** - * Power command message field. - */ - private Integer power; - - /** - * Path Loss Exponent command message field. - */ - private Integer pathLossExponent; - - /** - * Default constructor. - */ - public SetAbsoluteLocationCommand() { - genericCommand = false; - clusterId = 11; - commandId = 0; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Coordinate 1. - * - * @return the Coordinate 1 - */ - public Integer getCoordinate1() { - return coordinate1; - } - - /** - * Sets Coordinate 1. - * - * @param coordinate1 the Coordinate 1 - */ - public void setCoordinate1(final Integer coordinate1) { - this.coordinate1 = coordinate1; - } - - /** - * Gets Coordinate 2. - * - * @return the Coordinate 2 - */ - public Integer getCoordinate2() { - return coordinate2; - } - - /** - * Sets Coordinate 2. - * - * @param coordinate2 the Coordinate 2 - */ - public void setCoordinate2(final Integer coordinate2) { - this.coordinate2 = coordinate2; - } - - /** - * Gets Coordinate 3. - * - * @return the Coordinate 3 - */ - public Integer getCoordinate3() { - return coordinate3; - } - - /** - * Sets Coordinate 3. - * - * @param coordinate3 the Coordinate 3 - */ - public void setCoordinate3(final Integer coordinate3) { - this.coordinate3 = coordinate3; - } - - /** - * Gets Power. - * - * @return the Power - */ - public Integer getPower() { - return power; - } - - /** - * Sets Power. - * - * @param power the Power - */ - public void setPower(final Integer power) { - this.power = power; - } - - /** - * Gets Path Loss Exponent. - * - * @return the Path Loss Exponent - */ - public Integer getPathLossExponent() { - return pathLossExponent; - } - - /** - * Sets Path Loss Exponent. - * - * @param pathLossExponent the Path Loss Exponent - */ - public void setPathLossExponent(final Integer pathLossExponent) { - this.pathLossExponent = pathLossExponent; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(coordinate1, ZclDataType.SIGNED_16_BIT_INTEGER); - serializer.serialize(coordinate2, ZclDataType.SIGNED_16_BIT_INTEGER); - serializer.serialize(coordinate3, ZclDataType.SIGNED_16_BIT_INTEGER); - serializer.serialize(power, ZclDataType.SIGNED_16_BIT_INTEGER); - serializer.serialize(pathLossExponent, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - coordinate1 = (Integer) deserializer.deserialize(ZclDataType.SIGNED_16_BIT_INTEGER); - coordinate2 = (Integer) deserializer.deserialize(ZclDataType.SIGNED_16_BIT_INTEGER); - coordinate3 = (Integer) deserializer.deserialize(ZclDataType.SIGNED_16_BIT_INTEGER); - power = (Integer) deserializer.deserialize(ZclDataType.SIGNED_16_BIT_INTEGER); - pathLossExponent = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(183); - builder.append("SetAbsoluteLocationCommand ["); - builder.append(super.toString()); - builder.append(", coordinate1="); - builder.append(coordinate1); - builder.append(", coordinate2="); - builder.append(coordinate2); - builder.append(", coordinate3="); - builder.append(coordinate3); - builder.append(", power="); - builder.append(power); - builder.append(", pathLossExponent="); - builder.append(pathLossExponent); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/SetDeviceConfigurationCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/SetDeviceConfigurationCommand.java deleted file mode 100644 index beca975b7..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/rssilocation/SetDeviceConfigurationCommand.java +++ /dev/null @@ -1,190 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.rssilocation; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Set Device Configuration Command value object class. - *

    - * Cluster: RSSI Location. Command is sent TO the server. - * This command is a specific command used for the RSSI Location cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class SetDeviceConfigurationCommand extends ZclCommand { - /** - * Power command message field. - */ - private Integer power; - - /** - * Path Loss Exponent command message field. - */ - private Integer pathLossExponent; - - /** - * Calculation Period command message field. - */ - private Integer calculationPeriod; - - /** - * Number RSSI Measurements command message field. - */ - private Integer numberRssiMeasurements; - - /** - * Reporting Period command message field. - */ - private Integer reportingPeriod; - - /** - * Default constructor. - */ - public SetDeviceConfigurationCommand() { - genericCommand = false; - clusterId = 11; - commandId = 1; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Power. - * - * @return the Power - */ - public Integer getPower() { - return power; - } - - /** - * Sets Power. - * - * @param power the Power - */ - public void setPower(final Integer power) { - this.power = power; - } - - /** - * Gets Path Loss Exponent. - * - * @return the Path Loss Exponent - */ - public Integer getPathLossExponent() { - return pathLossExponent; - } - - /** - * Sets Path Loss Exponent. - * - * @param pathLossExponent the Path Loss Exponent - */ - public void setPathLossExponent(final Integer pathLossExponent) { - this.pathLossExponent = pathLossExponent; - } - - /** - * Gets Calculation Period. - * - * @return the Calculation Period - */ - public Integer getCalculationPeriod() { - return calculationPeriod; - } - - /** - * Sets Calculation Period. - * - * @param calculationPeriod the Calculation Period - */ - public void setCalculationPeriod(final Integer calculationPeriod) { - this.calculationPeriod = calculationPeriod; - } - - /** - * Gets Number RSSI Measurements. - * - * @return the Number RSSI Measurements - */ - public Integer getNumberRssiMeasurements() { - return numberRssiMeasurements; - } - - /** - * Sets Number RSSI Measurements. - * - * @param numberRssiMeasurements the Number RSSI Measurements - */ - public void setNumberRssiMeasurements(final Integer numberRssiMeasurements) { - this.numberRssiMeasurements = numberRssiMeasurements; - } - - /** - * Gets Reporting Period. - * - * @return the Reporting Period - */ - public Integer getReportingPeriod() { - return reportingPeriod; - } - - /** - * Sets Reporting Period. - * - * @param reportingPeriod the Reporting Period - */ - public void setReportingPeriod(final Integer reportingPeriod) { - this.reportingPeriod = reportingPeriod; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(power, ZclDataType.SIGNED_16_BIT_INTEGER); - serializer.serialize(pathLossExponent, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(calculationPeriod, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(numberRssiMeasurements, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(reportingPeriod, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - power = (Integer) deserializer.deserialize(ZclDataType.SIGNED_16_BIT_INTEGER); - pathLossExponent = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - calculationPeriod = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - numberRssiMeasurements = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - reportingPeriod = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(207); - builder.append("SetDeviceConfigurationCommand ["); - builder.append(super.toString()); - builder.append(", power="); - builder.append(power); - builder.append(", pathLossExponent="); - builder.append(pathLossExponent); - builder.append(", calculationPeriod="); - builder.append(calculationPeriod); - builder.append(", numberRssiMeasurements="); - builder.append(numberRssiMeasurements); - builder.append(", reportingPeriod="); - builder.append(reportingPeriod); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/AddSceneCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/AddSceneCommand.java deleted file mode 100644 index 5537e2166..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/AddSceneCommand.java +++ /dev/null @@ -1,195 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.scenes; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -import java.util.List; -import com.zsmartsystems.zigbee.zcl.field.ExtensionFieldSet; - -/** - * Add Scene Command value object class. - *

    - * Cluster: Scenes. Command is sent TO the server. - * This command is a specific command used for the Scenes cluster. - *

    - * The Add Scene command shall be addressed to a single device (not a group). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class AddSceneCommand extends ZclCommand { - /** - * Group ID command message field. - */ - private Integer groupId; - - /** - * Scene ID command message field. - */ - private Integer sceneId; - - /** - * Transition time command message field. - */ - private Integer transitionTime; - - /** - * Scene Name command message field. - */ - private String sceneName; - - /** - * Extension field sets command message field. - */ - private List extensionFieldSets; - - /** - * Default constructor. - */ - public AddSceneCommand() { - genericCommand = false; - clusterId = 5; - commandId = 0; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Group ID. - * - * @return the Group ID - */ - public Integer getGroupId() { - return groupId; - } - - /** - * Sets Group ID. - * - * @param groupId the Group ID - */ - public void setGroupId(final Integer groupId) { - this.groupId = groupId; - } - - /** - * Gets Scene ID. - * - * @return the Scene ID - */ - public Integer getSceneId() { - return sceneId; - } - - /** - * Sets Scene ID. - * - * @param sceneId the Scene ID - */ - public void setSceneId(final Integer sceneId) { - this.sceneId = sceneId; - } - - /** - * Gets Transition time. - * - * @return the Transition time - */ - public Integer getTransitionTime() { - return transitionTime; - } - - /** - * Sets Transition time. - * - * @param transitionTime the Transition time - */ - public void setTransitionTime(final Integer transitionTime) { - this.transitionTime = transitionTime; - } - - /** - * Gets Scene Name. - * - * @return the Scene Name - */ - public String getSceneName() { - return sceneName; - } - - /** - * Sets Scene Name. - * - * @param sceneName the Scene Name - */ - public void setSceneName(final String sceneName) { - this.sceneName = sceneName; - } - - /** - * Gets Extension field sets. - * - * @return the Extension field sets - */ - public List getExtensionFieldSets() { - return extensionFieldSets; - } - - /** - * Sets Extension field sets. - * - * @param extensionFieldSets the Extension field sets - */ - public void setExtensionFieldSets(final List extensionFieldSets) { - this.extensionFieldSets = extensionFieldSets; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(groupId, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(sceneId, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(transitionTime, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(sceneName, ZclDataType.CHARACTER_STRING); - serializer.serialize(extensionFieldSets, ZclDataType.N_X_EXTENSION_FIELD_SET); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - groupId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - sceneId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - transitionTime = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - sceneName = (String) deserializer.deserialize(ZclDataType.CHARACTER_STRING); - extensionFieldSets = (List) deserializer.deserialize(ZclDataType.N_X_EXTENSION_FIELD_SET); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(173); - builder.append("AddSceneCommand ["); - builder.append(super.toString()); - builder.append(", groupId="); - builder.append(groupId); - builder.append(", sceneId="); - builder.append(sceneId); - builder.append(", transitionTime="); - builder.append(transitionTime); - builder.append(", sceneName="); - builder.append(sceneName); - builder.append(", extensionFieldSets="); - builder.append(extensionFieldSets); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/AddSceneResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/AddSceneResponse.java deleted file mode 100644 index 149d40e42..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/AddSceneResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.scenes; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Add Scene Response value object class. - *

    - * Cluster: Scenes. Command is sent FROM the server. - * This command is a specific command used for the Scenes cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class AddSceneResponse extends ZclCommand { - /** - * Status command message field. - */ - private Integer status; - - /** - * Group ID command message field. - */ - private Integer groupId; - - /** - * Scene ID command message field. - */ - private Integer sceneId; - - /** - * Default constructor. - */ - public AddSceneResponse() { - genericCommand = false; - clusterId = 5; - commandId = 0; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Status. - * - * @return the Status - */ - public Integer getStatus() { - return status; - } - - /** - * Sets Status. - * - * @param status the Status - */ - public void setStatus(final Integer status) { - this.status = status; - } - - /** - * Gets Group ID. - * - * @return the Group ID - */ - public Integer getGroupId() { - return groupId; - } - - /** - * Sets Group ID. - * - * @param groupId the Group ID - */ - public void setGroupId(final Integer groupId) { - this.groupId = groupId; - } - - /** - * Gets Scene ID. - * - * @return the Scene ID - */ - public Integer getSceneId() { - return sceneId; - } - - /** - * Sets Scene ID. - * - * @param sceneId the Scene ID - */ - public void setSceneId(final Integer sceneId) { - this.sceneId = sceneId; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(status, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(groupId, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(sceneId, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - status = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - groupId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - sceneId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(99); - builder.append("AddSceneResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(", groupId="); - builder.append(groupId); - builder.append(", sceneId="); - builder.append(sceneId); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/GetSceneMembershipCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/GetSceneMembershipCommand.java deleted file mode 100644 index 88c7ef519..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/GetSceneMembershipCommand.java +++ /dev/null @@ -1,87 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.scenes; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Get Scene Membership Command value object class. - *

    - * Cluster: Scenes. Command is sent TO the server. - * This command is a specific command used for the Scenes cluster. - *

    - * The Get Scene Membership command can be used to find an unused scene - * number within the group when no commissioning tool is in the network, or for a - * commissioning tool to get used scenes for a group on a single device or on all - * devices in the group. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class GetSceneMembershipCommand extends ZclCommand { - /** - * Group ID command message field. - */ - private Integer groupId; - - /** - * Default constructor. - */ - public GetSceneMembershipCommand() { - genericCommand = false; - clusterId = 5; - commandId = 6; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Group ID. - * - * @return the Group ID - */ - public Integer getGroupId() { - return groupId; - } - - /** - * Sets Group ID. - * - * @param groupId the Group ID - */ - public void setGroupId(final Integer groupId) { - this.groupId = groupId; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(groupId, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - groupId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(55); - builder.append("GetSceneMembershipCommand ["); - builder.append(super.toString()); - builder.append(", groupId="); - builder.append(groupId); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/GetSceneMembershipResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/GetSceneMembershipResponse.java deleted file mode 100644 index c41221397..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/GetSceneMembershipResponse.java +++ /dev/null @@ -1,192 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.scenes; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -import java.util.List; - -/** - * Get Scene Membership Response value object class. - *

    - * Cluster: Scenes. Command is sent FROM the server. - * This command is a specific command used for the Scenes cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class GetSceneMembershipResponse extends ZclCommand { - /** - * Status command message field. - */ - private Integer status; - - /** - * Capacity command message field. - */ - private Integer capacity; - - /** - * Group ID command message field. - */ - private Integer groupId; - - /** - * Scene count command message field. - */ - private Integer sceneCount; - - /** - * Scene list command message field. - */ - private List sceneList; - - /** - * Default constructor. - */ - public GetSceneMembershipResponse() { - genericCommand = false; - clusterId = 5; - commandId = 5; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Status. - * - * @return the Status - */ - public Integer getStatus() { - return status; - } - - /** - * Sets Status. - * - * @param status the Status - */ - public void setStatus(final Integer status) { - this.status = status; - } - - /** - * Gets Capacity. - * - * @return the Capacity - */ - public Integer getCapacity() { - return capacity; - } - - /** - * Sets Capacity. - * - * @param capacity the Capacity - */ - public void setCapacity(final Integer capacity) { - this.capacity = capacity; - } - - /** - * Gets Group ID. - * - * @return the Group ID - */ - public Integer getGroupId() { - return groupId; - } - - /** - * Sets Group ID. - * - * @param groupId the Group ID - */ - public void setGroupId(final Integer groupId) { - this.groupId = groupId; - } - - /** - * Gets Scene count. - * - * @return the Scene count - */ - public Integer getSceneCount() { - return sceneCount; - } - - /** - * Sets Scene count. - * - * @param sceneCount the Scene count - */ - public void setSceneCount(final Integer sceneCount) { - this.sceneCount = sceneCount; - } - - /** - * Gets Scene list. - * - * @return the Scene list - */ - public List getSceneList() { - return sceneList; - } - - /** - * Sets Scene list. - * - * @param sceneList the Scene list - */ - public void setSceneList(final List sceneList) { - this.sceneList = sceneList; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(status, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(capacity, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(groupId, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(sceneCount, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(sceneList, ZclDataType.N_X_UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - status = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - capacity = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - groupId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - sceneCount = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - sceneList = (List) deserializer.deserialize(ZclDataType.N_X_UNSIGNED_8_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(169); - builder.append("GetSceneMembershipResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(", capacity="); - builder.append(capacity); - builder.append(", groupId="); - builder.append(groupId); - builder.append(", sceneCount="); - builder.append(sceneCount); - builder.append(", sceneList="); - builder.append(sceneList); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/RecallSceneCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/RecallSceneCommand.java deleted file mode 100644 index 5511e1c68..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/RecallSceneCommand.java +++ /dev/null @@ -1,111 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.scenes; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Recall Scene Command value object class. - *

    - * Cluster: Scenes. Command is sent TO the server. - * This command is a specific command used for the Scenes cluster. - *

    - * The Recall Scene command may be addressed to a single device or to a group. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class RecallSceneCommand extends ZclCommand { - /** - * Group ID command message field. - */ - private Integer groupId; - - /** - * Scene ID command message field. - */ - private Integer sceneId; - - /** - * Default constructor. - */ - public RecallSceneCommand() { - genericCommand = false; - clusterId = 5; - commandId = 5; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Group ID. - * - * @return the Group ID - */ - public Integer getGroupId() { - return groupId; - } - - /** - * Sets Group ID. - * - * @param groupId the Group ID - */ - public void setGroupId(final Integer groupId) { - this.groupId = groupId; - } - - /** - * Gets Scene ID. - * - * @return the Scene ID - */ - public Integer getSceneId() { - return sceneId; - } - - /** - * Sets Scene ID. - * - * @param sceneId the Scene ID - */ - public void setSceneId(final Integer sceneId) { - this.sceneId = sceneId; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(groupId, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(sceneId, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - groupId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - sceneId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(75); - builder.append("RecallSceneCommand ["); - builder.append(super.toString()); - builder.append(", groupId="); - builder.append(groupId); - builder.append(", sceneId="); - builder.append(sceneId); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/RemoveAllScenesCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/RemoveAllScenesCommand.java deleted file mode 100644 index 012863a6e..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/RemoveAllScenesCommand.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.scenes; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Remove All Scenes Command value object class. - *

    - * Cluster: Scenes. Command is sent TO the server. - * This command is a specific command used for the Scenes cluster. - *

    - * The Remove All Scenes may be addressed to a single device or to a group. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class RemoveAllScenesCommand extends ZclCommand { - /** - * Group ID command message field. - */ - private Integer groupId; - - /** - * Default constructor. - */ - public RemoveAllScenesCommand() { - genericCommand = false; - clusterId = 5; - commandId = 3; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Group ID. - * - * @return the Group ID - */ - public Integer getGroupId() { - return groupId; - } - - /** - * Sets Group ID. - * - * @param groupId the Group ID - */ - public void setGroupId(final Integer groupId) { - this.groupId = groupId; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(groupId, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - groupId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(52); - builder.append("RemoveAllScenesCommand ["); - builder.append(super.toString()); - builder.append(", groupId="); - builder.append(groupId); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/RemoveAllScenesResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/RemoveAllScenesResponse.java deleted file mode 100644 index 3655a297b..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/RemoveAllScenesResponse.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.scenes; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Remove All Scenes Response value object class. - *

    - * Cluster: Scenes. Command is sent FROM the server. - * This command is a specific command used for the Scenes cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class RemoveAllScenesResponse extends ZclCommand { - /** - * Status command message field. - */ - private Integer status; - - /** - * Group ID command message field. - */ - private Integer groupId; - - /** - * Default constructor. - */ - public RemoveAllScenesResponse() { - genericCommand = false; - clusterId = 5; - commandId = 3; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Status. - * - * @return the Status - */ - public Integer getStatus() { - return status; - } - - /** - * Sets Status. - * - * @param status the Status - */ - public void setStatus(final Integer status) { - this.status = status; - } - - /** - * Gets Group ID. - * - * @return the Group ID - */ - public Integer getGroupId() { - return groupId; - } - - /** - * Sets Group ID. - * - * @param groupId the Group ID - */ - public void setGroupId(final Integer groupId) { - this.groupId = groupId; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(status, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(groupId, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - status = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - groupId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(79); - builder.append("RemoveAllScenesResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(", groupId="); - builder.append(groupId); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/RemoveSceneCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/RemoveSceneCommand.java deleted file mode 100644 index 076a6545f..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/RemoveSceneCommand.java +++ /dev/null @@ -1,111 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.scenes; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Remove Scene Command value object class. - *

    - * Cluster: Scenes. Command is sent TO the server. - * This command is a specific command used for the Scenes cluster. - *

    - * The Remove All Scenes may be addressed to a single device or to a group. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class RemoveSceneCommand extends ZclCommand { - /** - * Group ID command message field. - */ - private Integer groupId; - - /** - * Scene ID command message field. - */ - private Integer sceneId; - - /** - * Default constructor. - */ - public RemoveSceneCommand() { - genericCommand = false; - clusterId = 5; - commandId = 2; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Group ID. - * - * @return the Group ID - */ - public Integer getGroupId() { - return groupId; - } - - /** - * Sets Group ID. - * - * @param groupId the Group ID - */ - public void setGroupId(final Integer groupId) { - this.groupId = groupId; - } - - /** - * Gets Scene ID. - * - * @return the Scene ID - */ - public Integer getSceneId() { - return sceneId; - } - - /** - * Sets Scene ID. - * - * @param sceneId the Scene ID - */ - public void setSceneId(final Integer sceneId) { - this.sceneId = sceneId; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(groupId, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(sceneId, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - groupId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - sceneId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(75); - builder.append("RemoveSceneCommand ["); - builder.append(super.toString()); - builder.append(", groupId="); - builder.append(groupId); - builder.append(", sceneId="); - builder.append(sceneId); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/RemoveSceneResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/RemoveSceneResponse.java deleted file mode 100644 index 66c523e0c..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/RemoveSceneResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.scenes; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Remove Scene Response value object class. - *

    - * Cluster: Scenes. Command is sent FROM the server. - * This command is a specific command used for the Scenes cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class RemoveSceneResponse extends ZclCommand { - /** - * Status command message field. - */ - private Integer status; - - /** - * Group ID command message field. - */ - private Integer groupId; - - /** - * Scene ID command message field. - */ - private Integer sceneId; - - /** - * Default constructor. - */ - public RemoveSceneResponse() { - genericCommand = false; - clusterId = 5; - commandId = 2; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Status. - * - * @return the Status - */ - public Integer getStatus() { - return status; - } - - /** - * Sets Status. - * - * @param status the Status - */ - public void setStatus(final Integer status) { - this.status = status; - } - - /** - * Gets Group ID. - * - * @return the Group ID - */ - public Integer getGroupId() { - return groupId; - } - - /** - * Sets Group ID. - * - * @param groupId the Group ID - */ - public void setGroupId(final Integer groupId) { - this.groupId = groupId; - } - - /** - * Gets Scene ID. - * - * @return the Scene ID - */ - public Integer getSceneId() { - return sceneId; - } - - /** - * Sets Scene ID. - * - * @param sceneId the Scene ID - */ - public void setSceneId(final Integer sceneId) { - this.sceneId = sceneId; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(status, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(groupId, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(sceneId, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - status = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - groupId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - sceneId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(102); - builder.append("RemoveSceneResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(", groupId="); - builder.append(groupId); - builder.append(", sceneId="); - builder.append(sceneId); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/StoreSceneCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/StoreSceneCommand.java deleted file mode 100644 index 652727209..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/StoreSceneCommand.java +++ /dev/null @@ -1,111 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.scenes; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Store Scene Command value object class. - *

    - * Cluster: Scenes. Command is sent TO the server. - * This command is a specific command used for the Scenes cluster. - *

    - * The Store Scene command may be addressed to a single device or to a group. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class StoreSceneCommand extends ZclCommand { - /** - * Group ID command message field. - */ - private Integer groupId; - - /** - * Scene ID command message field. - */ - private Integer sceneId; - - /** - * Default constructor. - */ - public StoreSceneCommand() { - genericCommand = false; - clusterId = 5; - commandId = 4; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Group ID. - * - * @return the Group ID - */ - public Integer getGroupId() { - return groupId; - } - - /** - * Sets Group ID. - * - * @param groupId the Group ID - */ - public void setGroupId(final Integer groupId) { - this.groupId = groupId; - } - - /** - * Gets Scene ID. - * - * @return the Scene ID - */ - public Integer getSceneId() { - return sceneId; - } - - /** - * Sets Scene ID. - * - * @param sceneId the Scene ID - */ - public void setSceneId(final Integer sceneId) { - this.sceneId = sceneId; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(groupId, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(sceneId, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - groupId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - sceneId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(74); - builder.append("StoreSceneCommand ["); - builder.append(super.toString()); - builder.append(", groupId="); - builder.append(groupId); - builder.append(", sceneId="); - builder.append(sceneId); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/StoreSceneResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/StoreSceneResponse.java deleted file mode 100644 index cd21aa8ad..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/StoreSceneResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.scenes; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Store Scene Response value object class. - *

    - * Cluster: Scenes. Command is sent FROM the server. - * This command is a specific command used for the Scenes cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class StoreSceneResponse extends ZclCommand { - /** - * Status command message field. - */ - private Integer status; - - /** - * Group ID command message field. - */ - private Integer groupId; - - /** - * Scene ID command message field. - */ - private Integer sceneId; - - /** - * Default constructor. - */ - public StoreSceneResponse() { - genericCommand = false; - clusterId = 5; - commandId = 4; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Status. - * - * @return the Status - */ - public Integer getStatus() { - return status; - } - - /** - * Sets Status. - * - * @param status the Status - */ - public void setStatus(final Integer status) { - this.status = status; - } - - /** - * Gets Group ID. - * - * @return the Group ID - */ - public Integer getGroupId() { - return groupId; - } - - /** - * Sets Group ID. - * - * @param groupId the Group ID - */ - public void setGroupId(final Integer groupId) { - this.groupId = groupId; - } - - /** - * Gets Scene ID. - * - * @return the Scene ID - */ - public Integer getSceneId() { - return sceneId; - } - - /** - * Sets Scene ID. - * - * @param sceneId the Scene ID - */ - public void setSceneId(final Integer sceneId) { - this.sceneId = sceneId; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(status, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(groupId, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(sceneId, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - status = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - groupId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - sceneId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(101); - builder.append("StoreSceneResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(", groupId="); - builder.append(groupId); - builder.append(", sceneId="); - builder.append(sceneId); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/ViewSceneCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/ViewSceneCommand.java deleted file mode 100644 index c07eb4399..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/ViewSceneCommand.java +++ /dev/null @@ -1,111 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.scenes; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * View Scene Command value object class. - *

    - * Cluster: Scenes. Command is sent TO the server. - * This command is a specific command used for the Scenes cluster. - *

    - * The View Scene command shall be addressed to a single device (not a group). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class ViewSceneCommand extends ZclCommand { - /** - * Group ID command message field. - */ - private Integer groupId; - - /** - * Scene ID command message field. - */ - private Integer sceneId; - - /** - * Default constructor. - */ - public ViewSceneCommand() { - genericCommand = false; - clusterId = 5; - commandId = 1; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Group ID. - * - * @return the Group ID - */ - public Integer getGroupId() { - return groupId; - } - - /** - * Sets Group ID. - * - * @param groupId the Group ID - */ - public void setGroupId(final Integer groupId) { - this.groupId = groupId; - } - - /** - * Gets Scene ID. - * - * @return the Scene ID - */ - public Integer getSceneId() { - return sceneId; - } - - /** - * Sets Scene ID. - * - * @param sceneId the Scene ID - */ - public void setSceneId(final Integer sceneId) { - this.sceneId = sceneId; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(groupId, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(sceneId, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - groupId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - sceneId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(73); - builder.append("ViewSceneCommand ["); - builder.append(super.toString()); - builder.append(", groupId="); - builder.append(groupId); - builder.append(", sceneId="); - builder.append(sceneId); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/ViewSceneResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/ViewSceneResponse.java deleted file mode 100644 index 2c78a8e30..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/scenes/ViewSceneResponse.java +++ /dev/null @@ -1,220 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.scenes; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -import java.util.List; -import com.zsmartsystems.zigbee.zcl.field.ExtensionFieldSet; - -/** - * View Scene Response value object class. - *

    - * Cluster: Scenes. Command is sent FROM the server. - * This command is a specific command used for the Scenes cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-13T17:16:42Z") -public class ViewSceneResponse extends ZclCommand { - /** - * Status command message field. - */ - private Integer status; - - /** - * Group ID command message field. - */ - private Integer groupId; - - /** - * Scene ID command message field. - */ - private Integer sceneId; - - /** - * Transition time command message field. - */ - private Integer transitionTime; - - /** - * Scene Name command message field. - */ - private String sceneName; - - /** - * Extension field sets command message field. - */ - private List extensionFieldSets; - - /** - * Default constructor. - */ - public ViewSceneResponse() { - genericCommand = false; - clusterId = 5; - commandId = 1; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Status. - * - * @return the Status - */ - public Integer getStatus() { - return status; - } - - /** - * Sets Status. - * - * @param status the Status - */ - public void setStatus(final Integer status) { - this.status = status; - } - - /** - * Gets Group ID. - * - * @return the Group ID - */ - public Integer getGroupId() { - return groupId; - } - - /** - * Sets Group ID. - * - * @param groupId the Group ID - */ - public void setGroupId(final Integer groupId) { - this.groupId = groupId; - } - - /** - * Gets Scene ID. - * - * @return the Scene ID - */ - public Integer getSceneId() { - return sceneId; - } - - /** - * Sets Scene ID. - * - * @param sceneId the Scene ID - */ - public void setSceneId(final Integer sceneId) { - this.sceneId = sceneId; - } - - /** - * Gets Transition time. - * - * @return the Transition time - */ - public Integer getTransitionTime() { - return transitionTime; - } - - /** - * Sets Transition time. - * - * @param transitionTime the Transition time - */ - public void setTransitionTime(final Integer transitionTime) { - this.transitionTime = transitionTime; - } - - /** - * Gets Scene Name. - * - * @return the Scene Name - */ - public String getSceneName() { - return sceneName; - } - - /** - * Sets Scene Name. - * - * @param sceneName the Scene Name - */ - public void setSceneName(final String sceneName) { - this.sceneName = sceneName; - } - - /** - * Gets Extension field sets. - * - * @return the Extension field sets - */ - public List getExtensionFieldSets() { - return extensionFieldSets; - } - - /** - * Sets Extension field sets. - * - * @param extensionFieldSets the Extension field sets - */ - public void setExtensionFieldSets(final List extensionFieldSets) { - this.extensionFieldSets = extensionFieldSets; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(status, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(groupId, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(sceneId, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(transitionTime, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(sceneName, ZclDataType.CHARACTER_STRING); - serializer.serialize(extensionFieldSets, ZclDataType.N_X_EXTENSION_FIELD_SET); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - status = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - groupId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - sceneId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - transitionTime = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - sceneName = (String) deserializer.deserialize(ZclDataType.CHARACTER_STRING); - extensionFieldSets = (List) deserializer.deserialize(ZclDataType.N_X_EXTENSION_FIELD_SET); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(201); - builder.append("ViewSceneResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(", groupId="); - builder.append(groupId); - builder.append(", sceneId="); - builder.append(sceneId); - builder.append(", transitionTime="); - builder.append(transitionTime); - builder.append(", sceneName="); - builder.append(sceneName); - builder.append(", extensionFieldSets="); - builder.append(extensionFieldSets); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/thermostat/ClearWeeklySchedule.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/thermostat/ClearWeeklySchedule.java deleted file mode 100644 index 292fc3477..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/thermostat/ClearWeeklySchedule.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.thermostat; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Clear Weekly Schedule value object class. - *

    - * Cluster: Thermostat. Command is sent TO the server. - * This command is a specific command used for the Thermostat cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class ClearWeeklySchedule extends ZclCommand { - /** - * Default constructor. - */ - public ClearWeeklySchedule() { - genericCommand = false; - clusterId = 513; - commandId = 3; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(22); - builder.append("ClearWeeklySchedule ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/thermostat/GetRelayStatusLog.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/thermostat/GetRelayStatusLog.java deleted file mode 100644 index 9ec604c81..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/thermostat/GetRelayStatusLog.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.thermostat; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Get Relay Status Log value object class. - *

    - * Cluster: Thermostat. Command is sent TO the server. - * This command is a specific command used for the Thermostat cluster. - *

    - * The Get Relay Status Log command is used to query the thermostat internal relay status log. This command has no payload. - *
    - * The log storing order is First in First Out (FIFO) when the log is generated and stored into the Queue. - *
    - * The first record in the log (i.e., the oldest) one, is the first to be replaced when there is a new record and there is - * no more space in the log. Thus, the newest record will overwrite the oldest one if there is no space left. - *
    - * The log storing order is Last In First Out (LIFO) when the log is being retrieved from the Queue by a client device. - * Once the "Get Relay Status Log Response" frame is sent by the Server, the "Unread Entries" attribute - * SHOULD be decremented to indicate the number of unread records that remain in the queue. - *
    - * If the "Unread Entries"attribute reaches zero and the Client sends a new "Get Relay Status Log Request", the Server - * MAY send one of the following items as a response: - *
    - * i) resend the last Get Relay Status Log Response - * or - * ii) generate new log record at the time of request and send Get Relay Status Log Response with the new data - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class GetRelayStatusLog extends ZclCommand { - /** - * Default constructor. - */ - public GetRelayStatusLog() { - genericCommand = false; - clusterId = 513; - commandId = 4; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(20); - builder.append("GetRelayStatusLog ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/thermostat/GetRelayStatusLogResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/thermostat/GetRelayStatusLogResponse.java deleted file mode 100644 index 0a1af9a26..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/thermostat/GetRelayStatusLogResponse.java +++ /dev/null @@ -1,217 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.thermostat; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Get Relay Status Log Response value object class. - *

    - * Cluster: Thermostat. Command is sent FROM the server. - * This command is a specific command used for the Thermostat cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class GetRelayStatusLogResponse extends ZclCommand { - /** - * Time of day command message field. - */ - private Integer timeOfDay; - - /** - * Relay Status command message field. - */ - private Integer relayStatus; - - /** - * Local Temperature command message field. - */ - private Integer localTemperature; - - /** - * Humidity command message field. - */ - private Integer humidity; - - /** - * Setpoint command message field. - */ - private Integer setpoint; - - /** - * Unread Entries command message field. - */ - private Integer unreadEntries; - - /** - * Default constructor. - */ - public GetRelayStatusLogResponse() { - genericCommand = false; - clusterId = 513; - commandId = 1; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Time of day. - * - * @return the Time of day - */ - public Integer getTimeOfDay() { - return timeOfDay; - } - - /** - * Sets Time of day. - * - * @param timeOfDay the Time of day - */ - public void setTimeOfDay(final Integer timeOfDay) { - this.timeOfDay = timeOfDay; - } - - /** - * Gets Relay Status. - * - * @return the Relay Status - */ - public Integer getRelayStatus() { - return relayStatus; - } - - /** - * Sets Relay Status. - * - * @param relayStatus the Relay Status - */ - public void setRelayStatus(final Integer relayStatus) { - this.relayStatus = relayStatus; - } - - /** - * Gets Local Temperature. - * - * @return the Local Temperature - */ - public Integer getLocalTemperature() { - return localTemperature; - } - - /** - * Sets Local Temperature. - * - * @param localTemperature the Local Temperature - */ - public void setLocalTemperature(final Integer localTemperature) { - this.localTemperature = localTemperature; - } - - /** - * Gets Humidity. - * - * @return the Humidity - */ - public Integer getHumidity() { - return humidity; - } - - /** - * Sets Humidity. - * - * @param humidity the Humidity - */ - public void setHumidity(final Integer humidity) { - this.humidity = humidity; - } - - /** - * Gets Setpoint. - * - * @return the Setpoint - */ - public Integer getSetpoint() { - return setpoint; - } - - /** - * Sets Setpoint. - * - * @param setpoint the Setpoint - */ - public void setSetpoint(final Integer setpoint) { - this.setpoint = setpoint; - } - - /** - * Gets Unread Entries. - * - * @return the Unread Entries - */ - public Integer getUnreadEntries() { - return unreadEntries; - } - - /** - * Sets Unread Entries. - * - * @param unreadEntries the Unread Entries - */ - public void setUnreadEntries(final Integer unreadEntries) { - this.unreadEntries = unreadEntries; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(timeOfDay, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(relayStatus, ZclDataType.BITMAP_8_BIT); - serializer.serialize(localTemperature, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(humidity, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(setpoint, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(unreadEntries, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - timeOfDay = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - relayStatus = (Integer) deserializer.deserialize(ZclDataType.BITMAP_8_BIT); - localTemperature = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - humidity = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - setpoint = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - unreadEntries = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(213); - builder.append("GetRelayStatusLogResponse ["); - builder.append(super.toString()); - builder.append(", timeOfDay="); - builder.append(timeOfDay); - builder.append(", relayStatus="); - builder.append(relayStatus); - builder.append(", localTemperature="); - builder.append(localTemperature); - builder.append(", humidity="); - builder.append(humidity); - builder.append(", setpoint="); - builder.append(setpoint); - builder.append(", unreadEntries="); - builder.append(unreadEntries); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/thermostat/GetWeeklySchedule.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/thermostat/GetWeeklySchedule.java deleted file mode 100644 index 81e58962a..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/thermostat/GetWeeklySchedule.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.thermostat; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Get Weekly Schedule value object class. - *

    - * Cluster: Thermostat. Command is sent TO the server. - * This command is a specific command used for the Thermostat cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class GetWeeklySchedule extends ZclCommand { - /** - * Days To Return command message field. - */ - private Integer daysToReturn; - - /** - * Mode To Return command message field. - */ - private Integer modeToReturn; - - /** - * Default constructor. - */ - public GetWeeklySchedule() { - genericCommand = false; - clusterId = 513; - commandId = 2; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Days To Return. - * - * @return the Days To Return - */ - public Integer getDaysToReturn() { - return daysToReturn; - } - - /** - * Sets Days To Return. - * - * @param daysToReturn the Days To Return - */ - public void setDaysToReturn(final Integer daysToReturn) { - this.daysToReturn = daysToReturn; - } - - /** - * Gets Mode To Return. - * - * @return the Mode To Return - */ - public Integer getModeToReturn() { - return modeToReturn; - } - - /** - * Sets Mode To Return. - * - * @param modeToReturn the Mode To Return - */ - public void setModeToReturn(final Integer modeToReturn) { - this.modeToReturn = modeToReturn; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(daysToReturn, ZclDataType.BITMAP_8_BIT); - serializer.serialize(modeToReturn, ZclDataType.BITMAP_8_BIT); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - daysToReturn = (Integer) deserializer.deserialize(ZclDataType.BITMAP_8_BIT); - modeToReturn = (Integer) deserializer.deserialize(ZclDataType.BITMAP_8_BIT); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(84); - builder.append("GetWeeklySchedule ["); - builder.append(super.toString()); - builder.append(", daysToReturn="); - builder.append(daysToReturn); - builder.append(", modeToReturn="); - builder.append(modeToReturn); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/thermostat/GetWeeklyScheduleResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/thermostat/GetWeeklyScheduleResponse.java deleted file mode 100644 index 92b58d395..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/thermostat/GetWeeklyScheduleResponse.java +++ /dev/null @@ -1,217 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.thermostat; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Get Weekly Schedule Response value object class. - *

    - * Cluster: Thermostat. Command is sent FROM the server. - * This command is a specific command used for the Thermostat cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class GetWeeklyScheduleResponse extends ZclCommand { - /** - * Number of Transitions command message field. - */ - private Integer numberOfTransitions; - - /** - * Day of Week command message field. - */ - private Integer dayOfWeek; - - /** - * Mode command message field. - */ - private Integer mode; - - /** - * Transition command message field. - */ - private Integer transition; - - /** - * Heat Set command message field. - */ - private Integer heatSet; - - /** - * Cool Set command message field. - */ - private Integer coolSet; - - /** - * Default constructor. - */ - public GetWeeklyScheduleResponse() { - genericCommand = false; - clusterId = 513; - commandId = 0; - commandDirection = ZclCommandDirection.SERVER_TO_CLIENT; - } - - /** - * Gets Number of Transitions. - * - * @return the Number of Transitions - */ - public Integer getNumberOfTransitions() { - return numberOfTransitions; - } - - /** - * Sets Number of Transitions. - * - * @param numberOfTransitions the Number of Transitions - */ - public void setNumberOfTransitions(final Integer numberOfTransitions) { - this.numberOfTransitions = numberOfTransitions; - } - - /** - * Gets Day of Week. - * - * @return the Day of Week - */ - public Integer getDayOfWeek() { - return dayOfWeek; - } - - /** - * Sets Day of Week. - * - * @param dayOfWeek the Day of Week - */ - public void setDayOfWeek(final Integer dayOfWeek) { - this.dayOfWeek = dayOfWeek; - } - - /** - * Gets Mode. - * - * @return the Mode - */ - public Integer getMode() { - return mode; - } - - /** - * Sets Mode. - * - * @param mode the Mode - */ - public void setMode(final Integer mode) { - this.mode = mode; - } - - /** - * Gets Transition. - * - * @return the Transition - */ - public Integer getTransition() { - return transition; - } - - /** - * Sets Transition. - * - * @param transition the Transition - */ - public void setTransition(final Integer transition) { - this.transition = transition; - } - - /** - * Gets Heat Set. - * - * @return the Heat Set - */ - public Integer getHeatSet() { - return heatSet; - } - - /** - * Sets Heat Set. - * - * @param heatSet the Heat Set - */ - public void setHeatSet(final Integer heatSet) { - this.heatSet = heatSet; - } - - /** - * Gets Cool Set. - * - * @return the Cool Set - */ - public Integer getCoolSet() { - return coolSet; - } - - /** - * Sets Cool Set. - * - * @param coolSet the Cool Set - */ - public void setCoolSet(final Integer coolSet) { - this.coolSet = coolSet; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(numberOfTransitions, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(dayOfWeek, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(mode, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(transition, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(heatSet, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(coolSet, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - numberOfTransitions = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - dayOfWeek = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - mode = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - transition = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - heatSet = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - coolSet = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(204); - builder.append("GetWeeklyScheduleResponse ["); - builder.append(super.toString()); - builder.append(", numberOfTransitions="); - builder.append(numberOfTransitions); - builder.append(", dayOfWeek="); - builder.append(dayOfWeek); - builder.append(", mode="); - builder.append(mode); - builder.append(", transition="); - builder.append(transition); - builder.append(", heatSet="); - builder.append(heatSet); - builder.append(", coolSet="); - builder.append(coolSet); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/thermostat/SetWeeklySchedule.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/thermostat/SetWeeklySchedule.java deleted file mode 100644 index fd1ada519..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/thermostat/SetWeeklySchedule.java +++ /dev/null @@ -1,226 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.thermostat; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Set Weekly Schedule value object class. - *

    - * Cluster: Thermostat. Command is sent TO the server. - * This command is a specific command used for the Thermostat cluster. - *

    - * The set weekly schedule command is used to update the thermostat weekly set point schedule from a management system. - * If the thermostat already has a weekly set point schedule programmed then it SHOULD replace each daily set point set - * as it receives the updates from the management system. For example if the thermostat has 4 set points for every day of - * the week and is sent a Set Weekly Schedule command with one set point for Saturday then the thermostat SHOULD remove - * all 4 set points for Saturday and replace those with the updated set point but leave all other days unchanged. - *
    - * If the schedule is larger than what fits in one ZigBee frame or contains more than 10 transitions, the schedule SHALL - * then be sent using multipleSet Weekly Schedule Commands. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-26T19:23:24Z") -public class SetWeeklySchedule extends ZclCommand { - /** - * Number of Transitions command message field. - */ - private Integer numberOfTransitions; - - /** - * Day of Week command message field. - */ - private Integer dayOfWeek; - - /** - * Mode command message field. - */ - private Integer mode; - - /** - * Transition command message field. - */ - private Integer transition; - - /** - * Heat Set command message field. - */ - private Integer heatSet; - - /** - * Cool Set command message field. - */ - private Integer coolSet; - - /** - * Default constructor. - */ - public SetWeeklySchedule() { - genericCommand = false; - clusterId = 513; - commandId = 1; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Number of Transitions. - * - * @return the Number of Transitions - */ - public Integer getNumberOfTransitions() { - return numberOfTransitions; - } - - /** - * Sets Number of Transitions. - * - * @param numberOfTransitions the Number of Transitions - */ - public void setNumberOfTransitions(final Integer numberOfTransitions) { - this.numberOfTransitions = numberOfTransitions; - } - - /** - * Gets Day of Week. - * - * @return the Day of Week - */ - public Integer getDayOfWeek() { - return dayOfWeek; - } - - /** - * Sets Day of Week. - * - * @param dayOfWeek the Day of Week - */ - public void setDayOfWeek(final Integer dayOfWeek) { - this.dayOfWeek = dayOfWeek; - } - - /** - * Gets Mode. - * - * @return the Mode - */ - public Integer getMode() { - return mode; - } - - /** - * Sets Mode. - * - * @param mode the Mode - */ - public void setMode(final Integer mode) { - this.mode = mode; - } - - /** - * Gets Transition. - * - * @return the Transition - */ - public Integer getTransition() { - return transition; - } - - /** - * Sets Transition. - * - * @param transition the Transition - */ - public void setTransition(final Integer transition) { - this.transition = transition; - } - - /** - * Gets Heat Set. - * - * @return the Heat Set - */ - public Integer getHeatSet() { - return heatSet; - } - - /** - * Sets Heat Set. - * - * @param heatSet the Heat Set - */ - public void setHeatSet(final Integer heatSet) { - this.heatSet = heatSet; - } - - /** - * Gets Cool Set. - * - * @return the Cool Set - */ - public Integer getCoolSet() { - return coolSet; - } - - /** - * Sets Cool Set. - * - * @param coolSet the Cool Set - */ - public void setCoolSet(final Integer coolSet) { - this.coolSet = coolSet; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(numberOfTransitions, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(dayOfWeek, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(mode, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(transition, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(heatSet, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(coolSet, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - numberOfTransitions = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - dayOfWeek = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - mode = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - transition = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - heatSet = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - coolSet = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(196); - builder.append("SetWeeklySchedule ["); - builder.append(super.toString()); - builder.append(", numberOfTransitions="); - builder.append(numberOfTransitions); - builder.append(", dayOfWeek="); - builder.append(dayOfWeek); - builder.append(", mode="); - builder.append(mode); - builder.append(", transition="); - builder.append(transition); - builder.append(", heatSet="); - builder.append(heatSet); - builder.append(", coolSet="); - builder.append(coolSet); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/thermostat/SetpointRaiseLowerCommand.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/thermostat/SetpointRaiseLowerCommand.java deleted file mode 100644 index 29cb5884a..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/thermostat/SetpointRaiseLowerCommand.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.clusters.thermostat; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -/** - * Setpoint Raise/Lower Command value object class. - *

    - * Cluster: Thermostat. Command is sent TO the server. - * This command is a specific command used for the Thermostat cluster. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class SetpointRaiseLowerCommand extends ZclCommand { - /** - * Mode command message field. - */ - private Integer mode; - - /** - * Amount command message field. - */ - private Integer amount; - - /** - * Default constructor. - */ - public SetpointRaiseLowerCommand() { - genericCommand = false; - clusterId = 513; - commandId = 0; - commandDirection = ZclCommandDirection.CLIENT_TO_SERVER; - } - - /** - * Gets Mode. - * - * @return the Mode - */ - public Integer getMode() { - return mode; - } - - /** - * Sets Mode. - * - * @param mode the Mode - */ - public void setMode(final Integer mode) { - this.mode = mode; - } - - /** - * Gets Amount. - * - * @return the Amount - */ - public Integer getAmount() { - return amount; - } - - /** - * Sets Amount. - * - * @param amount the Amount - */ - public void setAmount(final Integer amount) { - this.amount = amount; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - serializer.serialize(mode, ZclDataType.ENUMERATION_8_BIT); - serializer.serialize(amount, ZclDataType.SIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - mode = (Integer) deserializer.deserialize(ZclDataType.ENUMERATION_8_BIT); - amount = (Integer) deserializer.deserialize(ZclDataType.SIGNED_8_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(78); - builder.append("SetpointRaiseLowerCommand ["); - builder.append(super.toString()); - builder.append(", mode="); - builder.append(mode); - builder.append(", amount="); - builder.append(amount); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/protocol/ZclClusterType.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/protocol/ZclClusterType.java deleted file mode 100644 index ab08ef78d..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/protocol/ZclClusterType.java +++ /dev/null @@ -1,146 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.protocol; - -import com.zsmartsystems.zigbee.ZigBeeProfileType; -import com.zsmartsystems.zigbee.zcl.ZclCluster; -import com.zsmartsystems.zigbee.zcl.clusters.*; - -import java.util.HashMap; -import java.util.Map; - -import javax.annotation.Generated; - -/** - * Enumeration of ZigBee Clusters - *

    - * Code is auto-generated. Modifications may be overwritten! - * - * @author Chris Jackson - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-04-07T17:43:10Z") -public enum ZclClusterType { - BASIC(0x0000, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclBasicCluster.class, "Basic"), - POWER_CONFIGURATION(0x0001, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclPowerConfigurationCluster.class, "Power configuration"), - DEVICE_TEMPERATURE_CONFIGURATION(0x0002, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclDeviceTemperatureConfigurationCluster.class, "Device Temperature Configuration"), - IDENTIFY(0x0003, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclIdentifyCluster.class, "Identify"), - GROUPS(0x0004, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclGroupsCluster.class, "Groups"), - SCENES(0x0005, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclScenesCluster.class, "Scenes"), - ON_OFF(0x0006, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclOnOffCluster.class, "On/Off"), - ON_OFF_SWITCH_CONFIGURATION(0x0007, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclOnOffSwitchConfigurationCluster.class, "On/off Switch Configuration"), - LEVEL_CONTROL(0x0008, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclLevelControlCluster.class, "Level Control"), - ALARMS(0x0009, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclAlarmsCluster.class, "Alarms"), - TIME(0x000A, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclTimeCluster.class, "Time"), - RSSI_LOCATION(0x000B, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclRssiLocationCluster.class, "RSSI Location"), - ANALOG_INPUT__BASIC(0x000C, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclAnalogInputBasicCluster.class, "Analog Input (Basic)"), - ANALOG_OUTPUT__BASIC(0x000D, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclAnalogOutputBasicCluster.class, "Analog Output (Basic)"), - ANALOG_VALUE__BASIC(0x000E, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclAnalogValueBasicCluster.class, "Analog Value (Basic)"), - BINARY_INPUT__BASIC(0x000F, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclBinaryInputBasicCluster.class, "Binary Input (Basic)"), - BINARY_OUTPUT__BASIC(0x0010, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclBinaryOutputBasicCluster.class, "Binary Output (Basic)"), - BINARY_VALUE__BASIC(0x0011, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclBinaryValueBasicCluster.class, "Binary Value (Basic)"), - MULTISTATE_INPUT__BASIC(0x0012, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclMultistateInputBasicCluster.class, "Multistate Input (Basic)"), - MULTISTATE_OUTPUT__BASIC(0x0013, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclMultistateOutputBasicCluster.class, "Multistate Output (Basic)"), - MULTISTATE_VALUE__BASIC(0x0014, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclMultistateValueBasicCluster.class, "Multistate Value (Basic)"), - COMMISSIONING(0x0015, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclCommissioningCluster.class, "Commissioning"), - OTA_UPGRADE(0x0019, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclOtaUpgradeCluster.class, "OTA Upgrade"), - APPLIANCE_CONTROL(0x001B, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclApplianceControlCluster.class, "Appliance Control"), - POLL_CONTROL(0x0020, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclPollControlCluster.class, "Poll Control"), - SHADE_CONFIGURATION(0x0100, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclShadeConfigurationCluster.class, "Shade Configuration"), - DOOR_LOCK(0x0101, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclDoorLockCluster.class, "Door Lock"), - PUMP_CONFIGURATION_AND_CONTROL(0x0200, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclPumpConfigurationAndControlCluster.class, "Pump Configuration and Control"), - THERMOSTAT(0x0201, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclThermostatCluster.class, "Thermostat"), - FAN_CONTROL(0x0202, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclFanControlCluster.class, "Fan Control"), - DEHUMIDIFICATION_CONTROL(0x0203, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclDehumidificationControlCluster.class, "Dehumidification Control"), - THERMOSTAT_USER_INTERFACE_CONFIGURATION(0x0204, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclThermostatUserInterfaceConfigurationCluster.class, "Thermostat User Interface Configuration"), - COLOR_CONTROL(0x0300, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclColorControlCluster.class, "Color Control"), - BALLAST_CONFIGURATION(0x0301, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclBallastConfigurationCluster.class, "Ballast Configuration"), - ILLUMINANCE_MEASUREMENT(0x0400, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclIlluminanceMeasurementCluster.class, "Illuminance measurement"), - ILLUMINANCE_LEVEL_SENSING(0x0401, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclIlluminanceLevelSensingCluster.class, "Illuminance level sensing"), - TEMPERATURE_MEASUREMENT(0x0402, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclTemperatureMeasurementCluster.class, "Temperature measurement"), - PRESSURE_MEASUREMENT(0x0403, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclPressureMeasurementCluster.class, "Pressure measurement"), - FLOW_MEASUREMENT(0x0404, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclFlowMeasurementCluster.class, "Flow measurement"), - RELATIVE_HUMIDITY_MEASUREMENT(0x0405, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclRelativeHumidityMeasurementCluster.class, "Relative humidity measurement"), - OCCUPANCY_SENSING(0x0406, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclOccupancySensingCluster.class, "Occupancy sensing"), - IAS_ZONE(0x0500, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclIasZoneCluster.class, "IAS Zone"), - IAS_ACE(0x0501, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclIasAceCluster.class, "IAS ACE"), - IAS_WD(0x0502, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclIasWdCluster.class, "IAS WD"), - GENERIC_TUNNEL(0x0600, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclGenericTunnelCluster.class, "Generic Tunnel"), - BACNET_PROTOCOL_TUNNEL(0x0601, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclBaCnetProtocolTunnelCluster.class, "BACnet Protocol Tunnel"), - ANALOG_INPUT__BACNET_REGULAR(0x0602, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclAnalogInputBaCnetRegularCluster.class, "Analog Input (BACnet Regular)"), - ANALOG_INPUT__BACNET_EXTENDED(0x0603, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclAnalogInputBaCnetExtendedCluster.class, "Analog Input (BACnet Extended)"), - ANALOG_OUTPUT__BACNET_REGULAR(0x0604, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclAnalogOutputBaCnetRegularCluster.class, "Analog Output (BACnet Regular)"), - ANALOG_OUTPUT__BACNET_EXTENDED(0x0605, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclAnalogOutputBaCnetExtendedCluster.class, "Analog Output (BACnet Extended)"), - ANALOG_VALUE__BACNET_REGULAR(0x0606, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclAnalogValueBaCnetRegularCluster.class, "Analog Value (BACnet Regular)"), - ANALOG_VALUE__BACNET_EXTENDED(0x0607, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclAnalogValueBaCnetExtendedCluster.class, "Analog Value (BACnet Extended)"), - BINARY_INPUT__BACNET_REGULAR(0x0608, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclBinaryInputBaCnetRegularCluster.class, "Binary Input (BACnet Regular)"), - BINARY_INPUT__BACNET_EXTENDED(0x0609, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclBinaryInputBaCnetExtendedCluster.class, "Binary Input (BACnet Extended)"), - BINARY_OUTPUT__BACNET_REGULAR(0x060A, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclBinaryOutputBaCnetRegularCluster.class, "Binary Output (BACnet Regular)"), - BINARY_OUTPUT__BACNET_EXTENDED(0x060B, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclBinaryOutputBaCnetExtendedCluster.class, "Binary Output (BACnet Extended)"), - BINARY_VALUE__BACNET_REGULAR(0x060C, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclBinaryValueBaCnetRegularCluster.class, "Binary Value (BACnet Regular)"), - BINARY_VALUE__BACNET_EXTENDED(0x060D, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclBinaryValueBaCnetExtendedCluster.class, "Binary Value (BACnet Extended)"), - MULTISTATE_INPUT__BACNET_REGULAR(0x060E, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclMultistateInputBaCnetRegularCluster.class, "Multistate Input (BACnet Regular)"), - MULTISTATE_INPUT__BACNET_EXTENDED(0x060F, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclMultistateInputBaCnetExtendedCluster.class, "Multistate Input (BACnet Extended)"), - MULTISTATE_OUTPUT__BACNET_REGULAR(0x0610, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclMultistateOutputBaCnetRegularCluster.class, "Multistate Output (BACnet Regular)"), - MULTISTATE_OUTPUT__BACNET_EXTENDED(0x0611, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclMultistateOutputBaCnetExtendedCluster.class, "Multistate Output (BACnet Extended)"), - MULTISTATE_VALUE__BACNET_REGULAR(0x0612, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclMultistateValueBaCnetRegularCluster.class, "Multistate Value (BACnet Regular)"), - MULTISTATE_VALUE__BACNET_EXTENDED(0x0613, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclMultistateValueBaCnetExtendedCluster.class, "Multistate Value (BACnet Extended)"), - PRICE(0x0700, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclPriceCluster.class, "Price"), - DEMAND_RESPONSE_AND_LOAD_CONTROL(0x0701, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclDemandResponseAndLoadControlCluster.class, "Demand Response and Load Control"), - METERING(0x0702, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclMeteringCluster.class, "Metering"), - MESSAGING(0x0703, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclMessagingCluster.class, "Messaging"), - TUNNELING(0x0704, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclTunnelingCluster.class, "Tunneling"), - KEY_ESTABLISHMENT(0x0800, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclKeyEstablishmentCluster.class, "Key Establishment"), - APPLIANCE_IDENTIFICATION(0x0B00, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclApplianceIdentificationCluster.class, "Appliance Identification"), - APPLIANCE_EVENTS_AND_ALERTS(0x0B02, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclApplianceEventsAndAlertsCluster.class, "Appliance Events and Alerts"), - APPLIANCE_STATISTICS(0x0B03, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclApplianceStatisticsCluster.class, "Appliance Statistics"), - ELECTRICAL_MEASUREMENT(0x0B04, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclElectricalMeasurementCluster.class, "Electrical Measurement"), - DIAGNOSTICS(0x0B05, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclDiagnosticsCluster.class, "Diagnostics"), - GENERAL(0xFFFF, ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZclGeneralCluster.class, "General"), - TOUCHLINK(0x1000, ZigBeeProfileType.ZIGBEE_LIGHT_LINK, ZclTouchlinkCluster.class, "Touchlink"); - - private static final Map idValueMap = new HashMap(); - - private final int clusterId; - private final ZigBeeProfileType profileType; - private final String label; - private final Class clusterClass; - - ZclClusterType(final int clusterId, final ZigBeeProfileType profileType, final ClassclusterClass, final String label) { - this.clusterId = clusterId; - this.profileType = profileType; - this.clusterClass = clusterClass; - this.label = label; - } - - static { - for (final ZclClusterType value : values()) { - idValueMap.put(value.clusterId, value); - } - } - - public int getId() { - return clusterId; - } - - public ZigBeeProfileType getProfileType() { - return profileType; - } - - public String getLabel() { - return label; - } - - public Class getClusterClass() { - return clusterClass; - } - - public static ZclClusterType getValueById(final int clusterId) { - return idValueMap.get(clusterId); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/protocol/ZclCommandType.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/protocol/ZclCommandType.java deleted file mode 100644 index 6e0c40cc6..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/protocol/ZclCommandType.java +++ /dev/null @@ -1,1218 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.protocol; - -import java.lang.reflect.Constructor; - -import javax.annotation.Generated; - -import com.zsmartsystems.zigbee.zcl.ZclCommand; -import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; - -import com.zsmartsystems.zigbee.zcl.clusters.basic.ResetToFactoryDefaultsCommand; -import com.zsmartsystems.zigbee.zcl.clusters.identify.IdentifyCommand; -import com.zsmartsystems.zigbee.zcl.clusters.identify.IdentifyQueryResponse; -import com.zsmartsystems.zigbee.zcl.clusters.identify.IdentifyQueryCommand; -import com.zsmartsystems.zigbee.zcl.clusters.groups.AddGroupCommand; -import com.zsmartsystems.zigbee.zcl.clusters.groups.AddGroupResponse; -import com.zsmartsystems.zigbee.zcl.clusters.groups.ViewGroupCommand; -import com.zsmartsystems.zigbee.zcl.clusters.groups.ViewGroupResponse; -import com.zsmartsystems.zigbee.zcl.clusters.groups.GetGroupMembershipCommand; -import com.zsmartsystems.zigbee.zcl.clusters.groups.GetGroupMembershipResponse; -import com.zsmartsystems.zigbee.zcl.clusters.groups.RemoveGroupCommand; -import com.zsmartsystems.zigbee.zcl.clusters.groups.RemoveGroupResponse; -import com.zsmartsystems.zigbee.zcl.clusters.groups.RemoveAllGroupsCommand; -import com.zsmartsystems.zigbee.zcl.clusters.groups.AddGroupIfIdentifyingCommand; -import com.zsmartsystems.zigbee.zcl.clusters.scenes.AddSceneCommand; -import com.zsmartsystems.zigbee.zcl.clusters.scenes.AddSceneResponse; -import com.zsmartsystems.zigbee.zcl.clusters.scenes.ViewSceneCommand; -import com.zsmartsystems.zigbee.zcl.clusters.scenes.ViewSceneResponse; -import com.zsmartsystems.zigbee.zcl.clusters.scenes.RemoveSceneCommand; -import com.zsmartsystems.zigbee.zcl.clusters.scenes.RemoveSceneResponse; -import com.zsmartsystems.zigbee.zcl.clusters.scenes.RemoveAllScenesCommand; -import com.zsmartsystems.zigbee.zcl.clusters.scenes.RemoveAllScenesResponse; -import com.zsmartsystems.zigbee.zcl.clusters.scenes.StoreSceneCommand; -import com.zsmartsystems.zigbee.zcl.clusters.scenes.StoreSceneResponse; -import com.zsmartsystems.zigbee.zcl.clusters.scenes.RecallSceneCommand; -import com.zsmartsystems.zigbee.zcl.clusters.scenes.GetSceneMembershipResponse; -import com.zsmartsystems.zigbee.zcl.clusters.scenes.GetSceneMembershipCommand; -import com.zsmartsystems.zigbee.zcl.clusters.onoff.OffCommand; -import com.zsmartsystems.zigbee.zcl.clusters.onoff.OnCommand; -import com.zsmartsystems.zigbee.zcl.clusters.onoff.ToggleCommand; -import com.zsmartsystems.zigbee.zcl.clusters.onoff.OffWithEffectCommand; -import com.zsmartsystems.zigbee.zcl.clusters.onoff.OnWithRecallGlobalSceneCommand; -import com.zsmartsystems.zigbee.zcl.clusters.onoff.OnWithTimedOffCommand; -import com.zsmartsystems.zigbee.zcl.clusters.levelcontrol.MoveToLevelCommand; -import com.zsmartsystems.zigbee.zcl.clusters.levelcontrol.MoveCommand; -import com.zsmartsystems.zigbee.zcl.clusters.levelcontrol.StepCommand; -import com.zsmartsystems.zigbee.zcl.clusters.levelcontrol.StopCommand; -import com.zsmartsystems.zigbee.zcl.clusters.levelcontrol.MoveToLevelWithOnOffCommand; -import com.zsmartsystems.zigbee.zcl.clusters.levelcontrol.MoveWithOnOffCommand; -import com.zsmartsystems.zigbee.zcl.clusters.levelcontrol.StepWithOnOffCommand; -import com.zsmartsystems.zigbee.zcl.clusters.levelcontrol.Stop2Command; -import com.zsmartsystems.zigbee.zcl.clusters.alarms.ResetAlarmCommand; -import com.zsmartsystems.zigbee.zcl.clusters.alarms.AlarmCommand; -import com.zsmartsystems.zigbee.zcl.clusters.alarms.ResetAllAlarmsCommand; -import com.zsmartsystems.zigbee.zcl.clusters.alarms.GetAlarmResponse; -import com.zsmartsystems.zigbee.zcl.clusters.alarms.GetAlarmCommand; -import com.zsmartsystems.zigbee.zcl.clusters.alarms.ResetAlarmLogCommand; -import com.zsmartsystems.zigbee.zcl.clusters.rssilocation.SetAbsoluteLocationCommand; -import com.zsmartsystems.zigbee.zcl.clusters.rssilocation.DeviceConfigurationResponse; -import com.zsmartsystems.zigbee.zcl.clusters.rssilocation.SetDeviceConfigurationCommand; -import com.zsmartsystems.zigbee.zcl.clusters.rssilocation.LocationDataResponse; -import com.zsmartsystems.zigbee.zcl.clusters.rssilocation.GetDeviceConfigurationCommand; -import com.zsmartsystems.zigbee.zcl.clusters.rssilocation.LocationDataNotificationCommand; -import com.zsmartsystems.zigbee.zcl.clusters.rssilocation.GetLocationDataCommand; -import com.zsmartsystems.zigbee.zcl.clusters.rssilocation.CompactLocationDataNotificationCommand; -import com.zsmartsystems.zigbee.zcl.clusters.rssilocation.RssiResponse; -import com.zsmartsystems.zigbee.zcl.clusters.rssilocation.RssiPingCommand; -import com.zsmartsystems.zigbee.zcl.clusters.rssilocation.SendPingsCommand; -import com.zsmartsystems.zigbee.zcl.clusters.rssilocation.RssiRequestCommand; -import com.zsmartsystems.zigbee.zcl.clusters.rssilocation.AnchorNodeAnnounceCommand; -import com.zsmartsystems.zigbee.zcl.clusters.rssilocation.ReportRssiMeasurementsCommand; -import com.zsmartsystems.zigbee.zcl.clusters.rssilocation.RequestOwnLocationCommand; -import com.zsmartsystems.zigbee.zcl.clusters.commissioning.RestartDeviceCommand; -import com.zsmartsystems.zigbee.zcl.clusters.commissioning.RestartDeviceResponseResponse; -import com.zsmartsystems.zigbee.zcl.clusters.commissioning.SaveStartupParametersCommand; -import com.zsmartsystems.zigbee.zcl.clusters.commissioning.SaveStartupParametersResponse; -import com.zsmartsystems.zigbee.zcl.clusters.commissioning.RestoreStartupParametersCommand; -import com.zsmartsystems.zigbee.zcl.clusters.commissioning.RestoreStartupParametersResponse; -import com.zsmartsystems.zigbee.zcl.clusters.commissioning.ResetStartupParametersCommand; -import com.zsmartsystems.zigbee.zcl.clusters.commissioning.ResetStartupParametersResponse; -import com.zsmartsystems.zigbee.zcl.clusters.otaupgrade.ImageNotifyCommand; -import com.zsmartsystems.zigbee.zcl.clusters.otaupgrade.QueryNextImageCommand; -import com.zsmartsystems.zigbee.zcl.clusters.otaupgrade.QueryNextImageResponse; -import com.zsmartsystems.zigbee.zcl.clusters.otaupgrade.ImageBlockCommand; -import com.zsmartsystems.zigbee.zcl.clusters.otaupgrade.ImagePageCommand; -import com.zsmartsystems.zigbee.zcl.clusters.otaupgrade.ImageBlockResponse; -import com.zsmartsystems.zigbee.zcl.clusters.otaupgrade.UpgradeEndCommand; -import com.zsmartsystems.zigbee.zcl.clusters.otaupgrade.UpgradeEndResponse; -import com.zsmartsystems.zigbee.zcl.clusters.otaupgrade.QuerySpecificFileCommand; -import com.zsmartsystems.zigbee.zcl.clusters.otaupgrade.QuerySpecificFileResponse; -import com.zsmartsystems.zigbee.zcl.clusters.pollcontrol.CheckInResponse; -import com.zsmartsystems.zigbee.zcl.clusters.pollcontrol.CheckInCommand; -import com.zsmartsystems.zigbee.zcl.clusters.pollcontrol.FastPollStopCommand; -import com.zsmartsystems.zigbee.zcl.clusters.pollcontrol.SetLongPollIntervalCommand; -import com.zsmartsystems.zigbee.zcl.clusters.pollcontrol.SetShortPollIntervalCommand; -import com.zsmartsystems.zigbee.zcl.clusters.doorlock.LockDoorCommand; -import com.zsmartsystems.zigbee.zcl.clusters.doorlock.LockDoorResponse; -import com.zsmartsystems.zigbee.zcl.clusters.doorlock.UnlockDoorCommand; -import com.zsmartsystems.zigbee.zcl.clusters.doorlock.UnlockDoorResponse; -import com.zsmartsystems.zigbee.zcl.clusters.thermostat.SetpointRaiseLowerCommand; -import com.zsmartsystems.zigbee.zcl.clusters.thermostat.GetWeeklyScheduleResponse; -import com.zsmartsystems.zigbee.zcl.clusters.thermostat.SetWeeklySchedule; -import com.zsmartsystems.zigbee.zcl.clusters.thermostat.GetRelayStatusLogResponse; -import com.zsmartsystems.zigbee.zcl.clusters.thermostat.GetWeeklySchedule; -import com.zsmartsystems.zigbee.zcl.clusters.thermostat.ClearWeeklySchedule; -import com.zsmartsystems.zigbee.zcl.clusters.thermostat.GetRelayStatusLog; -import com.zsmartsystems.zigbee.zcl.clusters.colorcontrol.MoveToHueCommand; -import com.zsmartsystems.zigbee.zcl.clusters.colorcontrol.MoveHueCommand; -import com.zsmartsystems.zigbee.zcl.clusters.colorcontrol.StepHueCommand; -import com.zsmartsystems.zigbee.zcl.clusters.colorcontrol.MoveToSaturationCommand; -import com.zsmartsystems.zigbee.zcl.clusters.colorcontrol.MoveSaturationCommand; -import com.zsmartsystems.zigbee.zcl.clusters.colorcontrol.StepSaturationCommand; -import com.zsmartsystems.zigbee.zcl.clusters.colorcontrol.MoveToHueAndSaturationCommand; -import com.zsmartsystems.zigbee.zcl.clusters.colorcontrol.MoveToColorCommand; -import com.zsmartsystems.zigbee.zcl.clusters.colorcontrol.MoveColorCommand; -import com.zsmartsystems.zigbee.zcl.clusters.colorcontrol.StepColorCommand; -import com.zsmartsystems.zigbee.zcl.clusters.colorcontrol.MoveToColorTemperatureCommand; -import com.zsmartsystems.zigbee.zcl.clusters.colorcontrol.EnhancedMoveToHueCommand; -import com.zsmartsystems.zigbee.zcl.clusters.colorcontrol.EnhancedStepHueCommand; -import com.zsmartsystems.zigbee.zcl.clusters.colorcontrol.EnhancedMoveToHueAndSaturationCommand; -import com.zsmartsystems.zigbee.zcl.clusters.colorcontrol.ColorLoopSetCommand; -import com.zsmartsystems.zigbee.zcl.clusters.iaszone.ZoneEnrollResponse; -import com.zsmartsystems.zigbee.zcl.clusters.iaszone.ZoneStatusChangeNotificationCommand; -import com.zsmartsystems.zigbee.zcl.clusters.iaszone.InitiateNormalOperationModeCommand; -import com.zsmartsystems.zigbee.zcl.clusters.iaszone.ZoneEnrollRequestCommand; -import com.zsmartsystems.zigbee.zcl.clusters.iaszone.InitiateTestModeCommand; -import com.zsmartsystems.zigbee.zcl.clusters.iasace.ArmCommand; -import com.zsmartsystems.zigbee.zcl.clusters.iasace.ArmResponse; -import com.zsmartsystems.zigbee.zcl.clusters.iasace.BypassCommand; -import com.zsmartsystems.zigbee.zcl.clusters.iasace.GetZoneIdMapResponse; -import com.zsmartsystems.zigbee.zcl.clusters.iasace.EmergencyCommand; -import com.zsmartsystems.zigbee.zcl.clusters.iasace.GetZoneInformationResponse; -import com.zsmartsystems.zigbee.zcl.clusters.iasace.FireCommand; -import com.zsmartsystems.zigbee.zcl.clusters.iasace.ZoneStatusChangedCommand; -import com.zsmartsystems.zigbee.zcl.clusters.iasace.PanicCommand; -import com.zsmartsystems.zigbee.zcl.clusters.iasace.PanelStatusChangedCommand; -import com.zsmartsystems.zigbee.zcl.clusters.iasace.GetZoneIdMapCommand; -import com.zsmartsystems.zigbee.zcl.clusters.iasace.GetPanelStatusResponse; -import com.zsmartsystems.zigbee.zcl.clusters.iasace.GetZoneInformationCommand; -import com.zsmartsystems.zigbee.zcl.clusters.iasace.SetBypassedZoneListCommand; -import com.zsmartsystems.zigbee.zcl.clusters.iasace.GetPanelStatusCommand; -import com.zsmartsystems.zigbee.zcl.clusters.iasace.BypassResponse; -import com.zsmartsystems.zigbee.zcl.clusters.iasace.GetBypassedZoneListCommand; -import com.zsmartsystems.zigbee.zcl.clusters.iasace.GetZoneStatusResponse; -import com.zsmartsystems.zigbee.zcl.clusters.iasace.GetZoneStatusCommand; -import com.zsmartsystems.zigbee.zcl.clusters.iaswd.StartWarningCommand; -import com.zsmartsystems.zigbee.zcl.clusters.iaswd.SquawkCommand; -import com.zsmartsystems.zigbee.zcl.clusters.general.ReadAttributesCommand; -import com.zsmartsystems.zigbee.zcl.clusters.general.ReadAttributesResponse; -import com.zsmartsystems.zigbee.zcl.clusters.general.WriteAttributesCommand; -import com.zsmartsystems.zigbee.zcl.clusters.general.WriteAttributesUndividedCommand; -import com.zsmartsystems.zigbee.zcl.clusters.general.WriteAttributesResponse; -import com.zsmartsystems.zigbee.zcl.clusters.general.WriteAttributesNoResponse; -import com.zsmartsystems.zigbee.zcl.clusters.general.ConfigureReportingCommand; -import com.zsmartsystems.zigbee.zcl.clusters.general.ConfigureReportingResponse; -import com.zsmartsystems.zigbee.zcl.clusters.general.ReadReportingConfigurationCommand; -import com.zsmartsystems.zigbee.zcl.clusters.general.ReadReportingConfigurationResponse; -import com.zsmartsystems.zigbee.zcl.clusters.general.ReportAttributesCommand; -import com.zsmartsystems.zigbee.zcl.clusters.general.DefaultResponse; -import com.zsmartsystems.zigbee.zcl.clusters.general.DiscoverAttributesCommand; -import com.zsmartsystems.zigbee.zcl.clusters.general.DiscoverAttributesResponse; -import com.zsmartsystems.zigbee.zcl.clusters.general.ReadAttributesStructuredCommand; -import com.zsmartsystems.zigbee.zcl.clusters.general.WriteAttributesStructuredCommand; -import com.zsmartsystems.zigbee.zcl.clusters.general.WriteAttributesStructuredResponse; -import com.zsmartsystems.zigbee.zcl.clusters.general.DiscoverCommandsReceived; -import com.zsmartsystems.zigbee.zcl.clusters.general.DiscoverCommandsReceivedResponse; -import com.zsmartsystems.zigbee.zcl.clusters.general.DiscoverCommandsGenerated; -import com.zsmartsystems.zigbee.zcl.clusters.general.DiscoverCommandsGeneratedResponse; -import com.zsmartsystems.zigbee.zcl.clusters.general.DiscoverAttributesExtended; -import com.zsmartsystems.zigbee.zcl.clusters.general.DiscoverAttributesExtendedResponse; - - -/** - * Enumeration of ZigBee Cluster Library commands - *

    - * Code is auto-generated. Modifications may be overwritten! - * - * @author Chris Jackson - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-05-06T20:48:39Z") -public enum ZclCommandType { - /** - * ADD_GROUP_COMMAND: Add Group Command - *

    - * See {@link AddGroupCommand} - */ - ADD_GROUP_COMMAND(0x0004, 0, AddGroupCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * ADD_GROUP_IF_IDENTIFYING_COMMAND: Add Group If Identifying Command - *

    - * See {@link AddGroupIfIdentifyingCommand} - */ - ADD_GROUP_IF_IDENTIFYING_COMMAND(0x0004, 5, AddGroupIfIdentifyingCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * ADD_GROUP_RESPONSE: Add Group Response - *

    - * See {@link AddGroupResponse} - */ - ADD_GROUP_RESPONSE(0x0004, 0, AddGroupResponse.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * ADD_SCENE_COMMAND: Add Scene Command - *

    - * See {@link AddSceneCommand} - */ - ADD_SCENE_COMMAND(0x0005, 0, AddSceneCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * ADD_SCENE_RESPONSE: Add Scene Response - *

    - * See {@link AddSceneResponse} - */ - ADD_SCENE_RESPONSE(0x0005, 0, AddSceneResponse.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * ALARM_COMMAND: Alarm Command - *

    - * See {@link AlarmCommand} - */ - ALARM_COMMAND(0x0009, 0, AlarmCommand.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * ANCHOR_NODE_ANNOUNCE_COMMAND: Anchor Node Announce Command - *

    - * See {@link AnchorNodeAnnounceCommand} - */ - ANCHOR_NODE_ANNOUNCE_COMMAND(0x000B, 6, AnchorNodeAnnounceCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * ARM_COMMAND: Arm Command - *

    - * See {@link ArmCommand} - */ - ARM_COMMAND(0x0501, 0, ArmCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * ARM_RESPONSE: Arm Response - *

    - * See {@link ArmResponse} - */ - ARM_RESPONSE(0x0501, 0, ArmResponse.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * BYPASS_COMMAND: Bypass Command - *

    - * See {@link BypassCommand} - */ - BYPASS_COMMAND(0x0501, 1, BypassCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * BYPASS_RESPONSE: Bypass Response - *

    - * See {@link BypassResponse} - */ - BYPASS_RESPONSE(0x0501, 7, BypassResponse.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * CHECK_IN_COMMAND: Check In Command - *

    - * See {@link CheckInCommand} - */ - CHECK_IN_COMMAND(0x0020, 0, CheckInCommand.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * CHECK_IN_RESPONSE: Check In Response - *

    - * See {@link CheckInResponse} - */ - CHECK_IN_RESPONSE(0x0020, 0, CheckInResponse.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * CLEAR_WEEKLY_SCHEDULE: Clear Weekly Schedule - *

    - * See {@link ClearWeeklySchedule} - */ - CLEAR_WEEKLY_SCHEDULE(0x0201, 3, ClearWeeklySchedule.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * COLOR_LOOP_SET_COMMAND: Color Loop Set Command - *

    - * See {@link ColorLoopSetCommand} - */ - COLOR_LOOP_SET_COMMAND(0x0300, 67, ColorLoopSetCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * COMPACT_LOCATION_DATA_NOTIFICATION_COMMAND: Compact Location Data Notification Command - *

    - * See {@link CompactLocationDataNotificationCommand} - */ - COMPACT_LOCATION_DATA_NOTIFICATION_COMMAND(0x000B, 3, CompactLocationDataNotificationCommand.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * CONFIGURE_REPORTING_COMMAND: Configure Reporting Command - *

    - * See {@link ConfigureReportingCommand} - */ - CONFIGURE_REPORTING_COMMAND(0xFFFF, 6, ConfigureReportingCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * CONFIGURE_REPORTING_RESPONSE: Configure Reporting Response - *

    - * See {@link ConfigureReportingResponse} - */ - CONFIGURE_REPORTING_RESPONSE(0xFFFF, 7, ConfigureReportingResponse.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * DEFAULT_RESPONSE: Default Response - *

    - * See {@link DefaultResponse} - */ - DEFAULT_RESPONSE(0xFFFF, 11, DefaultResponse.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * DEVICE_CONFIGURATION_RESPONSE: Device Configuration Response - *

    - * See {@link DeviceConfigurationResponse} - */ - DEVICE_CONFIGURATION_RESPONSE(0x000B, 0, DeviceConfigurationResponse.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * DISCOVER_ATTRIBUTES_COMMAND: Discover Attributes Command - *

    - * See {@link DiscoverAttributesCommand} - */ - DISCOVER_ATTRIBUTES_COMMAND(0xFFFF, 12, DiscoverAttributesCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * DISCOVER_ATTRIBUTES_EXTENDED: Discover Attributes Extended - *

    - * See {@link DiscoverAttributesExtended} - */ - DISCOVER_ATTRIBUTES_EXTENDED(0xFFFF, 21, DiscoverAttributesExtended.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * DISCOVER_ATTRIBUTES_EXTENDED_RESPONSE: Discover Attributes Extended Response - *

    - * See {@link DiscoverAttributesExtendedResponse} - */ - DISCOVER_ATTRIBUTES_EXTENDED_RESPONSE(0xFFFF, 22, DiscoverAttributesExtendedResponse.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * DISCOVER_ATTRIBUTES_RESPONSE: Discover Attributes Response - *

    - * See {@link DiscoverAttributesResponse} - */ - DISCOVER_ATTRIBUTES_RESPONSE(0xFFFF, 13, DiscoverAttributesResponse.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * DISCOVER_COMMANDS_GENERATED: Discover Commands Generated - *

    - * See {@link DiscoverCommandsGenerated} - */ - DISCOVER_COMMANDS_GENERATED(0xFFFF, 19, DiscoverCommandsGenerated.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * DISCOVER_COMMANDS_GENERATED_RESPONSE: Discover Commands Generated Response - *

    - * See {@link DiscoverCommandsGeneratedResponse} - */ - DISCOVER_COMMANDS_GENERATED_RESPONSE(0xFFFF, 20, DiscoverCommandsGeneratedResponse.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * DISCOVER_COMMANDS_RECEIVED: Discover Commands Received - *

    - * See {@link DiscoverCommandsReceived} - */ - DISCOVER_COMMANDS_RECEIVED(0xFFFF, 17, DiscoverCommandsReceived.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * DISCOVER_COMMANDS_RECEIVED_RESPONSE: Discover Commands Received Response - *

    - * See {@link DiscoverCommandsReceivedResponse} - */ - DISCOVER_COMMANDS_RECEIVED_RESPONSE(0xFFFF, 18, DiscoverCommandsReceivedResponse.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * EMERGENCY_COMMAND: Emergency Command - *

    - * See {@link EmergencyCommand} - */ - EMERGENCY_COMMAND(0x0501, 2, EmergencyCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * ENHANCED_MOVE_TO_HUE_AND_SATURATION_COMMAND: Enhanced Move To Hue and Saturation Command - *

    - * See {@link EnhancedMoveToHueAndSaturationCommand} - */ - ENHANCED_MOVE_TO_HUE_AND_SATURATION_COMMAND(0x0300, 66, EnhancedMoveToHueAndSaturationCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * ENHANCED_MOVE_TO_HUE_COMMAND: Enhanced Move To Hue Command - *

    - * See {@link EnhancedMoveToHueCommand} - */ - ENHANCED_MOVE_TO_HUE_COMMAND(0x0300, 64, EnhancedMoveToHueCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * ENHANCED_STEP_HUE_COMMAND: Enhanced Step Hue Command - *

    - * See {@link EnhancedStepHueCommand} - */ - ENHANCED_STEP_HUE_COMMAND(0x0300, 65, EnhancedStepHueCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * FAST_POLL_STOP_COMMAND: Fast Poll Stop Command - *

    - * See {@link FastPollStopCommand} - */ - FAST_POLL_STOP_COMMAND(0x0020, 1, FastPollStopCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * FIRE_COMMAND: Fire Command - *

    - * See {@link FireCommand} - */ - FIRE_COMMAND(0x0501, 3, FireCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * GET_ALARM_COMMAND: Get Alarm Command - *

    - * See {@link GetAlarmCommand} - */ - GET_ALARM_COMMAND(0x0009, 2, GetAlarmCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * GET_ALARM_RESPONSE: Get Alarm Response - *

    - * See {@link GetAlarmResponse} - */ - GET_ALARM_RESPONSE(0x0009, 1, GetAlarmResponse.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * GET_BYPASSED_ZONE_LIST_COMMAND: Get Bypassed Zone List Command - *

    - * See {@link GetBypassedZoneListCommand} - */ - GET_BYPASSED_ZONE_LIST_COMMAND(0x0501, 8, GetBypassedZoneListCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * GET_DEVICE_CONFIGURATION_COMMAND: Get Device Configuration Command - *

    - * See {@link GetDeviceConfigurationCommand} - */ - GET_DEVICE_CONFIGURATION_COMMAND(0x000B, 2, GetDeviceConfigurationCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * GET_GROUP_MEMBERSHIP_COMMAND: Get Group Membership Command - *

    - * See {@link GetGroupMembershipCommand} - */ - GET_GROUP_MEMBERSHIP_COMMAND(0x0004, 2, GetGroupMembershipCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * GET_GROUP_MEMBERSHIP_RESPONSE: Get Group Membership Response - *

    - * See {@link GetGroupMembershipResponse} - */ - GET_GROUP_MEMBERSHIP_RESPONSE(0x0004, 2, GetGroupMembershipResponse.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * GET_LOCATION_DATA_COMMAND: Get Location Data Command - *

    - * See {@link GetLocationDataCommand} - */ - GET_LOCATION_DATA_COMMAND(0x000B, 3, GetLocationDataCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * GET_PANEL_STATUS_COMMAND: Get Panel Status Command - *

    - * See {@link GetPanelStatusCommand} - */ - GET_PANEL_STATUS_COMMAND(0x0501, 7, GetPanelStatusCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * GET_PANEL_STATUS_RESPONSE: Get Panel Status Response - *

    - * See {@link GetPanelStatusResponse} - */ - GET_PANEL_STATUS_RESPONSE(0x0501, 5, GetPanelStatusResponse.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * GET_RELAY_STATUS_LOG: Get Relay Status Log - *

    - * See {@link GetRelayStatusLog} - */ - GET_RELAY_STATUS_LOG(0x0201, 4, GetRelayStatusLog.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * GET_RELAY_STATUS_LOG_RESPONSE: Get Relay Status Log Response - *

    - * See {@link GetRelayStatusLogResponse} - */ - GET_RELAY_STATUS_LOG_RESPONSE(0x0201, 1, GetRelayStatusLogResponse.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * GET_SCENE_MEMBERSHIP_COMMAND: Get Scene Membership Command - *

    - * See {@link GetSceneMembershipCommand} - */ - GET_SCENE_MEMBERSHIP_COMMAND(0x0005, 6, GetSceneMembershipCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * GET_SCENE_MEMBERSHIP_RESPONSE: Get Scene Membership Response - *

    - * See {@link GetSceneMembershipResponse} - */ - GET_SCENE_MEMBERSHIP_RESPONSE(0x0005, 5, GetSceneMembershipResponse.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * GET_WEEKLY_SCHEDULE: Get Weekly Schedule - *

    - * See {@link GetWeeklySchedule} - */ - GET_WEEKLY_SCHEDULE(0x0201, 2, GetWeeklySchedule.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * GET_WEEKLY_SCHEDULE_RESPONSE: Get Weekly Schedule Response - *

    - * See {@link GetWeeklyScheduleResponse} - */ - GET_WEEKLY_SCHEDULE_RESPONSE(0x0201, 0, GetWeeklyScheduleResponse.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * GET_ZONE_ID_MAP_COMMAND: Get Zone ID Map Command - *

    - * See {@link GetZoneIdMapCommand} - */ - GET_ZONE_ID_MAP_COMMAND(0x0501, 5, GetZoneIdMapCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * GET_ZONE_ID_MAP_RESPONSE: Get Zone ID Map Response - *

    - * See {@link GetZoneIdMapResponse} - */ - GET_ZONE_ID_MAP_RESPONSE(0x0501, 1, GetZoneIdMapResponse.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * GET_ZONE_INFORMATION_COMMAND: Get Zone Information Command - *

    - * See {@link GetZoneInformationCommand} - */ - GET_ZONE_INFORMATION_COMMAND(0x0501, 6, GetZoneInformationCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * GET_ZONE_INFORMATION_RESPONSE: Get Zone Information Response - *

    - * See {@link GetZoneInformationResponse} - */ - GET_ZONE_INFORMATION_RESPONSE(0x0501, 2, GetZoneInformationResponse.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * GET_ZONE_STATUS_COMMAND: Get Zone Status Command - *

    - * See {@link GetZoneStatusCommand} - */ - GET_ZONE_STATUS_COMMAND(0x0501, 9, GetZoneStatusCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * GET_ZONE_STATUS_RESPONSE: Get Zone Status Response - *

    - * See {@link GetZoneStatusResponse} - */ - GET_ZONE_STATUS_RESPONSE(0x0501, 8, GetZoneStatusResponse.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * IDENTIFY_COMMAND: Identify Command - *

    - * See {@link IdentifyCommand} - */ - IDENTIFY_COMMAND(0x0003, 0, IdentifyCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * IDENTIFY_QUERY_COMMAND: Identify Query Command - *

    - * See {@link IdentifyQueryCommand} - */ - IDENTIFY_QUERY_COMMAND(0x0003, 1, IdentifyQueryCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * IDENTIFY_QUERY_RESPONSE: Identify Query Response - *

    - * See {@link IdentifyQueryResponse} - */ - IDENTIFY_QUERY_RESPONSE(0x0003, 0, IdentifyQueryResponse.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * IMAGE_BLOCK_COMMAND: Image Block Command - *

    - * See {@link ImageBlockCommand} - */ - IMAGE_BLOCK_COMMAND(0x0019, 3, ImageBlockCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * IMAGE_BLOCK_RESPONSE: Image Block Response - *

    - * See {@link ImageBlockResponse} - */ - IMAGE_BLOCK_RESPONSE(0x0019, 5, ImageBlockResponse.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * IMAGE_NOTIFY_COMMAND: Image Notify Command - *

    - * See {@link ImageNotifyCommand} - */ - IMAGE_NOTIFY_COMMAND(0x0019, 0, ImageNotifyCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * IMAGE_PAGE_COMMAND: Image Page Command - *

    - * See {@link ImagePageCommand} - */ - IMAGE_PAGE_COMMAND(0x0019, 4, ImagePageCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * INITIATE_NORMAL_OPERATION_MODE_COMMAND: Initiate Normal Operation Mode Command - *

    - * See {@link InitiateNormalOperationModeCommand} - */ - INITIATE_NORMAL_OPERATION_MODE_COMMAND(0x0500, 1, InitiateNormalOperationModeCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * INITIATE_TEST_MODE_COMMAND: Initiate Test Mode Command - *

    - * See {@link InitiateTestModeCommand} - */ - INITIATE_TEST_MODE_COMMAND(0x0500, 2, InitiateTestModeCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * LOCATION_DATA_NOTIFICATION_COMMAND: Location Data Notification Command - *

    - * See {@link LocationDataNotificationCommand} - */ - LOCATION_DATA_NOTIFICATION_COMMAND(0x000B, 2, LocationDataNotificationCommand.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * LOCATION_DATA_RESPONSE: Location Data Response - *

    - * See {@link LocationDataResponse} - */ - LOCATION_DATA_RESPONSE(0x000B, 1, LocationDataResponse.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * LOCK_DOOR_COMMAND: Lock Door Command - *

    - * See {@link LockDoorCommand} - */ - LOCK_DOOR_COMMAND(0x0101, 0, LockDoorCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * LOCK_DOOR_RESPONSE: Lock Door Response - *

    - * See {@link LockDoorResponse} - */ - LOCK_DOOR_RESPONSE(0x0101, 0, LockDoorResponse.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * MOVE_COLOR_COMMAND: Move Color Command - *

    - * See {@link MoveColorCommand} - */ - MOVE_COLOR_COMMAND(0x0300, 8, MoveColorCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * MOVE_COMMAND: Move Command - *

    - * See {@link MoveCommand} - */ - MOVE_COMMAND(0x0008, 1, MoveCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * MOVE_HUE_COMMAND: Move Hue Command - *

    - * See {@link MoveHueCommand} - */ - MOVE_HUE_COMMAND(0x0300, 1, MoveHueCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * MOVE_SATURATION_COMMAND: Move Saturation Command - *

    - * See {@link MoveSaturationCommand} - */ - MOVE_SATURATION_COMMAND(0x0300, 4, MoveSaturationCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * MOVE_TO_COLOR_COMMAND: Move to Color Command - *

    - * See {@link MoveToColorCommand} - */ - MOVE_TO_COLOR_COMMAND(0x0300, 7, MoveToColorCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * MOVE_TO_COLOR_TEMPERATURE_COMMAND: Move to Color Temperature Command - *

    - * See {@link MoveToColorTemperatureCommand} - */ - MOVE_TO_COLOR_TEMPERATURE_COMMAND(0x0300, 10, MoveToColorTemperatureCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * MOVE_TO_HUE_AND_SATURATION_COMMAND: Move to Hue and Saturation Command - *

    - * See {@link MoveToHueAndSaturationCommand} - */ - MOVE_TO_HUE_AND_SATURATION_COMMAND(0x0300, 6, MoveToHueAndSaturationCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * MOVE_TO_HUE_COMMAND: Move to Hue Command - *

    - * See {@link MoveToHueCommand} - */ - MOVE_TO_HUE_COMMAND(0x0300, 0, MoveToHueCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * MOVE_TO_LEVEL_COMMAND: Move to Level Command - *

    - * See {@link MoveToLevelCommand} - */ - MOVE_TO_LEVEL_COMMAND(0x0008, 0, MoveToLevelCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * MOVE_TO_LEVEL__WITH_ON_OFF__COMMAND: Move to Level (with On/Off) Command - *

    - * See {@link MoveToLevelWithOnOffCommand} - */ - MOVE_TO_LEVEL__WITH_ON_OFF__COMMAND(0x0008, 4, MoveToLevelWithOnOffCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * MOVE_TO_SATURATION_COMMAND: Move to Saturation Command - *

    - * See {@link MoveToSaturationCommand} - */ - MOVE_TO_SATURATION_COMMAND(0x0300, 3, MoveToSaturationCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * MOVE__WITH_ON_OFF__COMMAND: Move (with On/Off) Command - *

    - * See {@link MoveWithOnOffCommand} - */ - MOVE__WITH_ON_OFF__COMMAND(0x0008, 5, MoveWithOnOffCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * OFF_COMMAND: Off Command - *

    - * See {@link OffCommand} - */ - OFF_COMMAND(0x0006, 0, OffCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * OFF_WITH_EFFECT_COMMAND: Off With Effect Command - *

    - * See {@link OffWithEffectCommand} - */ - OFF_WITH_EFFECT_COMMAND(0x0006, 64, OffWithEffectCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * ON_COMMAND: On Command - *

    - * See {@link OnCommand} - */ - ON_COMMAND(0x0006, 1, OnCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * ON_WITH_RECALL_GLOBAL_SCENE_COMMAND: On With Recall Global Scene Command - *

    - * See {@link OnWithRecallGlobalSceneCommand} - */ - ON_WITH_RECALL_GLOBAL_SCENE_COMMAND(0x0006, 65, OnWithRecallGlobalSceneCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * ON_WITH_TIMED_OFF_COMMAND: On With Timed Off Command - *

    - * See {@link OnWithTimedOffCommand} - */ - ON_WITH_TIMED_OFF_COMMAND(0x0006, 66, OnWithTimedOffCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * PANEL_STATUS_CHANGED_COMMAND: Panel Status Changed Command - *

    - * See {@link PanelStatusChangedCommand} - */ - PANEL_STATUS_CHANGED_COMMAND(0x0501, 4, PanelStatusChangedCommand.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * PANIC_COMMAND: Panic Command - *

    - * See {@link PanicCommand} - */ - PANIC_COMMAND(0x0501, 4, PanicCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * QUERY_NEXT_IMAGE_COMMAND: Query Next Image Command - *

    - * See {@link QueryNextImageCommand} - */ - QUERY_NEXT_IMAGE_COMMAND(0x0019, 1, QueryNextImageCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * QUERY_NEXT_IMAGE_RESPONSE: Query Next Image Response - *

    - * See {@link QueryNextImageResponse} - */ - QUERY_NEXT_IMAGE_RESPONSE(0x0019, 2, QueryNextImageResponse.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * QUERY_SPECIFIC_FILE_COMMAND: Query Specific File Command - *

    - * See {@link QuerySpecificFileCommand} - */ - QUERY_SPECIFIC_FILE_COMMAND(0x0019, 8, QuerySpecificFileCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * QUERY_SPECIFIC_FILE_RESPONSE: Query Specific File Response - *

    - * See {@link QuerySpecificFileResponse} - */ - QUERY_SPECIFIC_FILE_RESPONSE(0x0019, 9, QuerySpecificFileResponse.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * READ_ATTRIBUTES_COMMAND: Read Attributes Command - *

    - * See {@link ReadAttributesCommand} - */ - READ_ATTRIBUTES_COMMAND(0xFFFF, 0, ReadAttributesCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * READ_ATTRIBUTES_RESPONSE: Read Attributes Response - *

    - * See {@link ReadAttributesResponse} - */ - READ_ATTRIBUTES_RESPONSE(0xFFFF, 1, ReadAttributesResponse.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * READ_ATTRIBUTES_STRUCTURED_COMMAND: Read Attributes Structured Command - *

    - * See {@link ReadAttributesStructuredCommand} - */ - READ_ATTRIBUTES_STRUCTURED_COMMAND(0xFFFF, 14, ReadAttributesStructuredCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * READ_REPORTING_CONFIGURATION_COMMAND: Read Reporting Configuration Command - *

    - * See {@link ReadReportingConfigurationCommand} - */ - READ_REPORTING_CONFIGURATION_COMMAND(0xFFFF, 8, ReadReportingConfigurationCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * READ_REPORTING_CONFIGURATION_RESPONSE: Read Reporting Configuration Response - *

    - * See {@link ReadReportingConfigurationResponse} - */ - READ_REPORTING_CONFIGURATION_RESPONSE(0xFFFF, 9, ReadReportingConfigurationResponse.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * RECALL_SCENE_COMMAND: Recall Scene Command - *

    - * See {@link RecallSceneCommand} - */ - RECALL_SCENE_COMMAND(0x0005, 5, RecallSceneCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * REMOVE_ALL_GROUPS_COMMAND: Remove All Groups Command - *

    - * See {@link RemoveAllGroupsCommand} - */ - REMOVE_ALL_GROUPS_COMMAND(0x0004, 4, RemoveAllGroupsCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * REMOVE_ALL_SCENES_COMMAND: Remove All Scenes Command - *

    - * See {@link RemoveAllScenesCommand} - */ - REMOVE_ALL_SCENES_COMMAND(0x0005, 3, RemoveAllScenesCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * REMOVE_ALL_SCENES_RESPONSE: Remove All Scenes Response - *

    - * See {@link RemoveAllScenesResponse} - */ - REMOVE_ALL_SCENES_RESPONSE(0x0005, 3, RemoveAllScenesResponse.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * REMOVE_GROUP_COMMAND: Remove Group Command - *

    - * See {@link RemoveGroupCommand} - */ - REMOVE_GROUP_COMMAND(0x0004, 3, RemoveGroupCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * REMOVE_GROUP_RESPONSE: Remove Group Response - *

    - * See {@link RemoveGroupResponse} - */ - REMOVE_GROUP_RESPONSE(0x0004, 3, RemoveGroupResponse.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * REMOVE_SCENE_COMMAND: Remove Scene Command - *

    - * See {@link RemoveSceneCommand} - */ - REMOVE_SCENE_COMMAND(0x0005, 2, RemoveSceneCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * REMOVE_SCENE_RESPONSE: Remove Scene Response - *

    - * See {@link RemoveSceneResponse} - */ - REMOVE_SCENE_RESPONSE(0x0005, 2, RemoveSceneResponse.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * REPORT_ATTRIBUTES_COMMAND: Report Attributes Command - *

    - * See {@link ReportAttributesCommand} - */ - REPORT_ATTRIBUTES_COMMAND(0xFFFF, 10, ReportAttributesCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * REPORT_RSSI_MEASUREMENTS_COMMAND: Report RSSI Measurements Command - *

    - * See {@link ReportRssiMeasurementsCommand} - */ - REPORT_RSSI_MEASUREMENTS_COMMAND(0x000B, 6, ReportRssiMeasurementsCommand.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * REQUEST_OWN_LOCATION_COMMAND: Request Own Location Command - *

    - * See {@link RequestOwnLocationCommand} - */ - REQUEST_OWN_LOCATION_COMMAND(0x000B, 7, RequestOwnLocationCommand.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * RESET_ALARM_COMMAND: Reset Alarm Command - *

    - * See {@link ResetAlarmCommand} - */ - RESET_ALARM_COMMAND(0x0009, 0, ResetAlarmCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * RESET_ALARM_LOG_COMMAND: Reset Alarm Log Command - *

    - * See {@link ResetAlarmLogCommand} - */ - RESET_ALARM_LOG_COMMAND(0x0009, 3, ResetAlarmLogCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * RESET_ALL_ALARMS_COMMAND: Reset All Alarms Command - *

    - * See {@link ResetAllAlarmsCommand} - */ - RESET_ALL_ALARMS_COMMAND(0x0009, 1, ResetAllAlarmsCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * RESET_STARTUP_PARAMETERS_COMMAND: Reset Startup Parameters Command - *

    - * See {@link ResetStartupParametersCommand} - */ - RESET_STARTUP_PARAMETERS_COMMAND(0x0015, 3, ResetStartupParametersCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * RESET_STARTUP_PARAMETERS_RESPONSE: Reset Startup Parameters Response - *

    - * See {@link ResetStartupParametersResponse} - */ - RESET_STARTUP_PARAMETERS_RESPONSE(0x0015, 3, ResetStartupParametersResponse.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * RESET_TO_FACTORY_DEFAULTS_COMMAND: Reset to Factory Defaults Command - *

    - * See {@link ResetToFactoryDefaultsCommand} - */ - RESET_TO_FACTORY_DEFAULTS_COMMAND(0x0000, 0, ResetToFactoryDefaultsCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * RESTART_DEVICE_COMMAND: Restart Device Command - *

    - * See {@link RestartDeviceCommand} - */ - RESTART_DEVICE_COMMAND(0x0015, 0, RestartDeviceCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * RESTART_DEVICE_RESPONSE_RESPONSE: Restart Device Response Response - *

    - * See {@link RestartDeviceResponseResponse} - */ - RESTART_DEVICE_RESPONSE_RESPONSE(0x0015, 0, RestartDeviceResponseResponse.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * RESTORE_STARTUP_PARAMETERS_COMMAND: Restore Startup Parameters Command - *

    - * See {@link RestoreStartupParametersCommand} - */ - RESTORE_STARTUP_PARAMETERS_COMMAND(0x0015, 2, RestoreStartupParametersCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * RESTORE_STARTUP_PARAMETERS_RESPONSE: Restore Startup Parameters Response - *

    - * See {@link RestoreStartupParametersResponse} - */ - RESTORE_STARTUP_PARAMETERS_RESPONSE(0x0015, 2, RestoreStartupParametersResponse.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * RSSI_PING_COMMAND: RSSI Ping Command - *

    - * See {@link RssiPingCommand} - */ - RSSI_PING_COMMAND(0x000B, 4, RssiPingCommand.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * RSSI_REQUEST_COMMAND: RSSI Request Command - *

    - * See {@link RssiRequestCommand} - */ - RSSI_REQUEST_COMMAND(0x000B, 5, RssiRequestCommand.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * RSSI_RESPONSE: RSSI Response - *

    - * See {@link RssiResponse} - */ - RSSI_RESPONSE(0x000B, 4, RssiResponse.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * SAVE_STARTUP_PARAMETERS_COMMAND: Save Startup Parameters Command - *

    - * See {@link SaveStartupParametersCommand} - */ - SAVE_STARTUP_PARAMETERS_COMMAND(0x0015, 1, SaveStartupParametersCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * SAVE_STARTUP_PARAMETERS_RESPONSE: Save Startup Parameters Response - *

    - * See {@link SaveStartupParametersResponse} - */ - SAVE_STARTUP_PARAMETERS_RESPONSE(0x0015, 1, SaveStartupParametersResponse.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * SEND_PINGS_COMMAND: Send Pings Command - *

    - * See {@link SendPingsCommand} - */ - SEND_PINGS_COMMAND(0x000B, 5, SendPingsCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * SETPOINT_RAISE_LOWER_COMMAND: Setpoint Raise/Lower Command - *

    - * See {@link SetpointRaiseLowerCommand} - */ - SETPOINT_RAISE_LOWER_COMMAND(0x0201, 0, SetpointRaiseLowerCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * SET_ABSOLUTE_LOCATION_COMMAND: Set Absolute Location Command - *

    - * See {@link SetAbsoluteLocationCommand} - */ - SET_ABSOLUTE_LOCATION_COMMAND(0x000B, 0, SetAbsoluteLocationCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * SET_BYPASSED_ZONE_LIST_COMMAND: Set Bypassed Zone List Command - *

    - * See {@link SetBypassedZoneListCommand} - */ - SET_BYPASSED_ZONE_LIST_COMMAND(0x0501, 6, SetBypassedZoneListCommand.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * SET_DEVICE_CONFIGURATION_COMMAND: Set Device Configuration Command - *

    - * See {@link SetDeviceConfigurationCommand} - */ - SET_DEVICE_CONFIGURATION_COMMAND(0x000B, 1, SetDeviceConfigurationCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * SET_LONG_POLL_INTERVAL_COMMAND: Set Long Poll Interval Command - *

    - * See {@link SetLongPollIntervalCommand} - */ - SET_LONG_POLL_INTERVAL_COMMAND(0x0020, 2, SetLongPollIntervalCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * SET_SHORT_POLL_INTERVAL_COMMAND: Set Short Poll Interval Command - *

    - * See {@link SetShortPollIntervalCommand} - */ - SET_SHORT_POLL_INTERVAL_COMMAND(0x0020, 3, SetShortPollIntervalCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * SET_WEEKLY_SCHEDULE: Set Weekly Schedule - *

    - * See {@link SetWeeklySchedule} - */ - SET_WEEKLY_SCHEDULE(0x0201, 1, SetWeeklySchedule.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * SQUAWK_COMMAND: Squawk Command - *

    - * See {@link SquawkCommand} - */ - SQUAWK_COMMAND(0x0502, 2, SquawkCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * START_WARNING_COMMAND: Start Warning Command - *

    - * See {@link StartWarningCommand} - */ - START_WARNING_COMMAND(0x0502, 0, StartWarningCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * STEP_COLOR_COMMAND: Step Color Command - *

    - * See {@link StepColorCommand} - */ - STEP_COLOR_COMMAND(0x0300, 9, StepColorCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * STEP_COMMAND: Step Command - *

    - * See {@link StepCommand} - */ - STEP_COMMAND(0x0008, 2, StepCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * STEP_HUE_COMMAND: Step Hue Command - *

    - * See {@link StepHueCommand} - */ - STEP_HUE_COMMAND(0x0300, 2, StepHueCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * STEP_SATURATION_COMMAND: Step Saturation Command - *

    - * See {@link StepSaturationCommand} - */ - STEP_SATURATION_COMMAND(0x0300, 5, StepSaturationCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * STEP__WITH_ON_OFF__COMMAND: Step (with On/Off) Command - *

    - * See {@link StepWithOnOffCommand} - */ - STEP__WITH_ON_OFF__COMMAND(0x0008, 6, StepWithOnOffCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * STOP_2_COMMAND: Stop 2 Command - *

    - * See {@link Stop2Command} - */ - STOP_2_COMMAND(0x0008, 7, Stop2Command.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * STOP_COMMAND: Stop Command - *

    - * See {@link StopCommand} - */ - STOP_COMMAND(0x0008, 3, StopCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * STORE_SCENE_COMMAND: Store Scene Command - *

    - * See {@link StoreSceneCommand} - */ - STORE_SCENE_COMMAND(0x0005, 4, StoreSceneCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * STORE_SCENE_RESPONSE: Store Scene Response - *

    - * See {@link StoreSceneResponse} - */ - STORE_SCENE_RESPONSE(0x0005, 4, StoreSceneResponse.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * TOGGLE_COMMAND: Toggle Command - *

    - * See {@link ToggleCommand} - */ - TOGGLE_COMMAND(0x0006, 2, ToggleCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * UNLOCK_DOOR_COMMAND: Unlock Door Command - *

    - * See {@link UnlockDoorCommand} - */ - UNLOCK_DOOR_COMMAND(0x0101, 1, UnlockDoorCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * UNLOCK_DOOR_RESPONSE: Unlock Door Response - *

    - * See {@link UnlockDoorResponse} - */ - UNLOCK_DOOR_RESPONSE(0x0101, 1, UnlockDoorResponse.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * UPGRADE_END_COMMAND: Upgrade End Command - *

    - * See {@link UpgradeEndCommand} - */ - UPGRADE_END_COMMAND(0x0019, 6, UpgradeEndCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * UPGRADE_END_RESPONSE: Upgrade End Response - *

    - * See {@link UpgradeEndResponse} - */ - UPGRADE_END_RESPONSE(0x0019, 7, UpgradeEndResponse.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * VIEW_GROUP_COMMAND: View Group Command - *

    - * See {@link ViewGroupCommand} - */ - VIEW_GROUP_COMMAND(0x0004, 1, ViewGroupCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * VIEW_GROUP_RESPONSE: View Group Response - *

    - * See {@link ViewGroupResponse} - */ - VIEW_GROUP_RESPONSE(0x0004, 1, ViewGroupResponse.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * VIEW_SCENE_COMMAND: View Scene Command - *

    - * See {@link ViewSceneCommand} - */ - VIEW_SCENE_COMMAND(0x0005, 1, ViewSceneCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * VIEW_SCENE_RESPONSE: View Scene Response - *

    - * See {@link ViewSceneResponse} - */ - VIEW_SCENE_RESPONSE(0x0005, 1, ViewSceneResponse.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * WRITE_ATTRIBUTES_COMMAND: Write Attributes Command - *

    - * See {@link WriteAttributesCommand} - */ - WRITE_ATTRIBUTES_COMMAND(0xFFFF, 2, WriteAttributesCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * WRITE_ATTRIBUTES_NO_RESPONSE: Write Attributes No Response - *

    - * See {@link WriteAttributesNoResponse} - */ - WRITE_ATTRIBUTES_NO_RESPONSE(0xFFFF, 5, WriteAttributesNoResponse.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * WRITE_ATTRIBUTES_RESPONSE: Write Attributes Response - *

    - * See {@link WriteAttributesResponse} - */ - WRITE_ATTRIBUTES_RESPONSE(0xFFFF, 4, WriteAttributesResponse.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * WRITE_ATTRIBUTES_STRUCTURED_COMMAND: Write Attributes Structured Command - *

    - * See {@link WriteAttributesStructuredCommand} - */ - WRITE_ATTRIBUTES_STRUCTURED_COMMAND(0xFFFF, 15, WriteAttributesStructuredCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * WRITE_ATTRIBUTES_STRUCTURED_RESPONSE: Write Attributes Structured Response - *

    - * See {@link WriteAttributesStructuredResponse} - */ - WRITE_ATTRIBUTES_STRUCTURED_RESPONSE(0xFFFF, 16, WriteAttributesStructuredResponse.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * WRITE_ATTRIBUTES_UNDIVIDED_COMMAND: Write Attributes Undivided Command - *

    - * See {@link WriteAttributesUndividedCommand} - */ - WRITE_ATTRIBUTES_UNDIVIDED_COMMAND(0xFFFF, 3, WriteAttributesUndividedCommand.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * ZONE_ENROLL_REQUEST_COMMAND: Zone Enroll Request Command - *

    - * See {@link ZoneEnrollRequestCommand} - */ - ZONE_ENROLL_REQUEST_COMMAND(0x0500, 1, ZoneEnrollRequestCommand.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * ZONE_ENROLL_RESPONSE: Zone Enroll Response - *

    - * See {@link ZoneEnrollResponse} - */ - ZONE_ENROLL_RESPONSE(0x0500, 0, ZoneEnrollResponse.class, ZclCommandDirection.CLIENT_TO_SERVER), - /** - * ZONE_STATUS_CHANGED_COMMAND: Zone Status Changed Command - *

    - * See {@link ZoneStatusChangedCommand} - */ - ZONE_STATUS_CHANGED_COMMAND(0x0501, 3, ZoneStatusChangedCommand.class, ZclCommandDirection.SERVER_TO_CLIENT), - /** - * ZONE_STATUS_CHANGE_NOTIFICATION_COMMAND: Zone Status Change Notification Command - *

    - * See {@link ZoneStatusChangeNotificationCommand} - */ - ZONE_STATUS_CHANGE_NOTIFICATION_COMMAND(0x0500, 0, ZoneStatusChangeNotificationCommand.class, ZclCommandDirection.SERVER_TO_CLIENT); - - private final int commandId; - private final int clusterType; - private final Class commandClass; - private final ZclCommandDirection direction; - - ZclCommandType(final int clusterType, final int commandId, final Class commandClass, final ZclCommandDirection direction) { - this.clusterType = clusterType; - this.commandId = commandId; - this.commandClass = commandClass; - this.direction = direction; - } - - public int getClusterType() { - return clusterType; - } - - public int getId() { - return commandId; - } - - public boolean isGeneric() { - return clusterType==0xFFFF; - } - - public ZclCommandDirection getDirection() { - return direction; - } - - public Class getCommandClass() { - return commandClass; - } - - public static ZclCommandType getCommandType(final int clusterType, final int commandId, - - ZclCommandDirection direction) { - - for (final ZclCommandType value : values()) { - - if (value.direction == direction && value.clusterType == clusterType && value.commandId == commandId) { - - return value; - - } - - } - - return null; - - } - - public static ZclCommandType getGeneric(final int commandId) { - for (final ZclCommandType value : values()) { - if (value.clusterType == 0xFFFF && value.commandId == commandId) { - return value; - } - } - return null; - } - - public ZclCommand instantiateCommand() { - Constructor cmdConstructor; - try { - cmdConstructor = commandClass.getConstructor(); - return cmdConstructor.newInstance(); - } catch (Exception e) { - // logger.debug("Error instantiating cluster command {}", this); - } - return null; - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/protocol/ZclDataType.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/protocol/ZclDataType.java deleted file mode 100644 index fe23d1698..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/protocol/ZclDataType.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zcl.protocol; - -import java.util.Calendar; -import java.util.HashMap; -import java.util.Map; - -import javax.annotation.Generated; -import com.zsmartsystems.zigbee.zcl.field.*; -import com.zsmartsystems.zigbee.zcl.ZclStatus; -import com.zsmartsystems.zigbee.zdo.ZdoStatus; -import com.zsmartsystems.zigbee.zdo.field.*; -import com.zsmartsystems.zigbee.IeeeAddress; -import com.zsmartsystems.zigbee.ExtendedPanId; - -/** - * Enumeration of the ZCL data types - *

    - * Code is auto-generated. Modifications may be overwritten! - * - * @author Chris Jackson - */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:39:59Z") -public enum ZclDataType { - BITMAP_16_BIT("16-bit Bitmap", Integer.class, 0x19, false), - BITMAP_32_BIT("32-bit Bitmap", Integer.class, 0x1B, false), - BITMAP_8_BIT("Bitmap 8-bit", Integer.class, 0x18, false), - BOOLEAN("Boolean", Boolean.class, 0x10, false), - BYTE_ARRAY("Byte array", ByteArray.class, 0x00, false), - CHARACTER_STRING("Character String", String.class, 0x42, false), - DATA_8_BIT("8-bit data", Integer.class, 0x08, false), - ENUMERATION_16_BIT("16-bit enumeration", Integer.class, 0x31, false), - ENUMERATION_8_BIT("8-bit Enumeration", Integer.class, 0x30, false), - IEEE_ADDRESS("IEEE Address", IeeeAddress.class, 0xF0, false), - N_X_ATTRIBUTE_IDENTIFIER("N X Attribute identifier", Integer.class, 0x00, false), - N_X_ATTRIBUTE_INFORMATION("N X Attribute information", AttributeInformation.class, 0x00, false), - N_X_ATTRIBUTE_RECORD("N X Attribute record", AttributeRecord.class, 0x00, false), - N_X_ATTRIBUTE_REPORT("N X Attribute report", AttributeReport.class, 0x00, false), - N_X_ATTRIBUTE_REPORTING_CONFIGURATION_RECORD("N X Attribute reporting configuration record", AttributeReportingConfigurationRecord.class, 0x00, false), - N_X_ATTRIBUTE_SELECTOR("N X Attribute selector", Object.class, 0x00, false), - N_X_ATTRIBUTE_STATUS_RECORD("N X Attribute status record", AttributeStatusRecord.class, 0x00, false), - N_X_EXTENDED_ATTRIBUTE_INFORMATION("N x Extended Attribute Information", ExtendedAttributeInformation.class, 0x00, false), - N_X_EXTENSION_FIELD_SET("N X Extension field set", ExtensionFieldSet.class, 0x00, false), - N_X_NEIGHBORS_INFORMATION("N X Neighbors information", NeighborInformation.class, 0x00, false), - N_X_READ_ATTRIBUTE_STATUS_RECORD("N X Read attribute status record", ReadAttributeStatusRecord.class, 0x00, false), - N_X_UNSIGNED_16_BIT_INTEGER("N X Unsigned 16-bit integer", Integer.class, 0x00, false), - N_X_UNSIGNED_8_BIT_INTEGER("N x Unsigned 8-bit Integer", Integer.class, 0x00, false), - N_X_WRITE_ATTRIBUTE_RECORD("N X Write attribute record", WriteAttributeRecord.class, 0x00, false), - N_X_WRITE_ATTRIBUTE_STATUS_RECORD("N X Write attribute status record", WriteAttributeStatusRecord.class, 0x00, false), - OCTET_STRING("Octet string", ByteArray.class, 0x41, false), - SIGNED_16_BIT_INTEGER("Signed 16-bit Integer", Integer.class, 0x29, true), - SIGNED_32_BIT_INTEGER("Signed 32-bit Integer", Integer.class, 0x2B, true), - SIGNED_8_BIT_INTEGER("Signed 8-bit Integer", Integer.class, 0x28, true), - UNSIGNED_16_BIT_INTEGER("Unsigned 16-bit integer", Integer.class, 0x21, true), - UNSIGNED_24_BIT_INTEGER("Unsigned 24-bit integer", Integer.class, 0x22, true), - UNSIGNED_32_BIT_INTEGER("Unsigned 32-bit integer", Integer.class, 0x23, true), - UNSIGNED_48_BIT_INTEGER("Unsigned 48-bit integer", Long.class, 0x25, true), - UNSIGNED_8_BIT_INTEGER("Unsigned 8-bit integer", Integer.class, 0x20, true), - UTCTIME("UTCTime", Calendar.class, 0xE2, true), - X_UNSIGNED_8_BIT_INTEGER("X Unsigned 8-bit integer", Integer.class, 0x00, false), - ZCL_STATUS("Zcl Status", ZclStatus.class, 0x00, false), - EXTENDED_PANID("EXTENDED_PANID", ExtendedPanId.class, 0x00, false), - BINDING_TABLE("Binding Table", BindingTable.class, 0x00, false), - CLUSTERID("ClusterId", Integer.class, 0x00, false), - COMPLEX_DESCRIPTOR("Complex Descriptor", ComplexDescriptor.class, 0x00, false), - ENDPOINT("Endpoint", Integer.class, 0x00, false), - NEIGHBOR_TABLE("Neighbor Table", NeighborTable.class, 0x00, false), - NODE_DESCRIPTOR("Node Descriptor", NodeDescriptor.class, 0x00, false), - NWK_ADDRESS("NWK address", Integer.class, 0x00, false), - N_X_BINDING_TABLE("N x Binding Table", BindingTable.class, 0x00, false), - N_X_IEEE_ADDRESS("N X IEEE Address", Long.class, 0x00, false), - POWER_DESCRIPTOR("Power Descriptor", PowerDescriptor.class, 0x00, false), - ROUTING_TABLE("Routing Table", RoutingTable.class, 0x00, false), - SIMPLE_DESCRIPTOR("Simple Descriptor", SimpleDescriptor.class, 0x00, false), - USER_DESCRIPTOR("User Descriptor", UserDescriptor.class, 0x00, false), - ZDO_STATUS("Zdo Status", ZdoStatus.class, 0x00, false), - UNSIGNED_8_BIT_INTEGER_ARRAY("Unsigned 8 bit Integer Array", int[].class, 0x00, false), - ZIGBEE_DATA_TYPE("ZigBee Data Type", ZclDataType.class, 0x00, false); - - private final String label; - private final Class dataClass; - private final int id; - private final boolean analogue; - private static Map codeTypeMapping; - - static { - codeTypeMapping = new HashMap(); - for (ZclDataType s : values()) { - codeTypeMapping.put(s.id, s); - } - } - - ZclDataType(final String label, final Class dataClass, final int id, final boolean analogue) { - this.label = label; - this.dataClass = dataClass; - this.id = id; - this.analogue = analogue; - } - - public static ZclDataType getType(int id) { - return codeTypeMapping.get(id); - } - - public String getLabel() { - return label; - } - - public Class getDataClass() { - return dataClass; - } - - public int getId() { - return id; - } - - public boolean isAnalog() { - return analogue; - } -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ActiveEndpointStoreRequest.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ActiveEndpointStoreRequest.java deleted file mode 100644 index 6dcac4c1d..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ActiveEndpointStoreRequest.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zdo.ZdoRequest; -import javax.annotation.Generated; - -/** - * Active Endpoint Store Request value object class. - *

    - * The Active_EP_store_req is provided to enable ZigBee end devices on the - * network to request storage of their list of Active Endpoints on a Primary - * Discovery Cache device which has previously received a SUCCESS status from a - * Discovery_store_req to the same Primary Discovery Cache device. Included in - * this request is the count of Active Endpoints the Local Device wishes to cache and - * the endpoint list itself. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class ActiveEndpointStoreRequest extends ZdoRequest { - /** - * Default constructor. - */ - public ActiveEndpointStoreRequest() { - clusterId = 0x0019; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(29); - builder.append("ActiveEndpointStoreRequest ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ActiveEndpointStoreResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ActiveEndpointStoreResponse.java deleted file mode 100644 index 06fa8ea0e..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ActiveEndpointStoreResponse.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zdo.ZdoResponse; -import javax.annotation.Generated; - -/** - * Active Endpoint Store Response value object class. - *

    - * The Active_EP_store_rsp is provided to notify a Local Device of the request - * status from a Primary Discovery Cache device. Included in the response is a status - * code to notify the Local Device whether the request is successful (the Primary - * Cache Device has space to store the discovery cache data for the Local Device), - * the request is not supported (meaning the Remote Device is not a Primary - * Discovery Cache device), or insufficient space exists. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class ActiveEndpointStoreResponse extends ZdoResponse { - /** - * Default constructor. - */ - public ActiveEndpointStoreResponse() { - clusterId = 0x8019; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(30); - builder.append("ActiveEndpointStoreResponse ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ActiveEndpointsRequest.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ActiveEndpointsRequest.java deleted file mode 100644 index 16a6712e7..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ActiveEndpointsRequest.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoRequest; -import com.zsmartsystems.zigbee.ZigBeeCommand; -import com.zsmartsystems.zigbee.transaction.ZigBeeTransactionMatcher; -import com.zsmartsystems.zigbee.zdo.command.ActiveEndpointsResponse; -import javax.annotation.Generated; - -/** - * Active Endpoints Request value object class. - *

    - * The Active_EP_req command is generated from a local device wishing to acquire - * the list of endpoints on a remote device with simple descriptors. This command - * shall be unicast either to the remote device itself or to an alternative device that - * contains the discovery information of the remote device. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class ActiveEndpointsRequest extends ZdoRequest implements ZigBeeTransactionMatcher { - /** - * NWKAddrOfInterest command message field. - */ - private Integer nwkAddrOfInterest; - - /** - * Default constructor. - */ - public ActiveEndpointsRequest() { - clusterId = 0x0005; - } - - /** - * Gets NWKAddrOfInterest. - * - * @return the NWKAddrOfInterest - */ - public Integer getNwkAddrOfInterest() { - return nwkAddrOfInterest; - } - - /** - * Sets NWKAddrOfInterest. - * - * @param nwkAddrOfInterest the NWKAddrOfInterest - */ - public void setNwkAddrOfInterest(final Integer nwkAddrOfInterest) { - this.nwkAddrOfInterest = nwkAddrOfInterest; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(nwkAddrOfInterest, ZclDataType.NWK_ADDRESS); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - nwkAddrOfInterest = (Integer) deserializer.deserialize(ZclDataType.NWK_ADDRESS); - } - - @Override - public boolean isTransactionMatch(ZigBeeCommand request, ZigBeeCommand response) { - if (!(response instanceof ActiveEndpointsResponse)) { - return false; - } - - return (((ActiveEndpointsRequest) request).getNwkAddrOfInterest() - .equals(((ActiveEndpointsResponse) response).getNwkAddrOfInterest())); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(62); - builder.append("ActiveEndpointsRequest ["); - builder.append(super.toString()); - builder.append(", nwkAddrOfInterest="); - builder.append(nwkAddrOfInterest); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ActiveEndpointsResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ActiveEndpointsResponse.java deleted file mode 100644 index 858d2a231..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ActiveEndpointsResponse.java +++ /dev/null @@ -1,133 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoResponse; - -import java.util.List; -import java.util.ArrayList; -import javax.annotation.Generated; -import com.zsmartsystems.zigbee.zdo.ZdoStatus; - -/** - * Active Endpoints Response value object class. - *

    - * The Active_EP_rsp is generated by a remote device in response to an - * Active_EP_req directed to the remote device. This command shall be unicast to - * the originator of the Active_EP_req command. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class ActiveEndpointsResponse extends ZdoResponse { - /** - * NWKAddrOfInterest command message field. - */ - private Integer nwkAddrOfInterest; - - /** - * ActiveEPList command message field. - */ - private List activeEpList; - - /** - * Default constructor. - */ - public ActiveEndpointsResponse() { - clusterId = 0x8005; - } - - /** - * Gets NWKAddrOfInterest. - * - * @return the NWKAddrOfInterest - */ - public Integer getNwkAddrOfInterest() { - return nwkAddrOfInterest; - } - - /** - * Sets NWKAddrOfInterest. - * - * @param nwkAddrOfInterest the NWKAddrOfInterest - */ - public void setNwkAddrOfInterest(final Integer nwkAddrOfInterest) { - this.nwkAddrOfInterest = nwkAddrOfInterest; - } - - /** - * Gets ActiveEPList. - * - * @return the ActiveEPList - */ - public List getActiveEpList() { - return activeEpList; - } - - /** - * Sets ActiveEPList. - * - * @param activeEpList the ActiveEPList - */ - public void setActiveEpList(final List activeEpList) { - this.activeEpList = activeEpList; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(status, ZclDataType.ZDO_STATUS); - serializer.serialize(nwkAddrOfInterest, ZclDataType.NWK_ADDRESS); - serializer.serialize(activeEpList.size(), ZclDataType.UNSIGNED_8_BIT_INTEGER); - for (int cnt = 0; cnt < activeEpList.size(); cnt++) { - serializer.serialize(activeEpList.get(cnt), ZclDataType.ENDPOINT); - } - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - // Create lists - activeEpList = new ArrayList(); - - status = (ZdoStatus) deserializer.deserialize(ZclDataType.ZDO_STATUS); - if (status != ZdoStatus.SUCCESS) { - // Don't read the full response if we have an error - return; - } - nwkAddrOfInterest = (Integer) deserializer.deserialize(ZclDataType.NWK_ADDRESS); - Integer activeEpCnt = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - if (activeEpCnt != null) { - for (int cnt = 0; cnt < activeEpCnt; cnt++) { - activeEpList.add((Integer) deserializer.deserialize(ZclDataType.ENDPOINT)); - } - } - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(152); - builder.append("ActiveEndpointsResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(", nwkAddrOfInterest="); - builder.append(nwkAddrOfInterest); - builder.append(", activeEpList="); - builder.append(activeEpList); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/BackupBindTableRequest.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/BackupBindTableRequest.java deleted file mode 100644 index 46940c1f4..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/BackupBindTableRequest.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zdo.ZdoRequest; -import javax.annotation.Generated; - -/** - * Backup Bind Table Request value object class. - *

    - * The Backup_Bind_Table_req is generated from a local primary binding table - * cache and sent to the remote backup binding table cache device to request backup - * storage of its entire binding table. The destination addressing mode for this - * request is unicast. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class BackupBindTableRequest extends ZdoRequest { - /** - * Default constructor. - */ - public BackupBindTableRequest() { - clusterId = 0x0027; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(25); - builder.append("BackupBindTableRequest ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/BackupBindTableResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/BackupBindTableResponse.java deleted file mode 100644 index b3804b41b..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/BackupBindTableResponse.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoResponse; -import javax.annotation.Generated; -import com.zsmartsystems.zigbee.zdo.ZdoStatus; - -/** - * Backup Bind Table Response value object class. - *

    - * The Backup_Bind_Table_rsp is generated from a backup binding table cache - * device in response to a Backup_Bind_Table_req from a primary binding table - * cache and contains the status of the request. This command shall be unicast to the - * requesting device. If the remote device is not a backup binding table cache, it shall - * return a status of NOT_SUPPORTED. If the originator of the request is not - * recognized as a primary binding table cache, it shall return a status of - * INV_REQUESTTYPE. Otherwise, the backup binding table cache shall - * overwrite the binding entries in its binding table starting with StartIndex and - * continuing for BindingTableListCount entries. If this exceeds its table size, it shall - * fill in as many entries as possible and return a status of TABLE_FULL and the - * EntryCount parameter will be the number of entries in the table. Otherwise, it - * shall return a status of SUCCESS and EntryCount will be equal to StartIndex + - * BindingTableListCount from Backup_Bind_Table_req. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class BackupBindTableResponse extends ZdoResponse { - /** - * Default constructor. - */ - public BackupBindTableResponse() { - clusterId = 0x8027; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(status, ZclDataType.ZDO_STATUS); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - status = (ZdoStatus) deserializer.deserialize(ZclDataType.ZDO_STATUS); - if (status != ZdoStatus.SUCCESS) { - // Don't read the full response if we have an error - return; - } - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(52); - builder.append("BackupBindTableResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/BackupSourceBindRequest.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/BackupSourceBindRequest.java deleted file mode 100644 index 4b4f7d4ff..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/BackupSourceBindRequest.java +++ /dev/null @@ -1,168 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoRequest; - -import java.util.List; -import java.util.ArrayList; -import javax.annotation.Generated; - -/** - * Backup Source Bind Request value object class. - *

    - * The Backup_Source_Bind_req is generated from a local primary binding table - * cache and sent to a remote backup binding table cache device to request backup - * storage of its entire source table. The destination addressing mode for this request - * is unicast. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class BackupSourceBindRequest extends ZdoRequest { - /** - * SourceTableEntries command message field. - */ - private Integer sourceTableEntries; - - /** - * StartIndex command message field. - */ - private Integer startIndex; - - /** - * SourceTableListCount command message field. - */ - private Integer sourceTableListCount; - - /** - * SourceTableList command message field. - */ - private List sourceTableList; - - /** - * Default constructor. - */ - public BackupSourceBindRequest() { - clusterId = 0x0029; - } - - /** - * Gets SourceTableEntries. - * - * @return the SourceTableEntries - */ - public Integer getSourceTableEntries() { - return sourceTableEntries; - } - - /** - * Sets SourceTableEntries. - * - * @param sourceTableEntries the SourceTableEntries - */ - public void setSourceTableEntries(final Integer sourceTableEntries) { - this.sourceTableEntries = sourceTableEntries; - } - - /** - * Gets StartIndex. - * - * @return the StartIndex - */ - public Integer getStartIndex() { - return startIndex; - } - - /** - * Sets StartIndex. - * - * @param startIndex the StartIndex - */ - public void setStartIndex(final Integer startIndex) { - this.startIndex = startIndex; - } - - /** - * Gets SourceTableListCount. - * - * @return the SourceTableListCount - */ - public Integer getSourceTableListCount() { - return sourceTableListCount; - } - - /** - * Sets SourceTableListCount. - * - * @param sourceTableListCount the SourceTableListCount - */ - public void setSourceTableListCount(final Integer sourceTableListCount) { - this.sourceTableListCount = sourceTableListCount; - } - - /** - * Gets SourceTableList. - * - * @return the SourceTableList - */ - public List getSourceTableList() { - return sourceTableList; - } - - /** - * Sets SourceTableList. - * - * @param sourceTableList the SourceTableList - */ - public void setSourceTableList(final List sourceTableList) { - this.sourceTableList = sourceTableList; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(sourceTableEntries, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(startIndex, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(sourceTableListCount, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(sourceTableList, ZclDataType.N_X_IEEE_ADDRESS); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - sourceTableEntries = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - startIndex = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - sourceTableListCount = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - sourceTableList = (List) deserializer.deserialize(ZclDataType.N_X_IEEE_ADDRESS); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(169); - builder.append("BackupSourceBindRequest ["); - builder.append(super.toString()); - builder.append(", sourceTableEntries="); - builder.append(sourceTableEntries); - builder.append(", startIndex="); - builder.append(startIndex); - builder.append(", sourceTableListCount="); - builder.append(sourceTableListCount); - builder.append(", sourceTableList="); - builder.append(sourceTableList); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/BindRegister.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/BindRegister.java deleted file mode 100644 index 022112324..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/BindRegister.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zdo.ZdoResponse; -import javax.annotation.Generated; - -/** - * Bind Register value object class. - *

    - * The Bind_Register_req is generated from a Local Device and sent to a primary - * binding table cache device to register that the local device wishes to hold its own - * binding table entries. The destination addressing mode for this request is unicast. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class BindRegister extends ZdoResponse { - /** - * Default constructor. - */ - public BindRegister() { - clusterId = 0x0023; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(15); - builder.append("BindRegister ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/BindRegisterResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/BindRegisterResponse.java deleted file mode 100644 index 6a031afc3..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/BindRegisterResponse.java +++ /dev/null @@ -1,134 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoResponse; - -import java.util.List; -import java.util.ArrayList; -import javax.annotation.Generated; -import com.zsmartsystems.zigbee.zdo.ZdoStatus; -import com.zsmartsystems.zigbee.zdo.field.BindingTable; - -/** - * Bind Register Response value object class. - *

    - * The Bind_Register_rsp is generated from a primary binding table cache device in - * response to a Bind_Register_req and contains the status of the request. This - * command shall be unicast to the requesting device. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class BindRegisterResponse extends ZdoResponse { - /** - * BindingTableEntries command message field. - */ - private Integer bindingTableEntries; - - /** - * BindingTableList command message field. - */ - private List> bindingTableList; - - /** - * Default constructor. - */ - public BindRegisterResponse() { - clusterId = 0x8023; - } - - /** - * Gets BindingTableEntries. - * - * @return the BindingTableEntries - */ - public Integer getBindingTableEntries() { - return bindingTableEntries; - } - - /** - * Sets BindingTableEntries. - * - * @param bindingTableEntries the BindingTableEntries - */ - public void setBindingTableEntries(final Integer bindingTableEntries) { - this.bindingTableEntries = bindingTableEntries; - } - - /** - * Gets BindingTableList. - * - * @return the BindingTableList - */ - public List> getBindingTableList() { - return bindingTableList; - } - - /** - * Sets BindingTableList. - * - * @param bindingTableList the BindingTableList - */ - public void setBindingTableList(final List> bindingTableList) { - this.bindingTableList = bindingTableList; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(status, ZclDataType.ZDO_STATUS); - serializer.serialize(bindingTableEntries, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(bindingTableList.size(), ZclDataType.UNSIGNED_16_BIT_INTEGER); - for (int cnt = 0; cnt < bindingTableList.size(); cnt++) { - serializer.serialize(bindingTableList.get(cnt), ZclDataType.N_X_BINDING_TABLE); - } - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - // Create lists - bindingTableList = new ArrayList>(); - - status = (ZdoStatus) deserializer.deserialize(ZclDataType.ZDO_STATUS); - if (status != ZdoStatus.SUCCESS) { - // Don't read the full response if we have an error - return; - } - bindingTableEntries = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - Integer bindingTableListCount = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - if (bindingTableListCount != null) { - for (int cnt = 0; cnt < bindingTableListCount; cnt++) { - bindingTableList.add((List) deserializer.deserialize(ZclDataType.N_X_BINDING_TABLE)); - } - } - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(165); - builder.append("BindRegisterResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(", bindingTableEntries="); - builder.append(bindingTableEntries); - builder.append(", bindingTableList="); - builder.append(bindingTableList); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/BindRequest.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/BindRequest.java deleted file mode 100644 index 893e2681f..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/BindRequest.java +++ /dev/null @@ -1,293 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoRequest; -import com.zsmartsystems.zigbee.ZigBeeCommand; -import com.zsmartsystems.zigbee.transaction.ZigBeeTransactionMatcher; -import com.zsmartsystems.zigbee.zdo.command.BindResponse; -import javax.annotation.Generated; -import com.zsmartsystems.zigbee.IeeeAddress; -import com.zsmartsystems.zigbee.IeeeAddress; - -/** - * Bind Request value object class. - *

    - * The Bind_req is generated from a Local Device wishing to create a Binding Table - * entry for the source and destination addresses contained as parameters. The - * destination addressing on this command shall be unicast only, and the destination - * address shall be that of a Primary binding table cache or to the SrcAddress itself. - * The Binding Manager is optionally supported on the source device (unless that - * device is also the ZigBee Coordinator) so that device shall issue a - * NOT_SUPPORTED status to the Bind_req if not supported. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-23T21:55:42Z") -public class BindRequest extends ZdoRequest implements ZigBeeTransactionMatcher { - /** - * SrcAddress command message field. - *

    - * The IEEE address for the source. - */ - private IeeeAddress srcAddress; - - /** - * SrcEndpoint command message field. - *

    - * The source endpoint for the binding entry. - */ - private Integer srcEndpoint; - - /** - * BindCluster command message field. - *

    - * The identifier of the cluster on the source device that is bound to the destination. - */ - private Integer bindCluster; - - /** - * DstAddrMode command message field. - *

    - * The addressing mode for the destination address used in this command. This field - * can take one of the non-reserved values from the following list: - * 0x00 = reserved - * 0x01 = 16-bit group address for DstAddress and DstEndp not present - * 0x02 = reserved - * 0x03 = 64-bit extended address for DstAddress and DstEndp present - * 0x04 – 0xff = reserved - */ - private Integer dstAddrMode; - - /** - * DstAddress command message field. - *

    - * The destination address for the binding entry. - */ - private IeeeAddress dstAddress; - - /** - * DstEndpoint command message field. - *

    - * This field shall be present only if the DstAddrMode field has a value of 0x03 and, - * if present, shall be the destination endpoint for the binding entry. - */ - private Integer dstEndpoint; - - /** - * Default constructor. - */ - public BindRequest() { - clusterId = 0x0021; - } - - /** - * Gets SrcAddress. - *

    - * The IEEE address for the source. - * - * @return the SrcAddress - */ - public IeeeAddress getSrcAddress() { - return srcAddress; - } - - /** - * Sets SrcAddress. - *

    - * The IEEE address for the source. - * - * @param srcAddress the SrcAddress - */ - public void setSrcAddress(final IeeeAddress srcAddress) { - this.srcAddress = srcAddress; - } - - /** - * Gets SrcEndpoint. - *

    - * The source endpoint for the binding entry. - * - * @return the SrcEndpoint - */ - public Integer getSrcEndpoint() { - return srcEndpoint; - } - - /** - * Sets SrcEndpoint. - *

    - * The source endpoint for the binding entry. - * - * @param srcEndpoint the SrcEndpoint - */ - public void setSrcEndpoint(final Integer srcEndpoint) { - this.srcEndpoint = srcEndpoint; - } - - /** - * Gets BindCluster. - *

    - * The identifier of the cluster on the source device that is bound to the destination. - * - * @return the BindCluster - */ - public Integer getBindCluster() { - return bindCluster; - } - - /** - * Sets BindCluster. - *

    - * The identifier of the cluster on the source device that is bound to the destination. - * - * @param bindCluster the BindCluster - */ - public void setBindCluster(final Integer bindCluster) { - this.bindCluster = bindCluster; - } - - /** - * Gets DstAddrMode. - *

    - * The addressing mode for the destination address used in this command. This field - * can take one of the non-reserved values from the following list: - * 0x00 = reserved - * 0x01 = 16-bit group address for DstAddress and DstEndp not present - * 0x02 = reserved - * 0x03 = 64-bit extended address for DstAddress and DstEndp present - * 0x04 – 0xff = reserved - * - * @return the DstAddrMode - */ - public Integer getDstAddrMode() { - return dstAddrMode; - } - - /** - * Sets DstAddrMode. - *

    - * The addressing mode for the destination address used in this command. This field - * can take one of the non-reserved values from the following list: - * 0x00 = reserved - * 0x01 = 16-bit group address for DstAddress and DstEndp not present - * 0x02 = reserved - * 0x03 = 64-bit extended address for DstAddress and DstEndp present - * 0x04 – 0xff = reserved - * - * @param dstAddrMode the DstAddrMode - */ - public void setDstAddrMode(final Integer dstAddrMode) { - this.dstAddrMode = dstAddrMode; - } - - /** - * Gets DstAddress. - *

    - * The destination address for the binding entry. - * - * @return the DstAddress - */ - public IeeeAddress getDstAddress() { - return dstAddress; - } - - /** - * Sets DstAddress. - *

    - * The destination address for the binding entry. - * - * @param dstAddress the DstAddress - */ - public void setDstAddress(final IeeeAddress dstAddress) { - this.dstAddress = dstAddress; - } - - /** - * Gets DstEndpoint. - *

    - * This field shall be present only if the DstAddrMode field has a value of 0x03 and, - * if present, shall be the destination endpoint for the binding entry. - * - * @return the DstEndpoint - */ - public Integer getDstEndpoint() { - return dstEndpoint; - } - - /** - * Sets DstEndpoint. - *

    - * This field shall be present only if the DstAddrMode field has a value of 0x03 and, - * if present, shall be the destination endpoint for the binding entry. - * - * @param dstEndpoint the DstEndpoint - */ - public void setDstEndpoint(final Integer dstEndpoint) { - this.dstEndpoint = dstEndpoint; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(srcAddress, ZclDataType.IEEE_ADDRESS); - serializer.serialize(srcEndpoint, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(bindCluster, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(dstAddrMode, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(dstAddress, ZclDataType.IEEE_ADDRESS); - serializer.serialize(dstEndpoint, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - srcAddress = (IeeeAddress) deserializer.deserialize(ZclDataType.IEEE_ADDRESS); - srcEndpoint = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - bindCluster = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - dstAddrMode = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - dstAddress = (IeeeAddress) deserializer.deserialize(ZclDataType.IEEE_ADDRESS); - dstEndpoint = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public boolean isTransactionMatch(ZigBeeCommand request, ZigBeeCommand response) { - if (!(response instanceof BindResponse)) { - return false; - } - - return ((ZdoRequest) request).getDestinationAddress().equals(((BindResponse) response).getSourceAddress()); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(198); - builder.append("BindRequest ["); - builder.append(super.toString()); - builder.append(", srcAddress="); - builder.append(srcAddress); - builder.append(", srcEndpoint="); - builder.append(srcEndpoint); - builder.append(", bindCluster="); - builder.append(bindCluster); - builder.append(", dstAddrMode="); - builder.append(dstAddrMode); - builder.append(", dstAddress="); - builder.append(dstAddress); - builder.append(", dstEndpoint="); - builder.append(dstEndpoint); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/BindResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/BindResponse.java deleted file mode 100644 index 43195504e..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/BindResponse.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoResponse; -import javax.annotation.Generated; -import com.zsmartsystems.zigbee.zdo.ZdoStatus; - -/** - * Bind Response value object class. - *

    - * The Bind_rsp is generated in response to a Bind_req. If the Bind_req is processed - * and the Binding Table entry committed on the Remote Device, a Status of - * SUCCESS is returned. If the Remote Device is not a Primary binding table cache - * or the SrcAddress, a Status of NOT_SUPPORTED is returned. The supplied - * endpoint shall be checked to determine whether it falls within the specified range. - * If it does not, a Status of INVALID_EP shall be returned. If the Remote Device is - * the Primary binding table cache or SrcAddress but does not have Binding Table - * resources for the request, a Status of TABLE_FULL is returned. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class BindResponse extends ZdoResponse { - /** - * Default constructor. - */ - public BindResponse() { - clusterId = 0x8021; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(status, ZclDataType.ZDO_STATUS); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - status = (ZdoStatus) deserializer.deserialize(ZclDataType.ZDO_STATUS); - if (status != ZdoStatus.SUCCESS) { - // Don't read the full response if we have an error - return; - } - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(41); - builder.append("BindResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/CacheRequest.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/CacheRequest.java deleted file mode 100644 index 44acee5b6..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/CacheRequest.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zdo.ZdoRequest; -import javax.annotation.Generated; - -/** - * Cache Request value object class. - *

    - * The Mgmt_Cache_req is provided to enable ZigBee devices on the network to - * retrieve a list of ZigBee End Devices registered with a Primary Discovery Cache - * device. The destination addressing on this primitive shall be unicast. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class CacheRequest extends ZdoRequest { - /** - * Default constructor. - */ - public CacheRequest() { - clusterId = 0x0037; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(15); - builder.append("CacheRequest ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ComplexDescriptorRequest.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ComplexDescriptorRequest.java deleted file mode 100644 index 6bafb8fe0..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ComplexDescriptorRequest.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoRequest; -import com.zsmartsystems.zigbee.ZigBeeCommand; -import com.zsmartsystems.zigbee.transaction.ZigBeeTransactionMatcher; -import com.zsmartsystems.zigbee.zdo.command.ComplexDescriptorResponse; -import javax.annotation.Generated; - -/** - * Complex Descriptor Request value object class. - *

    - * The Complex_Desc_req command is generated from a local device wishing to - * inquire as to the complex descriptor of a remote device. This command shall be - * unicast either to the remote device itself or to an alternative device that contains - * the discovery information of the remote device. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class ComplexDescriptorRequest extends ZdoRequest implements ZigBeeTransactionMatcher { - /** - * NWKAddrOfInterest command message field. - */ - private Integer nwkAddrOfInterest; - - /** - * Default constructor. - */ - public ComplexDescriptorRequest() { - clusterId = 0x0010; - } - - /** - * Gets NWKAddrOfInterest. - * - * @return the NWKAddrOfInterest - */ - public Integer getNwkAddrOfInterest() { - return nwkAddrOfInterest; - } - - /** - * Sets NWKAddrOfInterest. - * - * @param nwkAddrOfInterest the NWKAddrOfInterest - */ - public void setNwkAddrOfInterest(final Integer nwkAddrOfInterest) { - this.nwkAddrOfInterest = nwkAddrOfInterest; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(nwkAddrOfInterest, ZclDataType.NWK_ADDRESS); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - nwkAddrOfInterest = (Integer) deserializer.deserialize(ZclDataType.NWK_ADDRESS); - } - - @Override - public boolean isTransactionMatch(ZigBeeCommand request, ZigBeeCommand response) { - if (!(response instanceof ComplexDescriptorResponse)) { - return false; - } - - return (((ComplexDescriptorRequest) request).getNwkAddrOfInterest() - .equals(((ComplexDescriptorResponse) response).getNwkAddrOfInterest())); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(64); - builder.append("ComplexDescriptorRequest ["); - builder.append(super.toString()); - builder.append(", nwkAddrOfInterest="); - builder.append(nwkAddrOfInterest); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ComplexDescriptorResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ComplexDescriptorResponse.java deleted file mode 100644 index a51d35491..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ComplexDescriptorResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoResponse; -import javax.annotation.Generated; -import com.zsmartsystems.zigbee.zdo.ZdoStatus; -import com.zsmartsystems.zigbee.zdo.field.ComplexDescriptor; - -/** - * Complex Descriptor Response value object class. - *

    - * The Complex_Desc_rsp is generated by a remote device in response to a - * Complex_Desc_req directed to the remote device. This command shall be unicast - * to the originator of the Complex_Desc_req command. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class ComplexDescriptorResponse extends ZdoResponse { - /** - * NWKAddrOfInterest command message field. - */ - private Integer nwkAddrOfInterest; - - /** - * Length command message field. - */ - private Integer length; - - /** - * ComplexDescriptor command message field. - */ - private ComplexDescriptor complexDescriptor; - - /** - * Default constructor. - */ - public ComplexDescriptorResponse() { - clusterId = 0x8010; - } - - /** - * Gets NWKAddrOfInterest. - * - * @return the NWKAddrOfInterest - */ - public Integer getNwkAddrOfInterest() { - return nwkAddrOfInterest; - } - - /** - * Sets NWKAddrOfInterest. - * - * @param nwkAddrOfInterest the NWKAddrOfInterest - */ - public void setNwkAddrOfInterest(final Integer nwkAddrOfInterest) { - this.nwkAddrOfInterest = nwkAddrOfInterest; - } - - /** - * Gets Length. - * - * @return the Length - */ - public Integer getLength() { - return length; - } - - /** - * Sets Length. - * - * @param length the Length - */ - public void setLength(final Integer length) { - this.length = length; - } - - /** - * Gets ComplexDescriptor. - * - * @return the ComplexDescriptor - */ - public ComplexDescriptor getComplexDescriptor() { - return complexDescriptor; - } - - /** - * Sets ComplexDescriptor. - * - * @param complexDescriptor the ComplexDescriptor - */ - public void setComplexDescriptor(final ComplexDescriptor complexDescriptor) { - this.complexDescriptor = complexDescriptor; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(status, ZclDataType.ZDO_STATUS); - serializer.serialize(nwkAddrOfInterest, ZclDataType.NWK_ADDRESS); - serializer.serialize(length, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(complexDescriptor, ZclDataType.COMPLEX_DESCRIPTOR); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - status = (ZdoStatus) deserializer.deserialize(ZclDataType.ZDO_STATUS); - if (status != ZdoStatus.SUCCESS) { - // Don't read the full response if we have an error - return; - } - nwkAddrOfInterest = (Integer) deserializer.deserialize(ZclDataType.NWK_ADDRESS); - length = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - complexDescriptor = (ComplexDescriptor) deserializer.deserialize(ZclDataType.COMPLEX_DESCRIPTOR); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(154); - builder.append("ComplexDescriptorResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(", nwkAddrOfInterest="); - builder.append(nwkAddrOfInterest); - builder.append(", length="); - builder.append(length); - builder.append(", complexDescriptor="); - builder.append(complexDescriptor); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/DeviceAnnounce.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/DeviceAnnounce.java deleted file mode 100644 index a205a6c64..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/DeviceAnnounce.java +++ /dev/null @@ -1,143 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoResponse; -import javax.annotation.Generated; -import com.zsmartsystems.zigbee.IeeeAddress; - -/** - * Device Announce value object class. - *

    - * The Device_annce is provided to enable ZigBee devices on the network to notify - * other ZigBee devices that the device has joined or re-joined the network, - * identifying the device's 64-bit IEEE address and new 16-bit NWK address, and - * informing the Remote Devices of the capability of the ZigBee device. This - * command shall be invoked for all ZigBee end devices upon join or rejoin. This - * command may also be invoked by ZigBee routers upon join or rejoin as part of - * NWK address conflict resolution. The destination addressing on this primitive is - * broadcast to all devices for which macRxOnWhenIdle = TRUE. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class DeviceAnnounce extends ZdoResponse { - /** - * NWKAddrOfInterest command message field. - */ - private Integer nwkAddrOfInterest; - - /** - * IEEEAddr command message field. - */ - private IeeeAddress ieeeAddr; - - /** - * Capability command message field. - */ - private Integer capability; - - /** - * Default constructor. - */ - public DeviceAnnounce() { - clusterId = 0x0013; - } - - /** - * Gets NWKAddrOfInterest. - * - * @return the NWKAddrOfInterest - */ - public Integer getNwkAddrOfInterest() { - return nwkAddrOfInterest; - } - - /** - * Sets NWKAddrOfInterest. - * - * @param nwkAddrOfInterest the NWKAddrOfInterest - */ - public void setNwkAddrOfInterest(final Integer nwkAddrOfInterest) { - this.nwkAddrOfInterest = nwkAddrOfInterest; - } - - /** - * Gets IEEEAddr. - * - * @return the IEEEAddr - */ - public IeeeAddress getIeeeAddr() { - return ieeeAddr; - } - - /** - * Sets IEEEAddr. - * - * @param ieeeAddr the IEEEAddr - */ - public void setIeeeAddr(final IeeeAddress ieeeAddr) { - this.ieeeAddr = ieeeAddr; - } - - /** - * Gets Capability. - * - * @return the Capability - */ - public Integer getCapability() { - return capability; - } - - /** - * Sets Capability. - * - * @param capability the Capability - */ - public void setCapability(final Integer capability) { - this.capability = capability; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(nwkAddrOfInterest, ZclDataType.NWK_ADDRESS); - serializer.serialize(ieeeAddr, ZclDataType.IEEE_ADDRESS); - serializer.serialize(capability, ZclDataType.BITMAP_8_BIT); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - nwkAddrOfInterest = (Integer) deserializer.deserialize(ZclDataType.NWK_ADDRESS); - ieeeAddr = (IeeeAddress) deserializer.deserialize(ZclDataType.IEEE_ADDRESS); - capability = (Integer) deserializer.deserialize(ZclDataType.BITMAP_8_BIT); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(112); - builder.append("DeviceAnnounce ["); - builder.append(super.toString()); - builder.append(", nwkAddrOfInterest="); - builder.append(nwkAddrOfInterest); - builder.append(", ieeeAddr="); - builder.append(ieeeAddr); - builder.append(", capability="); - builder.append(capability); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/DiscoveryCacheRequest.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/DiscoveryCacheRequest.java deleted file mode 100644 index b233e7ad0..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/DiscoveryCacheRequest.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zdo.ZdoRequest; -import javax.annotation.Generated; - -/** - * Discovery Cache Request value object class. - *

    - * The Discovery_Cache_req is provided to enable devices on the network to locate - * a Primary Discovery Cache device on the network. The destination addressing on - * this primitive shall be broadcast to all devices for which macRxOnWhenIdle = - * TRUE. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class DiscoveryCacheRequest extends ZdoRequest { - /** - * Default constructor. - */ - public DiscoveryCacheRequest() { - clusterId = 0x0012; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(24); - builder.append("DiscoveryCacheRequest ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/DiscoveryCacheResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/DiscoveryCacheResponse.java deleted file mode 100644 index 7ceb0aca1..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/DiscoveryCacheResponse.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zdo.ZdoResponse; -import javax.annotation.Generated; - -/** - * Discovery Cache Response value object class. - *

    - * The Discovery_Cache_rsp is generated by Primary Discovery Cache devices - * receiving the Discovery_Cache_req. Remote Devices which are not Primary - * Discovery Cache devices (as designated in its Node Descriptor) should not - * respond to the Discovery_Cache_req command. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class DiscoveryCacheResponse extends ZdoResponse { - /** - * Default constructor. - */ - public DiscoveryCacheResponse() { - clusterId = 0x8012; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(25); - builder.append("DiscoveryCacheResponse ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/DiscoveryStoreRequestRequest.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/DiscoveryStoreRequestRequest.java deleted file mode 100644 index 8f80ba0aa..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/DiscoveryStoreRequestRequest.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zdo.ZdoRequest; -import javax.annotation.Generated; - -/** - * Discovery Store Request Request value object class. - *

    - * The Discovery_store_req is provided to enable ZigBee end devices on the - * network to request storage of their discovery cache information on a Primary - * Discovery Cache device. Included in the request is the amount of storage space - * the Local Device requires. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class DiscoveryStoreRequestRequest extends ZdoRequest { - /** - * Default constructor. - */ - public DiscoveryStoreRequestRequest() { - clusterId = 0x0016; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(31); - builder.append("DiscoveryStoreRequestRequest ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/DiscoveryStoreResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/DiscoveryStoreResponse.java deleted file mode 100644 index 9b0677cc2..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/DiscoveryStoreResponse.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zdo.ZdoResponse; -import javax.annotation.Generated; - -/** - * Discovery Store Response value object class. - *

    - * The Discovery_store_rsp is provided to notify a Local Device of the request status - * from a Primary Discovery Cache device. Included in the response is a status code - * to notify the Local Device whether the request is successful (the Primary Cache - * Device has space to store the discovery cache data for the Local Device), whether - * the request is unsupported (meaning the Remote Device is not a Primary - * Discovery Cache device), or insufficient space exists. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class DiscoveryStoreResponse extends ZdoResponse { - /** - * Default constructor. - */ - public DiscoveryStoreResponse() { - clusterId = 0x8016; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(25); - builder.append("DiscoveryStoreResponse ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/EndDeviceBindRequest.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/EndDeviceBindRequest.java deleted file mode 100644 index 88da33069..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/EndDeviceBindRequest.java +++ /dev/null @@ -1,244 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoRequest; - -import java.util.List; -import java.util.ArrayList; -import javax.annotation.Generated; -import com.zsmartsystems.zigbee.IeeeAddress; - -/** - * End Device Bind Request value object class. - *

    - * The End_Device_Bind_req is generated from a Local Device wishing to perform - * End Device Bind with a Remote Device. The End_Device_Bind_req is generated, - * typically based on some user action like a button press. The destination addressing - * on this command shall be unicast, and the destination address shall be that of the - * ZigBee Coordinator. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class EndDeviceBindRequest extends ZdoRequest { - /** - * BindingTarget command message field. - */ - private Integer bindingTarget; - - /** - * SrcAddress command message field. - */ - private IeeeAddress srcAddress; - - /** - * SrcEndpoint command message field. - */ - private Integer srcEndpoint; - - /** - * ProfileID command message field. - */ - private Integer profileId; - - /** - * InClusterList command message field. - */ - private List inClusterList; - - /** - * OutClusterList command message field. - */ - private List outClusterList; - - /** - * Default constructor. - */ - public EndDeviceBindRequest() { - clusterId = 0x0020; - } - - /** - * Gets BindingTarget. - * - * @return the BindingTarget - */ - public Integer getBindingTarget() { - return bindingTarget; - } - - /** - * Sets BindingTarget. - * - * @param bindingTarget the BindingTarget - */ - public void setBindingTarget(final Integer bindingTarget) { - this.bindingTarget = bindingTarget; - } - - /** - * Gets SrcAddress. - * - * @return the SrcAddress - */ - public IeeeAddress getSrcAddress() { - return srcAddress; - } - - /** - * Sets SrcAddress. - * - * @param srcAddress the SrcAddress - */ - public void setSrcAddress(final IeeeAddress srcAddress) { - this.srcAddress = srcAddress; - } - - /** - * Gets SrcEndpoint. - * - * @return the SrcEndpoint - */ - public Integer getSrcEndpoint() { - return srcEndpoint; - } - - /** - * Sets SrcEndpoint. - * - * @param srcEndpoint the SrcEndpoint - */ - public void setSrcEndpoint(final Integer srcEndpoint) { - this.srcEndpoint = srcEndpoint; - } - - /** - * Gets ProfileID. - * - * @return the ProfileID - */ - public Integer getProfileId() { - return profileId; - } - - /** - * Sets ProfileID. - * - * @param profileId the ProfileID - */ - public void setProfileId(final Integer profileId) { - this.profileId = profileId; - } - - /** - * Gets InClusterList. - * - * @return the InClusterList - */ - public List getInClusterList() { - return inClusterList; - } - - /** - * Sets InClusterList. - * - * @param inClusterList the InClusterList - */ - public void setInClusterList(final List inClusterList) { - this.inClusterList = inClusterList; - } - - /** - * Gets OutClusterList. - * - * @return the OutClusterList - */ - public List getOutClusterList() { - return outClusterList; - } - - /** - * Sets OutClusterList. - * - * @param outClusterList the OutClusterList - */ - public void setOutClusterList(final List outClusterList) { - this.outClusterList = outClusterList; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(bindingTarget, ZclDataType.NWK_ADDRESS); - serializer.serialize(srcAddress, ZclDataType.IEEE_ADDRESS); - serializer.serialize(srcEndpoint, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(profileId, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(inClusterList.size(), ZclDataType.UNSIGNED_8_BIT_INTEGER); - for (int cnt = 0; cnt < inClusterList.size(); cnt++) { - serializer.serialize(inClusterList.get(cnt), ZclDataType.CLUSTERID); - } - serializer.serialize(outClusterList.size(), ZclDataType.UNSIGNED_8_BIT_INTEGER); - for (int cnt = 0; cnt < outClusterList.size(); cnt++) { - serializer.serialize(outClusterList.get(cnt), ZclDataType.CLUSTERID); - } - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - // Create lists - inClusterList = new ArrayList(); - outClusterList = new ArrayList(); - - bindingTarget = (Integer) deserializer.deserialize(ZclDataType.NWK_ADDRESS); - srcAddress = (IeeeAddress) deserializer.deserialize(ZclDataType.IEEE_ADDRESS); - srcEndpoint = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - profileId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - Integer inClusterCount = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - if (inClusterCount != null) { - for (int cnt = 0; cnt < inClusterCount; cnt++) { - inClusterList.add((Integer) deserializer.deserialize(ZclDataType.CLUSTERID)); - } - } - Integer outClusterCount = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - if (outClusterCount != null) { - for (int cnt = 0; cnt < outClusterCount; cnt++) { - outClusterList.add((Integer) deserializer.deserialize(ZclDataType.CLUSTERID)); - } - } - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(282); - builder.append("EndDeviceBindRequest ["); - builder.append(super.toString()); - builder.append(", bindingTarget="); - builder.append(bindingTarget); - builder.append(", srcAddress="); - builder.append(srcAddress); - builder.append(", srcEndpoint="); - builder.append(srcEndpoint); - builder.append(", profileId="); - builder.append(profileId); - builder.append(", inClusterList="); - builder.append(inClusterList); - builder.append(", outClusterList="); - builder.append(outClusterList); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/EndDeviceBindResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/EndDeviceBindResponse.java deleted file mode 100644 index 5c182c80d..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/EndDeviceBindResponse.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoResponse; -import javax.annotation.Generated; -import com.zsmartsystems.zigbee.zdo.ZdoStatus; - -/** - * End Device Bind Response value object class. - *

    - * The End_Device_Bind_rsp is generated by the ZigBee Coordinator in response to - * an End_Device_Bind_req and contains the status of the request. This command - * shall be unicast to each device involved in the bind attempt, using the - * acknowledged data service. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class EndDeviceBindResponse extends ZdoResponse { - /** - * Default constructor. - */ - public EndDeviceBindResponse() { - clusterId = 0x8020; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(status, ZclDataType.ZDO_STATUS); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - status = (ZdoStatus) deserializer.deserialize(ZclDataType.ZDO_STATUS); - if (status != ZdoStatus.SUCCESS) { - // Don't read the full response if we have an error - return; - } - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(50); - builder.append("EndDeviceBindResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ExtendedActiveEndpointRequest.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ExtendedActiveEndpointRequest.java deleted file mode 100644 index bc6049895..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ExtendedActiveEndpointRequest.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zdo.ZdoRequest; -import javax.annotation.Generated; - -/** - * Extended Active Endpoint Request value object class. - *

    - * The Extended_Active_EP_req command is generated from a local device wishing - * to acquire the list of endpoints on a remote device with simple descriptors. This - * command shall be unicast either to the remote device itself or to an alternative - * device that contains the discovery information of the remote device. The - * Extended_Active_EP_req is used for devices which support more active - * endpoints than can be returned by a single Active_EP_req. - *
    - * The NWKAddrOfInterest field shall contain the network address of the remote device for - * which the active endpoint list is required. The StartIndex field shall be set in the - * request to enable retrieval of lists of active endpoints from devices whose list exceeds - * the size of a single ASDU and where fragmentation is not supported. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class ExtendedActiveEndpointRequest extends ZdoRequest { - /** - * Default constructor. - */ - public ExtendedActiveEndpointRequest() { - clusterId = 0x001E; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(32); - builder.append("ExtendedActiveEndpointRequest ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ExtendedActiveEndpointResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ExtendedActiveEndpointResponse.java deleted file mode 100644 index ce6881ac8..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ExtendedActiveEndpointResponse.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zdo.ZdoResponse; -import javax.annotation.Generated; - -/** - * Extended Active Endpoint Response value object class. - *

    - * The Extended_Active_EP_rsp is generated by a remote device in response to an - * Extended_Active_EP_req directed to the remote device. This command shall be - * unicast to the originator of the Extended_Active_EP_req command. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class ExtendedActiveEndpointResponse extends ZdoResponse { - /** - * Default constructor. - */ - public ExtendedActiveEndpointResponse() { - clusterId = 0x801E; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(33); - builder.append("ExtendedActiveEndpointResponse ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ExtendedSimpleDescriptorRequest.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ExtendedSimpleDescriptorRequest.java deleted file mode 100644 index c42b45a69..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ExtendedSimpleDescriptorRequest.java +++ /dev/null @@ -1,141 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoRequest; -import javax.annotation.Generated; - -/** - * Extended Simple Descriptor Request value object class. - *

    - * The Extended_Simple_Desc_req command is generated from a local device - * wishing to inquire as to the simple descriptor of a remote device on a specified - * endpoint. This command shall be unicast either to the remote device itself or to an - * alternative device that contains the discovery information of the remote device. - * The Extended_Simple_Desc_req is intended for use with devices which employ a - * larger number of application input or output clusters than can be described by the - * Simple_Desc_req. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class ExtendedSimpleDescriptorRequest extends ZdoRequest { - /** - * NWKAddrOfInterest command message field. - */ - private Integer nwkAddrOfInterest; - - /** - * Endpoint command message field. - */ - private Integer endpoint; - - /** - * StartIndex command message field. - */ - private Integer startIndex; - - /** - * Default constructor. - */ - public ExtendedSimpleDescriptorRequest() { - clusterId = 0x001D; - } - - /** - * Gets NWKAddrOfInterest. - * - * @return the NWKAddrOfInterest - */ - public Integer getNwkAddrOfInterest() { - return nwkAddrOfInterest; - } - - /** - * Sets NWKAddrOfInterest. - * - * @param nwkAddrOfInterest the NWKAddrOfInterest - */ - public void setNwkAddrOfInterest(final Integer nwkAddrOfInterest) { - this.nwkAddrOfInterest = nwkAddrOfInterest; - } - - /** - * Gets Endpoint. - * - * @return the Endpoint - */ - public Integer getEndpoint() { - return endpoint; - } - - /** - * Sets Endpoint. - * - * @param endpoint the Endpoint - */ - public void setEndpoint(final Integer endpoint) { - this.endpoint = endpoint; - } - - /** - * Gets StartIndex. - * - * @return the StartIndex - */ - public Integer getStartIndex() { - return startIndex; - } - - /** - * Sets StartIndex. - * - * @param startIndex the StartIndex - */ - public void setStartIndex(final Integer startIndex) { - this.startIndex = startIndex; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(nwkAddrOfInterest, ZclDataType.NWK_ADDRESS); - serializer.serialize(endpoint, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(startIndex, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - nwkAddrOfInterest = (Integer) deserializer.deserialize(ZclDataType.NWK_ADDRESS); - endpoint = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - startIndex = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(129); - builder.append("ExtendedSimpleDescriptorRequest ["); - builder.append(super.toString()); - builder.append(", nwkAddrOfInterest="); - builder.append(nwkAddrOfInterest); - builder.append(", endpoint="); - builder.append(endpoint); - builder.append(", startIndex="); - builder.append(startIndex); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ExtendedSimpleDescriptorResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ExtendedSimpleDescriptorResponse.java deleted file mode 100644 index 9622a4408..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ExtendedSimpleDescriptorResponse.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zdo.ZdoResponse; -import javax.annotation.Generated; - -/** - * Extended Simple Descriptor Response value object class. - *

    - * The Extended_Simple_Desc_rsp is generated by a remote device in response to an - * Extended_Simple_Desc_req directed to the remote device. This command shall - * be unicast to the originator of the Extended_Simple_Desc_req command. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class ExtendedSimpleDescriptorResponse extends ZdoResponse { - /** - * Default constructor. - */ - public ExtendedSimpleDescriptorResponse() { - clusterId = 0x801D; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(35); - builder.append("ExtendedSimpleDescriptorResponse ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/FindNodeCacheRequest.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/FindNodeCacheRequest.java deleted file mode 100644 index ff21fe64d..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/FindNodeCacheRequest.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zdo.ZdoRequest; -import javax.annotation.Generated; - -/** - * Find Node Cache Request value object class. - *

    - * The Find_node_cache_req is provided to enable ZigBee devices on the network to - * broadcast to all devices for which macRxOnWhenIdle = TRUE a request to find a - * device on the network that holds discovery information for the device of interest, - * as specified in the request parameters. The effect of a successful - * Find_node_cache_req is to have the Primary Discovery Cache device, holding - * discovery information for the device of interest, unicast a Find_node_cache_rsp - * back to the Local Device. Note that, like the NWK_addr_req, only the device - * meeting this criteria shall respond to the request generated by - * Find_node_cache_req. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class FindNodeCacheRequest extends ZdoRequest { - /** - * Default constructor. - */ - public FindNodeCacheRequest() { - clusterId = 0x001C; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(23); - builder.append("FindNodeCacheRequest ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/FindNodeCacheResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/FindNodeCacheResponse.java deleted file mode 100644 index 7a666f4ce..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/FindNodeCacheResponse.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zdo.ZdoResponse; -import javax.annotation.Generated; - -/** - * Find Node Cache Response value object class. - *

    - * The Find_node_cache_rsp is provided to notify a Local Device of the successful - * discovery of the Primary Discovery Cache device for the given NWKAddr and - * IEEEAddr fields supplied in the request, or to signify that the device of interest is - * capable of responding to discovery requests. The Find_node_cache_rsp shall be - * generated only by Primary Discovery Cache devices holding discovery - * information for the NWKAddr and IEEEAddr in the request or the device of - * interest itself and all other Remote Devices shall not supply a response. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class FindNodeCacheResponse extends ZdoResponse { - /** - * Default constructor. - */ - public FindNodeCacheResponse() { - clusterId = 0x801C; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(24); - builder.append("FindNodeCacheResponse ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/IeeeAddressRequest.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/IeeeAddressRequest.java deleted file mode 100644 index 09579b734..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/IeeeAddressRequest.java +++ /dev/null @@ -1,150 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoRequest; -import com.zsmartsystems.zigbee.ZigBeeCommand; -import com.zsmartsystems.zigbee.transaction.ZigBeeTransactionMatcher; -import com.zsmartsystems.zigbee.zdo.command.IeeeAddressResponse; -import javax.annotation.Generated; - -/** - * IEEE Address Request value object class. - *

    - * The IEEE_addr_req is generated from a Local Device wishing to inquire as to the - * 64-bit IEEE address of the Remote Device based on their known 16-bit address. - * The destination addressing on this command shall be unicast. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class IeeeAddressRequest extends ZdoRequest implements ZigBeeTransactionMatcher { - /** - * NWKAddrOfInterest command message field. - */ - private Integer nwkAddrOfInterest; - - /** - * RequestType command message field. - */ - private Integer requestType; - - /** - * StartIndex command message field. - */ - private Integer startIndex; - - /** - * Default constructor. - */ - public IeeeAddressRequest() { - clusterId = 0x0001; - } - - /** - * Gets NWKAddrOfInterest. - * - * @return the NWKAddrOfInterest - */ - public Integer getNwkAddrOfInterest() { - return nwkAddrOfInterest; - } - - /** - * Sets NWKAddrOfInterest. - * - * @param nwkAddrOfInterest the NWKAddrOfInterest - */ - public void setNwkAddrOfInterest(final Integer nwkAddrOfInterest) { - this.nwkAddrOfInterest = nwkAddrOfInterest; - } - - /** - * Gets RequestType. - * - * @return the RequestType - */ - public Integer getRequestType() { - return requestType; - } - - /** - * Sets RequestType. - * - * @param requestType the RequestType - */ - public void setRequestType(final Integer requestType) { - this.requestType = requestType; - } - - /** - * Gets StartIndex. - * - * @return the StartIndex - */ - public Integer getStartIndex() { - return startIndex; - } - - /** - * Sets StartIndex. - * - * @param startIndex the StartIndex - */ - public void setStartIndex(final Integer startIndex) { - this.startIndex = startIndex; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(nwkAddrOfInterest, ZclDataType.NWK_ADDRESS); - serializer.serialize(requestType, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(startIndex, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - nwkAddrOfInterest = (Integer) deserializer.deserialize(ZclDataType.NWK_ADDRESS); - requestType = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - startIndex = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public boolean isTransactionMatch(ZigBeeCommand request, ZigBeeCommand response) { - if (!(response instanceof IeeeAddressResponse)) { - return false; - } - - return (((IeeeAddressRequest) request).getNwkAddrOfInterest() - .equals(((IeeeAddressResponse) response).getNwkAddrRemoteDev())); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(119); - builder.append("IeeeAddressRequest ["); - builder.append(super.toString()); - builder.append(", nwkAddrOfInterest="); - builder.append(nwkAddrOfInterest); - builder.append(", requestType="); - builder.append(requestType); - builder.append(", startIndex="); - builder.append(startIndex); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/IeeeAddressResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/IeeeAddressResponse.java deleted file mode 100644 index 204246f27..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/IeeeAddressResponse.java +++ /dev/null @@ -1,192 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoResponse; - -import java.util.List; -import java.util.ArrayList; -import javax.annotation.Generated; -import com.zsmartsystems.zigbee.zdo.ZdoStatus; -import com.zsmartsystems.zigbee.IeeeAddress; - -/** - * IEEE Address Response value object class. - *

    - * The IEEE_addr_rsp is generated by a Remote Device in response to an - * IEEE_addr_req command inquiring as to the 64-bit IEEE address of the Remote - * Device or the 64-bit IEEE address of an address held in a local discovery cache. - * The destination addressing on this command shall be unicast. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class IeeeAddressResponse extends ZdoResponse { - /** - * IEEEAddrRemoteDev command message field. - */ - private IeeeAddress ieeeAddrRemoteDev; - - /** - * NWKAddrRemoteDev command message field. - */ - private Integer nwkAddrRemoteDev; - - /** - * StartIndex command message field. - */ - private Integer startIndex; - - /** - * NWKAddrAssocDevList command message field. - */ - private List nwkAddrAssocDevList; - - /** - * Default constructor. - */ - public IeeeAddressResponse() { - clusterId = 0x8001; - } - - /** - * Gets IEEEAddrRemoteDev. - * - * @return the IEEEAddrRemoteDev - */ - public IeeeAddress getIeeeAddrRemoteDev() { - return ieeeAddrRemoteDev; - } - - /** - * Sets IEEEAddrRemoteDev. - * - * @param ieeeAddrRemoteDev the IEEEAddrRemoteDev - */ - public void setIeeeAddrRemoteDev(final IeeeAddress ieeeAddrRemoteDev) { - this.ieeeAddrRemoteDev = ieeeAddrRemoteDev; - } - - /** - * Gets NWKAddrRemoteDev. - * - * @return the NWKAddrRemoteDev - */ - public Integer getNwkAddrRemoteDev() { - return nwkAddrRemoteDev; - } - - /** - * Sets NWKAddrRemoteDev. - * - * @param nwkAddrRemoteDev the NWKAddrRemoteDev - */ - public void setNwkAddrRemoteDev(final Integer nwkAddrRemoteDev) { - this.nwkAddrRemoteDev = nwkAddrRemoteDev; - } - - /** - * Gets StartIndex. - * - * @return the StartIndex - */ - public Integer getStartIndex() { - return startIndex; - } - - /** - * Sets StartIndex. - * - * @param startIndex the StartIndex - */ - public void setStartIndex(final Integer startIndex) { - this.startIndex = startIndex; - } - - /** - * Gets NWKAddrAssocDevList. - * - * @return the NWKAddrAssocDevList - */ - public List getNwkAddrAssocDevList() { - return nwkAddrAssocDevList; - } - - /** - * Sets NWKAddrAssocDevList. - * - * @param nwkAddrAssocDevList the NWKAddrAssocDevList - */ - public void setNwkAddrAssocDevList(final List nwkAddrAssocDevList) { - this.nwkAddrAssocDevList = nwkAddrAssocDevList; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(status, ZclDataType.ZDO_STATUS); - serializer.serialize(ieeeAddrRemoteDev, ZclDataType.IEEE_ADDRESS); - serializer.serialize(nwkAddrRemoteDev, ZclDataType.NWK_ADDRESS); - serializer.serialize(nwkAddrAssocDevList.size(), ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(startIndex, ZclDataType.UNSIGNED_8_BIT_INTEGER); - for (int cnt = 0; cnt < nwkAddrAssocDevList.size(); cnt++) { - serializer.serialize(nwkAddrAssocDevList.get(cnt), ZclDataType.NWK_ADDRESS); - } - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - // Create lists - nwkAddrAssocDevList = new ArrayList(); - - status = (ZdoStatus) deserializer.deserialize(ZclDataType.ZDO_STATUS); - if (status != ZdoStatus.SUCCESS) { - // Don't read the full response if we have an error - return; - } - ieeeAddrRemoteDev = (IeeeAddress) deserializer.deserialize(ZclDataType.IEEE_ADDRESS); - nwkAddrRemoteDev = (Integer) deserializer.deserialize(ZclDataType.NWK_ADDRESS); - if (deserializer.isEndOfStream()) { - return; - } - Integer numAssocDev = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - startIndex = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - if (numAssocDev != null) { - for (int cnt = 0; cnt < numAssocDev; cnt++) { - nwkAddrAssocDevList.add((Integer) deserializer.deserialize(ZclDataType.NWK_ADDRESS)); - } - } - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(221); - builder.append("IeeeAddressResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(", ieeeAddrRemoteDev="); - builder.append(ieeeAddrRemoteDev); - builder.append(", nwkAddrRemoteDev="); - builder.append(nwkAddrRemoteDev); - builder.append(", startIndex="); - builder.append(startIndex); - builder.append(", nwkAddrAssocDevList="); - builder.append(nwkAddrAssocDevList); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementBindRequest.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementBindRequest.java deleted file mode 100644 index b7860c541..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementBindRequest.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoRequest; -import com.zsmartsystems.zigbee.ZigBeeCommand; -import com.zsmartsystems.zigbee.transaction.ZigBeeTransactionMatcher; -import com.zsmartsystems.zigbee.zdo.command.ManagementBindResponse; -import javax.annotation.Generated; - -/** - * Management Bind Request value object class. - *

    - * The Mgmt_Bind_req is generated from a Local Device wishing to retrieve the - * contents of the Binding Table from the Remote Device. The destination - * addressing on this command shall be unicast only and the destination address - * must be that of a Primary binding table cache or source device holding its own - * binding table. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class ManagementBindRequest extends ZdoRequest implements ZigBeeTransactionMatcher { - /** - * StartIndex command message field. - */ - private Integer startIndex; - - /** - * Default constructor. - */ - public ManagementBindRequest() { - clusterId = 0x0033; - } - - /** - * Gets StartIndex. - * - * @return the StartIndex - */ - public Integer getStartIndex() { - return startIndex; - } - - /** - * Sets StartIndex. - * - * @param startIndex the StartIndex - */ - public void setStartIndex(final Integer startIndex) { - this.startIndex = startIndex; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(startIndex, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - startIndex = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public boolean isTransactionMatch(ZigBeeCommand request, ZigBeeCommand response) { - if (!(response instanceof ManagementBindResponse)) { - return false; - } - - return ((ZdoRequest) request).getDestinationAddress().equals(((ManagementBindResponse) response).getSourceAddress()); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(54); - builder.append("ManagementBindRequest ["); - builder.append(super.toString()); - builder.append(", startIndex="); - builder.append(startIndex); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementBindResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementBindResponse.java deleted file mode 100644 index 4e637918c..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementBindResponse.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoResponse; - -import java.util.List; -import java.util.ArrayList; -import javax.annotation.Generated; -import com.zsmartsystems.zigbee.zdo.ZdoStatus; -import com.zsmartsystems.zigbee.zdo.field.BindingTable; - -/** - * Management Bind Response value object class. - *

    - * The Mgmt_Bind_rsp is generated in response to a Mgmt_Bind_req. If this - * management command is not supported, a status of NOT_SUPPORTED shall be - * returned and all parameter fields after the Status field shall be omitted. Otherwise, - * the Remote Device shall implement the following processing. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class ManagementBindResponse extends ZdoResponse { - /** - * BindingTableEntries command message field. - */ - private Integer bindingTableEntries; - - /** - * StartIndex command message field. - */ - private Integer startIndex; - - /** - * BindingTableList command message field. - */ - private List bindingTableList; - - /** - * Default constructor. - */ - public ManagementBindResponse() { - clusterId = 0x8033; - } - - /** - * Gets BindingTableEntries. - * - * @return the BindingTableEntries - */ - public Integer getBindingTableEntries() { - return bindingTableEntries; - } - - /** - * Sets BindingTableEntries. - * - * @param bindingTableEntries the BindingTableEntries - */ - public void setBindingTableEntries(final Integer bindingTableEntries) { - this.bindingTableEntries = bindingTableEntries; - } - - /** - * Gets StartIndex. - * - * @return the StartIndex - */ - public Integer getStartIndex() { - return startIndex; - } - - /** - * Sets StartIndex. - * - * @param startIndex the StartIndex - */ - public void setStartIndex(final Integer startIndex) { - this.startIndex = startIndex; - } - - /** - * Gets BindingTableList. - * - * @return the BindingTableList - */ - public List getBindingTableList() { - return bindingTableList; - } - - /** - * Sets BindingTableList. - * - * @param bindingTableList the BindingTableList - */ - public void setBindingTableList(final List bindingTableList) { - this.bindingTableList = bindingTableList; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(status, ZclDataType.ZDO_STATUS); - serializer.serialize(bindingTableEntries, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(startIndex, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(bindingTableList.size(), ZclDataType.UNSIGNED_8_BIT_INTEGER); - for (int cnt = 0; cnt < bindingTableList.size(); cnt++) { - serializer.serialize(bindingTableList.get(cnt), ZclDataType.BINDING_TABLE); - } - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - // Create lists - bindingTableList = new ArrayList(); - - status = (ZdoStatus) deserializer.deserialize(ZclDataType.ZDO_STATUS); - if (status != ZdoStatus.SUCCESS) { - // Don't read the full response if we have an error - return; - } - bindingTableEntries = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - startIndex = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - Integer bindingTableListCount = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - if (bindingTableListCount != null) { - for (int cnt = 0; cnt < bindingTableListCount; cnt++) { - bindingTableList.add((BindingTable) deserializer.deserialize(ZclDataType.BINDING_TABLE)); - } - } - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(197); - builder.append("ManagementBindResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(", bindingTableEntries="); - builder.append(bindingTableEntries); - builder.append(", startIndex="); - builder.append(startIndex); - builder.append(", bindingTableList="); - builder.append(bindingTableList); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementCacheResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementCacheResponse.java deleted file mode 100644 index a7d322dd0..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementCacheResponse.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zdo.ZdoResponse; -import javax.annotation.Generated; - -/** - * Management Cache Response value object class. - *

    - * The Mgmt_Cache_rsp is generated in response to an Mgmt_Cache_req. If this - * management command is not supported, or the Remote Device is not a Primary - * Cache Device, a status of NOT_SUPPORTED shall be returned and all parameter - * fields after the Status field shall be omitted. Otherwise, the Remote Device shall - * implement the following processing. Upon receipt of the Mgmt_Cache_req and - * after support for the Mgmt_Cache_req has been verified, the Remote Device shall - * access an internally maintained list of registered ZigBee End Devices utilizing the - * discovery cache on this Primary Discovery Cache device. The entries reported - * shall be those, starting with StartIndex and including whole DiscoveryCacheList - * records until the limit on MSDU size, i.e., aMaxMACFrameSize, is reached. Within - * the Mgmt_Cache_rsp command, the - * DiscoveryCacheListEntries field shall represent the total number of registered - * entries in the Remote Device. The parameter DiscoveryCacheListCount shall be - * the number of entries reported in the DiscoveryCacheList field of the - * Mgmt_Cache_rsp command. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class ManagementCacheResponse extends ZdoResponse { - /** - * Default constructor. - */ - public ManagementCacheResponse() { - clusterId = 0x8037; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(26); - builder.append("ManagementCacheResponse ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementDirectJoinRequest.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementDirectJoinRequest.java deleted file mode 100644 index 757615632..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementDirectJoinRequest.java +++ /dev/null @@ -1,114 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoRequest; -import javax.annotation.Generated; -import com.zsmartsystems.zigbee.IeeeAddress; - -/** - * Management Direct Join Request value object class. - *

    - * The Mgmt_Direct_Join_req is generated from a Local Device requesting that a - * Remote Device permit a device designated by DeviceAddress to join the network - * directly. The Mgmt_Direct_Join_req is generated by a management application - * which directs the request to a Remote Device where the NLME-DIRECTJOIN.request - * is to be executed using the parameter supplied by - * Mgmt_Direct_Join_req. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class ManagementDirectJoinRequest extends ZdoRequest { - /** - * DeviceAddress command message field. - */ - private IeeeAddress deviceAddress; - - /** - * CapabilityInformation command message field. - */ - private Integer capabilityInformation; - - /** - * Default constructor. - */ - public ManagementDirectJoinRequest() { - clusterId = 0x0035; - } - - /** - * Gets DeviceAddress. - * - * @return the DeviceAddress - */ - public IeeeAddress getDeviceAddress() { - return deviceAddress; - } - - /** - * Sets DeviceAddress. - * - * @param deviceAddress the DeviceAddress - */ - public void setDeviceAddress(final IeeeAddress deviceAddress) { - this.deviceAddress = deviceAddress; - } - - /** - * Gets CapabilityInformation. - * - * @return the CapabilityInformation - */ - public Integer getCapabilityInformation() { - return capabilityInformation; - } - - /** - * Sets CapabilityInformation. - * - * @param capabilityInformation the CapabilityInformation - */ - public void setCapabilityInformation(final Integer capabilityInformation) { - this.capabilityInformation = capabilityInformation; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(deviceAddress, ZclDataType.IEEE_ADDRESS); - serializer.serialize(capabilityInformation, ZclDataType.BITMAP_8_BIT); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - deviceAddress = (IeeeAddress) deserializer.deserialize(ZclDataType.IEEE_ADDRESS); - capabilityInformation = (Integer) deserializer.deserialize(ZclDataType.BITMAP_8_BIT); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(104); - builder.append("ManagementDirectJoinRequest ["); - builder.append(super.toString()); - builder.append(", deviceAddress="); - builder.append(deviceAddress); - builder.append(", capabilityInformation="); - builder.append(capabilityInformation); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementDirectJoinResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementDirectJoinResponse.java deleted file mode 100644 index c9765db2d..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementDirectJoinResponse.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoResponse; -import javax.annotation.Generated; -import com.zsmartsystems.zigbee.zdo.ZdoStatus; - -/** - * Management Direct Join Response value object class. - *

    - * The Mgmt_Direct_Join_rsp is generated in response to a Mgmt_Direct_Join_req. - * If this management command is not supported, a status of NOT_SUPPORTED - * shall be returned. Otherwise, the Remote Device shall implement the following - * processing. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class ManagementDirectJoinResponse extends ZdoResponse { - /** - * Default constructor. - */ - public ManagementDirectJoinResponse() { - clusterId = 0x8035; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(status, ZclDataType.ZDO_STATUS); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - status = (ZdoStatus) deserializer.deserialize(ZclDataType.ZDO_STATUS); - if (status != ZdoStatus.SUCCESS) { - // Don't read the full response if we have an error - return; - } - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(57); - builder.append("ManagementDirectJoinResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementLeaveRequest.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementLeaveRequest.java deleted file mode 100644 index 0279a5bce..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementLeaveRequest.java +++ /dev/null @@ -1,126 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoRequest; -import com.zsmartsystems.zigbee.ZigBeeCommand; -import com.zsmartsystems.zigbee.transaction.ZigBeeTransactionMatcher; -import com.zsmartsystems.zigbee.zdo.command.ManagementLeaveResponse; -import javax.annotation.Generated; -import com.zsmartsystems.zigbee.IeeeAddress; - -/** - * Management Leave Request value object class. - *

    - * The Mgmt_Leave_req is generated from a Local Device requesting that a Remote - * Device leave the network or to request that another device leave the network. The - * Mgmt_Leave_req is generated by a management application which directs the - * request to a Remote Device where the NLME-LEAVE.request is to be executed - * using the parameter supplied by Mgmt_Leave_req. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class ManagementLeaveRequest extends ZdoRequest implements ZigBeeTransactionMatcher { - /** - * DeviceAddress command message field. - */ - private IeeeAddress deviceAddress; - - /** - * RemoveChildren_Rejoin command message field. - */ - private Boolean removeChildrenRejoin; - - /** - * Default constructor. - */ - public ManagementLeaveRequest() { - clusterId = 0x0034; - } - - /** - * Gets DeviceAddress. - * - * @return the DeviceAddress - */ - public IeeeAddress getDeviceAddress() { - return deviceAddress; - } - - /** - * Sets DeviceAddress. - * - * @param deviceAddress the DeviceAddress - */ - public void setDeviceAddress(final IeeeAddress deviceAddress) { - this.deviceAddress = deviceAddress; - } - - /** - * Gets RemoveChildren_Rejoin. - * - * @return the RemoveChildren_Rejoin - */ - public Boolean getRemoveChildrenRejoin() { - return removeChildrenRejoin; - } - - /** - * Sets RemoveChildren_Rejoin. - * - * @param removeChildrenRejoin the RemoveChildren_Rejoin - */ - public void setRemoveChildrenRejoin(final Boolean removeChildrenRejoin) { - this.removeChildrenRejoin = removeChildrenRejoin; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(deviceAddress, ZclDataType.IEEE_ADDRESS); - serializer.serialize(removeChildrenRejoin, ZclDataType.BOOLEAN); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - deviceAddress = (IeeeAddress) deserializer.deserialize(ZclDataType.IEEE_ADDRESS); - removeChildrenRejoin = (Boolean) deserializer.deserialize(ZclDataType.BOOLEAN); - } - - @Override - public boolean isTransactionMatch(ZigBeeCommand request, ZigBeeCommand response) { - if (!(response instanceof ManagementLeaveResponse)) { - return false; - } - - return (((ManagementLeaveRequest) request).getDestinationAddress() - .equals(((ManagementLeaveResponse) response).getSourceAddress())); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(98); - builder.append("ManagementLeaveRequest ["); - builder.append(super.toString()); - builder.append(", deviceAddress="); - builder.append(deviceAddress); - builder.append(", removeChildrenRejoin="); - builder.append(removeChildrenRejoin); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementLeaveResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementLeaveResponse.java deleted file mode 100644 index 427b142b8..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementLeaveResponse.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoResponse; -import javax.annotation.Generated; -import com.zsmartsystems.zigbee.zdo.ZdoStatus; - -/** - * Management Leave Response value object class. - *

    - * The Mgmt_Leave_rsp is generated in response to a Mgmt_Leave_req. If this - * management command is not supported, a status of NOT_SUPPORTED shall be - * returned. Otherwise, the Remote Device shall implement the following - * processing. - *
    - * Upon receipt of and after support for the Mgmt_Leave_req has been verified, the - * Remote Device shall execute the NLME-LEAVE.request to disassociate from the - * currently associated network. The Mgmt_Leave_rsp shall contain the same status - * that was contained in the NLME-LEAVE.confirm primitive. - *
    - * Once a device has disassociated, it may execute pre-programmed logic to perform - * NLME-NETWORK-DISCOVERY and NLME-JOIN to join/re-join a network. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class ManagementLeaveResponse extends ZdoResponse { - /** - * Default constructor. - */ - public ManagementLeaveResponse() { - clusterId = 0x8034; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(status, ZclDataType.ZDO_STATUS); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - status = (ZdoStatus) deserializer.deserialize(ZclDataType.ZDO_STATUS); - if (status != ZdoStatus.SUCCESS) { - // Don't read the full response if we have an error - return; - } - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(52); - builder.append("ManagementLeaveResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementLqiRequest.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementLqiRequest.java deleted file mode 100644 index 345c93485..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementLqiRequest.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoRequest; -import com.zsmartsystems.zigbee.ZigBeeCommand; -import com.zsmartsystems.zigbee.transaction.ZigBeeTransactionMatcher; -import com.zsmartsystems.zigbee.zdo.command.ManagementLqiResponse; -import javax.annotation.Generated; - -/** - * Management LQI Request value object class. - *

    - * The Mgmt_Lqi_req is generated from a Local Device wishing to obtain a - * neighbor list for the Remote Device along with associated LQI values to each - * neighbor. The destination addressing on this command shall be unicast only and - * the destination address must be that of a ZigBee Coordinator or ZigBee Router. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class ManagementLqiRequest extends ZdoRequest implements ZigBeeTransactionMatcher { - /** - * StartIndex command message field. - */ - private Integer startIndex; - - /** - * Default constructor. - */ - public ManagementLqiRequest() { - clusterId = 0x0031; - } - - /** - * Gets StartIndex. - * - * @return the StartIndex - */ - public Integer getStartIndex() { - return startIndex; - } - - /** - * Sets StartIndex. - * - * @param startIndex the StartIndex - */ - public void setStartIndex(final Integer startIndex) { - this.startIndex = startIndex; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(startIndex, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - startIndex = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public boolean isTransactionMatch(ZigBeeCommand request, ZigBeeCommand response) { - if (!(response instanceof ManagementLqiResponse)) { - return false; - } - - return (((ManagementLqiRequest) request).getDestinationAddress() - .equals(((ManagementLqiResponse) response).getSourceAddress())); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(53); - builder.append("ManagementLqiRequest ["); - builder.append(super.toString()); - builder.append(", startIndex="); - builder.append(startIndex); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementLqiResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementLqiResponse.java deleted file mode 100644 index be3aa9766..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementLqiResponse.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoResponse; - -import java.util.List; -import java.util.ArrayList; -import javax.annotation.Generated; -import com.zsmartsystems.zigbee.zdo.ZdoStatus; -import com.zsmartsystems.zigbee.zdo.field.NeighborTable; - -/** - * Management LQI Response value object class. - *

    - * The Mgmt_Lqi_rsp is generated in response to an Mgmt_Lqi_req. If this - * management command is not supported, a status of NOT_SUPPORTED shall be - * returned and all parameter fields after the Status field shall be omitted. Otherwise, - * the Remote Device shall implement the following processing. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class ManagementLqiResponse extends ZdoResponse { - /** - * NeighborTableEntries command message field. - */ - private Integer neighborTableEntries; - - /** - * StartIndex command message field. - */ - private Integer startIndex; - - /** - * NeighborTableList command message field. - */ - private List neighborTableList; - - /** - * Default constructor. - */ - public ManagementLqiResponse() { - clusterId = 0x8031; - } - - /** - * Gets NeighborTableEntries. - * - * @return the NeighborTableEntries - */ - public Integer getNeighborTableEntries() { - return neighborTableEntries; - } - - /** - * Sets NeighborTableEntries. - * - * @param neighborTableEntries the NeighborTableEntries - */ - public void setNeighborTableEntries(final Integer neighborTableEntries) { - this.neighborTableEntries = neighborTableEntries; - } - - /** - * Gets StartIndex. - * - * @return the StartIndex - */ - public Integer getStartIndex() { - return startIndex; - } - - /** - * Sets StartIndex. - * - * @param startIndex the StartIndex - */ - public void setStartIndex(final Integer startIndex) { - this.startIndex = startIndex; - } - - /** - * Gets NeighborTableList. - * - * @return the NeighborTableList - */ - public List getNeighborTableList() { - return neighborTableList; - } - - /** - * Sets NeighborTableList. - * - * @param neighborTableList the NeighborTableList - */ - public void setNeighborTableList(final List neighborTableList) { - this.neighborTableList = neighborTableList; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(status, ZclDataType.ZDO_STATUS); - serializer.serialize(neighborTableEntries, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(startIndex, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(neighborTableList.size(), ZclDataType.UNSIGNED_8_BIT_INTEGER); - for (int cnt = 0; cnt < neighborTableList.size(); cnt++) { - serializer.serialize(neighborTableList.get(cnt), ZclDataType.NEIGHBOR_TABLE); - } - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - // Create lists - neighborTableList = new ArrayList(); - - status = (ZdoStatus) deserializer.deserialize(ZclDataType.ZDO_STATUS); - if (status != ZdoStatus.SUCCESS) { - // Don't read the full response if we have an error - return; - } - neighborTableEntries = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - startIndex = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - Integer neighborTableListCount = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - if (neighborTableListCount != null) { - for (int cnt = 0; cnt < neighborTableListCount; cnt++) { - neighborTableList.add((NeighborTable) deserializer.deserialize(ZclDataType.NEIGHBOR_TABLE)); - } - } - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(199); - builder.append("ManagementLqiResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(", neighborTableEntries="); - builder.append(neighborTableEntries); - builder.append(", startIndex="); - builder.append(startIndex); - builder.append(", neighborTableList="); - builder.append(neighborTableList); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementNetworkDiscovery.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementNetworkDiscovery.java deleted file mode 100644 index 5d7a0c1f2..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementNetworkDiscovery.java +++ /dev/null @@ -1,137 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoResponse; -import javax.annotation.Generated; - -/** - * Management Network Discovery value object class. - *

    - * The Mgmt_NWK_Disc_req is generated from a Local Device requesting that the - * Remote Device execute a Scan to report back networks in the vicinity of the Local - * Device. The destination addressing on this command shall be unicast. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class ManagementNetworkDiscovery extends ZdoResponse { - /** - * ScanChannels command message field. - */ - private Integer scanChannels; - - /** - * ScanDuration command message field. - */ - private Integer scanDuration; - - /** - * StartIndex command message field. - */ - private Integer startIndex; - - /** - * Default constructor. - */ - public ManagementNetworkDiscovery() { - clusterId = 0x0030; - } - - /** - * Gets ScanChannels. - * - * @return the ScanChannels - */ - public Integer getScanChannels() { - return scanChannels; - } - - /** - * Sets ScanChannels. - * - * @param scanChannels the ScanChannels - */ - public void setScanChannels(final Integer scanChannels) { - this.scanChannels = scanChannels; - } - - /** - * Gets ScanDuration. - * - * @return the ScanDuration - */ - public Integer getScanDuration() { - return scanDuration; - } - - /** - * Sets ScanDuration. - * - * @param scanDuration the ScanDuration - */ - public void setScanDuration(final Integer scanDuration) { - this.scanDuration = scanDuration; - } - - /** - * Gets StartIndex. - * - * @return the StartIndex - */ - public Integer getStartIndex() { - return startIndex; - } - - /** - * Sets StartIndex. - * - * @param startIndex the StartIndex - */ - public void setStartIndex(final Integer startIndex) { - this.startIndex = startIndex; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(scanChannels, ZclDataType.BITMAP_32_BIT); - serializer.serialize(scanDuration, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(startIndex, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - scanChannels = (Integer) deserializer.deserialize(ZclDataType.BITMAP_32_BIT); - scanDuration = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - startIndex = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(123); - builder.append("ManagementNetworkDiscovery ["); - builder.append(super.toString()); - builder.append(", scanChannels="); - builder.append(scanChannels); - builder.append(", scanDuration="); - builder.append(scanDuration); - builder.append(", startIndex="); - builder.append(startIndex); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementNetworkDiscoveryResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementNetworkDiscoveryResponse.java deleted file mode 100644 index 314d58d94..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementNetworkDiscoveryResponse.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zdo.ZdoResponse; -import javax.annotation.Generated; - -/** - * Management Network Discovery Response value object class. - *

    - * The Mgmt_NWK_Disc_rsp is generated in response to an - * Mgmt_NWK_Disc_req. If this management command is not supported, a status - * of NOT_SUPPORTED shall be returned and all parameter fields after the Status - * field shall be omitted. Otherwise, the Remote Device shall implement the - * following process. - *
    - * Upon receipt of and after support for the Mgmt_NWK_Disc_req has been - * verified, the Remote Device shall issue an NLME-NETWORKDISCOVERY.request - * primitive using the ScanChannels and ScanDuration - * parameters, supplied in the Mgmt_NWK_Disc_req command. Upon receipt of the - * NLME-NETWORK-DISCOVERY.confirm primitive, the Remote Device shall - * report the results, starting with the StartIndex element, via the - * Mgmt_NWK_Disc_rsp command. The NetworkList field shall contain whole - * NetworkList records, until the limit on - * MSDU size, i.e., aMaxMACFrameSize, is reached. The number of - * results reported shall be set in the NetworkListCount. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class ManagementNetworkDiscoveryResponse extends ZdoResponse { - /** - * Default constructor. - */ - public ManagementNetworkDiscoveryResponse() { - clusterId = 0x8030; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(37); - builder.append("ManagementNetworkDiscoveryResponse ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementNetworkUpdateNotify.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementNetworkUpdateNotify.java deleted file mode 100644 index 284961830..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementNetworkUpdateNotify.java +++ /dev/null @@ -1,198 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoResponse; - -import java.util.List; -import java.util.ArrayList; -import javax.annotation.Generated; -import com.zsmartsystems.zigbee.zdo.ZdoStatus; - -/** - * Management Network Update Notify value object class. - *

    - * The Mgmt_NWK_Update_notify is provided to enable ZigBee devices to report - * the condition on local channels to a network manager. The scanned channel list is - * the report of channels scanned and it is followed by a list of records, one for each - * channel scanned, each record including one byte of the energy level measured - * during the scan, or 0xff if there is too much interference on this channel. - *
    - * When sent in response to a Mgmt_NWK_Update_req command the status field - * shall represent the status of the request. When sent unsolicited the status field - * shall be set to SUCCESS. - * A Status of NOT_SUPPORTED indicates that the request was directed to a device - * which was not the ZigBee Coordinator or that the ZigBee Coordinator does not - * support End Device Binding. Otherwise, End_Device_Bind_req processing is - * performed as described below, including transmission of the - * End_Device_Bind_rsp. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class ManagementNetworkUpdateNotify extends ZdoResponse { - /** - * ScannedChannels command message field. - */ - private Integer scannedChannels; - - /** - * TotalTransmissions command message field. - */ - private Integer totalTransmissions; - - /** - * TransmissionFailures command message field. - */ - private Integer transmissionFailures; - - /** - * EnergyValues command message field. - */ - private List energyValues; - - /** - * Default constructor. - */ - public ManagementNetworkUpdateNotify() { - clusterId = 0x8038; - } - - /** - * Gets ScannedChannels. - * - * @return the ScannedChannels - */ - public Integer getScannedChannels() { - return scannedChannels; - } - - /** - * Sets ScannedChannels. - * - * @param scannedChannels the ScannedChannels - */ - public void setScannedChannels(final Integer scannedChannels) { - this.scannedChannels = scannedChannels; - } - - /** - * Gets TotalTransmissions. - * - * @return the TotalTransmissions - */ - public Integer getTotalTransmissions() { - return totalTransmissions; - } - - /** - * Sets TotalTransmissions. - * - * @param totalTransmissions the TotalTransmissions - */ - public void setTotalTransmissions(final Integer totalTransmissions) { - this.totalTransmissions = totalTransmissions; - } - - /** - * Gets TransmissionFailures. - * - * @return the TransmissionFailures - */ - public Integer getTransmissionFailures() { - return transmissionFailures; - } - - /** - * Sets TransmissionFailures. - * - * @param transmissionFailures the TransmissionFailures - */ - public void setTransmissionFailures(final Integer transmissionFailures) { - this.transmissionFailures = transmissionFailures; - } - - /** - * Gets EnergyValues. - * - * @return the EnergyValues - */ - public List getEnergyValues() { - return energyValues; - } - - /** - * Sets EnergyValues. - * - * @param energyValues the EnergyValues - */ - public void setEnergyValues(final List energyValues) { - this.energyValues = energyValues; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(status, ZclDataType.ZDO_STATUS); - serializer.serialize(scannedChannels, ZclDataType.UNSIGNED_32_BIT_INTEGER); - serializer.serialize(totalTransmissions, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(transmissionFailures, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(energyValues.size(), ZclDataType.UNSIGNED_8_BIT_INTEGER); - for (int cnt = 0; cnt < energyValues.size(); cnt++) { - serializer.serialize(energyValues.get(cnt), ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - // Create lists - energyValues = new ArrayList(); - - status = (ZdoStatus) deserializer.deserialize(ZclDataType.ZDO_STATUS); - if (status != ZdoStatus.SUCCESS) { - // Don't read the full response if we have an error - return; - } - scannedChannels = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_32_BIT_INTEGER); - totalTransmissions = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - transmissionFailures = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - Integer scannedChannelsListCount = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - if (scannedChannelsListCount != null) { - for (int cnt = 0; cnt < scannedChannelsListCount; cnt++) { - energyValues.add((Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER)); - } - } - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(247); - builder.append("ManagementNetworkUpdateNotify ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(", scannedChannels="); - builder.append(scannedChannels); - builder.append(", totalTransmissions="); - builder.append(totalTransmissions); - builder.append(", transmissionFailures="); - builder.append(transmissionFailures); - builder.append(", energyValues="); - builder.append(energyValues); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementPermitJoiningRequest.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementPermitJoiningRequest.java deleted file mode 100644 index ac99d742a..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementPermitJoiningRequest.java +++ /dev/null @@ -1,128 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoRequest; -import com.zsmartsystems.zigbee.ZigBeeCommand; -import com.zsmartsystems.zigbee.transaction.ZigBeeTransactionMatcher; -import com.zsmartsystems.zigbee.zdo.command.ManagementPermitJoiningResponse; -import javax.annotation.Generated; - -/** - * Management Permit Joining Request value object class. - *

    - * The Mgmt_Permit_Joining_req is generated from a Local Device requesting that - * a remote device or devices allow or disallow association. The - * Mgmt_Permit_Joining_req is generated by a management application or - * commissioning tool which directs the request to a remote device(s) where the - * NLME-PERMIT-JOINING.request is executed using the PermitDuration - * parameter supplied by Mgmt_Permit_Joining_req. Additionally, if the remote - * device is the Trust Center and TC_Significance is set to 1, the Trust Center - * authentication policy will be affected. The addressing may be unicast or - * "broadcast to all routers and coordinator". - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class ManagementPermitJoiningRequest extends ZdoRequest implements ZigBeeTransactionMatcher { - /** - * PermitDuration command message field. - */ - private Integer permitDuration; - - /** - * TC_Significance command message field. - */ - private Boolean tcSignificance; - - /** - * Default constructor. - */ - public ManagementPermitJoiningRequest() { - clusterId = 0x0036; - } - - /** - * Gets PermitDuration. - * - * @return the PermitDuration - */ - public Integer getPermitDuration() { - return permitDuration; - } - - /** - * Sets PermitDuration. - * - * @param permitDuration the PermitDuration - */ - public void setPermitDuration(final Integer permitDuration) { - this.permitDuration = permitDuration; - } - - /** - * Gets TC_Significance. - * - * @return the TC_Significance - */ - public Boolean getTcSignificance() { - return tcSignificance; - } - - /** - * Sets TC_Significance. - * - * @param tcSignificance the TC_Significance - */ - public void setTcSignificance(final Boolean tcSignificance) { - this.tcSignificance = tcSignificance; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(permitDuration, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(tcSignificance, ZclDataType.BOOLEAN); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - permitDuration = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - tcSignificance = (Boolean) deserializer.deserialize(ZclDataType.BOOLEAN); - } - - @Override - public boolean isTransactionMatch(ZigBeeCommand request, ZigBeeCommand response) { - if (!(response instanceof ManagementPermitJoiningResponse)) { - return false; - } - - return ((ZdoRequest) request).getDestinationAddress().equals(((ManagementPermitJoiningResponse) response).getSourceAddress()); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(101); - builder.append("ManagementPermitJoiningRequest ["); - builder.append(super.toString()); - builder.append(", permitDuration="); - builder.append(permitDuration); - builder.append(", tcSignificance="); - builder.append(tcSignificance); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementPermitJoiningResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementPermitJoiningResponse.java deleted file mode 100644 index 7400f1f36..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementPermitJoiningResponse.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoResponse; -import javax.annotation.Generated; -import com.zsmartsystems.zigbee.zdo.ZdoStatus; - -/** - * Management Permit Joining Response value object class. - *

    - * The Mgmt_Permit_Joining_rsp is generated in response to a unicast - * Mgmt_Permit_Joining_req. In the description which follows, note that no - * response shall be sent if the Mgmt_Permit_Joining_req was received as a - * broadcast to all routers. If this management command is not permitted by the - * requesting device, a status of INVALID_REQUEST shall be returned. Upon - * receipt and after support for Mgmt_Permit_Joining_req has been verified, the - * Remote Device shall execute the NLME-PERMIT-JOINING.request. The - * Mgmt_Permit-Joining_rsp shall contain the same status that was contained in the - * NLME-PERMIT-JOINING.confirm primitive. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class ManagementPermitJoiningResponse extends ZdoResponse { - /** - * Default constructor. - */ - public ManagementPermitJoiningResponse() { - clusterId = 0x8036; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(status, ZclDataType.ZDO_STATUS); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - status = (ZdoStatus) deserializer.deserialize(ZclDataType.ZDO_STATUS); - if (status != ZdoStatus.SUCCESS) { - // Don't read the full response if we have an error - return; - } - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(60); - builder.append("ManagementPermitJoiningResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementRoutingRequest.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementRoutingRequest.java deleted file mode 100644 index 32a011e0a..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementRoutingRequest.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoRequest; -import com.zsmartsystems.zigbee.ZigBeeCommand; -import com.zsmartsystems.zigbee.transaction.ZigBeeTransactionMatcher; -import com.zsmartsystems.zigbee.zdo.command.ManagementRoutingResponse; -import javax.annotation.Generated; - -/** - * Management Routing Request value object class. - *

    - * The Mgmt_Rtg_req is generated from a Local Device wishing to retrieve the - * contents of the Routing Table from the Remote Device. The destination - * addressing on this command shall be unicast only and the destination address - * must be that of the ZigBee Router or ZigBee Coordinator. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class ManagementRoutingRequest extends ZdoRequest implements ZigBeeTransactionMatcher { - /** - * StartIndex command message field. - */ - private Integer startIndex; - - /** - * Default constructor. - */ - public ManagementRoutingRequest() { - clusterId = 0x0032; - } - - /** - * Gets StartIndex. - * - * @return the StartIndex - */ - public Integer getStartIndex() { - return startIndex; - } - - /** - * Sets StartIndex. - * - * @param startIndex the StartIndex - */ - public void setStartIndex(final Integer startIndex) { - this.startIndex = startIndex; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(startIndex, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - startIndex = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public boolean isTransactionMatch(ZigBeeCommand request, ZigBeeCommand response) { - if (!(response instanceof ManagementRoutingResponse)) { - return false; - } - - return (((ManagementRoutingRequest) request).getDestinationAddress() - .equals(((ManagementRoutingResponse) response).getSourceAddress())); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(57); - builder.append("ManagementRoutingRequest ["); - builder.append(super.toString()); - builder.append(", startIndex="); - builder.append(startIndex); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementRoutingResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementRoutingResponse.java deleted file mode 100644 index 0a56834e2..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ManagementRoutingResponse.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoResponse; - -import java.util.List; -import java.util.ArrayList; -import javax.annotation.Generated; -import com.zsmartsystems.zigbee.zdo.ZdoStatus; -import com.zsmartsystems.zigbee.zdo.field.RoutingTable; - -/** - * Management Routing Response value object class. - *

    - * The Mgmt_Rtg_rsp is generated in response to an Mgmt_Rtg_req. If this - * management command is not supported, a status of NOT_SUPPORTED shall be - * returned and all parameter fields after the Status field shall be omitted. Otherwise, - * the Remote Device shall implement the following processing. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class ManagementRoutingResponse extends ZdoResponse { - /** - * RoutingTableEntries command message field. - */ - private Integer routingTableEntries; - - /** - * StartIndex command message field. - */ - private Integer startIndex; - - /** - * RoutingTableList command message field. - */ - private List routingTableList; - - /** - * Default constructor. - */ - public ManagementRoutingResponse() { - clusterId = 0x8032; - } - - /** - * Gets RoutingTableEntries. - * - * @return the RoutingTableEntries - */ - public Integer getRoutingTableEntries() { - return routingTableEntries; - } - - /** - * Sets RoutingTableEntries. - * - * @param routingTableEntries the RoutingTableEntries - */ - public void setRoutingTableEntries(final Integer routingTableEntries) { - this.routingTableEntries = routingTableEntries; - } - - /** - * Gets StartIndex. - * - * @return the StartIndex - */ - public Integer getStartIndex() { - return startIndex; - } - - /** - * Sets StartIndex. - * - * @param startIndex the StartIndex - */ - public void setStartIndex(final Integer startIndex) { - this.startIndex = startIndex; - } - - /** - * Gets RoutingTableList. - * - * @return the RoutingTableList - */ - public List getRoutingTableList() { - return routingTableList; - } - - /** - * Sets RoutingTableList. - * - * @param routingTableList the RoutingTableList - */ - public void setRoutingTableList(final List routingTableList) { - this.routingTableList = routingTableList; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(status, ZclDataType.ZDO_STATUS); - serializer.serialize(routingTableEntries, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(startIndex, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(routingTableList.size(), ZclDataType.UNSIGNED_8_BIT_INTEGER); - for (int cnt = 0; cnt < routingTableList.size(); cnt++) { - serializer.serialize(routingTableList.get(cnt), ZclDataType.ROUTING_TABLE); - } - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - // Create lists - routingTableList = new ArrayList(); - - status = (ZdoStatus) deserializer.deserialize(ZclDataType.ZDO_STATUS); - if (status != ZdoStatus.SUCCESS) { - // Don't read the full response if we have an error - return; - } - routingTableEntries = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - startIndex = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - Integer routingTableListCount = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - if (routingTableListCount != null) { - for (int cnt = 0; cnt < routingTableListCount; cnt++) { - routingTableList.add((RoutingTable) deserializer.deserialize(ZclDataType.ROUTING_TABLE)); - } - } - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(200); - builder.append("ManagementRoutingResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(", routingTableEntries="); - builder.append(routingTableEntries); - builder.append(", startIndex="); - builder.append(startIndex); - builder.append(", routingTableList="); - builder.append(routingTableList); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/MatchDescriptorRequest.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/MatchDescriptorRequest.java deleted file mode 100644 index ae81e1c3e..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/MatchDescriptorRequest.java +++ /dev/null @@ -1,190 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoRequest; - -import java.util.List; -import java.util.ArrayList; -import javax.annotation.Generated; - -/** - * Match Descriptor Request value object class. - *

    - * The Match_Desc_req command is generated from a local device wishing to find - * remote devices supporting a specific simple descriptor match criterion. This - * command shall either be broadcast to all devices for which macRxOnWhenIdle = - * TRUE, or unicast. If the command is unicast, it shall be directed either to the - * remote device itself or to an alternative device that contains the discovery - * information of the remote device. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class MatchDescriptorRequest extends ZdoRequest { - /** - * NWKAddrOfInterest command message field. - */ - private Integer nwkAddrOfInterest; - - /** - * ProfileID command message field. - */ - private Integer profileId; - - /** - * InClusterList command message field. - */ - private List inClusterList; - - /** - * OutClusterList command message field. - */ - private List outClusterList; - - /** - * Default constructor. - */ - public MatchDescriptorRequest() { - clusterId = 0x0006; - } - - /** - * Gets NWKAddrOfInterest. - * - * @return the NWKAddrOfInterest - */ - public Integer getNwkAddrOfInterest() { - return nwkAddrOfInterest; - } - - /** - * Sets NWKAddrOfInterest. - * - * @param nwkAddrOfInterest the NWKAddrOfInterest - */ - public void setNwkAddrOfInterest(final Integer nwkAddrOfInterest) { - this.nwkAddrOfInterest = nwkAddrOfInterest; - } - - /** - * Gets ProfileID. - * - * @return the ProfileID - */ - public Integer getProfileId() { - return profileId; - } - - /** - * Sets ProfileID. - * - * @param profileId the ProfileID - */ - public void setProfileId(final Integer profileId) { - this.profileId = profileId; - } - - /** - * Gets InClusterList. - * - * @return the InClusterList - */ - public List getInClusterList() { - return inClusterList; - } - - /** - * Sets InClusterList. - * - * @param inClusterList the InClusterList - */ - public void setInClusterList(final List inClusterList) { - this.inClusterList = inClusterList; - } - - /** - * Gets OutClusterList. - * - * @return the OutClusterList - */ - public List getOutClusterList() { - return outClusterList; - } - - /** - * Sets OutClusterList. - * - * @param outClusterList the OutClusterList - */ - public void setOutClusterList(final List outClusterList) { - this.outClusterList = outClusterList; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(nwkAddrOfInterest, ZclDataType.NWK_ADDRESS); - serializer.serialize(profileId, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(inClusterList.size(), ZclDataType.UNSIGNED_8_BIT_INTEGER); - for (int cnt = 0; cnt < inClusterList.size(); cnt++) { - serializer.serialize(inClusterList.get(cnt), ZclDataType.CLUSTERID); - } - serializer.serialize(outClusterList.size(), ZclDataType.UNSIGNED_8_BIT_INTEGER); - for (int cnt = 0; cnt < outClusterList.size(); cnt++) { - serializer.serialize(outClusterList.get(cnt), ZclDataType.CLUSTERID); - } - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - // Create lists - inClusterList = new ArrayList(); - outClusterList = new ArrayList(); - - nwkAddrOfInterest = (Integer) deserializer.deserialize(ZclDataType.NWK_ADDRESS); - profileId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - Integer inClusterCount = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - if (inClusterCount != null) { - for (int cnt = 0; cnt < inClusterCount; cnt++) { - inClusterList.add((Integer) deserializer.deserialize(ZclDataType.CLUSTERID)); - } - } - Integer outClusterCount = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - if (outClusterCount != null) { - for (int cnt = 0; cnt < outClusterCount; cnt++) { - outClusterList.add((Integer) deserializer.deserialize(ZclDataType.CLUSTERID)); - } - } - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(227); - builder.append("MatchDescriptorRequest ["); - builder.append(super.toString()); - builder.append(", nwkAddrOfInterest="); - builder.append(nwkAddrOfInterest); - builder.append(", profileId="); - builder.append(profileId); - builder.append(", inClusterList="); - builder.append(inClusterList); - builder.append(", outClusterList="); - builder.append(outClusterList); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/MatchDescriptorResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/MatchDescriptorResponse.java deleted file mode 100644 index 66c80fec4..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/MatchDescriptorResponse.java +++ /dev/null @@ -1,133 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoResponse; - -import java.util.List; -import java.util.ArrayList; -import javax.annotation.Generated; -import com.zsmartsystems.zigbee.zdo.ZdoStatus; - -/** - * Match Descriptor Response value object class. - *

    - * The Match_Desc_rsp is generated by a remote device in response to a - * Match_Desc_req either broadcast or directed to the remote device. This command - * shall be unicast to the originator of the Match_Desc_req command. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class MatchDescriptorResponse extends ZdoResponse { - /** - * NWKAddrOfInterest command message field. - */ - private Integer nwkAddrOfInterest; - - /** - * MatchList command message field. - */ - private List matchList; - - /** - * Default constructor. - */ - public MatchDescriptorResponse() { - clusterId = 0x8006; - } - - /** - * Gets NWKAddrOfInterest. - * - * @return the NWKAddrOfInterest - */ - public Integer getNwkAddrOfInterest() { - return nwkAddrOfInterest; - } - - /** - * Sets NWKAddrOfInterest. - * - * @param nwkAddrOfInterest the NWKAddrOfInterest - */ - public void setNwkAddrOfInterest(final Integer nwkAddrOfInterest) { - this.nwkAddrOfInterest = nwkAddrOfInterest; - } - - /** - * Gets MatchList. - * - * @return the MatchList - */ - public List getMatchList() { - return matchList; - } - - /** - * Sets MatchList. - * - * @param matchList the MatchList - */ - public void setMatchList(final List matchList) { - this.matchList = matchList; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(status, ZclDataType.ZDO_STATUS); - serializer.serialize(nwkAddrOfInterest, ZclDataType.NWK_ADDRESS); - serializer.serialize(matchList.size(), ZclDataType.UNSIGNED_8_BIT_INTEGER); - for (int cnt = 0; cnt < matchList.size(); cnt++) { - serializer.serialize(matchList.get(cnt), ZclDataType.ENDPOINT); - } - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - // Create lists - matchList = new ArrayList(); - - status = (ZdoStatus) deserializer.deserialize(ZclDataType.ZDO_STATUS); - if (status != ZdoStatus.SUCCESS) { - // Don't read the full response if we have an error - return; - } - nwkAddrOfInterest = (Integer) deserializer.deserialize(ZclDataType.NWK_ADDRESS); - Integer matchLength = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - if (matchLength != null) { - for (int cnt = 0; cnt < matchLength; cnt++) { - matchList.add((Integer) deserializer.deserialize(ZclDataType.ENDPOINT)); - } - } - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(149); - builder.append("MatchDescriptorResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(", nwkAddrOfInterest="); - builder.append(nwkAddrOfInterest); - builder.append(", matchList="); - builder.append(matchList); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/NetworkAddressRequest.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/NetworkAddressRequest.java deleted file mode 100644 index ead9011ee..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/NetworkAddressRequest.java +++ /dev/null @@ -1,167 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoRequest; -import com.zsmartsystems.zigbee.ZigBeeCommand; -import com.zsmartsystems.zigbee.transaction.ZigBeeTransactionMatcher; -import com.zsmartsystems.zigbee.zdo.command.NetworkAddressResponse; -import javax.annotation.Generated; -import com.zsmartsystems.zigbee.IeeeAddress; - -/** - * Network Address Request value object class. - *

    - * The NWK_addr_req is generated from a Local Device wishing to inquire as to the - * 16-bit address of the Remote Device based on its known IEEE address. The - * destination addressing on this command shall be unicast or broadcast to all - * devices for which macRxOnWhenIdle = TRUE. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-23T21:55:42Z") -public class NetworkAddressRequest extends ZdoRequest implements ZigBeeTransactionMatcher { - /** - * IEEEAddr command message field. - */ - private IeeeAddress ieeeAddr; - - /** - * RequestType command message field. - *

    - * Request type for this command: - * 0x00 – Single device response - * 0x01 – Extended response - * 0x02-0xFF – reserved - */ - private Integer requestType; - - /** - * StartIndex command message field. - */ - private Integer startIndex; - - /** - * Default constructor. - */ - public NetworkAddressRequest() { - clusterId = 0x0000; - } - - /** - * Gets IEEEAddr. - * - * @return the IEEEAddr - */ - public IeeeAddress getIeeeAddr() { - return ieeeAddr; - } - - /** - * Sets IEEEAddr. - * - * @param ieeeAddr the IEEEAddr - */ - public void setIeeeAddr(final IeeeAddress ieeeAddr) { - this.ieeeAddr = ieeeAddr; - } - - /** - * Gets RequestType. - *

    - * Request type for this command: - * 0x00 – Single device response - * 0x01 – Extended response - * 0x02-0xFF – reserved - * - * @return the RequestType - */ - public Integer getRequestType() { - return requestType; - } - - /** - * Sets RequestType. - *

    - * Request type for this command: - * 0x00 – Single device response - * 0x01 – Extended response - * 0x02-0xFF – reserved - * - * @param requestType the RequestType - */ - public void setRequestType(final Integer requestType) { - this.requestType = requestType; - } - - /** - * Gets StartIndex. - * - * @return the StartIndex - */ - public Integer getStartIndex() { - return startIndex; - } - - /** - * Sets StartIndex. - * - * @param startIndex the StartIndex - */ - public void setStartIndex(final Integer startIndex) { - this.startIndex = startIndex; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(ieeeAddr, ZclDataType.IEEE_ADDRESS); - serializer.serialize(requestType, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(startIndex, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - ieeeAddr = (IeeeAddress) deserializer.deserialize(ZclDataType.IEEE_ADDRESS); - requestType = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - startIndex = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public boolean isTransactionMatch(ZigBeeCommand request, ZigBeeCommand response) { - if (!(response instanceof NetworkAddressResponse)) { - return false; - } - - return (((NetworkAddressRequest) request).getIeeeAddr() - .equals(((NetworkAddressResponse) response).getIeeeAddrRemoteDev())); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(113); - builder.append("NetworkAddressRequest ["); - builder.append(super.toString()); - builder.append(", ieeeAddr="); - builder.append(ieeeAddr); - builder.append(", requestType="); - builder.append(requestType); - builder.append(", startIndex="); - builder.append(startIndex); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/NetworkAddressResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/NetworkAddressResponse.java deleted file mode 100644 index e9d39bfe7..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/NetworkAddressResponse.java +++ /dev/null @@ -1,189 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoResponse; - -import java.util.List; -import java.util.ArrayList; -import javax.annotation.Generated; -import com.zsmartsystems.zigbee.zdo.ZdoStatus; -import com.zsmartsystems.zigbee.IeeeAddress; - -/** - * Network Address Response value object class. - *

    - * The NWK_addr_rsp is generated by a Remote Device in response to a - * NWK_addr_req command inquiring as to the NWK address of the Remote Device - * or the NWK address of an address held in a local discovery cache. The - * destination addressing on this command is unicast. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class NetworkAddressResponse extends ZdoResponse { - /** - * IEEEAddrRemoteDev command message field. - */ - private IeeeAddress ieeeAddrRemoteDev; - - /** - * NWKAddrRemoteDev command message field. - */ - private Integer nwkAddrRemoteDev; - - /** - * StartIndex command message field. - */ - private Integer startIndex; - - /** - * NWKAddrAssocDevList command message field. - */ - private List nwkAddrAssocDevList; - - /** - * Default constructor. - */ - public NetworkAddressResponse() { - clusterId = 0x8000; - } - - /** - * Gets IEEEAddrRemoteDev. - * - * @return the IEEEAddrRemoteDev - */ - public IeeeAddress getIeeeAddrRemoteDev() { - return ieeeAddrRemoteDev; - } - - /** - * Sets IEEEAddrRemoteDev. - * - * @param ieeeAddrRemoteDev the IEEEAddrRemoteDev - */ - public void setIeeeAddrRemoteDev(final IeeeAddress ieeeAddrRemoteDev) { - this.ieeeAddrRemoteDev = ieeeAddrRemoteDev; - } - - /** - * Gets NWKAddrRemoteDev. - * - * @return the NWKAddrRemoteDev - */ - public Integer getNwkAddrRemoteDev() { - return nwkAddrRemoteDev; - } - - /** - * Sets NWKAddrRemoteDev. - * - * @param nwkAddrRemoteDev the NWKAddrRemoteDev - */ - public void setNwkAddrRemoteDev(final Integer nwkAddrRemoteDev) { - this.nwkAddrRemoteDev = nwkAddrRemoteDev; - } - - /** - * Gets StartIndex. - * - * @return the StartIndex - */ - public Integer getStartIndex() { - return startIndex; - } - - /** - * Sets StartIndex. - * - * @param startIndex the StartIndex - */ - public void setStartIndex(final Integer startIndex) { - this.startIndex = startIndex; - } - - /** - * Gets NWKAddrAssocDevList. - * - * @return the NWKAddrAssocDevList - */ - public List getNwkAddrAssocDevList() { - return nwkAddrAssocDevList; - } - - /** - * Sets NWKAddrAssocDevList. - * - * @param nwkAddrAssocDevList the NWKAddrAssocDevList - */ - public void setNwkAddrAssocDevList(final List nwkAddrAssocDevList) { - this.nwkAddrAssocDevList = nwkAddrAssocDevList; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(status, ZclDataType.ZDO_STATUS); - serializer.serialize(ieeeAddrRemoteDev, ZclDataType.IEEE_ADDRESS); - serializer.serialize(nwkAddrRemoteDev, ZclDataType.NWK_ADDRESS); - serializer.serialize(nwkAddrAssocDevList.size(), ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(startIndex, ZclDataType.UNSIGNED_8_BIT_INTEGER); - for (int cnt = 0; cnt < nwkAddrAssocDevList.size(); cnt++) { - serializer.serialize(nwkAddrAssocDevList.get(cnt), ZclDataType.NWK_ADDRESS); - } - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - // Create lists - nwkAddrAssocDevList = new ArrayList(); - - status = (ZdoStatus) deserializer.deserialize(ZclDataType.ZDO_STATUS); - if (status != ZdoStatus.SUCCESS) { - // Don't read the full response if we have an error - return; - } - ieeeAddrRemoteDev = (IeeeAddress) deserializer.deserialize(ZclDataType.IEEE_ADDRESS); - nwkAddrRemoteDev = (Integer) deserializer.deserialize(ZclDataType.NWK_ADDRESS); - Integer numAssocDev = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - startIndex = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - if (numAssocDev != null) { - for (int cnt = 0; cnt < numAssocDev; cnt++) { - nwkAddrAssocDevList.add((Integer) deserializer.deserialize(ZclDataType.NWK_ADDRESS)); - } - } - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(224); - builder.append("NetworkAddressResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(", ieeeAddrRemoteDev="); - builder.append(ieeeAddrRemoteDev); - builder.append(", nwkAddrRemoteDev="); - builder.append(nwkAddrRemoteDev); - builder.append(", startIndex="); - builder.append(startIndex); - builder.append(", nwkAddrAssocDevList="); - builder.append(nwkAddrAssocDevList); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/NetworkUpdateRequest.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/NetworkUpdateRequest.java deleted file mode 100644 index b9986c1e7..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/NetworkUpdateRequest.java +++ /dev/null @@ -1,192 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoRequest; -import javax.annotation.Generated; - -/** - * Network Update Request value object class. - *

    - * This command is provided to allow updating of network configuration parameters - * or to request information from devices on network conditions in the local - * operating environment. The destination addressing on this primitive shall be - * unicast or broadcast to all devices for which macRxOnWhenIdle = TRUE. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class NetworkUpdateRequest extends ZdoRequest { - /** - * ScanChannels command message field. - */ - private Integer scanChannels; - - /** - * ScanDuration command message field. - */ - private Integer scanDuration; - - /** - * ScanCount command message field. - */ - private Integer scanCount; - - /** - * nwkUpdateId command message field. - */ - private Integer nwkUpdateId; - - /** - * nwkManagerAddr command message field. - */ - private Integer nwkManagerAddr; - - /** - * Default constructor. - */ - public NetworkUpdateRequest() { - clusterId = 0x0038; - } - - /** - * Gets ScanChannels. - * - * @return the ScanChannels - */ - public Integer getScanChannels() { - return scanChannels; - } - - /** - * Sets ScanChannels. - * - * @param scanChannels the ScanChannels - */ - public void setScanChannels(final Integer scanChannels) { - this.scanChannels = scanChannels; - } - - /** - * Gets ScanDuration. - * - * @return the ScanDuration - */ - public Integer getScanDuration() { - return scanDuration; - } - - /** - * Sets ScanDuration. - * - * @param scanDuration the ScanDuration - */ - public void setScanDuration(final Integer scanDuration) { - this.scanDuration = scanDuration; - } - - /** - * Gets ScanCount. - * - * @return the ScanCount - */ - public Integer getScanCount() { - return scanCount; - } - - /** - * Sets ScanCount. - * - * @param scanCount the ScanCount - */ - public void setScanCount(final Integer scanCount) { - this.scanCount = scanCount; - } - - /** - * Gets nwkUpdateId. - * - * @return the nwkUpdateId - */ - public Integer getNwkUpdateId() { - return nwkUpdateId; - } - - /** - * Sets nwkUpdateId. - * - * @param nwkUpdateId the nwkUpdateId - */ - public void setNwkUpdateId(final Integer nwkUpdateId) { - this.nwkUpdateId = nwkUpdateId; - } - - /** - * Gets nwkManagerAddr. - * - * @return the nwkManagerAddr - */ - public Integer getNwkManagerAddr() { - return nwkManagerAddr; - } - - /** - * Sets nwkManagerAddr. - * - * @param nwkManagerAddr the nwkManagerAddr - */ - public void setNwkManagerAddr(final Integer nwkManagerAddr) { - this.nwkManagerAddr = nwkManagerAddr; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(scanChannels, ZclDataType.BITMAP_32_BIT); - serializer.serialize(scanDuration, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(scanCount, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(nwkUpdateId, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(nwkManagerAddr, ZclDataType.NWK_ADDRESS); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - scanChannels = (Integer) deserializer.deserialize(ZclDataType.BITMAP_32_BIT); - scanDuration = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - scanCount = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - nwkUpdateId = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - nwkManagerAddr = (Integer) deserializer.deserialize(ZclDataType.NWK_ADDRESS); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(181); - builder.append("NetworkUpdateRequest ["); - builder.append(super.toString()); - builder.append(", scanChannels="); - builder.append(scanChannels); - builder.append(", scanDuration="); - builder.append(scanDuration); - builder.append(", scanCount="); - builder.append(scanCount); - builder.append(", nwkUpdateId="); - builder.append(nwkUpdateId); - builder.append(", nwkManagerAddr="); - builder.append(nwkManagerAddr); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/NodeDescriptorRequest.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/NodeDescriptorRequest.java deleted file mode 100644 index 62c770dca..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/NodeDescriptorRequest.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoRequest; -import com.zsmartsystems.zigbee.ZigBeeCommand; -import com.zsmartsystems.zigbee.transaction.ZigBeeTransactionMatcher; -import com.zsmartsystems.zigbee.zdo.command.NodeDescriptorResponse; -import javax.annotation.Generated; - -/** - * Node Descriptor Request value object class. - *

    - * The Node_Desc_req command is generated from a local device wishing to inquire - * as to the node descriptor of a remote device. This command shall be unicast either - * to the remote device itself or to an alternative device that contains the discovery - * information of the remote device. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class NodeDescriptorRequest extends ZdoRequest implements ZigBeeTransactionMatcher { - /** - * NWKAddrOfInterest command message field. - */ - private Integer nwkAddrOfInterest; - - /** - * Default constructor. - */ - public NodeDescriptorRequest() { - clusterId = 0x0002; - } - - /** - * Gets NWKAddrOfInterest. - * - * @return the NWKAddrOfInterest - */ - public Integer getNwkAddrOfInterest() { - return nwkAddrOfInterest; - } - - /** - * Sets NWKAddrOfInterest. - * - * @param nwkAddrOfInterest the NWKAddrOfInterest - */ - public void setNwkAddrOfInterest(final Integer nwkAddrOfInterest) { - this.nwkAddrOfInterest = nwkAddrOfInterest; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(nwkAddrOfInterest, ZclDataType.NWK_ADDRESS); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - nwkAddrOfInterest = (Integer) deserializer.deserialize(ZclDataType.NWK_ADDRESS); - } - - @Override - public boolean isTransactionMatch(ZigBeeCommand request, ZigBeeCommand response) { - if (!(response instanceof NodeDescriptorResponse)) { - return false; - } - - return (((NodeDescriptorRequest) request).getNwkAddrOfInterest() - .equals(((NodeDescriptorResponse) response).getNwkAddrOfInterest())); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(61); - builder.append("NodeDescriptorRequest ["); - builder.append(super.toString()); - builder.append(", nwkAddrOfInterest="); - builder.append(nwkAddrOfInterest); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/NodeDescriptorResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/NodeDescriptorResponse.java deleted file mode 100644 index c255a123a..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/NodeDescriptorResponse.java +++ /dev/null @@ -1,143 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoResponse; -import javax.annotation.Generated; -import com.zsmartsystems.zigbee.zdo.ZdoStatus; -import com.zsmartsystems.zigbee.zdo.field.NodeDescriptor; - -/** - * Node Descriptor Response value object class. - *

    - * The Node_Desc_rsp is generated by a remote device in response to a - * Node_Desc_req directed to the remote device. This command shall be unicast to - * the originator of the Node_Desc_req command. - *
    - * The NWKAddrOfInterest field shall match that specified in the original - * Node_Desc_req command. If the NWKAddrOfInterest field matches the network - * address of the remote device, it shall set the Status field to - * SUCCESS and include its node descriptor in the NodeDescriptor field. - *
    - * If the NWKAddrOfInterest field does not match the network address of the - * remote device and it is an end device, it shall set the Status field to - * INV_REQUESTTYPE and not include the NodeDescriptor field. If the - * NWKAddrOfInterest field does not match the network address of the remote - * device and it is the coordinator or a router, it shall determine whether the - * NWKAddrOfInterest field matches the network address of one of its children. If - * the NWKAddrOfInterest field does not match the network address of one of the - * children of the remote device, it shall set the Status field to - * DEVICE_NOT_FOUND and not include the NodeDescriptor field. If the - * NWKAddrOfInterest matches the network address of one of the children of the - * remote device, it shall determine whether a node descriptor for that device is - * available. If a node descriptor is not available for the child indicated by the - * NWKAddrOfInterest field, the remote device shall set the Status field to - * NO_DESCRIPTOR and not include the NodeDescriptor field. If a node descriptor - * is available for the child indicated by the NWKAddrOfInterest field, the remote - * device shall set the Status field to SUCCESS and include the node descriptor of - * the matching child device in the NodeDescriptor field. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class NodeDescriptorResponse extends ZdoResponse { - /** - * NWKAddrOfInterest command message field. - */ - private Integer nwkAddrOfInterest; - - /** - * NodeDescriptor command message field. - */ - private NodeDescriptor nodeDescriptor; - - /** - * Default constructor. - */ - public NodeDescriptorResponse() { - clusterId = 0x8002; - } - - /** - * Gets NWKAddrOfInterest. - * - * @return the NWKAddrOfInterest - */ - public Integer getNwkAddrOfInterest() { - return nwkAddrOfInterest; - } - - /** - * Sets NWKAddrOfInterest. - * - * @param nwkAddrOfInterest the NWKAddrOfInterest - */ - public void setNwkAddrOfInterest(final Integer nwkAddrOfInterest) { - this.nwkAddrOfInterest = nwkAddrOfInterest; - } - - /** - * Gets NodeDescriptor. - * - * @return the NodeDescriptor - */ - public NodeDescriptor getNodeDescriptor() { - return nodeDescriptor; - } - - /** - * Sets NodeDescriptor. - * - * @param nodeDescriptor the NodeDescriptor - */ - public void setNodeDescriptor(final NodeDescriptor nodeDescriptor) { - this.nodeDescriptor = nodeDescriptor; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(status, ZclDataType.ZDO_STATUS); - serializer.serialize(nwkAddrOfInterest, ZclDataType.NWK_ADDRESS); - serializer.serialize(nodeDescriptor, ZclDataType.NODE_DESCRIPTOR); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - status = (ZdoStatus) deserializer.deserialize(ZclDataType.ZDO_STATUS); - if (status != ZdoStatus.SUCCESS) { - // Don't read the full response if we have an error - return; - } - nwkAddrOfInterest = (Integer) deserializer.deserialize(ZclDataType.NWK_ADDRESS); - nodeDescriptor = (NodeDescriptor) deserializer.deserialize(ZclDataType.NODE_DESCRIPTOR); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(122); - builder.append("NodeDescriptorResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(", nwkAddrOfInterest="); - builder.append(nwkAddrOfInterest); - builder.append(", nodeDescriptor="); - builder.append(nodeDescriptor); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/NodeDescriptorStoreRequest.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/NodeDescriptorStoreRequest.java deleted file mode 100644 index 9f0831572..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/NodeDescriptorStoreRequest.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zdo.ZdoRequest; -import javax.annotation.Generated; - -/** - * Node Descriptor Store Request value object class. - *

    - * The Node_Desc_store_req is provided to enable ZigBee end devices on the - * network to request storage of their Node Descriptor on a Primary Discovery - * Cache device which has previously received a SUCCESS status from a - * Discovery_store_req to the same Primary Discovery Cache device. Included in - * this request is the Node Descriptor the Local Device wishes to cache. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class NodeDescriptorStoreRequest extends ZdoRequest { - /** - * Default constructor. - */ - public NodeDescriptorStoreRequest() { - clusterId = 0x0017; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(29); - builder.append("NodeDescriptorStoreRequest ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/NodeDescriptorStoreResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/NodeDescriptorStoreResponse.java deleted file mode 100644 index 520ed7b65..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/NodeDescriptorStoreResponse.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zdo.ZdoResponse; -import javax.annotation.Generated; - -/** - * Node Descriptor Store Response value object class. - *

    - * The Node_store_rsp is provided to notify a Local Device of the request status - * from a Primary Discovery Cache device. Included in the response is a status code - * to notify the Local Device whether the request is successful (the Primary Cache - * Device has space to store the discovery cache data for the Local Device), whether - * the request is not supported (meaning the Remote Device is not a Primary - * Discovery Cache device), or insufficient space exists. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class NodeDescriptorStoreResponse extends ZdoResponse { - /** - * Default constructor. - */ - public NodeDescriptorStoreResponse() { - clusterId = 0x8017; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(30); - builder.append("NodeDescriptorStoreResponse ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/PowerDescriptorRequest.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/PowerDescriptorRequest.java deleted file mode 100644 index 692482a79..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/PowerDescriptorRequest.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoRequest; -import com.zsmartsystems.zigbee.ZigBeeCommand; -import com.zsmartsystems.zigbee.transaction.ZigBeeTransactionMatcher; -import com.zsmartsystems.zigbee.zdo.command.PowerDescriptorResponse; -import javax.annotation.Generated; - -/** - * Power Descriptor Request value object class. - *

    - * The Power_Desc_req command is generated from a local device wishing to - * inquire as to the power descriptor of a remote device. This command shall be - * unicast either to the remote device itself or to an alternative device that contains - * the discovery information of the remote device. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class PowerDescriptorRequest extends ZdoRequest implements ZigBeeTransactionMatcher { - /** - * NWKAddrOfInterest command message field. - */ - private Integer nwkAddrOfInterest; - - /** - * Default constructor. - */ - public PowerDescriptorRequest() { - clusterId = 0x0003; - } - - /** - * Gets NWKAddrOfInterest. - * - * @return the NWKAddrOfInterest - */ - public Integer getNwkAddrOfInterest() { - return nwkAddrOfInterest; - } - - /** - * Sets NWKAddrOfInterest. - * - * @param nwkAddrOfInterest the NWKAddrOfInterest - */ - public void setNwkAddrOfInterest(final Integer nwkAddrOfInterest) { - this.nwkAddrOfInterest = nwkAddrOfInterest; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(nwkAddrOfInterest, ZclDataType.NWK_ADDRESS); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - nwkAddrOfInterest = (Integer) deserializer.deserialize(ZclDataType.NWK_ADDRESS); - } - - @Override - public boolean isTransactionMatch(ZigBeeCommand request, ZigBeeCommand response) { - if (!(response instanceof PowerDescriptorResponse)) { - return false; - } - - return (((PowerDescriptorRequest) request).getNwkAddrOfInterest() - .equals(((PowerDescriptorResponse) response).getNwkAddrOfInterest())); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(62); - builder.append("PowerDescriptorRequest ["); - builder.append(super.toString()); - builder.append(", nwkAddrOfInterest="); - builder.append(nwkAddrOfInterest); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/PowerDescriptorResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/PowerDescriptorResponse.java deleted file mode 100644 index e1f33f138..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/PowerDescriptorResponse.java +++ /dev/null @@ -1,120 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoResponse; -import javax.annotation.Generated; -import com.zsmartsystems.zigbee.zdo.ZdoStatus; -import com.zsmartsystems.zigbee.zdo.field.PowerDescriptor; - -/** - * Power Descriptor Response value object class. - *

    - * The Power_Desc_rsp is generated by a remote device in response to a - * Power_Desc_req directed to the remote device. This command shall be unicast to - * the originator of the Power_Desc_req command. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class PowerDescriptorResponse extends ZdoResponse { - /** - * NWKAddrOfInterest command message field. - */ - private Integer nwkAddrOfInterest; - - /** - * PowerDescriptor command message field. - */ - private PowerDescriptor powerDescriptor; - - /** - * Default constructor. - */ - public PowerDescriptorResponse() { - clusterId = 0x8003; - } - - /** - * Gets NWKAddrOfInterest. - * - * @return the NWKAddrOfInterest - */ - public Integer getNwkAddrOfInterest() { - return nwkAddrOfInterest; - } - - /** - * Sets NWKAddrOfInterest. - * - * @param nwkAddrOfInterest the NWKAddrOfInterest - */ - public void setNwkAddrOfInterest(final Integer nwkAddrOfInterest) { - this.nwkAddrOfInterest = nwkAddrOfInterest; - } - - /** - * Gets PowerDescriptor. - * - * @return the PowerDescriptor - */ - public PowerDescriptor getPowerDescriptor() { - return powerDescriptor; - } - - /** - * Sets PowerDescriptor. - * - * @param powerDescriptor the PowerDescriptor - */ - public void setPowerDescriptor(final PowerDescriptor powerDescriptor) { - this.powerDescriptor = powerDescriptor; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(status, ZclDataType.ZDO_STATUS); - serializer.serialize(nwkAddrOfInterest, ZclDataType.NWK_ADDRESS); - serializer.serialize(powerDescriptor, ZclDataType.POWER_DESCRIPTOR); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - status = (ZdoStatus) deserializer.deserialize(ZclDataType.ZDO_STATUS); - if (status != ZdoStatus.SUCCESS) { - // Don't read the full response if we have an error - return; - } - nwkAddrOfInterest = (Integer) deserializer.deserialize(ZclDataType.NWK_ADDRESS); - powerDescriptor = (PowerDescriptor) deserializer.deserialize(ZclDataType.POWER_DESCRIPTOR); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(124); - builder.append("PowerDescriptorResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(", nwkAddrOfInterest="); - builder.append(nwkAddrOfInterest); - builder.append(", powerDescriptor="); - builder.append(powerDescriptor); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/PowerDescriptorStoreRequest.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/PowerDescriptorStoreRequest.java deleted file mode 100644 index b3147b311..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/PowerDescriptorStoreRequest.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zdo.ZdoRequest; -import javax.annotation.Generated; - -/** - * Power Descriptor Store Request value object class. - *

    - * The Power_Desc_store_req is provided to enable ZigBee end devices on the - * network to request storage of their Power Descriptor on a Primary Discovery - * Cache device which has previously received a SUCCESS status from a - * Discovery_store_req to the same Primary Discovery Cache device. Included in - * this request is the Power Descriptor the Local Device wishes to cache. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class PowerDescriptorStoreRequest extends ZdoRequest { - /** - * Default constructor. - */ - public PowerDescriptorStoreRequest() { - clusterId = 0x0018; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(30); - builder.append("PowerDescriptorStoreRequest ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/PowerDescriptorStoreResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/PowerDescriptorStoreResponse.java deleted file mode 100644 index 093f7c559..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/PowerDescriptorStoreResponse.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zdo.ZdoResponse; -import javax.annotation.Generated; - -/** - * Power Descriptor Store Response value object class. - *

    - * The Power_Desc_store_rsp is provided to notify a Local Device of the request - * status from a Primary Discovery Cache device. Included in the response is a status - * code to notify the Local Device whether the request is successful (the Primary - * Cache Device has space to store the discovery cache data for the Local Device), - * whether the request is not supported (meaning the Remote Device is not a Primary - * Discovery Cache device), or insufficient space exists. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class PowerDescriptorStoreResponse extends ZdoResponse { - /** - * Default constructor. - */ - public PowerDescriptorStoreResponse() { - clusterId = 0x8018; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(31); - builder.append("PowerDescriptorStoreResponse ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/RecoverBindTableRequest.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/RecoverBindTableRequest.java deleted file mode 100644 index ad9a12ca5..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/RecoverBindTableRequest.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zdo.ZdoRequest; -import javax.annotation.Generated; - -/** - * Recover Bind Table Request value object class. - *

    - * The Recover_Bind_Table_req is generated from a local primary binding table - * cache and sent to a remote backup binding table cache device when it wants a - * complete restore of the binding table. The destination addressing mode for this - * request is unicast. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class RecoverBindTableRequest extends ZdoRequest { - /** - * Default constructor. - */ - public RecoverBindTableRequest() { - clusterId = 0x0028; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(26); - builder.append("RecoverBindTableRequest ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/RecoverBindTableResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/RecoverBindTableResponse.java deleted file mode 100644 index 0d949df40..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/RecoverBindTableResponse.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zdo.ZdoResponse; -import javax.annotation.Generated; - -/** - * Recover Bind Table Response value object class. - *

    - * The Recover_Bind_Table_rsp is generated from a backup binding table cache - * device in response to a Recover_Bind_Table_req from a primary binding table - * cache and contains the status of the request. This command shall be unicast to the - * requesting device. If the responding device is not a backup binding table cache, it - * shall return a status of NOT_SUPPORTED. If the originator of the request is not - * recognized as a primary binding table cache it shall return a status of - * INV_REQUESTTYPE. Otherwise, the backup binding table cache shall prepare a - * list of binding table entries from its backup beginning with StartIndex. It will fit in - * as many entries as possible into a Recover_Bind_Table_rsp command and return a - * status of SUCCESS. If StartIndex is more than the number of entries in the - * Binding table, a status of NO_ENTRY is returned. For a successful response, - * BindingTableEntries is the total number of entries in the backup binding table, and - * BindingTableListCount is the number of entries which is being returned in the - * response. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class RecoverBindTableResponse extends ZdoResponse { - /** - * Default constructor. - */ - public RecoverBindTableResponse() { - clusterId = 0x8028; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(27); - builder.append("RecoverBindTableResponse ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/RecoverSourceBindRequest.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/RecoverSourceBindRequest.java deleted file mode 100644 index d723b6b9c..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/RecoverSourceBindRequest.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoRequest; -import javax.annotation.Generated; - -/** - * Recover Source Bind Request value object class. - *

    - * The Recover_Source_Bind_req is generated from a local primary binding table - * cache and sent to the remote backup binding table cache device when it wants a - * complete restore of the source binding table. The destination addressing mode for - * this request is unicast. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class RecoverSourceBindRequest extends ZdoRequest { - /** - * StartIndex command message field. - */ - private Integer startIndex; - - /** - * Default constructor. - */ - public RecoverSourceBindRequest() { - clusterId = 0x002A; - } - - /** - * Gets StartIndex. - * - * @return the StartIndex - */ - public Integer getStartIndex() { - return startIndex; - } - - /** - * Sets StartIndex. - * - * @param startIndex the StartIndex - */ - public void setStartIndex(final Integer startIndex) { - this.startIndex = startIndex; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(startIndex, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - startIndex = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(57); - builder.append("RecoverSourceBindRequest ["); - builder.append(super.toString()); - builder.append(", startIndex="); - builder.append(startIndex); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/RecoverSourceBindResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/RecoverSourceBindResponse.java deleted file mode 100644 index 017b53dcd..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/RecoverSourceBindResponse.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zdo.ZdoResponse; -import javax.annotation.Generated; - -/** - * Recover Source Bind Response value object class. - *

    - * The Recover_Source_Bind_rsp is generated from a backup binding table cache - * device in response to a Recover_Source_Bind_req from a primary binding table - * cache and contains the status of the request. This command shall be unicast to the - * requesting device. If the responding device is not a backup binding table cache, it - * shall return a status of NOT_SUPPORTED. If the originator of the request is not - * recognized as a primary binding table cache, it shall return a status of - * INV_REQUESTTYPE. Otherwise, the backup binding table cache shall prepare a - * list of binding table entries from its backup beginning with StartIndex. It will fit in - * as many entries as possible into a Recover_Source_Bind_rsp command and return - * a status of SUCCESS. If StartIndex is more than the number of entries in the - * Source table, a status of NO_ENTRY is returned. For a successful response, - * SourceTableEntries is the total number of entries in the backup source table, and - * SourceTableListCount is the number of entries which is being returned in the - * response. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class RecoverSourceBindResponse extends ZdoResponse { - /** - * Default constructor. - */ - public RecoverSourceBindResponse() { - clusterId = 0x8029; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(28); - builder.append("RecoverSourceBindResponse ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/RemoveBackupBindEntryResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/RemoveBackupBindEntryResponse.java deleted file mode 100644 index 97726b0ee..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/RemoveBackupBindEntryResponse.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoResponse; -import javax.annotation.Generated; -import com.zsmartsystems.zigbee.zdo.ZdoStatus; - -/** - * Remove Backup Bind Entry Response value object class. - *

    - * The Remove_Bkup_Bind_Entry_rsp is generated from a backup binding table - * cache device in response to a Remove_Bkup_Bind_Entry_req from the primary - * binding table cache and contains the status of the request. This command shall be - * unicast to the requesting device. If the remote device is not a backup binding table - * cache, it shall return a status of NOT_SUPPORTED. If the originator of the - * request is not recognized as a primary binding table cache, it shall return a status - * of INV_REQUESTTYPE. Otherwise, the backup binding table cache shall delete - * the binding entry from its binding table and return a status of SUCCESS. If the - * entry is not found, it shall return a status of NO_ENTRY. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class RemoveBackupBindEntryResponse extends ZdoResponse { - /** - * EntryCount command message field. - */ - private Integer entryCount; - - /** - * Default constructor. - */ - public RemoveBackupBindEntryResponse() { - clusterId = 0x8026; - } - - /** - * Gets EntryCount. - * - * @return the EntryCount - */ - public Integer getEntryCount() { - return entryCount; - } - - /** - * Sets EntryCount. - * - * @param entryCount the EntryCount - */ - public void setEntryCount(final Integer entryCount) { - this.entryCount = entryCount; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(status, ZclDataType.ZDO_STATUS); - serializer.serialize(entryCount, ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - status = (ZdoStatus) deserializer.deserialize(ZclDataType.ZDO_STATUS); - if (status != ZdoStatus.SUCCESS) { - // Don't read the full response if we have an error - return; - } - entryCount = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(88); - builder.append("RemoveBackupBindEntryResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(", entryCount="); - builder.append(entryCount); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/RemoveBackupBindTableRequest.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/RemoveBackupBindTableRequest.java deleted file mode 100644 index c4fce4eb8..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/RemoveBackupBindTableRequest.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zdo.ZdoRequest; -import javax.annotation.Generated; - -/** - * Remove Backup Bind Table Request value object class. - *

    - * The Remove_Bkup_Bind_Entry_req is generated from a local primary binding - * table cache and sent to a remote backup binding table cache device to request - * removal of the entry from backup storage. It will be generated whenever a binding - * table entry has been unbound by the primary binding table cache. The destination - * addressing mode for this request is unicast. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class RemoveBackupBindTableRequest extends ZdoRequest { - /** - * Default constructor. - */ - public RemoveBackupBindTableRequest() { - clusterId = 0x0026; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(31); - builder.append("RemoveBackupBindTableRequest ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/RemoveNodeCache.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/RemoveNodeCache.java deleted file mode 100644 index 0bbc4da3f..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/RemoveNodeCache.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zdo.ZdoResponse; -import javax.annotation.Generated; - -/** - * Remove Node Cache value object class. - *

    - * The Remove_node_cache_rsp is provided to notify a Local Device of the request - * status from a Primary Discovery Cache device. Included in the response is a status - * code to notify the Local Device whether the request is successful (the Primary - * Cache Device has removed the discovery cache data for the indicated device of - * interest), or the request is not supported (meaning the Remote Device is not a - * Primary Discovery Cache device). - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class RemoveNodeCache extends ZdoResponse { - /** - * Default constructor. - */ - public RemoveNodeCache() { - clusterId = 0x801B; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(18); - builder.append("RemoveNodeCache ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/RemoveNodeCacheRequest.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/RemoveNodeCacheRequest.java deleted file mode 100644 index c4cf0e176..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/RemoveNodeCacheRequest.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zdo.ZdoRequest; -import javax.annotation.Generated; - -/** - * Remove Node Cache Request value object class. - *

    - * The Remove_node_cache_req is provided to enable ZigBee devices on the - * network to request removal of discovery cache information for a specified ZigBee - * end device from a Primary Discovery Cache device. The effect of a successful - * Remove_node_cache_req is to undo a previously successful Discovery_store_req - * and additionally remove any cache information stored on behalf of the specified - * ZigBee end device on the Primary Discovery Cache device. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class RemoveNodeCacheRequest extends ZdoRequest { - /** - * Default constructor. - */ - public RemoveNodeCacheRequest() { - clusterId = 0x001B; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(25); - builder.append("RemoveNodeCacheRequest ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ReplaceDeviceRequest.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ReplaceDeviceRequest.java deleted file mode 100644 index fc8c7b933..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ReplaceDeviceRequest.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zdo.ZdoRequest; -import javax.annotation.Generated; - -/** - * Replace Device Request value object class. - *

    - * The Replace_Device_req is intended for use by a special device such as a - * Commissioning tool and is sent to a primary binding table cache device to change - * all binding table entries which match OldAddress and OldEndpoint as specified. - * Note that OldEndpoint = 0 has special meaning and signifies that only the address - * needs to be matched. The endpoint in the binding table will not be changed in this - * case and so NewEndpoint is ignored. The processing changes all binding table - * entries for which the source address is the same as OldAddress and, if - * OldEndpoint is non-zero, for which the source endpoint is the same as - * OldEndpoint. It shall also change all binding table entries which have the - * destination address the same as OldAddress and, if OldEndpoint is non-zero, the - * destination endpoint the same as OldEndpoint. The destination addressing mode - * for this request is unicast. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class ReplaceDeviceRequest extends ZdoRequest { - /** - * Default constructor. - */ - public ReplaceDeviceRequest() { - clusterId = 0x0024; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(23); - builder.append("ReplaceDeviceRequest ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ReplaceDeviceResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ReplaceDeviceResponse.java deleted file mode 100644 index e332830b1..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/ReplaceDeviceResponse.java +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoResponse; -import javax.annotation.Generated; -import com.zsmartsystems.zigbee.zdo.ZdoStatus; - -/** - * Replace Device Response value object class. - *

    - * The Replace_Device_rsp is generated from a primary binding table cache device - * in response to a Replace_Device_req and contains the status of the request. This - * command shall be unicast to the requesting device. If the device receiving the - * Replace_Device_req is not a primary binding table cache, a Status of - * NOT_SUPPORTED is returned. The primary binding table cache shall search its - * binding table for entries whose source address and source endpoint, or whose - * destination address and destination endpoint match OldAddress and OldEndpoint, - * as described in the text for Replace_Device_req. It shall change these entries to - * have NewAddress and possibly NewEndpoint. It shall then return a response of - * SUCCESS. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class ReplaceDeviceResponse extends ZdoResponse { - /** - * Default constructor. - */ - public ReplaceDeviceResponse() { - clusterId = 0x8024; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(status, ZclDataType.ZDO_STATUS); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - status = (ZdoStatus) deserializer.deserialize(ZclDataType.ZDO_STATUS); - if (status != ZdoStatus.SUCCESS) { - // Don't read the full response if we have an error - return; - } - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(50); - builder.append("ReplaceDeviceResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/SimpleDescriptorRequest.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/SimpleDescriptorRequest.java deleted file mode 100644 index 8476425fc..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/SimpleDescriptorRequest.java +++ /dev/null @@ -1,126 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoRequest; -import com.zsmartsystems.zigbee.ZigBeeCommand; -import com.zsmartsystems.zigbee.transaction.ZigBeeTransactionMatcher; -import com.zsmartsystems.zigbee.zdo.command.SimpleDescriptorResponse; -import javax.annotation.Generated; - -/** - * Simple Descriptor Request value object class. - *

    - * The Simple_Desc_req command is generated from a local device wishing to - * inquire as to the simple descriptor of a remote device on a specified endpoint. This - * command shall be unicast either to the remote device itself or to an alternative - * device that contains the discovery information of the remote device. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:39:59Z") -public class SimpleDescriptorRequest extends ZdoRequest implements ZigBeeTransactionMatcher { - /** - * NWKAddrOfInterest command message field. - */ - private Integer nwkAddrOfInterest; - - /** - * Endpoint command message field. - */ - private Integer endpoint; - - /** - * Default constructor. - */ - public SimpleDescriptorRequest() { - clusterId = 0x0004; - } - - /** - * Gets NWKAddrOfInterest. - * - * @return the NWKAddrOfInterest - */ - public Integer getNwkAddrOfInterest() { - return nwkAddrOfInterest; - } - - /** - * Sets NWKAddrOfInterest. - * - * @param nwkAddrOfInterest the NWKAddrOfInterest - */ - public void setNwkAddrOfInterest(final Integer nwkAddrOfInterest) { - this.nwkAddrOfInterest = nwkAddrOfInterest; - } - - /** - * Gets Endpoint. - * - * @return the Endpoint - */ - public Integer getEndpoint() { - return endpoint; - } - - /** - * Sets Endpoint. - * - * @param endpoint the Endpoint - */ - public void setEndpoint(final Integer endpoint) { - this.endpoint = endpoint; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(nwkAddrOfInterest, ZclDataType.NWK_ADDRESS); - serializer.serialize(endpoint, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - nwkAddrOfInterest = (Integer) deserializer.deserialize(ZclDataType.NWK_ADDRESS); - endpoint = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public boolean isTransactionMatch(ZigBeeCommand request, ZigBeeCommand response) { - if (!(response instanceof SimpleDescriptorResponse)) { - return false; - } - - return (((SimpleDescriptorRequest) request).getEndpoint() - .equals(((SimpleDescriptorResponse) response).getSimpleDescriptor().getEndpoint())) - && (((SimpleDescriptorRequest) request).getNwkAddrOfInterest() - .equals(((SimpleDescriptorResponse) response).getNwkAddrOfInterest())); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(91); - builder.append("SimpleDescriptorRequest ["); - builder.append(super.toString()); - builder.append(", nwkAddrOfInterest="); - builder.append(nwkAddrOfInterest); - builder.append(", endpoint="); - builder.append(endpoint); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/SimpleDescriptorResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/SimpleDescriptorResponse.java deleted file mode 100644 index 9792aa08f..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/SimpleDescriptorResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoResponse; -import javax.annotation.Generated; -import com.zsmartsystems.zigbee.zdo.ZdoStatus; -import com.zsmartsystems.zigbee.zdo.field.SimpleDescriptor; - -/** - * Simple Descriptor Response value object class. - *

    - * The Simple_Desc_rsp is generated by a remote device in response to a - * Simple_Desc_req directed to the remote device. This command shall be unicast to - * the originator of the Simple_Desc_req command. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class SimpleDescriptorResponse extends ZdoResponse { - /** - * NWKAddrOfInterest command message field. - */ - private Integer nwkAddrOfInterest; - - /** - * Length command message field. - */ - private Integer length; - - /** - * SimpleDescriptor command message field. - */ - private SimpleDescriptor simpleDescriptor; - - /** - * Default constructor. - */ - public SimpleDescriptorResponse() { - clusterId = 0x8004; - } - - /** - * Gets NWKAddrOfInterest. - * - * @return the NWKAddrOfInterest - */ - public Integer getNwkAddrOfInterest() { - return nwkAddrOfInterest; - } - - /** - * Sets NWKAddrOfInterest. - * - * @param nwkAddrOfInterest the NWKAddrOfInterest - */ - public void setNwkAddrOfInterest(final Integer nwkAddrOfInterest) { - this.nwkAddrOfInterest = nwkAddrOfInterest; - } - - /** - * Gets Length. - * - * @return the Length - */ - public Integer getLength() { - return length; - } - - /** - * Sets Length. - * - * @param length the Length - */ - public void setLength(final Integer length) { - this.length = length; - } - - /** - * Gets SimpleDescriptor. - * - * @return the SimpleDescriptor - */ - public SimpleDescriptor getSimpleDescriptor() { - return simpleDescriptor; - } - - /** - * Sets SimpleDescriptor. - * - * @param simpleDescriptor the SimpleDescriptor - */ - public void setSimpleDescriptor(final SimpleDescriptor simpleDescriptor) { - this.simpleDescriptor = simpleDescriptor; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(status, ZclDataType.ZDO_STATUS); - serializer.serialize(nwkAddrOfInterest, ZclDataType.NWK_ADDRESS); - serializer.serialize(length, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(simpleDescriptor, ZclDataType.SIMPLE_DESCRIPTOR); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - status = (ZdoStatus) deserializer.deserialize(ZclDataType.ZDO_STATUS); - if (status != ZdoStatus.SUCCESS) { - // Don't read the full response if we have an error - return; - } - nwkAddrOfInterest = (Integer) deserializer.deserialize(ZclDataType.NWK_ADDRESS); - length = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - simpleDescriptor = (SimpleDescriptor) deserializer.deserialize(ZclDataType.SIMPLE_DESCRIPTOR); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(152); - builder.append("SimpleDescriptorResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(", nwkAddrOfInterest="); - builder.append(nwkAddrOfInterest); - builder.append(", length="); - builder.append(length); - builder.append(", simpleDescriptor="); - builder.append(simpleDescriptor); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/SimpleDescriptorStore.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/SimpleDescriptorStore.java deleted file mode 100644 index 61074dc90..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/SimpleDescriptorStore.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zdo.ZdoResponse; -import javax.annotation.Generated; - -/** - * Simple Descriptor Store value object class. - *

    - * The Simple_desc_store_req is provided to enable ZigBee end devices on the - * network to request storage of their list of Simple Descriptors on a Primary - * Discovery Cache device which has previously received a SUCCESS status from a - * Discovery_store_req to the same Primary Discovery Cache device. Note that each - * Simple Descriptor for every active endpoint on the Local Device must be - * individually uploaded to the Primary Discovery Cache device via this command - * to enable cached discovery. Included in this request is the length of the Simple - * Descriptor the Local Device wishes to cache and the Simple Descriptor itself. The - * endpoint is a field within the Simple Descriptor and is accessed by the Remote - * Device to manage the discovery cache information for the Local Device. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class SimpleDescriptorStore extends ZdoResponse { - /** - * Default constructor. - */ - public SimpleDescriptorStore() { - clusterId = 0x001A; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(24); - builder.append("SimpleDescriptorStore ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/SimpleDescriptorStoreResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/SimpleDescriptorStoreResponse.java deleted file mode 100644 index 3bc240120..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/SimpleDescriptorStoreResponse.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zdo.ZdoResponse; -import javax.annotation.Generated; - -/** - * Simple Descriptor Store Response value object class. - *

    - * The Simple_Desc_store_rsp is provided to notify a Local Device of the request - * status from a Primary Discovery Cache device. Included in the response is a status - * code to notify the Local Device whether the request is successful (the Primary - * Cache Device has space to store the discovery cache data for the Local Device), - * the request is not supported (meaning the Remote Device is not a Primary - * Discovery Cache device), or insufficient space exists. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class SimpleDescriptorStoreResponse extends ZdoResponse { - /** - * Default constructor. - */ - public SimpleDescriptorStoreResponse() { - clusterId = 0x801A; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(32); - builder.append("SimpleDescriptorStoreResponse ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/StoreBackupBindEntryRequest.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/StoreBackupBindEntryRequest.java deleted file mode 100644 index 1609cbf89..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/StoreBackupBindEntryRequest.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zdo.ZdoRequest; -import javax.annotation.Generated; - -/** - * Store Backup Bind Entry Request value object class. - *

    - * The Store_Bkup_Bind_Entry_req is generated from a local primary binding table - * cache and sent to a remote backup binding table cache device to request backup - * storage of the entry. It will be generated whenever a new binding table entry has - * been created by the primary binding table cache. The destination addressing mode - * for this request is unicast. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class StoreBackupBindEntryRequest extends ZdoRequest { - /** - * Default constructor. - */ - public StoreBackupBindEntryRequest() { - clusterId = 0x0025; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(30); - builder.append("StoreBackupBindEntryRequest ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/StoreBackupBindEntryResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/StoreBackupBindEntryResponse.java deleted file mode 100644 index 42c5cace0..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/StoreBackupBindEntryResponse.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoResponse; -import javax.annotation.Generated; -import com.zsmartsystems.zigbee.zdo.ZdoStatus; - -/** - * Store Backup Bind Entry Response value object class. - *

    - * The Store_Bkup_Bind_Entry_rsp is generated from a backup binding table cache - * device in response to a Store_Bkup_Bind_Entry_req from a primary binding table - * cache, and contains the status of the request. This command shall be unicast to the - * requesting device. If the remote device is not a backup binding table cache, it shall - * return a status of NOT_SUPPORTED. If the originator of the request is not - * recognized as a primary binding table cache, it shall return a status of - * INV_REQUESTTYPE. Otherwise, the backup binding table cache shall add the - * binding entry to its binding table and return a status of SUCCESS. If there is no - * room, it shall return a status of TABLE_FULL. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class StoreBackupBindEntryResponse extends ZdoResponse { - /** - * Default constructor. - */ - public StoreBackupBindEntryResponse() { - clusterId = 0x8025; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(status, ZclDataType.ZDO_STATUS); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - status = (ZdoStatus) deserializer.deserialize(ZclDataType.ZDO_STATUS); - if (status != ZdoStatus.SUCCESS) { - // Don't read the full response if we have an error - return; - } - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(57); - builder.append("StoreBackupBindEntryResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/SystemServerDiscoveryRequest.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/SystemServerDiscoveryRequest.java deleted file mode 100644 index f4985bef3..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/SystemServerDiscoveryRequest.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zdo.ZdoRequest; -import javax.annotation.Generated; - -/** - * System Server Discovery Request value object class. - *

    - * The System_Server_Discovery_req is generated from a Local Device wishing to - * discover the location of a particular system server or servers as indicated by the - * ServerMask parameter. The destination addressing on this request is "broadcast to - * all devices for which macRxOnWhenIdle = TRUE". - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class SystemServerDiscoveryRequest extends ZdoRequest { - /** - * Default constructor. - */ - public SystemServerDiscoveryRequest() { - clusterId = 0x0015; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(31); - builder.append("SystemServerDiscoveryRequest ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/UnbindRequest.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/UnbindRequest.java deleted file mode 100644 index 9aff7a9fd..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/UnbindRequest.java +++ /dev/null @@ -1,290 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoRequest; -import com.zsmartsystems.zigbee.ZigBeeCommand; -import com.zsmartsystems.zigbee.transaction.ZigBeeTransactionMatcher; -import com.zsmartsystems.zigbee.zdo.command.UnbindResponse; -import javax.annotation.Generated; -import com.zsmartsystems.zigbee.IeeeAddress; -import com.zsmartsystems.zigbee.IeeeAddress; - -/** - * Unbind Request value object class. - *

    - * The Unbind_req is generated from a Local Device wishing to remove a Binding - * Table entry for the source and destination addresses contained as parameters. The - * destination addressing on this command shall be unicast only and the destination - * address must be that of the a Primary binding table cache or the SrcAddress. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-23T21:55:42Z") -public class UnbindRequest extends ZdoRequest implements ZigBeeTransactionMatcher { - /** - * SrcAddress command message field. - *

    - * The IEEE address for the source. - */ - private IeeeAddress srcAddress; - - /** - * SrcEndpoint command message field. - *

    - * The source endpoint for the binding entry. - */ - private Integer srcEndpoint; - - /** - * BindCluster command message field. - *

    - * The identifier of the cluster on the source device that is bound to the destination. - */ - private Integer bindCluster; - - /** - * DstAddrMode command message field. - *

    - * The addressing mode for the destination address used in this command. This field - * can take one of the non-reserved values from the following list: - * 0x00 = reserved - * 0x01 = 16-bit group address for DstAddress and DstEndp not present - * 0x02 = reserved - * 0x03 = 64-bit extended address for DstAddress and DstEndp present - * 0x04 – 0xff = reserved - */ - private Integer dstAddrMode; - - /** - * DstAddress command message field. - *

    - * The destination address for the binding entry. - */ - private IeeeAddress dstAddress; - - /** - * DstEndpoint command message field. - *

    - * This field shall be present only if the DstAddrMode field has a value of 0x03 and, - * if present, shall be the destination endpoint for the binding entry. - */ - private Integer dstEndpoint; - - /** - * Default constructor. - */ - public UnbindRequest() { - clusterId = 0x0022; - } - - /** - * Gets SrcAddress. - *

    - * The IEEE address for the source. - * - * @return the SrcAddress - */ - public IeeeAddress getSrcAddress() { - return srcAddress; - } - - /** - * Sets SrcAddress. - *

    - * The IEEE address for the source. - * - * @param srcAddress the SrcAddress - */ - public void setSrcAddress(final IeeeAddress srcAddress) { - this.srcAddress = srcAddress; - } - - /** - * Gets SrcEndpoint. - *

    - * The source endpoint for the binding entry. - * - * @return the SrcEndpoint - */ - public Integer getSrcEndpoint() { - return srcEndpoint; - } - - /** - * Sets SrcEndpoint. - *

    - * The source endpoint for the binding entry. - * - * @param srcEndpoint the SrcEndpoint - */ - public void setSrcEndpoint(final Integer srcEndpoint) { - this.srcEndpoint = srcEndpoint; - } - - /** - * Gets BindCluster. - *

    - * The identifier of the cluster on the source device that is bound to the destination. - * - * @return the BindCluster - */ - public Integer getBindCluster() { - return bindCluster; - } - - /** - * Sets BindCluster. - *

    - * The identifier of the cluster on the source device that is bound to the destination. - * - * @param bindCluster the BindCluster - */ - public void setBindCluster(final Integer bindCluster) { - this.bindCluster = bindCluster; - } - - /** - * Gets DstAddrMode. - *

    - * The addressing mode for the destination address used in this command. This field - * can take one of the non-reserved values from the following list: - * 0x00 = reserved - * 0x01 = 16-bit group address for DstAddress and DstEndp not present - * 0x02 = reserved - * 0x03 = 64-bit extended address for DstAddress and DstEndp present - * 0x04 – 0xff = reserved - * - * @return the DstAddrMode - */ - public Integer getDstAddrMode() { - return dstAddrMode; - } - - /** - * Sets DstAddrMode. - *

    - * The addressing mode for the destination address used in this command. This field - * can take one of the non-reserved values from the following list: - * 0x00 = reserved - * 0x01 = 16-bit group address for DstAddress and DstEndp not present - * 0x02 = reserved - * 0x03 = 64-bit extended address for DstAddress and DstEndp present - * 0x04 – 0xff = reserved - * - * @param dstAddrMode the DstAddrMode - */ - public void setDstAddrMode(final Integer dstAddrMode) { - this.dstAddrMode = dstAddrMode; - } - - /** - * Gets DstAddress. - *

    - * The destination address for the binding entry. - * - * @return the DstAddress - */ - public IeeeAddress getDstAddress() { - return dstAddress; - } - - /** - * Sets DstAddress. - *

    - * The destination address for the binding entry. - * - * @param dstAddress the DstAddress - */ - public void setDstAddress(final IeeeAddress dstAddress) { - this.dstAddress = dstAddress; - } - - /** - * Gets DstEndpoint. - *

    - * This field shall be present only if the DstAddrMode field has a value of 0x03 and, - * if present, shall be the destination endpoint for the binding entry. - * - * @return the DstEndpoint - */ - public Integer getDstEndpoint() { - return dstEndpoint; - } - - /** - * Sets DstEndpoint. - *

    - * This field shall be present only if the DstAddrMode field has a value of 0x03 and, - * if present, shall be the destination endpoint for the binding entry. - * - * @param dstEndpoint the DstEndpoint - */ - public void setDstEndpoint(final Integer dstEndpoint) { - this.dstEndpoint = dstEndpoint; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(srcAddress, ZclDataType.IEEE_ADDRESS); - serializer.serialize(srcEndpoint, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(bindCluster, ZclDataType.UNSIGNED_16_BIT_INTEGER); - serializer.serialize(dstAddrMode, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(dstAddress, ZclDataType.IEEE_ADDRESS); - serializer.serialize(dstEndpoint, ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - srcAddress = (IeeeAddress) deserializer.deserialize(ZclDataType.IEEE_ADDRESS); - srcEndpoint = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - bindCluster = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_16_BIT_INTEGER); - dstAddrMode = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - dstAddress = (IeeeAddress) deserializer.deserialize(ZclDataType.IEEE_ADDRESS); - dstEndpoint = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - } - - @Override - public boolean isTransactionMatch(ZigBeeCommand request, ZigBeeCommand response) { - if (!(response instanceof UnbindResponse)) { - return false; - } - - return ((ZdoRequest) request).getDestinationAddress().equals(((UnbindResponse) response).getSourceAddress()); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(200); - builder.append("UnbindRequest ["); - builder.append(super.toString()); - builder.append(", srcAddress="); - builder.append(srcAddress); - builder.append(", srcEndpoint="); - builder.append(srcEndpoint); - builder.append(", bindCluster="); - builder.append(bindCluster); - builder.append(", dstAddrMode="); - builder.append(dstAddrMode); - builder.append(", dstAddress="); - builder.append(dstAddress); - builder.append(", dstEndpoint="); - builder.append(dstEndpoint); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/UnbindResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/UnbindResponse.java deleted file mode 100644 index 243fa9f27..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/UnbindResponse.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoResponse; -import javax.annotation.Generated; -import com.zsmartsystems.zigbee.zdo.ZdoStatus; - -/** - * Unbind Response value object class. - *

    - * The Unbind_rsp is generated in response to an Unbind_req. If the Unbind_req is - * processed and the corresponding Binding Table entry is removed from the Remote - * Device, a Status of SUCCESS is returned. If the Remote Device is not the ZigBee - * Coordinator or the SrcAddress, a Status of NOT_SUPPORTED is returned. The - * supplied endpoint shall be checked to determine whether it falls within the - * specified range. If it does not, a Status of INVALID_EP shall be returned If the - * Remote Device is the ZigBee Coordinator or SrcAddress but does not have a - * Binding Table entry corresponding to the parameters received in the request, a - * Status of NO_ENTRY is returned. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class UnbindResponse extends ZdoResponse { - /** - * Default constructor. - */ - public UnbindResponse() { - clusterId = 0x8022; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(status, ZclDataType.ZDO_STATUS); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - status = (ZdoStatus) deserializer.deserialize(ZclDataType.ZDO_STATUS); - if (status != ZdoStatus.SUCCESS) { - // Don't read the full response if we have an error - return; - } - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(43); - builder.append("UnbindResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/UserDescriptorConf.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/UserDescriptorConf.java deleted file mode 100644 index 96c2636b1..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/UserDescriptorConf.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zdo.ZdoResponse; -import javax.annotation.Generated; - -/** - * User Descriptor Conf value object class. - *

    - * The User_Desc_conf is generated by a remote device in response to a - * User_Desc_set directed to the remote device. This command shall be unicast to - * the originator of the User_Desc_set command. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class UserDescriptorConf extends ZdoResponse { - /** - * Default constructor. - */ - public UserDescriptorConf() { - clusterId = 0x8014; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(21); - builder.append("UserDescriptorConf ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/UserDescriptorRequest.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/UserDescriptorRequest.java deleted file mode 100644 index 49781dc9a..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/UserDescriptorRequest.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoRequest; -import com.zsmartsystems.zigbee.ZigBeeCommand; -import com.zsmartsystems.zigbee.transaction.ZigBeeTransactionMatcher; -import com.zsmartsystems.zigbee.zdo.command.UserDescriptorResponse; -import javax.annotation.Generated; - -/** - * User Descriptor Request value object class. - *

    - * The User_Desc_req command is generated from a local device wishing to inquire - * as to the user descriptor of a remote device. This command shall be unicast either - * to the remote device itself or to an alternative device that contains the discovery - * information of the remote device. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class UserDescriptorRequest extends ZdoRequest implements ZigBeeTransactionMatcher { - /** - * NWKAddrOfInterest command message field. - */ - private Integer nwkAddrOfInterest; - - /** - * Default constructor. - */ - public UserDescriptorRequest() { - clusterId = 0x0011; - } - - /** - * Gets NWKAddrOfInterest. - * - * @return the NWKAddrOfInterest - */ - public Integer getNwkAddrOfInterest() { - return nwkAddrOfInterest; - } - - /** - * Sets NWKAddrOfInterest. - * - * @param nwkAddrOfInterest the NWKAddrOfInterest - */ - public void setNwkAddrOfInterest(final Integer nwkAddrOfInterest) { - this.nwkAddrOfInterest = nwkAddrOfInterest; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(nwkAddrOfInterest, ZclDataType.NWK_ADDRESS); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - nwkAddrOfInterest = (Integer) deserializer.deserialize(ZclDataType.NWK_ADDRESS); - } - - @Override - public boolean isTransactionMatch(ZigBeeCommand request, ZigBeeCommand response) { - if (!(response instanceof UserDescriptorResponse)) { - return false; - } - - return (((UserDescriptorRequest) request).getNwkAddrOfInterest() - .equals(((UserDescriptorResponse) response).getNwkAddrOfInterest())); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(61); - builder.append("UserDescriptorRequest ["); - builder.append(super.toString()); - builder.append(", nwkAddrOfInterest="); - builder.append(nwkAddrOfInterest); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/UserDescriptorResponse.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/UserDescriptorResponse.java deleted file mode 100644 index 238fbc545..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/UserDescriptorResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zcl.ZclFieldSerializer; -import com.zsmartsystems.zigbee.zcl.ZclFieldDeserializer; -import com.zsmartsystems.zigbee.zcl.protocol.ZclDataType; -import com.zsmartsystems.zigbee.zdo.ZdoResponse; -import javax.annotation.Generated; -import com.zsmartsystems.zigbee.zdo.ZdoStatus; -import com.zsmartsystems.zigbee.zdo.field.UserDescriptor; - -/** - * User Descriptor Response value object class. - *

    - * The User_Desc_rsp is generated by a remote device in response to a - * User_Desc_req directed to the remote device. This command shall be unicast to - * the originator of the User_Desc_req command. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class UserDescriptorResponse extends ZdoResponse { - /** - * NWKAddrOfInterest command message field. - */ - private Integer nwkAddrOfInterest; - - /** - * Length command message field. - */ - private Integer length; - - /** - * UserDescriptor command message field. - */ - private UserDescriptor userDescriptor; - - /** - * Default constructor. - */ - public UserDescriptorResponse() { - clusterId = 0x8011; - } - - /** - * Gets NWKAddrOfInterest. - * - * @return the NWKAddrOfInterest - */ - public Integer getNwkAddrOfInterest() { - return nwkAddrOfInterest; - } - - /** - * Sets NWKAddrOfInterest. - * - * @param nwkAddrOfInterest the NWKAddrOfInterest - */ - public void setNwkAddrOfInterest(final Integer nwkAddrOfInterest) { - this.nwkAddrOfInterest = nwkAddrOfInterest; - } - - /** - * Gets Length. - * - * @return the Length - */ - public Integer getLength() { - return length; - } - - /** - * Sets Length. - * - * @param length the Length - */ - public void setLength(final Integer length) { - this.length = length; - } - - /** - * Gets UserDescriptor. - * - * @return the UserDescriptor - */ - public UserDescriptor getUserDescriptor() { - return userDescriptor; - } - - /** - * Sets UserDescriptor. - * - * @param userDescriptor the UserDescriptor - */ - public void setUserDescriptor(final UserDescriptor userDescriptor) { - this.userDescriptor = userDescriptor; - } - - @Override - public void serialize(final ZclFieldSerializer serializer) { - super.serialize(serializer); - - serializer.serialize(status, ZclDataType.ZDO_STATUS); - serializer.serialize(nwkAddrOfInterest, ZclDataType.NWK_ADDRESS); - serializer.serialize(length, ZclDataType.UNSIGNED_8_BIT_INTEGER); - serializer.serialize(userDescriptor, ZclDataType.USER_DESCRIPTOR); - } - - @Override - public void deserialize(final ZclFieldDeserializer deserializer) { - super.deserialize(deserializer); - - status = (ZdoStatus) deserializer.deserialize(ZclDataType.ZDO_STATUS); - if (status != ZdoStatus.SUCCESS) { - // Don't read the full response if we have an error - return; - } - nwkAddrOfInterest = (Integer) deserializer.deserialize(ZclDataType.NWK_ADDRESS); - length = (Integer) deserializer.deserialize(ZclDataType.UNSIGNED_8_BIT_INTEGER); - userDescriptor = (UserDescriptor) deserializer.deserialize(ZclDataType.USER_DESCRIPTOR); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(148); - builder.append("UserDescriptorResponse ["); - builder.append(super.toString()); - builder.append(", status="); - builder.append(status); - builder.append(", nwkAddrOfInterest="); - builder.append(nwkAddrOfInterest); - builder.append(", length="); - builder.append(length); - builder.append(", userDescriptor="); - builder.append(userDescriptor); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/UserDescriptorSetRequest.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/UserDescriptorSetRequest.java deleted file mode 100644 index 21951e8e6..000000000 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zdo/command/UserDescriptorSetRequest.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2016-2019 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.zdo.command; - -import com.zsmartsystems.zigbee.zdo.ZdoRequest; -import javax.annotation.Generated; - -/** - * User Descriptor Set Request value object class. - *

    - * The User_Desc_set command is generated from a local device wishing to - * configure the user descriptor on a remote device. This command shall be unicast - * either to the remote device itself or to an alternative device that contains the - * discovery information of the remote device. - *
    - * The local device shall generate the User_Desc_set command using the format - * illustrated in Table 2.55. The NWKAddrOfInterest field shall contain the network - * address of the remote device for which the user descriptor is to be configured and - * the UserDescription field shall contain the ASCII character string that is to be - * configured in the user descriptor. Characters with ASCII codes numbered 0x00 - * through 0x1f are not permitted to be included in this string. - *

    - * Code is auto-generated. Modifications may be overwritten! - */ - -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-03-14T23:37:27Z") -public class UserDescriptorSetRequest extends ZdoRequest { - /** - * Default constructor. - */ - public UserDescriptorSetRequest() { - clusterId = 0x0014; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(27); - builder.append("UserDescriptorSetRequest ["); - builder.append(super.toString()); - builder.append(']'); - return builder.toString(); - } - -} diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0000_Basic.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0000_Basic.xml new file mode 100644 index 000000000..ee191c539 --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0000_Basic.xml @@ -0,0 +1,112 @@ + + Basic + This cluster supports an interface to the node or physical device. It provides attributes and commands for determining basic information, setting user information such as location, and resetting to factory defaults. + + Reset To Factory Defaults Command + On receipt of this command, the device resets all the attributes of all its clusters to their factory defaults. Note that ZigBee networking functionality,bindings, groups or other persistent data are not affected by this command + + + ZCL Version + The ZCLVersion attribute is 8 bits in length and specifies the version number of the ZigBee Cluster Library that all clusters on this endpoint conform to. + + + Application Version + The ApplicationVersion attribute is 8 bits in length and specifies the version number of the application software contained in the device. The usage of this attribute is manufacturer dependent. + + + Stack Version + The StackVersion attribute is 8 bits in length and specifies the version number of the implementation of the ZigBee stack contained in the device. The usage of this attribute is manufacturer dependent. + + + HW Version + The HWVersion attribute is 8 bits in length and specifies the version number of the hardware of the device. The usage of this attribute is manufacturer dependent. + + + Manufacturer Name + The ManufacturerName attribute is a maximum of 32 bytes in length and specifies the name of the manufacturer as a ZigBee character string. + + + Model Identifier + The ModelIdentifier attribute is a maximum of 32 bytes in length and specifies the model number (or other identifier) assigned by the manufacturer as a ZigBee character string. + + + Date Code + The DateCode attribute is a ZigBee character string with a maximum length of 16 bytes. The first 8 characters specify the date of manufacturer of the device in international date notation according to ISO 8601, i.e. YYYYMMDD, e.g. 20060814. + + + Power Source + The PowerSource attribute is 8 bits in length and specifies the source(s) of power available to the device. Bits b0–b6 of this attribute represent the primary power source of the device and bit b7 indicates whether the device has a secondary power source in the form of a battery backup. + + + Location Description + The LocationDescription attribute is a maximum of 16 bytes in length and describes the physical location of the device as a ZigBee character string. + + + Physical Environment + The PhysicalEnvironment attribute is 8 bits in length and specifies the type of physical environment in which the device will operate. + + + Device Enabled + The DeviceEnabled attribute is a boolean and specifies whether the device is enabled or disabled. + + + Alarm Mask + The AlarmMask attribute is 8 bits in length and specifies which of a number of general alarms may be generated. + + + Disable Local Config + The DisableLocalConfig attribute allows a number of local device configuration functions to be disabled. + The intention of this attribute is to allow disabling of any local configuration user interface, for example to prevent reset or binding buttons being activated by unauthorised persons in a public building. + + + SW Build ID + The SWBuildIDattribute represents a detailed, manufacturer-specific reference to the version of the software. + + + + Power Source + + + + + + + + + + + + + + + + + Physical Environment + + + + + + + + + + + + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0001_PowerConfiguration.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0001_PowerConfiguration.xml new file mode 100644 index 000000000..0b8aa7245 --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0001_PowerConfiguration.xml @@ -0,0 +1,154 @@ + + Power Configuration + Attributes for determining detailed information about a device’s power source(s), and for configuring under/over voltage alarms. + + Mains Voltage + The MainsVoltage attribute is 16-bits in length and specifies the actual (measured) RMS voltage (or DC voltage in the case of a DC supply) currently applied to the device, measured in units of 100mV. + + + Mains Frequency + The MainsFrequency attribute is 8-bits in length and represents the frequency, in Hertz, of the mains as determined by the device as follows:- + MainsFrequency = 0.5 x measured frequency + Where 2 Hz <= measured frequency <= 506 Hz, corresponding to a MainsFrequency in the range 1 to 0xfd. + The maximum resolution this format allows is 2 Hz. The following special values of MainsFrequency apply. <li>0x00 indicates a frequency that is too low to be measured.</li> <li>0xfe indicates a frequency that is too high to be measured.</li> <li>0xff indicates that the frequency could not be measured.</li> + + + Mains Alarm Mask + The MainsAlarmMask attribute is 8-bits in length and specifies which mains alarms may be generated. A ‘1’ in each bit position enables the alarm. + + + Mains Voltage Min Threshold + The MainsVoltageMinThreshold attribute is 16-bits in length and specifies the lower alarm threshold, measured in units of 100mV, for the MainsVoltage attribute. The value of this attribute shall be less than MainsVoltageMaxThreshold. + If the value of MainsVoltage drops below the threshold specified by MainsVoltageMinThreshold, the device shall start a timer to expire after MainsVoltageDwellTripPoint seconds. If the value of this attribute increases to greater than or equal to MainsVoltageMinThreshold before the timer expires, the device shall stop and reset the timer. If the timer expires, an alarm shall be generated. + The Alarm Code field included in the generated alarm shall be 0x00. + If this attribute takes the value 0xffff then this alarm shall not be generated. + + + Mains Voltage Max Threshold + The MainsVoltageMaxThreshold attribute is 16-bits in length and specifies the upper alarm threshold, measured in units of 100mV, for the MainsVoltage attribute. The value of this attribute shall be greater than MainsVoltageMinThreshold. + If the value of MainsVoltage rises above the threshold specified by MainsVoltageMaxThreshold, the device shall start a timer to expire after MainsVoltageDwellTripPoint seconds. If the value of this attribute drops to lower than or equal to MainsVoltageMaxThreshold before the timer expires, the device shall stop and reset the timer. If the timer expires, an alarm shall be generated. + The Alarm Code field included in the generated alarm shall be 0x01. + If this attribute takes the value 0xffff then this alarm shall not be generated. + + + Mains Voltage Dwell Trip Point + The MainsVoltageDwellTripPoint attribute is 16-bits in length and specifies the length of time, in seconds that the value of MainsVoltage may exist beyond either of its thresholds before an alarm is generated. + If this attribute takes the value 0xffff then the associated alarms shall not be generated. + + + Battery Voltage + The BatteryVoltage attribute is 8-bits in length and specifies the current actual (measured) battery voltage, in units of 100mV. The value 0xff indicates an invalid or unknown reading. + + + Battery Percentage Remaining + + + Battery Manufacturer + The BatteryManufacturer attribute is a maximum of 16 bytes in length and specifies the name of the battery manufacturer as a ZigBee character string. + + + Battery Size + The BatterySize attribute is an enumeration which specifies the type of battery being used by the device. + + + Battery A Hr Rating + The BatteryAHrRating attribute is 16-bits in length and specifies the Ampere-hour rating of the battery, measured in units of 10mAHr. + + + Battery Quantity + The BatteryQuantity attribute is 8-bits in length and specifies the number of battery cells used to power the device. + + + Battery Rated Voltage + The BatteryRatedVoltage attribute is 8-bits in length and specifies the rated voltage of the battery being used in the device, measured in units of 100mV. + + + Battery Alarm Mask + The BatteryAlarmMask attribute is 8-bits in length and specifies which battery alarms may be generated. + + + Battery Voltage Min Threshold + The BatteryVoltageMinThreshold attribute is 8-bits in length and specifies the low voltage alarm threshold, measured in units of 100mV, for the BatteryVoltage attribute. + If the value of BatteryVoltage drops below the threshold specified by BatteryVoltageMinThreshold an alarm shall be generated. + The Alarm Code field included in the generated alarm shall be 0x10. + If this attribute takes the value 0xff then this alarm shall not be generated. + + + Battery Voltage Threshold 1 + Specify the low voltage alarm thresholds, measured in units of 100mV, for the BatteryVoltage attribute. + + + Battery Voltage Threshold 2 + Specify the low voltage alarm thresholds, measured in units of 100mV, for the BatteryVoltage attribute. + + + Battery Voltage Threshold 3 + Specify the low voltage alarm thresholds, measured in units of 100mV, for the BatteryVoltage attribute. + + + Battery Percentage Min Threshold + Specifies the low battery percentage alarm threshold, measured in percentage (i.e., zero to 100%), for the BatteryPercentageRemaining attribute. + + + Battery Percentage Threshold 1 + Specifies the low battery percentage alarm threshold, measured in percentage (i.e., zero to 100%), for the BatteryPercentageRemaining attribute. + + + Battery Percentage Threshold 2 + Specifies the low battery percentage alarm threshold, measured in percentage (i.e., zero to 100%), for the BatteryPercentageRemaining attribute. + + + Battery Percentage Threshold 3 + Specifies the low battery percentage alarm threshold, measured in percentage (i.e., zero to 100%), for the BatteryPercentageRemaining attribute. + + + Battery Alarm State + Specifies the current state of the device's battery alarms. This attribute provides a persistent record of a device's battery alarm conditions as well as a mechanism for reporting changes to those conditions, including the elimination of battery alarm states (e.g., when a battery is replaced). + + + + Battery Size + + + + + + + + + + + + + + + + + + + + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0003_Identify.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0003_Identify.xml new file mode 100644 index 000000000..e4ac1ffa6 --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0003_Identify.xml @@ -0,0 +1,31 @@ + + Identify + Attributes and commands to put a device into an Identification mode (e.g. flashing a light), that indicates to an observer – e.g. an installer - which of several devices it is, also to request any device that is identifying itself to respond to the initiator. + Note that this cluster cannot be disabled, and remains functional regardless of the setting of the DeviceEnable attribute in the Basic cluster. + + Identify Command + The identify command starts or stops the receiving device identifying itself. + + Identify Time + + + + Identify Query Command + + + Identify Query Response + The identify query response command is generated in response to receiving an Identify Query command in the case that the device is currently identifying itself. + + Identify Time + + + + + Identify Time + The IdentifyTime attribute specifies the remaining length of time, in seconds, that the device will continue to identify itself. + If this attribute is set to a value other than 0x0000 then the device shall enter its identification procedure, in order to indicate to an observer which of several devices it is. It is recommended that this procedure consists of flashing a light with a period of 0.5 seconds. The IdentifyTime attribute shall be decremented every second. + If this attribute reaches or is set to the value 0x0000 then the device shall terminate its identification procedure. + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0004_Groups.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0004_Groups.xml new file mode 100644 index 000000000..d2eb98703 --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0004_Groups.xml @@ -0,0 +1,107 @@ + + Groups + The ZigBee specification provides the capability for group addressing. That is, any endpoint on any device may be assigned to one or more groups, each labeled with a 16-bit identifier (0x0001 – 0xfff7), which acts for all intents and purposes like a network address. Once a group is established, frames, sent using the APSDE-DATA.request primitive and having a DstAddrMode of 0x01, denoting group addressing, will be delivered to every endpoint assigned to the group address named in the DstAddr parameter of the outgoing APSDE-DATA.request primitive on every device in the network for which there are such endpoints. + Management of group membership on each device and endpoint is implemented by the APS, but the over-the-air messages that allow for remote management and commissioning of groups are defined here in the cluster library on the theory that, while the basic group addressing facilities are integral to the operation of the stack, not every device will need or want to implement this management cluster. Furthermore, the placement of the management commands here allows developers of proprietary profiles to avoid implementing the library cluster but still exploit group addressing + In order to ensure that only authorized devices are able to set up groups (particularly if application link keys are to be used) the following approach SHOULD be employed. The security Permissions Configuration Table provides a mechanism by which certain commands can be restricted to specified authorized devices. Configuration of groups via the Groups cluster SHOULD use the ApplicationSettings permissions entry of this table to specify from which devices group configuration commands MAY be received, and whether a link key is required. + + Add Group Command + The Add Group command allows the sending device to add group membership in a particular group for one or more endpoints on the receiving device. + + Group ID + + + Group Name + + + + View Group Command + The view group command allows the sending device to request that the receiving entity or entities respond with a view group response command containing the application name string for a particular group. + + Group ID + + + + Get Group Membership Command + The get group membership command allows the sending device to inquire about the group membership of the receiving device and endpoint in a number of ways. + + Group Count + + + Group List + + + + Remove Group Command + The remove group command allows the sender to request that the receiving entity or entities remove their membership, if any, in a particular group. + + Group ID + + + + Remove All Groups Command + The remove all groups command allows the sending device to direct the receiving entity or entities to remove all group associations. + + + Add Group If Identifying Command + The add group if identifying command allows the sending device to add group membership in a particular group for one or more endpoints on the receiving device, on condition that it is identifying itself. Identifying functionality is controlled using the identify cluster. + + Group ID + + + Group Name + + + + Add Group Response + The add group response is sent by the groups cluster server in response to an add group command. + + Status + + + Group ID + + + + View Group Response + The view group response command is sent by the groups cluster server in response to a view group command. + + Status + + + Group ID + + + Group Name + + + + Get Group Membership Response + The get group membership response command is sent by the groups cluster server in response to a get group membership command. + + Capacity + + + Group Count + + + Group List + + + + Remove Group Response + The remove group response command is generated by an application entity in response to the receipt of a remove group command. + + Status + + + Group ID + + + + + Name Support + The most significant bit of the NameSupport attribute indicates whether or not group names are supported. A value of 1 indicates that they are supported, and a value of 0 indicates that they are not supported. + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0005_Scenes.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0005_Scenes.xml new file mode 100644 index 000000000..f3667b708 --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0005_Scenes.xml @@ -0,0 +1,191 @@ + + Scenes + The scenes cluster provides attributes and commands for setting up and recalling scenes. Each scene corresponds to a set of stored values of specified attributes for one or more clusters on the same end point as the scenes cluster. + In most cases scenes are associated with a particular group ID. Scenes may also exist without a group, in which case the value 0x0000 replaces the group ID. Note that extra care is required in these cases to avoid a scene ID collision, and that commands related to scenes without a group may only be unicast, i.e.: they may not be multicast or broadcast. + + Add Scene Command + The Add Scene command shall be addressed to a single device (not a group). + + Group ID + + + Scene ID + + + Transition Time + + + Scene Name + + + Extension Field Sets + + + + View Scene Command + The View Scene command shall be addressed to a single device (not a group). + + Group ID + + + Scene ID + + + + Remove Scene Command + The Remove All Scenes may be addressed to a single device or to a group. + + Group ID + + + Scene ID + + + + Remove All Scenes Command + The Remove All Scenes may be addressed to a single device or to a group. + + Group ID + + + + Store Scene Command + The Store Scene command may be addressed to a single device or to a group. + + Group ID + + + Scene ID + + + + Recall Scene Command + The Recall Scene command may be addressed to a single device or to a group. + + Group ID + + + Scene ID + + + + Get Scene Membership Command + The Get Scene Membership command can be used to find an unused scene number within the group when no commissioning tool is in the network, or for a commissioning tool to get used scenes for a group on a single device or on all devices in the group. + + Group ID + + + + Add Scene Response + + Status + + + Group ID + + + Scene ID + + + + View Scene Response + + Status + + + Group ID + + + Scene ID + + + Transition Time + + + Scene Name + + + Extension Field Sets + + + + Remove Scene Response + + Status + + + Group ID + + + Scene ID + + + + Remove All Scenes Response + + Status + + + Group ID + + + + Store Scene Response + + Status + + + Group ID + + + Scene ID + + + + Get Scene Membership Response + + Status + + + Capacity + + + Group ID + + + Scene Count + + + Scene List + + + + + Scene Count + The SceneCount attribute specifies the number of scenes currently in the device's scene table. + + + Current Scene + The CurrentScene attribute holds the Scene ID of the scene last invoked. + + + Current Group + The CurrentGroup attribute holds the Group ID of the scene last invoked, or 0x0000 if the scene last invoked is not associated with a group. + + + Scene Valid + The SceneValid attribute indicates whether the state of the device corresponds to that associated with the CurrentScene and CurrentGroup attributes. TRUE indicates that these attributes are valid, FALSE indicates that they are not valid. + Before a scene has been stored or recalled, this attribute is set to FALSE. After a successful Store Scene or Recall Scene command it is set to TRUE. If, after a scene is stored or recalled, the state of the device is modified, this attribute is set to FALSE. + + + Name Support + The most significant bit of the NameSupport attribute indicates whether or not scene names are supported. A value of 1 indicates that they are supported, and a value of 0 indicates that they are not supported. + + + Last Configured By + The LastConfiguredBy attribute is 64-bits in length and specifies the IEEE address of the device that last configured the scene table. + The value 0xffffffffffffffff indicates that the device has not been configured, or that the address of the device that last configured the scenes cluster is not known. + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0006_OnOff.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0006_OnOff.xml new file mode 100644 index 000000000..ad94a63b5 --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0006_OnOff.xml @@ -0,0 +1,69 @@ + + On/Off + Attributes and commands for switching devices between ‘On’ and ‘Off’ states. + + Off Command + On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0x0000. + + + On Command + On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0x0000, the device SHALL set the OffWaitTime attribute to 0x0000. + + + Toggle Command + On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to 0x00 and if the value of the OnTime attribute is equal to 0x0000, the device SHALL set the OffWaitTime attribute to 0x0000. If the value of the OnOff attribute is equal to 0x01, the OnTime attribute SHALL be set to 0x0000. + + + Off With Effect Command + The Off With Effect command allows devices to be turned off using enhanced ways of fading. + + Effect Identifier + The Effect Identifier field is 8-bits in length and specifies the fading effect to use when switching the device off. + + + Effect Variant + The Effect Variant field is 8-bits in length and is used to indicate which variant of the effect, indicated in the Effect Identifier field, SHOULD be triggered. If a device does not support the given variant, it SHALL use the default variant. This field is dependent on the value of the Effect Identifier field. + + + + On With Recall Global Scene Command + The On With Recall Global Scene command allows the recall of the settings when the device was turned off. + + + On With Timed Off Command + The On With Timed Off command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further On With Timed Off commands, received during this time, are prevented from turning the devices back on. Note that the device can be periodically re-kicked by subsequent On With Timed Off commands, e.g., from an on/off sensor. + + On Off Control + The On/Off Control field is 8-bits in length and contains information on how the device is to be operated. + + + On Time + The On Time field is 16 bits in length and specifies the length of time (in 1/10ths second) that the device is to remain “on”, i.e., with its OnOffattribute equal to 0x01, before automatically turning “off”. This field SHALL be specified in the range 0x0000–0xfffe. The Off Wait Time field is 16 bits in length and specifies the length of time (in 1/10ths second) that the device SHALL remain “off”, i.e., with its OnOffattribute equal to 0x00, and guarded to prevent an on command turning the device back “on”. This field SHALL be specified in the range 0x0000–0xfffe. + + + Off Wait Time + + + + + On Off + The OnOff attribute has the following values: 0 = Off, 1 = On + + + Global Scene Control + In order to support the use case where the user gets back the last setting of the devices (e.g. level settings for lamps), a global scene is introduced which is stored when the devices are turned off and recalled when the devices are turned on. The global scene is defined as the scene that is stored with group identifier 0 and scene identifier 0. + The GlobalSceneControl attribute is defined in order to prevent a second off command storing the all-devices-off situation as a global scene, and to prevent a second on command destroying the current settings by going back to the global scene. + The GlobalSceneControl attribute SHALL be set to TRUE after the reception of a command which causes the OnOff attribute to be set to TRUE, such as a standard On command, a Move to level (with on/off) command, a Recall scene command or a On with recall global scene command. + The GlobalSceneControl attribute is set to FALSE after reception of a Off with effect command. + + + On Time + The OnTime attribute specifies the length of time (in 1/10ths second) that the “on” state SHALL be maintained before automatically transitioning to the “off” state when using the On with timed off command. If this attribute is set to 0x0000 or 0xffff, the device SHALL remain in its current state. + + + Off Wait Time + The OffWaitTime attribute specifies the length of time (in 1/10ths second) that the “off” state SHALL be guarded to prevent an on command turning the device back to its “on” state (e.g., when leaving a room, the lights are turned off but an occupancy sensor detects the leaving person and attempts to turn the lights back on). If this attribute is set to 0x0000, the device SHALL remain in its current state. + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0007_OnOffSwitchConfiguration.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0007_OnOffSwitchConfiguration.xml new file mode 100644 index 000000000..81e9369d3 --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0007_OnOffSwitchConfiguration.xml @@ -0,0 +1,32 @@ + + On / Off Switch Configuration + Attributes and commands for configuring On/Off switching devices + + Switch Type + The SwitchType attribute specifies the basic functionality of the On/Off switching device. + + + Switch Actions + The SwitchActions attribute is 8 bits in length and specifies the commands of the On/Off cluster to be generated when the switch moves between its two states + + + + Switch Type + + + + + + + + + Switch Actions + + + + + + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0008_LevelControl.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0008_LevelControl.xml new file mode 100644 index 000000000..33fa6a345 --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0008_LevelControl.xml @@ -0,0 +1,108 @@ + + Level Control + This cluster provides an interface for controlling a characteristic of a device that can be set to a level, for example the brightness of a light, the degree of closure of a door, or the power output of a heater. + For many applications, a close relationship between this cluster and the OnOff cluster is needed. This section describes the dependencies that are required when an endpoint that implements the Level Control server cluster also implements the On/Off server cluster. + The OnOff attribute of the On/Off cluster and the CurrentLevel attribute of the Level Control cluster are intrinsically independent variables, as they are on different clusters. However, when both clusters are implemented on the same endpoint, dependencies MAY be introduced between them. Facilities are provided to introduce dependencies if required. + There are two sets of commands provided in the Level Control cluster. These are identical, except that the first set (Move to Level, Move and Step) SHALL NOT affect the OnOff attribute, whereas the second set ('with On/Off' variants) SHALL. + + Move To Level Command + On receipt of this command, a device SHALL move from its current level to the value given in the Level field. The meaning of ‘level’ is device dependent –e.g., for a light it MAY mean brightness level.The movement SHALL be as continuous as technically practical, i.e., not a step function, and the time taken to move to the new level SHALL be equal to the value of the Transition time field, in tenths of a second, or as close to this as the device is able.If the Transition time field takes the value 0xffff then the time taken to move to the new level SHALL instead be determined by the OnOffTransitionTimeattribute. If OnOffTransitionTime, which is an optional attribute, is not present, the device SHALL move to its new level as fast as it is able. + + Level + + + Transition Time + + + + Move Command + + Move Mode + + + Rate + + + + Step Command + + Step Mode + + + Step Size + + + Transition Time + + + + Stop Command + Upon receipt of this command, any Move to Level, Move or Step command (and their 'with On/Off' variants) currently in process SHALL be terminated. The value of CurrentLevel SHALL be left at its value upon receipt of the Stop command, and RemainingTime SHALL be set to zero. + + + Move To Level (with On/Off) Command + On receipt of this command, a device SHALL move from its current level to the value given in the Level field. The meaning of ‘level’ is device dependent –e.g., for a light it MAY mean brightness level.The movement SHALL be as continuous as technically practical, i.e., not a step function, and the time taken to move to the new level SHALL be equal to the value of the Transition time field, in tenths of a second, or as close to this as the device is able.If the Transition time field takes the value 0xffff then the time taken to move to the new level SHALL instead be determined by the OnOffTransitionTimeattribute. If OnOffTransitionTime, which is an optional attribute, is not present, the device SHALL move to its new level as fast as it is able. + + Level + + + Transition Time + + + + Move (with On/Off) Command + + Move Mode + + + Rate + + + + Step (with On/Off) Command + + Step Mode + + + Step Size + + + Transition Time + + + + Stop 2 Command + + + + Current Level + The CurrentLevel attribute represents the current level of this device. The meaning of 'level' is device dependent. Value is between 0 and 254. + + + Remaining Time + The RemainingTime attribute represents the time remaining until the current command is complete - it is specified in 1/10ths of a second. + + + On Off Transition Time + The OnOffTransitionTime attribute represents the time taken to move to or from the target level when On of Off commands are received by an On/Off cluster on the same endpoint. It is specified in 1/10ths of a second. + The actual time taken should be as close to OnOffTransitionTime as the device is able. N.B. If the device is not able to move at a variable rate, the OnOffTransitionTime attribute should not be implemented. + + + On Level + The OnLevel attribute determines the value that the CurrentLevel attribute is set to when the OnOff attribute of an On/Off cluster on the same endpoint is set to On. If the OnLevel attribute is not implemented, or is set to 0xff, it has no effect. + + + On Transition Time + The OnTransitionTime attribute represents the time taken to move the current level from the minimum level to the maximum level when an On command is received by an On/Off cluster on the same endpoint. It is specified in 10ths of a second. If this command is not implemented, or contains a value of 0xffff, the OnOffTransitionTime will be used instead. + + + Off Transition Time + The OffTransitionTime attribute represents the time taken to move the current level from the maximum level to the minimum level when an Off command is received by an On/Off cluster on the same endpoint. It is specified in 10ths of a second. If this command is not implemented, or contains a value of 0xffff, the OnOffTransitionTime will be used instead. + + + Default Move Rate + The DefaultMoveRate attribute determines the movement rate, in units per second, when a Move command is received with a Rate parameter of 0xFF. + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0009_Alarms.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0009_Alarms.xml new file mode 100644 index 000000000..f1ebb2758 --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0009_Alarms.xml @@ -0,0 +1,63 @@ + + Alarms + Attributes and commands for sending alarm notifications and configuring alarm functionality. + Alarm conditions and their respective alarm codes are described in individual clusters, along with an alarm mask field. Where not masked, alarm notifications are reported to subscribed targets using binding. + Where an alarm table is implemented, all alarms, masked or otherwise, are recorded and may be retrieved on demand. + Alarms may either reset automatically when the conditions that cause are no longer active, or may need to be explicitly reset. + + Reset Alarm Command + This command resets a specific alarm. This is needed for some alarms that do not reset automatically. If the alarm condition being reset was in fact still active then a new notification will be generated and, where implemented, a new record added to the alarm log. + + Alarm Code + + + Cluster Identifier + + + + Reset All Alarms Command + This command resets all alarms. Any alarm conditions that were in fact still active will cause a new notification to be generated and, where implemented, a new record added to the alarm log. + + + Get Alarm Command + This command causes the alarm with the earliest generated alarm entry in the alarm table to be reported in a get alarm response command. This command enables the reading of logged alarm conditions from the alarm table. Once an alarm condition has been reported the corresponding entry in the table is removed. + + + Reset Alarm Log Command + This command causes the alarm table to be cleared. + + + Alarm Command + The alarm command signals an alarm situation on the sending device. <br> An alarm command is generated when a cluster which has alarm functionality detects an alarm condition, e.g., an attribute has taken on a value that is outside a ‘safe’ range. The details are given by individual cluster specifications. + + Alarm Code + + + Cluster Identifier + + + + Get Alarm Response + If there is at least one alarm record in the alarm table then the status field is set to SUCCESS. The alarm code, cluster identifier and time stamp fields SHALL all be present and SHALL take their values from the item in the alarm table that they are reporting.If there are no more alarms logged in the alarm table then the status field is set to NOT_FOUND and the alarm code, cluster identifier and time stamp fields SHALL be omitted. + + Status + + + Alarm Code + + + Cluster Identifier + + + Timestamp + + + + + Alarm Count + The AlarmCount attribute is 16-bits in length and specifies the number of entries currently in the alarm table. This attribute shall be specified in the range 0x00 to the maximum defined in the profile using this cluster. + If alarm logging is not implemented this attribute shall always take the value 0x00. + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/000A_Time.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/000A_Time.xml new file mode 100644 index 000000000..69239e6c6 --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/000A_Time.xml @@ -0,0 +1,63 @@ + + Time + This cluster provides a basic interface to a real-time clock. The clock time MAY be read and also written, in order to synchronize the clock (as close as practical) to a time standard. This time standard is the number of seconds since 0 hrs 0 mins 0 sec on 1st January 2000 UTC (Universal Coordinated Time). + + Time + The Time attribute is 32-bits in length and holds the time value of a real time clock. This attribute has data type UTCTime, but note that it may not actually be synchronised to UTC - see discussion of the TimeStatus attribute below. + If the Master bit of the TimeStatus attribute has a value of 0, writing to this attribute shall set the real time clock to the written value, otherwise it cannot be written. The value 0xffffffff indicates an invalid time. + + + Time Status + The TimeStatus attribute holds a number of bit fields. + + + Time Zone + The TimeZone attribute indicates the local time zone, as a signed offset in seconds from the Time attribute value. The value 0xffffffff indicates an invalid time zone. + + + DST Start + The DstStart attribute indicates the DST start time in seconds. The value 0xffffffff indicates an invalid DST start time. + + + DST End + The DstEnd attribute indicates the DST end time in seconds. The value 0xffffffff indicates an invalid DST end time. + Note that the three attributes DstStart, DstEnd and DstShift are optional, but if any one of them is implemented the other two must also be implemented. Note that this attribute should be set to a new value once every year. + Note that this attribute should be set to a new value once every year, and should be written synchronously with the DstStart attribute. The DstEnd attribute indicates the DST end time in seconds. The value 0xffffffff indicates an invalid DST end time. + Note that this attribute should be set to a new value once every year, and should be written synchronously with the DstStart attribute + + + DST Shift + The DstShift attribute represents a signed offset in seconds from the standard time, to be applied between the times DstStart and DstEnd to calculate the Local Time. The value 0xffffffff indicates an invalid DST shift. + The range of this attribute is +/- one day. Note that the actual range of DST values employed by countries is much smaller than this, so the manufacturer has the option to impose a smaller range. + + + Standard Time + A device may derive the time by reading the Time and TimeZone attributes and adding them together. If implemented however, the optional StandardTime attribute indicates this time directly. The value 0xffffffff indicates an invalid Standard Time. + + + Local Time + A device may derive the time by reading the Time, TimeZone, DstStart, DstEnd and DstShift attributes and performing the calculation. If implemented however, the optional LocalTime attribute indicates this time directly. The value 0xffffffff indicates an invalid Local Time. + + + Last Set Time + The LastSetTime attribute indicates the most recent time that the Time attribute was set, either internally or over the ZigBee network (thus it holds a copy of the last value that Time was set to). This attribute is set automatically, so is Read Only. The value 0xffffffff indicates an invalid LastSetTime. + + + Valid Until Time + The ValidUntilTime attribute indicates a time, later than LastSetTime, up to which the Time attribute MAY be trusted. ‘Trusted’ means that the difference between the Time attribute and the true UTC time is less than an acceptable error. The acceptable error is not defined by this cluster specification, but MAY be defined by the application profile in which devices that use this cluster are specified. + + + + Time Status + + + + + + + + + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/000B_RssiLocation.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/000B_RssiLocation.xml new file mode 100644 index 000000000..bfd359626 --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/000B_RssiLocation.xml @@ -0,0 +1,284 @@ + + RSSI Location + This cluster provides a means for exchanging Received Signal Strength Indication (RSSI) information among one hop devices as well as messages to report RSSI data to a centralized device that collects all the RSSI data in the network. + + Set Absolute Location Command + + Coordinate 1 + + + Coordinate 2 + + + Coordinate 3 + + + Power + + + Path Loss Exponent + + + + Set Device Configuration Command + + Power + + + Path Loss Exponent + + + Calculation Period + + + Number RSSI Measurements + + + Reporting Period + + + + Get Device Configuration Command + + Target Address + + + + Get Location Data Command + + Header + + + Number Responses + + + Target Address + + + + RSSI Response + + Replying Device + + + Coordinate 1 + + + Coordinate 2 + + + Coordinate 3 + + + RSSI + + + Number RSSI Measurements + + + + Send Pings Command + + Target Address + + + Number RSSI Measurements + + + Calculation Period + + + + Anchor Node Announce Command + + Anchor Node Address + + + Coordinate 1 + + + Coordinate 2 + + + Coordinate 3 + + + + Device Configuration Response + + Status + + + Power + + + Path Loss Exponent + + + Calculation Period + + + Number RSSI Measurements + + + Reporting Period + + + + Location Data Response + + Status + + + Location Type + + + Coordinate 1 + + + Coordinate 2 + + + Coordinate 3 + + + Power + + + Path Loss Exponent + + + Location Method + + + Quality Measure + + + Location Age + + + + Location Data Notification Command + + Location Type + + + Coordinate 1 + + + Coordinate 2 + + + Coordinate 3 + + + Power + + + Path Loss Exponent + + + Location Method + + + Quality Measure + + + Location Age + + + + Compact Location Data Notification Command + + + RSSI Ping Command + + Location Type + + + + RSSI Request Command + + + Report RSSI Measurements Command + + Reporting Address + + + Number Of Neighbors + + + Neighbors Information + + + + Request Own Location Command + + Requesting Address + + + + Location Type + The LocationType attribute is 8 bits long and is divided into bit fields. + + + Location Method + + + Location Age + The LocationAge attribute indicates the amount of time, measured in seconds, that has transpired since the location information was last calculated. This attribute is not valid if the Absolute bit of the LocationType attribute is set to one. + + + Quality Measure + The QualityMeasure attribute is a measure of confidence in the corresponding location information. The higher the value, the more confident the transmitting device is in the location information. A value of 0x64 indicates complete (100%) confidence and a value of 0x00 indicates zero confidence. (Note: no fixed confidence metric is mandated – the metric may be application and manufacturer dependent). + This field is not valid if the Absolute bit of the LocationType attribute is set to one. + + + Number Of Devices + The NumberOfDevices attribute is the number of devices whose location data were used to calculate the last location value. This attribute is related to the QualityMeasure attribute. + + + Coordinate 1 + The Coordinate1, Coordinate2 and Coordinate3 attributes are signed 16-bit integers, and represent orthogonal linear coordinates x, y, z in meters as follows. + x = Coordinate1 / 10, y = Coordinate2 / 10, z = Coordinate3 / 10 + The range of x is -3276.7 to 3276.7 meters, corresponding to Coordinate1 between 0x8001 and 0x7fff. The same range applies to y and z. A value of 0x8000 for any of the coordinates indicates that the coordinate is unknown. + + + Coordinate 2 + The Coordinate1, Coordinate2 and Coordinate3 attributes are signed 16-bit integers, and represent orthogonal linear coordinates x, y, z in meters as follows. + x = Coordinate1 / 10, y = Coordinate2 / 10, z = Coordinate3 / 10 + The range of x is -3276.7 to 3276.7 meters, corresponding to Coordinate1 between 0x8001 and 0x7fff. The same range applies to y and z. A value of 0x8000 for any of the coordinates indicates that the coordinate is unknown. + + + Coordinate 3 + The Coordinate1, Coordinate2 and Coordinate3 attributes are signed 16-bit integers, and represent orthogonal linear coordinates x, y, z in meters as follows. + x = Coordinate1 / 10, y = Coordinate2 / 10, z = Coordinate3 / 10 + The range of x is -3276.7 to 3276.7 meters, corresponding to Coordinate1 between 0x8001 and 0x7fff. The same range applies to y and z. A value of 0x8000 for any of the coordinates indicates that the coordinate is unknown. + + + Power + The Power attribute specifies the value of the average power P0, measured in dBm, received at a reference distance of one meter from the transmitter. + P0 = Power / 100 + A value of 0x8000 indicates that Power is unknown. + + + Path Loss Exponent + The PathLossExponent attribute specifies the value of the Path Loss Exponent n, an exponent that describes the rate at which the signal power decays with increasing distance from the transmitter. + n = PathLossExponent / 100 + A value of 0xffff indicates that PathLossExponent is unknown. + + + Reporting Period + The ReportingPeriod attribute specifies the time in seconds between successive reports of the device's location by means of the Location Data Notification command. The minimum value this attribute can take is specified by the profile in use. If ReportingPeriod is zero, the device does not automatically report its location. Note that location information can always be polled at any time. + + + Calculation Period + The CalculationPeriod attribute specifies the time in seconds between successive calculations of the device's location. If CalculationPeriod is less than the physically possible minimum period that the calculation can be performed, the calculation will be repeated as frequently as possible. + + + Number RSSI Measurements + The NumberRSSIMeasurements attribute specifies the number of RSSI measurements to be used to generate one location estimate. The measurements are averaged to improve accuracy. NumberRSSIMeasurements must be greater than or equal to 1. + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/000F_BinaryInputBasic.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/000F_BinaryInputBasic.xml new file mode 100644 index 000000000..7e21ac4a6 --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/000F_BinaryInputBasic.xml @@ -0,0 +1,87 @@ + + Binary Input (Basic) + The Binary Input (Basic) cluster provides an interface for reading the value of a binary measurement and accessing various characteristics of that measurement. The cluster is typically used to implement a sensor that measures a two-state physical quantity. + + Active Text + This attribute, of type Character string, MAY be used to hold a human readable description of the ACTIVE state of a binary PresentValue. For example, for a Binary Input cluster, if the physical input is a switch contact, then the ActiveText attribute might be assigned a value such as “Fan 1 On”. If either the ActiveText attribute or the InactiveText attribute are present, then both of them SHALL be present. + The character set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, which SHALL be printable but are otherwise unrestricted. + + + Description + The Description attribute, of type Character string, MAY be used to hold a description of the usage of the input, output or value, as appropriate to the cluster. The character set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, which SHALL be printable but are otherwise unrestricted. + + + Inactive Text + This attribute, of type Character string, MAY be used to hold a human readable description of the INACTIVE state of a binary PresentValue. For example, for a Binary Input cluster, if the physical input is a switch contact, then the InactiveText attribute might be assigned a value such as “Fan 1 Off”. If either the InactiveText attribute or the ActiveText attribute are present, then both of them SHALL be present. + The character set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, which SHALL be printable but are otherwise unrestricted. + + + Out Of Service + The OutOfService attribute, of type Boolean, indicates whether (TRUE) or not (FALSE) the physical input, output or value that the cluster represents is not in service. For an Input cluster, when OutOfService is TRUE the PresentValue attribute is decoupled from the physical input and will not track changes to the physical input. For an Output cluster, when OutOfService is TRUE the PresentValue attribute is decoupled from the physical output, so changes to PresentValue will not affect the physical output. For a Value cluster, when OutOfService is TRUE the PresentValue attribute MAY be written to freely by software local to the device that the cluster resides on. + + + Polarity + This attribute, of type enumeration, indicates the relationship between the physical state of the input (or output as appropriate for the cluster) and the logical state represented by a binary PresentValue attribute, when OutOfService is FALSE. If the Polarity attribute is NORMAL (0), then the ACTIVE (1) state of the PresentValue attribute is also the ACTIVE or ON state of the physical input (or output). If the Polarity attribute is REVERSE (1), then the ACTIVE (1) state of the PresentValue attribute is the INACTIVE or OFF state of the physical input (or output). + Thus, when OutOfService is FALSE, for a constant physical input state a change in the Polarity attribute SHALL produce a change in the PresentValue attribute. If OutOfService is TRUE, then the Polarity attribute SHALL have no effect on the PresentValue attribute. + + + Present Value + The PresentValue attribute indicates the current value of the input, output or value, as appropriate for the cluster. For Analog clusters it is of type single precision, for Binary clusters it is of type Boolean, and for multistate clusters it is of type Unsigned 16-bit integer. The PresentValue attribute of an input cluster SHALL be writable when OutOfService is TRUE. When the PriorityArray attribute is implemented, writing to PresentValue SHALL be equivalent to writing to element 16 of PriorityArray, i.e., with a priority of 16. + + + Reliability + The Reliability attribute, of type 8-bit enumeration, provides an indication of whether the PresentValueor the operation of the physical input, output or value in question (as appropriate for the cluster) is “reliable” as far as can be determined and, if not, why not. The Reliability attribute MAY have any of the following values: + NO-FAULT-DETECTED (0) OVER-RANGE (2) UNDER-RANGE (3) OPEN-LOOP (4) SHORTED-LOOP (5) UNRELIABLE-OTHER (7) PROCESS-ERROR (8) MULTI-STATE-FAULT (9) CONFIGURATION-ERROR (10) + + + Status Flags + This attribute, of type bitmap, represents four Boolean flags that indicate the general “health” of the analog sensor. Three of the flags are associated with the values of other optional attributes of this cluster. A more detailed status could be determined by reading the optional attributes (if supported) that are linked to these flags. The relationship between individual flags is not defined. + The four flags are Bit 0 = IN_ALARM, Bit 1 = FAULT, Bit 2 = OVERRIDDEN, Bit 3 = OUT OF SERVICE + where: + IN_ALARM -Logical FALSE (0) if the EventStateattribute has a value of NORMAL, otherwise logical TRUE (1). This bit is always 0 unless the cluster implementing the EventState attribute is implemented on the same endpoint. + FAULT -Logical TRUE (1) if the Reliability attribute is present and does not have a value of NO FAULT DETECTED, otherwise logical FALSE (0). + OVERRIDDEN -Logical TRUE (1) if the cluster has been overridden by some mechanism local to the device. Otherwise, the value is logical FALSE (0). In this context, for an input cluster, “overridden” is taken to mean that the PresentValue and Reliability(optional) attributes are no longer tracking changes to the physical input. For an Output cluster, “overridden” is taken to mean that the physical output is no longer tracking changes to the PresentValue attribute and the Reliability attribute is no longer a reflection of the physical output. For a Value cluster, “overridden” is taken to mean that the PresentValue attribute is not writeable. + OUT OF SERVICE -Logical TRUE (1) if the OutOfService attribute has a value of TRUE, otherwise logical FALSE (0). + + + Application Type + The ApplicationType attribute is an unsigned 32 bit integer that indicates the specific application usage for this cluster. (Note: This attribute has no BACnet equivalent). ApplicationType is subdivided into Group, Type and an Index number, as follows. + Group = Bits 24-31 An indication of the cluster this attribute is part of. + Type = Bits 16-23 For Analog clusters, the physical quantity that the Present Value attribute of the cluster represents. For Binary and Multistate clusters, the application usage domain. + Index = Bits 0-15The specific application usage of the cluster. + + + + Reliability + + + + + + + + + + + + + + + + + + + + + Status Flags + + + + + + + + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0012_MultistateInputBasic.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0012_MultistateInputBasic.xml new file mode 100644 index 000000000..c2c4c0be7 --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0012_MultistateInputBasic.xml @@ -0,0 +1,80 @@ + + Multistate Input (Basic) + The Multistate Input (Basic) cluster provides an interface for reading the value of a multistate measurement and accessing various characteristics of that measurement. The cluster is typically used to implement a sensor that measures a physical quantity that can take on one of a number of discrete states. + + State Text + This attribute, of type Array of Character strings, holds descriptions of all possible states of a multistate PresentValue. The number of descriptions matches the number of states defined in the NumberOfStates property. The PresentValue, interpreted as an integer, serves as an index into the array. If the size of this array is changed, the NumberOfStates property SHALL also be changed to the same value. The character set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, which SHALL be printable but are otherwise unrestricted. + + + Description + The Description attribute, of type Character string, MAY be used to hold a description of the usage of the input, output or value, as appropriate to the cluster. The character set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, which SHALL be printable but are otherwise unrestricted. + + + Number Of States + This attribute, of type Unsigned 16-bit integer, defines the number of states that a multistate PresentValue MAY have. The NumberOfStates property SHALL always have a value greater than zero. If the value of this property is changed, the size of the StateText array, if present, SHALL also be changed to the same value. The states are numbered consecutively, starting with 1. + + + Out Of Service + The OutOfService attribute, of type Boolean, indicates whether (TRUE) or not (FALSE) the physical input, output or value that the cluster represents is not in service. For an Input cluster, when OutOfService is TRUE the PresentValue attribute is decoupled from the physical input and will not track changes to the physical input. For an Output cluster, when OutOfService is TRUE the PresentValue attribute is decoupled from the physical output, so changes to PresentValue will not affect the physical output. For a Value cluster, when OutOfService is TRUE the PresentValue attribute MAY be written to freely by software local to the device that the cluster resides on. + + + Present Value + The PresentValue attribute indicates the current value of the input, output or value, as appropriate for the cluster. For Analog clusters it is of type single precision, for Binary clusters it is of type Boolean, and for multistate clusters it is of type Unsigned 16-bit integer. The PresentValue attribute of an input cluster SHALL be writable when OutOfService is TRUE. When the PriorityArray attribute is implemented, writing to PresentValue SHALL be equivalent to writing to element 16 of PriorityArray, i.e., with a priority of 16. + + + Reliability + The Reliability attribute, of type 8-bit enumeration, provides an indication of whether the PresentValueor the operation of the physical input, output or value in question (as appropriate for the cluster) is “reliable” as far as can be determined and, if not, why not. The Reliability attribute MAY have any of the following values: + NO-FAULT-DETECTED (0) OVER-RANGE (2) UNDER-RANGE (3) OPEN-LOOP (4) SHORTED-LOOP (5) UNRELIABLE-OTHER (7) PROCESS-ERROR (8) MULTI-STATE-FAULT (9) CONFIGURATION-ERROR (10) + + + Status Flags + This attribute, of type bitmap, represents four Boolean flags that indicate the general “health” of the analog sensor. Three of the flags are associated with the values of other optional attributes of this cluster. A more detailed status could be determined by reading the optional attributes (if supported) that are linked to these flags. The relationship between individual flags is not defined. + The four flags are Bit 0 = IN_ALARM, Bit 1 = FAULT, Bit 2 = OVERRIDDEN, Bit 3 = OUT OF SERVICE + where: + IN_ALARM -Logical FALSE (0) if the EventStateattribute has a value of NORMAL, otherwise logical TRUE (1). This bit is always 0 unless the cluster implementing the EventState attribute is implemented on the same endpoint. + FAULT -Logical TRUE (1) if the Reliability attribute is present and does not have a value of NO FAULT DETECTED, otherwise logical FALSE (0). + OVERRIDDEN -Logical TRUE (1) if the cluster has been overridden by some mechanism local to the device. Otherwise, the value is logical FALSE (0). In this context, for an input cluster, “overridden” is taken to mean that the PresentValue and Reliability(optional) attributes are no longer tracking changes to the physical input. For an Output cluster, “overridden” is taken to mean that the physical output is no longer tracking changes to the PresentValue attribute and the Reliability attribute is no longer a reflection of the physical output. For a Value cluster, “overridden” is taken to mean that the PresentValue attribute is not writeable. + OUT OF SERVICE -Logical TRUE (1) if the OutOfService attribute has a value of TRUE, otherwise logical FALSE (0). + + + Application Type + The ApplicationType attribute is an unsigned 32 bit integer that indicates the specific application usage for this cluster. (Note: This attribute has no BACnet equivalent). ApplicationType is subdivided into Group, Type and an Index number, as follows. + Group = Bits 24-31 An indication of the cluster this attribute is part of. + Type = Bits 16-23 For Analog clusters, the physical quantity that the Present Value attribute of the cluster represents. For Binary and Multistate clusters, the application usage domain. + Index = Bits 0-15The specific application usage of the cluster. + + + + Reliability + + + + + + + + + + + + + + + + + + + + + Status Flags + + + + + + + + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0013_MultistateOutputBasic.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0013_MultistateOutputBasic.xml new file mode 100644 index 000000000..ea696b2c5 --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0013_MultistateOutputBasic.xml @@ -0,0 +1,84 @@ + + Multistate Output (Basic) + The Multistate Output (Basic) cluster provides an interface for setting the value of an output that can take one of a number of discrete values, and accessing characteristics of that value. + + State Text + This attribute, of type Array of Character strings, holds descriptions of all possible states of a multistate PresentValue. The number of descriptions matches the number of states defined in the NumberOfStates property. The PresentValue, interpreted as an integer, serves as an index into the array. If the size of this array is changed, the NumberOfStates property SHALL also be changed to the same value. The character set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, which SHALL be printable but are otherwise unrestricted. + + + Description + The Description attribute, of type Character string, MAY be used to hold a description of the usage of the input, output or value, as appropriate to the cluster. The character set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, which SHALL be printable but are otherwise unrestricted. + + + Number Of States + This attribute, of type Unsigned 16-bit integer, defines the number of states that a multistate PresentValue MAY have. The NumberOfStates property SHALL always have a value greater than zero. If the value of this property is changed, the size of the StateText array, if present, SHALL also be changed to the same value. The states are numbered consecutively, starting with 1. + + + Out Of Service + The OutOfService attribute, of type Boolean, indicates whether (TRUE) or not (FALSE) the physical input, output or value that the cluster represents is not in service. For an Input cluster, when OutOfService is TRUE the PresentValue attribute is decoupled from the physical input and will not track changes to the physical input. For an Output cluster, when OutOfService is TRUE the PresentValue attribute is decoupled from the physical output, so changes to PresentValue will not affect the physical output. For a Value cluster, when OutOfService is TRUE the PresentValue attribute MAY be written to freely by software local to the device that the cluster resides on. + + + Present Value + The PresentValue attribute indicates the current value of the input, output or value, as appropriate for the cluster. For Analog clusters it is of type single precision, for Binary clusters it is of type Boolean, and for multistate clusters it is of type Unsigned 16-bit integer. The PresentValue attribute of an input cluster SHALL be writable when OutOfService is TRUE. When the PriorityArray attribute is implemented, writing to PresentValue SHALL be equivalent to writing to element 16 of PriorityArray, i.e., with a priority of 16. + + + Reliability + The Reliability attribute, of type 8-bit enumeration, provides an indication of whether the PresentValueor the operation of the physical input, output or value in question (as appropriate for the cluster) is “reliable” as far as can be determined and, if not, why not. The Reliability attribute MAY have any of the following values: + NO-FAULT-DETECTED (0) OVER-RANGE (2) UNDER-RANGE (3) OPEN-LOOP (4) SHORTED-LOOP (5) UNRELIABLE-OTHER (7) PROCESS-ERROR (8) MULTI-STATE-FAULT (9) CONFIGURATION-ERROR (10) + + + Relinquish Default + The RelinquishDefault attribute is the default value to be used for the PresentValue attribute when all elements of the PriorityArray attribute are marked as invalid. + + + Status Flags + This attribute, of type bitmap, represents four Boolean flags that indicate the general “health” of the analog sensor. Three of the flags are associated with the values of other optional attributes of this cluster. A more detailed status could be determined by reading the optional attributes (if supported) that are linked to these flags. The relationship between individual flags is not defined. + The four flags are Bit 0 = IN_ALARM, Bit 1 = FAULT, Bit 2 = OVERRIDDEN, Bit 3 = OUT OF SERVICE + where: + IN_ALARM -Logical FALSE (0) if the EventStateattribute has a value of NORMAL, otherwise logical TRUE (1). This bit is always 0 unless the cluster implementing the EventState attribute is implemented on the same endpoint. + FAULT -Logical TRUE (1) if the Reliability attribute is present and does not have a value of NO FAULT DETECTED, otherwise logical FALSE (0). + OVERRIDDEN -Logical TRUE (1) if the cluster has been overridden by some mechanism local to the device. Otherwise, the value is logical FALSE (0). In this context, for an input cluster, “overridden” is taken to mean that the PresentValue and Reliability(optional) attributes are no longer tracking changes to the physical input. For an Output cluster, “overridden” is taken to mean that the physical output is no longer tracking changes to the PresentValue attribute and the Reliability attribute is no longer a reflection of the physical output. For a Value cluster, “overridden” is taken to mean that the PresentValue attribute is not writeable. + OUT OF SERVICE -Logical TRUE (1) if the OutOfService attribute has a value of TRUE, otherwise logical FALSE (0). + + + Application Type + The ApplicationType attribute is an unsigned 32 bit integer that indicates the specific application usage for this cluster. (Note: This attribute has no BACnet equivalent). ApplicationType is subdivided into Group, Type and an Index number, as follows. + Group = Bits 24 -31 An indication of the cluster this attribute is part of. + Type = Bits 16 -23 For Analog clusters, the physical quantity that the Present Value attribute of the cluster represents. For Binary and Multistate clusters, the application usage domain. + Index = Bits 0 -15 The specific application usage of the cluster. + + + + Reliability + + + + + + + + + + + + + + + + + + + + + Status Flags + + + + + + + + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0014_MultistateValueBasic.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0014_MultistateValueBasic.xml new file mode 100644 index 000000000..eb2dad011 --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0014_MultistateValueBasic.xml @@ -0,0 +1,84 @@ + + Multistate Value (Basic) + The Multistate Value (Basic) cluster provides an interface for setting a multistate value, typically used as a control system parameter, and accessing characteristics of that value. + + State Text + This attribute, of type Array of Character strings, holds descriptions of all possible states of a multistate PresentValue. The number of descriptions matches the number of states defined in the NumberOfStates property. The PresentValue, interpreted as an integer, serves as an index into the array. If the size of this array is changed, the NumberOfStates property SHALL also be changed to the same value. The character set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, which SHALL be printable but are otherwise unrestricted. + + + Description + The Description attribute, of type Character string, MAY be used to hold a description of the usage of the input, output or value, as appropriate to the cluster. The character set used SHALL be ASCII, and the attribute SHALL contain a maximum of 16 characters, which SHALL be printable but are otherwise unrestricted. + + + Number Of States + This attribute, of type Unsigned 16-bit integer, defines the number of states that a multistate PresentValue MAY have. The NumberOfStates property SHALL always have a value greater than zero. If the value of this property is changed, the size of the StateText array, if present, SHALL also be changed to the same value. The states are numbered consecutively, starting with 1. + + + Out Of Service + The OutOfService attribute, of type Boolean, indicates whether (TRUE) or not (FALSE) the physical input, output or value that the cluster represents is not in service. For an Input cluster, when OutOfService is TRUE the PresentValue attribute is decoupled from the physical input and will not track changes to the physical input. For an Output cluster, when OutOfService is TRUE the PresentValue attribute is decoupled from the physical output, so changes to PresentValue will not affect the physical output. For a Value cluster, when OutOfService is TRUE the PresentValue attribute MAY be written to freely by software local to the device that the cluster resides on. + + + Present Value + The PresentValue attribute indicates the current value of the input, output or value, as appropriate for the cluster. For Analog clusters it is of type single precision, for Binary clusters it is of type Boolean, and for multistate clusters it is of type Unsigned 16-bit integer. The PresentValue attribute of an input cluster SHALL be writable when OutOfService is TRUE. When the PriorityArray attribute is implemented, writing to PresentValue SHALL be equivalent to writing to element 16 of PriorityArray, i.e., with a priority of 16. + + + Reliability + The Reliability attribute, of type 8-bit enumeration, provides an indication of whether the PresentValueor the operation of the physical input, output or value in question (as appropriate for the cluster) is “reliable” as far as can be determined and, if not, why not. The Reliability attribute MAY have any of the following values: + NO-FAULT-DETECTED (0) OVER-RANGE (2) UNDER-RANGE (3) OPEN-LOOP (4) SHORTED-LOOP (5) UNRELIABLE-OTHER (7) PROCESS-ERROR (8) MULTI-STATE-FAULT (9) CONFIGURATION-ERROR (10) + + + Relinquish Default + The RelinquishDefault attribute is the default value to be used for the PresentValue attribute when all elements of the PriorityArray attribute are marked as invalid. + + + Status Flags + This attribute, of type bitmap, represents four Boolean flags that indicate the general “health” of the analog sensor. Three of the flags are associated with the values of other optional attributes of this cluster. A more detailed status could be determined by reading the optional attributes (if supported) that are linked to these flags. The relationship between individual flags is not defined. + The four flags are Bit 0 = IN_ALARM, Bit 1 = FAULT, Bit 2 = OVERRIDDEN, Bit 3 = OUT OF SERVICE + where: + IN_ALARM -Logical FALSE (0) if the EventStateattribute has a value of NORMAL, otherwise logical TRUE (1). This bit is always 0 unless the cluster implementing the EventState attribute is implemented on the same endpoint. + FAULT -Logical TRUE (1) if the Reliability attribute is present and does not have a value of NO FAULT DETECTED, otherwise logical FALSE (0). + OVERRIDDEN -Logical TRUE (1) if the cluster has been overridden by some mechanism local to the device. Otherwise, the value is logical FALSE (0). In this context, for an input cluster, “overridden” is taken to mean that the PresentValue and Reliability(optional) attributes are no longer tracking changes to the physical input. For an Output cluster, “overridden” is taken to mean that the physical output is no longer tracking changes to the PresentValue attribute and the Reliability attribute is no longer a reflection of the physical output. For a Value cluster, “overridden” is taken to mean that the PresentValue attribute is not writeable. + OUT OF SERVICE -Logical TRUE (1) if the OutOfService attribute has a value of TRUE, otherwise logical FALSE (0). + + + Application Type + The ApplicationType attribute is an unsigned 32 bit integer that indicates the specific application usage for this cluster. (Note: This attribute has no BACnet equivalent). ApplicationType is subdivided into Group, Type and an Index number, as follows. + Group = Bits 24 -31 An indication of the cluster this attribute is part of. + Type = Bits 16 -23 For Analog clusters, the physical quantity that the Present Value attribute of the cluster represents. For Binary and Multistate clusters, the application usage domain. + Index = Bits 0 -15The specific application usage of the cluster. + + + + Reliability + + + + + + + + + + + + + + + + + + + + + Status Flags + + + + + + + + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0019_OtaUpgrade.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0019_OtaUpgrade.xml new file mode 100644 index 000000000..48931bbaa --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0019_OtaUpgrade.xml @@ -0,0 +1,425 @@ + + 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. + It is the responsibility of the server to indicate to the clients when update images are available. The client MAY be upgraded or downgraded64. The upgrade server knows which client devices to upgrade and to what file version. The upgrade server MAY be notified of such information via the backend system. For ZR clients, the server MAY send a message to notify the device when an updated image is available. It is assumed that ZED clients will not be awake to receive an unsolicited notification of an available image. All clients (ZR and ZED) SHALL query (poll) the server periodically to determine whether the server has an image update for them. Image Notify is optional. + The cluster is implemented in such a way that the client service works on both ZED and ZR devices. Being able to handle polling is mandatory for all server devices while being able to send a notify is optional. Hence, all client devices must be able to use a ‘poll’ mechanism to send query message to the server in order to see if the server has any new file for it. The polling mechanism also puts fewer resources on the upgrade server. It is ideal to have the server maintain as little state as possible since this will scale when there are hundreds of clients in the network. The upgrade server is not required to keep track of what pieces of an image that a particular client has received; instead the client SHALL do that. Lastly poll makes more sense for devices that MAY need to perform special setup to get ready to receive an image, such as unlocking flash or allocating space for the new image. + + Image Notify Command + The purpose of sending Image Notify command is so the server has a way to notify client devices of when the OTA upgrade images are available for them. It eliminates the need for ZR client devices having to check with the server periodically of when the new images are available. However, all client devices still need to send in Query Next Image Request command in order to officially start the OTA upgrade process. <br> For ZR client devices, the upgrade server may send out a unicast, broadcast, or multicast indicating it has the next upgrade image, via an Image Notify command. Since the command may not have APS security (if it is broadcast or multicast), it is considered purely informational and not authoritative. Even in the case of a unicast, ZR shall continue to perform the query process described in later section. <br> When the command is sent with payload type value of zero, it generally means the server wishes to notify all clients disregard of their manufacturers, image types or file versions. Query jitter is needed to protect the server from being flooded with clients’ queries for next image. + + Payload Type + + + Query Jitter + + payloadType + GREATER_THAN_OR_EQUAL + 0 + + + + Manufacturer Code + + payloadType + GREATER_THAN_OR_EQUAL + 1 + + + + Image Type + + payloadType + GREATER_THAN_OR_EQUAL + 2 + + + + New File Version + + payloadType + GREATER_THAN_OR_EQUAL + 3 + + + + + Query Next Image Command + Client devices shall send a Query Next Image Request command to the server to see if there is new OTA upgrade image available. ZR devices may send the command after receiving Image Notify command. ZED device shall periodically wake up and send the command to the upgrade server. Client devices query what the next image is, based on their own information. <br> The server takes the client’s information in the command and determines whether it has a suitable image for the particular client. The decision should be based on specific policy that is specific to the upgrade server and outside the scope of this document.. However, a recommended default policy is for the server to send back a response that indicates the availability of an image that matches the manufacturer code, image type, and the highest available file version of that image on the server. However, the server may choose to upgrade, downgrade, or reinstall clients’ image, as its policy dictates. If client’s hardware version is included in the command, the server shall examine the value against the minimum and maximum hardware versions included in the OTA file header. + + Field Control + + + Manufacturer Code + + + Image Type + + + File Version + + + Hardware Version + + fieldControl + LOGIC_AND + 0x01 + + + + + Query Next Image Response + The upgrade server sends a Query Next Image Response with one of the following status: SUCCESS, NO_IMAGE_AVAILABLE or NOT_AUTHORIZED. When a SUCCESS status is sent, it is considered to be the explicit authorization to a device by the upgrade server that the device may upgrade to a specific software image. <br> A status of NO_IMAGE_AVAILABLE indicates that the server is authorized to upgrade the client but it currently does not have the (new) OTA upgrade image available for the client. For all clients (both ZR and ZED)9 , they shall continue sending Query Next Image Requests to the server periodically until an image becomes available. <br> A status of NOT_AUTHORIZED indicates the server is not authorized to upgrade the client. In this case, the client may perform discovery again to find another upgrade server. The client may implement an intelligence to avoid querying the same unauthorized server. + + Status + + + Manufacturer Code + + status + EQUAL + ZclStatus.SUCCESS + + + + Image Type + + status + EQUAL + ZclStatus.SUCCESS + + + + File Version + + status + EQUAL + ZclStatus.SUCCESS + + + + Image Size + + status + EQUAL + ZclStatus.SUCCESS + + + + + Image Block Command + The client device requests the image data at its leisure by sending Image Block Request command to the upgrade server. The client knows the total number of request commands it needs to send from the image size value received in Query Next Image Response command. <br> The client repeats Image Block Requests until it has successfully obtained all data. Manufacturer code, image type and file version are included in all further queries regarding that image. The information eliminates the need for the server to remember which OTA Upgrade Image is being used for each download process. <br> If the client supports the BlockRequestDelay attribute it shall include the value of the attribute as the BlockRequestDelay field of the Image Block Request message. The client shall ensure that it delays at least BlockRequestDelay milliseconds after the previous Image Block Request was sent before sending the next Image Block Request message. A client may delay its next Image Block Requests longer than its BlockRequestDelay attribute. + + Field Control + + + Manufacturer Code + + + Image Type + + + File Version + + + File Offset + + + Maximum Data Size + + + Request Node Address + + fieldControl + LOGIC_AND + 0x01 + + + + Block Request Delay + + fieldControl + LOGIC_AND + 0x02 + + + + + Image Page Command + The support for the command is optional. The client device may choose to request OTA upgrade data in one page size at a time from upgrade server. Using Image Page Request reduces the numbers of requests sent from the client to the upgrade server, compared to using Image Block Request command. In order to conserve battery life a device may use the Image Page Request command. Using the Image Page Request command eliminates the need for the client device to send Image Block Request command for every data block it needs; possibly saving the transmission of hundreds or thousands of messages depending on the image size. <br> The client keeps track of how much data it has received by keeping a cumulative count of each data size it has received in each Image Block Response. Once the count has reach the value of the page size requested, it shall repeat Image Page Requests until it has successfully obtained all pages. Note that the client may choose to switch between using Image Block Request and Image Page Request during the upgrade process. For example, if the client does not receive all data requested in one Image Page Request, the client may choose to request the missing block of data using Image Block Request command, instead of requesting the whole page again. + + Field Control + + + Manufacturer Code + + + Image Type + + + File Version + + + File Offset + + + Maximum Data Size + + + Page Size + + + Response Spacing + + + Request Node Address + + fieldControl + LOGIC_AND + 0x01 + + + + + Image Block Response + Upon receipt of an Image Block Request command the server shall generate an Image Block Response. If the server is able to retrieve the data for the client and does not wish to change the image download rate, it will respond with a status of SUCCESS and it will include all the fields in the payload. The use of file offset allows the server to send packets with variable data size during the upgrade process. This allows the server to support a case when the network topology of a client may change during the upgrade process, for example, mobile client may move around during the upgrade process. If the client has moved a few hops away, the data size shall be smaller. Moreover, using file offset eliminates the need for data padding since each Image Block Response command may contain different data size. A simple server implementation may choose to only support largest possible data size for the worst-case scenario in order to avoid supporting sending packets with variable data size. <br> The server shall respect the maximum data size value requested by the client and shall not send the data with length greater than that value. The server may send the data with length smaller than the value depending on the network topology of the client. For example, the client may be able to receive 100 bytes of data at once so it sends the request with 100 as maximum data size. But after considering all the security headers (perhaps from both APS and network levels) and source routing overhead (for example, the client is five hops away), the largest possible data size that the server can send to the client shall be smaller than 100 bytes. + + Status + + + Manufacturer Code + + + Image Type + + + File Version + + + File Offset + + + Image Data + + + + Upgrade End Command + Upon reception all the image data, the client should verify the image to ensure its integrity and validity. If the device requires signed images it shall examine the image and verify the signature. Clients may perform additional manufacturer specific integrity checks to validate the image, for example, CRC check on the actual file data. <br> If the image fails any integrity checks, the client shall send an Upgrade End Request command to the upgrade server with a status of INVALID_IMAGE. In this case, the client may reinitiate the upgrade process in order to obtain a valid OTA upgrade image. The client shall not upgrade to the bad image and shall discard the downloaded image data. <br> If the image passes all integrity checks and the client does not require additional OTA upgrade image file, it shall send back an Upgrade End Request with a status of SUCCESS. However, if the client requires multiple OTA upgrade image files before performing an upgrade, it shall send an Upgrade End Request command with status REQUIRE_MORE_IMAGE. This shall indicate to the server that it cannot yet upgrade the image it received. <br> If the client decides to cancel the download process for any other reasons, it has the option of sending Upgrade End Request with status of ABORT at anytime during the download process. The client shall then try to reinitiate the download process again at a later time. + + Status + + + Manufacturer Code + + + Image Type + + + File Version + + + + Upgrade End Response + When an upgrade server receives an Upgrade End Request command with a status of INVALID_IMAGE, REQUIRE_MORE_IMAGE, or ABORT, no additional processing shall be done in its part. If the upgrade server receives an Upgrade End Request command with a status of SUCCESS, it shall generate an Upgrade End Response with the manufacturer code and image type received in the Upgrade End Request along with the times indicating when the device should upgrade to the new image. <br> The server may send an unsolicited Upgrade End Response command to the client. This may be used for example if the server wants to synchronize the upgrade on multiple clients simultaneously. For client devices, the upgrade server may unicast or broadcast Upgrade End Response command indicating a single client device or multiple client devices shall switch to using their new images. The command may not be reliably received by sleepy devices if it is sent unsolicited. + + Manufacturer Code + + + Image Type + + + File Version + + + Current Time + + + Upgrade Time + + + + Query Specific File Command + Client devices shall send a Query Specific File Request command to the server to request for a file that is specific and unique to it. Such file could contain non-firmware data such as security credential (needed for upgrading from Smart Energy 1.1 to Smart Energy 2.0), configuration or log. When the device decides to send the Query Specific File Request command is manufacturer specific. However, one example is during upgrading from SE 1.1 to 2.0 where the client may have already obtained new SE 2.0 image and now needs new SE 2.0 security credential data. + + Request Node Address + + + Manufacturer Code + + + Image Type + + + File Version + + + Zigbee Stack Version + + + + Query Specific File Response + The server sends Query Specific File Response after receiving Query Specific File Request from a client. The server shall determine whether it first supports the Query Specific File Request command. Then it shall determine whether it has the specific file being requested by the client using all the information included in the request. The upgrade server sends a Query Specific File Response with one of the following status: SUCCESS, NO_IMAGE_AVAILABLE or NOT_AUTHORIZED. <br> A status of NO_IMAGE_AVAILABLE indicates that the server currently does not have the device specific file available for the client. A status of NOT_AUTHORIZED indicates the server is not authorized to send the file to the client. + + Status + + + Manufacturer Code + + status + EQUAL + ZclStatus.SUCCESS + + + + Image Type + + status + EQUAL + ZclStatus.SUCCESS + + + + File Version + + status + EQUAL + ZclStatus.SUCCESS + + + + Image Size + + status + EQUAL + ZclStatus.SUCCESS + + + + + + Upgrade Server ID + The attribute is used to store the IEEE address of the upgrade server resulted from the discovery of the up- grade server’s identity. If the value is set to a non-zero value and corresponds to an IEEE address of a device that is no longer accessible, a device MAY choose to discover a new Upgrade Server depending on its own security policies. + + + File Offset + The parameter indicates the current location in the OTA upgrade image. It is essentially the (start of the) address of the image data that is being transferred from the OTA server to the client. The attribute is optional on the client and is made available in a case where the server wants to track the upgrade process of a particular client. + + + Current File Version + The file version of the running firmware image on the device. The information is available for the server to query via ZCL read attribute command. The attribute is optional on the client. + + + Current ZigBee Stack Version + The ZigBee stack version of the running image on the device. The information is available for the server to query via ZCL read attribute command. + + + Downloaded File Version + The file version of the downloaded image on additional memory space on the device. The information is available for the server to query via ZCL read attribute command. The information is useful for the OTA upgrade management, so the server MAY ensure that each client has downloaded the correct file version before initiate the upgrade. The attribute is optional on the client. + + + Downloaded ZigBee Stack Version + The ZigBee stack version of the downloaded image on additional memory space on the device. The information is available for the server to query via ZCL read attribute command. The information is useful for the OTA upgrade management, so the server SHALL ensure that each client has downloaded the correct ZigBee stack version before initiate the upgrade. The attribute is optional on the client. + + + Image Upgrade Status + The upgrade status of the client device. The status indicates where the client device is at in terms of the download and upgrade process. The status helps to indicate whether the client has completed the download process and whether it is ready to upgrade to the new image. The status MAY be queried by the server via ZCL read attribute command. Hence, the server MAY not be able to reliably query the status of ZED client since the device MAY have its radio off. + + + Manufacturer ID + This attribute SHALL reflect the ZigBee assigned value for the manufacturer of the device. + + + Image Type ID + This attribute SHALL indicate the image type identifier of the file that the client is currently downloading, or a file that has been completely downloaded but not upgraded to yet. The value of this attribute SHALL be 0xFFFF when the client is not downloading a file or is not waiting to apply an upgrade. + + + Minimum Block Request Period + This attribute acts as a rate limiting feature for the server to slow down the client download and prevent saturating the network with block requests. The attribute lives on the client but can be changed during a download if rate limiting is supported by both devices. + + + Image Stamp + This attribute acts as a second verification to identify the image in the case that sometimes developers of the application have forgotten to increase the firmware version attribute. It is a 32 bits value and has a valid range from 0x00000000 to 0xFFFFFFFF. This attribute value must be consistent during the lifetime of the same image and also must be unique for each different build of the image. This attribute value SHOULD not be hardcoded or generated by any manual process. This attribute value SHOULD be generated by performing a hash or checksum on the entire image. There are two possible methods to generate this checksum. It can be generated dynamically during runtime of the application or it can be generated during compile time of the application. + + + + Status + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0020_PollControl.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0020_PollControl.xml new file mode 100644 index 000000000..db153ea26 --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0020_PollControl.xml @@ -0,0 +1,71 @@ + + 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. + + Check In Response + The Check-in Response is sent in response to the receipt of a Check-in command. The Check-in Response is used by the Poll Control Client to indicate whether it would like the device implementing the Poll Control Cluster Server to go into a fast poll mode and for how long. If the Poll Control Cluster Client indicates that it would like the device to go into a fast poll mode, it is responsible for telling the device to stop fast polling when it is done sending messages to the fast polling device. <br> If the Poll Control Server receives a Check-In Response from a client for which there is no binding (unbound), it SHOULD respond with a Default Response with a status value indicating ACTION_DENIED. <br> If the Poll Control Server receives a Check-In Response from a client for which there is a binding (bound) with an invalid fast poll interval it SHOULD respond with a Default Response with status INVALID_VALUE. <br> If the Poll Control Server receives a Check-In Response from a bound client after temporary fast poll mode is completed it SHOULD respond with a Default Response with a status value indicating TIMEOUT. <br> In all of the above cases, the Server SHALL respond with a Default Response not equal to ZCL_SUCCESS. + + Start Fast Polling + This Boolean value indicates whether or not the Poll Control Server device SHOULD begin fast polling or not. If the Start Fast Polling value is true, the server device is EXPECTED to begin fast polling until the Fast Poll Timeout has expired. If the Start Fast Polling argument is false, the Poll Control Server MAY continue in normal operation and is not required to go into fast poll mode. + + + Fast Poll Timeout + The Fast Poll Timeout value indicates the number of quarterseconds during which the device SHOULD continue fast polling. If the Fast Poll Timeout value is 0, the device is EXPECTED to continue fast polling until the amount of time indicated it the FastPollTimeout attribute has elapsed or it receives a Fast Poll Stop command. If the Start Fast Polling argument is false, the Poll Control Server MAY ignore the Fast Poll Timeout argument. + The Fast Poll Timeout argument temporarily overrides the FastPollTimeout attribute on the Poll Control Cluster Server for the fast poll mode induced by the Check-in Response command. This value is not EXPECTED to overwrite the stored value in the FastPollTimeout attribute. + If the FastPollTimeout parameter in the CheckInResponse command is greater than the FastPollTimeoutMax attribute value, the Server Device SHALL respond with a default response of error status not equal to ZCL_SUCCESS. It is suggested to use the Error Status of ZCL_INVALID_FIELD. + + + + Fast Poll Stop Command + The Fast Poll Stop command is used to stop the fast poll mode initiated by the Check-in response. The Fast Poll Stop command has no payload. <br> If the Poll Control Server receives a Fast Poll Stop from an unbound client it SHOULD send back a DefaultResponse with a value field indicating “ACTION_DENIED” . The Server SHALL respond with a DefaultResponse not equal to ZCL_SUCCESS. <br> If the Poll Control Server receives a Fast Poll Stop command from a bound client but it is unable to stop fast polling due to the fact that there is another bound client which has requested that polling continue it SHOULD respond with a Default Response with a status of “ACTION_DENIED” <br> If a Poll Control Server receives a Fast Poll Stop command from a bound client but it is not FastPolling it SHOULD respond with a Default Response with a status of ACTION_DENIED. + + + Set Long Poll Interval Command + The Set Long Poll Interval command is used to set the Read Only LongPollInterval attribute. <br> When the Poll Control Server receives the Set Long Poll Interval Command, it SHOULD check its internal minimal limit and the attributes relationship if the new Long Poll Interval is acceptable. If the new value is acceptable, the new value SHALL be saved to the LongPollInterval attribute. If the new value is not acceptable, the Poll Control Server SHALL send a default response of INVALID_VALUE and the LongPollInterval attribute value is not updated. + + New Long Poll Interval + + + + Set Short Poll Interval Command + The Set Short Poll Interval command is used to set the Read Only ShortPollInterval attribute. <br> When the Poll Control Server receives the Set Short Poll Interval Command, it SHOULD check its internal minimal limit and the attributes relationship if the new Short Poll Interval is acceptable. If the new value is acceptable, the new value SHALL be saved to the ShortPollInterval attribute. If the new value is not acceptable, the Poll Control Server SHALL send a default response of INVALID_VALUE and the ShortPollInterval attribute value is not updated. + + New Short Poll Interval + + + + Check In Command + The Poll Control Cluster server sends out a Check-in command to the devices to which it is paired based on the server’s Check-inInterval attribute. It does this to find out if any of the Poll Control Cluster Clients with which it is paired are interested in having it enter fast poll mode so that it can be managed. This request is sent out based on either the Check-inInterval, or the next Check-in value in the Fast Poll Stop Request generated by the Poll Control Cluster Client. <br> The Check-in command expects a Check-in Response command to be sent back from the Poll Control Client. If the Poll Control Server does not receive a Check-in response back from the Poll Control Client up to 7.68 seconds it is free to return to polling according to the LongPollInterval. + + + Checkin Interval + The Poll Control server is responsible for checking in with the poll control client periodically to see if the poll control client wants to modify the poll rate of the poll control server. This is due to the fact that the PollControl server is implemented on an end device that MAY have an unpredictable sleep-wake cycle. The CheckinInterval represents the default amount of time between check-ins by the poll control server with the poll control client. The CheckinInterval is measured in quarter-seconds. A value of 0 indicates that the Poll Control Server is turned off and the poll control server will not check-in with the poll control client. The Poll Control Server checks in with the Poll Control Client by sending a Checkin command to the Client. This value SHOULDbe longer than the LongPoll Interval attribute. If the Client writes an invalid attribute value (Example: Out of Range or a value smaller than the optional Check-inIntervalMinattribute value or a value smaller than the LongPollInterval attribute value), the Server SHOULD return Write Attributes Response with an error status not equal to ZCL_SUCCESS. The Poll Control Client will hold onto the actions or messages for the Poll Control Server at the application level until the Poll Control Server checks in with the Poll Control Client. + + + Long Poll Interval + An end device that implements the Poll Control server MAY optionally expose a LongPollInterval attribute. The Long Poll Interval represents the maximum amount of time in quarter-seconds between MAC Data Requests from the end device to its parent. + The LongPollInterval defines the frequency of polling that an end device does when it is NOT in fast poll mode. The LongPollInterval SHOULD be longer than the ShortPollInterval attribute but shorter than the CheckinInterval attribute.A value of 0xffffffff is reserved to indicate that the device does not have or does not know its long poll interval + + + Short Poll Interval + An end device that implements the Poll Control server MAY optionally expose the ShortPollInterval attribute. The ShortPollIntervalrepresents the number of quarterseconds that an end device waits between MAC Data Requests to its parent when it is expecting data (i.e.,in fast poll mode). + + + Fast Poll Timeout + The FastPollTimeout attribute represents the number of quarterseconds that an end device will stay in fast poll mode by default. It is suggested that the FastPollTimeoutattribute value be greater than 7.68 seconds.The Poll Control Cluster Client MAYoverride this value by indicating a different value in the Fast Poll Duration argument in the Check-in Response command. If the Client writes a value out of range or greater than the optional FastPollTimeoutMax attribute value if supported, the Server SHOULD return a Write Attributes Response with a status of INVALID_VALUE30. An end device that implements the Poll Control server can be put into a fast poll mode during which it will send MAC Data Requests to its parent at the frequency of its configured ShortPollInterval attribute. During this period of time, fast polling is considered active. When the device goes into fast poll mode, it is required to send MAC DataRequests to its parent at an accelerated rate and is thus more responsive on the network and can receive data asynchronously from the device implementing the Poll Control Cluster Client. + + + Checkin Interval Min + The Poll Control Server MAY optionally provide its own minimum value for the Check-inInterval to protect against the Check-inInterval being set too low and draining the battery on the end device implementing the Poll Control Server. + + + Long Poll Interval Min + The Poll Control Server MAYoptionally provide its own minimum value for the LongPollIntervalto protect against another device setting the value to too short a time resulting in an inadvertent power drain on the device. + + + Fast Poll Timeout Min + The Poll Control Server MAY optionally provide its own maximum value for the FastPollTimeout to avoid it being set to too high a value resulting in an inadvertent power drain on the device. + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0101_DoorLock.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0101_DoorLock.xml new file mode 100644 index 000000000..79a3eaa52 --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0101_DoorLock.xml @@ -0,0 +1,251 @@ + + 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. + Generally the door lock itself implements the server side of this cluster. The attributes and commands listed in this cluster were developed to be implemented by a door lock which has the ability to keep track of multiple users and schedules. + The door lock cluster provides several alarms which can be sent when there is a critical state on the door lock. The alarms available for the door lock cluster are listed in the section below outlining the alarm mask at- tribute. The Alarm cluster is used to generate the actual alarms. + The event mechanism in the door lock centers on the transmission of two commands autonomously generated by the server and sent to a bound device. The assumption is that the binding mechanism will be used to commission the server to send these commands. + Door locks have the ability to require the use of APS encryption for sending and receiving of all cluster messages. The Security Level attribute is used to specify the type of encryption required by the door lock. + + Lock Door Command + This command causes the lock device to lock the door. As of HA 1.2, this command includes an optional code for the lock. The door lock MAY require a PIN depending on the value of the [Require PIN for RF Operation attribute] + + PIN Code + + + + Unlock Door Command + This command causes the lock device to unlock the door. As of HA 1.2, this command includes an optional code for the lock. The door lock MAY require a code depending on the value of the [Require PIN for RF Operation attribute]. + Note: If the attribute AutoRelockTime is supported the lock will close when the auto relock time has expired + + PIN Code + + + + Toggle + Request the status of the lock. As of HA 1.2, this command includes an optional code for the lock. The door lock MAY require a code depending on the value of the [Require PIN for RF Operation attribute] + + PIN + + + + Unlock With Timeout + This command causes the lock device to unlock the door with a timeout parameter. After the time in seconds specified in the timeout field, the lock device will relock itself automatically. This timeout parameter is only temporary for this message transition only and overrides the default relock time as specified in the [Auto Relock Time attribute] attribute. If the door lock device is not capable of or does not want to support temporary Relock Timeout, it SHOULD not support this optional command. + + Timeout In Seconds + + + PIN + + + + + Lock Door Response + This command is sent in response to a Lock command with one status byte payload. The Status field SHALL be set to SUCCESS or FAILURE. + The status byte only indicates if the message has received successfully. To determine the lock and/or door status, the client SHOULD query to [Lock State attribute] and [Door State attribute] + + Status + + + + Unlock Door Response + This command is sent in response to a Toggle command with one status byte payload. The Status field SHALL be set to SUCCESS or FAILURE. + The status byte only indicates if the message has received successfully. To determine the lock and/or door status, the client SHOULD query to [Lock State attribute] and [Door State attribute]. + + Status + + + + Toggle Response + This command is sent in response to a Toggle command with one status byte payload. The Status field SHALL be set to SUCCESS or FAILURE. + The status byte only indicates if the message has received successfully. To determine the lock and/or door status, the client SHOULD query to [Lock State attribute] and [Door State attribute]. + + Status + + + + Unlock With Timeout Response + This command is sent in response to an Unlock with Timeout command with one status byte payload. The Status field SHALL be set to SUCCESS or FAILURE. + The status byte only indicates if the message has received successfully. To determine status, the client SHOULD query to [Lock State attribute] and [Door State attribute]. + + Status + + + + + Lock State + Provides the current lock state + + + Lock Type + Defines the type of lock + + + Actuator Enabled + Boolean indicating the enabled/disabled state of the lock + + + Door State + The current state of the door lock + + + Door Open Events + This attribute holds the number of door open events that have occurred since it was last zeroed. + + + Door Closed Events + This attribute holds the number of door closed events that have occurred since it was last zeroed. + + + Open Period + This attribute holds the number of minutes the door has been open since the last time it transitioned from closed to open. + + + Num Lock Records Supported + The number of available log records. + + + Num Total Users Supported + Number of total users supported by the lock. This value is equal to the higher one of [# of PIN Users Supported] and [# of RFID Users Supported] + + + Num PIN Users Supported + The number of PIN users supported. + + + Num RFID Users Supported + The number of RFID users supported. + + + Num Weekday Schedules Supported Per User + The number of configurable week day schedule supported per user. + + + Num Yearday Schedules Supported Per User + The number of configurable year day schedule supported per user + + + Num Holiday Schedules Supported Per User + The number of holiday schedules supported for the entire door lock device. + + + Max PIN Length + An 8 bit value indicates the maximum length in bytes of a PIN Code on this device. The default is set to 8 since most lock manufacturers currently allow PIN Codes of 8 bytes or less. + + + Min PIN Length + An 8 bit value indicates the minimum length in bytes of a PIN Code on this device. The default is set to 4 since most lock manufacturers do not support PIN Codes that are shorter than 4 bytes. + + + Max RFID Code Length + An 8 bit value indicates the maximum length in bytes of a RFID Code on this device. The value depends on the RFID code range specified by the manufacturer, if media anti-collision identifiers (UID) are used as RFID code, a value of 20 (equals 10 Byte ISO 14443A UID) is recommended. + + + Min RFID Code Length + An 8 bit value indicates the minimum length in bytes of a RFID Code on this device. The value depends on the RFID code range specified by the manufacturer, if media anti-collision identifiers (UID) are used as RFID code, a value of 8 (equals 4 Byte ISO 14443A UID) is recommended. + + + Enable Logging + Enable/disable event logging. When event logging is enabled, all event messages are stored on the lock for retrieval. Logging events can be but not limited to Tamper Alarm, Lock, Unlock, Autolock, User Code Added, User Code Deleted, Schedule Added, and Schedule Deleted. For a full detail of all the possible alarms and events, please refer to the full list in the Alarm and Event Masks Attribute Set. + + + Language + Modifies the language for the on-screen or audible user interface using three bytes from ISO-639-1. It consists of one byte of length and two bytes for the language code. For example if the language is set to English, the value would be "02 65 6E" for the language code "en" + + + LED Settings + The settings for the LED support three different modes + + + Auto Relock Time + The number of seconds to wait after unlocking a lock before it automatically locks again. 0=disabled. If set, unlock operations from any source will be timed. For one time unlock with timeout use the specific command. + + + Sound Volume + The sound volume on a door lock has three possible settings: silent, low and high volumes + + + Operating Mode + Shows the current operating mode + + + Supported Operating Modes + This bitmap contains all operating bits of the Operating Mode Attribute supported by the lock. The value of the enumeration in “Operating Mode” defines the related bit to be set, as shown in Table 7-16. All bits supported by a lock SHALL be set to zero. + + + Default Configuration Register + This attribute represents the default configurations as they are physically set on the device (example: hardware dip switch setting, etc…) and represents the default setting for some of the attributes within this Operational Setting Attribute Set (for example: LED, Auto Lock, Sound Volume, and Operating Mode attributes). + This is a read-only attribute and is intended to allow clients to determine what changes MAY need to be made without having to query all the included attributes. It MAY be beneficial for the clients to know what the device’s original settings were in the event that the device needs to be restored to factory default settings. + + + Enable Local Programming + Enable/disable local programming on the door lock. The local programming features includes but not limited to adding new user codes, deleting existing user codes, add new schedule, deleting existing schedule on the local door lock interfaces. If this value is set to 0x01 or TRUE then local programming is enabled on the door lock. If it is set to 0x00 or FALSE then local programming is disabled on the door lock. Local programming is enabled by default. + + + Enable One Touch Locking + Enable/disable the ability to lock the door lock with a single touch on the door lock. + + + Enable Inside Status Led + Enable/disable an inside LED that allows the user to see at a glance if the door is locked. + + + Enable Privacy Mode Button + Enable/disable a button inside the door that is used to put the lock into privacy mode. When the lock is in privacy mode it cannot be manipulated from the outside. + + + Wrong Code Entry Limit + The number of incorrect codes or RFID presentment attempts a user is allowed to enter before the door will enter a lockout state. The lockout state will be for the duration of UserCodeTemporaryDisableTime. + + + User Code Temporary Disable Time + The number of seconds that the lock shuts down following wrong code entry. 1-255 seconds. Device can shutdown to lock user out for specified amount of time. (Makes it difficult to try and guess a PIN for the device.) + + + Send PIN Over The Air + Boolean set to True if it is ok for the door lock server to send PINs over the air. This attribute determines the behavior of the server’s TX operation. If it is false, then it is not ok for the device to send PIN in any messages over the air. + The PIN field within any door lock cluster message SHALL keep the first octet unchanged and masks the actual code by replacing with 0xFF. For example (PIN "1234" ): If the attribute value is True, 0x04 0x31 0x32 0x33 0x34 SHALL be used in the PIN field in any door lock cluster message payload. If the attribute value is False, 0x04 0xFF 0xFF 0xFF 0xFF SHALL be used. + + + Require PIN For RF Operation + Boolean set to True if the door lock server requires that an optional PINs be included in the payload of RF lock operation events like Lock, Unlock and Toggle in order to function. + + + ZigBee Security Level + Door locks MAY sometimes wish to implement a higher level of security within the application protocol in additional to the default network security. For instance a door lock MAY wish to use additional APS security for cluster transactions. This protects the door lock against being controlled by any other devices which have access to the network key. + The Security Level attribute allows the door lock manufacturer to indicate what level of security the doorlock requires. + + + Alarm Mask + The alarm mask is used to turn on/off alarms for particular functions. Alarms for an alarm group are enabled if the associated alarm mask bit is set. Each bit represents a group of alarms. Entire alarm groups can be turned on or off by setting or clearing the associated bit in the alarm mask. + + + Keypad Operation Event Mask + Event mask used to turn on and off the transmission of keypad operation events. This mask DOES NOT apply to the storing of events in the report table. + + + RF Operation Event Mask + Event mask used to turn on and off the transmission of RF operation events. This mask DOES NOT apply to the storing of events in the report table. + + + Manual Operation Event Mask + Event mask used to turn on and off manual operation events. This mask DOES NOT apply to the storing of events in the report table. + + + RFID Operation Event Mask + Event mask used to turn on and off RFID operation events. This mask DOES NOT apply to the storing of events in the report table. + + + Keypad Programming Event Mask + Event mask used to turn on and off keypad programming events. This mask DOES NOT apply to the storing of events in the report table. + + + RF Programming Event Mask + Event mask used to turn on and off RF programming events. This mask DOES NOT apply to the storing of events in the report table. + + + RFID Programming Event Mask + Event mask used to turn on and off RFID programming events. This mask DOES NOT apply to the storing of events in the report table. + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0102_WindowCovering.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0102_WindowCovering.xml new file mode 100644 index 000000000..b4f445b7a --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0102_WindowCovering.xml @@ -0,0 +1,126 @@ + + Window Covering + Provides an interface for controlling and adjusting automatic window coverings. + + Window Covering Up Open + Moves window covering to InstalledOpenLimit + + + Window Covering Down Close + Moves window covering to InstalledClosedLimit + + + Window Covering Stop + Stop any adjustment of window covering + + + Window Covering Go To Lift Value + Goto the specified lift value + + Lift Value + + + + Window Covering Go To Lift Percentage + Goto the specified lift percentage + + Percentage Lift Value + + + + Window Covering Go To Tilt Value + Goto the specified tilt value + + Tilt Value + + + + Window Covering Go To Tilt Percentage + Goto the specified tilt percentage + + Percentage Tilt Value + + + + Window Covering Type + The WindowCoveringType attribute identifies the type of window covering being controlled by this endpoint. + + + Physical Closed Limit - Lift + The PhysicalClosedLimitLift attribute identifies the maximum possible encoder position possible (in centi- meters) to position the height of the window covering – this is ignored if the device is running in Open Loop Control. + + + Physical Closed Limit - Tilt + The PhysicalClosedLimitTilt attribute identifies the maximum possible encoder position possible (tenth of a degrees) to position the angle of the window covering – this is ignored if the device is running in Open Loop Control. + + + Current Position - Lift + The CurrentPositionLift attribute identifies the actual position (in centimeters) of the window covering from the top of the shade if Closed Loop Control is enabled. This attribute is ignored if the device is running in Open Loop Control. + + + Current Position - Tilt + The CurrentPositionTilt attribute identifies the actual tilt position (in tenth of an degree) of the window covering from Open if Closed Loop Control is enabled. This attribute is ignored if the device is running in Open Loop Control. + + + Number Of Actuations - Lift + The NumberOfActuationsLift attribute identifies the total number of lift actuations applied to the Window Covering since the device was installed. + + + Number Of Actuations - Tilt + The NumberOfActuationsTilt attribute identifies the total number of tilt actuations applied to the Window Covering since the device was installed. + + + Config Status + The ConfigStatus attribute makes configuration and status information available. To change settings, devices SHALL write to the Mode attribute of the Window Covering Settings Attribute Set. The behavior causing the setting or clearing of each bit is vendor specific. + + + Current Position Lift Percentage + The CurrentPositionLiftPercentage attribute identifies the actual position as a percentage between the InstalledOpenLimitLift attribute and the InstalledClosedLimitLift58attribute of the window covering from the up/open position if Closed Loop Control is enabled. If the device is running in Open Loop Control or the device only supports Tilt actions, this attribute is not required as an attribute but has a special interpretation when received as part of a scene command. + + + Current Position Tilt Percentage + The CurrentPositionTiltPercentage attribute identifies the actual position as a percentage between the InstalledOpenLimitTilt attribute and the InstalledClosedLimitTilt59attribute of the window covering from the up/open position if Closed Loop Control is enabled. If the device is running in Open Loop Control or the device only support Lift actions, this attribute is not required as an attribute but has a special interpretation when received as part of a scene command. + + + Installed Open Limit - Lift + The InstalledOpenLimitLift attribute identifies the Open Limit for Lifting the Window Covering whether position (in centimeters) is encoded or timed. This attribute is ignored if the device is running in Open Loop Control or only supports Tilt actions. + + + Installed Closed Limit - Lift + The InstalledClosedLimitLift attribute identifies the Closed Limit for Lifting the Window Covering whether position (in centimeters) is encoded or timed. This attribute is ignored if the device is running in Open Loop Control or only supports Tilt actions. + + + Installed Open Limit - Tilt + The InstalledOpenLimitTilt attribute identifies the Open Limit for Tilting the Window Covering whether position (in tenth of a degree) is encoded or timed. This attribute is ignored if the device is running in Open Loop Control or only supports Lift actions. + + + Installed Closed Limit - Tilt + The InstalledClosedLimitTilt attribute identifies the Closed Limit for Tilting the Window Covering whether position (in tenth of a degree) is encoded or timed. This attribute is ignored if the device is running in Open Loop Control or only supports Lift actions. + + + Velocity - Lift + The VelocityLift attribute identifies the velocity (in centimeters per second) associated with Lifting the Window Covering. + + + Acceleration Time - Lift + The AccelerationTimeLift attribute identifies any ramp up times to reaching the velocity setting (in tenth of a second) for positioning the Window Covering. + + + Deceleration Time - Lift + The DecelerationTimeLift attribute identifies any ramp down times associated with stopping the positioning (in tenth of a second) of the Window Covering. + + + Mode + The Mode attribute allows configuration of the Window Covering, such as: reversing the motor direction, placing the Window Covering into calibration mode, placing the motor into maintenance mode, disabling the ZigBee network, and disabling status LEDs. + + + Intermediate Setpoints - Lift + Identifies the number of Intermediate Setpoints supported by the Window Covering for Lift and then iden- tifies the position settings for those Intermediate Setpoints if Closed Loop Control is supported. This is a comma delimited ASCII character string. For example: “2,0x0013, 0x0030” + + + Intermediate Setpoints - Tilt + Identifies the number of Intermediate Setpoints supported by the Window Covering for Tilt and then iden- tifies the position settings for those Intermediate Setpoints if Closed Loop Control is supported. This is a comma delimited ASCII character string. For example: “2,0x0013, 0x0030” + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0201_Thermostat.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0201_Thermostat.xml new file mode 100644 index 000000000..496cd7ab2 --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0201_Thermostat.xml @@ -0,0 +1,214 @@ + + Thermostat + This cluster provides an interface to the functionality of a thermostat. + + Setpoint Raise/Lower Command + + Mode + + + Amount + + + + Set Weekly Schedule + The set weekly schedule command is used to update the thermostat weekly set point schedule from a management system. If the thermostat already has a weekly set point schedule programmed then it SHOULD replace each daily set point set as it receives the updates from the management system. For example if the thermostat has 4 set points for every day of the week and is sent a Set Weekly Schedule command with one set point for Saturday then the thermostat SHOULD remove all 4 set points for Saturday and replace those with the updated set point but leave all other days unchanged. <br> If the schedule is larger than what fits in one ZigBee frame or contains more than 10 transitions, the schedule SHALL then be sent using multipleSet Weekly Schedule Commands. + + Number Of Transitions + + + Day Of Week + + + Mode + + + Transition + + + Heat Set + + + Cool Set + + + + Get Weekly Schedule + + Days To Return + + + Mode To Return + + + + Clear Weekly Schedule + + + Get Relay Status Log + The Get Relay Status Log command is used to query the thermostat internal relay status log. This command has no payload. <br> The log storing order is First in First Out (FIFO) when the log is generated and stored into the Queue. <br> The first record in the log (i.e., the oldest) one, is the first to be replaced when there is a new record and there is no more space in the log. Thus, the newest record will overwrite the oldest one if there is no space left. <br> The log storing order is Last In First Out (LIFO) when the log is being retrieved from the Queue by a client device. Once the "Get Relay Status Log Response" frame is sent by the Server, the "Unread Entries" attribute SHOULD be decremented to indicate the number of unread records that remain in the queue. <br> If the "Unread Entries"attribute reaches zero and the Client sends a new "Get Relay Status Log Request", the Server MAY send one of the following items as a response: <br> i) resend the last Get Relay Status Log Response or ii) generate new log record at the time of request and send Get Relay Status Log Response with the new data + + + Get Weekly Schedule Response + + Number Of Transitions + + + Day Of Week + + + Mode + + + Transition + + + Heat Set + + + Cool Set + + + + Get Relay Status Log Response + + Time Of Day + + + Relay Status + + + Local Temperature + + + Humidity + + + Setpoint + + + Unread Entries + + + + Local Temperature + LocalTemperature represents the temperature in degrees Celsius, as measured locally. + + + Outdoor Temperature + OutdoorTemperature represents the temperature in degrees Celsius, as measured locally. + + + Occupancy + Occupancy specifies whether the heated/cooled space is occupied or not + + + Abs Min Heat Setpoint Limit + The MinHeatSetpointLimit attribute specifies the absolute minimum level that the heating setpoint MAY be set to. This is a limitation imposed by the manufacturer. + + + Abs Max Heat Setpoint Limit + The MaxHeatSetpointLimit attribute specifies the absolute maximum level that the heating setpoint MAY be set to. This is a limitation imposed by the manufacturer. + + + Abs Min Cool Setpoint Limit + The MinCoolSetpointLimit attribute specifies the absolute minimum level that the cooling setpoint MAY be set to. This is a limitation imposed by the manufacturer. + + + Abs Max Cool Setpoint Limit + The MaxCoolSetpointLimit attribute specifies the absolute maximum level that the cooling setpoint MAY be set to. This is a limitation imposed by the manufacturer. + + + Pi Cooling Demand + The PICoolingDemandattribute is 8 bits in length and specifies the level of cooling demanded by the PI (proportional integral) control loop in use by the thermostat (if any), in percent. This value is 0 when the thermostat is in “off” or “heating” mode. + + + Pi Heating Demand + The PIHeatingDemand attribute is 8 bits in length and specifies the level of heating demanded by the PI (proportional integral) control loop in use by the thermostat (if any), in percent. This value is 0 when the thermostat is in “off” or “cooling” mode. + + + Hvac System Type Configuration + + + Local Temperature Calibration + + + Occupied Cooling Setpoint + + + Occupied Heating Setpoint + + + Unoccupied Cooling Setpoint + + + Unoccupied Heating Setpoint + + + Min Heat Setpoint Limit + + + Max Heat Setpoint Limit + + + Min Cool Setpoint Limit + + + Max Cool Setpoint Limit + + + Min Setpoint Dead Band + + + Remote Sensing + + + Control Sequence Of Operation + + + System Mode + + + Alarm Mask + + + Thermostat Running Mode + + + + Day Of Week + + + + + + + + + + + + + + + + + + + Mode For Sequence + + + + + + + Setpoint Adjust Mode + + + + + + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0202_FanControl.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0202_FanControl.xml new file mode 100644 index 000000000..1edde048e --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0202_FanControl.xml @@ -0,0 +1,14 @@ + + Fan Control + This cluster specifies an interface to control the speed of a fan as part of a heating / cooling system. + + Fan Mode + The FanMode attribute is an 8-bit value that specifies the current speed of the fan. + + + Fan Mode Sequence + The FanModeSequence attribute is an 8-bit value that specifies the possible fan speeds that the thermostat can set. + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0203_DehumidificationControl.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0203_DehumidificationControl.xml new file mode 100644 index 000000000..906b7b954 --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0203_DehumidificationControl.xml @@ -0,0 +1,38 @@ + + Dehumidification Control + This cluster provides an interface to dehumidification functionality. + + Relative Humidity + The RelativeHumidity attribute is an 8-bit value that represents the current relative humidity (in %) measured by a local or remote sensor. The valid range ix 0x00 – 0x64 (0% to 100%). + + + Dehumidification Cooling + The DehumidificationCooling attribute is an 8-bit value that specifies the current dehumidification cooling output (in %). The valid range is 0 to DehumidificationMaxCool. + + + Rh Dehumidification Setpoint + The RHDehumidificationSetpoint attribute is an 8-bit value that represents the relative humidity (in %) at which dehumidification occurs. The valid range ix 0x1E – 0x64 (30% to 100%). + + + Relative Humidity Mode + The RelativeHumidityMode attribute is an 8-bit value that specifies how the RelativeHumidity value is being updated. + + + Dehumidification Lockout + The DehumidificationLockout attribute is an 8-bit value that specifies whether dehumidification is allowed or not. + + + Dehumidification Hysteresis + The DehumidificationHysteresis attribute is an 8-bit value that specifies the hysteresis (in %) associated with RelativeHumidity value. + + + Dehumidification Max Cool + The DehumidificationMaxCool attribute is an 8-bit value that specifies the maximum dehumidification cooling output (in %). The valid range ix 0x14 – 0x64 (20% to 100%). + + + Relative Humidity Display + The RelativeHumidityDisplay attribute is an 8-bit value that specifies whether the RelativeHumidity value is displayed to the user or not. + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0204_ThermostatUserInterfaceConfiguration.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0204_ThermostatUserInterfaceConfiguration.xml new file mode 100644 index 000000000..825988c34 --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0204_ThermostatUserInterfaceConfiguration.xml @@ -0,0 +1,19 @@ + + Thermostat User Interface Configuration + This cluster provides an interface to allow configuration of the user interface for a thermostat, or a thermostat controller device, that supports a keypad and LCD screen. + + Temperature Display Mode + The TemperatureDisplayMode attribute specifies the units of the temperature displayed on the thermostat screen. + + + Keypad Lockout + The KeypadLockout attribute specifies the level of functionality that is available to the user via the keypad. + + + Schedule Programming Visibility + The ScheduleProgrammingVisibility attribute is used to hide the weekly schedule programming functionality or menu on a thermostat from a user to prevent local user programming of the weekly schedule. The schedule programming MAY still be performed via a remote interface, and the thermostat MAY operate in schedule programming mode. + This command is designed to prevent local tampering with or disabling of schedules that MAY have been programmed by users or service providers via a more capable remote interface. The programming schedule SHALL continue to run even though it is not visible to the user locally at the thermostat. + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0300_ColorControl.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0300_ColorControl.xml new file mode 100644 index 000000000..034e7c7de --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0300_ColorControl.xml @@ -0,0 +1,295 @@ + + Color Control + This cluster provides an interface for changing the color of a light. Color is specified according to the Commission Internationale de l'Éclairage (CIE) specification CIE 1931 Color Space, [B4]. Color control is carried out in terms of x,y values, as defined by this specification. + + Move To Hue Command + + Hue + + + Direction + + + Transition Time + + + + Move Hue Command + + Move Mode + + + Rate + + + + Step Hue Command + + Step Mode + + + Step Size + + + Transition Time + + + + Move To Saturation Command + + Saturation + + + Transition Time + + + + Move Saturation Command + + Move Mode + + + Rate + + + + Step Saturation Command + + Step Mode + + + Step Size + + + Transition Time + + + + Move To Hue And Saturation Command + + Hue + + + Saturation + + + Transition Time + + + + Move To Color Command + + Color X + + + Color Y + + + Transition Time + + + + Move Color Command + + Rate X + + + Rate Y + + + + Step Color Command + + Step X + + + Step Y + + + Transition Time + + + + Move To Color Temperature Command + + Color Temperature + + + Transition Time + + + + Enhanced Move To Hue Command + + Hue + + + Direction + + + Transition Time + + + + Enhanced Step Hue Command + + Step Mode + + + Step Size + + + Transition Time + + + + Enhanced Move To Hue And Saturation Command + + Hue + + + Saturation + + + Transition Time + + + + Color Loop Set Command + + Update Flags + + + Action + + + Direction + + + Transition Time + + + Start Hue + + + + Current Hue + The CurrentHue attribute contains the current hue value of the light. It is updated as fast as practical during commands that change the hue. + The hue in degrees shall be related to the CurrentHue attribute by the relationship Hue = CurrentHue x 360 / 254 (CurrentHue in the range 0 - 254 inclusive) + If this attribute is implemented then the CurrentSaturation and ColorMode attributes shall also be implemented. + + + Current Saturation + The CurrentSaturation attribute holds the current saturation value of the light. It is updated as fast as practical during commands that change the saturation. The saturation shall be related to the CurrentSaturation attribute by the relationship Saturation = CurrentSaturation/254 (CurrentSaturation in the range 0 - 254 inclusive) If this attribute is implemented then the CurrentHue and ColorMode attributes shall also be implemented. + + + Remaining Time + The RemainingTime attribute holds the time remaining, in 1/10ths of a second, until the currently active command will be complete. + + + Current X + The CurrentX attribute contains the current value of the normalized chromaticity value x, as defined in the CIE xyY Color Space. It is updated as fast as practical during commands that change the color. + The value of x shall be related to the CurrentX attribute by the relationship + x = CurrentX / 65535 (CurrentX in the range 0 to 65279 inclusive) + + + Current Y + The CurrentY attribute contains the current value of the normalized chromaticity value y, as defined in the CIE xyY Color Space. It is updated as fast as practical during commands that change the color. + The value of y shall be related to the CurrentY attribute by the relationship + y = CurrentY / 65535 (CurrentY in the range 0 to 65279 inclusive) + + + Drift Compensation + The DriftCompensation attribute indicates what mechanism, if any, is in use for compensation for color/intensity drift over time. + + + Compensation Text + The CompensationText attribute holds a textual indication of what mechanism, if any, is in use to compensate for color/intensity drift over time. + + + Color Temperature + The ColorTemperature attribute contains a scaled inverse of the current value of the color temperature. It is updated as fast as practical during commands that change the color. + The color temperature value in Kelvins shall be related to the ColorTemperature attribute by the relationship + Color temperature = 1,000,000 / ColorTemperature (ColorTemperature in the range 1 to 65279 inclusive, giving a color temperature range from 1,000,000 Kelvins to 15.32 Kelvins). + The value ColorTemperature = 0 indicates an undefined value. The value ColorTemperature = 65535 indicates an invalid value. + + + Color Mode + The ColorMode attribute indicates which attributes are currently determining the color of the device. If either the CurrentHue or CurrentSaturation attribute is implemented, this attribute SHALL also be implemented, otherwise it is optional. The value of the ColorMode attribute cannot be written directly - it is set upon reception of another command in to the appropriate mode for that command. + + + Enhanced Current Hue + The EnhancedCurrentHueattribute represents non-equidistant steps along the CIE 1931 color triangle, and it provides 16-bits precision. The upper 8 bits of this attribute SHALL be used as an index in the implementation specific XY lookup table to provide the non-equidistance steps (see the ZLL test specification for an example). The lower 8 bits SHALL be used to interpolate between these steps in a linear way in order to provide color zoom for the user. + + + Enhanced Color Mode + The EnhancedColorModeattribute specifies which attributes are currently determining the color of the device. To provide compatibility with standard ZCL, the original ColorModeattribute SHALLindicate ‘CurrentHueand CurrentSaturation’ when the light uses the EnhancedCurrentHueattribute. + + + Color Loop Active + The ColorLoopActive attribute specifies the current active status of the color loop. If this attribute has the value 0x00, the color loop SHALLnot be active. If this attribute has the value 0x01, the color loop SHALL be active. All other values (0x02 – 0xff) are reserved. + + + Color Loop Direction + The ColorLoopDirection attribute specifies the current direction of the color loop. If this attribute has the value 0x00, the EnhancedCurrentHue attribute SHALL be decremented. If this attribute has the value 0x01, the EnhancedCurrentHue attribute SHALL be incremented. All other values (0x02 – 0xff) are reserved. + + + Color Loop Time + The ColorLoopTime attribute specifies the number of seconds it SHALL take to perform a full color loop, i.e.,to cycle all values of the EnhancedCurrentHue attribute (between 0x0000 and 0xffff). + + + Color Loop Start Hue + The ColorLoopStartEnhancedHueattribute specifies the value of the EnhancedCurrentHue attribute from which the color loop SHALL be started. + + + Color Loop Stored Hue + The ColorLoopStoredEnhancedHue attribute specifies the value of the EnhancedCurrentHue attribute before the color loop was started. Once the color loop is complete, the EnhancedCurrentHue attribute SHALL be restored to this value. + + + Color Capabilities + The ColorCapabilitiesattribute specifies the color capabilities of the device supporting the color control cluster. + Note:The support of the CurrentXand CurrentYattributes is mandatory regardless of color capabilities. + + + Color Temperature Min + The ColorTempPhysicalMinMiredsattribute indicates the minimum mired value supported by the hardware. ColorTempPhysicalMinMiredscorresponds to the maximum color temperature in kelvins supported by the hardware. ColorTempPhysicalMinMireds ≤ ColorTemperatureMireds + + + Color Temperature Max + The ColorTempPhysicalMaxMiredsattribute indicates the maximum mired value supported by the hard-ware. ColorTempPhysicalMaxMiredscorresponds to the minimum color temperature in kelvins supported by the hardware. ColorTemperatureMireds ≤ ColorTempPhysicalMaxMireds. + + + + Color Mode + + + + + + + + + Enhanced Color Mode + + + + + + + + + Color Capabilities + + + + + + + + + + + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0400_IlluminanceMeasurement.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0400_IlluminanceMeasurement.xml new file mode 100644 index 000000000..e445ca3fa --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0400_IlluminanceMeasurement.xml @@ -0,0 +1,31 @@ + + Illuminance Measurement + The cluster provides an interface to illuminance measurement functionality, including configuration and provision of notifications of illuminance measurements. + + Measured Value + MeasuredValue represents the Illuminance in Lux (symbol lx) as follows:- + MeasuredValue = 10,000 x log10 Illuminance + 1 + Where 1 lx <= Illuminance <=3.576 Mlx, corresponding to a MeasuredValue in the range 1 to 0xfffe. + The following special values of MeasuredValue apply. <li>0x0000 indicates a value of Illuminance that is too low to be measured.</li> <li>0xffff indicates that the Illuminance measurement is invalid.</li> + + + Min Measured Value + The MinMeasuredValue attribute indicates the minimum value of MeasuredValue that can be measured. A value of 0xffff indicates that this attribute is not defined. + + + Max Measured Value + The MaxMeasuredValue attribute indicates the maximum value of MeasuredValue that can be measured. A value of 0xffff indicates that this attribute is not defined. + MaxMeasuredValue shall be greater than MinMeasuredValue. + MinMeasuredValue and MaxMeasuredValue define the range of the sensor. + + + Tolerance + The Tolerance attribute indicates the magnitude of the possible error that is associated with MeasuredValue . The true value is located in the range (MeasuredValue – Tolerance) to (MeasuredValue + Tolerance). + + + Light Sensor Type + The LightSensorType attribute specifies the electronic type of the light sensor. + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0401_IlluminanceLevelSensing.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0401_IlluminanceLevelSensing.xml new file mode 100644 index 000000000..94f6cc132 --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0401_IlluminanceLevelSensing.xml @@ -0,0 +1,22 @@ + + Illuminance Level Sensing + The cluster provides an interface to illuminance level sensing functionality, including configuration and provision of notifications of whether the illuminance is within, above or below a target band. + + Level Status + The LevelStatus attribute indicates whether the measured illuminance is above, below, or within a band around IlluminanceTargetLevel . + + + Light Sensor Type + The LightSensorType attribute specifies the electronic type of the light sensor. + + + Illuminance Target Level + The IlluminanceTargetLevel attribute specifies the target illuminance level. This target level is taken as the centre of a 'dead band', which must be sufficient in width, with hysteresis bands at both top and bottom, to provide reliable notifications without 'chatter'. Such a dead band and hysteresis bands must be provided by any implementation of this cluster. (N.B. Manufacturer specific attributes may be provided to configure these). + IlluminanceTargetLevel represents illuminance in Lux (symbol lx) as follows: + IlluminanceTargetLevel = 10,000 x log10 Illuminance + Where 1 lx <= Illuminance <=3.576 Mlx, corresponding to a MeasuredValue in the range 0 to 0xfffe. + A value of 0xffff indicates that this attribute is not valid. + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0402_TemperatureMeasurement.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0402_TemperatureMeasurement.xml new file mode 100644 index 000000000..04746e7db --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0402_TemperatureMeasurement.xml @@ -0,0 +1,29 @@ + + Temperature Measurement + The server cluster provides an interface to temperature measurement functionality, including configuration and provision of notifications of temperature measurements. + + Measured Value + MeasuredValue represents the temperature in degrees Celsius as follows:- MeasuredValue = 100 x temperature in degrees Celsius. + Where -273.15°C <= temperature <= 327.67 ºC, corresponding to a + MeasuredValue in the range 0x954d to 0x7fff. The maximum resolution this format allows is 0.01 ºC. + A MeasuredValue of 0x8000 indicates that the temperature measurement is invalid. + MeasuredValue is updated continuously as new measurements are made. + + + Min Measured Value + The MinMeasuredValue attribute indicates the minimum value of MeasuredValue that is capable of being measured. A MinMeasuredValue of 0x8000 indicates that the minimum value is unknown. + + + Max Measured Value + The MaxMeasuredValue attribute indicates the maximum value of MeasuredValue that is capable of being measured. + MaxMeasuredValue shall be greater than MinMeasuredValue. + MinMeasuredValue and MaxMeasuredValue define the range of the sensor. + A MaxMeasuredValue of 0x8000 indicates that the maximum value is unknown. + + + Tolerance + The Tolerance attribute indicates the magnitude of the possible error that is associated with MeasuredValue . The true value is located in the range (MeasuredValue – Tolerance) to (MeasuredValue + Tolerance). + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0403_PressureMeasurement.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0403_PressureMeasurement.xml new file mode 100644 index 000000000..6ec21640e --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0403_PressureMeasurement.xml @@ -0,0 +1,48 @@ + + Pressure Measurement + The cluster provides an interface to pressure measurement functionality, including configuration and provision of notifications of pressure measurements. + + Measured Value + MeasuredValue represents the pressure in kPa as follows:- + MeasuredValue = 10 x Pressure + Where -3276.7 kPa <= Pressure <= 3276.7 kPa, corresponding to a MeasuredValue in the range 0x8001 to 0x7fff. + Note:- The maximum resolution this format allows is 0.1 kPa. + A MeasuredValue of 0x8000 indicates that the pressure measurement is invalid. MeasuredValue is updated continuously as new measurements are made. + + + Min Measured Value + The MinMeasuredValue attribute indicates the minimum value of MeasuredValue that can be measured. A value of 0x8000 means this attribute is not defined. + + + Max Measured Value + The MaxMeasuredValue attribute indicates the maximum value of MeasuredValue that can be measured. A value of 0x8000 means this attribute is not defined. + MaxMeasuredValue shall be greater than MinMeasuredValue. + MinMeasuredValue and MaxMeasuredValue define the range of the sensor. + + + Tolerance + The Tolerance attribute indicates the magnitude of the possible error that is associated with MeasuredValue . The true value is located in the range (MeasuredValue – Tolerance) to (MeasuredValue + Tolerance). + + + Scaled Value + ScaledValue represents the pressure in Pascals as follows: ScaledValue = 10Scale x Pressure in Pa + + + Min Scaled Value + The MinScaledValue attribute indicates the minimum value of ScaledValue that can be measured. A value of 0x8000 means this attribute is not defined + + + Max Scaled Value + The MaxScaledValue attribute indicates the maximum value of ScaledValue that can be measured. A value of 0x8000 means this attribute is not defined. + + + Scaled Tolerance + The ScaledTolerance attribute indicates the magnitude of the possible error that is associated with ScaledValue. The true value is located in the range (ScaledValue – ScaledTolerance) to (ScaledValue + ScaledTolerance). + + + Scale + The Scale attribute indicates the base 10 exponent used to obtain ScaledValue. + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0404_FlowMeasurement.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0404_FlowMeasurement.xml new file mode 100644 index 000000000..e0c5ae370 --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0404_FlowMeasurement.xml @@ -0,0 +1,30 @@ + + Flow Measurement + The server cluster provides an interface to flow measurement functionality, including configuration and provision of notifications of flow measurements. + + Measured Value + MeasuredValue represents the flow in m3/h as follows:- + MeasuredValue = 10 x Flow + Where 0 m3/h <= Flow <= 6,553.4 m3 + /h, corresponding to a MeasuredValue in the range 0 to 0xfffe. + The maximum resolution this format allows is 0.1 m3/h. + A MeasuredValue of 0xffff indicates that the pressure measurement is invalid. + MeasuredValue is updated continuously as new measurements are made. + + + Min Measured Value + The MinMeasuredValue attribute indicates the minimum value of MeasuredValue that can be measured. A value of 0xffff means this attribute is not defined + + + Max Measured Value + The MaxMeasuredValue attribute indicates the maximum value of MeasuredValue that can be measured. A value of 0xffff means this attribute is not defined. + MaxMeasuredValue shall be greater than MinMeasuredValue. + MinMeasuredValue and MaxMeasuredValue define the range of the sensor + + + Tolerance + The Tolerance attribute indicates the magnitude of the possible error that is associated with MeasuredValue . The true value is located in the range (MeasuredValue – Tolerance) to (MeasuredValue + Tolerance). + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0405_RelativeHumidityMeasurement.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0405_RelativeHumidityMeasurement.xml new file mode 100644 index 000000000..69be56251 --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0405_RelativeHumidityMeasurement.xml @@ -0,0 +1,29 @@ + + Relative Humidity Measurement + The server cluster provides an interface to relative humidity measurement functionality, including configuration and provision of notifications of relative humidity measurements. + + Measured Value + MeasuredValue represents the relative humidity in % as follows:- + MeasuredValue = 100 x Relative humidity + Where 0% <= Relative humidity <= 100%, corresponding to a MeasuredValue in the range 0 to 0x2710. + The maximum resolution this format allows is 0.01%. + A MeasuredValue of 0xffff indicates that the measurement is invalid. + MeasuredValue is updated continuously as new measurements are made. + + + Min Measured Value + The MinMeasuredValue attribute indicates the minimum value of MeasuredValue that can be measured. A value of 0xffff means this attribute is not defined + + + Max Measured Value + The MaxMeasuredValue attribute indicates the maximum value of MeasuredValue that can be measured. A value of 0xffff means this attribute is not defined. + MaxMeasuredValue shall be greater than MinMeasuredValue. + MinMeasuredValue and MaxMeasuredValue define the range of the sensor. + + + Tolerance + The Tolerance attribute indicates the magnitude of the possible error that is associated with MeasuredValue . The true value is located in the range (MeasuredValue – Tolerance) to (MeasuredValue + Tolerance). + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0406_OccupancySensing.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0406_OccupancySensing.xml new file mode 100644 index 000000000..17283917e --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0406_OccupancySensing.xml @@ -0,0 +1,39 @@ + + Occupancy Sensing + The cluster provides an interface to occupancy sensing functionality, including configuration and provision of notifications of occupancy status. + + Occupancy + The Occupancy attribute is a bitmap. + Bit 0 specifies the sensed occupancy as follows: 1 = occupied, 0 = unoccupied. All other bits are reserved. + + + Occupancy Sensor Type + The OccupancySensorType attribute specifies the type of the occupancy sensor. + + + PIR Occupied To Unoccupied Delay + The PIROccupiedToUnoccupiedDelay attribute is 8-bits in length and specifies the time delay, in seconds, before the PIR sensor changes to its occupied state when the sensed area becomes unoccupied. This attribute, along with PIRUnoccupiedToOccupiedTime, may be used to reduce sensor 'chatter' when used in an area where occupation changes frequently. + + + PIR Unoccupied To Occupied Delay + The PIRUnoccupiedToOccupiedDelay attribute is 8-bits in length and specifies the time delay, in seconds, before the PIR sensor changes to its unoccupied state when the sensed area becomes occupied. + + + PIR Unoccupied To Occupied Threshold + The PIRUnoccupiedToOccupiedThreshold attribute is 8 bits in length and specifies the number of movement detection events that must occur in the period PIRUnoccupiedToOccupiedDelay, before the PIR sensor changes to its occupied state. This attribute is mandatory if the PIRUnoccupiedToOccupiedDelay attribute is implemented. + + + Ultra Sonic Occupied To Unoccupied Delay + The UltraSonicOccupiedToUnoccupiedTime attribute specifies the time delay, in seconds, before the ultrasonic sensor changes to its occupied state when the sensed area becomes unoccupied. This attribute, along with UltraSonicUnoccupiedToOccupiedTime, may be used to reduce sensor 'chatter' when used in an area where occupation changes frequently. + + + Ultra Sonic Unoccupied To Occupied Delay + The UltraSonicUnoccupiedToOccupiedTime attribute specifies the time delay, in seconds, before the ultrasonic sensor changes to its unoccupied state when the sensed area becomes occupied. + + + Ultrasonic Unoccupied To Occupied Threshold + The UltrasonicUnoccupiedToOccupiedThreshold attribute is 8 bits in length and specifies the number of movement detection events that must occur in the period UltrasonicUnoccupiedToOccupiedDelay, before the Ultrasonic sensor changes to its occupied state. This attribute is mandatory if the UltrasonicUnoccupiedToOccupiedDelay attribute is implemented. + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0500_IasZone.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0500_IasZone.xml new file mode 100644 index 000000000..bd57fe210 --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0500_IasZone.xml @@ -0,0 +1,203 @@ + + IAS Zone + The IAS Zone cluster defines an interface to the functionality of an IAS security zone device. IAS Zone supports up to two alarm types per zone, low battery reports and supervision of the IAS network. + + Zone Enroll Response + + Enroll Response Code + + + Zone ID + + + + Initiate Normal Operation Mode Command + Used to tell the IAS Zone server to commence normal operation mode. <br> Upon receipt, the IAS Zone server SHALL commence normal operational mode. <br> Any configurations and changes made (e.g., CurrentZoneSensitivityLevel attribute) to the IAS Zone server SHALL be retained. <br> Upon commencing normal operation mode, the IAS Zone server SHALL send a Zone Status Change Notification command updating the ZoneStatus attribute Test bit to zero (i.e., “operation mode”). + + + Initiate Test Mode Command + Certain IAS Zone servers MAY have operational configurations that could be configured OTA or locally on the device. This command enables them to be remotely placed into a test mode so that the user or installer MAY configure their field of view, sensitivity, and other operational parameters. They MAY also verify the placement and proper operation of the IAS Zone server, which MAY have been placed in a difficult to reach location (i.e., making a physical input on the device impractical to trigger). <br> Another use case for this command is large deployments, especially commercial and industrial, where placing the entire IAS system into test mode instead of a single IAS Zone server is infeasible due to the vulnerabilities that might arise. This command enables only a single IAS Zone server to be placed into test mode. <br> The biggest limitation of this command is that most IAS Zone servers today are battery-powered sleepy nodes that cannot reliably receive commands. However, implementers MAY decide to program an IAS Zone server by factory default to maintain a limited duration of normal polling upon initialization/joining to a new network. Some IAS Zone servers MAY also have AC mains power and are able to receive commands. Some types of IAS Zone servers that MAY benefit from this command are: motion sensors and fire sensor/smoke alarm listeners (i.e., a device that listens for a non-communicating fire sensor to alarm and communicates this to the IAS CIE). + + Test Mode Duration + Specifies the duration, in seconds, for which the IAS Zone server SHALL operate in its test mode. + + + Current Zone Sensitivity Level + Specifies the sensitivity level the IAS Zone server SHALL use for the duration of the Test Mode and with which it must update its CurrentZoneSensitivityLevel attribute. + The permitted values of Current Zone Sensitivity Level are shown defined for the CurrentZoneSensitivityLevel Attribute. + + + + Zone Status Change Notification Command + The Zone Status Change Notification command is generated when a change takes place in one or more bits of the ZoneStatus attribute. + + Zone Status + The Zone Status field SHALL be the current value of the ZoneStatus attribute. + + + Extended Status + The Extended Status field is reserved for additional status information and SHALL be set to zero. + + + Zone ID + Zone ID is the index of the Zone in the CIE's zone table. + + + Delay + The Delay field is defined as the amount of time, in quarter-seconds, from the moment when a change takes place in one or more bits of the Zone Status attribute and the successful transmission of the Zone Status Change Notification. This is designed to help congested networks or offline servers quantify the amount of time from when an event was detected and when it could be reported to the client. + + + + Zone Enroll Request Command + The Zone Enroll Request command is generated when a device embodying the Zone server cluster wishes to be enrolled as an active alarm device. It must do this immediately it has joined the network (during commissioning). + + Zone Type + + + Manufacturer Code + + + + + Zone State + The Zone State attribute defines if the device is currently enrolled with a CIE or not. + + + Zone Type + The Zone Type dictates the meaning of Alarm1 and Alarm2 bits of the ZoneStatus attribute + + + Zone Status + The ZoneStatus attribute is a bit map. Each bit defines the state of an alarm. + + + IAS CIE Address + The IAS CIE Address attribute specifies the address that commands generated by the server shall be sent to. All commands received by the server must also come from this address. + It is up to the zone's specific implementation to permit or deny change (write) of this attribute at specific times. Also, it is up to the zone's specific implementation to implement some auto-detect for the CIE (example: by requesting the ZigBee cluster discovery service to locate a Zone Server cluster.) or require the intervention of a CT in order to configure this attribute during installation. + + + Zone ID + A unique reference number allocated by the CIE at zone enrollment time. + Used by IAS devices to reference specific zones when communicating with the CIE. The ZoneID of each zone stays fixed until that zone is unenrolled. + + + Number Of Zone Sensitivity Levels Supported + Provides the total number of sensitivity levels supported by the IAS Zone server. The purpose of this attribute is to support devices that can be configured to be more or less sensitive (e.g., motion sensor). It provides IAS Zone clients with the range of sensitivity levels that are supported so they MAY be presented to the user for configuration. + The values 0x00 and 0x01 are reserved because a device that has zero or one sensitivity level SHOULD NOT support this attribute because no configuration of the IAS Zone server’s sensitivity level is possible. + The meaning of each sensitivity level is manufacturer-specific. However, the sensitivity level of the IAS Zone server SHALL become more sensitive as they ascend. For example, if the server supports three sen- sitivity levels, then the value of this attribute would be 0x03 where 0x03 is more sensitive than 0x02, which is more sensitive than 0x01. + + + Current Zone Sensitivity Level + Allows an IAS Zone client to query and configure the IAS Zone server’s sensitivity level. Please see NumberOfZoneSensitivityLevelsSupported Attribute for more detail on how to interpret this attribute. + The default value 0x00 is the device’s default sensitivity level as configured by the manufacturer. It MAY correspond to the same sensitivity as another value in the NumberOfZoneSensitivityLevelsSupported, but this is the default sensitivity to be used if the CurrentZoneSensitivityLevel attribute is not otherwise configured by an IAS Zone client. + + + + Zone State + + + + + + + Zone Type + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IAS Enroll Response Code + + + + + + + + + + + IAS Zone Status + + + + + + + + + + + + + + + + + + + + + + + IAS Zone Type + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0501_IasAce.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0501_IasAce.xml new file mode 100644 index 000000000..2020f8f6e --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0501_IasAce.xml @@ -0,0 +1,340 @@ + + IAS ACE + The IAS ACE cluster defines an interface to the functionality of any Ancillary Control Equipment of the IAS system. Using this cluster, a ZigBee enabled ACE device can access a IAS CIE device and manipulate the IAS system, on behalf of a level-2 user. + + Arm Command + On receipt of this command, the receiving device sets its arm mode according to the value of the Arm Mode field. It is not guaranteed that an Arm command will succeed. Based on the current state of the IAS CIE, and its related devices, the command can be rejected. The device SHALL generate an Arm Response command to indicate the resulting armed state + + Arm Mode + + + Arm/Disarm Code + The Arm/DisarmCode SHALL be a code entered into the ACE client (e.g., security keypad) or system by the user upon arming/disarming. The server MAY validate the Arm/Disarm Code received from the IAS ACE client in Arm command payload before arming or disarming the system. If the client does not have the capability to input an Arm/Disarm Code (e.g., keyfob),or the system does not require one, the client SHALL a transmit a string with a length of zero. + There is no minimum or maximum length to the Arm/Disarm Code; however, the Arm/Disarm Code SHOULD be between four and eight alphanumeric characters in length. + The string encoding SHALL be UTF-8. + + + Zone ID + Zone ID is the index of the Zone in the CIE's zone table. If none is programmed, the Zone ID default value SHALL be indicated in this field. + + + + Bypass Command + Provides IAS ACE clients with a method to send zone bypass requests to the IAS ACE server. Bypassed zones MAY be faulted or in alarm but will not trigger the security system to go into alarm. For example, a user MAYwish to allow certain windows in his premises protected by an IAS Zone server to be left open while the user leaves the premises. The user could bypass the IAS Zone server protecting the window on his IAS ACE client (e.g., security keypad), and if the IAS ACE server indicates that zone is successfully by-passed, arm his security system while he is away. + + Number Of Zones + + + Zone IDs + + + Arm/Disarm Code + The Arm/DisarmCode SHALL be a code entered into the ACE client (e.g., security keypad) or system by the user upon arming/disarming. The server MAY validate the Arm/Disarm Code received from the IAS ACE client in Arm command payload before arming or disarming the system. If the client does not have the capability to input an Arm/Disarm Code (e.g., keyfob),or the system does not require one, the client SHALL a transmit a string with a length of zero. + + + + Emergency Command + + + Fire Command + + + Panic Command + + + Get Zone ID Map Command + + + Get Zone Information Command + + Zone ID + + + + Get Panel Status Command + This command is used by ACE clients to request an update to the status (e.g., security system arm state) of the ACE server (i.e., the IAS CIE). In particular, this command is useful for battery-powered ACE clients with polling rates longer than the ZigBee standard check-in rate. <br> On receipt of this command, the ACE server responds with the status of the security system. The IAS ACE server SHALL generate a Get Panel Status Response command. + + + Get Bypassed Zone List Command + Provides IAS ACE clients with a way to retrieve the list of zones to be bypassed. This provides them with the ability to provide greater local functionality (i.e., at the IAS ACE client) for users to modify the Bypassed Zone List and reduce communications to the IAS ACE server when trying to arm the CIE security system. + + + Get Zone Status Command + This command is used by ACE clients to request an update of the status of the IAS Zone devices managed by the ACE server (i.e., the IAS CIE). In particular, this command is useful for battery-powered ACE clients with polling rates longer than the ZigBee standard check-in rate. The command is similar to the Get Attributes Supported command in that it specifies a starting Zone ID and a number of Zone IDs for which information is requested. Depending on the number of IAS Zone devices managed by the IAS ACE server, sending the Zone Status of all zones MAY not fit into a single Get ZoneStatus Response command. IAS ACE clients MAY need to send multiple Get Zone Status commands in order to get the information they seek. + + Starting Zone ID + Specifies the starting Zone ID at which the IAS Client would like to obtain zone status information. + + + Max Zone I Ds + Specifies the maximum number of Zone IDs and corresponding Zone Statuses that are to be returned by the IAS ACE server when it responds with a Get Zone Status Response command + + + Zone Status Mask Flag + Functions as a query operand with the Zone Status Mask field. If set to zero (i.e., FALSE), the IAS ACE server SHALL include all Zone IDs and their status, regardless of their Zone Status when it responds with a Get Zone Status Response command. If set to one (i.e., TRUE), the IAS ACE server SHALL include only those Zone IDs whose Zone Status attribute is equal to one or more of the Zone Statuses requested in the Zone Status Mask field of the Get Zone Status command. + Use of Zone Status Mask Flag and Zone Status Mask fields allow a client to obtain updated information for the subset of Zone IDs they’re interested in, which is beneficial when the number of IAS Zone devices in a system is large. + + + Zone Status Mask + Coupled with the Zone Status Mask Flag field, functions as a mask to enable IAS ACE clients to get information about the Zone IDs whose ZoneStatus attribute is equal to any of the bits indicated by the IAS ACE client in the Zone Status Mask field. The format of this field is the same as the ZoneStatus attribute in the IAS Zone cluster. Per the Zone Status Mask Flag field, IAS ACE servers SHALL respond with only the Zone IDs whose ZoneStatus attributes are equal to at least one of the Zone Status bits set in the Zone Status Mask field requested by the IAS ACE client.For example, if the Zone Status Mask field set to “0x0003” would match IAS Zones whose ZoneStatus attributes are 0x0001, 0x0002, and 0x0003. + In other words, if a logical 'AND' between the Zone Status Mask field and the IAS Zone’s ZoneStatus attribute yields a non-zero result, the IAS ACE server SHALL include that IAS Zone in the Get Zone Status Response command. + + + + Arm Response + + Arm Notification + + + + Get Zone ID Map Response + The 16 fields of the payload indicate whether each of the Zone IDs from 0x00 to 0xff is allocated or not. If bit n of Zone ID Map section N is set to 1, then Zone ID (16 x N + n ) is allocated, else it is not allocated. + + Zone ID Map Section 0 + + + Zone ID Map Section 1 + + + Zone ID Map Section 2 + + + Zone ID Map Section 3 + + + Zone ID Map Section 4 + + + Zone ID Map Section 5 + + + Zone ID Map Section 6 + + + Zone ID Map Section 7 + + + Zone ID Map Section 8 + + + Zone ID Map Section 9 + + + Zone ID Map Section 10 + + + Zone ID Map Section 11 + + + Zone ID Map Section 12 + + + Zone ID Map Section 13 + + + Zone ID Map Section 14 + + + Zone ID Map Section 15 + + + + Get Zone Information Response + + Zone ID + + + Zone Type + + + IEEE Address + + + Zone Label + Provides the ZoneLabel stored in the IAS CIE. If none is programmed, the IAS ACE server SHALL transmit a string with a length of zero.There is no minimum or maximum length to the Zone Label field; however, the Zone Label SHOULD be between 16 to 24 alphanumeric characters in length. + The string encoding SHALL be UTF-8. + + + + Zone Status Changed Command + This command updates ACE clients in the system of changes to zone status recorded by the ACE server (e.g., IAS CIE device). An IAS ACE server SHOULD send a Zone Status Changed command upon a change to an IAS Zone device’s ZoneStatus that it manages (i.e., IAS ACE server SHOULD send a Zone Status Changed command upon receipt of a Zone Status Change Notification command). + + Zone ID + The index of the Zone in the CIE’s zone table. If none is programmed, the ZoneID attribute default value SHALL be indicated in this field. + + + Zone Status + + + Audible Notification + + + Zone Label + Provides the ZoneLabel stored in the IAS CIE. If none is programmed, the IAS ACE server SHALL transmit a string with a length of zero. There is no minimum or maximum length to the Zone Label field; however, the Zone Label SHOULD be between 16 to 24 alphanumeric characters in length. + + + + Panel Status Changed Command + This command updates ACE clients in the system of changes to panel status recorded by the ACE server (e.g., IAS CIE device).Sending the Panel Status Changed command (vs.the Get Panel Status and Get Panel Status Response method) is generally useful only when there are IAS ACE clients that data poll within the retry timeout of the network (e.g., less than 7.68 seconds). <br> An IAS ACE server SHALL send a Panel Status Changed command upon a change to the IAS CIE’s panel status (e.g., Disarmed to Arming Away/Stay/Night, Arming Away/Stay/Night to Armed, Armed to Disarmed) as defined in the Panel Status field. <br> When Panel Status is Arming Away/Stay/Night, an IAS ACE server SHOULD send Panel Status Changed commands every second in order to update the Seconds Remaining. In some markets (e.g., North America), the final 10 seconds of the Arming Away/Stay/Night sequence requires a separate audible notification (e.g., a double tone). + + Panel Status + Indicates the number of seconds remaining for the server to be in the state indicated in the PanelStatus parameter. The SecondsRemaining parameter SHALL be provided if the PanelStatus parameter has a value of 0x04 (Exit delay) or 0x05 (Entry delay). + The default value SHALL be 0x00. + + + Seconds Remaining + + + Audible Notification + + + Alarm Status + + + + Get Panel Status Response + This command updates requesting IAS ACE clients in the system of changes to the security panel status recorded by the ACE server (e.g., IAS CIE device). + + Panel Status + Defines the current status of the alarm panel. + + + Seconds Remaining + Indicates the number of seconds remaining for the server to be in the state indicated in the PanelStatus parameter. The SecondsRemaining parameter SHALL be provided if the PanelStatus parameter has a value of 0x04 (Exit delay) or 0x05 (Entry delay). + The default value SHALL be 0x00. + + + Audible Notification + Provide the ACE client with information on which type of audible notification it SHOULD make for the zone status change. This field is useful for telling the ACE client to play a standard chime or other audio indication or to mute and not sound an audible notification at all. This field also allows manufacturers to create additional audible alert types (e.g., dog barking, windchimes, conga drums) to enable users to customise their system. + + + Alarm Status + Provides the ACE client with information on the type of alarm the panel is in if its Panel Status field indicates it is “in alarm.” This field MAY be useful for ACE clients to display or otherwise initiate notification for users. + + + + Set Bypassed Zone List Command + Sets the list of bypassed zones on the IAS ACE client. This command can be sent either as a response to the GetBypassedZoneList command or unsolicited when the list of bypassed zones changes on the ACE server. + + Zone ID + Zone ID is the index of the Zone in the CIE's zone table and is an array of Zone IDs for each zone that is bypassed where X is equal to the value of the Number of Zones field. There is no order imposed by the numbering of the Zone ID field in this command payload. IAS ACE servers SHOULD provide the array of Zone IDs in ascending order. + + + + Bypass Response + Provides the response of the security panel to the request from the IAS ACE client to bypass zones via a Bypass command. + + Bypass Result + An array of Zone IDs for each zone requested to be bypassed via the Bypass command where X is equal to the value of the Number of Zones field. The order of results for Zone IDs SHALL be the same as the order of Zone IDs sent in the Bypass command by the IAS ACE client. + + + + Get Zone Status Response + This command updates requesting IAS ACE clients in the system of changes to the IAS Zone server statuses recorded by the ACE server (e.g., IAS CIE device). + + Zone Status Complete + Indicates whether there are additional Zone IDs managed by the IAS ACE Server with Zone Status information to be obtained. A value of zero (i.e. FALSE) indicates there are additional Zone IDs for which Zone Status information is available and that the IAS ACE client SHOULD send another Get Zone Status command.A value of one (i.e. TRUE) indicates there are no more Zone IDs for the IAS ACE client to query and the IAS ACE client has received all the Zone Status information for all IAS Zones managed by the IAS ACE server. + The IAS ACE client SHOULD NOT typically send another Get Zone Status command. + + + Number Of Zones + + + IAS ACE Zone Status + + + Zone ID + + + Zone Status + + + + + IAS ACE Alarm Status + + + + + + + + + + + + + + + + + IAS ACE Arm Mode + + + + + + + + + + + IAS ACE Arm Notification + + + + + + + + + + + + + + + + + IAS ACE Audible Notification + + + + + + + IAS ACE Panel Status + + + + + + + + + + + + + + + + + + + + + + + + + IAS ACE Zone Status Result + + Zone ID + + + Zone Status + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0502_IasWd.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0502_IasWd.xml new file mode 100644 index 000000000..c5424565d --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0502_IasWd.xml @@ -0,0 +1,38 @@ + + IAS WD + The IAS WD cluster provides an interface to the functionality of any Warning Device equipment of the IAS system. Using this cluster, a ZigBee enabled CIE device can access a ZigBee enabled IAS WD device and issue alarm warning indications (siren, strobe lighting, etc.) when a system alarm condition is detected. + + Start Warning Command + This command starts the WD operation. The WD alerts the surrounding area by audible (siren) and visual (strobe) signals. <br> A Start Warning command shall always terminate the effect of any previous command that is still current. + + Header + + + Warning Duration + + + + Squawk + This command uses the WD capabilities to emit a quick audible/visible pulse called a "squawk". The squawk command has no effect if the WD is currently active (warning in progress). + + Squawk Info + + + + + Max Duration + The MaxDuration attribute specifies the maximum time in seconds that the siren will sound continuously, regardless of start/stop commands. + + + + Squawk Info + + + + + + + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0700_Price.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0700_Price.xml new file mode 100644 index 000000000..4bf12f102 --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0700_Price.xml @@ -0,0 +1,1692 @@ + + Price + The Price Cluster provides the mechanism for communicating Gas, Energy, or Water pricing information within the premises. This pricing information is distributed to the ESI from either the utilities or from regional energy providers. The ESI conveys the information (via the Price Cluster mechanisms) to other Smart Energy devices. + Events carried using this cluster include a timestamp with the assumption that target devices maintain a real time clock. Devices can acquire and synchronize their internal clocks via the ZCL Time server. If a device does not support a real time clock it is assumed that the device will interpret and utilize the “Start Now” value within the Time field. + + Get Current Price Command + This command initiates a PublishPrice command for the current time. On receipt of this command, the device shall send a PublishPrice command for the currently scheduled time. + + Command Options + + + + Get Scheduled Prices Command + This command initiates a PublishPrice command for available price events. A server device shall be capable of storing five price events at a minimum On receipt of this command, the device shall send a PublishPrice command for the currently scheduled time. + + Start Time + UTCTime stamp representing the minimum ending time for any scheduled or currently active pricing events to be resent. If a command has a StartTime of 0x00000000, replace that StartTime with the current time stamp. + + + Number Of Events + Represents the maximum number of events to be sent. A value of 0 would indicate all available events are to be returned. Example: Number of Events = 1 would return the first event with an EndTime greater than or equal to the value of StartTime field in the GetScheduledPrices command. (EndTime would be StartTime plus Duration of the event listed in the device’s event table). + + + + Price Acknowledgement Command + The PriceAcknowledgement command provides the ability to acknowledge a previously sent PublishPrice command. It is mandatory for 1.1 and later devices. For SE 1.0 devices, the command is optional. + + Provider ID + An unsigned 32 bit field containing a unique identifier for the commodity provider + + + Issuer Event ID + Unique identifier generated by the commodity provider. + + + Price Ack Time + Time price acknowledgement generated. + + + Control + Identifies the Price Control or Block Period Control options for the event. + + + + Get Block Period Command + This command initiates a PublishBlockPeriod command for the currently scheduled block periods. A server device shall be capable of storing at least two commands, the current period and a period to be activated in the near future. <br> A ZCL Default response with status NOT_FOUND shall be returned if there are no events available. + + Start Time + UTCTime stamp representing the minimum ending time for any scheduled or currently block period events to be resent. If a command has a Start Time of 0x00000000, replace that Start Time with the current time stamp. + + + Number Of Events + An 8 bit Integer which indicates the maximum number of Publish Block Period commands that can be sent. Example: Number of Events = 1 would return the first event with an EndTime greater than or equal to the value of Start Time field in the GetBlockPeriod(s) command. (EndTime would be StartTime plus Duration of the event listed in the device’s event table). Number of Events = 0 would return all available Publish Block Periods, starting with the current block in progress. 8460 command. The least significant nibble represents an enumeration of the tariff (Generation Meters shall use the ‘Received’ Tariff.). If the TariffType is not specified, the server shall assume that the request is for the ‘Delivered’ Tariff. The most significant nibble is reserved. + + + Tariff Type + + + + Get Conversion Factor Command + This command initiates a PublishConversionFactor command(s) for scheduled conversion factor updates. A server device shall be capable of storing at least two instances, the current and (if available) next instance to be activated in the future. <br> A ZCL Default response with status NOT_FOUND shall be returned if there are no conversion factor updates available + + Earliest Start Time + UTCTime stamp indicating the earliest start time of values to be returned by the corresponding PublishConversionFactor command. The first returned PublishConversionFactor command shall be the instance which is active or becomes active at or after the stated Earliest Start Time. If more than one instance is requested, the active and scheduled instances shall be sent with ascending ordered StartTime. + Min. Issuer Event ID Field A 32-bit integer representing the minimum Issuer Event ID of values to be returned by the corresponding PublishCalorificValue command. A value of 0xFFFFFFFF means not specified; the server shall return values irrespective of the value of the Issuer Event ID. + + + Min . Issuer Event ID + + + Number Of Commands + An 8-bit integer which represents the maximum number of PublishConversionFactor commands that the CLIENT is willing to receive in response to this command. A value of 0 would indicate all available PublishConversionFactor commands shall be returned. + + + + Get Calorific Value Command + This command initiates a PublishCalorificValue command(s) for scheduled calorific value updates. A server device shall be capable of storing at least two instances, the current and (if available) next instance to be activated in the future. <br> A ZCL Default response with status NOT_FOUND shall be returned if there are no conversion factor updates available + + Earliest Start Time + UTCTime stamp indicating the earliest start time of values to be returned by the corresponding PublishCalorificValue command. The first returned PublishCalorificValue command shall be the instance which is active or becomes active at or after the stated Earliest Start Time. If more than one instance is requested, the active and scheduled instances shall be sent with ascending ordered Start Time. + + + Min . Issuer Event ID + A 32-bit integer representing the minimum Issuer Event ID of values to be returned by the corresponding PublishCalorificValue command. A value of 0xFFFFFFFF means not specified; the server shall return values irrespective of the value of the Issuer Event ID. + + + Number Of Commands + An 8-bit Integer which represents the maximum number of PublishCalorificValue commands that the CLIENT is willing to receive in response to this command. A value of 0 would indicate all available PublishCalorificValue commands shall be returned. + + + + Get Tariff Information Command + This command initiates PublishTariffInformation command(s) for scheduled tariff updates. A server device shall be capable of storing at least two instances, current and the next instance to be activated in the future. <br> One or more PublishTariffInformation commands are sent in response to this command. To obtain the complete tariff details, further GetPriceMatrix and GetBlockThesholds commands must be sent using the start time and IssuerTariffID obtained from the appropriate PublishTariffInformation command. + + Earliest Start Time + UTCTime stamp indicating the earliest start time of tariffs to be returned by the corresponding PublishTariffInformation command. The first returned PublishTariffInformation command shall be the instance which is active or becomes active at or after the stated EarliestStartTime. If more than one command is requested, the active and scheduled commands shall be sent with ascending ordered StartTime. + + + Min . Issuer Event ID + A 32-bit integer representing the minimum Issuer Event ID of tariffs to be returned by the corresponding PublishTariffInformation command. A value of 0xFFFFFFFF means not specified; the server shall return tariffs irrespective of the value of the Issuer Event ID. + + + Number Of Commands + An 8-bit integer which represents the maximum number of PublishTariffInformation commands that the CLIENT is willing to receive in response to this command. A value of 0 would indicate all available PublishTariffInformation commands shall be returned. + + + Tariff Type + An 8-bit bitmap identifying the type of tariff published in this command. The least significant nibble represents an enumeration of the tariff type (Generation Meters shall use the ‘Received’ Tariff.). The most significant nibble is reserved. + + + + Get Price Matrix Command + This command initiates a PublishPriceMatrix command for the scheduled Price Matrix updates. A server device shall be capable of storing at least two instances, current and next instance to be activated in the future. <br> A ZCL Default response with status NOT_FOUND shall be returned if there are no Price Matrix updates available. + + Issuer Tariff ID + IssuerTariffID indicates the tariff to which the requested Price Matrix belongs. + + + + Get Block Thresholds Command + This command initiates a PublishBlockThreshold command for the scheduled Block Threshold updates. A server device shall be capable of storing at least two instances, current and next instance to be activated in the future. <br> A ZCL Default response with status NOT_FOUND shall be returned if there are no Price Matrix updates available. + + Issuer Tariff ID + IssuerTariffID indicates the tariff to which the requested Price Matrix belongs. + + + + Get CO2 Value Command + This command initiates PublishCO2Value command(s) for scheduled CO2 conversion factor updates. A server device shall be capable of storing at least two instances, current and (if available) next instance to be activated in the future. + + Earliest Start Time + UTCTime stamp indicating the earliest start time of values to be returned by the corresponding PublishCO2Value command. The first returned PublishCO2Value command shall be the instance which is active or becomes active at or after the stated EarliestStartTime. If more than one instance is requested, the active and scheduled instances shall be sent with ascending ordered StartTime. + + + Min . Issuer Event ID + A 32-bit integer representing the minimum Issuer Event ID of values to be returned by the corresponding PublishCO2Value command. A value of 0xFFFFFFFF means not specified; the server shall return values irrespective of the value of the Issuer Event ID. + + + Number Of Commands + An 8-bit Integer which represents the maximum number of PublishCO2Value commands that the CLIENT is willing to receive in response to this command. A value of 0 would indicate all available PublishCO2Value commands shall be returned. + + + Tariff Type + An optional 8-bit bitmap identifying the type of tariff published in this command. The least significant nibble represents an enumeration of the tariff type (Generation Meters shall use the ‘Received’ Tariff). A value of 0xFF means not specified. If the TariffType is not specified, the server shall return all C02 values regardless of tariff type. The most significant nibble is reserved. + + + + Get Tier Labels Command + This command allows a CLIENT to retrieve the tier labels associated with a given tariff; this command initiates a PublishTierLabels command from the server. + + Issuer Tariff ID + Unique identifier generated by the commodity supplier. This is used to identify the tariff that the labels apply to. + + + + Get Billing Period Command + This command initiates one or more PublishBillingPeriod commands for currently scheduled billing periods. + + Earliest Start Time + UTCTime stamp indicating the earliest start time of billing periods to be returned by the corresponding PublishBillingPeriod command. The first returned PublishBillingPeriod command shall be the instance which is active or becomes active at or after the stated EarliestStartTime. If more than one instance is requested, the active and scheduled instances shall be sent with ascending ordered StartTime. + + + Min . Issuer Event ID + A 32-bit integer representing the minimum Issuer Event ID of billing periods to be returned by the corresponding PublishBillingPeriod command. A value of 0xFFFFFFFF means not specified; the server shall return periods irrespective of the value of the Issuer Event ID. + + + Number Of Commands + An 8 bit Integer which indicates the maximum number of PublishBillingPeriod commands that the CLIENT is willing to receive in response to this command. A value of 0 would indicate all available PublishBillingPeriod commands shall be returned. + + + Tariff Type + An 8-bit bitmap identifying the TariffType of the requested Billing Period information. The least significant nibble represents an enumeration of the tariff type (Generation Meters shall use the ‘Received’ Tariff). A value of 0xFF means not specified. If the TariffType is not specified, the server shall return Billing Period information regardless of its type. The most significant nibble is reserved. + + + + Get Consolidated Bill Command + This command initiates one or more PublishConsolidatedBill commands with the requested billing information. + + Earliest Start Time + UTCTime stamp indicating the earliest start time of billing information to be returned by the corresponding PublishConsolidatedBill command. The first returned PublishConsolidatedBill command shall be the instance which is active or becomes active at or after the stated EarliestStartTime. If more than one instance is requested, the active and scheduled instances shall be sent with ascending ordered StartTime. + + + Min . Issuer Event ID + A 32-bit integer representing the minimum Issuer Event ID of billing information to be returned by the corresponding PublishConsolidatedBill command. A value of 0xFFFFFFFF means not specified; the server shall return information irrespective of the value of the Issuer Event ID. + + + Number Of Commands + An 8 bit Integer which indicates the maximum number of PublishConsolidatedBill commands that can be sent. A value of 0 would indicate all available PublishConsolidatedBill commands shall be returned. + + + Tariff Type + An optional 8-bit bitmap identifying the type of tariff published in this command. The least significant nibble represents an enumeration of the tariff type (Generation Meters shall use the ‘Received’ Tariff). A value of 0xFF means not specified. If the TariffType is not specified, the server shall return all billing information regardless of tariff type. The most significant nibble is reserved. + + + + Cpp Event Response + The CPPEventResponse command is sent from a CLIENT (IHD) to the ESI to notify it of a Critical Peak Pricing event authorization. + + Issuer Event ID + Unique identifier generated by the commodity provider. When new information is provided that replaces older information for the same time period, this field allows devices to determine which information is newer. The value contained in this field is a unique number managed by upstream servers or a UTC based time stamp (UTCTime data type) identifying when the Publish command was issued. Thus, newer information will have a value in the Issuer Event ID field that is larger than older information. + + + Cpp Auth + An 8-bit enumeration identifying the status of the CPP event. This field shall contain the ‘Accepted’ or ‘Rejected’ values. + + + + Get Credit Payment Command + This command initiates PublishCreditPayment commands for the requested credit payment information. + + Latest End Time + UTCTime stamp indicating the latest CreditPaymentDate of records to be returned by the corresponding PublishCreditPayment commands. The first returned PublishCreditPayment command shall be the most recent record with its CreditPaymentDate equal to or older than the Latest End Time provided. + + + Number Of Records + An 8-bit integer that represents the maximum number of PublishCreditPayment commands that the CLIENT is willing to receive in response to this command. A value of 0 would indicate all available PublishCreditPayment commands shall be returned. If more than one record is requested, the PublishCreditPayment commands should be returned with descending ordered CreditPaymentDate. If fewer records are available than are being requested, only those available are returned. + + + + Get Currency Conversion Command + This command initiates a PublishCurrencyConversion command for the currency conversion factor updates. A server shall be capable of storing both the old and the new currencies. <br> A ZCL Default response with status NOT_FOUND shall be returned if there are no currency conversion factor updates available + + + Get Tariff Cancellation Command + This command initiates the return of the last CancelTariff command held on the associated server. <br> A ZCL Default response with status NOT_FOUND shall be returned if there is no CancelTariff command available. + + + Publish Price Command + The Publish Price command is generated in response to receiving a Get Current Price command, in response to a Get Scheduled Prices command, and when an update to the pricing information is available from the commodity provider, either before or when a TOU price becomes active. Additionally the Publish Price Command is generated when Block Pricing is in effect. When a Get Current Price or Get Scheduled Prices command is received over a ZigBee Smart Energy network, the Publish Price command should be sent unicast to the requester. In the case of an update to the pricing information from the commodity provider, the Publish Price command should be unicast to all individually registered devices implementing the Price Cluster on the ZigBee Smart Energy network. <br> Devices capable of receiving this command must be capable of storing and supporting at least two pricing information instances, the current active price and the next price. By supporting at least two pricing information instances, receiving devices will allow the Publish Price command generator to publish the next pricing information during the current pricing period. <br> Nested and overlapping Publish Price commands are not allowed. The current active price will be replaced if new price information is received by the ESI. In the case of overlapping events, the event with the newer Issuer Event ID takes priority over all nested and overlapping events. All existing events that overlap, even partially, should be removed. The only exception to this is that if an event with a newer Issuer Event ID overlaps with the end of the current active price but is not yet active, the active price is not deleted but its duration is modified to 0xFFFF (until changed) so that the active price ends when the new event begins. + + Provider ID + An unsigned 32-bit field containing a unique identifier for the commodity provider. This field allows differentiation in deregulated markets where multiple commodity providers may be available. + + + Rate Label + A ZCL Octet String field capable of storing a 12 character string (the first Octet indicates length) containing commodity provider- specific information regarding the current billing rate. The String shall be encoded in the UTF-8 format. This field allows differentiation when a commodity provider may have multiple pricing plans. + + + Issuer Event ID + Unique identifier generated by the commodity provider. When new pricing information is provided that replaces older pricing information for the same time period, this field allows devices to determine which information is newer. It is expected that the value contained in this field is a unique number managed by upstream servers or a UTC based time stamp (UTCTime data type) identifying when the Publish Price command was issued. Thus, newer pricing information will have a value in the Issuer Event ID field that is larger than older pricing information. + + + Current Time + A UTCTime field containing the current time as determined by the device. This field provides an extra value-added feature for the broadcast price signals. + + + Unit Of Measure + An 8-bit enumeration field identifying the commodity as well as its base unit of measure. The enumeration used for this field shall match one of the UnitOfMeasure values using a pure binary format as defined in the Metering cluster. + + + Currency + An unsigned 16-bit field containing identifying information concerning the local unit of currency used in the price field. This field allows the displaying of the appropriate symbol for a currency (i.e.: $). The value of the currency field should match the values defined by ISO 4217. Price Trailing Digit and Price Tier (mandatory): An 8-bit field used to determine where the decimal point is located in the price field and to indicate the current pricing tier as chosen by the commodity provider. The most significant nibble is the Trailing Digit sub-field which indicates the number of digits to the right of the decimal point. The least significant nibble is an enumerated field containing the current Price Tier. An 8-bit BitMap where the most significant nibble is an enumerated sub-field representing the maximum number of price tiers available, and the least significant nibble is an enumerated sub-field indicating the register tier used with the current Price Tier. Valid values for the Number of Price Tiers sub-field are from 0 to 15 reflecting no tiers in use (0) to fifteen or more tiers available (15). The meaning of value 0xF is dependant on the value of the optional the Extended Number of Price Tiers field. Absence of this field, or a value of 0x00 in this field, indicates that maximum number of tiers available is fifteen. Where the Extended Number of Price Tiers field contains a non-zero value, the maximum number of tiers available is determined by the sum of the values of the Number of Price Tiers sub-field and the Extended Number of Price Tiers field. + + + Price Trailing Digit And Tier + + + Number Of Price Tiers + + + Start Time + A UTCTime field to denote the time at which the price signal becomes valid. A Start Time of 0x00000000 is a special time denoting “now”. If the device would send a price with a Start Time of now, adjust the Duration In Minutes field to correspond to the remainder of the price. An unsigned 16-bit field used to denote the amount of time in minutes after the Start Time during which the price signal is valid. Maximum value means “until changed”. If Block Charging only is in use, the Duration in Minutes field of the Publish Price command shall be set to 0xFFFF indicating the price is valid “until changed”. + + + Duration + + + Price + An unsigned 32-bit field containing the price of the commodity measured in base unit of Currency per Unit of Measure with the decimal point located as indicated by the Price Trailing Digit field when the commodity is delivered to the premises. + + + Price Ratio + An unsigned 8-bit field that gives the ratio of the price denoted in the Price field to the “normal” price chosen by the commodity provider. This field is thought to be useful in situations where CLIENT devices may simply be interested in pricing levels or ratios. The value in this field should be scaled by a factor of 0.1, giving a range of ratios from 0.1 to 25.4. A value of 0xFF indicates the field is not used and 0x00 is an invalid value. + + + Generation Price + An unsigned 32-bit field containing the price of the commodity measured in base unit of Currency per Unit of Measure with the decimal point located as indicated by the Price Trailing Digit field when the commodity is received from the premises. An example use of this field is in energy markets where the price of electricity from the grid is different than the price of electricity placed on the grid. A value of 0xFFFFFFFF indicates the field is not used. + + + Generation Price Ratio + An unsigned 8-bit field that gives the ratio of the price denoted in the Generation Price field to the “normal” price chosen by the commodity provider. This field is thought to be useful in situations where CLIENT devices may simply be interested in pricing levels or ratios. The value in this field should be scaled by a factor of 0.1, giving a range of ratios from 0.1 to 25.4 A value of 0xFF indicates the field is not used and 0x00 is an invalid value. + + + Alternate Cost Delivered + An unsigned 32-bit Integer field that provides a mechanism to describe an alternative measure of the cost of the energy consumed. An example of an Alternate Cost might be the emissions of CO2 for each kWh of electricity consumed providing a measure of the environmental cost. Another example is the emissions of CO2 for each cubic meter of gas consumed (for gas metering). A different value for each price tier may be provided which can be used to reflect the different mix of generation that is associated with different TOU rates. A value of 0xFFFFFFFF indicates the field is not used. + + + Alternate Cost Unit + An 8-bit enumeration identifying the unit for the Alternate Cost Delivered field. A value of 0xFF indicates the field is not used. + + + Alternate Cost Trailing Digit + + + Number Of Block Thresholds + + + Price Control + + + Number Of Generation Tiers + + + Generation Tier + + + Extended Number Of Price Tiers + + + Extended Price Tier + + + Extended Register Tier + + + + Publish Block Period Command + The Publish Block Period command is generated in response to receiving a Get Block Period(s) command or when an update to the block tariff schedule is available from the commodity provider. When the Get Block Period(s) command is received over the ZigBee Smart Energy network, the Publish Block Period command(s) should be sent unicast to the requestor. In the case of an update to the block tariff schedule from the commodity provider, the Publish Block Period command should be unicast to all individually registered devices implementing the Price Cluster on the ZigBee Smart Energy network. <br> Devices capable of receiving this command must be capable of storing and supporting two block periods, the current active block and the next block. By supporting two block periods, receiving devices will allow the Publish Block Period command generator to publish the next block information during the current block period. + + Provider ID + An unsigned 32-bit field containing a unique identifier for the commodity provider. This field allows differentiation in deregulated markets where multiple commodity providers may be available. + + + Issuer Event ID + Unique identifier generated by the commodity provider. When new block period information is provided that replaces older information for the same period, this field allows devices to determine which information is newer. It is expected that the value contained in this field is a unique number managed by upstream servers or a UTC based time stamp (UTCTime data type) identifying when the Publish Block Period command was issued. Thus, newer block period information will have a value in the Issuer Event ID field that is larger than older block information. + + + Block Period Start Time + A UTCTime field to denote the time at which the block tariff period starts. A start time of 0x00000000 is a special time denoting “now”. If the device would send an event with a Start Time of now, adjust the Duration In Minutes field to correspond to the remainder of the event. A start date/time of 0xFFFFFFFF shall cause an existing PublishBlockPeriod command with the same Provider ID and Issuer Event ID to be cancelled (note that, in markets where permanently active price information is required for billing purposes, it is recommended that a replacement/superseding Publish Block Period command is used in place of this cancellation mechanism). + Where the Duration Timebase is set to a value other than Minutes, the Duration Control sub field provides further clarification; where Duration Control is set to Start of Timebase, the Block Period Start Time shall be set to 00:00:00 on the applicable date, and where Duration Control is set to End of Timebase, the Block Period Start Time shall be set to 23:59:59 on the applicable date. + + + Block Period Duration + An unsigned 24-bit field to denote the block tariff period . The duration units are defined by the Block Period Duration Type field. Maximum value (0xFFFFFF) means 'until changed'. + + + Block Period Control + Identifies additional control options for the block period event. A value of 0x00 indicates field not used. Indicates whether a Price Acknowledgment command shall be returned on receipt of this Publish Block Period command. Repeating Block: Indicates whether a block period repeats on expiry. Note that the interaction between Block and Billing periods is out of scope of this specification. + + + Block Period Duration Type + An 8-bit bitmap where the least significant nibble is an enumerated sub-field indicating the time base used for the duration, and the most significant nibble is an enumerated sub-field providing duration control + Where the Duration Timebase is set to a value other than Minutes, the Duration Control sub field provides further clarification; Start of Timebase indicates that the duration shall run from the START of the respective day, week or month, whereas End of Timebase shall indicate that the duration runs from the END of the respective day, week or month. The Duration Control sub-field shall be set to Not Specified when a timebase of Minutes is in use. + + + Tariff Type + An 8-bit bitmap identifying the type of tariff published in this command. The least significant nibble represents an enumeration of the tariff type (Generation Meters shall use the ‘Received’ Tariff). The most significant nibble is reserved. + + + Tariff Resolution Period + An 8 bit enumeration identifying the resolution period for the block tariff. + The Tariff Resolution of Block Period means that the Block Tariff is applied based on calculations to the Block Thresholds defined in the command set without smoothing. The Tariff resolution period of 1 Day means that the application should apply “daily resolution”, with recalculation of the thresholds through the Block Period to achieve the same result for the end of the Block Period but smoothing out the tariff application for the customer. This is described as follows: + + + + Publish Conversion Factor Command + The PublishConversionFactor command is sent in response to a GetConversionFactor command or if a new conversion factor is available. Clients shall be capable of storing at least two instances of the Conversion Factor, the currently active one and the next one. + + Issuer Event ID + Unique identifier generated by the commodity provider. + + + Start Time + A UTCTime field to denote the time at which the value becomes valid. The value remains valid until replaced by a newer one. + + + Conversion Factor + See Price Cluster Commodity attributes. + + + Conversion Factor Trailing Digit + See Price Cluster Commodity attributes. + + + + Publish Calorific Value Command + The PublishCalorificValue command is sent in response to a GetCalorificValue command or if a new calorific value is available. Clients shall be capable of storing at least two instances of the Calorific Value, the currently active one and the next one. + + Issuer Event ID + + + Start Time + + + Calorific Value + + + Calorific Value Unit + + + Calorific Value Trailing Digit + + + + Publish Tariff Information Command + The PublishTariffInformation command is sent in response to a GetTariffInformation command or if new tariff information is available (including Price Matrix and Block Thresholds). Clients should be capable of storing at least two instances of the Tariff Information, the currently active and the next one. Note that there may be separate tariff information for consumption delivered and received. <br> Note that the payload for this command could be up to 61 bytes in length, therefore fragmentation may be required. <br> If the CLIENT is unable to store this PublishTariffInformation command, the device should respond using a ZCL Default Response with a status of INSUFFICIENT_SPACE. + + Provider ID + A unique identifier for the commodity supplier. The ProviderID in this command will always be the one stored as the attribute except for the case where a change of supplier is pending and the new supplier wishes to publish its tariff information in advance. + + + Issuer Event ID + Unique identifier generated by the commodity provider. When new information is provided that replaces older information for the same time period, this field allows devices to determine which information is newer. The value contained in this field is a unique number managed by upstream servers or a UTC based time stamp (UTCTime data type) identifying when the Publish command was issued. Thus, newer information will have a value in the Issuer Event ID field that is larger than older information. + + + Issuer Tariff ID + Unique identifier generated by the commodity supplier. + + + Start Time + A UTCTime field to denote the time at which the price signal becomes valid. A start date/time of 0x00000000 shall indicate that the command should be executed immediately. An 8-bit bitmap identifying the type of tariff published in this command. The least significant nibble represents an enumeration of the tariff type as detailed in Table D-108 (Generation Meters shall use the ‘Received’ Tariff), the most significant nibble represents an enumeration specifying the charging scheme + + + Tariff Type + + + Tariff Label + The format and use of this field is the same as for the TariffLabel attribute or ReceivedTariffLabel attribute (depending on TariffType). The format and use of this field is the same as for the NumberofPriceTiersInUse attribute or ReceivedNumberofPriceTiersInUse attribute (depending on TariffType/Charging Scheme). The format and use of this field is the same as for the NumberofBlockThresholdsInUse attribute or ReceivedNumberofBlockThresholdsInUse attribute (depending on TariffType/Charging Scheme). + + + Number Of Price Tiers + + + Number Of Block Thresholds + + + Unit Of Measure + The format and use of this field is the same as for the Unit of Measure attribute. + + + Currency + The format and use of this field is the same as for the Currency attribute. + + + Price Trailing Digit + The format and use of this field is the same as for the PriceTrailingDigit attribute. + + + Standing Charge + The format and use of this field is the same as for the StandingCharge attribute. A value of 0xFFFFFFFF indicates the field is not used. When publishing Received tariffs (according to TariffType) this field should be set to 0xFFFFFFFF. + + + Tier Block Mode + The format and use of this field is the same as for the TierBlockMode attribute or ReceivedTierBlockMode attribute (depending on TariffType ). In case of TOU or Block Charging only, this field is not used and shall be set to 0xFF. For combined Block/TOU charging, this field is mandatory and must be set to a valid value. + + + Block Threshold Multiplier + BlockThresholdMultiplier provides a value to be multiplied against Threshold parameter(s). If present, this attribute must be applied to all Block Threshold values to derive values that can be compared against the CurrentBlockPeriodConsumptionDelivered attribute within the Metering cluster. This parameter must be used in conjunction with the BlockThresholdDivisor parameter(s). In case no multiplier is defined, this field shall be set to 1. + + + Block Threshold Divisor + BlockThresholdDivisor provides a value to divide the result of applying the ThresholdMultiplier attribute to Block Threshold values to derive values that can be compared against the CurrentBlockPeriodConsumptionDelivered attribute within the Metering cluster. This attribute must be used in conjunction with the BlockThresholdMultiplier parameter(s). In case no divisor is defined, this field shall be set to 1. + + + + Publish Price Matrix Command + The PublishPriceMatrix command is used to publish the Block Price Information Set (up to 15 tiers x 15 blocks) and the Extended Price Information Set (up to 48 tiers). The PublishPriceMatrix command is sent in response to a GetPriceMatrix command. Clients should be capable of storing at least two instances of the Price Matrix, the currently active and the next one. There may be a separate Price Matrix for consumption delivered and received; in this case, each Price Matrix will be identified by a different IssuerTariffId value. The Price server shall send only the number of tiers and blocks as defined in the corresponding PublishTariffInformation command (NumberofPriceTiersinUse, NumberofBlockThresholdsinUse+1) <br> The maximum application payload may not be sufficient to transfer all Price Matrix elements in one command. Therefore the ESI may send as many PublishPriceMatrix commands as needed. In this case the first command shall have CommandIndex set to 0, the second to 1 and so on; all associated commands shall use the same value of Issuer Event ID. Note that, in this case, it is the client’s responsibility to ensure that it receives all associated PublishPriceMatrix commands before any of the payloads can be used. + + Provider ID + An unsigned 32-bit field containing a unique identifier for the commodity provider. This field allows differentiation in deregulated markets where multiple commodity providers may be available. + + + Issuer Event ID + Unique identifier generated by the commodity provider. When new information is provided that replaces older information for the same time period, this field allows devices to determine which information is newer. The value contained in this field is a unique number managed by upstream servers or a UTC based time stamp (UTCTime data type) identifying when the Publish command was issued. Thus, newer information will have a value in the Issuer Event ID field that is larger than older information. + + + Start Time + A UTCTime field to denote the time at which the price signal becomes valid. A start date/time of 0x00000000 shall indicate that the command should be executed immediately. + + + Issuer Tariff ID + Unique identifier generated by the commodity supplier. This must match the Issuer Tariff ID sent in the related PublishTariffInformation command. + + + Command Index + The Command Index is used to count the payload fragments in the case that an entire payload does not fit into one message. The Command Index starts at 0 and is incremented for each fragment belonging to the same command. + + + Total Number Of Commands + In the case that an entire payload does not fit into one message, the Total Number of Commands field indicates the total number of sub-commands in the message. An 8-bit bitmap, the least significant bit of which specifies the information type stored in the sub payload. The remaining bits are reserved. the commodity provider. This field allows differentiation in deregulated markets where multiple commodity providers may be available. + + + Sub Payload Control + + + Price Matrix Sub Payload + + + + Publish Block Thresholds Command + The PublishBlockThresholds command is sent in response to a GetBlockThresholds command. Clients should be capable of storing at least two instances of the Block Thresholds, the currently active and the next one. <br> There may be a separate set of Block Thresholds for consumption delivered and received; in this case, each set of Block Thresholds will be identified by a different IssuerTariffId value. <br> The price server shall send only the number of block thresholds in use (NumberofBlockThresholdsInUse) as defined in the PublishTariffInformation command. <br> The maximum application payload may not be sufficient to transfer all thresholds in one command. In this case the Price server may send two consecutive PublishBlockThreshold commands (CommandIndex set to 0 and 1 respectively); both commands shall use the same value of Issuer Event ID. Note that, in this case, it is the client’s responsibility to ensure that it receives all associated PublishBlockThreshold commands before any of the payloads can be used. + + Provider ID + + + Issuer Event ID + Unique identifier generated by the commodity provider. When new information is provided that replaces older information for the same time period, this field allows devices to determine which information is newer. The value contained in this field is a unique number managed by upstream servers or a UTC based time stamp (UTCTime data type) identifying when the Publish command was issued. Thus, newer information will have a value in the Issuer Event ID field that is larger than older information. + + + Start Time + A UTCTime field to denote the time at which the price signal becomes valid. A start date/time of 0x00000000 shall indicate that the command should be executed immediately. + + + Issuer Tariff ID + Unique identifier generated by the commodity supplier. This must match the Issuer Tariff ID sent in the related PublishTariffInformation command. + + + Command Index + The Command Index is used to count the payload fragments in the case where the entire payload does not fit into one message. The Command Index starts at 0 and is incremented for each fragment belonging to the same command. + + + Total Number Of Commands + In the case where the entire payload does not fit into one message, the Total Number of Commands field indicates the total number of sub9242 commands in the message. The Sub-Payload Control bitmap specifies the usage of the information contained within the Block Threshold Sub-Payload The BlockThreshold Sub-Payload consists of multiple sets of data which consist of a Tier ID, Block Threshold Count and the threshold values associated with the stated Tier. The number of thresholds contained in any one set is identified in the NumberOfBlockThresholds sub-field. + + + Sub Payload Control + The Sub-Payload Control bitmap specifies the usage of the information contained within the Block Threshold Sub-Payload. + + + Block Threshold Sub Payload + The BlockThreshold Sub-Payload consists of multiple sets of data which consist of a Tier ID, Block Threshold Count and the threshold values associated with the stated Tier. The number of thresholds contained in any one set is identified in the NumberOfBlockThresholds sub-field. + + + + Publish CO2 Value Command + The PublishCO2Value command is sent in response to a GetCO2Value command or if a new CO2 conversion factor is available. Clients should be capable of storing at least two instances of the CO2 conversion factor, the currently active and the next one. + + Provider ID + An unsigned 32-bit field containing a unique identifier for the commodity provider. This field allows differentiation in deregulated markets where multiple commodity providers may be available. + + + Issuer Event ID + Unique identifier generated by the commodity provider. When new information is provided that replaces older information for the same time period, this field allows devices to determine which information is newer. The value contained in this field is a unique number managed by upstream servers or a UTC based time stamp (UTCTime data type) identifying when the Publish command was issued. Thus, newer information will have a value in the Issuer Event ID field that is larger than older information. + + + Start Time + A UTCTime field to denote the time at which the CO2 value becomes valid. A start date/time of 0x00000000 shall indicate that the command should be executed immediately. A start date/time of 0xFFFFFFFF shall cause an existing PublishCO2Value command with the same Provider ID and Issuer Event ID to be cancelled (note that, in markets where permanently active price information is required for billing purposes, it is recommended that a replacement/superseding PublishCO2Value command is used in place of this cancellation mechanism). + + + Tariff Type + An 8-bit bitmap identifying the type of tariff published in this command. The least significant nibble represents an enumeration of the tariff type as detailed in Table D-108 (Generation Meters shall use the ‘Received’ Tariff). The most significant nibble is reserved. + + + CO2 Value + The format and use of this field is the same as for the CO2 attribute or ReceivedCO2 attribute (depending on TariffType) as defined in D.4.2.2.7.9 and D.4.2.2.15.6 respectively. A value of 0xFFFFFFFF indicates field not used. The format and use of this field is the same as for the CO2Unit attribute or ReceivedCO2Unit attribute (depending on TariffType) as defined in D.4.2.2.7.10 and D.4.2.2.15.7 respectively. A value of 0xFF indicates field not used. The format and use of this field is the same as for the CO2TrailingDigit attribute or ReceivedCO2TrailingDigit attribute (depending on TariffType) as defined in D.4.2.2.7.11 and D.4.2.2.15.8 respectively. A value of 0xFF indicates field not used. + + + CO2 Value Unit + + + CO2 Value Trailing Digit + + + + Publish Tier Labels Command + The PublishTierLabels command is generated in response to receiving a GetTierLabels command or when there is a tier label change + + Provider ID + An unsigned 32-bit field containing a unique identifier for the commodity provider. This field allows differentiation in deregulated markets where multiple commodity providers may be available. + + + Issuer Event ID + Unique identifier generated by the commodity provider. When new information is provided that replaces older information for the same time period, this field allows devices to determine which information is newer. It is expected that the value contained in this field is a unique number managed by upstream servers or a UTC based time stamp (UTCTime data type) identifying when the Publish command was issued. Thus, newer information will have a value in the Issuer Event ID field that is larger than older information. + + + Issuer Tariff ID + Unique identifier generated by the commodity supplier. This is used to identify the tariff that the labels apply to. + + + Command Index + The Command Index is used to count the payload fragments in the case where the entire payload does not fit into one message. The Command Index starts at 0 and is incremented for each fragment belonging to the same command. + + + Total Number Of Commands + In the case where the entire payload does not fit into one message, the Total Number of Commands field indicates the total number of sub commands in the message. + + + Number Of Labels + The number of Tier ID/Tier Label sets contained within the command. + + + Tier ID + The tier number that the associated Tier Label applies to. + + + Tier Label + ZCL Octet String field capable of storing a 12 character string (the first character indicates the string length, represented in hexadecimal format) encoded in the UTF-8 format. + + + + Publish Billing Period Command + The PublishBillingPeriod command is generated in response to receiving a GetBillingPeriod(s) command or when an update to the Billing schedule is available from the commodity supplier. Nested and overlapping PublishBillingPeriod commands are not allowed. In the case of overlapping billing periods, the period with the newer IssuerEventID takes priority over all nested and overlapping periods. All existing periods that overlap, even partially, should be removed. Note however that there may be separate billing schedules for consumption delivered and received. + + Provider ID + An unsigned 32-bit field containing a unique identifier for the commodity provider. This field allows differentiation in deregulated markets where multiple commodity providers may be available. + + + Issuer Event ID + Unique identifier generated by the commodity provider. When new information is provided that replaces older information for the same time period, this field allows devices to determine which information is newer. The value contained in this field is a unique number managed by upstream servers or a UTC based time stamp (UTCTime data type) identifying when the Publish command was issued. Thus, newer information will have a value in the Issuer Event ID field that is larger than older information. + + + Billing Period Start Time + A UTCTime field to denote the time at which the billing period starts. A start time of 0x00000000 is a special time denoting “now”. A start date/time of 0xFFFFFFFF shall cause an existing PublishBillingPeriod command with the same Provider ID and Issuer Event ID to be cancelled (note that, in markets where permanently active price information is required for billing purposes, it is recommended that a replacement/superseding PublishBillingPeriod command is used in place of this cancellation mechanism). + + + Billing Period Duration + An unsigned 24-bit field to denote the billing period duration. The duration units are defined by the Billing Period Duration Type field. Billing periods are always repeating, i.e. after BillingPeriodDuration has elapsed since a BillingPeriodStartTime, a new billing period will start with the same duration. + + + Billing Period Duration Type + An 8-bit bitmap where the least significant nibble is an enumerated sub-field indicating the time base used for the duration, and the most significant nibble is an enumerated sub-field providing duration control. + + + Tariff Type + An 8-bit bitmap identifying the type of tariff published in this command. The least significant nibble represents an enumeration of the tariff type (Generation Meters shall use the ‘Received’ Tariff). The most significant nibble is reserved. + + + + Publish Consolidated Bill Command + The PublishConsolidatedBill command is used to make consolidated billing information from previous billing periods available to other end devices. This command is issued in response to a GetConsolidatedBill command or if new billing information is available. Nested and overlapping PublishConsolidatedBill commands are not allowed. In the case of overlapping consolidated bills, the bill with the newer IssuerEventID takes priority over all nested and overlapping bills. All existing bills that overlap, even partially, should be removed. <br> Note however that there may be separate consolidated bills for consumption delivered and received. + + Provider ID + An unsigned 32-bit field containing a unique identifier for the commodity provider. This field allows differentiation in deregulated markets where multiple commodity providers may be available. + + + Issuer Event ID + Unique identifier generated by the commodity provider. When new information is provided that replaces older information for the same time period, this field allows devices to determine which information is newer. The value contained in this field is a unique number managed by upstream servers or a UTC based time stamp (UTCTime data type) identifying when the Publish command was issued. Thus, newer information will have a value in the Issuer Event ID field that is larger than older information. + + + Billing Period Start Time + A UTCTime field containing the start time of the related billing period. A start date/time of 0x00000000 shall indicate that the command should be executed immediately. A start date/time of 0xFFFFFFFF shall cause an existing PublishConsolidatedBill command with the same Provider ID and Issuer Event ID to be cancelled (note that, in markets where permanently active price information is required for billing purposes, it is recommended that a replacement/superseding PublishConsolidatedBill command is used in place of this cancellation mechanism). + + + Billing Period Duration + An unsigned 24-bit field denoting the duration of the related billing period. The duration units are defined by the Billing Period Duration Type field. + + + Billing Period Duration Type + An 8-bit bitmap where the least significant nibble is an enumerated sub-field indicating the time base used for the duration, and the most significant nibble is an enumerated sub-field providing duration control. + + + Tariff Type + An 8-bit bitmap identifying the type of tariff published in this command. The least significant nibble represents an enumeration of the tariff type as detailed in + + + Consolidated Bill + An unsigned 32-bit field containing the consolidated bill value for the stated billing period. The Consolidated Bill field should be provided in the same currency as used in the Price cluster. + + + Currency + An unsigned 16-bit field containing identifying information concerning the local unit of currency used in the Consolidated Bill field. The value of the currency field should match the values defined by ISO 4217. + + + Bill Trailing Digit + An 8-bit field used to determine where the decimal point is located in the Consolidated Bill field. The most significant nibble contains the Trailing Digit sub field which indicates the number of digits to the right of the decimal point. + + + + Publish Cpp Event Command + The PublishCPPEvent command is sent from an ESI to its Price clients to notify them of a Critical Peak Pricing (CPP) event. <br> When the PublishCPPEvent command is received, the IHD or Meter shall act in one of two ways: 1. It shall notify the consumer that there is a CPP event that requires acknowledgment. The acknowledgement shall be either to accept the CPPEvent or reject the CPPEvent (in which case it shall send the CPPEventResponse command, with the CPPAuth parameter set to Accepted or Rejected). It is recommended that the CPP event is ignored until a consumer either accepts or rejects the event. 2. The CPPAuth parameter is set to “Forced”, in which case the CPPEvent has been accepted. + + Provider ID + An unsigned 32-bit field containing a unique identifier for the commodity provider. This field allows differentiation in deregulated markets where multiple commodity providers may be available. + + + Issuer Event ID + Unique identifier generated by the commodity provider. When new information is provided that replaces older information for the same time period, this field allows devices to determine which information is newer. The value contained in this field is a unique number managed by upstream servers or a UTC based time stamp (UTCTime data type) identifying when the Publish command was issued. Thus, newer information will have a value in the Issuer Event ID field that is larger than older information. A start date/time of 0x00000000 shall indicate that the command should be executed immediately. A start date/time of 0xFFFFFFFF shall cause an existing PublishCPPEvent command with the same Provider ID and Issuer Event ID to be cancelled (note that, in markets where permanently active price information is required for billing purposes, it is recommended that a replacement/superseding PublishCPPEvent command is used in place of this cancellation mechanism). Duration in Minutes: Defines the duration of the CPP event. + + + Start Time + + + Duration In Minutes + + + Tariff Type + An 8-bit bitmap identifying the type of tariff published in this command. The least significant nibble represents an enumeration of the tariff type (Generation Meters shall use the ‘Received’ Tariff). The most significant nibble is reserved. + + + Cpp Price Tier + An 8-bit enumeration identifying the price tier associated with this CPP event. The price(s) contained in the active price matrix for that price tier will override the normal pricing scheme. Prices ‘CPP1’ and ‘CPP2’ are reserved for this purposes. + + + Cpp Auth + An 8-bit enumeration identifying the status of the CPP event: + + + + Publish Credit Payment Command + The PublishCreditPayment command is used to update the credit payment information when available. <br> Nested and overlapping PublishCreditPayment commands are not allowed. In the case of overlapping credit payments, the payment with the newer Issuer Event ID takes priority over all nested and overlapping payments. All existing payments that overlap, even partially, should be removed. + + Provider ID + An unsigned 32-bit field containing a unique identifier for the commodity provider. This field allows differentiation in deregulated markets where multiple commodity providers may be available. + + + Issuer Event ID + Unique identifier generated by the commodity provider. When new information is provided that replaces older information for the same time period, this field allows devices to determine which information is newer. The value contained in this field is a unique number managed by upstream servers or a UTC based time stamp (UTCTime data type) identifying when the Publish command was issued. Thus, newer information will have a value in the Issuer Event ID field that is larger than older information. + + + Credit Payment Due Date + A UTCTime field containing the time that the next credit payment is due. + + + Credit Payment Overdue Amount + An unsigned 32-bit field denoting the current amount this is overdue from the consumer. This field should be provided in the same currency as used in the Price cluster. + + + Credit Payment Status + An 8-bit enumeration identifying the current credit payment status. + + + Credit Payment + An unsigned 32-bit field denoting the last credit payment. This field should be provided in the same currency as used in the Price cluster. + + + Credit Payment Date + A UTCTime field containing the time at which the last credit payment was made. + + + Credit Payment Ref + An string of between 0-20 octets used to denote the last credit payment reference used by the energy supplier. + + + + Publish Currency Conversion Command + The PublishCurrencyConversion command is sent in response to a GetCurrencyConversion command or when a new currency becomes available. + + Provider ID + An unsigned 32-bit field containing a unique identifier for the commodity provider. This field allows differentiation in deregulated markets where multiple commodity providers may be available. + + + Issuer Event ID + Unique identifier generated by the commodity provider. When new information is provided that replaces older information for the same time period, this field allows devices to determine which information is newer. The value contained in this field is a unique number managed by upstream servers or a UTC based time stamp (UTCTime data type) identifying when the Publish command was issued. Thus, newer information will have a value in the Issuer Event ID field that is larger than older information. + + + Start Time + A UTCTime field to denote the time at which the new currency becomes valid. A start date/time of 0x00000000 shall indicate that the command should be executed immediately. A start date/time of 0xFFFFFFFF shall cause an existing but pending PublishCurrencyConversion command with the same Provider ID and Issuer Event ID to be cancelled. + + + Old Currency + An unsigned 16-bit field containing identifying information concerning the old local unit of currency used in the Price cluster. The value of the Old Currency field should match the values defined by ISO 4217. + + + New Currency + An unsigned 16-bit field containing identifying information concerning the new local unit of currency used in the Price cluster. The value of the New Currency field should match the values defined by ISO 4217. + + + Conversion Factor + The format and use of this field is the same as for the ConversionFactor attribute. + + + Conversion Factor Trailing Digit + The format and use of this field is the same as for the ConversionFactorTrailingDigit attribute. + + + Currency Change Control Flags + A 32-bit mask that denotes the functions that are required to be carried out on processing of this command. + + + + Cancel Tariff Command + The CancelTariff command indicates that all data associated with a particular tariff instance should be discarded. <br> In markets where permanently active price information is required for billing purposes, it is recommended that replacement/superseding PublishTariffInformation, PublishPriceMatrix, PublishBlockThresholds and PublishTierLabels commands are used in place of a CancelTariff command. + + Provider ID + An unsigned 32-bit field containing a unique identifier for the commodity provider. This field allows differentiation in deregulated markets where multiple commodity providers may be available. + + + Issuer Tariff ID + Unique identifier generated by the commodity Supplier. All parts of a tariff instance shall have the same Issuer Tariff ID. + + + Tariff Type + An 8-bit bitmap identifying the type of tariff to be cancelled by this command. The least significant nibble represents an enumeration of the tariff type (Generation Meters shall use the ‘Received’ Tariff). The most significant nibble is reserved. + + + + Price Increase Randomize Minutes + The PriceIncreaseRandomizeMinutes attribute represents the maximum amount of time to be used when randomizing the response to a price increase. Note that although the granularity of the attribute is in minutes, it is recommended the granularity of the randomization used within a responding device be in seconds or smaller. If a device responds to a price increase it must choose a random amount of time, in seconds or smaller, between 0 and PriceIncreaseRandomizeMinutes minutes. The device must implement that random amount of time before or after the price change. How and if a device will respond to a price increase is up to the manufacturer. Whether to respond before or after the price increase is also up to the manufacturer. + As an example, a water heater with a PriceIncreaseRandomizeMinutes set to 6 could choose to lower its set point 315 seconds (but not more than 360 seconds) before the price increases. + The valid range for this attribute is 0x00 to 0x3C. + If PriceIncreaseRandomizeMinutes or PriceDecreaseRandomizeMinutes attributes are not supported by the CLIENT, then it should use the default values for the attributes as specified in the Price CLIENT Cluster Attribute table. + + + Price Decrease Randomize Minutes + The PriceDecreaseRandomizeMinutes attribute represents the maximum number of minutes to be used when randomizing the response to a price decrease. Note that although the granularity of the attribute is in minutes, it is recommended the granularity of the randomization used within a responding device be in seconds or smaller. If a device responds to a price decrease it must choose a random amount of time, in seconds or smaller, between 0 and PriceDecreaseRandomizeMinutes minutes and implement that random amount of time before or after the price change. How and if a device will respond to a price decrease is up to the manufacturer. Whether to respond before or after the price increase is also up to the manufacturer. + As an example, a dishwasher with a PriceDecreaseRandomizeMinutes set to 15 could choose to start its wash cycle 723 seconds (but not more than 900 seconds) after the price decreases. The valid range for this attribute is 0x00 to 0x3C. + + + Commodity Type Client + CommodityType provides a label for identifying the type of pricing client present. The attribute is an enumerated value representing the commodity. The defined values are represented by the non-mirrored values (0-127) in the MeteringDeviceType attribute enumerations. + + + Tier {{count}} Price Label + + + Block {{count}} Threshold + Attributes Block1Threshold through Block15Threshold represent the block threshold values for a given period (typically the billing cycle). These values may be updated by the utility on a seasonal or annual basis. The thresholds are established such that crossing the threshold of energy consumption for the present block activates the next higher block, which can affect the energy rate in a positive or negative manner. The values are absolute and always increasing. The values represent the threshold at the end of a block. The Unit of Measure will be based on the + + + Block Threshold Count + Where a single set of thresholds is used, the BlockThresholdCount attribute indicates the number of applicable BlockNThresholds. Where more than one set of thresholds is used, each set will be accompanied by an appropriate TierNBlockThresholdCount attribute. + + + Tier 1 Block {{count}} Threshold + Attributes Block1Threshold through Block15Threshold represent the block threshold values for a given period (typically the billing cycle). These values may be updated by the utility on a seasonal or annual basis. The thresholds are established such that crossing the threshold of energy consumption for the present block activates the next higher block, which can affect the energy rate in a positive or negative manner. The values are absolute and always increasing. The values represent the threshold at the end of a block. The Unit of Measure will be based on the + + + Tier 1 Block Threshold Count + The TierNBlockThresholdCount attributes hold the number of block thresholds applicable to a given tier. These attributes are used in the case when a combination (TOU/Hybrid) tariff has a separate set of thresholds for each TOU tier. Unused TierNBlockThresholdCount attributes shall be set to zero. + + + Tier 2 Block {{count}} Threshold + Attributes Block1Threshold through Block15Threshold represent the block threshold values for a given period (typically the billing cycle). These values may be updated by the utility on a seasonal or annual basis. The thresholds are established such that crossing the threshold of energy consumption for the present block activates the next higher block, which can affect the energy rate in a positive or negative manner. The values are absolute and always increasing. The values represent the threshold at the end of a block. The Unit of Measure will be based on the + + + Tier 2 Block Threshold Count + The TierNBlockThresholdCount attributes hold the number of block thresholds applicable to a given tier. These attributes are used in the case when a combination (TOU/Hybrid) tariff has a separate set of thresholds for each TOU tier. Unused TierNBlockThresholdCount attributes shall be set to zero. + + + Tier 3 Block {{count}} Threshold + Attributes Block1Threshold through Block15Threshold represent the block threshold values for a given period (typically the billing cycle). These values may be updated by the utility on a seasonal or annual basis. The thresholds are established such that crossing the threshold of energy consumption for the present block activates the next higher block, which can affect the energy rate in a positive or negative manner. The values are absolute and always increasing. The values represent the threshold at the end of a block. The Unit of Measure will be based on the + + + Tier 3 Block Threshold Count + The TierNBlockThresholdCount attributes hold the number of block thresholds applicable to a given tier. These attributes are used in the case when a combination (TOU/Hybrid) tariff has a separate set of thresholds for each TOU tier. Unused TierNBlockThresholdCount attributes shall be set to zero. + + + Tier 4 Block {{count}} Threshold + Attributes Block1Threshold through Block15Threshold represent the block threshold values for a given period (typically the billing cycle). These values may be updated by the utility on a seasonal or annual basis. The thresholds are established such that crossing the threshold of energy consumption for the present block activates the next higher block, which can affect the energy rate in a positive or negative manner. The values are absolute and always increasing. The values represent the threshold at the end of a block. The Unit of Measure will be based on the + + + Tier 4 Block Threshold Count + The TierNBlockThresholdCount attributes hold the number of block thresholds applicable to a given tier. These attributes are used in the case when a combination (TOU/Hybrid) tariff has a separate set of thresholds for each TOU tier. Unused TierNBlockThresholdCount attributes shall be set to zero. + + + Tier 5 Block {{count}} Threshold + Attributes Block1Threshold through Block15Threshold represent the block threshold values for a given period (typically the billing cycle). These values may be updated by the utility on a seasonal or annual basis. The thresholds are established such that crossing the threshold of energy consumption for the present block activates the next higher block, which can affect the energy rate in a positive or negative manner. The values are absolute and always increasing. The values represent the threshold at the end of a block. The Unit of Measure will be based on the + + + Tier 5 Block Threshold Count + The TierNBlockThresholdCount attributes hold the number of block thresholds applicable to a given tier. These attributes are used in the case when a combination (TOU/Hybrid) tariff has a separate set of thresholds for each TOU tier. Unused TierNBlockThresholdCount attributes shall be set to zero. + + + Tier 6 Block {{count}} Threshold + Attributes Block1Threshold through Block15Threshold represent the block threshold values for a given period (typically the billing cycle). These values may be updated by the utility on a seasonal or annual basis. The thresholds are established such that crossing the threshold of energy consumption for the present block activates the next higher block, which can affect the energy rate in a positive or negative manner. The values are absolute and always increasing. The values represent the threshold at the end of a block. The Unit of Measure will be based on the + + + Tier 6 Block Threshold Count + The TierNBlockThresholdCount attributes hold the number of block thresholds applicable to a given tier. These attributes are used in the case when a combination (TOU/Hybrid) tariff has a separate set of thresholds for each TOU tier. Unused TierNBlockThresholdCount attributes shall be set to zero. + + + Tier 7 Block {{count}} Threshold + Attributes Block1Threshold through Block15Threshold represent the block threshold values for a given period (typically the billing cycle). These values may be updated by the utility on a seasonal or annual basis. The thresholds are established such that crossing the threshold of energy consumption for the present block activates the next higher block, which can affect the energy rate in a positive or negative manner. The values are absolute and always increasing. The values represent the threshold at the end of a block. The Unit of Measure will be based on the + + + Tier 7 Block Threshold Count + The TierNBlockThresholdCount attributes hold the number of block thresholds applicable to a given tier. These attributes are used in the case when a combination (TOU/Hybrid) tariff has a separate set of thresholds for each TOU tier. Unused TierNBlockThresholdCount attributes shall be set to zero. + + + Tier 8 Block {{count}} Threshold + Attributes Block1Threshold through Block15Threshold represent the block threshold values for a given period (typically the billing cycle). These values may be updated by the utility on a seasonal or annual basis. The thresholds are established such that crossing the threshold of energy consumption for the present block activates the next higher block, which can affect the energy rate in a positive or negative manner. The values are absolute and always increasing. The values represent the threshold at the end of a block. The Unit of Measure will be based on the + + + Tier 8 Block Threshold Count + The TierNBlockThresholdCount attributes hold the number of block thresholds applicable to a given tier. These attributes are used in the case when a combination (TOU/Hybrid) tariff has a separate set of thresholds for each TOU tier. Unused TierNBlockThresholdCount attributes shall be set to zero. + + + Tier 9 Block {{count}} Threshold + Attributes Block1Threshold through Block15Threshold represent the block threshold values for a given period (typically the billing cycle). These values may be updated by the utility on a seasonal or annual basis. The thresholds are established such that crossing the threshold of energy consumption for the present block activates the next higher block, which can affect the energy rate in a positive or negative manner. The values are absolute and always increasing. The values represent the threshold at the end of a block. The Unit of Measure will be based on the + + + Tier 9 Block Threshold Count + The TierNBlockThresholdCount attributes hold the number of block thresholds applicable to a given tier. These attributes are used in the case when a combination (TOU/Hybrid) tariff has a separate set of thresholds for each TOU tier. Unused TierNBlockThresholdCount attributes shall be set to zero. + + + Tier 10 Block {{count}} Threshold + Attributes Block1Threshold through Block15Threshold represent the block threshold values for a given period (typically the billing cycle). These values may be updated by the utility on a seasonal or annual basis. The thresholds are established such that crossing the threshold of energy consumption for the present block activates the next higher block, which can affect the energy rate in a positive or negative manner. The values are absolute and always increasing. The values represent the threshold at the end of a block. The Unit of Measure will be based on the + + + Tier 10 Block Threshold Count + The TierNBlockThresholdCount attributes hold the number of block thresholds applicable to a given tier. These attributes are used in the case when a combination (TOU/Hybrid) tariff has a separate set of thresholds for each TOU tier. Unused TierNBlockThresholdCount attributes shall be set to zero. + + + Tier 11 Block {{count}} Threshold + Attributes Block1Threshold through Block15Threshold represent the block threshold values for a given period (typically the billing cycle). These values may be updated by the utility on a seasonal or annual basis. The thresholds are established such that crossing the threshold of energy consumption for the present block activates the next higher block, which can affect the energy rate in a positive or negative manner. The values are absolute and always increasing. The values represent the threshold at the end of a block. The Unit of Measure will be based on the + + + Tier 11 Block Threshold Count + The TierNBlockThresholdCount attributes hold the number of block thresholds applicable to a given tier. These attributes are used in the case when a combination (TOU/Hybrid) tariff has a separate set of thresholds for each TOU tier. Unused TierNBlockThresholdCount attributes shall be set to zero. + + + Tier 12 Block {{count}} Threshold + Attributes Block1Threshold through Block15Threshold represent the block threshold values for a given period (typically the billing cycle). These values may be updated by the utility on a seasonal or annual basis. The thresholds are established such that crossing the threshold of energy consumption for the present block activates the next higher block, which can affect the energy rate in a positive or negative manner. The values are absolute and always increasing. The values represent the threshold at the end of a block. The Unit of Measure will be based on the + + + Tier 12 Block Threshold Count + The TierNBlockThresholdCount attributes hold the number of block thresholds applicable to a given tier. These attributes are used in the case when a combination (TOU/Hybrid) tariff has a separate set of thresholds for each TOU tier. Unused TierNBlockThresholdCount attributes shall be set to zero. + + + Tier 13 Block {{count}} Threshold + Attributes Block1Threshold through Block15Threshold represent the block threshold values for a given period (typically the billing cycle). These values may be updated by the utility on a seasonal or annual basis. The thresholds are established such that crossing the threshold of energy consumption for the present block activates the next higher block, which can affect the energy rate in a positive or negative manner. The values are absolute and always increasing. The values represent the threshold at the end of a block. The Unit of Measure will be based on the + + + Tier 13 Block Threshold Count + The TierNBlockThresholdCount attributes hold the number of block thresholds applicable to a given tier. These attributes are used in the case when a combination (TOU/Hybrid) tariff has a separate set of thresholds for each TOU tier. Unused TierNBlockThresholdCount attributes shall be set to zero. + + + Tier 14 Block {{count}} Threshold + Attributes Block1Threshold through Block15Threshold represent the block threshold values for a given period (typically the billing cycle). These values may be updated by the utility on a seasonal or annual basis. The thresholds are established such that crossing the threshold of energy consumption for the present block activates the next higher block, which can affect the energy rate in a positive or negative manner. The values are absolute and always increasing. The values represent the threshold at the end of a block. The Unit of Measure will be based on the + + + Tier 14 Block Threshold Count + The TierNBlockThresholdCount attributes hold the number of block thresholds applicable to a given tier. These attributes are used in the case when a combination (TOU/Hybrid) tariff has a separate set of thresholds for each TOU tier. Unused TierNBlockThresholdCount attributes shall be set to zero. + + + Tier 15 Block {{count}} Threshold + Attributes Block1Threshold through Block15Threshold represent the block threshold values for a given period (typically the billing cycle). These values may be updated by the utility on a seasonal or annual basis. The thresholds are established such that crossing the threshold of energy consumption for the present block activates the next higher block, which can affect the energy rate in a positive or negative manner. The values are absolute and always increasing. The values represent the threshold at the end of a block. The Unit of Measure will be based on the + + + Tier 15 Block Threshold Count + The TierNBlockThresholdCount attributes hold the number of block thresholds applicable to a given tier. These attributes are used in the case when a combination (TOU/Hybrid) tariff has a separate set of thresholds for each TOU tier. Unused TierNBlockThresholdCount attributes shall be set to zero. + + + Start of Block Period + The StartofBlockPeriod attribute represents the start time of the current block tariff period. A change indicates that a new Block Period is in effect. + + + Block Period Duration + The BlockPeriodDuration attribute represents the current block tariff period duration in units defined by the BlockPeriodDurationType attribute. A change indicates that only the duration of the current Block Period has been modified. A client device shall expect a new Block Period following the expiration of the new duration. + + + Threshold Multiplier + ThresholdMultiplier provides a value to be multiplied against Threshold attributes. If present, this attribute must be applied to all Block Threshold values to derive values that can be compared against the CurrentBlockPeriodConsumptionDelivered attribute within the Metering cluster. This attribute must be used in conjunction with the ThresholdDivisor attribute. An attribute value of zero shall result in a unitary multiplier (0x000001). + + + Threshold Divisor + ThresholdDivisor provides a value to divide the result of applying the ThresholdMultiplier attribute to Block Threshold values to derive values that can be compared against the CurrentBlockPeriodConsumptionDelivered attribute within the Metering cluster. This attribute must be used in conjunction with the ThresholdMultiplier attribute. An attribute value of zero shall result in a unitary divisor (0x000001). + + + Block Period Duration Type + The BlockPeriodDurationType attribute indicates the timebase used for the BlockPeriodDuration attribute. A default value of 0x00 (Minutes) shall be assumed if this attribute is not present. + + + Commodity Type Server + CommodityType provides a label for identifying the type of pricing CLIENT present. The attribute is an enumerated value representing the commodity. + + + Standing Charge + The value of the Standing Charge is a daily fixed charge associated with supplying the commodity, measured in base unit of Currency with the decimal point located as indicated by the Trailing Digits field of a Publish Price command or PriceTrailingDigit attribute. A value of 0xFFFFFFFF indicates attribute not used. + + + Conversion Factor + + + Conversion Factor Trailing Digit + + + Calorific Value + + + Calorific Value Unit + + + Calorific Value Trailing Digit + + + No Tier Block {{count}} Price + + + Tier 1 Block {{count}} Price + + + Tier 2 Block {{count}} Price + + + Tier 3 Block {{count}} Price + + + Tier 4 Block {{count}} Price + + + Tier 5 Block {{count}} Price + + + Tier 6 Block {{count}} Price + + + Tier 7 Block {{count}} Price + + + Tier 8 Block {{count}} Price + + + Tier 9 Block {{count}} Price + + + Tier 10 Block {{count}} Price + + + Tier 11 Block {{count}} Price + + + Tier 12 Block {{count}} Price + + + Tier 13 Block {{count}} Price + + + Tier 14 Block {{count}} Price + + + Tier 15 Block {{count}} Price + + + Price Tier {{count}} + Attributes PriceTier16 through PriceTier48 represent the price of Energy, Gas, or Water delivered to the premises (i.e. delivered to the customer from the utility) at a specific price tier. + + + Cpp 1 Price + Attribute CPP1 Price represents the price of Energy, Gas, or Water delivered to the premises (i.e. delivered to the customer from the utility) while Critical Peak Pricing ‘CPP1’ is being applied. + + + Cpp 2 Price + Attribute CPP2 Price represents the price of Energy, Gas, or Water delivered to the premises (i.e. delivered to the customer from the utility) while Critical Peak Pricing ‘CPP2’ is being applied. + + + Tariff Label + + + Numberof Price Tiers In Use + + + Numberof Block Thresholds In Use + + + Tier Block Mode + + + Unit Of Measure + + + Currency + + + Price Trailing Digit + + + Tariff Resolution Period + An 8 bit enumeration identifying the resolution period for Block Tariff + + + CO2 + Used to calculate the amount of carbon dioxide (CO2) produced from energy use. Natural gas has a conversion factor of about 0.185, e.g. 1,000 kWh of gas used is responsible for the production of 185kg CO2 (0.185 x 1000 kWh). The CO2 attribute represents the current active value + + + CO2 Unit + This attribute is an 8-bit enumeration which defines the unit for the CO2 attribute. The values and descriptions for this attribute are listed in Table D-83 below. The CO2Unit attribute represents the current active value. + + + CO2 Trailing Digit + + + Current Billing Period Start + The CurrentBillingPeriodStart attribute represents the start time of the current billing period. + + + Current Billing Period Duration + The CurrentBillingPeriodDuration attribute represents the current billing period duration in minutes. + + + Last Billing Period Start + The LastBillingPeriodStart attribute represents the start time of the last billing period. + + + Last Billing Period Duration + The LastBillingPeriodDuration attribute is the duration of the last billing period in minutes (start to end of last billing period). + + + Last Billing Period Consolidated Bill + The LastBillingPeriodConsolidatedBill attribute is an amount for the cost of the energy supplied from the date of the LastBillingPeriodStart attribute and until the duration of the LastBillingPeriodDuration attribute expires, measured in base unit of Currency with the decimal point located as indicated by the Trailing Digits attribute. + + + Credit Payment Due Date + The CreditPaymentDueDate attribute indicates the date and time when the next credit payment is due to be paid by the consumer to the supplier. + + + Credit Payment Status + The CreditPaymentStatus attribute indicates the current status of the last payment. + + + Credit Payment Over Due Amount + This is the total of the consolidated bill amounts accumulated since the last payment. + + + Payment Discount + The PaymentDiscount attribute indicates the discount that the energy supplier has applied to the consolidated bill. + + + Payment Discount Period + The PaymentDiscountPeriod attribute indicates the period for which this discount shall be applied for. + + + Credit Card Payment 1 + + + Credit Card Payment Date 1 + + + Credit Card Payment Ref 1 + + + Credit Card Payment 2 + + + Credit Card Payment Date 2 + + + Credit Card Payment Ref 2 + + + Credit Card Payment 3 + + + Credit Card Payment Date 3 + + + Credit Card Payment Ref 3 + + + Credit Card Payment 4 + + + Credit Card Payment Date 4 + + + Credit Card Payment Ref 4 + + + Credit Card Payment 5 + + + Credit Card Payment Date 5 + + + Credit Card Payment Ref 5 + + + Received Tier {{count}} Price Label + + + Received Block {{count}} Threshold + + + Received Start Of Block Period + + + Received Block Period Duration + + + Received Threshold Multiplier + + + Received Threshold Divisor + + + Rx No Tier Block {{count}} Price + + + Rx Tier 1 Block {{count}} Price + + + Rx Tier 2 Block {{count}} Price + + + Rx Tier 3 Block {{count}} Price + + + Rx Tier 4 Block {{count}} Price + + + Rx Tier 5 Block {{count}} Price + + + Rx Tier 6 Block {{count}} Price + + + Rx Tier 7 Block {{count}} Price + + + Rx Tier 8 Block {{count}} Price + + + Rx Tier 9 Block {{count}} Price + + + Rx Tier 10 Block {{count}} Price + + + Rx Tier 11 Block {{count}} Price + + + Rx Tier 12 Block {{count}} Price + + + Rx Tier 13 Block {{count}} Price + + + Rx Tier 14 Block {{count}} Price + + + Rx Tier 15 Block {{count}} Price + + + Received Price Tier {{count}} + + + Received Tariff Label + + + Received Number Of Price Tiers In Use + + + Received Number Of Block Thresholds In Use + + + Received Tier Block Mode + + + Received CO2 + + + Received CO2 Unit + + + Received CO2 Trailing Digit + + + Received Current Billing Period Start + + + Received Current Billing Period Duration + + + Received Last Billing Period Start + + + Received Last Billing Period Duration + + + Received Last Billing Period Consolidated Bill + + + + Payment Discount Period + + + + + + + + + + + + + Credit Payment Status + + + + + + + + + + + + + Currency Change Control + + + + + + + + + + + Extended Number Of Price Tiers + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Extended Price Tier + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Extended Register Tier + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Generation Tier + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Price Control Mask + + + + + + + Price Matrix Sub Payload Control + + + + + Price Number Of Price Tiers And Register Tier + + + + + + + Price Trailing Digit + + + + + Price Trailing Digit And Price Tier + + + + + + + Publish Cpp Event Cpp Auth + + + + + + + + + + + Tariff Type + + + + + + + + + Tariff Type Charging Scheme + + + + + + + Tier Block Mode + + + + + + + + + + + + Block Threshold Sub Payload + + Tier Number Of Block Thresholds + + + Block Threshold + + + + Price Matrix Sub Payload + + Tier Block ID + + + Price + + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0701_DemandResponseAndLoadControl.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0701_DemandResponseAndLoadControl.xml new file mode 100644 index 000000000..fa7c7e913 --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0701_DemandResponseAndLoadControl.xml @@ -0,0 +1,290 @@ + + Demand Response And Load Control + This cluster provides an interface to the functionality of Smart Energy Demand Response and Load Control. Devices targeted by this cluster include thermostats and devices that support load control. + The ESI is defined as the Server due to its role in acting as the proxy for upstream demand response/load control management systems and subsequent data stores. + A server device shall be capable of storing at least two load control events. + Events carried using this cluster include a timestamp with the assumption that target devices maintain a real-time clock. If a device does not support a real-time clock, it is assumed the device will ignore all values within the Time field except the “Start Now” value. + + Report Event Status + + Issuer Event ID + Unique identifier generated by the Energy provider. The value of this field allows matching of Event reports with a specific Demand Response and Load Control event. It's expected the value contained in this field is a unique number managed by upstream systems or a UTC based time stamp (UTCTime data type) identifying when the Load Control Event was issued. + + + Event Status + This lists the valid values returned in the Event Status field. + + + Event Status Time + UTC Timestamp representing when the event status occurred. This field shall not use the value of 0x00000000. + + + Criticality Level Applied + Criticality Level value applied by the device, see the corresponding field in the Load Control Event command for more information. + + + Cooling Temperature Set Point Applied + Cooling Temperature Set Point value applied by the device, see the corresponding field in the Load Control Event command for more information. The value 0x8000 means that this field has not been used by the end device. + + + Heating Temperature Set Point Applied + Heating Temperature Set Point value applied by the device, see the corresponding field in the Load Control Event command for more information. The value 0x8000 means that this field has not been used by the end device. + + + Average Load Adjustment Percentage Applied + Average Load Adjustment Percentage value applied by the device, see the corresponding field in the Load Control Event command for more information. The value 0x80 means that this field has not been used by the end device. + + + Duty Cycle Applied + Defines the maximum On state duty cycle applied by the device. The value 0xFF means that this field has not been used by the end device. + + + Event Control + Identifies additional control options for the event. + + + Signature Type + An 8-bit Unsigned integer enumerating the type of algorithm use to create the Signature. + + + Signature + A non-repudiation signature created by using the Matyas-Meyer-Oseas hash function used in conjunction with ECDSA. + + + + Get Scheduled Events + This command is used to request that all scheduled Load Control Events, starting at or after the supplied Start Time, are re-issued to the requesting device. When received by the Server, one or more Load Control Event commands will be sent covering both active and scheduled Load Control Events. + + Start Time + UTC Timestamp representing the minimum ending time for any scheduled or currently active events to be resent. If either command has a Start Time of 0x00000000, replace that Start Time with the current time stamp. + + + Number Of Events + Represents the maximum number of events to be sent. A value of 0 would indicate all available events are to be returned. Example: Number of Events = 1 would return the first event with an EndTime greater than or equal to the value of Start Time field in the Get Scheduled Events command (EndTime would be StartTime plus Duration of the event listed in the device's event table). + + + + Load Control Event Command + + Issuer Event ID + Unique identifier generated by the Energy provider. The value of this field allows matching of Event reports with a specific Demand Response and Load Control event. The expected value contained in this field shall be a unique number managed by upstream systems or a UTC based time stamp (UTCTime data type) identifying when the Load Control Event was issued. + + + Device Class + Bit encoded field representing the Device Class to apply the current Load Control Event. Each bit, if set individually or in combination, indicates the class device(s) needing to participate in the event. (Note that the participating device may be different than the controlling device. For instance, a thermostat may act on behalf of an HVAC compressor or furnace and/or Strip Heat/Baseboard Heater and should take action on their behalf, as the thermostat itself is not subject to load shed but controls devices that are subject to load shed.) + + + Utility Enrollment Group + The Utility Enrollment Group field can be used in conjunction with the Device Class bits. It provides a mechanism to direct Load Control Events to groups of Devices. Example, by assigning two different groups relating to either Demand Response programs or geographic areas, Load Control Events can be further directed for a subset of Device Classes (i.e. Device Class Bit 0 and Utility Enrollment Group #1 vs. Device Class Bit0 and Utility Enrollment Group #2). 0x00 addresses all groups, and values 0x01 to 0xFF address individual groups that match. + If the Device Class and/or Utility Enrollment Group fields don’t apply to your End Device, the Load Control Event command shall be ignored by either dropping the message and not replying at all or by sending back a Default Response message with a SUCCESS status code. + + + Start Time + UTC Timestamp representing when the event is scheduled to start. A start time of 0x00000000 is a special time denoting “now.” If the device would send an event with a Start Time of now, adjust the Duration In Minutes field to correspond to the remainder of the event. + + + Duration In Minutes + Duration of this event in number of minutes. Maximum value is 1440 (one day). + + + Criticality Level + This field defines the level of criticality of this event. The action taken by load control devices for an event can be solely based on this value, or combination with other Load Control Event fields supported by this device. For example, additional fields such as Average Load Adjustment Percentage, Duty Cycle, Cooling Temperature Offset, Heating Temperature Offset, Cooling Temperature Set Point or Heating Temperature Set Point can be used in combination with the Criticality level. + + + Cooling Temperature Offset + Requested offset to apply to the normal cooling setpoint at the time of the start of the event in + 0.1 oC. + + + Heating Temperature Offset + Requested offset to apply to the normal heating setpoint at the time of the start of the event in + 0.1 oC. + + + Cooling Temperature Set Point + Requested cooling set point in 0.01 degrees Celsius. + + + Heating Temperature Set Point + Requested heating set point in 0.01 degrees Celsius. + + + Average Load Adjustment Percentage + Defines a maximum energy usage limit as a percentage of the client implementations specific average energy usage. The load adjustment percentage is added to 100% creating a percentage limit applied to the client implementations specific average energy usage. A -10% load adjustment percentage will establish an energy usage limit equal to 90% of the client implementations specific average energy usage. Each load adjustment percentage is referenced to the client implementations specific average energy usage. There are no cumulative effects. + The range of this field is -100 to +100 with a resolution of 1 percent. A -100% value equals a total load shed. A 0% value will limit the energy usage to the client implementation’s specific average energy usage. A +100% value will limit the energy usage to double the client implementation’s specific average energy usage. + A value of 0x80 indicates the field is not used. All other values are reserved for future use. + + + Duty Cycle + Defines the maximum On state duty cycle as a percentage of time. Example, if the value is 80, the device would be in an “on state” for 80% of the time for the duration of the event. Range of the value is 0 to 100. A value of 0xFF indicates the field is not used. All other values are reserved for future use. + Duty cycle control is a device specific issue and shall be managed by the device manufacturer. It is expected that the duty cycle of the device under control will span the shortest practical time period in accordance with the nature of the device under control and the intent of the request for demand reduction. For typical Device Classes, three minutes7 for each 10% of duty cycle is recommended. It is expected that the “off state” will precede the “on state”. + + + Event Control + Identifies additional control options for the event. + + + + Cancel Load Control Event + + Issuer Event ID + Unique identifier generated by the Energy provider. The value of this field allows matching of Event reports with a specific Demand Response and Load Control event. It's expected the value contained in this field is a unique number managed by upstream systems or a UTC based time stamp (UTCTime data type) identifying when the Load Control Event was issued. + + + Device Class + Bit encoded field representing the Device Class to apply the current Load Control Event. Each bit, if set individually or in combination, indicates the class device(s) needing to participate in the event. (Note that the participating device may be different than the controlling device. For instance, a thermostat may act on behalf of an HVAC compressor or furnace and/or Strip Heat/Baseboard Heater and should take action on their behalf, as the thermostat itself is not subject to load shed but controls devices that are subject to load shed.) + + + Utility Enrollment Group + The Utility Enrollment Group field can be used in conjunction with the Device Class bits. It provides a mechanism to direct Load Control Events to groups of Devices. Example, by assigning two different groups relating to either Demand Response programs or geographic areas, Load Control Events can be further directed for a subset of Device Classes (i.e. Device Class Bit 0 and Utility Enrollment Group #1 vs. Device Class Bit0 and Utility Enrollment Group #2). 0x00 addresses all groups, and values 0x01 to 0xFF address individual groups that match. Please refer to sub-clause D.2.3.2.1 for further details. + + + Cancel Control + + + Effective Time + Note: This field is deprecated; a Cancel Load Control command shall now take immediate effect. A value of 0x00000000 shall be used in all Cancel Load Control commands + UTC Timestamp representing when the cancelling of the event is scheduled to start. An effective time of 0x00000000 is a special time denoting “now.” If the device would send an event with an Effective Time of now, adjust the Duration In Minutes field to correspond to the remainder of the event. + + + + Cancel All Load Control Events + + Cancel Control + + + + + Utility Enrollment Group + The UtilityEnrollmentGroup provides a method for utilities to assign devices to groups. In other words, Utility defined groups provide a mechanism to arbitrarily group together different sets of load control or demand response devices for use as part of a larger utility program. The definition of the groups, implied usage, and their assigned values are dictated by the Utilities and subsequently used at their discretion, therefore outside the scope of this specification. The valid range for this attribute is 0x00 to 0xFF, where 0x00 (the default value) indicates the device is a member of all groups and values 0x01 to 0xFF indicates that the device is member of that specified group. + + + Start Randomization Minutes + The StartRandomizedMinutes represents the maximum number of minutes to be used when randomizing the start of an event. As an example, if StartRandomizedMinutes is set for 3 minutes, the device could randomly select 2 minutes (but never greater than the 3 minutes) for this event, causing the start of the event to be delayed by two minutes. The valid range for this attribute is 0x00 to 0x3C where 0x00 indicates start event randomization is not performed. + + + End Randomization Minutes + The EndRandomizedMinutes represents the maximum number of minutes to be used when randomizing the end of an event. As an example, if EndRandomizedMinutes is set for 3 minutes, the device could randomly select one minute (but never greater than 3 minutes) for this event, causing the end of the event to be delayed by one minute. The valid range for this attribute is 0x00 to 0x3C where 0x00 indicates end event randomization is not performed. + + + Device Class Value + The DeviceClassValue attribute identifies which bits the device will match in the Device Class fields. Please refer to Table D-2, “Device Class Field BitMap/ Encoding” for further details. Although the attribute has a read/write access property, the device is permitted to refuse to change the DeviceClass by setting the status field of the corresponding write attribute status record to NOT_AUTHORIZED. + Although, for backwards compatibility, the Type cannot be changed, this 16-bit Integer should be treated as if it were a 16-bit BitMap. + Device Class and/or Utility Enrollment Group fields are to be used as filters for deciding to accept or ignore a Load Control Event or a Cancel Load Control Event command. There is no requirement for a device to store or remember the Device Class and/or Utility Enrollment Group once the decision to accept the event has been made. A consequence of this is that devices that accept multiple device classes may have an event created for one device class superseded by an event created for another device class. + + + + Cancel Control + + + + + Criticality Level + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Device Class + Although, for backwards compatibility, the Type cannot be changed, this 16-bit Integer should be treated as if it were a 16-bit BitMap. + + + + + + + + + + + + + + + + + + + + + + + + + + + Event Control + + + + + + + Event Status + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Signature Type + + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0702_Metering.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0702_Metering.xml new file mode 100644 index 000000000..ee0caad98 --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0702_Metering.xml @@ -0,0 +1,1510 @@ + + Metering + The Metering Cluster provides a mechanism to retrieve usage information from Electric, Gas, Water, and potentially Thermal metering devices. These devices can operate on either battery or mains power, and can have a wide variety of sophistication. The Metering Cluster is designed to provide flexibility while limiting capabilities to a set number of metered information types. More advanced forms or data sets from metering devices will be supported in the Smart Energy Tunneling Cluster + + + Get Profile + The GetProfile command is generated when a client device wishes to retrieve a list of captured Energy, Gas or water consumption for profiling purposes. + + Interval Channel + Enumerated value used to select the quantity of interest returned by the GetProfileReponse command. + + + End Time + 32-bit value (in UTCTime) used to select an Intervals block from all the Intervals blocks available. The Intervals block returned is the most recent block with its EndTime equal or older to the one provided. The most recent Intervals block is requested using an End Time set to 0x00000000, subsequent Intervals block are requested using an End time set to the EndTime of the previous block - (number of intervals of the previous block * ProfileIntervalPeriod). + + + Number Of Periods + Represents the number of intervals being requested. This value cannot exceed the size stipulated in the MaxNumberOfPeriodsDelivered attribute. If more intervals are requested than can be delivered, the GetProfileResponse will return the number of intervals equal to MaxNumberOfPeriodsDelivered. If fewer intervals are available for the time period, only those available are returned. + + + + Request Mirror Response + The Request Mirror Response Command allows the ESI to inform a sleepy Metering Device it has the ability to store and mirror its data. + + Endpoint ID + 16 Bit Unsigned Integer indicating the End Point ID to contain the Metering Devices meter data. Valid End Point ID values are 0x0001 to 0x00F0. If the ESI is able to mirror the Metering Device data, the low byte of the unsigned 16 bit integer shall be used to contain the eight bit EndPoint ID. If the ESI is unable to mirror the Metering Device data, EndPoint ID shall be returned as 0xFFFF. All other EndPoint ID values are reserved. If valid, the Metering device shall use the EndPoint ID to forward its metered data. + + + + Mirror Removed + The Mirror Removed Command allows the ESI to inform a sleepy Metering Device mirroring support has been removed or halted. + + Removed Endpoint ID + 16 Bit Unsigned Integer indicating the End Point ID previously containing the Metering Devices meter data. + + + + Request Fast Poll Mode + The Request Fast Poll Mode command is generated when the metering client wishes to receive near real-time updates of InstantaneousDemand. + + Fast Poll Update Period + Desired fast poll period not to be less than the FastPollUpdatePeriod attribute. + + + Duration + Desired duration for the server to remain in fast poll mode not to exceed 15 minutes. + + + + Schedule Snapshot + This command is used to set up a schedule of when the device shall create snapshot data. + + Issuer Event ID + Unique identifier generated by the commodity provider. When new information is provided that replaces older information for the same time period, this field allows devices to determine which information is newer. The value contained in this field is a unique number managed by upstream servers or a UTC based time stamp (UTCTime data type) identifying when the snapshot command was issued. Thus, newer information will have a value in the Issuer Event ID field that is larger than older information.This is required when the snapshot data needs to be transmitted over several messages, allowing for the client to easily identify the set of messages that form a group. + + + Command Index + The CommandIndex is used to count the payload fragments for the case where the entire payload does not fit into one message. The CommandIndex starts at 0 and is incremented for each fragment belonging to the same command. + + + Total Number of Commands + In the case where the entire payload does not fit into one message, the Total Number of Commands field indicates the total number of sub-commands in the message. + + + Snapshot Schedule Payload + + + + Take Snapshot + This command is used to instruct the cluster server to take a single snapshot. + + Snapshot Cause + A 32-bit BitMap indicating the cause of the snapshot. Note that the Manually Triggered from Client flag shall additionally be set for all Snapshots triggered in this manner. + + + + Get Snapshot + This command is used to request snapshot data from the cluster server. + + Earliest Start Time + A UTC Timestamp indicating the earliest time of a snapshot to be returned by a corresponding Publish Snapshot command. Snapshots with a time stamp equal to or greater than the specified Earliest Start Time shall be returned. + + + Latest End Time + A UTC Timestamp indicating the latest time of a snapshot to be returned by a corresponding Publish Snapshot command. Snapshots with a time stamp less than the specified Latest End Time shall be returned. + + + Snapshot Offset + Where multiple snapshots satisfy the selection criteria specified by the other fields in this command, this field identifies the individual snapshot to be returned. An offset of zero (0x00) indicates that the first snapshot satisfying the selection criteria should be returned, 0x01 the second, and so on. + + + Snapshot Cause + This field is used to select only snapshots that were taken due to a specific cause. Setting this field to 0xFFFFFFFF indicates that all snapshots should be selected, irrespective of the cause. + + + + Start Sampling + The sampling mechanism allows a set of samples of the specified type of data to be taken, commencing at the stipulated start time. This mechanism may run concurrently with the capturing of profile data, and may refer the same parameters, albeit possibly at a different sampling rate. + + Issuer Event ID + Unique identifier generated by the commodity provider. When new information is provided that replaces older information for the same time period, this field allows devices to determine which information is newer. The value contained in this field is a unique number managed by upstream servers or a UTC based time stamp (UTCTime data type) identifying when the command was issued. Thus, newer information will have a value in the Issuer Event ID field that is larger than older information. Commands should be ignored if the value of the Issuer Event ID is equal to or less than the previous value; a device MAY return a ZCL Default Response command in this case. + + + Start Sampling Time + A UTC Time field to denote the time at which the sampling should start. A start Date/Time of 0x00000000 shall indicate that the command should be executed immediately. A start Date/Time of 0xFFFFFFFF shall cause an existing StartSampling command with the same Issuer Event ID to be cancelled. + + + Sample Type + An 8 bit enumeration that identifies the type of data being sampled. + + + Sample Request Interval + An unsigned 16-bit field representing the interval or time in seconds between samples. + + + Max Number Of Samples + A 16 bit unsigned integer that represents the number of samples to be taken. + + + + Get Sampled Data + This command is used to request sampled data from the server. Note that it is the responsibility of the client to ensure that it does not request more samples than can be held in a single command payload. + + Sample ID + Unique identifier allocated to this Sampling session. This field allows devices to match response data with the appropriate request. + + + Earliest Sample Time + A UTC Timestamp indicating the earliest time of a sample to be returned. Samples with a timestamp equal to or greater than the specified EarliestSampleTime shall be returned. + + + Sample Type + An 8 bit enumeration that identifies the required type of sampled data. + + + Number Of Samples + Represents the number of samples being requested, This value cannot exceed the size stipulated in the MaxNumberofSamples field in the StartSampling command. If more samples are requested than can be delivered, the GetSampledDataResponse command will return the number of samples equal to the MaxNumberofSamples field. If fewer samples are available for the time period, only those available are returned. + + + + Mirror Report Attribute Response + FIXME: This command is sent in response to the ReportAttribute command when the MirrorReporting attribute is set. + + Notification Scheme + An unsigned 8-bit integer that allows for the pre-loading of the Notification Flags bit mapping to ZCL or Smart Energy Standard commands. + + + Notification Flags + + + + Reset Load Limit Counter + The ResetLoadLimitCounter command shall cause the LoadLimitCounter attribute to be reset. + + Provider ID + An unsigned 32-bit field containing a unique identifier for the commodity provider. + + + Issuer Event ID + Unique identifier generated by the commodity provider. This field allows devices to determine if a new command has been issued. The value contained in this field is a unique number managed by upstream servers or a UTC based time stamp (UTCTime data type) identifying when the command was issued. Thus, a newer command will have a value in the Issuer Event ID field that is larger than previous versions of the command. + + + + Change Supply + This command is sent from the Head-end or ESI to the Metering Device to instruct it to change the status of the valve or load switch, i.e. the supply. + + Provider ID + An unsigned 32-bit field containing a unique identifier for the commodity provider to whom this command relates. + + + Issuer Event ID + Unique identifier generated by the commodity provider. When new information is provided that replaces older information for the same time period, this field allows devices to determine which information is newer. The value contained in this field is a unique number managed by upstream servers or a UTC based time stamp (UTCTime data type) identifying when the command was issued. Thus, newer information will have a value in the Issuer Event ID field that is larger than older information. + + + Request Date Time + A UTC Time field to indicate the date and time at which the supply change was requested. + + + Implementation Date Time + A UTC Time field to indicate the date at which the supply change is to be applied. An Implementation Date/Time of 0x00000000 shall indicate that the command should be executed immediately. An Implementation Date/Time of 0xFFFFFFFF shall cause an existing but pending Change Supply command with the same Provider ID and Issuer Event ID to be cancelled (the status of the supply will not change but the Proposed Change Supply Implementation Time attribute shall be reset to zero). + + + Proposed Supply Status + An 8-bit enumeration field indicating the status of the energy supply controlled by the Metering Device following implementation of this command. + + + Supply Control Bits + An 8-bit BitMap where the least significant nibble defines the Supply Control bits. + + + + Local Change Supply + This command is a simplified version of the ChangeSupply command, intended to be sent from an IHD to a meter as the consequence of a user action on the IHD. Its purpose is to provide a local disconnection/reconnection button on the IHD in addition to the one on the meter. + + Proposed Supply Status + An 8-bit enumeration field indicating the status of the energy supply controlled by the Metering Device following implementation of this command. + + + + Set Supply Status + This command is used to specify the required status of the supply following the occurance of certain events on the meter. + + Issuer Event ID + Unique identifier generated by the commodity provider. When new information is provided that replaces older information for the same time period, this field allows devices to determine which information is newer. The value contained in this field is a unique number managed by upstream servers or a UTC based time stamp (UTCTime data type) identifying when the command was issued. Thus, newer information will have a value in the Issuer Event ID field that is larger than older information. + + + Supply Tamper State + The SupplyTamperState indicates the required status of the supply following the detection of a tamper event within the metering device. + + + Supply Depletion State + The SupplyDepletionState indicates the required status of the supply following detection of a depleted battery within the metering device. + + + Supply Uncontrolled Flow State + The SupplyUncontrolledFlowState indicates the required status of the supply following detection of an uncontrolled flow event within the metering device. + + + Load Limit Supply State + The LoadLimitSupplyState indicates the required status of the supply once the device is in a load limit state. + + + + Set Uncontrolled Flow Threshold + This command is used to update the 'Uncontrolled Flow Rate' configuration data used by flow meters. + + Provider ID + An unsigned 32-bit field containing a unique identifier for the commodity provider to whom this command relates. + + + Issuer Event ID + Unique identifier generated by the commodity provider. When new information is provided that replaces older information for the same time period, this field allows devices to determine which information is newer. The value contained in this field is a unique number managed by upstream servers or a UTC based time stamp (UTCTime data type) identifying when the command was issued. Thus, newer information will have a value in the Issuer Event ID field that is larger than older information. + + + Uncontrolled Flow Threshold + The threshold above which a flow meter (e.g. Gas or Water) shall detect an uncontrolled flow. A value of 0x0000 indicates the feature in unused. + + + Unit Of Measure + An enumeration indicating the unit of measure to be used in conjunction with the Uncontrolled Flow Threshold attribute. The enumeration used for this field shall match one of the UnitOfMeasure values using a pure binary format as defined in the Metering cluster. + + + Multiplier + An unsigned 16-bit value indicating the multiplier, to be used in conjunction with the Uncontrolled Flow Threshold and Divisor fields, to determine the true flow threshold value. A value of 0x0000 is not allowed. + + + Divisor + An unsigned 16-bit value indicating the divisor, to be used in conjunction with the Uncontrolled Flow Threshold and Multiplier fields, to determine the true flow threshold value. A value of 0x0000 is not allowed. + + + Stabilisation Period + An unsigned 8-bit value indicating the time given to allow the flow to stabilize. It is defined in units of tenths of a second. + + + Measurement Period + An unsigned 16-bit value indicating the period over which the flow is measured and compared against the Uncontrolled Flow Threshold value. It is defined in units of 1 second. + + + + + Get Profile Response + This command is sent when the Client command GetProfile is received. + + End Time + 32-bit value (in UTC) representing the end time of the most chronologically recent interval being requested. Example: Data collected from 2:00 PM to 3:00 PM would be specified as a 3:00 PM interval (end time). It is important to note that the current interval accumulating is not included in most recent block but can be retrieved using the CurrentPartialProfileIntervalValue attribute. + + + Status + + + Profile Interval Period + Represents the interval or time frame used to capture metered Energy, Gas, and Water consumption for profiling purposes. + + + Number Of Periods Delivered + Represents the number of intervals the device is returning. Please note the number of periods returned in the Get Profile Response command can be calculated when the packets are received and can replace the usage of this field. The intent is to provide this information as a convenience. + + + Intervals + Series of interval data captured using the period specified by the ProfileIntervalPeriod field. The content of the interval data depends of the type of information requested using the Channel field in the Get Profile Command, and will represent the change in that information since the previous interval. Data is organized in a reverse chronological order, the most recent interval is transmitted first and the oldest interval is transmitted last. Invalid intervals should be marked as 0xFFFFFF. + + + + Request Mirror + This command is used to request the ESI to mirror Metering Device data. + + + Remove Mirror + This command is used to request the ESI to remove its mirror of Metering Device data. + + + Request Fast Poll Mode Response + This command is generated when the client command Request Fast Poll Mode is received. + + Applied Update Period + The period at which metering data shall be updated. This may be different than the requested fast poll. If the Request Fast Poll Rate is less than Fast Poll Update Period Attribute, it shall use the Fast Poll Update Period Attribute. Otherwise, the Applied Update Period shall be greater than or equal to the minimum Fast Poll Update Period Attribute and less than or equal to the Requested Fast Poll Rate. + + + Fast Poll Mode Endtime + UTC time that indicates when the metering server will terminate fast poll mode and resume updating at the rate specified by DefaultUpdatePeriod. For example, one or more metering clients may request fast poll mode while the metering server is already in fast poll mode. The intent is that the fast poll mode will not be extended since this scenario would make it possible to be in fast poll mode longer than 15 minutes. + + + + Schedule Snapshot Response + This command is generated in response to a ScheduleSnapshot command, and is sent to confirm whether the requested snapshot schedule has been set up. + + Issuer Event ID + Unique identifier generated by the commodity provider. The value contained in this field indicates the value allocated to the ScheduleSnapshot command for which this response is generated. + + + Snapshot Response Payload + The ScheduleSnapshotResponse payload may contain several instances of the sub-payload. Each instance is an acknowledgment from the device for a scheduled snapshot and the ability for the device to support that type of snapshot. + + + + Take Snapshot Response + This command is generated in response to a TakeSnapshot command, and is sent to confirm whether the requested snapshot has been accepted and successfully taken. + + Snapshot ID + Unique identifier allocated by the device creating the snapshot. The value contained in this field indicates the TakeSnapshot command for which this response is generated. + + + Snapshot Confirmation + This is the acknowledgment from the device that it can support this required type of snapshot. + + + + Publish Snapshot + This command is generated in response to a GetSnapshot command. It is used to return a single snapshot to the client. + + Snapshot ID + Unique identifier allocated by the device creating the snapshot. + + + Snapshot Time + This is a 32 bit value (in UTC Time) representing the time at which the data snapshot was taken. + + + Total Snapshots Found + An 8-bit Integer indicating the number of snapshots found, based on the search criteria defined in the associated GetSnapshot command. If the value is greater than 1, the client is able to request the next snapshot by incrementing the Snapshot Offset field in an otherwise repeated GetSnapshot command. + + + Command Index + The CommandIndex is used to count the payload fragments in the case where the entire payload (snapshot) does not fit into one message. The CommandIndex starts at 0 and is incremented for each fragment belonging to the same command. + + + Total Number Of Commands + In the case where the entire payload (snapshot) does not fit into one message, the Total Number of Commands field indicates the total number of sub-commands that will be returned. + + + Snapshot Cause + A 32-bit BitMap indicating the cause of the snapshot. + + + Snapshot Payload Type + The SnapshotPayloadType is an 8-bit enumerator defining the format of the SnapshotSubPayload in this message. The server selects the SnapshotPayloadType based on the charging scheme in use. + If the snapshot is taken by the server due to a change of Tariff Information (cause = 3) which involves a change in charging scheme then two snapshots shall be taken, the first according to the charging scheme being dismissed, the second to the scheme being introduced. + + + Snapshot Payload + The format of the SnapshotSub-Payload differs depending on the SnapshotPayloadType, as shown below. Note that, where the entire payload (snapshot) does not fit into one message, only the leading (non-Sub-Payload) fields of the Snapshot payload are repeated in each command; the SnapshotSub-Payload is divided over the required number of commands. + + + + Get Sampled Data Response + FIXME: This command is used to send the requested sample data to the client. It is generated in response to a GetSampledData command. + + Sample ID + Unique identifier allocated to this Sampling session. This field allows devices to match response data with the appropriate request. + + + Sample Start Time + A UTC Time field to denote the time of the first sample returned in this response. + + + Sample Type + An 8 bit enumeration that identifies the type of data being sampled. + + + Sample Request Interval + An unsigned 16-bit field representing the interval or time in seconds between samples. + + + Number Of Samples + Represents the number of samples being requested, This value cannot exceed the size stipulated in the MaxNumberofSamples field in the StartSampling command. If more samples are requested than can be delivered, the GetSampleDataResponse command will return the number of samples equal to MaxNumberofSamples field. If fewer samples are available for the time period, only those available shall be returned. + + + Samples + Series of data samples captured using the interval specified by the SampleRequestInterval field in the StartSampling command. Each sample contains the change in the relevant data since the previous sample. Data is organised in a chronological order, the oldest sample is transmitted first and the most recent sample is transmitted last. Invalid samples should be marked as 0xFFFFFF. + + + + Configure Mirror + FIXME: ConfigureMirror is sent to the mirror once the mirror has been created. The command deals with the operational configuration of the Mirror. + + Issuer Event ID + Unique identifier generated by the device being mirrored. When new information is provided that replaces older information, this field allows devices to determine which information is newer. It is recommended that the value contained in this field is a UTC based time stamp (UTCTime data type) identifying when the command was issued. Thus, newer information will have a value in the Issuer Event ID field that is larger than older information. + + + Reporting Interval + An unsigned 24-bit integer to denote the interval, in seconds, at which a mirrored meter intends to use the ReportAttribute command. + + + Mirror Notification Reporting + A Boolean used to advise a BOMD how the Notification flags should be acquired (see below). + When Mirror Notification Reporting is set, the MirrorReportAttributeResponse command is enabled. In that case, the Metering client on the mirror endpoint shall respond to the last or only ReportAttribute command with the MirrorReportAttributeResponse. + If Mirror Notification Reporting is set to FALSE, the MirrorReportAttributeResponse command shall not be enabled; the Metering server may poll the Notification flags by means of a normal ReadAttribute command. + + + Notification Scheme + This unsigned 8-bit integer allows for the pre-loading of the Notification Flags bit mapping to ZCL or Smart Energy Standard commands. + + + + Configure Notification Scheme + FIXME: The ConfigureNotificationScheme is sent to the mirror once the mirror has been created. The command deals with the operational configuration of the Mirror and the device that reports to the mirror. No default schemes are allowed to be overwritten. + + Issuer Event ID + Unique identifier generated by the device being mirrored. When new information is provided that replaces older information, this field allows devices to determine which information is newer. It is recommended that the value contained in this field is a UTC based time stamp (UTCTime data type) identifying when the command was issued. Thus, newer information will have a value in the Issuer Event ID field that is larger than older information. + + + Notification Scheme + An unsigned 8-bit integer that allows for the pre-loading of the Notification Flags bit mapping to ZCL or Smart Energy Standard commands. + + + Notification Flag Order + A 32-bit bitmap, consisting of 8 nibbles which define the Notification Flag attributes (and order) to be returned in a MirrorReportAttributeResponse command. + + + + Configure Notification Flags + The ConfigureNotificationFlags command is used to set the commands relating to the bit value for each NotificationFlags attribute that the scheme is proposing to use. + + Issuer Event ID + Unique identifier generated by the device being mirrored. When new information is provided that replaces older information, this field allows devices to determine which information is newer. It is recommended that the value contained in this field is a UTC based time stamp (UTCTime data type) identifying when the command was issued. Thus, newer information will have a value in the Issuer Event ID field that is larger than older information. + + + Notification Scheme + An unsigned 8-bit integer that allows for the pre-loading of the Notification Flags bit mapping to ZCL or Smart Energy Standard commands. + + + Notification Flag Attribute ID + An unsigned 16-bit integer that denotes the attribute id of the Notification flag (2-8) that will be configured for this Notification scheme. + + + Sub Payload + + + + Get Notified Message + The GetNotifiedMessage command is used only when a BOMD is being mirrored. This command provides a method for the BOMD to notify the Mirror message queue that it wants to receive commands that the Mirror has queued. The Notification flags set within the command shall inform the mirror of the commands that the BOMD is requesting. + + Notification Scheme + An unsigned 8-bit integer that allows for the pre-loading of the Notification Flags bit mapping to ZCL or Smart Energy Standard commands. + + + Notification Flag Attribute ID + An unsigned 16-bit integer that denotes the attribute id of the notification flag (1-8) that is included in this command. + + + Notification Flags N + The Notification Flags attribute/parameter indicating the command being requested. + + + + Supply Status Response + This command is transmitted by a Metering Device in response to a ChangeSupply command. + + Provider ID + An unsigned 32-bit field containing a unique identifier for the commodity provider to whom this command relates. + + + Issuer Event ID + Unique identifier generated by the commodity provider. When new information is provided that replaces older information for the same time period, this field allows devices to determine which information is newer. The value contained in this field is a unique number managed by upstream servers or a UTC based time stamp (UTCTime data type) identifying when the command was issued. Thus, newer information will have a value in the Issuer Event ID field that is larger than older information. + + + Implementation Date Time + A UTC Time field to indicate the date at which the originating command was to be applied. + + + Supply Status + An 8-bit enumeration field indicating the status of the energy supply controlled by the Metering Device following implementation of the originating command. + + + + Start Sampling Response + This command is transmitted by a Metering Device in response to a StartSampling command. + + Sample ID + 16 Bit Unsigned Integer indicating the ID allocated by the Metering Device for the requested Sampling session. If the Metering Device is unable to support a further Sampling session, Sample ID shall be returned as 0xFFFF. If valid, the Sample ID shall be used for all further communication regarding this Sampling session. + NOTE that the Metering Device may reserve a Sample ID of 0x0000 in order to provide an alternative mechanism for retrieving Profile data. This mechanism will allow an increased number of samples to be returned than is available via the existing (automatically started) Profile mechanism. + + + + + Functional Notification Flags + The FunctionalNotificationFlags attribute is implemented as a set of bit flags which are have a predefined action associated with a bit that is not based on a specific command, but may require the Mirrored device to trigger some additional functionality within the system. + + + Notification Flags {{count}} + NotificationFlags2 to NotificationFlags8 are 32-bit bitmaps that each represent a series of flags. Each flag represents an outstanding command that the Mirror is holding on behalf of the BOMD. Each flag represents a different command. The format of these attributes is dictated by the scheme that is currently in operation. + + + + Current Summation Delivered + CurrentSummationDelivered represents the most recent summed value of Energy, Gas, or Water delivered and consumed in the premises. CurrentSummationDelivered is mandatory and must be provided as part of the minimum data set to be provided by the metering device. CurrentSummationDelivered is updated continuously as new measurements are made. + + + Current Summation Received + CurrentSummationReceived represents the most recent summed value of Energy, Gas, or Water generated and delivered from the premises. If optionally provided, CurrentSummationReceived is updated continuously as new measurements are made. + + + Current Max Demand Delivered + CurrentMaxDemandDelivered represents the maximum demand or rate of delivered value of Energy, Gas, or Water being utilized at the premises. If optionally provided, CurrentMaxDemandDelivered is updated continuously as new measurements are made. + + + Current Max Demand Received + CurrentMaxDemandReceived represents the maximum demand or rate of received value of Energy, Gas, or Water being utilized by the utility. If optionally provided, CurrentMaxDemandReceived is updated continuously as new measurements are made. + + + Dft Summation + DFTSummation represents a snapshot of attribute CurrentSummationDelivered captured at the time indicated by attribute DailyFreezeTime. If optionally provided, DFTSummation is updated once every 24 hours. + + + Daily Freeze Time + DailyFreezeTime represents the time of day when DFTSummation is captured. DailyFreezeTime is an unsigned 16-bit value representing the hour and minutes for DFT. + Bits 0 to 7: Range of 0 to 0x3B representing the number of minutes past the top of the hour. + Bits 8 to 15: Range of 0 to 0x17 representing the hour of the day (in 24-hour format). Note that midnight shall be represented as 00:00 only. + + + Power Factor + PowerFactor contains the Average Power Factor ratio in 1/100ths. Valid values are 0 to 99. + + + Reading Snapshot Time + The ReadingSnapshotTime attribute represents the last time all of the CurrentSummationDelivered, CurrentSummationReceived, CurrentMaxDemandDelivered, and CurrentMaxDemandReceived attributes that are supported by the device were updated. + + + Current Max Demand Delivered Time + The CurrentMaxDemandDeliveredTime attribute represents the time when CurrentMaxDemandDelivered reading was captured. + + + Current Max Demand Received Time + The CurrentMaxDemandReceivedTime attribute represents the time when CurrentMaxDemandReceived reading was captured. + + + Default Update Period + The DefaultUpdatePeriod attribute represents the interval (seconds) at which the InstantaneousDemand attribute is updated when not in fast poll mode. InstantaneousDemand may be continuously updated as new measurements are acquired, but at a minimum InstantaneousDemand must be updated at the DefaultUpdatePeriod. The DefaultUpdatePeriod may apply to other attributes as defined by the device manufacturer. + + + Fast Poll Update Period + The FastPollUpdatePeriod attribute represents the interval (seconds) at which the InstantaneousDemandattribute is updated when in fast poll mode. InstantaneousDemand may be continuously updated as new measurements are acquired, but at a minimum, InstantaneousDemand must be updated at the FastPollUpdatePeriod. The FastPollUpdatePeriod may apply to other attributes as defined by the device manufacturer. + + + Current Block Period Consumption Delivered + The CurrentBlockPeriodConsumptionDelivered attribute represents the most recent summed value of Energy, Gas or Water delivered and consumed in the premises during the Block Tariff Period. + The CurrentBlockPeriodConsumptionDelivered is reset at the start of each Block Tariff Period. + + + Daily Consumption Target + The DailyConsumptionTarget attribute is a daily target consumption amount that can be displayed to the consumer on a HAN device, with the intent that it can be used to compare to actual daily consumption (e.g. compare to the CurrentDayConsumptionDelivered). + + + Current Block + When Block Tariffs are enabled, CurrentBlock is an 8-bit Enumeration which indicates the currently active block. If blocks are active then the current active block is based on the CurrentBlockPeriodConsumptionDelivered and the block thresholds. Block 1 is active when the value of CurrentBlockPeriodConsumptionDelivered is less than or equal to the Block1Threshold value, Block 2 is active when CurrentBlockPeriodConsumptionDelivered is greater than Block1Threshold value and less than or equal to the8 Block2Threshold value, and so on. Block 16 is active when the value of CurrentBlockPeriodConsumptionDelivered is greater than Block15Threshold value. + + + Profile Interval Period + The ProfileIntervalPeriod attribute is currently included in the Get Profile Response command payload, but does not appear in an attribute set. This represents the duration of each interval. ProfileIntervalPeriod represents the interval or time frame used to capture metered Energy, Gas, and Water consumption for profiling purposes. + + + Interval Read Reporting Period + + + Preset Reading Time + The PresetReadingTime attribute represents the time of day (in quarter hour increments) at which the meter will wake up and report a register reading even if there has been no consumption for the previous 24 hours. PresetReadingTime is an unsigned 16-bit value representing the hour and minutes. + + + Volume Per Report + The VolumePerReport attribute represents the volume per report increment from the water or gas meter. For example a gas meter might be set to report its register reading for every time 1 cubic meter of gas is used. For a water meter it might report the register value every 10 liters of water usage. + + + Flow Restriction + The FlowRestriction attribute represents the volume per minute limit set in the flow restrictor. This applies to water but not for gas. A setting of 0xFF indicates this feature is disabled. + + + Supply Status + The SupplyStatus attribute represents the state of the supply at the customer's premises. + + + Current Inlet Energy Carrier Summation + CurrentInletEnergyCarrierSummation is the current integrated volume of a given energy carrier measured on the inlet. The formatting and unit of measure for this value is specified in the EnergyCarrierUnitOfMeasure and EnergyCarrierSummationFormatting attributes + + + Current Outlet Energy Carrier Summation + CurrentOutletEnergyCarrierSummation is the current integrated volume of a given energy carrier measured on the outlet. The formatting and unit of measure for this value is specified in the EnergyCarrierUnitOfMeasure and EnergyCarrierSummationFormatting attributes. + + + Inlet Temperature + InletTemperature is the temperature measured on the energy carrier inlet. + + + Outlet Temperature + OutletTemperature is the temperature measured on the energy carrier outlet. + + + Control Temperature + ControlTemperature is a reference temperature measured on the meter used to validate the Inlet/Outlet temperatures. + + + Current Inlet Energy Carrier Demand + CurrentInletEnergyCarrierDemand is the current absolute demand on the energy carrier inlet. + + + Current Outlet Energy Carrier Demand + CurrentOutletEnergyCarrierDemand is the current absolute demand on the energy carrier outlet. + + + Previous Block Period Consumption Delivered + The PreviousBlockPeriodConsumptionDelivered attribute represents the total value of Energy, Gas or Water delivered and consumed in the premises at the end of the previous Block Tariff Period. If supported, the PreviousBlockPeriodConsumptionDelivered attribute is updated at the end of each Block Tariff Period. + + + Current Block Period Consumption Received + The CurrentBlockPeriodConsumptionReceived attribute represents the most recent summed value of Energy, Gas or Water received by the energy supplier from the premises during the Block Tariff Period. The CurrentBlockPeriodConsumptionReceived attribute is reset at the start of each Block Tariff Period. + + + Current Block Received + When Block Tariffs are enabled, CurrentBlockReceived is an 8-bit Enumeration which indicates the currently active block. If blocks are active then the current active block is based on the CurrentBlockPeriodConsumptionReceived and the block thresholds. Block 1 is active when the value of CurrentBlockPeriodConsumptionReceived is less than or equal to the Block1Threshold value, Block 2 is active when CurrentBlockPeriodConsumptionReceived is greater than Block1Threshold value and less than or equal to the Block2Threshold value, and so on. Block 16 is active when the value of CurrentBlockPeriodConsumptionReceived is greater than Block15Threshold value. + + + Dft Summation Received + DFTSummationReceived represents a snapshot of attribute CurrentSummationReceived captured at the time indicated by the DailyFreezeTime attribute. + + + Active Register Tier Delivered + The ActiveRegisterTierDelivered attribute indicates the current register tier that the energy consumed is being accumulated against. + + + Active Register Tier Received + The ActiveRegisterTierReceived attribute indicates the current register tier that the energy generated is being accumulated against. + + + Last Block Switch Time + This attribute allows other devices to determine the time at which a meter switches from one block to another. + When Block Tariffs are enabled, the LastBlockSwitchTime attribute represents the timestamp of the last update to the CurrentBlock attribute, as a result of the consumption exceeding a threshold, or the start of a new block period and/or billing period. + If, at the start of a new block period and/or billing period, the value of the CurrentBlock attribute is still set to Block1 (0x01), the CurrentBlock attribute value will not change but the LastBlockSwitchTime attribute shall be updated to indicate this change. + + + Current Tier {{count}} Summation Delivered + Attributes CurrentTier1SummationDelivered through CurrentTierNSummationDelivered represent the most recent summed value of Energy, Gas, or Water delivered to the premises (i.e. delivered to the customer from the utility) at a specific price tier as defined by a TOU schedule or a real time pricing period. If optionally provided, attributes CurrentTier1SummationDelivered through CurrentTierNSummationDelivered are updated continuously as new measurements are made. + + + Current Tier {{count}} Summation Received + + + + CPP 1 Summation Delivered + CPP1SummationDelivered represents the most recent summed value of Energy, Gas, or Water delivered to the premises (i.e. delivered to the customer from the utility) while Critical Peak Price ‘CPP1’ was being applied. If optionally provided, attribute CPP1SummationDelivered is updated continuously as new measurements are made. + + + CPP 2 Summation Delivered + CPP2SummationDelivered represents the most recent summed value of Energy, Gas, or Water delivered to the premises (i.e. delivered to the customer from the utility) while Critical Peak Price ‘CPP2’ was being applied. If optionally provided, attribute CPP2SummationDelivered is updated continuously as new measurements are made. + + + Status + The Status attribute provides indicators reflecting the current error conditions found by the metering device. This attribute is an 8-bit field where when an individual bit is set, an error or warning condition exists. The behavior causing the setting or resetting each bit is device specific. In other words, the application within the metering device will determine and control when these settings are either set or cleared. + + + Remaining Battery Life + RemainingBatteryLife represents the estimated remaining life of the battery in % of capacity. A setting of 0xFF indicates this feature is disabled. The range 0 - 100 where 100 = 100%, 0xFF = Unknown. + + + Hours In Operation + HoursInOperation is a counter that increments once every hour during operation. This may be used as a check for tampering. + + + Hours In Fault + HoursInFault is a counter that increments once every hour when the device is in operation with a fault detected. This may be used as a check for tampering. + + + Extended Status + The ExtendedStatus attribute reflects the state of items in a meter that the standard Status attribute cannot show. The Extended Status BitMap is split into two groups of flags: general flags and metering type specific flags. Flags are currently defined for electricity and gas meters; flag definitions for other commodities will be added as and when their usage is agreed. + These flags are set and reset by the meter autonomously; they cannot be reset by other devices. + + + Remaining Battery Life In Days + RemainingBatteryLifeInDays attribute represents the estimated remaining life of the battery in days of capacity. The range is 0 – 0xFFFE, where 0xFFFF represents 'Invalid', 'Unused' and 'Disabled'. + + + Current Meter ID + CurrentMeterID attribute is the current id for the Meter. This could be the current firmware version supported on the meter. + + + Ambient Consumption Indicator + The AmbientConsumptionIndicator attribute is an 8-bit enumeration which provides a simple (i.e. Low/Medium/High) indication of the amount of a commodity being consumed within the premises. The status is achieved by comparing the current value of the InstantaneousDemand attribute with low/medium and medium/high thresholds. + + + Unit Of Measure + UnitofMeasure provides a label for the Energy, Gas, or Water being measured by the metering device. The unit of measure applies to all summations, consumptions/ profile interval and demand/rate supported by this cluster other than those specifically identified as being based upon the EnergyCarrierUnitOfMeasure or the AlternativeUnitofMeasure. Other measurements such as the power factor are self describing. + + + Multiplier + Multiplier provides a value to be multiplied against a raw or uncompensated sensor count of Energy, Gas, or Water being measured by the metering device. If present, this attribute must be applied against all summation, consumption and demand values to derive the delivered and received values expressed in the unit of measure specified. This attribute must be used in conjunction with the Divisor attribute. + + + Divisor + Divisor provides a value to divide the results of applying the Multiplier Attribute against a raw or uncompensated sensor count of Energy, Gas, or Water being measured by the metering device. If present, this attribute must be applied against all summation, consumption and demand values to derive the delivered and received values expressed in the unit of measure specified. This attribute must be used in conjunction with the Multiplier attribute. + + + Summation Formatting + SummationFormatting provides a method to properly decipher the number of digits and the decimal location of the values found in the Summation Information Set of attributes. + + + Demand Formatting + DemandFormatting provides a method to properly decipher the number of digits and the decimal location of the values found in the Demand-related attributes. + + + Historical Consumption Formatting + HistoricalConsumptionFormatting provides a method to properly decipher the number of digits and the decimal location of the values found in the Historical Consumption Set of attributes. + + + Metering Device Type + MeteringDeviceType provides a label for identifying the type of metering device present. The attribute are values representing Energy, Gas, Water, Thermal, Heat, Cooling, and mirrored metering devices. + + + Site ID + The SiteID is a ZCL Octet String field capable of storing a 32 character string (the first Octet indicates length) encoded in UTF-8 format. The SiteID is a text string, known in the UK as the MPAN number for electricity, MPRN for gas and 'Stand Point' in South Africa. These numbers specify the meter point location in a standardized way. The field is defined to accommodate the number of characters typically found in the UK and Europe (16 digits). Generally speaking the field is numeric but is defined for the possibility of an alpha-numeric format by specifying an octet string. + + + Meter Serial Number + The MeterSerialNumber is a ZCL Octet String field capable of storing a 24 character string (the first Octet indicates length) encoded in UTF-8 format. It is used to provide a unique identification of the metering device. + + + Energy Carrier Unit Of Measure + The EnergyCarrierUnitOfMeasure specifies the unit of measure that the EnergyCarrier is measured in. This unit of measure is typically a unit of volume or flow and cannot be an amount of energy. + + + Energy Carrier Summation Formatting + EnergyCarrierSummationFormatting provides a method to properly decipher the number of digits and the decimal location of the values found in the Summation- related attributes. + + + Energy Carrier Demand Formatting + EnergyCarrierDemandFormatting provides a method to properly decipher the number of digits and the decimal location of the values found in the Demand-related attributes. + + + Temperature Unit Of Measure + TemperatureFormatting provides a method to properly decipher the number of digits and the decimal location of the values found in the Temperature-related attributes. + + + Temperature Formatting + The TemperatureUnitOfMeasure specifies the unit of measure that temperatures are measured in. + + + Module Serial Number + The ModuleSerialNumber attribute represents the serial number (unique identifier) of the meter module. It is a ZCL Octet String field capable of storing a 24 character string (the first Octet indicates length) encoded in UTF-8 format. It shall be used to uniquely identify the meter communications module. + + + Operating Tariff Label Delivered + The OperatingTariffLabelDelivered attribute is the meter’s version of the TariffLabel attribute that is found within the Tariff Information attribute set of the Price Cluster. It is used to identify the current consumption tariff operating on the meter. The attribute is a ZCL Octet String field capable of storing a 24 character string (the first Octet indicates length) encoded in UTF-8 format. + + + Operating Tariff Label Received + The OperatingTariffLabelReceived attribute is the meter’s version of the ReceivedTariffLabel attribute that is found within the Tariff Information attribute set of the Price Cluster. It is used to identify the current generation tariff operating on the meter. The attribute is a ZCL Octet String field capable of storing a 24 character string (the first Octet indicates length) encoded in UTF-8 format. + + + Customer ID Number + The CustomerIDNumber attribute provides a customer identification which may be used to confirm the customer at the premises. The attribute is a ZCL Octet String field capable of storing a 24 character string (not including the first Octet which indicates length) encoded in UTF-8 format. + + + Alternative Unit Of Measure + Unless stated otherwise, the AlternativeUnitofMeasure attribute provides a base for the attributes in the Alternative Historical Consumption attribute set. + + + Alternative Demand Formatting + AlternativeDemandFormatting provides a method to properly decipher the number of digits and the decimal location of the values found in the Alternative Demand-related attributes. + + + Alternative Consumption Formatting + + + Instantaneous Demand + InstantaneousDemand represents the current Demand of Energy, Gas, or Water delivered or received at the premises. Positive values indicate demand delivered to the premises where negative values indicate demand received from the premises. InstantaneousDemand is updated continuously as new measurements are made. The frequency of updates to this field is specific to the metering device, but should be within the range of once every second to once every 5 seconds. + + + Current Day Consumption Delivered + CurrentDayConsumptionDelivered represents the summed value of Energy, Gas, or Water delivered to the premises since the Historical Freeze Time (HFT). If optionally provided, CurrentDayConsumptionDelivered is updated continuously as new measurements are made. If the optional HFT attribute is not available, default to midnight local time. + + + Current Day Consumption Received + CurrentDayConsumptionReceived represents the summed value of Energy, Gas, or Water received from the premises since the Historical Freeze Time (HFT). If optionally provided, CurrentDayConsumptionReceived is updated continuously as new measurements are made. If the optional HFT attribute is not available, default to midnight local time. + + + Previous Day Consumption Delivered + PreviousDayConsumptionDelivered represents the summed value of Energy, Gas, or Water delivered to the premises within the previous 24 hour period starting at the Historical Freeze Time (HFT). If optionally provided, PreviousDayConsumptionDelivered is updated every HFT. If the optional HFT attribute is not available, default to midnight local time. + + + Previous Day Consumption Received + PreviousDayConsumptionReceived represents the summed value of Energy, Gas, or Water received from the premises within the previous 24 hour period starting at the Historical Freeze Time (HFT). If optionally provided, PreviousDayConsumptionReceived is updated every HFT. If the optional HFT attribute is not available, default to midnight local time. + + + Current Partial Profile Interval Start Time Delivered + CurrentPartialProfileIntervalStartTimeDelivered represents the start time of the current Load Profile interval being accumulated for commodity delivered. + + + Current Partial Profile Interval Start Time Received + CurrentPartialProfileIntervalStartTimeReceived represents the start time of the current Load Profile interval being accumulated for commodity received. + + + Current Partial Profile Interval Value Delivered + CurrentPartialProfileIntervalValueDelivered represents the value of the current Load Profile interval being accumulated for commodity delivered. + + + Current Partial Profile Interval Value Received + CurrentPartialProfileIntervalValueReceived represents the value of the current Load Profile interval being accumulated for commodity received. + + + Current Day Max Pressure + CurrentDayMaxPressure is the maximum pressure reported during a day from the water or gas meter. + + + Current Day Min Pressure + CurrentDayMinPressure is the minimum pressure reported during a day from the water or gas meter. + + + Previous Day Max Pressure + PreviousDayMaxPressure represents the maximum pressure reported during previous day from the water or gas meter. + + + Previous Day Min Pressure + PreviousDayMinPressure represents the minimum pressure reported during previous day from the water or gas meter. + + + Current Day Max Demand + CurrentDayMaxDemand represents the maximum demand or rate of delivered value of Energy, Gas, or Water being utilized at the premises. + + + Previous Day Max Demand + PreviousDayMaxDemand represents the maximum demand or rate of delivered value of Energy, Gas, or Water being utilized at the premises. + + + Current Month Max Demand + CurrentMonthMaxDemand is the maximum demand reported during a month from the meter. + + + Current Year Max Demand + CurrentYearMaxDemand is the maximum demand reported during a year from the meter. + + + Current Day Max Energy Carrier Demand + CurrentDayMaxEnergyCarrierDemand is the maximum energy carrier demand reported during a day from the meter. + + + Previous Day Max Energy Carrier Demand + PreviousDayMaxEnergyCarrierDemand is the maximum energy carrier demand reported during the previous day from the meter. + + + Current Month Max Energy Carrier Demand + CurrentMonthMaxEnergyCarrierDemand is the maximum energy carrier demand reported during a month from the meter. + + + Current Month Min Energy Carrier Demand + CurrentMonthMinEnergyCarrierDemand is the minimum energy carrier demand reported during a month from the meter. + + + Current Year Max Energy Carrier Demand + CurrentYearMaxEnergyCarrierDemand is the maximum energy carrier demand reported during a year from the meter. + + + Current Year Min Energy Carrier Demand + CurrentYearMinEnergyCarrierDemand is the minimum energy carrier demand reported during a year from the heat meter. + + + Previous Day {{count}} Consumption Delivered + PreviousDayNConsumptionDelivered represents the summed value of Energy, Gas, or Water delivered to the premises within the previous 24 hour period starting at the Historical Freeze Time (HFT). If the optional HFT attribute is not available, default to midnight local time. + + + Previous Day {{count}} Consumption Received + PreviousDayNConsumptionReceived represents the summed value of Energy, Gas, or Water received from the premises within the previous 24 hour period starting at the Historical Freeze Time (HFT). If the optional HFT attribute is not available, default to midnight local time. + + + Current Week Consumption Delivered + CurrentWeekConsumptionDelivered represents the summed value of Energy, Gas, or Water delivered to the premises since the Historical Freeze Time (HFT) on Monday to the last HFT read. If optionally provided, CurrentWeekConsumptionDelivered is updated continuously as new measurements are made. If the optional HFT attribute is not available, default to midnight local time. + + + Current Week Consumption Received + CurrentWeekConsumptionReceived represents the summed value of Energy, Gas, or Water received from the premises since the Historical Freeze Time (HFT) on Monday to the last HFT read. If optionally provided, CurrentWeekConsumptionReceived is updated continuously as new measurements are made. If the optional HFT attribute is not available, default to midnight local time. + + + Previous Week {{count}} Consumption Delivered + PreviousWeekNConsumptionDelivered represents the summed value of Energy, Gas, or Water delivered to the premises within the previous week period starting at the Historical Freeze Time (HFT) on the Monday to the Sunday. If the optional HFT attribute is not available, default to midnight local time. + + + Previous Week {{count}} Consumption Received + PreviousWeekNConsumptionReceived represents the summed value of Energy, Gas, or Water received from the premises within the previous week period starting at the Historical Freeze Time (HFT) on the Monday to the Sunday. If the optional HFT attribute is not available, default to midnight local time. + + + Current Month Consumption Delivered + CurrentMonthConsumptionDelivered represents the summed value of Energy, Gas, or Water delivered to the premises since the Historical Freeze Time (HFT) on the 1st of the month to the last HFT read. If optionally provided, CurrentMonthConsumptionDelivered is updated continuously as new measurements are made. If the optional HFT attribute is not available, default to midnight local time. + + + Current Month Consumption Received + CurrentMonthConsumptionReceived represents the summed value of Energy, Gas, or Water received from the premises since the Historical Freeze Time (HFT) on the 1st of the month to the last HFT read. If optionally provided, CurrentMonthConsumptionReceived is updated continuously as new measurements are made. If the optional HFT attribute is not available, default to midnight local time. + + + Previous Month {{count}} Consumption Delivered + PreviousMonthNConsumptionDelivered represents the summed value of Energy, Gas, or Water delivered to the premises within the previous Month period starting at the Historical Freeze Time (HFT) on the 1st of the month to the last day of the month. If the optional HFT attribute is not available, default to midnight local time. + + + Previous Month {{count}} Consumption Received + PreviousMonthNConsumptionReceived represents the summed value of Energy, Gas, or Water received from the premises within the previous month period starting at the Historical Freeze Time (HFT) on the 1st of the month to the last day of the month. If the optional HFT attribute is not available, default to midnight local time. + + + Historical Freeze Time + HistoricalFreezeTime (HFT) represents the time of day, in Local Time, when Historical Consumption attributes and/or Alternative Historical Consumption attributes are captured. HistoricalFreezeTime is an unsigned 16-bit value representing the hour and minutes for HFT. + + + Max Number Of Periods Delivered + MaxNumberofPeriodsDelivered represents the maximum number of intervals the device is capable of returning in one Get Profile Response command. It is required MaxNumberofPeriodsDelivered fit within the default Fragmentation ASDU size of 128 bytes, or an optionally agreed upon larger Fragmentation ASDU size supported by both devices. + + + Current Demand Delivered + CurrentDemandDelivered represents the current Demand of Energy, Gas, or Water delivered at the premises. CurrentDemandDelivered may be continuously updated as new measurements are acquired, but at a minimum CurrentDemandDelivered must be updated at the end of each integration sub- period, which can be obtained by dividing the DemandIntegrationPeriod by the NumberOfDemandSubintervals. + + + Demand Limit + DemandLimit reflects the current supply demand limit set in the meter. This value can be compared to the CurrentDemandDelivered attribute to understand if limits are being approached or exceeded. + + + Demand Integration Period + DemandIntegrationPeriod is the number of minutes over which the CurrentDemandDelivered attribute is calculated. Valid range is 0x01 to 0xFF. 0x00 is a reserved value. + + + Number Of Demand Subintervals + NumberOfDemandSubintervals represents the number of subintervals used within the DemandIntegrationPeriod. The subinterval duration (in minutes) is obtained by dividing the DemandIntegrationPeriod by the NumberOfDemandSubintervals. The CurrentDemandDelivered attribute is updated at the each of each subinterval. Valid range is 0x01 to 0xFF. 0x00 is a reserved value. + + + Demand Limit Arm Duration + An unsigned 16-bit integer that defines the length of time, in seconds, that the supply shall be disconnected if the DemandLimit attribute is enabled and the limit is exceeded. At the end of the time period the meter shall move to the ARMED status. This will allow the user to reconnect the supply. + + + Load Limit Supply State + The LoadLimitSupplyState attribute indicates the required status of the supply once device is in a load limit state. + + + Load Limit Counter + An unsigned 8-bit integer used for counting the number of times that the demand limit has exceeded the set threshold. + + + Supply Tamper State + The SupplyTamperState indicates the required status of the supply following the detection of a tamper event within the metering device. + + + Supply Depletion State + The SupplyDepletionState indicates the required status of the supply following detection of a depleted battery within the metering device. + + + Supply Uncontrolled Flow State + The SupplyUncontrolledFlowState indicates the required status of the supply following detection of an uncontrolled flow event within the metering device. + + + Current No Tier Block {{count}} Summation Delivered + + + Current Tier 1 Block {{count}} Summation Delivered + + + Current Tier 2 Block {{count}} Summation Delivered + + + Current Tier 3 Block {{count}} Summation Delivered + + + Current Tier 4 Block {{count}} Summation Delivered + + + Current Tier 5 Block {{count}} Summation Delivered + + + Current Tier 6 Block {{count}} Summation Delivered + + + Current Tier 7 Block {{count}} Summation Delivered + + + Current Tier 8 Block {{count}} Summation Delivered + + + Current Tier 9 Block {{count}} Summation Delivered + + + Current Tier 10 Block {{count}} Summation Delivered + + + Current Tier 11 Block {{count}} Summation Delivered + + + Current Tier 12 Block {{count}} Summation Delivered + + + Current Tier 13 Block {{count}} Summation Delivered + + + Current Tier 14 Block {{count}} Summation Delivered + + + Current Tier 15 Block {{count}} Summation Delivered + + + Generic Alarm Mask + + + Electricity Alarm Mask + + + Generic Flow /pressure Alarm Mask + + + Water Specific Alarm Mask + + + Heat And Cooling Specific Alarm Mask + + + Gas Specific Alarm Mask + + + Extended Generic Alarm Mask + + + Manufacture Alarm Mask + + + Current No Tier Block {{count}} Summation Received + + + Current Tier 1 Block {{count}} Summation Received + + + Current Tier 2 Block {{count}} Summation Received + + + Current Tier 3 Block {{count}} Summation Received + + + Current Tier 4 Block {{count}} Summation Received + + + Current Tier 5 Block {{count}} Summation Received + + + Current Tier 6 Block {{count}} Summation Received + + + Current Tier 7 Block {{count}} Summation Received + + + Current Tier 8 Block {{count}} Summation Received + + + Current Tier 9 Block {{count}} Summation Received + + + Current Tier 10 Block {{count}} Summation Received + + + Current Tier 11 Block {{count}} Summation Received + + + Current Tier 12 Block {{count}} Summation Received + + + Current Tier 13 Block {{count}} Summation Received + + + Current Tier 14 Block {{count}} Summation Received + + + Current Tier 15 Block {{count}} Summation Received + + + Bill To Date Delivered + BillToDateDelivered provides a value for the costs in the current billing period. This attribute is measured in a base unit of Currency with the decimal point located as indicated by the BillDeliveredTrailingDigit attribute. + + + Bill To Date Time Stamp Delivered + The UTC timestamp when the associated BillToDateDelivered attribute was last updated. + + + Projected Bill Delivered + ProjectedBillDelivered provides a value indicating what the estimated state of the account will be at the end of the billing period based on past consumption. This attribute is measured in a base unit of Currency with the decimal point located as indicated by the BillDeliveredTrailingDigit attribute. + + + Projected Bill Time Stamp Delivered + The UTC timestamp when the associated ProjectedBillDelivered attribute was last updated. + + + Bill Delivered Trailing Digit + An 8-bit BitMap used to determine where the decimal point is located in the BillToDateDelivered and ProjectedBillDelivered attributes. The most significant nibble indicates the number of digits to the right of the decimal point. The least significant nibble is reserved and shall be 0. The BillDeliveredTrailingDigit attribute represents the current active value. + + + Bill To Date Received + BillToDateReceived provides a value for the costs in the current billing period. This attribute is measured in a base unit of Currency with the decimal point located as indicated by the BillReceivedTrailingDigit attribute. + + + Bill To Date Time Stamp Received + The UTC timestamp when the associated BillToDateReceived attribute was last updated. + + + Projected Bill Received + ProjectedBillReceived provides a value indicating what the estimated state of the account will be at the end of the billing period based on past generation. This attribute is measured in a base unit of Currency with the decimal point located as indicated by the BillReceivedTrailingDigit attribute. + + + Projected Bill Time Stamp Received + The UTC timestamp when the associated ProjectedBillReceived attribute was last updated. + + + Bill Received Trailing Digit + An 8-bit BitMap used to determine where the decimal point is located in the BillToDateReceived and ProjectedBillReceived attributes. The most significant nibble indicates the number of digits to the right of the decimal point. The least significant nibble is reserved and shall be 0. The BillReceivedTrailingDigit attribute represents the current active value + + + Proposed Change Supply Implementation Time + The ProposedChangeImplementationTime attribute indicates the time at which a proposed change to the supply is to be implemented. If there is no change of supply pending, this attribute will be set to 0xFFFFFFFF. + + + Proposed Change Supply Status + The ProposedChangeSupplyStatus indicates the proposed status of the supply once the change to the supply has be been implemented. + + + Uncontrolled Flow Threshold + The Uncontrolled Flow Threshold attribute indicates the threshold above which a flow meter (e.g. Gas or Water) shall detect an uncontrolled flow. A value of 0x0000 indicates the feature in unused. + + + Uncontrolled Flow Threshold Unit Of Measure + The Uncontrolled Flow Threshold Unit of Measure attribute indicates the unit of measure used in conjunction with the Uncontrolled Flow Threshold attribute. + + + Uncontrolled Flow Threshold Multiplier + The Uncontrolled Flow Multiplier attribute indicates the multiplier, to be used in conjunction with the Uncontrolled Flow Threshold and Uncontrolled Flow Divisor attributes, to determine the true flow threshold value. A value of 0x0000 is not allowed. + + + Uncontrolled Flow Threshold Divisor + The Uncontrolled Flow Divisor attribute indicates the divisor, to be used in conjunction with the Uncontrolled Flow Threshold and Uncontrolled Flow Multiplier attributes, to determine the true flow threshold value. A value of 0x0000 is not allowed. + + + Flow Stabilization Period + The Flow Stabilisation Period attribute indicates the time given to allow the flow to stabilize. It is defined in units of tenths of a second. + + + Flow Measurement Period + The Flow Measurement Period attribute indicates the period over which the flow is measured and compared against the Uncontrolled Flow Threshold attribute. It is defined in units of 1 second. + + + Alternative Instantaneous Demand + AlternativeInstantaneousDemand represents the current Demand delivered or received at the premises. Positive values indicate demand delivered to the premises where negative values indicate demand received from the premises. AlternativeInstantaneousDemand is updated continuously as new measurements are made. The frequency of updates to this field is specific to the metering device, but should be within the range of once every second to once every 5 seconds. + + + Current Day Alternative Consumption Delivered + CurrentDayAlternativeConsumptionDelivered represents the summed value delivered to the premises since the Historical Freeze Time (HFT). If optionally provided, CurrentDayAlternativeConsumptionDelivered is updated continuously as new measurements are made. If the optional HFT attribute is not available, default to midnight local time. + + + Current Day Alternative Consumption Received + CurrentDayAlternativeConsumptionReceived represents the summed value received from the premises since the Historical Freeze Time (HFT). If optionally provided, CurrentDayAlternativeConsumptionReceived is updated continuously as new measurements are made. If the optional HFT attribute is not available, default to midnight local time. + + + Previous Day Alternative Consumption Delivered + PreviousDayAlternativeConsumptionDelivered represents the summed value delivered to the premises within the previous 24 hour period starting at the Alternative Historical Freeze Time (HFT). If optionally provided, PreviousDayAlternativeConsumptionDelivered is updated every HFT. If the optional HFT attribute is not available, default to midnight local time. + + + Previous Day Alternative Consumption Received + PreviousDayAlternativeConsumptionReceived represents the summed value received from the premises within the previous 24 hour period starting at the Historical Freeze Time (HFT). If optionally provided, PreviousDayAlternativeConsumptionReceived is updated every HFT. If the optional HFT attribute is not available, default to midnight local time. + + + Current Alternative Partial Profile Interval Start Time Delivered + CurrentAlternativePartialProfileIntervalStartTimeDelivered represents the start time of the current Load Profile interval being accumulated for commodity delivered. + + + Current Alternative Partial Profile Interval Start Time Received + CurrentAlternativePartialProfileIntervalStartTimeReceived represents the start time of the current Load Profile interval being accumulated for commodity received. + + + Current Alternative Partial Profile Interval Value Delivered + CurrentAlternativePartialProfileIntervalValueDelivered represents the value of the current Load Profile interval being accumulated for commodity delivered. + + + Current Alternative Partial Profile Interval Value Received + CurrentAlternativePartialProfileIntervalValueReceived represents the value of the current Load Profile interval being accumulated for commodity received. + + + Current Day Alternative Max Pressure + CurrentDayAlternativeMaxPressure is the maximum pressure reported during a day from the water or gas meter. + + + Current Day Alternative Min Pressure + CurrentDayAlternativeMinPressure is the minimum pressure reported during a day from the water or gas meter. + + + Previous Day Alternative Max Pressure + PreviousDayAlternativeMaxPressure represents the maximum pressure reported during previous day from the water or gas meter. + + + Previous Day Alternative Min Pressure + PreviousDayAlternativeMinPressure represents the minimum pressure reported during previous day from the water or gas meter. + + + Current Day Alternative Max Demand + CurrentDayAlternativeMaxDemand represents the maximum demand or rate of delivered value of Energy, Gas, or Water being utilized at the premises. + + + Previous Day Alternative Max Demand + PreviousDayAlternativeMaxDemand represents the maximum demand or rate of delivered value of Energy, Gas, or Water being utilized at the premises. + + + Current Month Alternative Max Demand + CurrentMonthAlternativeMaxDemand is the maximum demand reported during a month from the meter. + + + Current Year Alternative Max Demand + CurrentYearAlternativeMaxDemand is the maximum demand reported during a year from the meter. + + + Previous Day {{count}} Alternative Consumption Delivered + PreviousDayNAlternativeConsumptionDelivered represents the summed value delivered to the premises within the previous 24 hour period starting at the Historical Freeze Time (HFT). If the optional HFT attribute is not available, default to midnight local time. + + + Previous Day {{count}} Alternative Consumption Received + PreviousDayNAlternativeConsumptionReceived represents the summed value received from the premises within the previous 24 hour period starting at the Historical Freeze Time (HFT). If the optional HFT attribute is not available, default to midnight local time. + + + Current Week Alternative Consumption Delivered + CurrentWeekAlternativeConsumptionDelivered represents the summed value delivered to the premises since the Historical Freeze Time (HFT) on Monday to the last HFT read. If optionally provided, CurrentWeekAlternativeConsumptionDelivered is updated continuously as new measurements are made. If the optional HFT attribute is not available, default to midnight local time. + + + Current Week Alternative Consumption Received + CurrentWeekAlternativeConsumptionReceived represents the summed value received from the premises since the Historical Freeze Time (HFT) on Monday to the last HFT read. If optionally provided, CurrentWeekAlternativeConsumptionReceived is updated continuously as new measurements are made. If the optional HFT attribute is not available, default to midnight local time. + + + Previous Week {{count}} Alternative Consumption Delivered + PreviousWeekNAlternativeConsumptionDelivered represents the summed value delivered to the premises within the previous week period starting at the Historical Freeze Time (HFT) on the Monday to the Sunday. If the optional HFT attribute is not available, default to midnight local time. + + + Previous Week {{count}} Alternative Consumption Received + PreviousWeekNAlternativeConsumptionReceived represents the summed value received from the premises within the previous week period starting at the Historical Freeze Time (HFT) on the Monday to the Sunday. If the optional HFT attribute is not available, default to midnight local time. + + + Current Month Alternative Consumption Delivered + CurrentMonthAlternativeConsumptionDelivered represents the summed value delivered to the premises since the Historical Freeze Time (HFT) on the 1st of the month to the last HFT read. If optionally provided, CurrentMonthAlternativeConsumptionDelivered is updated continuously as new measurements are made. If the optional HFT attribute is not available, default to midnight local time. + + + Current Month Alternative Consumption Received + CurrentMonthAlternativeConsumptionReceived represents the summed value received from the premises since the Historical Freeze Time (HFT) on the 1st of the month to the last HFT read. If optionally provided, CurrentMonthAlternativeConsumptionReceived is updated continuously as new measurements are made. If the optional HFT attribute is not available, default to midnight local time. + + + Previous Month {{count}} Alternative Consumption Delivered + + + Previous Month {{count}} Alternative Consumption Received + + + + Get Profile Status + + + + + + + + + + + + + + + Interval Channel + + + + + + + Interval Period + + + + + + + + + + + + + + + + + + + Unit Of Measure + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Metering Supply Status + + + + + + + + + Proposed Supply Status + + + + + + + Sample Type + + + + + Snapshot Cause + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Snapshot Confirmation + + + + + + + Snapshot Payload Type + + + + + + + + + + + + + + + + + + + + + Supply Control Bits + + + + + Supply Status + + + + + + + + + + + + Snapshot Response Payload + + Snapshot Schedule ID + + + Snapshot Schedule Confirmation + + + + Snapshot Schedule Payload + + Snapshot Schedule ID + + + Snapshot Start Time + + + Snapshot Schedule + + + Snapshot Payload Type + + + Snapshot Cause + + + + + Cluster ID + An unsigned 16-bit integer that denotes the Cluster id of the Notification flag that will be configured for this Notification scheme. + + + Manufacturer Code + An unsigned 16-bit integer that denotes the Manufacturer Code to be used with these command IDs, that are configured for this Notification flag within this Notification scheme. + + + Number Of Commands + An unsigned 8-bit integer that indicates the number of command identifiers contained within this sub payload. + + + Command IDs + An unsigned 8-bit integer that denotes the command that is to be used. The command id should be used with the cluster id to reference the command(s). + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0703_Messaging.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0703_Messaging.xml new file mode 100644 index 000000000..8698b1e6f --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0703_Messaging.xml @@ -0,0 +1,153 @@ + + Messaging + This cluster provides an interface for passing text messages between ZigBee devices. Messages are expected to be delivered via the ESI and then unicast to all individually registered devices implementing the Messaging Cluster on the ZigBee network, or just made available to all devices for later pickup. Nested and overlapping messages are not allowed. The current active message will be replaced if a new message is received by the ESI. + + Display Message Command + + Message ID + A unique unsigned 32-bit number identifier for this message. It’s expected the value contained in this field is a unique number managed by upstream systems or a UTC based time stamp (UTCTime data type) identifying when the message was issued. + + + Message Control + An 8-bit BitMap field indicating control information related to the message. + + + Start Time + A UTCTime field to denote the time at which the message becomes valid. A Start Time of 0x00000000 is a special time denoting “now.” If the device would send an event with a Start Time of now, adjust the Duration In Minutes field to correspond to the remainder of the event. + + + Duration In Minutes + An unsigned 16-bit field is used to denote the amount of time in minutes after the Start Time during which the message is displayed. A Maximum value of 0xFFFF means “until changed”. + + + Message + A ZCL String containing the message to be delivered. The String shall be encoded in the UTF-8 format. Devices will have the ability to choose the methods for managing messages that are larger than can be displayed (truncation, scrolling, etc.). For supporting larger messages sent over the network, both devices must agree upon a common Fragmentation ASDU Maximum Incoming Transfer Size. Any message that needs truncation shall truncate on a UTF-8 character boundary. The SE secure payload is 59 bytes for the Message field in a non- fragmented, non-source routed Display Message packet (11 bytes for other Display Message fields). Devices using fragmentation can send a message larger than this. Reserving bytes for source route will reduce this. + + + Extended Message Control + An 8-bit BitMap field indicating additional control and status information for a given message. + + + + Cancel Message Command + The Cancel Message command provides the ability to cancel the sending or acceptance of previously sent messages. When this message is received the recipient device has the option of clearing any display or user interfaces it supports, or has the option of logging the message for future reference. + + Message ID + A unique unsigned 32-bit number identifier for the message being cancelled. It’s expected the value contained in this field is a unique number managed by upstream systems or a UTC based time stamp (UTCTime data type) identifying when the message was originally issued. + + + Message Control + This field is deprecated and should be set to 0x00. + + + + Display Protected Message Command + The Display Protected Message command is for use with messages that are protected by a password or PIN + + Message ID + A unique unsigned 32-bit number identifier for this message. It’s expected the value contained in this field is a unique number managed by upstream systems or a UTC based time stamp (UTCTime data type) identifying when the message was issued. + + + Message Control + An 8-bit BitMap field indicating control information related to the message. + + + Start Time + A UTCTime field to denote the time at which the message becomes valid. A Start Time of 0x00000000 is a special time denoting “now.” If the device would send an event with a Start Time of now, adjust the Duration In Minutes field to correspond to the remainder of the event. + + + Duration In Minutes + An unsigned 16-bit field is used to denote the amount of time in minutes after the Start Time during which the message is displayed. A Maximum value of 0xFFFF means “until changed”. + + + Message + A ZCL String containing the message to be delivered. The String shall be encoded in the UTF-8 format. Devices will have the ability to choose the methods for managing messages that are larger than can be displayed (truncation, scrolling, etc.). For supporting larger messages sent over the network, both devices must agree upon a common Fragmentation ASDU Maximum Incoming Transfer Size. Any message that needs truncation shall truncate on a UTF-8 character boundary. The SE secure payload is 59 bytes for the Message field in a non- fragmented, non-source routed Display Message packet (11 bytes for other Display Message fields). Devices using fragmentation can send a message larger than this. Reserving bytes for source route will reduce this. + + + Extended Message Control + An 8-bit BitMap field indicating additional control and status information for a given message. A UTC Time field to indicate the date/time at which all existing display messages should be cleared. + + + + Cancel All Messages Command + The Cancel All Messages command indicates to a CLIENT | device that it should cancel all display messages currently held by it. + + Implementation Time + + + + Get Last Message + On receipt of this command, the device shall send a Display Message or Display Protected Message command as appropriate. A ZCL Default Response with status NOT_FOUND shall be returned if no message is available. + + Message ID + + + Message Control + + + Start Time + + + Duration In Minutes + + + Message + + + Optional Extended Message Control + + + + Message Confirmation + The Message Confirmation command provides an indication that a Utility Customer has acknowledged and/or accepted the contents of a previously sent message. Enhanced Message Confirmation commands shall contain an answer of ‘NO’, ‘YES’ and/or a message confirmation string. + + Message ID + A unique unsigned 32-bit number identifier for the message being confirmed. + + + Confirmation Time + UTCTime of user confirmation of message. + + + Message Confirmation Control + An 8-bit BitMap field indicating the simple confirmation that is contained within the response. + + + Message Confirmation Response + A ZCL Octet String containing the message to be returned. The first Octet indicates length. The string shall be encoded in the UTF-8 format. If this optional field is not available, a default value of 0x00 shall be used. + + + + Get Message Cancellation + This command initiates the return of the first (and maybe only) Cancel All Messages command held on the associated server, and which has an implementation time equal to or later than the value indicated in the payload. + + Earliest Implementation Time + UTC Timestamp indicating the earliest implementation time of a Cancel All Messages command to be returned. + + + + Cancel All Messages + The CancelAllMessages command indicates to a client device that it should cancel all display messages currently held by it. + + Implementation Date Time + A UTC Time field to indicate the date/time at which all existing display messages should be cleared. + + + + Messaging Control Mask + + + + + + + + + + + Messaging Extended Control Mask + + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0704_SmartEnergyTunneling.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0704_SmartEnergyTunneling.xml new file mode 100644 index 000000000..3d5818035 --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0704_SmartEnergyTunneling.xml @@ -0,0 +1,227 @@ + + Smart Energy Tunneling + The tunneling cluster provides an interface for tunneling protocols. It is comprised of commands and attributes required to transport any existing metering communication protocol within the payload of standard ZigBee frames (including the handling of issues such as addressing, fragmentation and flow control). Examples for such protocols are DLMS/COSEM, IEC61107, ANSI C12, M-Bus, ClimateTalk etc. + The tunneling foresees the roles of a server and a CLIENT taking part in the data exchange. Their roles are defined as follows: + CLIENT: Requests a tunnel from the server and closes the tunnel if it is no longer needed. + Server: Provides and manages tunnels to the clients. + The data exchange through the tunnel is symmetric. This means both CLIENT and server provide the commands to transfer data (TransferData). And both must make sure that only the partner to which the tunnel has been built up is granted read/write access to it (e.g. tunnel identifier protection through checking the MAC address). + Sleepy devices either close the tunnel immediately after they have pushed their data through it, or leave it open in which case an attribute in the server (CloseTunnelTimeout) decides whether the tunnel is closed from the server side during the sleeping phase or not. It is recommended that battery-powered (sleepy) devices fulfil the role of the Tunneling cluster CLIENT (and therefore have control over when they request a tunnel from the server). + + Request Tunnel + RequestTunnel is the client command used to setup a tunnel association with the server. The request payload specifies the protocol identifier for the requested tunnel, a manufacturer code in case of proprietary protocols and the use of flow control for streaming protocols. + + Protocol ID + An enumeration representing the identifier of the metering communication protocol for which the tunnel is requested. + The values above 199 may be used for manufacturer specific protocols. + + + Manufacturer Code + A code that is allocated by the ZigBee Alliance, relating the manufacturer to a device and – for the tunneling - a manufacturer specific protocol. The parameter is ignored when the ProtocolID value is less than 200. This allows for 55 manufacturer-defined protocols for each manufacturer to be defined. A value of 0xFFFF indicates that the Manufacturer Code is not used. + + + Flow Control Support + A boolean type parameter that indicates whether flow control support is requested from the tunnel (TRUE) or not (FALSE). The default value is FALSE (no flow control). + + + Maximum Incoming Transfer Size + A value that defines the size, in octets, of the maximum data packet that can be transferred to the client in the payload of a single TransferData command. + + + + Close Tunnel + Client command used to close the tunnel with the server. The parameter in the payload specifies the tunnel identifier of the tunnel that has to be closed. The server leaves the tunnel open and the assigned resources allocated until the client sends the CloseTunnel command or the CloseTunnelTimeout fires. + + Tunnel ID + The identifier of the tunnel that shall be closed. It is the same number that has been previously returned in the response to a RequestTunnel command. Valid numbers range between 0..65535 and must correspond to a tunnel that is still active and maintained by the server. + + + + Transfer Data Client To Server + Command that indicates (if received) that the client has sent data to the server. The data itself is contained within the payload. + + Tunnel ID + A number between 0..65535 that uniquely identifies the tunnel that has been allocated in the server triggered through the RequestTunnel command. This ID must be used to send data through the tunnel or passed with any commands concerning that specific tunnel. + + + Data + Octet containing the data to be transferred through the tunnel in the format of the communication protocol for which the tunnel has been requested and opened. The payload contains the assembled data exactly as it was sent by the client. Theoretically, its length is solely limited through the fragmentation algorithm and the RX/TX transfer buffer sizes within the communication partners. The content of the payload is up to the application sending the data. It is neither guaranteed, that it contains a complete PDU nor is any other assumption on its internal format made. This is left up to the implementer of the specific protocol tunnel behavior. + + + + Transfer Data Error Client To Server + This command is generated by the receiver of a TransferData command if the tunnel status indicates that something is wrong. There are two three cases in which TransferDataError is sent: + The TransferData received contains a TunnelID that does not match to any of the active tunnels of the receiving device. This could happen if a (sleeping) device sends a TransferData command to a tunnel that has been closed by the server after the CloseTunnelTimeout. + The TransferData received contains a proper TunnelID of an active tunnel, but the device sending the data does not match to it. + The TransferData received contains more data than indicated by the MaximumIncomingTransferSize of the receiving device. + + Tunnel ID + A number between 0..65535 that uniquely identifies the tunnel that has been allocated in the server triggered through the RequestTunnel command. This ID must be used for the data transfer through the tunnel or passed with any commands concerning that specific tunnel. + + + Transfer Data Status + The TransferDataStatus parameter indicates the error that occurred within the receiver after the last TransferData command. + + + + Ack Transfer Data Client To Server + Command sent in response to each TransferData command in case - and only in case - flow control has been requested by the client in the TunnelRequest command and is supported by both tunnel endpoints. The response payload indicates the number of octets that may still be received by the receiver. + + Tunnel ID + A number between 0..65535 that uniquely identifies the tunnel that has been allocated in the server triggered through the RequestTunnel command. This ID must be used for the data transfer through the tunnel or passed with any commands concerning that specific tunnel. + + + Number Of Bytes Left + Indicates the number of bytes that may still be received by the initiator of this command (receiver). It is most likely the remaining size of the buffer holding the data that is sent over TransferData. As an example: A value of 150 indicates that the next TransferData command must not contain more than 150 bytes of payload or data will get lost. A value of 0 indicates that there is no more space left in the receiver and the sender should completely stop sending data. After the reception of a ReadyData command, the sender may continue its data transfer. + + + + Ready Data Client To Server + The ReadyData command is generated - after a receiver had to stop the dataflow using the AckTransferData(0) command - to indicate that the device is now ready to continue receiving data. The parameter NumberOfOctetsLeft gives a hint on how much space is left for the next data transfer. The ReadyData command is only issued if flow control is enabled. + + Tunnel ID + A number between 0..65535 that uniquely identifies the tunnel that has been allocated in the server triggered through the RequestTunnel command. This ID must be used for the data transfer through the tunnel or passed with any commands concerning that specific tunnel. + + + Number Of Octets Left + Indicates the number of octets that may be received by the initiator of this command (receiver). It is most likely the remaining size of the buffer holding the data that is sent over TransferData. As an example: A value of 150 indicates that the next TransferData command must not contain more than 150 bytes of payload or data will get lost. The value must be larger than 0. As for its exact value, it is up to the implementer of the cluster to decide what flow control algorithm shall be applied. + + + + Get Supported Tunnel Protocols + Get Supported Tunnel Protocols is the client command used to determine the Tunnel protocols supported on another device. + + Protocol Offset + Where there are more protocols supported than can be returned in a single Supported Tunnel Protocols Response command, this field allows an offset to be specified on subsequent Get Supported Tunnel Protocols commands. An offset of zero (0x00) should be used for an initial (or only) Get Supported Tunnel Protocols command (indicating that the returned list of protocols should commence with first available protocol). As a further example, if 10 protocols had previously been returned, the next Get Supported Tunnel Protocols command should use an offset of 10 (0x0A) to indicate the 11th available protocol should be the first returned in the next response. + + + + Request Tunnel Response + RequestTunnelResponse is sent by the server in response to a RequestTunnel command previously received from the client. The response contains the status of the RequestTunnel command and a tunnel identifier corresponding to the tunnel that has been set-up in the server in case of success. + + Tunnel ID + A number between 0..65535 that uniquely identifies the tunnel that has been allocated in the server triggered through the RequestTunnel command. This ID must now be used to send data through this tunnel (TunnelID, TransferData) and is also required to close the tunnel again (CloseTunnel). If the command has failed, the TunnelStatus contains the reason of the error and the TunnelID is set to 0xFFFF. + + + Tunnel Status + The TunnelStatus parameter indicates the server’s internal status after the execution of a RequestTunnel command. + + + Maximum Incoming Transfer Size + A value that defines the size, in octets, of the maximum data packet that can be transferred to the server in the payload of a single TransferData command. + + + + Transfer Data Server To Client + Command that transfers data from server to the client. The data itself has to be placed within the payload. + + Tunnel ID + A number between 0..65535 that uniquely identifies the tunnel that has been allocated in the server triggered through the RequestTunnel command. This ID must now be used to send data through this tunnel (TunnelID, TransferData) and is also required to close the tunnel again (CloseTunnel). If the command has failed, the TunnelStatus contains the reason of the error and the TunnelID is set to 0xFFFF. + + + Data + Octets containing the data to be transferred through the tunnel in the format of the communication protocol for which the tunnel has been requested and opened. The payload containing the assembled data exactly as it has been sent away by the client. Theoretically, its length is solely limited through the fragmentation algorithm and the RX/TX transfer buffer sizes within the communication partners. The content of the payload is up to the application sending the data. It is not guaranteed that it contains a complete PDU, nor is any assumption to be made on its internal format (which is left up to the implementer of the specific tunnel protocol). + + + + Transfer Data Error Server To Client + This command is generated by the receiver of a TransferData command if the tunnel status indicates that something is wrong. There are two three cases in which TransferDataError is sent: + The TransferData received contains a TunnelID that does not match to any of the active tunnels of the receiving device. This could happen if a (sleeping) device sends a TransferData command to a tunnel that has been closed by the server after the CloseTunnelTimeout. + The TransferData received contains a proper TunnelID of an active tunnel, but the device sending the data does not match to it. + The TransferData received contains more data than indicated by the MaximumIncomingTransferSize of the receiving device. + + Tunnel ID + A number between 0..65535 that uniquely identifies the tunnel that has been allocated in the server triggered through the RequestTunnel command. This ID must be used for the data transfer through the tunnel or passed with any commands concerning that specific tunnel. + + + Transfer Data Status + The TransferDataStatus parameter indicates the error that occurred within the receiver after the last TransferData command. + + + + Ack Transfer Data Server To Client + Command sent in response to each TransferData command in case - and only in case - flow control has been requested by the client in the TunnelRequest command and is supported by both tunnel endpoints. The response payload indicates the number of octets that may still be received by the receiver. + + Tunnel ID + A number between 0..65535 that uniquely identifies the tunnel that has been allocated in the server triggered through the RequestTunnel command. This ID must be used for the data transfer through the tunnel or passed with any commands concerning that specific tunnel. + + + Number Of Bytes Left + Indicates the number of bytes that may still be received by the initiator of this command (receiver). It is most likely the remaining size of the buffer holding the data that is sent over TransferData. As an example: A value of 150 indicates that the next TransferData command must not contain more than 150 bytes of payload or data will get lost. A value of 0 indicates that there is no more space left in the receiver and the sender should completely stop sending data. After the reception of a ReadyData command, the sender may continue its data transfer. + + + + Ready Data Server To Client + The ReadyData command is generated - after a receiver had to stop the dataflow using the AckTransferData(0) command - to indicate that the device is now ready to continue receiving data. The parameter NumberOfOctetsLeft gives a hint on how much space is left for the next data transfer. The ReadyData command is only issued if flow control is enabled. + + Tunnel ID + A number between 0..65535 that uniquely identifies the tunnel that has been allocated in the server triggered through the RequestTunnel command. This ID must be used for the data transfer through the tunnel or passed with any commands concerning that specific tunnel. + + + Number Of Octets Left + Indicates the number of octets that may be received by the initiator of this command (receiver). It is most likely the remaining size of the buffer holding the data that is sent over TransferData. As an example: A value of 150 indicates that the next TransferData command must not contain more than 150 bytes of payload or data will get lost. The value must be larger than 0. As for its exact value, it is up to the implementer of the cluster to decide what flow control algorithm shall be applied. + + + + Supported Tunnel Protocols Response + Supported Tunnel Protocol Response is sent in response to a Get Supported Tunnel Protocols command previously received. The response contains a list of Tunnel protocols supported by the device; the payload of the response should be capable of holding up to 16 protocols. + + Protocol List Complete + The Protocol List Complete field is a Boolean; a value of 0 indicates that there are more supported protocols available (if more than 16 protocols are supported). A value of 1 indicates that the list of supported protocols is complete. + + + Protocol Count + The number of Protocol fields contained in the response. + + + Protocol List + + + + Tunnel Closure Notification + TunnelClosureNotification is sent by the server to indicate that a tunnel has been closed due to expiration of a CloseTunnelTimeout. + The command is sent by a server when a tunnel is closed due to expiration of CloseTunnelTimeout. It is sent unicast to the client that had originally requested that tunnel. + + Tunnel ID + The identifier of the tunnel that has been closed. It is the same number that has been previously returned in the response to a RequestTunnel command. Valid numbers range between 0..65535 and must correspond to a tunnel that was still active and maintained by the server. + + + + + Close Tunnel Timeout + CloseTunnelTimeout defines the minimum number of seconds that the server waits on an inactive tunnel before closing it on its own and freeing its resources (without waiting for the CloseTunnel command from the client). Inactive means here that the timer is re-started with each new reception of a command.0x0000 is an invalid value. + + + + Transfer Data Status + + + + + + + + + Tunnel Status + + + + + + + + + + + + + + Protocol + + Manufacturer Code + + + Protocol ID + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0705_Prepayment.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0705_Prepayment.xml new file mode 100644 index 000000000..dd79c0668 --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0705_Prepayment.xml @@ -0,0 +1,980 @@ + + Prepayment + The Prepayment Cluster provides the facility to pass messages relating to the accounting functionality of a meter between devices on the HAN. It allows for the implementation of a system conforming to the set of standards relating to Payment Electricity Meters (IEC 62055) and also for the case where the accounting function is remote from the meter. Prepayment is used in situations where the supply of a service may be interrupted or enabled under the control of the meter or system in relation to a payment tariff. The accounting process may be within the meter or elsewhere in the system. The amount of available credit is decremented as the service is consumed and is incremented through payments made by the consumer. Such a system allows the consumer to better manage their energy consumption and reduces the risk of bad debt owing to the supplier. + In the case where the accounting process resides within the meter, credit updates are sent to the meter from the ESI. Such messages are out of scope of this cluster. The cluster allows credit status to be made available to other devices on the HAN for example to enable the consumers to view their status on an IHD. It also allows them to select emergency credit if running low and also, where local markets allow, restoring their supply remotely from within the HAN. + + Select Available Emergency Credit + FIXME: This command is sent to the Metering Device to activate the use of any Emergency Credit available on the Metering Device. + + Command Issue Date Time + + + Originating Device + + + Site ID + + + Meter Serial Number + + + + Change Debt + FIXME: The ChangeDebt command is send to the Metering Device to change the fuel or Non fuel debt values. + + Issuer Event ID + + + Debt Label + + + Debt Amount + + + Debt Recovery Method + + + Debt Amount Type + + + Debt Recovery Start Time + + + Debt Recovery Collection Time + + + Debt Recovery Frequency + + + Debt Recovery Amount + + + Debt Recovery Balance Percentage + + + + Emergency Credit Setup + FIXME: This command is a method to set up the parameters for the emergency credit. + + Issuer Event ID + + + Start Time + + + Emergency Credit Limit + + + Emergency Credit Threshold + + + + Consumer Top Up + FIXME: The ConsumerTopUp command is used by the IPD and the ESI as a method of applying credit top up values to the prepayment meter. + + Originating Device + + + Top Up Code + + + + Credit Adjustment + FIXME: The CreditAdjustment command is sent to update the accounting base for the Prepayment meter. + + Issuer Event ID + + + Start Time + + + Credit Adjustment Type + + + Credit Adjustment Value + + + + Change Payment Mode + FIXME: This command is sent to a Metering Device to instruct it to change its mode of operation. i.e. from Credit to Prepayment. + + Provider ID + + + Issuer Event ID + + + Implementation Date Time + + + Proposed Payment Control Configuration + + + Cut Off Value + + + + Get Prepay Snapshot + FIXME: This command is used to request the cluster server for snapshot data. + + Earliest Start Time + + + Latest End Time + + + Snapshot Offset + + + Snapshot Cause + + + + Get Top Up Log + FIXME: This command is sent to the Metering Device to retrieve the log of Top Up codes received by the meter. + + Latest End Time + + + Number Of Records + + + + Set Low Credit Warning Level + FIXME: This command is sent from client to a Prepayment server to set the warning level for low credit. + + Low Credit Warning Level + + + + Get Debt Repayment Log + FIXME: This command is used to request the contents of the repayment log. + + Latest End Time + + + Number Of Debts + + + Debt Type + + + + Set Maximum Credit Limit + FIXME: This command is sent from a client to the Prepayment server to set the maximum credit level allowed in the meter. + + Provider ID + + + Issuer Event ID + + + Implementation Date Time + + + Maximum Credit Level + + + Maximum Credit Per Top Up + + + + Set Overall Debt Cap + FIXME: This command is sent from a client to the Prepayment server to set the overall debt cap allowed in the meter. + + Provider ID + + + Issuer Event ID + + + Implementation Date Time + + + Overall Debt Cap + + + + Publish Prepay Snapshot + FIXME: This command is generated in response to a GetPrepaySnapshot command. It is used to return a single snapshot to the client. + + Snapshot ID + + + Snapshot Time + + + Total Snapshots Found + + + Command Index + + + Total Number Of Commands + + + Snapshot Cause + + + Snapshot Payload Type + + + Snapshot Payload + + + + Change Payment Mode Response + FIXME: This command is send in response to the ChangePaymentMode Command. + + Friendly Credit + + + Friendly Credit Calendar ID + + + Emergency Credit Limit + + + Emergency Credit Threshold + + + + Consumer Top Up Response + FIXME: This command is send in response to the ConsumerTopUp Command. + + Result Type + + + Top Up Value + + + Source Of Top Up + + + Credit Remaining + + + + Publish Top Up Log + FIXME: This command is used to send the Top Up Code Log entries to the client. + + Command Index + + + Total Number Of Commands + + + Top Up Payload + + + + Publish Debt Log + FIXME: This command is used to send the contents of the Repayment Log. + + Command Index + + + Total Number Of Commands + + + Debt Payload + + + + Payment Control Configuration + ADDME + + + Credit Remaining + ADDME + + + Emergency Credit Remaining + ADDME + + + Credit Status + ADDME + + + Credit Remaining Timestamp + ADDME + + + Accumulated Debt + ADDME + + + Overall Debt Cap + ADDME + + + Emergency Credit Limit Allowance + ADDME + + + Emergency Credit Threshold + ADDME + + + Total Credit Added + ADDME + + + Max Credit Limit + ADDME + + + Max Credit Per Top Up + ADDME + + + Friendly Credit Warning + ADDME + + + Low Credit Warning Level + ADDME + + + Ihd Low Credit Warning Level + ADDME + + + Interrupt Suspend Time + ADDME + + + Remaining Friendly Credit Time + ADDME + + + Next Friendly Credit Period + ADDME + + + Cut Off Value + ADDME + + + Token Carrier ID + ADDME + + + Top Up Date / time #1 + ADDME + + + Top Up Amount #1 + ADDME + + + Top Up Originating Device #1 + ADDME + + + Top Up Code #1 + ADDME + + + Top Up Date /time #2 + ADDME + + + Top Up Amount #2 + ADDME + + + Top Up Originating Device #2 + ADDME + + + Top Up Code #2 + ADDME + + + Top Up Date /time #3 + ADDME + + + Top Up Amount #3 + ADDME + + + Top Up Originating Device #3 + ADDME + + + Top Up Code #3 + ADDME + + + Top Up Date /time #4 + ADDME + + + Top Up Amount #4 + ADDME + + + Top Up Originating Device #4 + ADDME + + + Top Up Code #4 + ADDME + + + Top Up Date /time #5 + ADDME + + + Top Up Amount #5 + ADDME + + + Top Up Originating Device #5 + ADDME + + + Top Up Code #5 + ADDME + + + Debt Label 1 + ADDME + + + Debt Amount 1 + ADDME + + + Debt Recovery Method 1 + ADDME + + + Debt Recovery Start Time 1 + ADDME + + + Debt Recovery Collection Time 1 + ADDME + + + Debt Recovery Frequency 1 + ADDME + + + Debt Recovery Amount 1 + ADDME + + + Debt Recovery Top Up Percentage 1 + ADDME + + + Debt Label 2 + ADDME + + + Debt Amount 2 + ADDME + + + Debt Recovery Method 2 + ADDME + + + Debt Recovery Start Time 2 + ADDME + + + Debt Recovery Collection Time 2 + ADDME + + + Debt Recovery Frequency 2 + ADDME + + + Debt Recovery Amount 2 + ADDME + + + Debt Recovery Top Up Percentage 2 + ADDME + + + Debt Label 3 + ADDME + + + Debt Amount 3 + ADDME + + + Debt Recovery Method 3 + ADDME + + + Debt Recovery Start Time 3 + ADDME + + + Debt Recovery Collection Time 3 + ADDME + + + Debt Recovery Frequency 3 + ADDME + + + Debt Recovery Amount 3 + ADDME + + + Debt Recovery Top Up Percentage 3 + ADDME + + + Prepayment Alarm Status + ADDME + + + Prepay Generic Alarm Mask + ADDME + + + Prepay Switch Alarm Mask + ADDME + + + Prepay Event Alarm Mask + ADDME + + + Historical Cost Consumption Formatting + ADDME + + + Consumption Unit Of Measurement + ADDME + + + Currency Scaling Factor + ADDME + + + Currency + ADDME + + + Current Day Cost Consumption Delivered + ADDME + + + Current Day Cost Consumption Received + ADDME + + + Previous Day Cost Consumption Delivered + ADDME + + + Previous Day Cost Consumption Received + ADDME + + + Previous Day 2 Cost Consumption Delivered + ADDME + + + Previous Day 2 Cost Consumption Received + ADDME + + + Previous Day 3 Cost Consumption Delivered + ADDME + + + Previous Day 3 Cost Consumption Received + ADDME + + + Previous Day 4 Cost Consumption Delivered + ADDME + + + Previous Day 4 Cost Consumption Received + ADDME + + + Previous Day 5 Cost Consumption Delivered + ADDME + + + Previous Day 5 Cost Consumption Received + ADDME + + + Previous Day 6 Cost Consumption Delivered + ADDME + + + Previous Day 6 Cost Consumption Received + ADDME + + + Previous Day 7 Cost Consumption Delivered + ADDME + + + Previous Day 7 Cost Consumption Received + ADDME + + + Previous Day 8 Cost Consumption Delivered + ADDME + + + Previous Day 8 Cost Consumption Received + ADDME + + + Current Week Cost Consumption Delivered + ADDME + + + Current Week Cost Consumption Received + ADDME + + + Previous Week Cost Consumption Delivered + ADDME + + + Previous Week Cost Consumption Received + ADDME + + + Previous Week 2 Cost Consumption Delivered + ADDME + + + Previous Week 2 Cost Consumption Received + ADDME + + + Previous Week 3 Cost Consumption Delivered + ADDME + + + Previous Week 3 Cost Consumption Received + ADDME + + + Previous Week 4 Cost Consumption Delivered + ADDME + + + Previous Week 4 Cost Consumption Received + ADDME + + + Previous Week 5 Cost Consumption Delivered + ADDME + + + Previous Week 5 Cost Consumption Received + ADDME + + + Current Month Cost Consumption Delivered + ADDME + + + Current Month Cost Consumption Received + ADDME + + + Previous Month Cost Consumption Delivered + ADDME + + + Previous Month Cost Consumption Received + ADDME + + + Previous Month 2 Cost Consumption Delivered + ADDME + + + Previous Month 2 Cost Consumption Received + ADDME + + + Previous Month 3 Cost Consumption Delivered + ADDME + + + Previous Month 3 Cost Consumption Received + ADDME + + + Previous Month 4 Cost Consumption Delivered + ADDME + + + Previous Month 4 Cost Consumption Received + ADDME + + + Previous Month 5 Cost Consumption Delivered + ADDME + + + Previous Month 5 Cost Consumption Received + ADDME + + + Previous Month 6 Cost Consumption Delivered + ADDME + + + Previous Month 6 Cost Consumption Received + ADDME + + + Previous Month 7 Cost Consumption Delivered + ADDME + + + Previous Month 7 Cost Consumption Received + ADDME + + + Previous Month 8 Cost Consumption Delivered + ADDME + + + Previous Month 8 Cost Consumption Received + ADDME + + + Previous Month 9 Cost Consumption Delivered + ADDME + + + Previous Month 9 Cost Consumption Received + ADDME + + + Previous Month 10 Cost Consumption Delivered + ADDME + + + Previous Month 10 Cost Consumption Received + ADDME + + + Previous Month 11 Cost Consumption Delivered + ADDME + + + Previous Month 11 Cost Consumption Received + ADDME + + + Previous Month 12 Cost Consumption Delivered + ADDME + + + Previous Month 12 Cost Consumption Received + ADDME + + + Previous Month 13 Cost Consumption Delivered + ADDME + + + Previous Month 13 Cost Consumption Received + ADDME + + + Historical Freeze Time + ADDME + + + + Credit Adjustment Type + + + + + + + Debt Amount Type + + + + + + + + + + + + + + + Debt Recovery Frequency + + + + + + + + + + + + + Debt Recovery Method + + + + + + + + + Friendly Credit + + + + + Originating Device + + + + + + + + + Payment Control Configuration + + + + + + + + + + + + + + + + + + + + + + + Prepay Snapshot Payload Cause + + + + + + + + + + + + + + + + + + + + + Prepay Snapshot Payload Type + + + + + + + Repayment Debt Type + + + + + + + + + + + Result Type + + + + + + + + + + + + + + + + + + + + + + + + Debt Payload + + Collection Time + + + Amount Collected + + + Debt Type + + + Outstanding Debt + + + + Top Up Payload + + Top Up Code + + + Top Up Amount + + + Top Up Time + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0800_KeyEstablishment.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0800_KeyEstablishment.xml new file mode 100644 index 000000000..b56472a29 --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0800_KeyEstablishment.xml @@ -0,0 +1,134 @@ + + Key Establishment + This cluster provides attributes and commands to perform mutual authentication and establish keys between two ZigBee devices. + All Key Establishment messages should be sent with APS retries enabled. A failure to receive an ACK in a timely manner can be seen as a failure of key establishment. No Terminate Key Establishment should be sent to the partner of device that has timed out the operation. + The initiator can initiate the key establishment with any active endpoint on the responder device that supports the key establishment cluster. The endpoint can be either preconfigured or discovered, for example, by using ZDO Match_Desc_req. A link key successfully established using key establishment is valid for all endpoints on a particular device. The responder shall respond to the initiator using the source endpoint of the initiator's messages as the destination endpoint of the responder's messages. + It is expected that the time it takes to perform the various cryptographic computations of the key establishment cluster may vary greatly based on the device. Therefore rather than set static timeouts, the Initiate Key Establishment Request and Response messages will contain approximate values for how long the device will take to generate the ephemeral data and how long the device will take to generate confirm key message. A device performing key establishment can use this information in order to choose a reasonable timeout for its partner during those operations. The timeout should also take into consideration the time it takes for a message to traverse the network including APS retries. A minimum transmission time of 2 seconds is recommended. + For the Initiate Key Establishment Response message, it is recommended the initiator wait at least 2 seconds before timing out the operation. It is not expected that generating an Initiate Key Establishment Response will take significant time compared to generating the Ephemeral Data and Confirm Key messages. + + Initiate Key Establishment Request Command + The Initiate Key Establishment Request command allows a device to initiate key establishment with another device. The sender will transmit its identity information and key establishment protocol information to the receiving device. + If the device does not currently have the resources to respond to a key establishment request it shall send a Terminate Key Establishment command with the result value set to NO_RESOURCES and the Wait Time field shall be set to an approximation of the time that must pass before the device will have the resources to process a new Key Establishment Request. + If the device can process this request, it shall check the Issuer field of the device's implicit certificate. If the Issuer field does not contain a value that corresponds to a known Certificate Authority, the device shall send a Terminate Key Establishment command with the result set to UNKNOWN_ISSUER. + If the device accepts the request it shall send an Initiate Key Establishment Response command containing its own identity information. The device should verify the certificate belongs to the address that the device is communicating with. The binding between the identity of the communicating device and its address is verifiable using out-of-band method. + + Key Establishment Suite + This will be the type of Key Establishment that the initiator is requesting for the Key Establishment Cluster. For CBKE-ECMQV this will be 0x0001. + + + Ephemeral Data Generate Time + This value indicates approximately how long the initiator device will take in seconds to generate the Ephemeral Data Request command. The valid range is 0x00 to 0xFE. + + + Confirm Key Generate Time + This value indicates approximately how long the initiator device will take in seconds to generate the Confirm Key Request command. The valid range is 0x00 to 0xFE. + + + Identity + For KeyEstablishmentSuite = 0x0001 (CBKE), the identity field shall be the block of octets containing the implicit certificate CERTU. + + + + Ephemeral Data Request Command + The Ephemeral Data Request command allows a device to communicate its ephemeral data to another device and request that the device send back its own ephemeral data. + + Ephemeral Data + + + + Confirm Key Data Request Command + The Confirm Key Request command allows the initiator sending device to confirm the key established with the responder receiving device based on performing a cryptographic hash using part of the generated keying material and the identities and ephemeral data of both parties. + + Secure Message Authentication Code + + + + Initiate Key Establishment Response + The Initiate Key Establishment Response command allows a device to respond to a device requesting the initiation of key establishment with it. The sender will transmit its identity information and key establishment protocol information to the receiving device. + + Requested Key Establishment Suite + This will be the type of KeyEstablishmentSuite that the initiator has requested be used for the key establishment exchange. The device shall set a single bit in the bitmask indicating the requested suite, all other bits shall be set to zero. + + + Ephemeral Data Generate Time + This value indicates approximately how long in seconds the responder device takes to generate the Ephemeral Data Response message. The valid range is 0x00 to 0xFE. + + + Confirm Key Generate Time + This value indicates approximately how long the responder device will take in seconds to generate the Confirm Key Response message. The valid range is 0x00 to 0xFE. + + + Identity + For KeyEstablishmentSuite = 0x0001 (CBKE), the identity field shall be the block of Octets containing the implicit certificate CERTU . + + + + Ephemeral Data Response + The Ephemeral Data Response command allows a device to communicate its ephemeral data to another device that previously requested it. + + Ephemeral Data + + + + Confirm Key Response + The Confirm Key Response command allows the responder to verify the initiator has derived the same secret key. This is done by sending the initiator a cryptographic hash generated using the keying material and the identities and ephemeral data of both parties. + + Secure Message Authentication Code + + + + Terminate Key Establishment + The Terminate Key Establishment command may be sent by either the initiator or responder to indicate a failure in the key establishment exchange. + + Status Code + + + Wait Time + This value indicates the minimum amount of time in seconds the initiator device should wait before trying to initiate key establishment again. The valid range is 0x00 to 0xFE. + + + Key Establishment Suite + This value will be set the value of the KeyEstablishmentSuite attribute. It indicates the list of key exchange methods that the device supports. + + + + + Client Key Establishment Suite + The KeyEstablishmentSuite attribute is 16-bits in length and specifies all the cryptographic schemes for key establishment on the device. A device shall set the corresponding bit to 1 for every cryptographic scheme that is supports. All other cryptographic schemes and reserved bits shall be set to 0. + + + Server Key Establishment Suite + The KeyEstablishmentSuite attribute is 16-bits in length and specifies all the cryptographic schemes for key establishment on the device. A device shall set the corresponding bit to 1 for every cryptographic scheme that is supports. All other cryptographic schemes and reserved bits shall be set to 0. + + + + Key Establishment Status + + The Issuer field within the key establishment partner's certificate is unknown to the sending device, and it has terminated the key establishment. + + + The device could not confirm that it shares the same key with the corresponding device and has terminated the key establishment. + + + The device received a bad message from the corresponding device (e.g. message with bad data, an out of sequence number, or a message with a bad format) and has terminated the key establishment. + + + The device does not currently have the internal resources necessary to perform key establishment and has terminated the exchange. + + + The device does not support the specified key establishment suite in the partner's Initiate Key Establishment message. + + + The received certificate specifies a type, curve, hash, or other parameter that is either unsupported by the device or invalid. + + + + + Key Establishment Suite + + + + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0B04_ElectricalMeasurement.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0B04_ElectricalMeasurement.xml new file mode 100644 index 000000000..58ce464f0 --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0B04_ElectricalMeasurement.xml @@ -0,0 +1,479 @@ + + Electrical Measurement + This cluster provides a mechanism for querying data about the electrical properties as measured by the device. This cluster may be implemented on any device type and be implemented on a per-endpoint basis. For example, a power strip device could represent each outlet on a different endpoint and report electrical information for each individual outlet. The only caveat is that if you implement an attribute that has an associated multiplier and divisor, then you must implement the associated multiplier and divisor attributes. For example if you implement DCVoltage, you must also implement DCVoltageMultiplier and DCVoltageDivisor. + If you are interested in reading information about the power supply or battery level on the device, please see the Power Configuration cluster. + + Get Profile Info Command + Retrieves the power profiling information from the electrical measurement server. + + + Get Measurement Profile Command + Retrieves an electricity measurement profile from the electricity measurement server for a specific attribute Id requested. + + Attribute ID + + + Start Time + + + Number Of Intervals + + + + Get Profile Info Response Command + Returns the power profiling information requested in the GetProfileInfo command. The power profiling information consists of a list of attributes which are profiled along with the period used to profile them. + + Profile Count + + + Profile Interval Period + + + Max Number Of Intervals + + + List Of Attributes + + + + Get Measurement Profile Response Command + Returns the electricity measurement profile. The electricity measurement profile includes information regarding the amount of time used to capture data related to the flow of electricity as well as the intervals thes + + Start Time + + + Status + + + Profile Interval Period + + + Number Of Intervals Delivered + + + Attribute ID + + + Intervals + + + + Measurement Type + This attribute indicates a device’s measurement capabilities. This will be indicated by setting the desire measurement bits to 1. + + + DC Voltage + + + DC Voltage Min + + + DC Voltage Max + + + DC Current + + + DC Current Min + + + DC Current Max + + + DC Power + + + DC Power Min + + + DC Power Max + + + DC Voltage Multiplier + + + DC Voltage Divisor + + + DC Current Multiplier + + + DC Current Divisor + + + DC Power Multiplier + + + DC Power Divisor + + + AC Frequency + The ACFrequency attribute represents the most recent AC Frequency reading in Hertz (Hz). If the frequency cannot be measured, a value of 0xFFFF is returned. + + + AC Frequency Min + + + AC Frequency Max + + + Neutral Current + + + Total Active Power + Active power represents the current demand of active power delivered or received at the premises, in kW. Positive values indicate power delivered to the premises where negative values indicate power received from the premises. In case if device is capable of measuring multi elements or phases then this will be net active power value. + + + Total Reactive Power + Reactive power represents the current demand of reactive power delivered or received at the premises, in kVAr. Positive values indicate power delivered to the premises where negative values indicate power received from the premises. In case if device is capable of measuring multi elements or phases then this will be net reactive power value. + + + Total Apparent Power + Represents the current demand of apparent power, in kVA. In case if device is capable of measuring multi elements or phases then this will be net apparent power value. + + + Measured 1st Harmonic Current + + + Measured 3rd Harmonic Current + + + Measured 5th Harmonic Current + + + Measured 7th Harmonic Current + + + Measured 9th Harmonic Current + + + Measured 11th Harmonic Current + + + Measured Phase 1st Harmonic Current + + + Measured Phase 3rd Harmonic Current + + + Measured Phase 5th Harmonic Current + + + Measured Phase 7th Harmonic Current + + + Measured Phase 9th Harmonic Current + + + Measured Phase 11th Harmonic Current + + + AC Frequency Multiplier + + + AC Frequency Divisor + + + Power Multiplier + + + Power Divisor + + + Harmonic Current Multiplier + + + Phase Harmonic Current Multiplier + + + Instantaneous Voltage + + + Instantaneous Line Current + + + Instantaneous Active Current + + + Instantaneous Reactive Current + + + Instantaneous Power + + + RMS Voltage + Represents the most recent RMS voltage reading in Volts (V). If the RMS voltage cannot be measured, a value of 0xFFFF is returned. + + + RMS Voltage Min + + + RMS Voltage Max + + + RMS Current + Represents the most recent RMS current reading in Amps (A). If the power cannot be measured, a value of 0xFFFF is returned. + + + RMS Current Min + + + RMS Current Max + + + Active Power + Represents the single phase or Phase A, current demand of active power delivered or received at the premises, in Watts (W). Positive values indicate power delivered to the premises where negative values indicate power received from the premises. + + + Active Power Min + + + Active Power Max + + + Reactive Power + + + Apparent Power + + + Power Factor + + + Average RMS Voltage Measurement Period + + + Average RMS Under Voltage Counter + + + RMS Extreme Over Voltage Period + + + RMS Extreme Under Voltage Period + + + RMS Voltage Sag Period + + + RMS Voltage Swell Period + + + AC Voltage Multiplier + + + AC Voltage Divisor + + + AC Current Multiplier + Provides a value to be multiplied against the InstantaneousCurrent and RMSCurrentattributes. his attribute must be used in conjunction with the ACCurrentDivisorattribute. 0x0000 is an invalid value for this attribute. + + + AC Current Divisor + Provides a value to be divided against the ACCurrent, InstantaneousCurrent and RMSCurrentattributes. This attribute must be used in conjunction with the ACCurrentMultiplierattribute 0x0000 is an invalid value for this attribute. + + + AC Power Multiplier + Provides a value to be multiplied against the InstantaneousPower and ActivePowerattributes. This attribute must be used in conjunction with the ACPowerDivisorattribute. 0x0000 is an invalid value for this attribute + + + AC Power Divisor + Provides a value to be divided against the InstantaneousPower and ActivePowerattributes. This attribute must be used in conjunction with the ACPowerMultiplierattribute. 0x0000 is an invalid value for this attribute. + + + Overload Alarms Mask + + + Voltage Overload + + + Current Overload + + + AC Overload Alarms Mask + + + AC Voltage Overload + + + AC Current Overload + + + AC Active Power Overload + + + AC Reactive Power Overload + + + Average RMS Over Voltage + + + Average RMS Under Voltage + + + RMS Extreme Over Voltage + + + RMS Extreme Under Voltage + + + RMS Voltage Sag + + + RMS Voltage Swell + + + Line Current Phase B + + + Active Current Phase B + + + Reactive Current Phase B + + + RMS Voltage Phase B + + + RMS Voltage Min Phase B + + + RMS Voltage Max Phase B + + + RMS Current Phase B + + + RMS Current Min Phase B + + + RMS Current Max Phase B + + + Active Power Phase B + + + Active Power Min Phase B + + + Active Power Max Phase B + + + Reactive Power Phase B + + + Apparent Power Phase B + + + Power Factor Phase B + + + Average RMS Voltage Measurement Period Phase B + + + Average RMS Over Voltage Counter Phase B + + + Average RMS Under Voltage Counter Phase B + + + RMS Extreme Over Voltage Period Phase B + + + RMS Extreme Under Voltage Period Phase B + + + RMS Voltage Sag Period Phase B + + + RMS Voltage Swell Period Phase B + + + Line Current Phase C + + + Active Current Phase C + + + Reactive Current Phase C + + + RMS Voltage Phase C + + + RMS Voltage Min Phase C + + + RMS Voltage Max Phase C + + + RMS Current Phase C + + + RMS Current Min Phase C + + + RMS Current Max Phase C + + + Active Power Phase C + + + Active Power Min Phase C + + + Active Power Max Phase C + + + Reactive Power Phase C + + + Apparent Power Phase C + + + Power Factor Phase C + + + Average RMS Voltage Measurement Period Phase C + + + Average RMS Over Voltage Counter Phase C + + + Average RMS Under Voltage Counter Phase C + + + RMS Extreme Over Voltage Period Phase C + + + RMS Extreme Under Voltage Period Phase C + + + RMS Voltage Sag Period Phase C + + + RMS Voltage Swell Period Phase C + + + + Measurement Type + + + + + + + + + + + + + + + + + + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/0B05_Diagnostics.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/0B05_Diagnostics.xml new file mode 100644 index 000000000..04c03894f --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/0B05_Diagnostics.xml @@ -0,0 +1,108 @@ + + Diagnostics + The diagnostics cluster provides access to information regarding the operation of the ZigBee stack over time. This information is useful to installers and other network administrators who wish to know how a particular device is functioning on the network. + + Number Of Resets + An attribute that is incremented each time the device resets. A reset is defined as any time the device restarts. This is not the same as a reset to factory defaults, which SHOULD clear this and all values. + + + Persistent Memory Writes + This attribute keeps track of the number of writes to persistent memory. Each time that the device stores a token in persistent memory it will increment this value. + + + MAC Rx Bcast + A counter that is incremented each time the MAC layer receives a broadcast. + + + MAC Tx Bcast + A counter that is incremented each time the MAC layer transmits a broadcast. + + + MAC Rx Ucast + A counter that is incremented each time the MAC layer receives a unicast. + + + MAC Tx Ucast + A counter that is incremented each time the MAC layer transmits a unicast. + + + MAC Tx Ucast Retry + + + MAC Tx Ucast Fail + + + APS Rx Bcast + + + APS Tx Bcast + + + APS Rx Ucast + + + APS Tx Ucast Success + + + APS Tx Ucast Retry + + + APS Tx Ucast Fail + + + Route Disc Initiated + + + Neighbor Added + + + Neighbor Removed + + + Neighbor Stale + + + Join Indication + + + Child Moved + + + NWK FC Failure + + + APS FC Failure + + + APS Unauthorized Key + + + NWK Decrypt Failures + + + APS Decrypt Failures + + + Packet Buffer Allocate Failures + + + Relayed Ucast + + + Phy To MAC Queue Limit Reached + + + Packet Validate Drop Count + + + Average MAC Retry Per APS Message Sent + + + Last Message LQI + + + Last Message RSSI + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zcl/XXXX_General.xml b/com.zsmartsystems.zigbee/src/main/xml/zcl/XXXX_General.xml new file mode 100644 index 000000000..acefd1a79 --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zcl/XXXX_General.xml @@ -0,0 +1,219 @@ + + General + + Read Attributes Command + The read attributes command is generated when a device wishes to determine the values of one or more attributes located on another device. Each attribute identifier field shall contain the identifier of the attribute to be read. + + Identifiers + + + + Read Attributes Response + The read attributes response command is generated in response to a read attributes or read attributes structured command. The command frame shall contain a read attribute status record for each attribute identifier specified in the original read attributes or read attributes structured command. For each read attribute status record, the attribute identifier field shall contain the identifier specified in the original read attributes or read attributes structured command. + + Records + + + + Write Attributes Command + The write attributes command is generated when a device wishes to change the values of one or more attributes located on another device. Each write attribute record shall contain the identifier and the actual value of the attribute to be written. + + Records + + + + Write Attributes Undivided Command + The write attributes undivided command is generated when a device wishes to change the values of one or more attributes located on another device, in such a way that if any attribute cannot be written (e.g. if an attribute is not implemented on the device, or a value to be written is outside its valid range), no attribute values are changed. <br> In all other respects, including generation of a write attributes response command, the format and operation of the command is the same as that of the write attributes command, except that the command identifier field shall be set to indicate the write attributes undivided command. + + Records + + + + Write Attributes Response + The write attributes response command is generated in response to a write attributes command. + + Records + + + + Write Attributes No Response + The write attributes no response command is generated when a device wishes to change the value of one or more attributes located on another device but does not require a response. Each write attribute record shall contain the identifier and the actual value of the attribute to be written. + + Records + + + + Configure Reporting Command + The Configure Reporting command is used to configure the reporting mechanism for one or more of the attributes of a cluster. <br> The individual cluster definitions specify which attributes shall be available to this reporting mechanism, however specific implementations of a cluster may make additional attributes available. + + Records + + + + Configure Reporting Response + The Configure Reporting Response command is generated in response to a Configure Reporting command. + + Status + Status is only provided if the command was successful, and the attribute status records are not included for successfully written attributes, in order to save bandwidth. + + statusResponse + + + + Records + Note that attribute status records are not included for successfully configured attributes in order to save bandwidth. In the case of successful configuration of all attributes, only a single attribute status record SHALL be included in the command, with the status field set to SUCCESS and the direction and attribute identifier fields omitted. + + + + Read Reporting Configuration Command + The Read Reporting Configuration command is used to read the configuration details of the reporting mechanism for one or more of the attributes of a cluster. + + Records + + + + Read Reporting Configuration Response + The Read Reporting Configuration Response command is used to respond to a Read Reporting Configuration command. + + Records + + + + Report Attributes Command + The report attributes command is used by a device to report the values of one or more of its attributes to another device, bound a priori. Individual clusters, defined elsewhere in the ZCL, define which attributes are to be reported and at what interval. + + Reports + + + + Default Response + The default response command is generated when a device receives a unicast command, there is no other relevant response specified for the command, and either an error results or the Disable default response bit of its Frame control field is set to 0. + + Command Identifier + + + Status Code + + + + Discover Attributes Command + The discover attributes command is generated when a remote device wishes to discover the identifiers and types of the attributes on a device which are supported within the cluster to which this command is directed. + + Start Attribute Identifier + The start attribute identifier field is 16 bits in length and specifies the value of the identifier at which to begin the attribute discovery. + + + Maximum Attribute Identifiers + The maximum attribute identifiers field is 8 bits in length and specifies the maximum number of attribute identifiers that are to be returned in the resulting Discover Attributes Response command. + + + + Discover Attributes Response + The discover attributes response command is generated in response to a discover attributes command. + + Discovery Complete + The discovery complete field is a Boolean field. A value of 0 indicates that there are more attributes to be discovered that have an attribute identifier value greater than the last attribute identifier in the last attribute information field. A value of 1 indicates that there are no more attributes to be discovered. The attribute identifier field SHALL contain the identifier of a discovered attribute. Attributes SHALL be included in ascending order, starting with the lowest attribute identifier that is greater than or equal to the start attribute identifier field of the received Discover Attributes command. + + + Attribute Information + + + + Read Attributes Structured Command + The read attributes command is generated when a device wishes to determine the values of one or more attributes, or elements of attributes, located on another device. Each attribute identifier field shall contain the identifier of the attribute to be read. + + Attribute Selectors + + + + Write Attributes Structured Command + The write attributes structured command is generated when a device wishes to change the values of one or more attributes located on another device. Each write attribute record shall contain the identifier and the actual value of the attribute, or element thereof, to be written. + + Status + Status is only provided if the command was successful, and the attribute selector records are not included for successfully written attributes, in order to save bandwidth. + + statusResponse + + + + Attribute Selectors + Note that write attribute status records are not included for successfully written attributes, in order to save bandwidth. In the case of successful writing of all attributes, only a single write attribute status record SHALL be included in the command, with the status field set to SUCCESS and the attribute identifier and selector fields omitted. + + + + Write Attributes Structured Response + The write attributes structured response command is generated in response to a write attributes structured command. + + Status + Status is only provided if the command was successful, and the write attribute status records are not included for successfully written attributes, in order to save bandwidth. + + statusResponse + + + + Records + Note that write attribute status records are not included for successfully written attributes, in order to save bandwidth. In the case of successful writing of all attributes, only a single write attribute status record SHALL be included in the command, with the status field set to SUCCESS and the attribute identifier field omitted. + + + + Discover Commands Received + The Discover Commands Received command is generated when a remote device wishes to discover the optional and mandatory commands the cluster to which this command is sent can process. + + Start Command Identifier + + + Maximum Command Identifiers + + + + Discover Commands Received Response + The Discover Commands Received Response is generated in response to a Discover Commands Received command. + + Discovery Complete + + + Command Identifiers + + + + Discover Commands Generated + The Discover Commands Generated command is generated when a remote device wishes to discover the commands that a cluster may generate on the device to which this command is directed. + + Start Command Identifier + + + Maximum Command Identifiers + + + + Discover Commands Generated Response + The Discover Commands Generated Response is generated in response to a Discover Commands Generated command. + + Discovery Complete + + + Command Identifiers + + + + Discover Attributes Extended + The Discover Attributes Extended command is generated when a remote device wishes to discover the identifiers and types of the attributes on a device which are supported within the cluster to which this command is directed, including whether the attribute is readable, writeable or reportable. + + Start Attribute Identifier + + + Maximum Attribute Identifiers + + + + Discover Attributes Extended Response + The Discover Attributes Extended Response command is generated in response to a Discover Attributes Extended command. + + Discovery Complete + + + Attribute Information + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zdo/XXXX_ZigBeeDeviceObject.xml b/com.zsmartsystems.zigbee/src/main/xml/zdo/XXXX_ZigBeeDeviceObject.xml new file mode 100644 index 000000000..e0a42794c --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zdo/XXXX_ZigBeeDeviceObject.xml @@ -0,0 +1,819 @@ + + ZDO ZigBee Device Object + + Network Address Request + The NWK_addr_req is generated from a Local Device wishing to inquire as to the 16-bit address of the Remote Device based on its known IEEE address. The destination addressing on this command shall be unicast or broadcast to all devices for which macRxOnWhenIdle = TRUE. + + IEEE Addr + + + Request Type + Request type for this command: 0x00 – Single device response 0x01 – Extended response 0x02-0xFF – reserved + + + Start Index + + + + + + + IEEE Address Request + The IEEE_addr_req is generated from a Local Device wishing to inquire as to the 64-bit IEEE address of the Remote Device based on their known 16-bit address. The destination addressing on this command shall be unicast. + + NWK Addr Of Interest + + + Request Type + + + Start Index + + + + + + + Node Descriptor Request + The Node_Desc_req command is generated from a local device wishing to inquire as to the node descriptor of a remote device. This command shall be unicast either to the remote device itself or to an alternative device that contains the discovery information of the remote device. + + NWK Addr Of Interest + + + + + + + Power Descriptor Request + The Power_Desc_req command is generated from a local device wishing to inquire as to the power descriptor of a remote device. This command shall be unicast either to the remote device itself or to an alternative device that contains the discovery information of the remote device. + + NWK Addr Of Interest + + + + + + + Simple Descriptor Request + The Simple_Desc_req command is generated from a local device wishing to inquire as to the simple descriptor of a remote device on a specified endpoint. This command shall be unicast either to the remote device itself or to an alternative device that contains the discovery information of the remote device. + + NWK Addr Of Interest + + + Endpoint + + + + + + + + Active Endpoints Request + The Active_EP_req command is generated from a local device wishing to acquire the list of endpoints on a remote device with simple descriptors. This command shall be unicast either to the remote device itself or to an alternative device that contains the discovery information of the remote device. + + NWK Addr Of Interest + + + + + + + Match Descriptor Request + The Match_Desc_req command is generated from a local device wishing to find remote devices supporting a specific simple descriptor match criterion. This command shall either be broadcast to all devices for which macRxOnWhenIdle = TRUE, or unicast. If the command is unicast, it shall be directed either to the remote device itself or to an alternative device that contains the discovery information of the remote device. + + NWK Addr Of Interest + + + Profile ID + + + In Cluster Count + + + In Cluster List + inClusterCount + + + Out Cluster Count + + + Out Cluster List + outClusterCount + + + + Complex Descriptor Request + The Complex_Desc_req command is generated from a local device wishing to inquire as to the complex descriptor of a remote device. This command shall be unicast either to the remote device itself or to an alternative device that contains the discovery information of the remote device. + + NWK Addr Of Interest + + + + + + + User Descriptor Request + The User_Desc_req command is generated from a local device wishing to inquire as to the user descriptor of a remote device. This command shall be unicast either to the remote device itself or to an alternative device that contains the discovery information of the remote device. + + NWK Addr Of Interest + + + + + + + Discovery Cache Request + The Discovery_Cache_req is provided to enable devices on the network to locate a Primary Discovery Cache device on the network. The destination addressing on this primitive shall be broadcast to all devices for which macRxOnWhenIdle = TRUE. + + + Device Announce + The Device_annce is provided to enable ZigBee devices on the network to notify other ZigBee devices that the device has joined or re-joined the network, identifying the device's 64-bit IEEE address and new 16-bit NWK address, and informing the Remote Devices of the capability of the ZigBee device. This command shall be invoked for all ZigBee end devices upon join or rejoin. This command may also be invoked by ZigBee routers upon join or rejoin as part of NWK address conflict resolution. The destination addressing on this primitive is broadcast to all devices for which macRxOnWhenIdle = TRUE. + + NWK Addr Of Interest + + + IEEE Addr + + + Capability + + + + User Descriptor Set Request + The User_Desc_set command is generated from a local device wishing to configure the user descriptor on a remote device. This command shall be unicast either to the remote device itself or to an alternative device that contains the discovery information of the remote device. <br> The local device shall generate the User_Desc_set command using the format illustrated in Table 2.55. The NWKAddrOfInterest field shall contain the network address of the remote device for which the user descriptor is to be configured and the UserDescription field shall contain the ASCII character string that is to be configured in the user descriptor. Characters with ASCII codes numbered 0x00 through 0x1f are not permitted to be included in this string. + + + System Server Discovery Request + The System_Server_Discovery_req is generated from a Local Device wishing to discover the location of a particular system server or servers as indicated by the ServerMask parameter. The destination addressing on this request is "broadcast to all devices for which macRxOnWhenIdle = TRUE". + + + Discovery Store Request Request + The Discovery_store_req is provided to enable ZigBee end devices on the network to request storage of their discovery cache information on a Primary Discovery Cache device. Included in the request is the amount of storage space the Local Device requires. + + + Node Descriptor Store Request + The Node_Desc_store_req is provided to enable ZigBee end devices on the network to request storage of their Node Descriptor on a Primary Discovery Cache device which has previously received a SUCCESS status from a Discovery_store_req to the same Primary Discovery Cache device. Included in this request is the Node Descriptor the Local Device wishes to cache. + + + Power Descriptor Store Request + The Power_Desc_store_req is provided to enable ZigBee end devices on the network to request storage of their Power Descriptor on a Primary Discovery Cache device which has previously received a SUCCESS status from a Discovery_store_req to the same Primary Discovery Cache device. Included in this request is the Power Descriptor the Local Device wishes to cache. + + + Active Endpoint Store Request + The Active_EP_store_req is provided to enable ZigBee end devices on the network to request storage of their list of Active Endpoints on a Primary Discovery Cache device which has previously received a SUCCESS status from a Discovery_store_req to the same Primary Discovery Cache device. Included in this request is the count of Active Endpoints the Local Device wishes to cache and the endpoint list itself. + + + Simple Descriptor Store + The Simple_desc_store_req is provided to enable ZigBee end devices on the network to request storage of their list of Simple Descriptors on a Primary Discovery Cache device which has previously received a SUCCESS status from a Discovery_store_req to the same Primary Discovery Cache device. Note that each Simple Descriptor for every active endpoint on the Local Device must be individually uploaded to the Primary Discovery Cache device via this command to enable cached discovery. Included in this request is the length of the Simple Descriptor the Local Device wishes to cache and the Simple Descriptor itself. The endpoint is a field within the Simple Descriptor and is accessed by the Remote Device to manage the discovery cache information for the Local Device. + + + Remove Node Cache Request + The Remove_node_cache_req is provided to enable ZigBee devices on the network to request removal of discovery cache information for a specified ZigBee end device from a Primary Discovery Cache device. The effect of a successful Remove_node_cache_req is to undo a previously successful Discovery_store_req and additionally remove any cache information stored on behalf of the specified ZigBee end device on the Primary Discovery Cache device. + + + Find Node Cache Request + The Find_node_cache_req is provided to enable ZigBee devices on the network to broadcast to all devices for which macRxOnWhenIdle = TRUE a request to find a device on the network that holds discovery information for the device of interest, as specified in the request parameters. The effect of a successful Find_node_cache_req is to have the Primary Discovery Cache device, holding discovery information for the device of interest, unicast a Find_node_cache_rsp back to the Local Device. Note that, like the NWK_addr_req, only the device meeting this criteria shall respond to the request generated by Find_node_cache_req. + + + Extended Simple Descriptor Request + The Extended_Simple_Desc_req command is generated from a local device wishing to inquire as to the simple descriptor of a remote device on a specified endpoint. This command shall be unicast either to the remote device itself or to an alternative device that contains the discovery information of the remote device. The Extended_Simple_Desc_req is intended for use with devices which employ a larger number of application input or output clusters than can be described by the Simple_Desc_req. + + NWK Addr Of Interest + + + Endpoint + + + Start Index + + + + Extended Active Endpoint Request + The Extended_Active_EP_req command is generated from a local device wishing to acquire the list of endpoints on a remote device with simple descriptors. This command shall be unicast either to the remote device itself or to an alternative device that contains the discovery information of the remote device. The Extended_Active_EP_req is used for devices which support more active endpoints than can be returned by a single Active_EP_req. <br> The NWKAddrOfInterest field shall contain the network address of the remote device for which the active endpoint list is required. The StartIndex field shall be set in the request to enable retrieval of lists of active endpoints from devices whose list exceeds the size of a single ASDU and where fragmentation is not supported. + + + End Device Bind Request + The End_Device_Bind_req is generated from a Local Device wishing to perform End Device Bind with a Remote Device. The End_Device_Bind_req is generated, typically based on some user action like a button press. The destination addressing on this command shall be unicast, and the destination address shall be that of the ZigBee Coordinator. + + Binding Target + + + Src Address + + + Src Endpoint + + + Profile ID + + + In Cluster Count + + + In Cluster List + inClusterCount + + + Out Cluster Count + + + Out Cluster List + outClusterCount + + + + Bind Request + The Bind_req is generated from a Local Device wishing to create a Binding Table entry for the source and destination addresses contained as parameters. The destination addressing on this command shall be unicast only, and the destination address shall be that of a Primary binding table cache or to the SrcAddress itself. The Binding Manager is optionally supported on the source device (unless that device is also the ZigBee Coordinator) so that device shall issue a NOT_SUPPORTED status to the Bind_req if not supported. + + Src Address + The IEEE address for the source. + + + Src Endpoint + The source endpoint for the binding entry. + + + Bind Cluster + The identifier of the cluster on the source device that is bound to the destination. + + + DST Addr Mode + The addressing mode for the destination address used in this command. This field can take one of the non-reserved values from the following list: 0x00 = reserved 0x01 = 16-bit group address for DstAddress and DstEndp not present 0x02 = reserved 0x03 = 64-bit extended address for DstAddress and DstEndp present 0x04 – 0xff = reserved + + + DST Address + The destination address for the binding entry. + + + DST Endpoint + This field shall be present only if the DstAddrMode field has a value of 0x03 and, if present, shall be the destination endpoint for the binding entry. + + + + + + Unbind Request + The Unbind_req is generated from a Local Device wishing to remove a Binding Table entry for the source and destination addresses contained as parameters. The destination addressing on this command shall be unicast only and the destination address must be that of the a Primary binding table cache or the SrcAddress. + + Src Address + The IEEE address for the source. + + + Src Endpoint + The source endpoint for the binding entry. + + + Bind Cluster + The identifier of the cluster on the source device that is bound to the destination. + + + DST Addr Mode + The addressing mode for the destination address used in this command. This field can take one of the non-reserved values from the following list: 0x00 = reserved 0x01 = 16-bit group address for DstAddress and DstEndp not present 0x02 = reserved 0x03 = 64-bit extended address for DstAddress and DstEndp present 0x04 – 0xff = reserved + + + DST Address + The destination address for the binding entry. + + + DST Endpoint + This field shall be present only if the DstAddrMode field has a value of 0x03 and, if present, shall be the destination endpoint for the binding entry. + + + + + + Bind Register + The Bind_Register_req is generated from a Local Device and sent to a primary binding table cache device to register that the local device wishes to hold its own binding table entries. The destination addressing mode for this request is unicast. + + + Replace Device Request + The Replace_Device_req is intended for use by a special device such as a Commissioning tool and is sent to a primary binding table cache device to change all binding table entries which match OldAddress and OldEndpoint as specified. Note that OldEndpoint = 0 has special meaning and signifies that only the address needs to be matched. The endpoint in the binding table will not be changed in this case and so NewEndpoint is ignored. The processing changes all binding table entries for which the source address is the same as OldAddress and, if OldEndpoint is non-zero, for which the source endpoint is the same as OldEndpoint. It shall also change all binding table entries which have the destination address the same as OldAddress and, if OldEndpoint is non-zero, the destination endpoint the same as OldEndpoint. The destination addressing mode for this request is unicast. + + + Store Backup Bind Entry Request + The Store_Bkup_Bind_Entry_req is generated from a local primary binding table cache and sent to a remote backup binding table cache device to request backup storage of the entry. It will be generated whenever a new binding table entry has been created by the primary binding table cache. The destination addressing mode for this request is unicast. + + + Remove Backup Bind Table Request + The Remove_Bkup_Bind_Entry_req is generated from a local primary binding table cache and sent to a remote backup binding table cache device to request removal of the entry from backup storage. It will be generated whenever a binding table entry has been unbound by the primary binding table cache. The destination addressing mode for this request is unicast. + + + Backup Bind Table Request + The Backup_Bind_Table_req is generated from a local primary binding table cache and sent to the remote backup binding table cache device to request backup storage of its entire binding table. The destination addressing mode for this request is unicast. + + + Recover Bind Table Request + The Recover_Bind_Table_req is generated from a local primary binding table cache and sent to a remote backup binding table cache device when it wants a complete restore of the binding table. The destination addressing mode for this request is unicast. + + + Backup Source Bind Request + The Backup_Source_Bind_req is generated from a local primary binding table cache and sent to a remote backup binding table cache device to request backup storage of its entire source table. The destination addressing mode for this request is unicast. + + Source Table Entries + + + Start Index + + + Source Table List Count + + + Source Table List + + + + Recover Source Bind Request + The Recover_Source_Bind_req is generated from a local primary binding table cache and sent to the remote backup binding table cache device when it wants a complete restore of the source binding table. The destination addressing mode for this request is unicast. + + Start Index + + + + Management Network Discovery + The Mgmt_NWK_Disc_req is generated from a Local Device requesting that the Remote Device execute a Scan to report back networks in the vicinity of the Local Device. The destination addressing on this command shall be unicast. + + Scan Channels + + + Scan Duration + + + Start Index + + + + Management LQI Request + The Mgmt_Lqi_req is generated from a Local Device wishing to obtain a neighbor list for the Remote Device along with associated LQI values to each neighbor. The destination addressing on this command shall be unicast only and the destination address must be that of a ZigBee Coordinator or ZigBee Router. + + Start Index + + + + + + + Management Routing Request + The Mgmt_Rtg_req is generated from a Local Device wishing to retrieve the contents of the Routing Table from the Remote Device. The destination addressing on this command shall be unicast only and the destination address must be that of the ZigBee Router or ZigBee Coordinator. + + Start Index + + + + + + + Management Bind Request + The Mgmt_Bind_req is generated from a Local Device wishing to retrieve the contents of the Binding Table from the Remote Device. The destination addressing on this command shall be unicast only and the destination address must be that of a Primary binding table cache or source device holding its own binding table. + + Start Index + + + + + + Management Leave Request + The Mgmt_Leave_req is generated from a Local Device requesting that a Remote Device leave the network or to request that another device leave the network. The Mgmt_Leave_req is generated by a management application which directs the request to a Remote Device where the NLME-LEAVE.request is to be executed using the parameter supplied by Mgmt_Leave_req. + + Device Address + + + Remove Children_Rejoin + + + + + + + Management Direct Join Request + The Mgmt_Direct_Join_req is generated from a Local Device requesting that a Remote Device permit a device designated by DeviceAddress to join the network directly. The Mgmt_Direct_Join_req is generated by a management application which directs the request to a Remote Device where the NLME-DIRECTJOIN.request is to be executed using the parameter supplied by Mgmt_Direct_Join_req. + + Device Address + + + Capability Information + + + + Management Permit Joining Request + The Mgmt_Permit_Joining_req is generated from a Local Device requesting that a remote device or devices allow or disallow association. The Mgmt_Permit_Joining_req is generated by a management application or commissioning tool which directs the request to a remote device(s) where the NLME-PERMIT-JOINING.request is executed using the PermitDuration parameter supplied by Mgmt_Permit_Joining_req. Additionally, if the remote device is the Trust Center and TC_Significance is set to 1, the Trust Center authentication policy will be affected. The addressing may be unicast or "broadcast to all routers and coordinator". + + Permit Duration + + + Tc_Significance + + + + + + Cache Request + The Mgmt_Cache_req is provided to enable ZigBee devices on the network to retrieve a list of ZigBee End Devices registered with a Primary Discovery Cache device. The destination addressing on this primitive shall be unicast. + + + Network Update Request + This command is provided to allow updating of network configuration parameters or to request information from devices on network conditions in the local operating environment. The destination addressing on this primitive shall be unicast or broadcast to all devices for which macRxOnWhenIdle = TRUE. + + Scan Channels + + + Scan Duration + + + Scan Count + + + NWK Update ID + + + NWK Manager Addr + + + + Network Address Response + The NWK_addr_rsp is generated by a Remote Device in response to a NWK_addr_req command inquiring as to the NWK address of the Remote Device or the NWK address of an address held in a local discovery cache. The destination addressing on this command is unicast. + + Status + + + IEEE Addr Remote Dev + + + NWK Addr Remote Dev + + + Num Assoc Dev + + + Start Index + + + NWK Addr Assoc Dev List + numAssocDev + + + + IEEE Address Response + The IEEE_addr_rsp is generated by a Remote Device in response to an IEEE_addr_req command inquiring as to the 64-bit IEEE address of the Remote Device or the 64-bit IEEE address of an address held in a local discovery cache. The destination addressing on this command shall be unicast. + + Status + + + IEEE Addr Remote Dev + + + NWK Addr Remote Dev + + + Num Assoc Dev + + + Start Index + + + NWK Addr Assoc Dev List + numAssocDev + + + + Node Descriptor Response + The Node_Desc_rsp is generated by a remote device in response to a Node_Desc_req directed to the remote device. This command shall be unicast to the originator of the Node_Desc_req command. <br> The NWKAddrOfInterest field shall match that specified in the original Node_Desc_req command. If the NWKAddrOfInterest field matches the network address of the remote device, it shall set the Status field to SUCCESS and include its node descriptor in the NodeDescriptor field. <br> If the NWKAddrOfInterest field does not match the network address of the remote device and it is an end device, it shall set the Status field to INV_REQUESTTYPE and not include the NodeDescriptor field. If the NWKAddrOfInterest field does not match the network address of the remote device and it is the coordinator or a router, it shall determine whether the NWKAddrOfInterest field matches the network address of one of its children. If the NWKAddrOfInterest field does not match the network address of one of the children of the remote device, it shall set the Status field to DEVICE_NOT_FOUND and not include the NodeDescriptor field. If the NWKAddrOfInterest matches the network address of one of the children of the remote device, it shall determine whether a node descriptor for that device is available. If a node descriptor is not available for the child indicated by the NWKAddrOfInterest field, the remote device shall set the Status field to NO_DESCRIPTOR and not include the NodeDescriptor field. If a node descriptor is available for the child indicated by the NWKAddrOfInterest field, the remote device shall set the Status field to SUCCESS and include the node descriptor of the matching child device in the NodeDescriptor field. + + Status + + + NWK Addr Of Interest + + + Node Descriptor + + + + Power Descriptor Response + The Power_Desc_rsp is generated by a remote device in response to a Power_Desc_req directed to the remote device. This command shall be unicast to the originator of the Power_Desc_req command. + + Status + + + NWK Addr Of Interest + + + Power Descriptor + + + + Simple Descriptor Response + The Simple_Desc_rsp is generated by a remote device in response to a Simple_Desc_req directed to the remote device. This command shall be unicast to the originator of the Simple_Desc_req command. + + Status + + + NWK Addr Of Interest + + + Length + + + Simple Descriptor + + + + Active Endpoints Response + The Active_EP_rsp is generated by a remote device in response to an Active_EP_req directed to the remote device. This command shall be unicast to the originator of the Active_EP_req command. + + Status + + + NWK Addr Of Interest + + + Active Ep Cnt + + + Active Ep List + activeEpCnt + + + + Match Descriptor Response + The Match_Desc_rsp is generated by a remote device in response to a Match_Desc_req either broadcast or directed to the remote device. This command shall be unicast to the originator of the Match_Desc_req command. + + Status + + + NWK Addr Of Interest + + + Match Length + + + Match List + matchLength + + + + Complex Descriptor Response + The Complex_Desc_rsp is generated by a remote device in response to a Complex_Desc_req directed to the remote device. This command shall be unicast to the originator of the Complex_Desc_req command. + + Status + + + NWK Addr Of Interest + + + Length + + + Complex Descriptor + + + + User Descriptor Response + The User_Desc_rsp is generated by a remote device in response to a User_Desc_req directed to the remote device. This command shall be unicast to the originator of the User_Desc_req command. + + Status + + + NWK Addr Of Interest + + + Length + + + User Descriptor + + + + Discovery Cache Response + The Discovery_Cache_rsp is generated by Primary Discovery Cache devices receiving the Discovery_Cache_req. Remote Devices which are not Primary Discovery Cache devices (as designated in its Node Descriptor) should not respond to the Discovery_Cache_req command. + + + User Descriptor Conf + The User_Desc_conf is generated by a remote device in response to a User_Desc_set directed to the remote device. This command shall be unicast to the originator of the User_Desc_set command. + + + Discovery Store Response + The Discovery_store_rsp is provided to notify a Local Device of the request status from a Primary Discovery Cache device. Included in the response is a status code to notify the Local Device whether the request is successful (the Primary Cache Device has space to store the discovery cache data for the Local Device), whether the request is unsupported (meaning the Remote Device is not a Primary Discovery Cache device), or insufficient space exists. + + + Node Descriptor Store Response + The Node_store_rsp is provided to notify a Local Device of the request status from a Primary Discovery Cache device. Included in the response is a status code to notify the Local Device whether the request is successful (the Primary Cache Device has space to store the discovery cache data for the Local Device), whether the request is not supported (meaning the Remote Device is not a Primary Discovery Cache device), or insufficient space exists. + + + Power Descriptor Store Response + The Power_Desc_store_rsp is provided to notify a Local Device of the request status from a Primary Discovery Cache device. Included in the response is a status code to notify the Local Device whether the request is successful (the Primary Cache Device has space to store the discovery cache data for the Local Device), whether the request is not supported (meaning the Remote Device is not a Primary Discovery Cache device), or insufficient space exists. + + + Active Endpoint Store Response + The Active_EP_store_rsp is provided to notify a Local Device of the request status from a Primary Discovery Cache device. Included in the response is a status code to notify the Local Device whether the request is successful (the Primary Cache Device has space to store the discovery cache data for the Local Device), the request is not supported (meaning the Remote Device is not a Primary Discovery Cache device), or insufficient space exists. + + + Simple Descriptor Store Response + The Simple_Desc_store_rsp is provided to notify a Local Device of the request status from a Primary Discovery Cache device. Included in the response is a status code to notify the Local Device whether the request is successful (the Primary Cache Device has space to store the discovery cache data for the Local Device), the request is not supported (meaning the Remote Device is not a Primary Discovery Cache device), or insufficient space exists. + + + Remove Node Cache + The Remove_node_cache_rsp is provided to notify a Local Device of the request status from a Primary Discovery Cache device. Included in the response is a status code to notify the Local Device whether the request is successful (the Primary Cache Device has removed the discovery cache data for the indicated device of interest), or the request is not supported (meaning the Remote Device is not a Primary Discovery Cache device). + + + Find Node Cache Response + The Find_node_cache_rsp is provided to notify a Local Device of the successful discovery of the Primary Discovery Cache device for the given NWKAddr and IEEEAddr fields supplied in the request, or to signify that the device of interest is capable of responding to discovery requests. The Find_node_cache_rsp shall be generated only by Primary Discovery Cache devices holding discovery information for the NWKAddr and IEEEAddr in the request or the device of interest itself and all other Remote Devices shall not supply a response. + + + Extended Simple Descriptor Response + The Extended_Simple_Desc_rsp is generated by a remote device in response to an Extended_Simple_Desc_req directed to the remote device. This command shall be unicast to the originator of the Extended_Simple_Desc_req command. + + + Extended Active Endpoint Response + The Extended_Active_EP_rsp is generated by a remote device in response to an Extended_Active_EP_req directed to the remote device. This command shall be unicast to the originator of the Extended_Active_EP_req command. + + + End Device Bind Response + The End_Device_Bind_rsp is generated by the ZigBee Coordinator in response to an End_Device_Bind_req and contains the status of the request. This command shall be unicast to each device involved in the bind attempt, using the acknowledged data service. + + Status + + + + Bind Response + The Bind_rsp is generated in response to a Bind_req. If the Bind_req is processed and the Binding Table entry committed on the Remote Device, a Status of SUCCESS is returned. If the Remote Device is not a Primary binding table cache or the SrcAddress, a Status of NOT_SUPPORTED is returned. The supplied endpoint shall be checked to determine whether it falls within the specified range. If it does not, a Status of INVALID_EP shall be returned. If the Remote Device is the Primary binding table cache or SrcAddress but does not have Binding Table resources for the request, a Status of TABLE_FULL is returned. + + Status + + + + Unbind Response + The Unbind_rsp is generated in response to an Unbind_req. If the Unbind_req is processed and the corresponding Binding Table entry is removed from the Remote Device, a Status of SUCCESS is returned. If the Remote Device is not the ZigBee Coordinator or the SrcAddress, a Status of NOT_SUPPORTED is returned. The supplied endpoint shall be checked to determine whether it falls within the specified range. If it does not, a Status of INVALID_EP shall be returned If the Remote Device is the ZigBee Coordinator or SrcAddress but does not have a Binding Table entry corresponding to the parameters received in the request, a Status of NO_ENTRY is returned. + + Status + + + + Bind Register Response + The Bind_Register_rsp is generated from a primary binding table cache device in response to a Bind_Register_req and contains the status of the request. This command shall be unicast to the requesting device. + + Status + + + Binding Table Entries + + + Binding Table List Count + + + Binding Table List + bindingTableListCount + + + + Replace Device Response + The Replace_Device_rsp is generated from a primary binding table cache device in response to a Replace_Device_req and contains the status of the request. This command shall be unicast to the requesting device. If the device receiving the Replace_Device_req is not a primary binding table cache, a Status of NOT_SUPPORTED is returned. The primary binding table cache shall search its binding table for entries whose source address and source endpoint, or whose destination address and destination endpoint match OldAddress and OldEndpoint, as described in the text for Replace_Device_req. It shall change these entries to have NewAddress and possibly NewEndpoint. It shall then return a response of SUCCESS. + + Status + + + + Store Backup Bind Entry Response + The Store_Bkup_Bind_Entry_rsp is generated from a backup binding table cache device in response to a Store_Bkup_Bind_Entry_req from a primary binding table cache, and contains the status of the request. This command shall be unicast to the requesting device. If the remote device is not a backup binding table cache, it shall return a status of NOT_SUPPORTED. If the originator of the request is not recognized as a primary binding table cache, it shall return a status of INV_REQUESTTYPE. Otherwise, the backup binding table cache shall add the binding entry to its binding table and return a status of SUCCESS. If there is no room, it shall return a status of TABLE_FULL. + + Status + + + + Remove Backup Bind Entry Response + The Remove_Bkup_Bind_Entry_rsp is generated from a backup binding table cache device in response to a Remove_Bkup_Bind_Entry_req from the primary binding table cache and contains the status of the request. This command shall be unicast to the requesting device. If the remote device is not a backup binding table cache, it shall return a status of NOT_SUPPORTED. If the originator of the request is not recognized as a primary binding table cache, it shall return a status of INV_REQUESTTYPE. Otherwise, the backup binding table cache shall delete the binding entry from its binding table and return a status of SUCCESS. If the entry is not found, it shall return a status of NO_ENTRY. + + Status + + + Entry Count + + + + Backup Bind Table Response + The Backup_Bind_Table_rsp is generated from a backup binding table cache device in response to a Backup_Bind_Table_req from a primary binding table cache and contains the status of the request. This command shall be unicast to the requesting device. If the remote device is not a backup binding table cache, it shall return a status of NOT_SUPPORTED. If the originator of the request is not recognized as a primary binding table cache, it shall return a status of INV_REQUESTTYPE. Otherwise, the backup binding table cache shall overwrite the binding entries in its binding table starting with StartIndex and continuing for BindingTableListCount entries. If this exceeds its table size, it shall fill in as many entries as possible and return a status of TABLE_FULL and the EntryCount parameter will be the number of entries in the table. Otherwise, it shall return a status of SUCCESS and EntryCount will be equal to StartIndex + BindingTableListCount from Backup_Bind_Table_req. + + Status + + + + Recover Bind Table Response + The Recover_Bind_Table_rsp is generated from a backup binding table cache device in response to a Recover_Bind_Table_req from a primary binding table cache and contains the status of the request. This command shall be unicast to the requesting device. If the responding device is not a backup binding table cache, it shall return a status of NOT_SUPPORTED. If the originator of the request is not recognized as a primary binding table cache it shall return a status of INV_REQUESTTYPE. Otherwise, the backup binding table cache shall prepare a list of binding table entries from its backup beginning with StartIndex. It will fit in as many entries as possible into a Recover_Bind_Table_rsp command and return a status of SUCCESS. If StartIndex is more than the number of entries in the Binding table, a status of NO_ENTRY is returned. For a successful response, BindingTableEntries is the total number of entries in the backup binding table, and BindingTableListCount is the number of entries which is being returned in the response. + + + Recover Source Bind Response + The Recover_Source_Bind_rsp is generated from a backup binding table cache device in response to a Recover_Source_Bind_req from a primary binding table cache and contains the status of the request. This command shall be unicast to the requesting device. If the responding device is not a backup binding table cache, it shall return a status of NOT_SUPPORTED. If the originator of the request is not recognized as a primary binding table cache, it shall return a status of INV_REQUESTTYPE. Otherwise, the backup binding table cache shall prepare a list of binding table entries from its backup beginning with StartIndex. It will fit in as many entries as possible into a Recover_Source_Bind_rsp command and return a status of SUCCESS. If StartIndex is more than the number of entries in the Source table, a status of NO_ENTRY is returned. For a successful response, SourceTableEntries is the total number of entries in the backup source table, and SourceTableListCount is the number of entries which is being returned in the response. + + + Management Network Discovery Response + The Mgmt_NWK_Disc_rsp is generated in response to an Mgmt_NWK_Disc_req. If this management command is not supported, a status of NOT_SUPPORTED shall be returned and all parameter fields after the Status field shall be omitted. Otherwise, the Remote Device shall implement the following process. <br> Upon receipt of and after support for the Mgmt_NWK_Disc_req has been verified, the Remote Device shall issue an NLME-NETWORKDISCOVERY.request primitive using the ScanChannels and ScanDuration parameters, supplied in the Mgmt_NWK_Disc_req command. Upon receipt of the NLME-NETWORK-DISCOVERY.confirm primitive, the Remote Device shall report the results, starting with the StartIndex element, via the Mgmt_NWK_Disc_rsp command. The NetworkList field shall contain whole NetworkList records, until the limit on MSDU size, i.e., aMaxMACFrameSize, is reached. The number of results reported shall be set in the NetworkListCount. + + + Management LQI Response + The Mgmt_Lqi_rsp is generated in response to an Mgmt_Lqi_req. If this management command is not supported, a status of NOT_SUPPORTED shall be returned and all parameter fields after the Status field shall be omitted. Otherwise, the Remote Device shall implement the following processing. + + Status + + + Neighbor Table Entries + + + Start Index + + + Neighbor Table List Count + + + Neighbor Table List + neighborTableListCount + + + + Management Routing Response + The Mgmt_Rtg_rsp is generated in response to an Mgmt_Rtg_req. If this management command is not supported, a status of NOT_SUPPORTED shall be returned and all parameter fields after the Status field shall be omitted. Otherwise, the Remote Device shall implement the following processing. + + Status + + + Routing Table Entries + + + Start Index + + + Routing Table List Count + + + Routing Table List + routingTableListCount + + + + Management Bind Response + The Mgmt_Bind_rsp is generated in response to a Mgmt_Bind_req. If this management command is not supported, a status of NOT_SUPPORTED shall be returned and all parameter fields after the Status field shall be omitted. Otherwise, the Remote Device shall implement the following processing. + + Status + + + Binding Table Entries + + + Start Index + + + Binding Table List Count + + + Binding Table List + bindingTableListCount + + + + Management Leave Response + The Mgmt_Leave_rsp is generated in response to a Mgmt_Leave_req. If this management command is not supported, a status of NOT_SUPPORTED shall be returned. Otherwise, the Remote Device shall implement the following processing. <br> Upon receipt of and after support for the Mgmt_Leave_req has been verified, the Remote Device shall execute the NLME-LEAVE.request to disassociate from the currently associated network. The Mgmt_Leave_rsp shall contain the same status that was contained in the NLME-LEAVE.confirm primitive. <br> Once a device has disassociated, it may execute pre-programmed logic to perform NLME-NETWORK-DISCOVERY and NLME-JOIN to join/re-join a network. + + Status + + + + Management Direct Join Response + The Mgmt_Direct_Join_rsp is generated in response to a Mgmt_Direct_Join_req. If this management command is not supported, a status of NOT_SUPPORTED shall be returned. Otherwise, the Remote Device shall implement the following processing. + + Status + + + + Management Permit Joining Response + The Mgmt_Permit_Joining_rsp is generated in response to a unicast Mgmt_Permit_Joining_req. In the description which follows, note that no response shall be sent if the Mgmt_Permit_Joining_req was received as a broadcast to all routers. If this management command is not permitted by the requesting device, a status of INVALID_REQUEST shall be returned. Upon receipt and after support for Mgmt_Permit_Joining_req has been verified, the Remote Device shall execute the NLME-PERMIT-JOINING.request. The Mgmt_Permit-Joining_rsp shall contain the same status that was contained in the NLME-PERMIT-JOINING.confirm primitive. + + Status + + + + Management Cache Response + The Mgmt_Cache_rsp is generated in response to an Mgmt_Cache_req. If this management command is not supported, or the Remote Device is not a Primary Cache Device, a status of NOT_SUPPORTED shall be returned and all parameter fields after the Status field shall be omitted. Otherwise, the Remote Device shall implement the following processing. Upon receipt of the Mgmt_Cache_req and after support for the Mgmt_Cache_req has been verified, the Remote Device shall access an internally maintained list of registered ZigBee End Devices utilizing the discovery cache on this Primary Discovery Cache device. The entries reported shall be those, starting with StartIndex and including whole DiscoveryCacheList records until the limit on MSDU size, i.e., aMaxMACFrameSize, is reached. Within the Mgmt_Cache_rsp command, the DiscoveryCacheListEntries field shall represent the total number of registered entries in the Remote Device. The parameter DiscoveryCacheListCount shall be the number of entries reported in the DiscoveryCacheList field of the Mgmt_Cache_rsp command. + + + Management Network Update Notify + The Mgmt_NWK_Update_notify is provided to enable ZigBee devices to report the condition on local channels to a network manager. The scanned channel list is the report of channels scanned and it is followed by a list of records, one for each channel scanned, each record including one byte of the energy level measured during the scan, or 0xff if there is too much interference on this channel. <br> When sent in response to a Mgmt_NWK_Update_req command the status field shall represent the status of the request. When sent unsolicited the status field shall be set to SUCCESS. A Status of NOT_SUPPORTED indicates that the request was directed to a device which was not the ZigBee Coordinator or that the ZigBee Coordinator does not support End Device Binding. Otherwise, End_Device_Bind_req processing is performed as described below, including transmission of the End_Device_Bind_rsp. + + Status + + + Scanned Channels + + + Total Transmissions + + + Transmission Failures + + + Scanned Channels List Count + + + Energy Values + scannedChannelsListCount + + + diff --git a/com.zsmartsystems.zigbee/src/main/xml/zigbee-description.xsd b/com.zsmartsystems.zigbee/src/main/xml/zigbee-description.xsd new file mode 100644 index 000000000..05866fc27 --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zigbee-description.xsd @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/com.zsmartsystems.zigbee/src/main/xml/zigbee_constants.xml b/com.zsmartsystems.zigbee/src/main/xml/zigbee_constants.xml new file mode 100644 index 000000000..583d83d2d --- /dev/null +++ b/com.zsmartsystems.zigbee/src/main/xml/zigbee_constants.xml @@ -0,0 +1,77 @@ + + + ZigBee Device Type + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ZigBee Profile Type + + + + + + + + + + ZigBee Stack Type + + + + + + + diff --git a/com.zsmartsystems.zigbee/src/test/java/com/zsmartsystems/zigbee/zcl/protocol/ZclDataTypeTest.java b/com.zsmartsystems.zigbee/src/test/java/com/zsmartsystems/zigbee/zcl/protocol/ZclDataTypeTest.java index 7395cbbcd..514dfeed6 100644 --- a/com.zsmartsystems.zigbee/src/test/java/com/zsmartsystems/zigbee/zcl/protocol/ZclDataTypeTest.java +++ b/com.zsmartsystems.zigbee/src/test/java/com/zsmartsystems/zigbee/zcl/protocol/ZclDataTypeTest.java @@ -33,12 +33,6 @@ public void getId() { assertEquals(0x08, ZclDataType.DATA_8_BIT.getId()); } - @Test - public void getLabel() { - ZclDataType type = ZclDataType.BOOLEAN; - assertEquals("Boolean", type.getLabel()); - } - @Test public void isAnalog() { ZclDataType type = ZclDataType.BOOLEAN; diff --git a/pom.xml b/pom.xml index 27fb9bc4f..500ec411c 100644 --- a/pom.xml +++ b/pom.xml @@ -175,11 +175,6 @@ maven-jar-plugin 3.1.0 - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - -