diff --git a/README.md b/README.md
index dcf9ab782..0719dcdf0 100644
--- a/README.md
+++ b/README.md
@@ -34,6 +34,7 @@ The following clusters are currently supported -:
| 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. |
+| 000C | ANALOG_INPUT_BASIC | The Analog Input (Basic) cluster provides an interface for reading the value of an analog measurement and accessing various characteristics of that measurement. The cluster is typically used to implement a sensor that measures an analog physical quantity. |
| 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. |
diff --git a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZclDataType.java b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZclDataType.java
index 2f51aa9cf..0001bea17 100644
--- a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZclDataType.java
+++ b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZclDataType.java
@@ -99,8 +99,10 @@ public static class DataTypeMap {
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("ENUMERATION_16_BIT", new DataTypeMap("Integer", 0x31, 2, false, 0xffff));
+ dataTypeMapping.put("ENUMERATION_32_BIT", new DataTypeMap("Integer", 0x33, 4, false, 0xffffffff));
+ dataTypeMapping.put("FLOAT_32_BIT", new DataTypeMap("Double", 0x39, 4, true));
dataTypeMapping.put("DATA_8_BIT", new DataTypeMap("Integer", 0x08, 1, false));
dataTypeMapping.put("OCTET_STRING", new DataTypeMap("ByteArray", 0x41, -1, false));
dataTypeMapping.put("UTCTIME", new DataTypeMap("Calendar", 0xe2, 4, true, 0xffffffff));
diff --git a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZigBeeCodeGenerator.java b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZigBeeCodeGenerator.java
index 6201d98a9..dbd080c11 100644
--- a/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZigBeeCodeGenerator.java
+++ b/com.zsmartsystems.zigbee.autocode/src/main/java/com/zsmartsystems/zigbee/autocode/ZigBeeCodeGenerator.java
@@ -57,6 +57,7 @@ public static void main(final String[] args) {
zclParser.addFile("src/main/resources/0009_Alarms.xml");
zclParser.addFile("src/main/resources/000A_Time.xml");
zclParser.addFile("src/main/resources/000B_RssiLocation.xml");
+ zclParser.addFile("src/main/resources/000C_AnalogInputBasic.xml");
zclParser.addFile("src/main/resources/000F_BinaryInputBasic.xml");
zclParser.addFile("src/main/resources/0012_MultistateInputBasic.xml");
zclParser.addFile("src/main/resources/0013_MultistateOutputBasic.xml");
diff --git a/com.zsmartsystems.zigbee.autocode/src/main/resources/000C_AnalogInputBasic.xml b/com.zsmartsystems.zigbee.autocode/src/main/resources/000C_AnalogInputBasic.xml
new file mode 100644
index 000000000..bbcbc9cd8
--- /dev/null
+++ b/com.zsmartsystems.zigbee.autocode/src/main/resources/000C_AnalogInputBasic.xml
@@ -0,0 +1,93 @@
+
+ * The Analog Input (Basic) cluster provides an interface for reading the value of an analog + * measurement and accessing various characteristics of that measurement. The cluster is + * typically used to implement a sensor that measures an analog physical quantity. + *
* Code is auto-generated. Modifications may be overwritten! */ -@Generated(value = "com.zsmartsystems.zigbee.autocode.ZclProtocolCodeGenerator", date = "2018-10-24T19:40:52Z") +@Generated(value = "com.zsmartsystems.zigbee.autocode.ZigBeeCodeGenerator", date = "2019-04-13T12:49:59Z") public class ZclAnalogInputBasicCluster extends ZclCluster { /** * The ZigBee Cluster Library Cluster ID @@ -31,9 +42,136 @@ public class ZclAnalogInputBasicCluster extends ZclCluster { */ public static final String CLUSTER_NAME = "Analog Input (Basic)"; - // Attribute initialisation + // Attribute constants + /** + * 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 at- tribute shall contain a maximum of 16 characters, + * which shall be printable but are otherwise unrestricted. + */ + public static final int ATTR_DESCRIPTION = 0x001C; + /** + * The MaxPresentValue attribute, of type Single precision, indicates the highest value + * that can be reliably obtained for the PresentValue attribute of an Analog Input + * cluster, or which can reliably be used for the PresentValue attribute of an Analog + * Output or Analog Value cluster. + */ + public static final int ATTR_MAXPRESENTVALUE = 0x0041; + /** + * The MinPresentValue attribute, of type Single precision, indicates the lowest value + * that can be reliably ob- tained for the PresentValue attribute of an Analog Input + * cluster, or which can reliably be used for the PresentValue attribute of an Analog + * Output or Analog Value cluster. + */ + public static final int ATTR_MINPRESENTVALUE = 0x0045; + /** + */ + 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 Single precision, indicates the smallest recognizable change + * to PresentValue. + */ + public static final int ATTR_RESOLUTION = 0x006A; + /** + * 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 EngineeringUnits attribute indicates the physical units associated with the + * value of the PresentValue attribute of an Analog cluster. + *
+ * Values 0x0000 to 0x00fe are reserved for the list of engineering units with + * corresponding values specified in Clause 21 of the BACnet standard. 0x00ff represents + * 'other'. Values 0x0100 to 0xffff are available for proprietary use. + *
+ * If the ApplicationType attribute is implemented, and is set to a value with a defined + * physical unit, the physical unit defined in ApplicationType takes priority over + * EngineeringUnits. + *
+ * This attribute is defined to be Read Only, but a vendor can decide to allow this to be + * written to if ApplicationType is also supported. If this attribute is written to, how + * the device handles invalid units (e.g., changing Deg F to Cubic Feet per Minute), any + * local display or other vendor-specific operation (upon the change) is a local matter. + */ + public static final int ATTR_ENGINEERINGUNITS = 0x0075; + /** + * 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;
+
+ @Override
protected Map
+ * 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 at- tribute 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
+ * 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 at- tribute 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
+ * 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 at- tribute 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 Max Present Value attribute [attribute ID 0x0041].
+ *
+ * The MaxPresentValue attribute, of type Single precision, indicates the highest value
+ * that can be reliably obtained for the PresentValue attribute of an Analog Input
+ * cluster, or which can reliably be used for the PresentValue attribute of an Analog
+ * Output or Analog Value cluster.
+ *
+ * The attribute is of type {@link Double}.
+ *
+ * The implementation of this attribute by a device is OPTIONAL
+ *
+ * @param maxPresentValue the {@link Double} attribute value to be set
+ * @return the {@link Future
+ * The MaxPresentValue attribute, of type Single precision, indicates the highest value
+ * that can be reliably obtained for the PresentValue attribute of an Analog Input
+ * cluster, or which can reliably be used for the PresentValue attribute of an Analog
+ * Output or Analog Value cluster.
+ *
+ * The attribute is of type {@link Double}.
+ *
+ * The implementation of this attribute by a device is OPTIONAL
+ *
+ * @return the {@link Future
+ * The MaxPresentValue attribute, of type Single precision, indicates the highest value
+ * that can be reliably obtained for the PresentValue attribute of an Analog Input
+ * cluster, or which can reliably be used for the PresentValue attribute of an Analog
+ * Output or Analog Value 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 Double}.
+ *
+ * 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 Double} attribute value, or null on error
+ */
+ public Double getMaxPresentValue(final long refreshPeriod) {
+ if (attributes.get(ATTR_MAXPRESENTVALUE).isLastValueCurrent(refreshPeriod)) {
+ return (Double) attributes.get(ATTR_MAXPRESENTVALUE).getLastValue();
+ }
+
+ return (Double) readSync(attributes.get(ATTR_MAXPRESENTVALUE));
+ }
+
+ /**
+ * Set the Min Present Value attribute [attribute ID 0x0045].
+ *
+ * The MinPresentValue attribute, of type Single precision, indicates the lowest value
+ * that can be reliably ob- tained for the PresentValue attribute of an Analog Input
+ * cluster, or which can reliably be used for the PresentValue attribute of an Analog
+ * Output or Analog Value cluster.
+ *
+ * The attribute is of type {@link Double}.
+ *
+ * The implementation of this attribute by a device is OPTIONAL
+ *
+ * @param minPresentValue the {@link Double} attribute value to be set
+ * @return the {@link Future
+ * The MinPresentValue attribute, of type Single precision, indicates the lowest value
+ * that can be reliably ob- tained for the PresentValue attribute of an Analog Input
+ * cluster, or which can reliably be used for the PresentValue attribute of an Analog
+ * Output or Analog Value cluster.
+ *
+ * The attribute is of type {@link Double}.
+ *
+ * The implementation of this attribute by a device is OPTIONAL
+ *
+ * @return the {@link Future
+ * The MinPresentValue attribute, of type Single precision, indicates the lowest value
+ * that can be reliably ob- tained for the PresentValue attribute of an Analog Input
+ * cluster, or which can reliably be used for the PresentValue attribute of an Analog
+ * Output or Analog Value 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 Double}.
+ *
+ * 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 Double} attribute value, or null on error
+ */
+ public Double getMinPresentValue(final long refreshPeriod) {
+ if (attributes.get(ATTR_MINPRESENTVALUE).isLastValueCurrent(refreshPeriod)) {
+ return (Double) attributes.get(ATTR_MINPRESENTVALUE).getLastValue();
+ }
+
+ return (Double) readSync(attributes.get(ATTR_MINPRESENTVALUE));
+ }
+
+ /**
+ * Set the Out Of Service attribute [attribute ID 0x0051].
+ *
+ *
+ * The attribute is of type {@link Boolean}.
+ *
+ * The implementation of this attribute by a device is OPTIONAL
+ *
+ * @param outOfService the {@link Boolean} attribute value to be set
+ * @return the {@link Future
+ *
+ * The attribute is of type {@link Boolean}.
+ *
+ * The implementation of this attribute by a device is OPTIONAL
+ *
+ * @return the {@link Future
+ *
+ * This method can return cached data if the attribute has already been received.
+ * The parameter refreshPeriod is used to control this. If the attribute has been received
+ * within refreshPeriod milliseconds, then the method will immediately return the last value
+ * received. If refreshPeriod is set to 0, then the attribute will always be updated.
+ *
+ * This 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 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 Present Value attribute [attribute ID 0x0055].
+ *
+ * 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 Double}.
+ *
+ * The implementation of this attribute by a device is OPTIONAL
+ *
+ * @param presentValue the {@link Double} attribute value to be set
+ * @return the {@link Future
+ * 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 Double}.
+ *
+ * The implementation of this attribute by a device is OPTIONAL
+ *
+ * @return the {@link Future
+ * 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 Double}.
+ *
+ * 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 Double} attribute value, or null on error
+ */
+ public Double getPresentValue(final long refreshPeriod) {
+ if (attributes.get(ATTR_PRESENTVALUE).isLastValueCurrent(refreshPeriod)) {
+ return (Double) attributes.get(ATTR_PRESENTVALUE).getLastValue();
+ }
+
+ return (Double) readSync(attributes.get(ATTR_PRESENTVALUE));
+ }
+
+ /**
+ * Set the Reliability attribute [attribute ID 0x0067].
+ *
+ * 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
+ * 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
+ * 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 Resolution attribute [attribute ID 0x006A].
+ *
+ * This attribute, of type Single precision, indicates the smallest recognizable change
+ * to PresentValue.
+ *
+ * The attribute is of type {@link Double}.
+ *
+ * The implementation of this attribute by a device is OPTIONAL
+ *
+ * @param resolution the {@link Double} attribute value to be set
+ * @return the {@link Future
+ * This attribute, of type Single precision, indicates the smallest recognizable change
+ * to PresentValue.
+ *
+ * The attribute is of type {@link Double}.
+ *
+ * The implementation of this attribute by a device is OPTIONAL
+ *
+ * @return the {@link Future
+ * This attribute, of type Single precision, indicates the smallest recognizable change
+ * to PresentValue.
+ *
+ * This method can return cached data if the attribute has already been received.
+ * The parameter refreshPeriod is used to control this. If the attribute has been received
+ * within refreshPeriod milliseconds, then the method will immediately return the last value
+ * received. If refreshPeriod is set to 0, then the attribute will always be updated.
+ *
+ * This method will block until the response is received or a timeout occurs unless the current value is returned.
+ *
+ * The attribute is of type {@link Double}.
+ *
+ * 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 Double} attribute value, or null on error
+ */
+ public Double getResolution(final long refreshPeriod) {
+ if (attributes.get(ATTR_RESOLUTION).isLastValueCurrent(refreshPeriod)) {
+ return (Double) attributes.get(ATTR_RESOLUTION).getLastValue();
+ }
+
+ return (Double) readSync(attributes.get(ATTR_RESOLUTION));
+ }
+
+ /**
+ * Set the Status Flags attribute [attribute ID 0x006F].
+ *
+ * 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 OPTIONAL
+ *
+ * @param statusFlags the {@link Integer} attribute value to be set
+ * @return the {@link Future
+ * 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 OPTIONAL
+ *
+ * @return the {@link Future
+ * 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 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 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 the Engineering Units attribute [attribute ID 0x0075].
+ *
+ * The EngineeringUnits attribute indicates the physical units associated with the
+ * value of the PresentValue attribute of an Analog cluster.
+ *
+ * Values 0x0000 to 0x00fe are reserved for the list of engineering units with
+ * corresponding values specified in Clause 21 of the BACnet standard. 0x00ff represents
+ * 'other'. Values 0x0100 to 0xffff are available for proprietary use.
+ *
+ * If the ApplicationType attribute is implemented, and is set to a value with a defined
+ * physical unit, the physical unit defined in ApplicationType takes priority over
+ * EngineeringUnits.
+ *
+ * This attribute is defined to be Read Only, but a vendor can decide to allow this to be
+ * written to if ApplicationType is also supported. If this attribute is written to, how
+ * the device handles invalid units (e.g., changing Deg F to Cubic Feet per Minute), any
+ * local display or other vendor-specific operation (upon the change) is a local matter.
+ *
+ * The attribute is of type {@link Integer}.
+ *
+ * The implementation of this attribute by a device is OPTIONAL
+ *
+ * @param engineeringUnits the {@link Integer} attribute value to be set
+ * @return the {@link Future
+ * The EngineeringUnits attribute indicates the physical units associated with the
+ * value of the PresentValue attribute of an Analog cluster.
+ *
+ * Values 0x0000 to 0x00fe are reserved for the list of engineering units with
+ * corresponding values specified in Clause 21 of the BACnet standard. 0x00ff represents
+ * 'other'. Values 0x0100 to 0xffff are available for proprietary use.
+ *
+ * If the ApplicationType attribute is implemented, and is set to a value with a defined
+ * physical unit, the physical unit defined in ApplicationType takes priority over
+ * EngineeringUnits.
+ *
+ * This attribute is defined to be Read Only, but a vendor can decide to allow this to be
+ * written to if ApplicationType is also supported. If this attribute is written to, how
+ * the device handles invalid units (e.g., changing Deg F to Cubic Feet per Minute), any
+ * local display or other vendor-specific operation (upon the change) is a local matter.
+ *
+ * The attribute is of type {@link Integer}.
+ *
+ * The implementation of this attribute by a device is OPTIONAL
+ *
+ * @return the {@link Future
+ * The EngineeringUnits attribute indicates the physical units associated with the
+ * value of the PresentValue attribute of an Analog cluster.
+ *
+ * Values 0x0000 to 0x00fe are reserved for the list of engineering units with
+ * corresponding values specified in Clause 21 of the BACnet standard. 0x00ff represents
+ * 'other'. Values 0x0100 to 0xffff are available for proprietary use.
+ *
+ * If the ApplicationType attribute is implemented, and is set to a value with a defined
+ * physical unit, the physical unit defined in ApplicationType takes priority over
+ * EngineeringUnits.
+ *
+ * This attribute is defined to be Read Only, but a vendor can decide to allow this to be
+ * written to if ApplicationType is also supported. If this attribute is written to, how
+ * the device handles invalid units (e.g., changing Deg F to Cubic Feet per Minute), any
+ * local display or other vendor-specific operation (upon the change) is a local matter.
+ *
+ * This method can return cached data if the attribute has already been received.
+ * The parameter refreshPeriod is used to control this. If the attribute has been received
+ * within refreshPeriod milliseconds, then the method will immediately return the last value
+ * received. If refreshPeriod is set to 0, then the attribute will always be updated.
+ *
+ * This method will block until the response is received or a 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 getEngineeringUnits(final long refreshPeriod) {
+ if (attributes.get(ATTR_ENGINEERINGUNITS).isLastValueCurrent(refreshPeriod)) {
+ return (Integer) attributes.get(ATTR_ENGINEERINGUNITS).getLastValue();
+ }
+
+ return (Integer) readSync(attributes.get(ATTR_ENGINEERINGUNITS));
+ }
+
+ /**
+ * Set the Application Type attribute [attribute ID 0x0100].
+ *
+ * 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
+ *
+ * @param applicationType the {@link Integer} attribute value to be set
+ * @return the {@link Future
+ * 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
+ * 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/ZclMeteringCluster.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclMeteringCluster.java
index 03c7cdfcc..63f82274a 100644
--- 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
@@ -67,7 +67,7 @@
*
* Code is auto-generated. Modifications may be overwritten!
*/
-@Generated(value = "com.zsmartsystems.zigbee.autocode.ZigBeeCodeGenerator", date = "2019-02-26T20:57:36Z")
+@Generated(value = "com.zsmartsystems.zigbee.autocode.ZigBeeCodeGenerator", date = "2019-04-13T12:30:33Z")
public class ZclMeteringCluster extends ZclCluster {
/**
* The ZigBee Cluster Library Cluster ID
@@ -2659,9 +2659,9 @@ protected Map
- * The ReadingSnapshotTime attribute represents the last time all of the
- * CurrentSummationDelivered, CurrentSummationReceived,
- * CurrentMaxDemandDelivered, and CurrentMaxDemandReceived attributes that are
- * supported by the device were updated.
- *
- * The attribute is of type {@link Calendar}.
- *
- * The implementation of this attribute by a device is MANDATORY
- *
- * @param readingSnapshotTime the {@link Calendar} attribute value to be set
- * @return the {@link Future
@@ -4155,23 +4136,6 @@ public Future
- * The CurrentMaxDemandDeliveredTime attribute represents the time when
- * CurrentMaxDemandDelivered reading was captured.
- *
- * The attribute is of type {@link Calendar}.
- *
- * The implementation of this attribute by a device is MANDATORY
- *
- * @param currentMaxDemandDeliveredTime the {@link Calendar} attribute value to be set
- * @return the {@link Future
@@ -4235,23 +4199,6 @@ public Future
- * The CurrentMaxDemandReceivedTime attribute represents the time when
- * CurrentMaxDemandReceived reading was captured.
- *
- * The attribute is of type {@link Calendar}.
- *
- * The implementation of this attribute by a device is MANDATORY
- *
- * @param currentMaxDemandReceivedTime the {@link Calendar} attribute value to be set
- * @return the {@link Future
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
index b267c69bd..390871e3b 100644
--- 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
@@ -72,7 +72,7 @@
*
* Code is auto-generated. Modifications may be overwritten!
*/
-@Generated(value = "com.zsmartsystems.zigbee.autocode.ZigBeeCodeGenerator", date = "2019-02-26T20:57:36Z")
+@Generated(value = "com.zsmartsystems.zigbee.autocode.ZigBeeCodeGenerator", date = "2019-04-13T12:30:33Z")
public class ZclPriceCluster extends ZclCluster {
/**
* The ZigBee Cluster Library Cluster ID
@@ -4324,7 +4324,7 @@ protected Map
- * The attribute is of type {@link ByteArray}.
- *
- * The implementation of this attribute by a device is OPTIONAL
- *
- * @param creditCardPaymentRef5 the {@link ByteArray} attribute value to be set
- * @return the {@link Future
diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/analoginputbasic/AnalogInputReliabilityEnum.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/analoginputbasic/AnalogInputReliabilityEnum.java
new file mode 100644
index 000000000..fbc45709c
--- /dev/null
+++ b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/analoginputbasic/AnalogInputReliabilityEnum.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.zcl.clusters.analoginputbasic;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.annotation.Generated;
+
+/**
+ * Reliability value enumeration.
+ *
+ * Code is auto-generated. Modifications may be overwritten!
+ */
+@Generated(value = "com.zsmartsystems.zigbee.autocode.ZigBeeCodeGenerator", date = "2019-04-13T12:49:59Z")
+public enum AnalogInputReliabilityEnum {
+
+ /**
+ * No - Fault - Detected
+ */
+ NO_FAULT_DETECTED(0x0000),
+
+ /**
+ * Over - Range
+ */
+ OVER_RANGE(0x0002),
+
+ /**
+ * Under - Range
+ */
+ UNDER_RANGE(0x0003),
+
+ /**
+ * Open - Loop
+ */
+ OPEN_LOOP(0x0004),
+
+ /**
+ * Shorted - Loop
+ */
+ SHORTED_LOOP(0x0005),
+
+ /**
+ * Unreliable - Other
+ */
+ UNRELIABLE_OTHER(0x0007),
+
+ /**
+ * Process - Error
+ */
+ PROCESS_ERROR(0x0008),
+
+ /**
+ * Multi - State - Fault
+ */
+ MULTI_STATE_FAULT(0x0009),
+
+ /**
+ * Configuration - Error
+ */
+ CONFIGURATION_ERROR(0x000A);
+
+ /**
+ * A mapping between the integer code and its corresponding AnalogInputReliabilityEnum type to facilitate lookup by value.
+ */
+ private static Map
+ * Code is auto-generated. Modifications may be overwritten!
+ */
+@Generated(value = "com.zsmartsystems.zigbee.autocode.ZigBeeCodeGenerator", date = "2019-04-13T12:49:59Z")
+public enum AnalogInputStatusFlagsBitmap {
+
+ /**
+ * In_Alarm
+ */
+ IN_ALARM(0x0001),
+
+ /**
+ * Fault
+ */
+ FAULT(0x0002),
+
+ /**
+ * Overridden
+ */
+ OVERRIDDEN(0x0004),
+
+ /**
+ * Out Of Service
+ */
+ OUT_OF_SERVICE(0x0008);
+
+ /**
+ * A mapping between the integer code and its corresponding AnalogInputStatusFlagsBitmap type to facilitate lookup by value.
+ */
+ private static Map