diff --git a/code-generator/src/main/java/org/bubblecloud/zigbee/tools/CodeGeneratorUtil.java b/code-generator/src/main/java/org/bubblecloud/zigbee/tools/CodeGeneratorUtil.java index add985aa2..aa261abe4 100644 --- a/code-generator/src/main/java/org/bubblecloud/zigbee/tools/CodeGeneratorUtil.java +++ b/code-generator/src/main/java/org/bubblecloud/zigbee/tools/CodeGeneratorUtil.java @@ -1,5 +1,7 @@ package org.bubblecloud.zigbee.tools; +import java.util.List; + import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.WordUtils; @@ -16,7 +18,19 @@ public static Integer fromHex(String headerIdString) { } public static String labelToEnumerationValue(String dataType) { - return dataType.trim().toUpperCase().replace(" ", "_").replace("-", "_").replace("/", "_").replace("(", "_").replace(")", "_"); + String val = dataType.trim().toUpperCase().replace(" ", "_").replace("-", "_").replace("/", "_").replace("(", "_").replace(")", "_"); + 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) { diff --git a/code-generator/src/main/java/org/bubblecloud/zigbee/tools/ZclProtocolCodeGenerator.java b/code-generator/src/main/java/org/bubblecloud/zigbee/tools/ZclProtocolCodeGenerator.java index bd0f514bd..b871285ea 100644 --- a/code-generator/src/main/java/org/bubblecloud/zigbee/tools/ZclProtocolCodeGenerator.java +++ b/code-generator/src/main/java/org/bubblecloud/zigbee/tools/ZclProtocolCodeGenerator.java @@ -5,14 +5,27 @@ import java.io.*; import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; import java.util.LinkedList; +import java.util.List; +import java.util.Set; +import java.util.regex.Matcher; +import java.util.regex.Pattern; /** * 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; /** * The main method for running the code generator. @@ -23,7 +36,7 @@ public static void main(final String[] args) { if (args.length != 0) { definitionFilePath = args[0]; } else { - definitionFilePath = "./src/main/resources/zcl.def"; + definitionFilePath = "./src/main/resources/zcl_definition.md"; } final File definitionFile = new File(definitionFilePath); @@ -36,16 +49,17 @@ public static void main(final String[] args) { if (args.length != 0) { sourceRootPath = args[0]; } else { - sourceRootPath = "../zigbee-api/src/main/java/"; +// sourceRootPath = "./src/main/blah/"; + sourceRootPath = "../zigbee-common/src/main/java/"; } final File sourceRootFile = new File(sourceRootPath); if (!sourceRootFile.exists()) { - System.out.println("Source root path does not exist: " + definitionFilePath); + System.out.println("Source root path does not exist: " + sourceRootFile); return; } if (!sourceRootFile.isDirectory()) { - System.out.println("Source root path is not directory: " + definitionFilePath); + System.out.println("Source root path is not directory: " + sourceRootFile); return; } @@ -53,7 +67,7 @@ public static void main(final String[] args) { if (args.length != 0) { packageRoot = args[0]; } else { - packageRoot = "org.bubblecloud.zigbee.network.zcl.protocol"; + packageRoot = "org.bubblecloud.zigbee.v3"; } generateCode(definitionFile, sourceRootFile, packageRoot); @@ -98,8 +112,9 @@ public static void generateCode(final File definitionFile, final File sourceRoot e.printStackTrace(); return; } - + try { + generateZclCommandTypeEnumerationXXXXX(context, packageRoot, packageFile); generateZclCommandTypeEnumeration(context, packageRoot, packageFile); } catch (final IOException e) { System.out.println("Failed to generate command enumeration."); @@ -116,17 +131,17 @@ public static void generateCode(final File definitionFile, final File sourceRoot } try { - generateZclCommandTypeRegistrarClass(context, packageRoot, packageFile); + generateZclCommandClasses(context, packageRoot, sourceRootPath); } catch (final IOException e) { - System.out.println("Failed to generate profile enumeration."); + System.out.println("Failed to generate profile message classes."); e.printStackTrace(); return; } try { - generateZclCommandClasses(context, packageRoot + ".command", sourceRootPath); + generateZclClusterClasses(context, packageRoot, sourceRootPath); } catch (final IOException e) { - System.out.println("Failed to generate profile message classes."); + System.out.println("Failed to generate cluster classes."); e.printStackTrace(); return; } @@ -144,15 +159,20 @@ private static String getPackagePath(File sourceRootPath, String packageRoot) { return sourceRootPath.getAbsolutePath() + File.separator + packageRoot.replace(".", File.separator); } - private static void generateZclDataTypeEnumeration(Context context, final String packageRoot, File packageFile) throws IOException { + private static void generateZclDataTypeEnumeration(Context context, 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); out.println("package " + packageRoot + ";"); out.println(); - out.println("import org.bubblecloud.zigbee.network.zcl.field.*;"); - + out.println("import java.util.Calendar;"); + out.println("import " + packageRootPrefix + packageZclField + ".*;"); out.println(); out.println("public enum " + className + " {"); @@ -170,6 +190,7 @@ private static void generateZclDataTypeEnumeration(Context context, final String out.println(dataTypes.getLast().equals(dataType) ? ';' : ','); } + out.println(); out.println(" private final String label;"); out.println(" private final Class dataClass;"); out.println(); @@ -180,15 +201,19 @@ private static void generateZclDataTypeEnumeration(Context context, final String out.println(); out.println(" public String getLabel() { return label; }"); out.println(" public Class getDataClass() { return dataClass; }"); - out.println(); out.println("}"); out.flush(); out.close(); } - private static void generateZclProfileTypeEnumeration(Context context, String packageRoot, File packageFile) throws IOException { + private static void generateZclProfileTypeEnumeration(Context context, String packageRootPrefix, File sourceRootPath) throws IOException { final String className = "ZclProfileType"; + + 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 + ";"); @@ -220,14 +245,23 @@ private static void generateZclProfileTypeEnumeration(Context context, String pa out.close(); } - private static void generateZclClusterTypeEnumeration(Context context, String packageRoot, File packageFile) throws IOException { + 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); out.println("package " + packageRoot + ";"); out.println(); + 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("public enum " + className + " {"); @@ -235,7 +269,9 @@ private static void generateZclClusterTypeEnumeration(Context context, String pa for (final Profile profile : profiles) { final LinkedList clusters = new LinkedList(profile.clusters.values()); for (final Cluster cluster : clusters) { - out.print(" " + cluster.clusterType + "(" + cluster.clusterId + ", ZclProfileType." + profile.profileType + ", \"" + cluster.clusterName + "\")"); + out.print(" " + cluster.clusterType + "(" + cluster.clusterId + ", ZclProfileType." + + profile.profileType + ", Zcl" + cluster.nameUpperCamelCase + + "Cluster.class, \"" + cluster.clusterName + "\")"); out.println(clusters.getLast().equals(cluster) ? ';' : ','); } } @@ -246,10 +282,12 @@ private static void generateZclClusterTypeEnumeration(Context context, String pa out.println(" private final int id;"); out.println(" private final ZclProfileType profileType;"); out.println(" private final String label;"); + out.println(" private final Class clusterClass;"); out.println(); - out.println(" " + className + "(final int id, final ZclProfileType profileType, final String label) {"); + out.println(" " + className + "(final int id, final ZclProfileType profileType, final ClassclusterClass, final String label) {"); out.println(" this.id = id;"); out.println(" this.profileType = profileType;"); + out.println(" this.clusterClass = clusterClass;"); out.println(" this.label = label;"); out.println(" }"); out.println(); @@ -257,6 +295,7 @@ private static void generateZclClusterTypeEnumeration(Context context, String pa out.println(" public ZclProfileType getProfileType() { return profileType; }"); out.println(" public String getLabel() { return label; }"); out.println(" public String toString() { return label; }"); + out.println(" public Class getClusterClass() { return clusterClass; }"); out.println(); out.println(" public static ZclClusterType getValueById(final int id) {"); out.println(" return idValueMap.get(id);"); @@ -274,8 +313,14 @@ private static void generateZclClusterTypeEnumeration(Context context, String pa out.close(); } - private static void generateZclCommandTypeEnumeration(Context context, String packageRoot, File packageFile) throws IOException { - final String className = "ZclCommandType"; + 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 + ";"); @@ -330,15 +375,19 @@ private static void generateZclCommandTypeEnumeration(Context context, String pa out.println(" public boolean isReceived() { return received; }"); out.println(" public boolean isGeneric() { return generic; }"); out.println(" public String toString() { return label; }"); - out.println(); out.println("}"); out.flush(); out.close(); } - private static void generateZclFieldTypeEnumeration(Context context, String packageRoot, File packageFile) throws IOException { + 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); out.println("package " + packageRoot + ";"); @@ -401,7 +450,7 @@ private static void generateZclCommandClasses(Context context, String packageRoo commands.addAll(cluster.received.values()); commands.addAll(cluster.generated.values()); for (final Command command : commands) { - final String packageRoot = packageRootPrefix + "." + cluster.clusterType.replace('_', '.').toLowerCase(); + final String packageRoot = packageRootPrefix + packageZclProtocolCommand + "." + cluster.clusterType.replace("_", "").toLowerCase(); final String packagePath = getPackagePath(sourceRootPath, packageRoot); final File packageFile = getPackageFile(packagePath); @@ -419,13 +468,13 @@ private static void generateZclCommandClasses(Context context, String packageRoo out.println("package " + packageRoot + ";"); out.println(); - out.println("import org.bubblecloud.zigbee.network.zcl.ZclCommandMessage;"); - out.println("import org.bubblecloud.zigbee.network.zcl.ZclCommand;"); - out.println("import org.bubblecloud.zigbee.network.zcl.protocol.ZclCommandType;"); + out.println("import " + packageRootPrefix + packageZcl + ".ZclCommandMessage;"); + out.println("import " + packageRootPrefix + packageZcl + ".ZclCommand;"); + out.println("import " + packageRootPrefix + packageZclProtocol + ".ZclCommandType;"); if (!fields.isEmpty()) { - out.println("import org.bubblecloud.zigbee.network.zcl.protocol.ZclFieldType;"); + out.println("import " + packageRootPrefix + packageZclProtocol + ".ZclFieldType;"); if (fieldWithDataTypeList) { - out.println("import org.bubblecloud.zigbee.network.zcl.field.*;"); + out.println("import " + packageRootPrefix + packageZclField + ".*;"); } } @@ -436,7 +485,22 @@ private static void generateZclCommandClasses(Context context, String packageRoo out.println(); out.println("/**"); - out.println(" * Code generated " + command.commandLabel + " value object class."); + out.println(" * " + command.commandLabel + " value object class."); + + out.println(" * "); + for(String line : command.commandDescription) { + out.println(" * " + line); + } + + out.println(" * "); + out.println(" * Cluster: " + cluster.clusterName); + for(String line : cluster.clusterDescription) { + out.println(" * " + line); + } + + out.println(" * "); + out.println(" * Code is autogenerated. Modifications may be overwritten!"); + out.println(" */"); out.println("public class " + className + " extends ZclCommand {"); @@ -452,7 +516,7 @@ private static void generateZclCommandClasses(Context context, String packageRoo out.println(" * Default constructor setting the command type field."); out.println(" */"); out.println(" public " + className + "() {"); - out.println(" this.setType(ZclCommandType." + command.commandType + ");"); + out.println(" setType(ZclCommandType." + command.commandType + ");"); out.println(" }"); out.println(); out.println(" /**"); @@ -512,50 +576,320 @@ private static void generateZclCommandClasses(Context context, String packageRoo out.flush(); out.close(); - } } } - + } + + private static String getCommandTypeEnum(final Cluster cluster, final Command command, boolean received) { + return command.commandType + "(ZclClusterType." + cluster.clusterType + ", " + + command.commandId + ", " + + command.nameUpperCamelCase + ".class" + ", " + + "\"" + command.commandLabel + "\", " + + received + + ")"; } - private static void generateZclCommandTypeRegistrarClass(Context context, String packageRoot, File packageFile) throws IOException { - final String className = "ZclCommandTypeRegistrar"; + 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); out.println("package " + packageRoot + ";"); out.println(); - out.println("import org.bubblecloud.zigbee.network.zcl.ZclUtil;"); + + out.println("import " + packageRootPrefix + packageZcl + ".ZclCommand;"); + out.println(); + + List commandEnum = new ArrayList(); + + 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 " + getClusterCommandPackage(packageRootPrefix, cluster) + "." + cluster.received.get(c).nameUpperCamelCase + ";"); + + commandEnum.add(getCommandTypeEnum(cluster, cluster.received.get(c), true)); + } + if(cluster.generated.get(c) != null) { + out.println("import " + getClusterCommandPackage(packageRootPrefix, cluster) + "." + cluster.generated.get(c).nameUpperCamelCase + ";"); + + commandEnum.add(getCommandTypeEnum(cluster, cluster.generated.get(c), false)); + } + } + } + } + out.println(); + out.println(); out.println("/**"); - out.println(" * Code generated command type registrar class."); + out.println(" * Code generated command type."); out.println(" */"); - out.println("public class " + className + " {"); + out.println("public enum " + className + " {"); out.println(" /**"); out.println(" * Register command types."); out.println(" */"); - out.println(" public static void register() {"); + + for(String command : commandEnum) { + out.print(" " + command); + out.println((commandEnum.indexOf(command) == commandEnum.size() - 1) ? ';' : ','); + } + out.println(); + + out.println(" private final int commandId;"); + out.println(" private final ZclClusterType clusterType;"); + out.println(" private final Class commandClass;"); + out.println(" private final String label;"); + out.println(" private final boolean received;"); + out.println(); + out.println(" " + className + "(final ZclClusterType clusterType, final int commandId, final Class commandClass, final String label, final boolean received) {"); + out.println(" this.clusterType = clusterType;"); + out.println(" this.commandId = commandId;"); + out.println(" this.commandClass = commandClass;"); + out.println(" this.label = label;"); + out.println(" this.received = received;"); + out.println(" }"); + out.println(); + + out.println(" public ZclClusterType getClusterType() { return clusterType; }"); + out.println(" public int getId() { return commandId; }"); + out.println(" public String getLabel() { return label; }"); + out.println(" public boolean isGeneric() { return clusterType==ZclClusterType.GENERAL; }"); + out.println(" public boolean isReceived() { return received; }"); + out.println(" public Class getCommandClass() { return commandClass; }"); + out.println(); + out.println(" public static ZclCommandType getValueById(final ZclClusterType clusterType, final int commandId) {"); + out.println(" for (final ZclCommandType value : values()) {"); + out.println(" if(value.clusterType == clusterType && value.commandId == commandId) {"); + out.println(" return value;"); + out.println(" }"); + out.println(" }"); + out.println(" return null;"); + out.println(" }"); + out.println("}"); + + out.flush(); + out.close(); + } + + 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 ArrayList commands = new ArrayList(); + 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()); + + out.println("package " + packageRoot + packageZclCluster + ";"); + out.println(); + + Set imports = new HashSet(); + + boolean addAttributeTypes = false; + boolean readAttributes = false; + for (final Attribute attribute : cluster.attributes.values()) { + if(attribute.attributeAccess.toLowerCase().contains("write")) { + addAttributeTypes = true; + } + if(attribute.attributeAccess.toLowerCase().contains("read")) { + readAttributes = true; + } + } + + if(addAttributeTypes) { + imports.add("org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType"); + } + + imports.add(packageRoot + packageZcl + ".ZclCluster"); + imports.add(packageRoot + packageZclProtocol + ".ZclDataType"); +// imports.add(packageRoot + packageZcl + ".ZclCommand"); +// imports.add(packageRoot + packageZcl + ".ZclCommandMessage"); + +// imports.add(packageRoot + ".ZigBeeDestination"); + imports.add(packageRoot + ".ZigBeeDevice"); + imports.add(packageRoot + ".ZigBeeApi"); + imports.add(packageRoot + ".CommandResult"); + imports.add(packageRoot + ".ZigBeeDevice"); + imports.add(packageRoot + packageZcl + ".ZclAttribute"); + imports.add("java.util.Map"); + imports.add("java.util.HashMap"); + imports.add("java.util.concurrent.Future"); +// imports.add("org.bubblecloud.zigbee.v3.model.ZigBeeType"); + + for (final Command command : commands) { + imports.add(getClusterCommandPackage(packageRoot, cluster) + "." + command.nameUpperCamelCase); + } + + ListimportList = 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(" *

"); + for(String line : cluster.clusterDescription) { + out.println(" * " + line); + } + out.println(" *

"); + } + out.println(" * This code is autogenerated. Modifications may be overwritten!"); + + out.println(" */"); + out.println("public class " + className + " extends ZclCluster {"); + + out.println(" // Cluster ID"); + out.println(" private static final int CLUSTER_ID = " + String.format("0x%04X;", cluster.clusterId)); + out.println(); + + if(cluster.attributes.size() != 0) { + out.println(" // Attribute constants"); + for (final Attribute attribute : cluster.attributes.values()) { + out.println(" private 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 HashMap(" + cluster.attributes.size() + ");"); + out.println(); + if(cluster.attributes.size() != 0) { + for (final Attribute attribute : cluster.attributes.values()) { + out.println(" attributeMap.put(" + attribute.enumName + ", new ZclAttribute(" + attribute.attributeId + ", 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."); + out.println(" */"); + out.println(" public " + className + "(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) {"); + out.println(" super(zigbeeApi, zigbeeDevice, CLUSTER_ID);"); + out.println(" }"); + out.println(); + out.println(); + + for (final Attribute attribute : cluster.attributes.values()) { + if(attribute.attributeAccess.toLowerCase().contains("write")) { + outputAttributeJavaDoc(out, "Set", attribute); + out.println(" public Future set" + attribute.nameUpperCamelCase + "(final Object value) {"); + out.println(" return write(" + attribute.enumName + ", ZclDataType." + attribute.dataType + ", value);"); + out.println(" }"); + out.println(); + } + + if(attribute.attributeAccess.toLowerCase().contains("read")) { + outputAttributeJavaDoc(out, "Get", attribute); + out.println(" public Future get" + attribute.nameUpperCamelCase + "() {"); + out.println(" return read(" + attribute.enumName + ");"); + out.println(" }"); + out.println(); + } + + if(attribute.attributeAccess.toLowerCase().contains("read") && attribute.attributeReporting.toLowerCase().equals("mandatory")) { + outputAttributeJavaDoc(out, "Configure reporting for", attribute); + out.println(" public Future config" + attribute.nameUpperCamelCase + "Reporting(final int minInterval, final int maxInterval, final Object reportableChange) {"); + out.println(" return report(" + attribute.enumName + ", minInterval, maxInterval, reportableChange);"); + out.println(" }"); + out.println(); + } + } + for (final Command command : commands) { - out.println(" ZclUtil.registerCommandTypeClassMapping(ZclCommandType." + command.commandType + ","); - out.println(" " + packageRoot + ".command." + cluster.clusterType.replace('_', '.').toLowerCase() + "."); - out.println(" " + command.nameUpperCamelCase + ".class);"); + out.println(); + out.println(" /**"); + out.println(" * The " + command.commandLabel); + if(command.commandDescription.size() != 0) { + out.println(" *

"); + for(String line : command.commandDescription) { + out.println(" * " + line); + } + out.println(" *

"); + } + out.println(" *"); + out.println(" * @return the {@link Future} command result future"); + out.println(" */"); + out.println(" public Future " + command.nameLowerCamelCase + "() {"); + out.println(" return send(new " + command.nameUpperCamelCase + "());"); + out.println(" }"); + 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(" }"); + out.println(); } + + out.println("}"); + + out.flush(); + out.close(); } } - out.println(" }"); - - out.println("}"); + } - out.flush(); - out.close(); + private static void outputAttributeJavaDoc(PrintWriter out, String type, Attribute attribute) { + out.println(); + out.println(" /**"); + out.println(" * " + type + " the " + attribute.attributeLabel + " attribute"); + if(attribute.attributeDescription.size() != 0) { + out.println(" *

"); + for(String line : attribute.attributeDescription) { + out.println(" * " + line); + } + } + out.println(" *

"); + out.println(" * The attribute is of type {@link " + attribute.dataTypeClass + "}
"); + out.println(" * The implementation of this attribute by a device is " + attribute.attributeImplementation.toUpperCase()); + out.println(" *"); + if("Set".equals(type)) { + out.println(" * @param " + attribute.nameLowerCamelCase + " the {@link " + attribute.dataTypeClass + "} attribute value to be set"); + } + if("Configure reporting for".equals(type)) { + out.println(" * @param minInterval {@link int} minimum reporting period"); + out.println(" * @param maxInterval {@link int} maximum reporting period"); + out.println(" * @param reportableChange {@link Object} delta required to trigger report"); + } + out.println(" * @return the {@link Future} command result future"); + out.println(" */"); } private static PrintWriter getClassOut(File packageFile, String className) throws FileNotFoundException { @@ -565,5 +899,21 @@ private static PrintWriter getClassOut(File packageFile, String className) throw 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 getClusterCommandPackage(String packageRoot, Cluster cluster) { + return packageRoot + packageZclProtocolCommand + "." + cluster.clusterType.replace("_", "").toLowerCase(); + } } diff --git a/code-generator/src/main/java/org/bubblecloud/zigbee/tools/ZclProtocolDefinitionParser.java b/code-generator/src/main/java/org/bubblecloud/zigbee/tools/ZclProtocolDefinitionParser.java index 96cf9a87c..85906df7e 100644 --- a/code-generator/src/main/java/org/bubblecloud/zigbee/tools/ZclProtocolDefinitionParser.java +++ b/code-generator/src/main/java/org/bubblecloud/zigbee/tools/ZclProtocolDefinitionParser.java @@ -1,5 +1,9 @@ package org.bubblecloud.zigbee.tools; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; + import org.apache.commons.lang.StringUtils; import org.bubblecloud.zigbee.tools.zcl.*; @@ -7,12 +11,11 @@ * Created by tlaukkan on 4/10/2016. */ 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("[")) { + if (line.startsWith("# ") && line.contains("[")) { context.profile = new Profile(); context.profile.profileName = getHeaderTitle(line); context.profile.profileType = CodeGeneratorUtil.labelToEnumerationValue(context.profile.profileName); @@ -29,12 +32,12 @@ private static void parseFunctionalDomains(Context context) { final String line = context.lines.remove(0); // Returning to previous level. - if (line.startsWith("* ") && line.contains("[")) { + if (line.startsWith("# ") && line.contains("[")) { context.lines.add(0, line); return; } - if (line.startsWith("* ")) { + if (line.startsWith("# ")) { final String functionalDomainName = getHeaderTitle(line); System.out.println(" Functional domain: " + functionalDomainName); @@ -48,16 +51,19 @@ private static void parseClusters(Context context) { final String line = context.lines.remove(0); // Returning to previous level. - if (line.startsWith("* ")) { + if (line.startsWith("# ")) { context.lines.add(0, line); return; } - - if (line.startsWith("** ")) { + + 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); @@ -67,41 +73,82 @@ private static void parseClusters(Context context) { } private static void parseDirections(Context context) { - while (context.lines.size() > 0) { + boolean addBreak = false; + while (context.lines.size() > 0) { final String line = context.lines.remove(0); // Returning to previous level. - if (line.startsWith("* ") || line.startsWith("** ")) { + if (line.startsWith("# ") || line.startsWith("## ")) { context.lines.add(0, line); return; } - if (line.startsWith("*** ")) { - context.received = line.toLowerCase().contains("received"); + 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 { + } 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.add("
"); + addBreak = false; + } + context.cluster.clusterDescription.add(line.trim()); } } private static void parseCommands(Context context) { - while (context.lines.size() > 0) { + while (context.lines.size() > 0) { final String line = context.lines.remove(0); // Returning to previous level. - if (line.startsWith("* ") || line.startsWith("** ") || line.startsWith("*** ")) { + if (line.startsWith("# ") || line.startsWith("## ") || line.startsWith("### ")) { context.lines.add(0, line); return; } - - if (line.startsWith("**** ")) { + + if (line.startsWith("#### ")) { context.command = new Command(); context.command.commandLabel = getHeaderTitle(line); + 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++) { + 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); @@ -120,11 +167,12 @@ private static void parseCommands(Context context) { 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("*")) { + if (line.startsWith("#")) { context.lines.add(0, line); return; } @@ -140,72 +188,16 @@ private static void parseField(Context context) { field.nameUpperCamelCase = CodeGeneratorUtil.labelToUpperCamelCase(field.fieldLabel); field.nameLowerCamelCase = CodeGeneratorUtil.upperCamelCaseToLowerCamelCase(field.nameUpperCamelCase); field.dataType = CodeGeneratorUtil.labelToEnumerationValue(columns[1].trim()); - if ("0123456789".indexOf(field.dataType.charAt(0)) >= 0) { - field.dataType = "_" + field.dataType; - } + final DataType dataType = new DataType(); dataType.dataTypeName = columns[1].trim(); dataType.dataTypeType = field.dataType; - if (field.dataType.equals("CHARACTER_STRING")) { - dataType.dataTypeClass = "String"; - } else if (field.dataType.equals("IEEE_ADDRESS")) { - dataType.dataTypeClass = "Long"; - } else if (field.dataType.equals("N_X_EXTENSION_FIELD_SET")) { - dataType.dataTypeClass = "List"; - } else if (field.dataType.equals("N_X_NEIGHBORS_INFORMATION")) { - dataType.dataTypeClass = "List"; - } else if (field.dataType.equals("N_X_UNSIGNED_16_BIT_INTEGER")) { - dataType.dataTypeClass = "List"; - } else if (field.dataType.equals("N_X_UNSIGNED_8_BIT_INTEGER")) { - dataType.dataTypeClass = "List"; - } else if (field.dataType.equals("N_X_ATTRIBUTE_IDENTIFIER")) { - dataType.dataTypeClass = "List"; - } else if (field.dataType.equals("N_X_READ_ATTRIBUTE_STATUS_RECORD")) { - dataType.dataTypeClass = "List"; - } else if (field.dataType.equals("N_X_WRITE_ATTRIBUTE_RECORD")) { - dataType.dataTypeClass = "List"; - } else if (field.dataType.equals("N_X_WRITE_ATTRIBUTE_STATUS_RECORD")) { - dataType.dataTypeClass = "List"; - } else if (field.dataType.equals("N_X_ATTRIBUTE_REPORTING_CONFIGURATION_RECORD")) { - dataType.dataTypeClass = "List"; - } else if (field.dataType.equals("N_X_ATTRIBUTE_STATUS_RECORD")) { - dataType.dataTypeClass = "List"; - } else if (field.dataType.equals("N_X_ATTRIBUTE_RECORD")) { - dataType.dataTypeClass = "List"; - } else if (field.dataType.equals("N_X_ATTRIBUTE_REPORT")) { - dataType.dataTypeClass = "List"; - } else if (field.dataType.equals("N_X_ATTRIBUTE_INFORMATION")) { - dataType.dataTypeClass = "List"; - } else if (field.dataType.equals("N_X_ATTRIBUTE_SELECTOR")) { - dataType.dataTypeClass = "Object"; - } else if (field.dataType.equals("BOOLEAN")) { - dataType.dataTypeClass = "Boolean"; - } else if (field.dataType.equals("SIGNED_16_BIT_INTEGER")) { - dataType.dataTypeClass = "Integer"; - } else if (field.dataType.equals("SIGNED_8_BIT_INTEGER")) { - dataType.dataTypeClass = "Integer"; - } else if (field.dataType.equals("UNSIGNED_16_BIT_INTEGER")) { - dataType.dataTypeClass = "Integer"; - } else if (field.dataType.equals("UNSIGNED_32_BIT_INTEGER")) { - dataType.dataTypeClass = "Integer"; - } else if (field.dataType.equals("UNSIGNED_8_BIT_INTEGER")) { - dataType.dataTypeClass = "Integer"; - } else if (field.dataType.equals("_16_BIT_BITMAP")) { - dataType.dataTypeClass = "Integer"; - } else if (field.dataType.equals("_16_BIT_ENUMERATION")) { - dataType.dataTypeClass = "Integer"; - } else if (field.dataType.equals("_8_BIT_BITMAP")) { - dataType.dataTypeClass = "Integer"; - } else if (field.dataType.equals("_8_BIT_DATA")) { - dataType.dataTypeClass = "Integer"; - } else if (field.dataType.equals("_8_BIT_ENUMERATION")) { - dataType.dataTypeClass = "Integer"; - } else if (field.dataType.equals("OCTET_STRING")) { - dataType.dataTypeClass = "String"; - } else { + 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); @@ -213,11 +205,29 @@ private static void parseField(Context context) { System.out.println(" " + CodeGeneratorUtil.toHex(fieldIndex) + ") " + field.fieldLabel + ": " + dataType.dataTypeName); fieldIndex++; } + + 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 String getHeaderTitle(String line) { - line = line.substring(line.lastIndexOf("*") + 1); + line = line.substring(line.lastIndexOf("#") + 1); if (line.contains("[")) { return StringUtils.substringBefore(line, "[").trim(); } else { @@ -229,4 +239,76 @@ private static int getHeaderId(String line) { final String headerIdString = StringUtils.substringBetween(line, "[", "]").trim(); return CodeGeneratorUtil.fromHex(headerIdString); } + + private static void parseAttributes(Context context) { + Attribute attribute = null; + 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("### ")) { + context.lines.add(0, line); + return; + } + + if (line.startsWith("|") && !line.startsWith("|Id") && !line.startsWith("|-")) { + parseAttribute(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; + } + } + + continue; + } + + if(attribute == null || (attribute.attributeDescription.size() == 0 && line.trim().length() == 0)) { + continue; + } + if(line.trim().length() == 0) { + addBreak = true; + continue; + } + if(addBreak) { + attribute.attributeDescription.add("
"); + addBreak = false; + } + attribute.attributeDescription.add(line.trim()); + } + } + + private static void parseAttribute(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.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; + 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); + } + } diff --git a/code-generator/src/main/java/org/bubblecloud/zigbee/tools/zcl/Attribute.java b/code-generator/src/main/java/org/bubblecloud/zigbee/tools/zcl/Attribute.java new file mode 100644 index 000000000..47ba415c6 --- /dev/null +++ b/code-generator/src/main/java/org/bubblecloud/zigbee/tools/zcl/Attribute.java @@ -0,0 +1,18 @@ +package org.bubblecloud.zigbee.tools.zcl; + +import java.util.List; + +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; +} diff --git a/code-generator/src/main/java/org/bubblecloud/zigbee/tools/zcl/Cluster.java b/code-generator/src/main/java/org/bubblecloud/zigbee/tools/zcl/Cluster.java index 1c1521ab7..bca02d653 100644 --- a/code-generator/src/main/java/org/bubblecloud/zigbee/tools/zcl/Cluster.java +++ b/code-generator/src/main/java/org/bubblecloud/zigbee/tools/zcl/Cluster.java @@ -1,5 +1,6 @@ package org.bubblecloud.zigbee.tools.zcl; +import java.util.List; import java.util.TreeMap; /** @@ -7,8 +8,12 @@ */ 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/code-generator/src/main/java/org/bubblecloud/zigbee/tools/zcl/Command.java b/code-generator/src/main/java/org/bubblecloud/zigbee/tools/zcl/Command.java index 7e82295ed..c438a69ca 100644 --- a/code-generator/src/main/java/org/bubblecloud/zigbee/tools/zcl/Command.java +++ b/code-generator/src/main/java/org/bubblecloud/zigbee/tools/zcl/Command.java @@ -1,5 +1,6 @@ package org.bubblecloud.zigbee.tools.zcl; +import java.util.List; import java.util.TreeMap; /** @@ -8,7 +9,10 @@ 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; diff --git a/code-generator/src/main/java/org/bubblecloud/zigbee/tools/zcl/Context.java b/code-generator/src/main/java/org/bubblecloud/zigbee/tools/zcl/Context.java index 5439d60bc..18b4b3d35 100644 --- a/code-generator/src/main/java/org/bubblecloud/zigbee/tools/zcl/Context.java +++ b/code-generator/src/main/java/org/bubblecloud/zigbee/tools/zcl/Context.java @@ -15,6 +15,8 @@ public class Context { 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/code-generator/src/main/java/org/bubblecloud/zigbee/tools/zcl/ZclDataType.java b/code-generator/src/main/java/org/bubblecloud/zigbee/tools/zcl/ZclDataType.java new file mode 100644 index 000000000..53a258771 --- /dev/null +++ b/code-generator/src/main/java/org/bubblecloud/zigbee/tools/zcl/ZclDataType.java @@ -0,0 +1,69 @@ +package org.bubblecloud.zigbee.tools.zcl; + +import java.util.HashMap; +import java.util.Map; + +public class ZclDataType { + + public static class DataTypeMap { + public String dataClass; + public Integer id; + public Integer length; + public Integer invalid; + + DataTypeMap(String dataClass, int id, int length) { + this(dataClass, id, length, 0); + } + + DataTypeMap(String dataClass, int id, int length, int invalid) { + this.dataClass = dataClass; + this.id = id; + this.length = length; + this.invalid = invalid; + } + }; + + final static Map dataTypeMapping; + + static { + dataTypeMapping = new HashMap(); + + dataTypeMapping.put("CHARACTER_STRING", new DataTypeMap("String", 0x42, -1)); + dataTypeMapping.put("IEEE_ADDRESS", new DataTypeMap("Long", 0xf0, 8, 0xffffffff)); + dataTypeMapping.put("N_X_EXTENSION_FIELD_SET", new DataTypeMap("List", 0, 0)); + dataTypeMapping.put("N_X_NEIGHBORS_INFORMATION", new DataTypeMap("List", 0, 0)); + dataTypeMapping.put("N_X_UNSIGNED_16_BIT_INTEGER", new DataTypeMap("List", 0, 0)); + dataTypeMapping.put("N_X_UNSIGNED_8_BIT_INTEGER", new DataTypeMap("List", 0, 0)); + dataTypeMapping.put("N_X_ATTRIBUTE_IDENTIFIER", new DataTypeMap("List", 0, 0)); + dataTypeMapping.put("N_X_READ_ATTRIBUTE_STATUS_RECORD", + new DataTypeMap("List", 0, 0)); + dataTypeMapping.put("N_X_WRITE_ATTRIBUTE_RECORD", new DataTypeMap("List", 0, 0)); + dataTypeMapping.put("N_X_WRITE_ATTRIBUTE_STATUS_RECORD", new DataTypeMap("List", 0, + 0)); + dataTypeMapping.put("N_X_ATTRIBUTE_REPORTING_CONFIGURATION_RECORD", new DataTypeMap( + "List", 0, 0)); + dataTypeMapping.put("N_X_ATTRIBUTE_STATUS_RECORD", new DataTypeMap("List", 0, 0)); + dataTypeMapping.put("N_X_ATTRIBUTE_RECORD", new DataTypeMap("List", 0, 0)); + dataTypeMapping.put("N_X_ATTRIBUTE_REPORT", new DataTypeMap("List", 0, 0)); + dataTypeMapping.put("N_X_ATTRIBUTE_INFORMATION", new DataTypeMap("List", 0, 0)); + dataTypeMapping.put("N_X_ATTRIBUTE_SELECTOR", new DataTypeMap("Object", 0, 0)); + dataTypeMapping.put("BOOLEAN", new DataTypeMap("Boolean", 0x10, 1, 0xff)); + dataTypeMapping.put("SIGNED_32_BIT_INTEGER", new DataTypeMap("Integer", 0x2b, 4, 0x80000000)); + dataTypeMapping.put("SIGNED_16_BIT_INTEGER", new DataTypeMap("Integer", 0x29, 2, 0x8000)); + dataTypeMapping.put("SIGNED_8_BIT_INTEGER", new DataTypeMap("Integer", 0x28, 1, 0x80)); + dataTypeMapping.put("UNSIGNED_16_BIT_INTEGER", new DataTypeMap("Integer", 0x21, 2, 0xffff)); + dataTypeMapping.put("UNSIGNED_32_BIT_INTEGER", new DataTypeMap("Integer", 0x23, 4, 0xffffffff)); + dataTypeMapping.put("UNSIGNED_8_BIT_INTEGER", new DataTypeMap("Integer", 0x20, 1, 0xff)); + dataTypeMapping.put("BITMAP_16_BIT", new DataTypeMap("Integer", 0x19, 2)); + dataTypeMapping.put("BITMAP_8_BIT", new DataTypeMap("Integer", 0x18, 1)); + dataTypeMapping.put("ENUMERATION_16_BIT", new DataTypeMap("Integer", 0x31, 2, 0xffff)); + dataTypeMapping.put("ENUMERATION_8_BIT", new DataTypeMap("Integer", 0x30, 1, 0xff)); + dataTypeMapping.put("DATA_8_BIT", new DataTypeMap("Integer", 0x08, 1)); + dataTypeMapping.put("OCTET_STRING", new DataTypeMap("String", 0x41, -1)); + dataTypeMapping.put("UTCTIME", new DataTypeMap("Calendar", 0xe2, 4, 0xffffffff)); + }; + + public static Map getDataTypeMapping() { + return dataTypeMapping; + } +} diff --git a/code-generator/src/main/resources/zcl.def b/code-generator/src/main/resources/zcl.def deleted file mode 100644 index 20a589059..000000000 --- a/code-generator/src/main/resources/zcl.def +++ /dev/null @@ -1,1132 +0,0 @@ -* 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] -|Field Name |Data Type | -|---------------------------+---------------------------| -|Identifiers |N X Attribute identifier | - -**** Read Attributes Response Command [0x01] -|Field Name |Data Type | -|---------------------------+---------------------------| -|Records |N X Read attribute status record | - -**** Write Attributes Command [0x02] -|Field Name |Data Type | -|---------------------------+---------------------------| -|Records |N X Write attribute record | - -**** Write Attributes Undivided Command [0x03] -|Field Name |Data Type | -|---------------------------+---------------------------| -|Records |N X Write attribute record | - -**** Write Attributes Response Command [0x04] -|Field Name |Data Type | -|---------------------------+---------------------------| -|Records |N X Write attribute status record | - -**** Write Attributes No Response Command [0x05] -|Field Name |Data Type | -|---------------------------+---------------------------| -|Records |N X Write attribute record | - -**** Configure Reporting Command [0x06] -|Field Name |Data Type | -|---------------------------+---------------------------| -|Records |N X Attribute reporting configuration record| - -**** Configure Reporting Response Command [0x07] -|Field Name |Data Type | -|---------------------------+---------------------------| -|Records |N X Attribute status record| - -**** Read Reporting Configuration Command [0x08] -|Field Name |Data Type | -|---------------------------+---------------------------| -|Records |N X Attribute record | - -**** Read Reporting Configuration Response Command [0x09] -|Field Name |Data Type | -|---------------------------+---------------------------| -|Records |N X Attribute reporting configuration record| - -**** Report Attributes Command [0x0a] -|Field Name |Data Type | -|---------------------------+---------------------------| -|Reports |N X Attribute report | - -**** Default Response Command [0x0b] -|Field Name |Data Type | -|---------------------------+---------------------------| -|Command identifier |Unsigned 8-bit integer | -|Status code |8-bit enumeration | - -**** Discover Attributes Command [0x0c] -|Field Name |Data Type | -|---------------------------+---------------------------| -|Start attribute identifier |Unsigned 16-bit integer | -|Maximum attribute identifiers |Unsigned 8-bit integer | - -**** Discover Attributes Response Command [0x0d] -|Field Name |Data Type | -|---------------------------+---------------------------| -|Command identifier |Boolean | -|Information |N X Attribute information | - -**** Read Attributes Structured Command [0x0e] -|Field Name |Data Type | -|---------------------------+---------------------------| -|Attribute selectors |N X Attribute selector | - -**** Write Attributes Structured Command [0x0f] -|Field Name |Data Type | -|---------------------------+---------------------------| -|Attribute selectors |N X Attribute selector | - -**** Write Attributes Structured Response Command [0x10] -|Field Name |Data Type | -|---------------------------+---------------------------| -|Records |N X Write attribute status record | - -** Basic [0x0000] - -*** Received - -**** Reset to Factory Defaults Command [0x00] -|Field Name |Data Type | -|---------------------------+---------------------------| - -*** Generated - -No cluster specific commands. - -** Power configuration [0x0001] - -*** 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] - -*** Received - -**** Identify Command [0x00] -|Field Name |Data Type | -|---------------------------+---------------------------| -|Identify Time |Unsigned 16-bit integer | - -**** Identify Query Command [0x01] -|Field Name |Data Type | -|---------------------------+---------------------------| - -*** Generated - -**** Identify Query Response Command [0x00] -|Field Name |Data Type | -|---------------------------+---------------------------| -|Identify Time |Unsigned 16-bit integer | - -** Groups [0x0004] - -*** 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] - -*** Received - -**** Add Scene Command [0x00] -|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] -|Field Name |Data Type | -|---------------------------+---------------------------| -|Group ID |Unsigned 16-bit integer | -|Scene ID |Unsigned 8-bit integer | - -**** Remove Scene Command [0x02] -|Field Name |Data Type | -|---------------------------+---------------------------| -|Group ID |Unsigned 16-bit integer | -|Scene ID |Unsigned 8-bit integer | - -**** Remove All Scenes Command [0x03] -|Field Name |Data Type | -|---------------------------+---------------------------| -|Group ID |Unsigned 16-bit integer | - -**** Store Scene Command [0x04] -|Field Name |Data Type | -|---------------------------+---------------------------| -|Group ID |Unsigned 16-bit integer | -|Scene ID |Unsigned 8-bit integer | - -**** Recall Scene Command [0x05] -|Field Name |Data Type | -|---------------------------+---------------------------| -|Group ID |Unsigned 16-bit integer | -|Scene ID |Unsigned 8-bit integer | - -**** Get Scene Membership Command [0x06] -|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] -*** Received - -**** Off Command [0x00] -|Field Name |Data Type | -|---------------------------+---------------------------| - -**** On Command [0x01] -|Field Name |Data Type | -|---------------------------+---------------------------| - -**** Toggle Command [0x02] -|Field Name |Data Type | -|---------------------------+---------------------------| - -*** Generated - -No cluster specific commands. - -** On/off Switch Configuration [0x0007] - -*** Received - -No cluster specific commands. - -*** Generated - -No cluster specific commands. - -** Level Control [0x0008] - -*** Received - -**** Move to Level Command [0x00] -|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] - -*** 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] -|Field Name |Data Type | -|---------------------------+---------------------------| -|Alarm code |8-bit enumeration | -|Cluster identifier |Unsigned 16-bit integer | - -**** Get Alarm Response Command [0x01] -|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] - -*** Received - -No cluster specific commands. - -*** Generated - -** RSSI Location [0x000b] - -*** 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] - -*** 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] - -*** Received - -No cluster specific commands. - -*** Generated - -No cluster specific commands. - -** Multistate Output (Basic) [0x0013] - -*** Received - -No cluster specific commands. - -*** Generated - -No cluster specific commands. - -** Multistate Value (Basic) [0x0014] - -*** 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 | - -* Closures -** Shade Configuration [0x0100] - -*** Received - -No cluster specific commands. - -*** 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] - -*** Received - -**** Setpoint Raise/Lower Command [0x00] -|Field Name |Data Type | -|---------------------------+---------------------------| -|Mode |8-bit enumeration | -|Amount |Signed 8-bit integer | - -*** Generated - -No cluster specific commands. - -** 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] - -*** 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 | - -*** Generated - -No cluster specific commands. - -** Ballast Configuration [0x0301] - -*** Received - -No cluster specific commands. - -*** Generated - -No cluster specific commands. - -* Measurement and Sensing - -** Illuminance measurement [0x0400] - -*** Received - -No cluster specific commands. - -*** Generated - -No cluster specific commands. - -** Illuminance level sensing [0x0401] - -*** Received - -No cluster specific commands. - -*** Generated - -No cluster specific commands. - -** Temperature measurement [0x0402] - -*** Received - -No cluster specific commands. - -*** Generated - -No cluster specific commands. - -** Pressure measurement [0x0403] - -*** Received - -No cluster specific commands. - -*** Generated - -No cluster specific commands. - -** Flow measurement [0x0404] - -*** Received - -No cluster specific commands. - -*** Generated - -No cluster specific commands. - -** Relative humidity measurement [0x0405] - -*** Received - -No cluster specific commands. - -*** Generated - -No cluster specific commands. - -** Occupancy sensing [0x0406] - -*** Received - -No cluster specific commands. - -*** Generated - -No cluster specific commands. - -* Security and Safety - -** IAS Zone [0x500] - -*** Received - -**** Zone Enroll Response Command [0x00] -|Field Name |Data Type | -|---------------------------+---------------------------| -|Enroll response code |8-bit enumeration | -|Zone ID |Unsigned 8-bit integer | - -*** 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] -|Field Name |Data Type | -|---------------------------+---------------------------| -|Zone Type |16-bit enumeration | -|Manufacturer Code |Unsigned 16-bit integer | - -** IAS ACE [0x0501] - -*** Received - -**** Arm Command [0x00] -|Field Name |Data Type | -|---------------------------+---------------------------| -|Arm Mode |8-bit enumeration | - -**** Bypass Command [0x01] -|Field Name |Data Type | -|---------------------------+---------------------------| -|Number of Zones |Unsigned 8-bit integer | -|Zone IDs |N X Unsigned 8-bit integer | - -**** 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 | - -*** Generated - -**** Arm Response Command [0x00] -|Field Name |Data Type | -|---------------------------+---------------------------| -|Arm Notification |8-bit enumeration | - -**** Get Zone ID Map Response Command [0x01] -|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 | - -** IAS WD [0x0502] - -*** Received - -**** Start Warning Command [0x00] -|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 \ No newline at end of file diff --git a/code-generator/src/main/resources/zcl_definition.md b/code-generator/src/main/resources/zcl_definition.md new file mode 100644 index 000000000..54f779b75 --- /dev/null +++ b/code-generator/src/main/resources/zcl_definition.md @@ -0,0 +1,2156 @@ +# 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] +|Field Name |Data Type | +|---------------------------|---------------------------| +|Identifiers |N X Attribute identifier | + +#### Read Attributes Response Command [0x01] +|Field Name |Data Type | +|---------------------------|---------------------------| +|Records |N X Read attribute status record | + +#### Write Attributes Command [0x02] +|Field Name |Data Type | +|---------------------------|---------------------------| +|Records |N X Write attribute record | + +#### Write Attributes Undivided Command [0x03] +|Field Name |Data Type | +|---------------------------|---------------------------| +|Records |N X Write attribute record | + +#### Write Attributes Response Command [0x04] +|Field Name |Data Type | +|---------------------------|---------------------------| +|Records |N X Write attribute status record | + +#### Write Attributes No Response Command [0x05] +|Field Name |Data Type | +|---------------------------|---------------------------| +|Records |N X Write attribute record | + +#### Configure Reporting Command [0x06] +|Field Name |Data Type | +|---------------------------|---------------------------| +|Records |N X Attribute reporting configuration record| + +#### Configure Reporting Response Command [0x07] +|Field Name |Data Type | +|---------------------------|---------------------------| +|Records |N X Attribute status record| + +#### Read Reporting Configuration Command [0x08] +|Field Name |Data Type | +|---------------------------|---------------------------| +|Records |N X Attribute record | + +#### Read Reporting Configuration Response Command [0x09] +|Field Name |Data Type | +|---------------------------|---------------------------| +|Records |N X Attribute reporting configuration record| + +#### Report Attributes Command [0x0a] +|Field Name |Data Type | +|---------------------------|---------------------------| +|Reports |N X Attribute report | + +#### Default Response Command [0x0b] +|Field Name |Data Type | +|---------------------------|---------------------------| +|Command identifier |Unsigned 8-bit integer | +|Status code |8-bit enumeration | + +#### Discover Attributes Command [0x0c] +|Field Name |Data Type | +|---------------------------|---------------------------| +|Start attribute identifier |Unsigned 16-bit integer | +|Maximum attribute identifiers |Unsigned 8-bit integer | + +#### Discover Attributes Response Command [0x0d] +|Field Name |Data Type | +|---------------------------|---------------------------| +|Command identifier |Boolean | +|Information |N X Attribute information | + +#### Read Attributes Structured Command [0x0e] +|Field Name |Data Type | +|---------------------------|---------------------------| +|Attribute selectors |N X Attribute selector | + +#### Write Attributes Structured Command [0x0f] +|Field Name |Data Type | +|---------------------------|---------------------------| +|Attribute selectors |N X Attribute selector | + +#### Write Attributes Structured Response Command [0x10] +|Field Name |Data Type | +|---------------------------|---------------------------| +|Records |N X Write attribute status record | + +## 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 | | + +#### 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. + +#### 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. + +#### 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. + + +### Received + +#### Reset to Factory Defaults Command [0x00] +|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 | | +|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 | | + + + +#### 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 (see 3.11.2.3.1) 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 (see 3.11.2.3.1) 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. + +#### 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 | + +#### OnOff Attribute +The OnOff attribute has the following values: 0 = Off, 1 = On + +### Received + +#### Off Command [0x00] +|Field Name |Data Type | +|---------------------------|---------------------------| + +#### On Command [0x01] +|Field Name |Data Type | +|---------------------------|---------------------------| + +#### Toggle Command [0x02] +|Field Name |Data Type | +|---------------------------|---------------------------| + +### Generated + +No cluster specific commands. + +## On/off Switch Configuration [0x0007] +Attributes and commands for configuring On/Off switching devices + +### 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 | +|0x0000 |RemainingTime |Unsigned 16-bit integer |Read Only |Optional | | +|0x0000 |OnOffTransitionTime |Unsigned 16-bit integer |Read/Write |Optional | | +|0x0000 |OnLevel |Unsigned 8-bit integer |Read/Write |Optional | | + +#### CurrentLevel Attribute +The CurrentLevel attribute represents the current level of this device. The +meaning of 'level' is device dependent. + +#### 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. + +### Received + +#### Move to Level Command [0x00] +|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] +|Field Name |Data Type | +|---------------------------|---------------------------| +|Alarm code |8-bit enumeration | +|Cluster identifier |Unsigned 16-bit integer | + +#### Get Alarm Response Command [0x01] +|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] + +### 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] + +### Received + +No cluster specific commands. + +### Generated + +No cluster specific commands. + +## Multistate Output (Basic) [0x0013] + +### Received + +No cluster specific commands. + +### Generated + +No cluster specific commands. + +## Multistate Value (Basic) [0x0014] + +### 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 | + +# Closures +## Shade Configuration [0x0100] + +### Received + +No cluster specific commands. + +### 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] + +### Received + +#### Setpoint Raise/Lower Command [0x00] +|Field Name |Data Type | +|---------------------------|---------------------------| +|Mode |8-bit enumeration | +|Amount |Signed 8-bit integer | + +### Generated + +No cluster specific commands. + +## 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 | | + +#### 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 + +### 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 | + +### 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 | | + +#### 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 |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 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 |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 |Mandatory | +|0x0003 |Tolerance |Unsigned 16-bit Integer |Read only |Optional | | +|0x0010 |ScaledValue |Unsigned 16-bit Integer |Read only |Optional |Mandatory | +|0x0011 |MinScaledValue |Unsigned 16-bit Integer |Read only |Optional | | +|0x0012 |MaxScaledValue |Unsigned 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. + +#### PIROccupiedToUnoccupiedTime 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. + +#### PIRUnoccupiedToOccupiedTime 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 [0x500] +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 |8-bit Enumeration |Read only |Mandatory | | +|0x0002 |ZoneStatus |16-bit Bitmap |Read only |Mandatory | | +|0x0010 |IAS_CIE_Address |IEEE Address |Read/Write |Mandatory | | + +#### ZoneState Attribute + +#### ZoneType Attribute +The Zone Type dictates the meaning of Alarm1 and Alarm2 bits of the ZoneStatus attribute + +#### ZoneStatus Attribute +The ZoneStatus attribute is a bit map. + +#### IAS_CIE_Address 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. + +### Received + +#### Zone Enroll Response Command [0x00] +|Field Name |Data Type | +|---------------------------|---------------------------| +|Enroll response code |8-bit Enumeration | +|Zone ID |Unsigned 8-bit Integer | + +### 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] +|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] +|Field Name |Data Type | +|---------------------------|---------------------------| +|Arm Mode |8-bit Enumeration | + +#### Bypass Command [0x01] +|Field Name |Data Type | +|---------------------------|---------------------------| +|Number of Zones |Unsigned 8-bit integer | +|Zone IDs |N X Unsigned 8-bit integer | + +#### 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 | + +### Generated + +#### Arm Response Command [0x00] +|Field Name |Data Type | +|---------------------------|---------------------------| +|Arm Notification |8-bit enumeration | + +#### Get Zone ID Map Response Command [0x01] +|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 | + +## 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 diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/CommandResponseMatcher.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/CommandResponseMatcher.java index d71bb3f40..6952d5b9f 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/CommandResponseMatcher.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/CommandResponseMatcher.java @@ -1,7 +1,7 @@ package org.bubblecloud.zigbee.v3; /** - * Matches command for response. + * Defines the interface for the response matcher */ public interface CommandResponseMatcher { /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/CommandResult.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/CommandResult.java index fc0292549..60ccf2112 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/CommandResult.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/CommandResult.java @@ -1,7 +1,8 @@ package org.bubblecloud.zigbee.v3; import org.bubblecloud.zigbee.v3.model.Status; -import org.bubblecloud.zigbee.v3.zcl.protocol.command.general.DefaultResponseCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.DefaultResponse; +import org.bubblecloud.zigbee.v3.zdo.ZdoResponse; /** * Value class containing command response. @@ -81,7 +82,7 @@ public boolean isError() { */ public boolean hasStatusCode() { if (response != null) { - return response instanceof DefaultResponseCommand || response instanceof ZdoResponse; + return response instanceof DefaultResponse || response instanceof ZdoResponse; } else { return false; } @@ -93,8 +94,8 @@ public boolean hasStatusCode() { */ public Integer getStatusCode() { if (hasStatusCode()) { - if (response instanceof DefaultResponseCommand) { - return ((DefaultResponseCommand) response).getStatusCode(); + if (response instanceof DefaultResponse) { + return ((DefaultResponse) response).getStatusCode(); } else { return ((ZdoResponse) response).getStatus(); } diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/ZigBeeApi.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/ZigBeeApi.java index 2caa2d23f..016a84a04 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/ZigBeeApi.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/ZigBeeApi.java @@ -2,32 +2,39 @@ import org.bubblecloud.zigbee.util.ZigBeeConstants; import org.bubblecloud.zigbee.v3.model.ZToolAddress16; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; +import org.bubblecloud.zigbee.v3.zcl.ZclCustomResponseMatcher; +import org.bubblecloud.zigbee.v3.zcl.ZclResponseMatcher; +import org.bubblecloud.zigbee.v3.zcl.clusters.ZclOnOffCluster; +import org.bubblecloud.zigbee.v3.zcl.clusters.colorcontrol.MoveToColorCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.doorlock.LockDoorCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.doorlock.UnlockDoorCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.ConfigureReportingCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.ReadAttributesCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.WriteAttributesCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.groups.AddGroupCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.groups.GetGroupMembershipCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.groups.RemoveGroupCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.groups.ViewGroupCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.iaswd.SquawkCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.iaswd.StartWarningCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.levelcontrol.MoveToLevelCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.onoff.OffCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.onoff.OnCommand; import org.bubblecloud.zigbee.v3.zcl.field.AttributeIdentifier; import org.bubblecloud.zigbee.v3.zcl.field.AttributeReportingConfigurationRecord; import org.bubblecloud.zigbee.v3.zcl.field.Unsigned16BitInteger; import org.bubblecloud.zigbee.v3.zcl.field.WriteAttributeRecord; import org.bubblecloud.zigbee.v3.zcl.protocol.ZclAttributeType; -import org.bubblecloud.zigbee.v3.zcl.protocol.command.color.control.MoveToColorCommand; -import org.bubblecloud.zigbee.v3.zcl.protocol.command.door.lock.LockDoorCommand; -import org.bubblecloud.zigbee.v3.zcl.protocol.command.door.lock.UnlockDoorCommand; -import org.bubblecloud.zigbee.v3.zcl.protocol.command.general.ConfigureReportingCommand; -import org.bubblecloud.zigbee.v3.zcl.protocol.command.general.ReadAttributesCommand; -import org.bubblecloud.zigbee.v3.zcl.protocol.command.general.WriteAttributesCommand; -import org.bubblecloud.zigbee.v3.zcl.protocol.command.groups.AddGroupCommand; -import org.bubblecloud.zigbee.v3.zcl.protocol.command.groups.GetGroupMembershipCommand; -import org.bubblecloud.zigbee.v3.zcl.protocol.command.groups.RemoveGroupCommand; -import org.bubblecloud.zigbee.v3.zcl.protocol.command.groups.ViewGroupCommand; -import org.bubblecloud.zigbee.v3.zcl.protocol.command.ias.wd.SquawkCommand; -import org.bubblecloud.zigbee.v3.zcl.protocol.command.ias.wd.StartWarningCommand; -import org.bubblecloud.zigbee.v3.zcl.protocol.command.level.control.MoveToLevelCommand; -import org.bubblecloud.zigbee.v3.zcl.protocol.command.on.off.OffCommand; -import org.bubblecloud.zigbee.v3.zcl.protocol.command.on.off.OnCommand; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclClusterType; +import org.bubblecloud.zigbee.v3.zdo.ZdoResponseMatcher; import org.bubblecloud.zigbee.v3.zdo.command.*; import org.bubblecloud.zigbee.util.Cie; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.lang.reflect.Constructor; import java.util.*; import java.util.concurrent.*; @@ -266,8 +273,11 @@ public Future unbind(final ZigBeeDevice source, final ZigBeeDevic * @return the command result future. */ public Future on(final ZigBeeDestination destination) { - final OnCommand command = new OnCommand(); - return send(destination, command); + ZclOnOffCluster cluster = (ZclOnOffCluster)getCluster(ZclClusterType.ON_OFF, destination); + return cluster.onCommand(); + +// final OnCommand command = new OnCommand(); +// return send(destination, command); } @@ -578,7 +588,7 @@ public Future removeMembership(final ZigBeeDevice device, final i * @param command the command * @return the command result future */ - private Future send(ZigBeeDestination destination, ZclCommand command) { + public Future send(ZigBeeDestination destination, ZclCommand command) { if (destination.isGroup()) { command.setDestinationGroupId(((ZigBeeGroup) destination).getGroupId()); return broadcast(command); @@ -706,4 +716,15 @@ protected void removeCommandExecution(CommandExecution expiredCommandExecution) } } + ZclCluster getCluster(final ZclClusterType clusterType, final ZigBeeDestination zigbeeDevice) { + Constructor constructor; + try { + constructor = clusterType.getClusterClass().getConstructor(ZigBeeApi.class, ZigBeeDevice.class); + return constructor.newInstance(this, zigbeeDevice); + } catch (Exception e) { + LOGGER.error("Command processor error"); + return null; + } + } + } diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/ZigBeeDestination.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/ZigBeeDestination.java index 073f8b2af..2491623d9 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/ZigBeeDestination.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/ZigBeeDestination.java @@ -1,7 +1,5 @@ package org.bubblecloud.zigbee.v3; -import org.codehaus.jackson.annotate.JsonIgnore; - /** * ZigBee destination can be either group or device. */ diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/ZclAttribute.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/ZclAttribute.java new file mode 100644 index 000000000..52539d8d9 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/ZclAttribute.java @@ -0,0 +1,227 @@ +package org.bubblecloud.zigbee.v3.zcl; + +import java.util.Calendar; + +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +public class ZclAttribute { + /** + * The attribute identifier field is 16-bits in length and shall contain the + * identifier of the attribute that the reporting configuration details + * apply to. + */ + private final int id; + + /** + * Defines the ZigBee data type. + */ + private final ZclDataType dataType; + + /** + * Defines if this attribute is mandatory to be implemented + */ + private final boolean mandatory; + + /** + * Defines if the attribute is implemented by the device + */ + private boolean implemented; + + private boolean readable; + + private boolean writeable; + + private boolean reportable; + + /** + * The minimum reporting interval field is 16-bits in length and shall + * contain the minimum interval, in seconds, between issuing reports for the + * attribute specified in the attribute identifier field. If the minimum + * reporting interval has not been configured, this field shall contain the + * value 0xffff. + */ + private int minimumReportingPeriod; + + /** + * The maximum reporting interval field is 16-bits in length and shall + * contain the maximum interval, in seconds, between issuing reports for the + * attribute specified in the attribute identifier field. If the maximum + * reporting interval has not been configured, this field shall contain the + * value 0xffff. + */ + private int maximumReportingPeriod; + + /** + * The reportable change field shall contain the minimum change to the + * attribute that will result in a report being issued. For attributes with + * 'analog' data type the field has the same data type as the attribute. If + * the reportable change has not been configured, this field shall contain + * the invalid value for the relevant data type + */ + private Object reportingChange; + + /** + * The timeout period field is 16-bits in length and shall contain the + * maximum expected time, in seconds, between received reports for the + * attribute specified in the attribute identifier field. If the timeout + * period has not been configured, this field shall contain the value + * 0xffff. + */ + private int reportingTimeout; + + /** + * Records the last time a report was received + */ + private Calendar lastReportTime; + + /** + * Records the last value received + */ + private Object lastValue; + + /** + * Constructor used to set the static information + * + * @param id + * @param dataType + * @param mandatory + * @param readable + * @param writeable + * @param reportable + */ + public ZclAttribute(final int id, final ZclDataType dataType, final boolean mandatory, final boolean readable, + final boolean writeable, final boolean reportable) { + this.id = id; + this.dataType = dataType; + this.mandatory = mandatory; + this.readable = readable; + this.writeable = writeable; + this.reportable = reportable; + } + + /** + * Gets the attribute ID + * + * @return the attribute ID + */ + public int getId() { + return id; + } + + /** + * Returns true if the implementation of this attribute in the cluster is + * mandatory as required by the ZigBee standard.
    + * Note that this does not necessarily mean that the attribute is actually + * implemented in any device if it does not conform to the standard. + * + * @return true if the attribute must be implemented + */ + public boolean isMandatory() { + return mandatory; + } + + /** + * Returns true if this attribute is supported by this device + * + * @return true if the attribute is supported + */ + public boolean isImplemented() { + return implemented; + } + + public boolean isReadable() { + return readable; + } + + public boolean isWritable() { + return writeable; + } + + public boolean isReportable() { + return reportable; + } + + /** + * Gets the {@link ZigBeeType} of this attribute + * + * @return the {@link ZigBeeType} of this attribute + */ + public ZclDataType getDataType() { + return dataType; + } + + /** + * Gets the minimum reporting interval in seconds.
    + * The minimum reporting interval field is 16-bits in length and shall + * contain the minimum interval, in seconds, between issuing reports for the + * attribute specified in the attribute identifier field. If the minimum + * reporting interval has not been configured, this field shall contain the + * value 0xffff. + * + * @return minimum reporting period in seconds + */ + public int getMinimumReportingPeriod() { + return minimumReportingPeriod; + } + + /** + * Gets the maximum reporting interval in seconds.
    + * The maximum reporting interval field is 16-bits in length and shall + * contain the maximum interval, in seconds, between issuing reports for the + * attribute specified in the attribute identifier field. If the maximum + * reporting interval has not been configured, this field shall contain the + * value 0xffff. + * + * @return maximum reporting period in seconds + */ + public int getMaximumReportingPeriod() { + return maximumReportingPeriod; + } + + /** + * Gets the reportable change field.
    + * The reportable change field shall contain the minimum change to the + * attribute that will result in a report being issued. For attributes with + * 'analog' data type the field has the same data type as the attribute. If + * the reportable change has not been configured, this field shall contain + * the invalid value for the relevant data type + * + * @return + */ + public Object getReportingChange() { + return reportingChange; + } + + /** + * Gets the reporting timeout in seconds.
    + * The timeout period field is 16-bits in length and shall contain the + * maximum expected time, in seconds, between received reports for the + * attribute specified in the attribute identifier field. If the timeout + * period has not been configured, this field shall contain the value + * 0xffff. + * + * @return + */ + public int getReportingTimeout() { + return reportingTimeout; + } + + /** + * Gets the last reported value of this attribute + * + * @return the last value, or null if no update has been received + */ + public Object getLastValue() { + return lastValue; + } + + /** + * Gets the last report time of this attribute + * + * @return the time of the last report, or null if not reports have been + * received + */ + public Calendar getLastReportTime() { + return lastReportTime; + } +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/ZclCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/ZclCluster.java new file mode 100644 index 000000000..9e9066cd9 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/ZclCluster.java @@ -0,0 +1,138 @@ +package org.bubblecloud.zigbee.v3.zcl; + +import java.util.HashSet; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.Future; + +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Base class for the ZCL Cluster + * @author Chris Jackson + * + */ +public abstract class ZclCluster { + + private final ZigBeeApi zigbeeApi; + private final ZigBeeDevice zigbeeDevice; + protected final int clusterId; + + protected Map attributes = initializeAttributes(); + + protected abstract Map initializeAttributes(); + + public ZclCluster(ZigBeeApi zigbeeApi, ZigBeeDevice zigbeeDevice, int clusterId) { + this.zigbeeApi = zigbeeApi; + this.zigbeeDevice = zigbeeDevice; + this.clusterId = clusterId; + } + + protected Future send(ZclCommand command) { + command.setDestinationAddress(zigbeeDevice.getNetworkAddress()); + command.setDestinationEndpoint(zigbeeDevice.getEndpoint()); + return zigbeeApi.unicast(command); + } + + /** + * Read an attribute + * + * @param attributeId + * @return + */ + protected Future read(final int attributeId) { + return zigbeeApi.read(zigbeeDevice, clusterId, attributeId); + /* + * final ReadAttributesCommand command = new ReadAttributesCommand(); + * + * command.setClusterId(clusterId); final AttributeIdentifier + * attributeIdentifier = new AttributeIdentifier(); + * attributeIdentifier.setAttributeIdentifier(attributeId); + * command.setIdentifiers + * (Collections.singletonList(attributeIdentifier)); + * + * command.setDestinationAddress(device.getNetworkAddress()); + * command.setDestinationEndpoint(device.getEndpoint()); + * + * return unicast(command); + */ + } + + /** + * Write an attribute + * + * @param attributeId + * @param value + * @return + */ + protected Future write(final int attributeId, ZclDataType dataType, final Object value) { + return zigbeeApi.write(zigbeeDevice, clusterId, attributeId, value); + /* + * final WriteAttributesCommand command = new WriteAttributesCommand(); + * command.setClusterId(clusterId); + * + * final WriteAttributeRecord record = new WriteAttributeRecord(); + * record.setAttributeIdentifier(attributeId); + * record.setAttributeDataType(ZclAttributeType.get(clusterId, + * attributeId).getZigBeeType().getId()); + * record.setAttributeValue(value); + * command.setRecords(Collections.singletonList(record)); + * + * command.setDestinationAddress(zigbeeDevice.getNetworkAddress()); + * command.setDestinationEndpoint(zigbeeDevice.getEndpoint()); + * + * return zigbeeApi.unicast(command); + */ + } + + public Future report(final int attributeId, final int minInterval, final int maxInterval, + final Object reportableChange) { + return zigbeeApi.report(zigbeeDevice, clusterId, attributeId, minInterval, maxInterval, reportableChange); + /* + * final ConfigureReportingCommand command = new + * ConfigureReportingCommand(); + * + * command.setClusterId(clusterId); + * + * final AttributeReportingConfigurationRecord record = new + * AttributeReportingConfigurationRecord(); record.setDirection(0); + * record.setAttributeIdentifier(attributeId); + * record.setAttributeDataType(ZclAttributeType .get(clusterId, + * attributeId).getZigBeeType().getId()); + * record.setMinimumReportingInterval(minInterval); + * record.setMinimumReportingInterval(maxInterval); + * record.setReportableChange(reportableChange); + * record.setTimeoutPeriod(0); + * command.setRecords(Collections.singletonList(record)); + * + * command.setDestinationAddress(device.getNetworkAddress()); + * command.setDestinationEndpoint(device.getEndpoint()); + * + * return unicast(command, new ZclCustomResponseMatcher()); + */ + } + + /** + * Gets all the attributes supported by this cluster + * This will return all attributes, even if they are not actually supported by the device. + * The user should check to see if this is implemented. + * @return {@link Set} containing all {@link ZclAttributes} available in this cluster + */ + public Set getAttributes() { + Set attr = new HashSet(); + attr.addAll(attributes.values()); + return attr; + } + + /** + * Gets an attribute from the attribute ID + * @param id the attribute ID + * @return the {@link ZclAttribute} + */ + public ZclAttribute getAttribute(int id) { + return attributes.get(id); + } +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/ZclCommandMessage.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/ZclCommandMessage.java index 2c7442caa..8faa7c967 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/ZclCommandMessage.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/ZclCommandMessage.java @@ -17,7 +17,6 @@ import org.bubblecloud.zigbee.v3.zcl.protocol.ZclClusterType; import org.bubblecloud.zigbee.v3.zcl.protocol.ZclCommandType; -import org.bubblecloud.zigbee.v3.zcl.protocol.ZclCommandTypeRegistrar; import org.bubblecloud.zigbee.v3.zcl.protocol.ZclFieldType; import java.util.Map; @@ -218,14 +217,19 @@ public void setTransactionId(final Byte transactionId) { @Override public String toString() { Integer resolvedClusterId = getClusterId(); - if (resolvedClusterId == null) { + StringBuilder sb = new StringBuilder(); + if (resolvedClusterId == null && type != null) { resolvedClusterId = type.getClusterType().getId(); + + sb.append(ZclClusterType.getValueById(resolvedClusterId).getLabel() + " - " + type + " "); } - return ZclClusterType.getValueById(resolvedClusterId).getLabel() + " - " + type + " " + sourceAddress + "." + sourceEnpoint + " -> " - + destinationAddress + "." + destinationEndpoint + " tid=" + transactionId + " " + fields; - } - - static { - ZclCommandTypeRegistrar.register(); + else { + sb.append("ZCL unknown "); + } + + sb.append(sourceAddress + "." + sourceEnpoint + " -> " + + destinationAddress + "." + destinationEndpoint + " tid=" + transactionId + " " + fields); + + return sb.toString(); } } diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/ZclCommandProtocol.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/ZclCommandProtocol.java index 84fec3e76..05290283a 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/ZclCommandProtocol.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/ZclCommandProtocol.java @@ -15,6 +15,7 @@ */ package org.bubblecloud.zigbee.v3.zcl; +import org.bubblecloud.zigbee.v3.zcl.ZclCommandFormat; import org.bubblecloud.zigbee.v3.zcl.protocol.ZclCommandType; import org.bubblecloud.zigbee.v3.zcl.protocol.ZclFieldType; diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/ZclCustomResponseMatcher.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/ZclCustomResponseMatcher.java similarity index 63% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/ZclCustomResponseMatcher.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/ZclCustomResponseMatcher.java index 0d25240d2..c1c37ad51 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/ZclCustomResponseMatcher.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/ZclCustomResponseMatcher.java @@ -1,10 +1,15 @@ -package org.bubblecloud.zigbee.v3; +package org.bubblecloud.zigbee.v3.zcl; -import org.bubblecloud.zigbee.v3.zcl.ZclCommand; -import org.bubblecloud.zigbee.v3.zcl.protocol.command.general.DefaultResponseCommand; +import org.bubblecloud.zigbee.v3.Command; +import org.bubblecloud.zigbee.v3.CommandResponseMatcher; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.DefaultResponse; /** * ZCL custom response matcher. + * + * Implements {@link CommandResponseMatcher} to check if a ZCL transaction matches a request. + * The matcher will return true if the request and response transaction IDs match. + * If the response matches the {@link DefaultResponse} class, then the status code is mustn't be 0. */ public class ZclCustomResponseMatcher implements CommandResponseMatcher { @Override @@ -12,8 +17,8 @@ public boolean isMatch(Command request, Command response) { if (((ZclCommand) request).getTransactionId() != null) { final byte transactionId = ((ZclCommand) request).getTransactionId(); if (new Byte(transactionId).equals(((ZclCommand) response).getTransactionId())) { - if (response instanceof DefaultResponseCommand) { - if (((DefaultResponseCommand) response).getStatusCode() == 0) { + if (response instanceof DefaultResponse) { + if (((DefaultResponse) response).getStatusCode() == 0) { return false; // Default response success another response incoming, skip this one. } else { return true; // Default response failure, return this one. diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/ZclResponseMatcher.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/ZclResponseMatcher.java similarity index 62% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/ZclResponseMatcher.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/ZclResponseMatcher.java index 49c7db83c..076c3f7a2 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/ZclResponseMatcher.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/ZclResponseMatcher.java @@ -1,9 +1,13 @@ -package org.bubblecloud.zigbee.v3; +package org.bubblecloud.zigbee.v3.zcl; -import org.bubblecloud.zigbee.v3.zcl.ZclCommand; +import org.bubblecloud.zigbee.v3.Command; +import org.bubblecloud.zigbee.v3.CommandResponseMatcher; /** * The ZCL response matcher. + * + * Implements {@link CommandResponseMatcher} to check if a ZCL transaction matches a request. + * The matcher will return true if the request and response transaction IDs match. */ public class ZclResponseMatcher implements CommandResponseMatcher { diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/ZclUtil.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/ZclUtil.java index 58a4d500b..9eddfd7b9 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/ZclUtil.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/ZclUtil.java @@ -41,36 +41,25 @@ private ZclUtil() {} * Mapping between ZclCommandType enumeration value and specialized ZclCommand value object class. */ private static Map> commandTypeClassMap = new HashMap(); - /** - * Mapping between specialized ZclCommand value object class and ZclCommandType enumeration value. - */ - private static Map, ZclCommandType> commandClassTypeMap = new HashMap(); - /** - * Register command type and class mapping. - * @param commandType the command type - * @param commandClass the command class - */ - public static void registerCommandTypeClassMapping(ZclCommandType commandType, Class commandClass) { - commandTypeClassMap.put(commandType, commandClass); - commandClassTypeMap.put(commandClass, commandType); - } + /** * Converts message to command. * @param message the message * @return the command */ public static ZclCommand toCommand(final ZclCommandMessage message) { - final Class commandClass = commandTypeClassMap.get(message.getType()); +// final Class commandClass = commandTypeClassMap.get(message.getType()); final ZclCommand command; try { - command = commandClass.getConstructor(ZclCommandMessage.class).newInstance(message); + command = message.getType().getCommandClass().getConstructor(ZclCommandMessage.class).newInstance(message); +// command = commandClass.getConstructor(ZclCommandMessage.class).newInstance(message); } catch (final Exception e) { throw new IllegalArgumentException("Error in converting message to command: " + message, e); } return command; } /** - * Converts command to nessage. + * Converts command to message. * @param command the command * @return the message */ @@ -122,19 +111,19 @@ public static ZigBeeType mapDataType(final ZclDataType dataType) { case UNSIGNED_8_BIT_INTEGER: zigBeeType = ZigBeeType.UnsignedInteger8bit; break; - case _16_BIT_BITMAP: + case BITMAP_16_BIT: zigBeeType = ZigBeeType.Bitmap16bit; break; - case _16_BIT_ENUMERATION: + case ENUMERATION_16_BIT: zigBeeType = ZigBeeType.Enumeration16bit; break; - case _8_BIT_BITMAP: + case BITMAP_8_BIT: zigBeeType = ZigBeeType.Bitmap8bit; break; - case _8_BIT_DATA: + case DATA_8_BIT: zigBeeType = ZigBeeType.Data8bit; break; - case _8_BIT_ENUMERATION: + case ENUMERATION_8_BIT: zigBeeType = ZigBeeType.Enumeration8bit; break; case BOOLEAN: diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclAlarmsCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclAlarmsCluster.java new file mode 100644 index 000000000..30f8b908d --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclAlarmsCluster.java @@ -0,0 +1,152 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.clusters.alarms.AlarmCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.alarms.GetAlarmCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.alarms.GetAlarmResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.alarms.ResetAlarmCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.alarms.ResetAlarmLogCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.alarms.ResetAllAlarmsCommand; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * 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. + *

    + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclAlarmsCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0009; + + // Attribute constants + private final int ATTR_ALARMCOUNT = 0x0000; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(1); + + attributeMap.put(ATTR_ALARMCOUNT, new ZclAttribute(0, ZclDataType.UNSIGNED_16_BIT_INTEGER, + false, true, false, false)); + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclAlarmsCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + + + /** + * Get the 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. + *

    + * 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 getAlarmCount() { + return read(ATTR_ALARMCOUNT); + } + + + /** + * The Reset Alarm Command + * + * @return the {@link Future} command result future + */ + public Future resetAlarmCommand() { + return send(new ResetAlarmCommand()); + } + + + /** + * The Reset All Alarms Command + * + * @return the {@link Future} command result future + */ + public Future resetAllAlarmsCommand() { + return send(new ResetAllAlarmsCommand()); + } + + + /** + * The Get Alarm Command + * + * @return the {@link Future} command result future + */ + public Future getAlarmCommand() { + return send(new GetAlarmCommand()); + } + + + /** + * The Reset Alarm Log Command + * + * @return the {@link Future} command result future + */ + public Future resetAlarmLogCommand() { + return send(new ResetAlarmLogCommand()); + } + + + /** + * The Alarm Command + * + * @return the {@link Future} command result future + */ + public Future alarmCommand() { + return send(new AlarmCommand()); + } + + + /** + * The Get Alarm Response + * + * @return the {@link Future} command result future + */ + public Future getAlarmResponse() { + return send(new GetAlarmResponse()); + } + + + /** + * Add a binding for this cluster to the local node + * + * @return the {@link Future} command result future + */ + public Future bind() { + return bind(); + } + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclAnalogInputBaCnetExtendedCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclAnalogInputBaCnetExtendedCluster.java new file mode 100644 index 000000000..79f5126c7 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclAnalogInputBaCnetExtendedCluster.java @@ -0,0 +1,37 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Analog Input (BACnet Extended) cluster implementation (Cluster ID 0x0603). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclAnalogInputBaCnetExtendedCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0603; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclAnalogInputBaCnetExtendedCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclAnalogInputBaCnetRegularCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclAnalogInputBaCnetRegularCluster.java new file mode 100644 index 000000000..1a6ca0b1a --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclAnalogInputBaCnetRegularCluster.java @@ -0,0 +1,37 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Analog Input (BACnet Regular) cluster implementation (Cluster ID 0x0602). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclAnalogInputBaCnetRegularCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0602; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclAnalogInputBaCnetRegularCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclAnalogInputBasicCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclAnalogInputBasicCluster.java new file mode 100644 index 000000000..bcfca0ae7 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclAnalogInputBasicCluster.java @@ -0,0 +1,37 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Analog Input (Basic) cluster implementation (Cluster ID 0x000C). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclAnalogInputBasicCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x000C; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclAnalogInputBasicCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclAnalogOutputBaCnetExtendedCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclAnalogOutputBaCnetExtendedCluster.java new file mode 100644 index 000000000..9058e0c63 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclAnalogOutputBaCnetExtendedCluster.java @@ -0,0 +1,37 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Analog Output (BACnet Extended) cluster implementation (Cluster ID 0x0605). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclAnalogOutputBaCnetExtendedCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0605; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclAnalogOutputBaCnetExtendedCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclAnalogOutputBaCnetRegularCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclAnalogOutputBaCnetRegularCluster.java new file mode 100644 index 000000000..0285109e9 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclAnalogOutputBaCnetRegularCluster.java @@ -0,0 +1,37 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Analog Output (BACnet Regular) cluster implementation (Cluster ID 0x0604). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclAnalogOutputBaCnetRegularCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0604; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclAnalogOutputBaCnetRegularCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclAnalogOutputBasicCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclAnalogOutputBasicCluster.java new file mode 100644 index 000000000..216e4acee --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclAnalogOutputBasicCluster.java @@ -0,0 +1,37 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Analog Output (Basic) cluster implementation (Cluster ID 0x000D). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclAnalogOutputBasicCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x000D; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclAnalogOutputBasicCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclAnalogValueBaCnetExtendedCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclAnalogValueBaCnetExtendedCluster.java new file mode 100644 index 000000000..f84e15b37 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclAnalogValueBaCnetExtendedCluster.java @@ -0,0 +1,37 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Analog Value (BACnet Extended) cluster implementation (Cluster ID 0x0607). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclAnalogValueBaCnetExtendedCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0607; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclAnalogValueBaCnetExtendedCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclAnalogValueBaCnetRegularCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclAnalogValueBaCnetRegularCluster.java new file mode 100644 index 000000000..7f7c0d85e --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclAnalogValueBaCnetRegularCluster.java @@ -0,0 +1,37 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Analog Value (BACnet Regular) cluster implementation (Cluster ID 0x0606). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclAnalogValueBaCnetRegularCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0606; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclAnalogValueBaCnetRegularCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclAnalogValueBasicCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclAnalogValueBasicCluster.java new file mode 100644 index 000000000..e37c50767 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclAnalogValueBasicCluster.java @@ -0,0 +1,37 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Analog Value (Basic) cluster implementation (Cluster ID 0x000E). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclAnalogValueBasicCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x000E; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclAnalogValueBasicCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclBaCnetProtocolTunnelCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclBaCnetProtocolTunnelCluster.java new file mode 100644 index 000000000..164524bed --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclBaCnetProtocolTunnelCluster.java @@ -0,0 +1,37 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * BACnet Protocol Tunnel cluster implementation (Cluster ID 0x0601). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclBaCnetProtocolTunnelCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0601; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclBaCnetProtocolTunnelCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclBallastConfigurationCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclBallastConfigurationCluster.java new file mode 100644 index 000000000..a97c84882 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclBallastConfigurationCluster.java @@ -0,0 +1,37 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Ballast Configuration cluster implementation (Cluster ID 0x0301). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclBallastConfigurationCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0301; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclBallastConfigurationCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclBasicCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclBasicCluster.java new file mode 100644 index 000000000..80d9a6bb8 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclBasicCluster.java @@ -0,0 +1,423 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.clusters.basic.ResetToFactoryDefaultsCommand; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Basic cluster implementation (Cluster ID 0x0000). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclBasicCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0000; + + // Attribute constants + private final int ATTR_ZCLVERSION = 0x0000; + private final int ATTR_APPLICATIONVERSION = 0x0001; + private final int ATTR_STACKVERSION = 0x0002; + private final int ATTR_HWVERSION = 0x0003; + private final int ATTR_MANUFACTURERNAME = 0x0004; + private final int ATTR_MODELIDENTIFIER = 0x0005; + private final int ATTR_DATECODE = 0x0006; + private final int ATTR_POWERSOURCE = 0x0007; + private final int ATTR_LOCATIONDESCRIPTION = 0x0010; + private final int ATTR_PHYSICALENVIRONMENT = 0x0011; + private final int ATTR_DEVICEENABLED = 0x0012; + private final int ATTR_ALARMMASK = 0x0013; + private final int ATTR_DISABLELOCALCONFIG = 0x0014; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(13); + + attributeMap.put(ATTR_ZCLVERSION, new ZclAttribute(0, ZclDataType.UNSIGNED_8_BIT_INTEGER, + true, true, false, false)); + attributeMap.put(ATTR_APPLICATIONVERSION, new ZclAttribute(1, ZclDataType.UNSIGNED_8_BIT_INTEGER, + true, true, false, false)); + attributeMap.put(ATTR_STACKVERSION, new ZclAttribute(2, ZclDataType.UNSIGNED_8_BIT_INTEGER, + true, true, false, false)); + attributeMap.put(ATTR_HWVERSION, new ZclAttribute(3, ZclDataType.UNSIGNED_8_BIT_INTEGER, + true, true, false, false)); + attributeMap.put(ATTR_MANUFACTURERNAME, new ZclAttribute(4, ZclDataType.CHARACTER_STRING, + true, true, false, false)); + attributeMap.put(ATTR_MODELIDENTIFIER, new ZclAttribute(5, ZclDataType.CHARACTER_STRING, + true, true, false, false)); + attributeMap.put(ATTR_DATECODE, new ZclAttribute(6, ZclDataType.CHARACTER_STRING, + true, true, false, false)); + attributeMap.put(ATTR_POWERSOURCE, new ZclAttribute(7, ZclDataType.ENUMERATION_8_BIT, + true, true, false, false)); + attributeMap.put(ATTR_LOCATIONDESCRIPTION, new ZclAttribute(16, ZclDataType.CHARACTER_STRING, + true, true, true, false)); + attributeMap.put(ATTR_PHYSICALENVIRONMENT, new ZclAttribute(17, ZclDataType.ENUMERATION_8_BIT, + true, true, true, false)); + attributeMap.put(ATTR_DEVICEENABLED, new ZclAttribute(18, ZclDataType.BOOLEAN, + true, true, true, false)); + attributeMap.put(ATTR_ALARMMASK, new ZclAttribute(19, ZclDataType.BITMAP_8_BIT, + true, true, true, false)); + attributeMap.put(ATTR_DISABLELOCALCONFIG, new ZclAttribute(20, ZclDataType.BITMAP_8_BIT, + true, true, true, false)); + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclBasicCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + + + /** + * Get the 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. + *

    + * 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 getZclVersion() { + return read(ATTR_ZCLVERSION); + } + + + /** + * Get the 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. + *

    + * 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 getApplicationVersion() { + return read(ATTR_APPLICATIONVERSION); + } + + + /** + * Get the 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. + *

    + * 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 getStackVersion() { + return read(ATTR_STACKVERSION); + } + + + /** + * Get the 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. + *

    + * 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 getHwVersion() { + return read(ATTR_HWVERSION); + } + + + /** + * Get the 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. + *

    + * 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 getManufacturerName() { + return read(ATTR_MANUFACTURERNAME); + } + + + /** + * Get the 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. + *

    + * 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 getModelIdentifier() { + return read(ATTR_MODELIDENTIFIER); + } + + + /** + * Get the 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. + *

    + * 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 getDateCode() { + return read(ATTR_DATECODE); + } + + + /** + * Get the 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. + *

    + * 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 getPowerSource() { + return read(ATTR_POWERSOURCE); + } + + + /** + * Set the 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. + *

    + * 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(ATTR_LOCATIONDESCRIPTION, ZclDataType.CHARACTER_STRING, value); + } + + + /** + * Get the 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. + *

    + * 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 getLocationDescription() { + return read(ATTR_LOCATIONDESCRIPTION); + } + + + /** + * Set the PhysicalEnvironment attribute + *

    + *
    + * 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(ATTR_PHYSICALENVIRONMENT, ZclDataType.ENUMERATION_8_BIT, value); + } + + + /** + * Get the PhysicalEnvironment attribute + *

    + *
    + * 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 getPhysicalEnvironment() { + return read(ATTR_PHYSICALENVIRONMENT); + } + + + /** + * Set the DeviceEnabled attribute + *

    + *
    + * 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(ATTR_DEVICEENABLED, ZclDataType.BOOLEAN, value); + } + + + /** + * Get the DeviceEnabled attribute + *

    + *
    + * 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 getDeviceEnabled() { + return read(ATTR_DEVICEENABLED); + } + + + /** + * Set the AlarmMask attribute + *

    + *
    + * 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(ATTR_ALARMMASK, ZclDataType.BITMAP_8_BIT, value); + } + + + /** + * Get the AlarmMask attribute + *

    + *
    + * 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 getAlarmMask() { + return read(ATTR_ALARMMASK); + } + + + /** + * Set the 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. + *

    + * 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(ATTR_DISABLELOCALCONFIG, ZclDataType.BITMAP_8_BIT, value); + } + + + /** + * Get the 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. + *

    + * 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 getDisableLocalConfig() { + return read(ATTR_DISABLELOCALCONFIG); + } + + + /** + * The Reset to Factory Defaults Command + * + * @return the {@link Future} command result future + */ + public Future resetToFactoryDefaultsCommand() { + return send(new ResetToFactoryDefaultsCommand()); + } + + + /** + * Add a binding for this cluster to the local node + * + * @return the {@link Future} command result future + */ + public Future bind() { + return bind(); + } + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclBinaryInputBaCnetExtendedCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclBinaryInputBaCnetExtendedCluster.java new file mode 100644 index 000000000..6ed15fe73 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclBinaryInputBaCnetExtendedCluster.java @@ -0,0 +1,37 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Binary Input (BACnet Extended) cluster implementation (Cluster ID 0x0609). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclBinaryInputBaCnetExtendedCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0609; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclBinaryInputBaCnetExtendedCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclBinaryInputBaCnetRegularCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclBinaryInputBaCnetRegularCluster.java new file mode 100644 index 000000000..8f836062c --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclBinaryInputBaCnetRegularCluster.java @@ -0,0 +1,37 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Binary Input (BACnet Regular) cluster implementation (Cluster ID 0x0608). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclBinaryInputBaCnetRegularCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0608; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclBinaryInputBaCnetRegularCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclBinaryInputBasicCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclBinaryInputBasicCluster.java new file mode 100644 index 000000000..188671d00 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclBinaryInputBasicCluster.java @@ -0,0 +1,37 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Binary Input (Basic) cluster implementation (Cluster ID 0x000F). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclBinaryInputBasicCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x000F; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclBinaryInputBasicCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclBinaryOutputBaCnetExtendedCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclBinaryOutputBaCnetExtendedCluster.java new file mode 100644 index 000000000..8622ec724 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclBinaryOutputBaCnetExtendedCluster.java @@ -0,0 +1,37 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Binary Output (BACnet Extended) cluster implementation (Cluster ID 0x060B). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclBinaryOutputBaCnetExtendedCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x060B; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclBinaryOutputBaCnetExtendedCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclBinaryOutputBaCnetRegularCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclBinaryOutputBaCnetRegularCluster.java new file mode 100644 index 000000000..6ec7b5a78 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclBinaryOutputBaCnetRegularCluster.java @@ -0,0 +1,37 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Binary Output (BACnet Regular) cluster implementation (Cluster ID 0x060A). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclBinaryOutputBaCnetRegularCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x060A; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclBinaryOutputBaCnetRegularCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclBinaryOutputBasicCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclBinaryOutputBasicCluster.java new file mode 100644 index 000000000..ab5e8883d --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclBinaryOutputBasicCluster.java @@ -0,0 +1,37 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Binary Output (Basic) cluster implementation (Cluster ID 0x0010). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclBinaryOutputBasicCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0010; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclBinaryOutputBasicCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclBinaryValueBaCnetExtendedCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclBinaryValueBaCnetExtendedCluster.java new file mode 100644 index 000000000..a1ae246e0 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclBinaryValueBaCnetExtendedCluster.java @@ -0,0 +1,37 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Binary Value (BACnet Extended) cluster implementation (Cluster ID 0x060D). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclBinaryValueBaCnetExtendedCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x060D; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclBinaryValueBaCnetExtendedCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclBinaryValueBaCnetRegularCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclBinaryValueBaCnetRegularCluster.java new file mode 100644 index 000000000..c3cd261e5 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclBinaryValueBaCnetRegularCluster.java @@ -0,0 +1,37 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Binary Value (BACnet Regular) cluster implementation (Cluster ID 0x060C). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclBinaryValueBaCnetRegularCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x060C; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclBinaryValueBaCnetRegularCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclBinaryValueBasicCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclBinaryValueBasicCluster.java new file mode 100644 index 000000000..5dd4c6e70 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclBinaryValueBasicCluster.java @@ -0,0 +1,37 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Binary Value (Basic) cluster implementation (Cluster ID 0x0011). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclBinaryValueBasicCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0011; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclBinaryValueBasicCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclColorControlCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclColorControlCluster.java new file mode 100644 index 000000000..3a23cf40d --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclColorControlCluster.java @@ -0,0 +1,518 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.clusters.colorcontrol.MoveColorCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.colorcontrol.MoveHueCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.colorcontrol.MoveSaturationCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.colorcontrol.MoveToColorCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.colorcontrol.MoveToColorTemperatureCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.colorcontrol.MoveToHueAndSaturationCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.colorcontrol.MoveToHueCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.colorcontrol.MoveToSaturationCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.colorcontrol.StepColorCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.colorcontrol.StepHueCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.colorcontrol.StepSaturationCommand; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * 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. + *

    + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclColorControlCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0300; + + // Attribute constants + private final int ATTR_CURRENTHUE = 0x0000; + private final int ATTR_CURRENTSATURATION = 0x0001; + private final int ATTR_REMAININGTIME = 0x0002; + private final int ATTR_CURRENTX = 0x0003; + private final int ATTR_CURRENTY = 0x0004; + private final int ATTR_DRIFTCOMPENSATION = 0x0005; + private final int ATTR_COMPENSATIONTEXT = 0x0006; + private final int ATTR_COLORTEMPERATURE = 0x0007; + private final int ATTR_COLORMODE = 0x0008; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(9); + + attributeMap.put(ATTR_CURRENTHUE, new ZclAttribute(0, ZclDataType.UNSIGNED_8_BIT_INTEGER, + false, true, false, true)); + attributeMap.put(ATTR_CURRENTSATURATION, new ZclAttribute(1, ZclDataType.UNSIGNED_8_BIT_INTEGER, + false, true, false, true)); + attributeMap.put(ATTR_REMAININGTIME, new ZclAttribute(2, ZclDataType.UNSIGNED_16_BIT_INTEGER, + false, true, false, false)); + attributeMap.put(ATTR_CURRENTX, new ZclAttribute(3, ZclDataType.UNSIGNED_16_BIT_INTEGER, + true, true, false, true)); + attributeMap.put(ATTR_CURRENTY, new ZclAttribute(4, ZclDataType.UNSIGNED_16_BIT_INTEGER, + true, true, false, true)); + attributeMap.put(ATTR_DRIFTCOMPENSATION, new ZclAttribute(5, ZclDataType.ENUMERATION_8_BIT, + false, true, false, false)); + attributeMap.put(ATTR_COMPENSATIONTEXT, new ZclAttribute(6, ZclDataType.CHARACTER_STRING, + false, true, false, false)); + attributeMap.put(ATTR_COLORTEMPERATURE, new ZclAttribute(7, ZclDataType.UNSIGNED_16_BIT_INTEGER, + false, true, false, true)); + attributeMap.put(ATTR_COLORMODE, new ZclAttribute(8, ZclDataType.ENUMERATION_8_BIT, + false, true, false, false)); + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclColorControlCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + + + /** + * Get the 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. + *

    + * 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 getCurrentHue() { + return read(ATTR_CURRENTHUE); + } + + + /** + * Configure reporting for the 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. + *

    + * 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 configCurrentHueReporting(final int minInterval, final int maxInterval, final Object reportableChange) { + return report(ATTR_CURRENTHUE, minInterval, maxInterval, reportableChange); + } + + + /** + * Get the 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. + *

    + * 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 getCurrentSaturation() { + return read(ATTR_CURRENTSATURATION); + } + + + /** + * Configure reporting for the 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. + *

    + * 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 configCurrentSaturationReporting(final int minInterval, final int maxInterval, final Object reportableChange) { + return report(ATTR_CURRENTSATURATION, minInterval, maxInterval, reportableChange); + } + + + /** + * Get the RemainingTime attribute + *

    + *
    + * 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 getRemainingTime() { + return read(ATTR_REMAININGTIME); + } + + + /** + * Get the 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) + *

    + * 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 getCurrentX() { + return read(ATTR_CURRENTX); + } + + + /** + * Configure reporting for the 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) + *

    + * 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 configCurrentXReporting(final int minInterval, final int maxInterval, final Object reportableChange) { + return report(ATTR_CURRENTX, minInterval, maxInterval, reportableChange); + } + + + /** + * Get the 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) + *

    + * 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 getCurrentY() { + return read(ATTR_CURRENTY); + } + + + /** + * Configure reporting for the 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) + *

    + * 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 configCurrentYReporting(final int minInterval, final int maxInterval, final Object reportableChange) { + return report(ATTR_CURRENTY, minInterval, maxInterval, reportableChange); + } + + + /** + * Get the DriftCompensation attribute + *

    + *
    + * 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 getDriftCompensation() { + return read(ATTR_DRIFTCOMPENSATION); + } + + + /** + * Get the 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. + *

    + * 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 getCompensationText() { + return read(ATTR_COMPENSATIONTEXT); + } + + + /** + * Get the 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. + *

    + * 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 getColorTemperature() { + return read(ATTR_COLORTEMPERATURE); + } + + + /** + * Configure reporting for the 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. + *

    + * 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 configColorTemperatureReporting(final int minInterval, final int maxInterval, final Object reportableChange) { + return report(ATTR_COLORTEMPERATURE, minInterval, maxInterval, reportableChange); + } + + + /** + * Get the ColorMode attribute + *

    + *
    + * The ColorMode attribute indicates which attributes are currently determining the + * color of 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 getColorMode() { + return read(ATTR_COLORMODE); + } + + + /** + * The Move to Hue Command + * + * @return the {@link Future} command result future + */ + public Future moveToHueCommand() { + return send(new MoveToHueCommand()); + } + + + /** + * The Move Hue Command + * + * @return the {@link Future} command result future + */ + public Future moveHueCommand() { + return send(new MoveHueCommand()); + } + + + /** + * The Step Hue Command + * + * @return the {@link Future} command result future + */ + public Future stepHueCommand() { + return send(new StepHueCommand()); + } + + + /** + * The Move to Saturation Command + * + * @return the {@link Future} command result future + */ + public Future moveToSaturationCommand() { + return send(new MoveToSaturationCommand()); + } + + + /** + * The Move Saturation Command + * + * @return the {@link Future} command result future + */ + public Future moveSaturationCommand() { + return send(new MoveSaturationCommand()); + } + + + /** + * The Step Saturation Command + * + * @return the {@link Future} command result future + */ + public Future stepSaturationCommand() { + return send(new StepSaturationCommand()); + } + + + /** + * The Move to Hue and Saturation Command + * + * @return the {@link Future} command result future + */ + public Future moveToHueAndSaturationCommand() { + return send(new MoveToHueAndSaturationCommand()); + } + + + /** + * The Move to Color Command + * + * @return the {@link Future} command result future + */ + public Future moveToColorCommand() { + return send(new MoveToColorCommand()); + } + + + /** + * The Move Color Command + * + * @return the {@link Future} command result future + */ + public Future moveColorCommand() { + return send(new MoveColorCommand()); + } + + + /** + * The Step Color Command + * + * @return the {@link Future} command result future + */ + public Future stepColorCommand() { + return send(new StepColorCommand()); + } + + + /** + * The Move to Color Temperature Command + * + * @return the {@link Future} command result future + */ + public Future moveToColorTemperatureCommand() { + return send(new MoveToColorTemperatureCommand()); + } + + + /** + * Add a binding for this cluster to the local node + * + * @return the {@link Future} command result future + */ + public Future bind() { + return bind(); + } + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclCommissioningCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclCommissioningCluster.java new file mode 100644 index 000000000..fdc769de5 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclCommissioningCluster.java @@ -0,0 +1,125 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.clusters.commissioning.ResetStartupParametersCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.commissioning.ResetStartupParametersResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.commissioning.RestartDeviceCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.commissioning.RestartDeviceResponseResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.commissioning.RestoreStartupParametersCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.commissioning.RestoreStartupParametersResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.commissioning.SaveStartupParametersCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.commissioning.SaveStartupParametersResponse; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Commissioning cluster implementation (Cluster ID 0x0015). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclCommissioningCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0015; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclCommissioningCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + + + /** + * The Restart Device Command + * + * @return the {@link Future} command result future + */ + public Future restartDeviceCommand() { + return send(new RestartDeviceCommand()); + } + + + /** + * The Save Startup Parameters Command + * + * @return the {@link Future} command result future + */ + public Future saveStartupParametersCommand() { + return send(new SaveStartupParametersCommand()); + } + + + /** + * The Restore Startup Parameters Command + * + * @return the {@link Future} command result future + */ + public Future restoreStartupParametersCommand() { + return send(new RestoreStartupParametersCommand()); + } + + + /** + * The Reset Startup Parameters Command + * + * @return the {@link Future} command result future + */ + public Future resetStartupParametersCommand() { + return send(new ResetStartupParametersCommand()); + } + + + /** + * The Restart Device Response Response + * + * @return the {@link Future} command result future + */ + public Future restartDeviceResponseResponse() { + return send(new RestartDeviceResponseResponse()); + } + + + /** + * The Save Startup Parameters Response + * + * @return the {@link Future} command result future + */ + public Future saveStartupParametersResponse() { + return send(new SaveStartupParametersResponse()); + } + + + /** + * The Restore Startup Parameters Response + * + * @return the {@link Future} command result future + */ + public Future restoreStartupParametersResponse() { + return send(new RestoreStartupParametersResponse()); + } + + + /** + * The Reset Startup Parameters Response + * + * @return the {@link Future} command result future + */ + public Future resetStartupParametersResponse() { + return send(new ResetStartupParametersResponse()); + } + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclDehumidificationControlCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclDehumidificationControlCluster.java new file mode 100644 index 000000000..b4d40b4c8 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclDehumidificationControlCluster.java @@ -0,0 +1,37 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Dehumidification Control cluster implementation (Cluster ID 0x0203). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclDehumidificationControlCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0203; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclDehumidificationControlCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclDeviceTemperatureConfigurationCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclDeviceTemperatureConfigurationCluster.java new file mode 100644 index 000000000..435ed2776 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclDeviceTemperatureConfigurationCluster.java @@ -0,0 +1,37 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Device Temperature Configuration cluster implementation (Cluster ID 0x0002). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclDeviceTemperatureConfigurationCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0002; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclDeviceTemperatureConfigurationCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclDoorLockCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclDoorLockCluster.java new file mode 100644 index 000000000..6d32ce198 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclDoorLockCluster.java @@ -0,0 +1,81 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.clusters.doorlock.LockDoorCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.doorlock.LockDoorResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.doorlock.UnlockDoorCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.doorlock.UnlockDoorResponse; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Door Lock cluster implementation (Cluster ID 0x0101). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclDoorLockCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0101; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclDoorLockCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + + + /** + * The Lock Door Command + * + * @return the {@link Future} command result future + */ + public Future lockDoorCommand() { + return send(new LockDoorCommand()); + } + + + /** + * The Unlock Door Command + * + * @return the {@link Future} command result future + */ + public Future unlockDoorCommand() { + return send(new UnlockDoorCommand()); + } + + + /** + * The Lock Door Response + * + * @return the {@link Future} command result future + */ + public Future lockDoorResponse() { + return send(new LockDoorResponse()); + } + + + /** + * The Unlock Door Response + * + * @return the {@link Future} command result future + */ + public Future unlockDoorResponse() { + return send(new UnlockDoorResponse()); + } + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclFanControlCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclFanControlCluster.java new file mode 100644 index 000000000..612da7695 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclFanControlCluster.java @@ -0,0 +1,37 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Fan Control cluster implementation (Cluster ID 0x0202). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclFanControlCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0202; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclFanControlCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclFlowMeasurementCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclFlowMeasurementCluster.java new file mode 100644 index 000000000..44cc7d728 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclFlowMeasurementCluster.java @@ -0,0 +1,201 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * 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. + *

    + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclFlowMeasurementCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0404; + + // Attribute constants + private final int ATTR_MEASUREDVALUE = 0x0000; + private final int ATTR_MINMEASUREDVALUE = 0x0001; + private final int ATTR_MAXMEASUREDVALUE = 0x0002; + private final int ATTR_TOLERANCE = 0x0003; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(4); + + attributeMap.put(ATTR_MEASUREDVALUE, new ZclAttribute(0, ZclDataType.UNSIGNED_16_BIT_INTEGER, + true, true, false, true)); + attributeMap.put(ATTR_MINMEASUREDVALUE, new ZclAttribute(1, ZclDataType.UNSIGNED_16_BIT_INTEGER, + true, true, false, false)); + attributeMap.put(ATTR_MAXMEASUREDVALUE, new ZclAttribute(2, ZclDataType.UNSIGNED_16_BIT_INTEGER, + true, true, false, false)); + attributeMap.put(ATTR_TOLERANCE, new ZclAttribute(3, ZclDataType.UNSIGNED_16_BIT_INTEGER, + false, true, false, true)); + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclFlowMeasurementCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + + + /** + * Get the 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. + *

    + * 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 getMeasuredValue() { + return read(ATTR_MEASUREDVALUE); + } + + + /** + * Configure reporting for the 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. + *

    + * 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 configMeasuredValueReporting(final int minInterval, final int maxInterval, final Object reportableChange) { + return report(ATTR_MEASUREDVALUE, minInterval, maxInterval, reportableChange); + } + + + /** + * Get the 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 + *

    + * 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 getMinMeasuredValue() { + return read(ATTR_MINMEASUREDVALUE); + } + + + /** + * Get the 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 + *

    + * 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 getMaxMeasuredValue() { + return read(ATTR_MAXMEASUREDVALUE); + } + + + /** + * Get the 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). + *

    + * 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 getTolerance() { + return read(ATTR_TOLERANCE); + } + + + /** + * Configure reporting for the 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). + *

    + * 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 configToleranceReporting(final int minInterval, final int maxInterval, final Object reportableChange) { + return report(ATTR_TOLERANCE, minInterval, maxInterval, reportableChange); + } + + + /** + * Add a binding for this cluster to the local node + * + * @return the {@link Future} command result future + */ + public Future bind() { + return bind(); + } + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclGeneralCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclGeneralCluster.java new file mode 100644 index 000000000..60be71efe --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclGeneralCluster.java @@ -0,0 +1,224 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.ConfigureReportingCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.ConfigureReportingResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.DefaultResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.DiscoverAttributesCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.DiscoverAttributesResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.ReadAttributesCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.ReadAttributesResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.ReadAttributesStructuredCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.ReadReportingConfigurationCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.ReadReportingConfigurationResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.ReportAttributesCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.WriteAttributesCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.WriteAttributesNoResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.WriteAttributesResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.WriteAttributesStructuredCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.WriteAttributesStructuredResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.WriteAttributesUndividedCommand; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * General cluster implementation (Cluster ID 0xFFFF). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclGeneralCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0xFFFF; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclGeneralCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + + + /** + * The Read Attributes Command + * + * @return the {@link Future} command result future + */ + public Future readAttributesCommand() { + return send(new ReadAttributesCommand()); + } + + + /** + * The Read Attributes Response + * + * @return the {@link Future} command result future + */ + public Future readAttributesResponse() { + return send(new ReadAttributesResponse()); + } + + + /** + * The Write Attributes Command + * + * @return the {@link Future} command result future + */ + public Future writeAttributesCommand() { + return send(new WriteAttributesCommand()); + } + + + /** + * The Write Attributes Undivided Command + * + * @return the {@link Future} command result future + */ + public Future writeAttributesUndividedCommand() { + return send(new WriteAttributesUndividedCommand()); + } + + + /** + * The Write Attributes Response + * + * @return the {@link Future} command result future + */ + public Future writeAttributesResponse() { + return send(new WriteAttributesResponse()); + } + + + /** + * The Write Attributes No Response + * + * @return the {@link Future} command result future + */ + public Future writeAttributesNoResponse() { + return send(new WriteAttributesNoResponse()); + } + + + /** + * The Configure Reporting Command + * + * @return the {@link Future} command result future + */ + public Future configureReportingCommand() { + return send(new ConfigureReportingCommand()); + } + + + /** + * The Configure Reporting Response + * + * @return the {@link Future} command result future + */ + public Future configureReportingResponse() { + return send(new ConfigureReportingResponse()); + } + + + /** + * The Read Reporting Configuration Command + * + * @return the {@link Future} command result future + */ + public Future readReportingConfigurationCommand() { + return send(new ReadReportingConfigurationCommand()); + } + + + /** + * The Read Reporting Configuration Response + * + * @return the {@link Future} command result future + */ + public Future readReportingConfigurationResponse() { + return send(new ReadReportingConfigurationResponse()); + } + + + /** + * The Report Attributes Command + * + * @return the {@link Future} command result future + */ + public Future reportAttributesCommand() { + return send(new ReportAttributesCommand()); + } + + + /** + * The Default Response + * + * @return the {@link Future} command result future + */ + public Future defaultResponse() { + return send(new DefaultResponse()); + } + + + /** + * The Discover Attributes Command + * + * @return the {@link Future} command result future + */ + public Future discoverAttributesCommand() { + return send(new DiscoverAttributesCommand()); + } + + + /** + * The Discover Attributes Response + * + * @return the {@link Future} command result future + */ + public Future discoverAttributesResponse() { + return send(new DiscoverAttributesResponse()); + } + + + /** + * The Read Attributes Structured Command + * + * @return the {@link Future} command result future + */ + public Future readAttributesStructuredCommand() { + return send(new ReadAttributesStructuredCommand()); + } + + + /** + * The Write Attributes Structured Command + * + * @return the {@link Future} command result future + */ + public Future writeAttributesStructuredCommand() { + return send(new WriteAttributesStructuredCommand()); + } + + + /** + * The Write Attributes Structured Response + * + * @return the {@link Future} command result future + */ + public Future writeAttributesStructuredResponse() { + return send(new WriteAttributesStructuredResponse()); + } + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclGenericTunnelCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclGenericTunnelCluster.java new file mode 100644 index 000000000..7ed0d759c --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclGenericTunnelCluster.java @@ -0,0 +1,37 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Generic Tunnel cluster implementation (Cluster ID 0x0600). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclGenericTunnelCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0600; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclGenericTunnelCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclGroupsCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclGroupsCluster.java new file mode 100644 index 000000000..4ad1b29ff --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclGroupsCluster.java @@ -0,0 +1,166 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.clusters.groups.AddGroupCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.groups.AddGroupIfIdentifyingCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.groups.AddGroupResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.groups.GetGroupMembershipCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.groups.GetGroupMembershipResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.groups.RemoveAllGroupsCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.groups.RemoveGroupCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.groups.RemoveGroupResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.groups.ViewGroupCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.groups.ViewGroupResponse; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * 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 + *

    + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclGroupsCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0004; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclGroupsCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + + + /** + * The Add Group Command + * + * @return the {@link Future} command result future + */ + public Future addGroupCommand() { + return send(new AddGroupCommand()); + } + + + /** + * The View Group Command + * + * @return the {@link Future} command result future + */ + public Future viewGroupCommand() { + return send(new ViewGroupCommand()); + } + + + /** + * The Get Group Membership Command + * + * @return the {@link Future} command result future + */ + public Future getGroupMembershipCommand() { + return send(new GetGroupMembershipCommand()); + } + + + /** + * The Remove Group Command + * + * @return the {@link Future} command result future + */ + public Future removeGroupCommand() { + return send(new RemoveGroupCommand()); + } + + + /** + * The Remove All Groups Command + * + * @return the {@link Future} command result future + */ + public Future removeAllGroupsCommand() { + return send(new RemoveAllGroupsCommand()); + } + + + /** + * The Add Group If Identifying Command + * + * @return the {@link Future} command result future + */ + public Future addGroupIfIdentifyingCommand() { + return send(new AddGroupIfIdentifyingCommand()); + } + + + /** + * The Add Group Response + * + * @return the {@link Future} command result future + */ + public Future addGroupResponse() { + return send(new AddGroupResponse()); + } + + + /** + * The View Group Response + * + * @return the {@link Future} command result future + */ + public Future viewGroupResponse() { + return send(new ViewGroupResponse()); + } + + + /** + * The Get Group Membership Response + * + * @return the {@link Future} command result future + */ + public Future getGroupMembershipResponse() { + return send(new GetGroupMembershipResponse()); + } + + + /** + * The Remove Group Response + * + * @return the {@link Future} command result future + */ + public Future removeGroupResponse() { + return send(new RemoveGroupResponse()); + } + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclIasAceCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclIasAceCluster.java new file mode 100644 index 000000000..9ac05e5eb --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclIasAceCluster.java @@ -0,0 +1,153 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.clusters.iasace.ArmCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.iasace.ArmResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.iasace.BypassCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.iasace.EmergencyCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.iasace.FireCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.iasace.GetZoneIdMapCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.iasace.GetZoneIdMapResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.iasace.GetZoneInformationCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.iasace.GetZoneInformationResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.iasace.PanicCommand; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * 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. + *

    + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclIasAceCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0501; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclIasAceCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + + + /** + * The Arm Command + * + * @return the {@link Future} command result future + */ + public Future armCommand() { + return send(new ArmCommand()); + } + + + /** + * The Bypass Command + * + * @return the {@link Future} command result future + */ + public Future bypassCommand() { + return send(new BypassCommand()); + } + + + /** + * The Emergency Command + * + * @return the {@link Future} command result future + */ + public Future emergencyCommand() { + return send(new EmergencyCommand()); + } + + + /** + * The Fire Command + * + * @return the {@link Future} command result future + */ + public Future fireCommand() { + return send(new FireCommand()); + } + + + /** + * The Panic Command + * + * @return the {@link Future} command result future + */ + public Future panicCommand() { + return send(new PanicCommand()); + } + + + /** + * The Get Zone ID Map Command + * + * @return the {@link Future} command result future + */ + public Future getZoneIdMapCommand() { + return send(new GetZoneIdMapCommand()); + } + + + /** + * The Get Zone Information Command + * + * @return the {@link Future} command result future + */ + public Future getZoneInformationCommand() { + return send(new GetZoneInformationCommand()); + } + + + /** + * The Arm Response + * + * @return the {@link Future} command result future + */ + public Future armResponse() { + return send(new ArmResponse()); + } + + + /** + * The Get Zone ID Map Response + * + * @return the {@link Future} command result future + */ + public Future getZoneIdMapResponse() { + return send(new GetZoneIdMapResponse()); + } + + + /** + * The Get Zone Information Response + * + * @return the {@link Future} command result future + */ + public Future getZoneInformationResponse() { + return send(new GetZoneInformationResponse()); + } + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclIasWdCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclIasWdCluster.java new file mode 100644 index 000000000..a6e0f8994 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclIasWdCluster.java @@ -0,0 +1,182 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.clusters.iaswd.SquawkCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.iaswd.StartWarningCommand; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * 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. + *

    + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclIasWdCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0502; + + // Attribute constants + private final int ATTR_MAXDURATION = 0x0000; + private final int ATTR_ZONETYPE = 0x0001; + private final int ATTR_ZONESTATUS = 0x0002; + private final int ATTR_IAS_CIE_ADDRESS = 0x0010; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(4); + + attributeMap.put(ATTR_MAXDURATION, new ZclAttribute(0, ZclDataType.UNSIGNED_16_BIT_INTEGER, + true, true, true, false)); + attributeMap.put(ATTR_ZONETYPE, new ZclAttribute(1, ZclDataType.ENUMERATION_8_BIT, + true, true, false, false)); + attributeMap.put(ATTR_ZONESTATUS, new ZclAttribute(2, ZclDataType.BITMAP_16_BIT, + true, true, false, false)); + attributeMap.put(ATTR_IAS_CIE_ADDRESS, new ZclAttribute(16, ZclDataType.IEEE_ADDRESS, + true, true, true, false)); + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclIasWdCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + + + /** + * Set the MaxDuration attribute + *

    + * 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(ATTR_MAXDURATION, ZclDataType.UNSIGNED_16_BIT_INTEGER, value); + } + + + /** + * Get the MaxDuration attribute + *

    + * 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 getMaxDuration() { + return read(ATTR_MAXDURATION); + } + + + /** + * Get the ZoneType 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 getZoneType() { + return read(ATTR_ZONETYPE); + } + + + /** + * Get 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 getZoneStatus() { + return read(ATTR_ZONESTATUS); + } + + + /** + * Set the IAS_CIE_Address attribute + *

    + * The attribute is of type {@link Long}
    + * The implementation of this attribute by a device is MANDATORY + * + * @param ias_Cie_Address the {@link Long} attribute value to be set + * @return the {@link Future} command result future + */ + public Future setIas_Cie_Address(final Object value) { + return write(ATTR_IAS_CIE_ADDRESS, ZclDataType.IEEE_ADDRESS, value); + } + + + /** + * Get the IAS_CIE_Address attribute + *

    + * The attribute is of type {@link Long}
    + * The implementation of this attribute by a device is MANDATORY + * + * @return the {@link Future} command result future + */ + public Future getIas_Cie_Address() { + return read(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. + *

    + * + * @return the {@link Future} command result future + */ + public Future startWarningCommand() { + return send(new StartWarningCommand()); + } + + + /** + * The Squawk Command + * + * @return the {@link Future} command result future + */ + public Future squawkCommand() { + return send(new SquawkCommand()); + } + + + /** + * Add a binding for this cluster to the local node + * + * @return the {@link Future} command result future + */ + public Future bind() { + return bind(); + } + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclIasZoneCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclIasZoneCluster.java new file mode 100644 index 000000000..c08e57eae --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclIasZoneCluster.java @@ -0,0 +1,192 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.clusters.iaszone.ZoneEnrollRequestCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.iaszone.ZoneEnrollResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.iaszone.ZoneStatusChangeNotificationCommand; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * 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. + *

    + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclIasZoneCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0500; + + // Attribute constants + private final int ATTR_ZONESTATE = 0x0000; + private final int ATTR_ZONETYPE = 0x0001; + private final int ATTR_ZONESTATUS = 0x0002; + private final int ATTR_IAS_CIE_ADDRESS = 0x0010; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(4); + + attributeMap.put(ATTR_ZONESTATE, new ZclAttribute(0, ZclDataType.ENUMERATION_8_BIT, + true, true, false, false)); + attributeMap.put(ATTR_ZONETYPE, new ZclAttribute(1, ZclDataType.ENUMERATION_8_BIT, + true, true, false, false)); + attributeMap.put(ATTR_ZONESTATUS, new ZclAttribute(2, ZclDataType.BITMAP_16_BIT, + true, true, false, false)); + attributeMap.put(ATTR_IAS_CIE_ADDRESS, new ZclAttribute(16, ZclDataType.IEEE_ADDRESS, + true, true, true, false)); + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclIasZoneCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + + + /** + * Get the ZoneState 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 getZoneState() { + return read(ATTR_ZONESTATE); + } + + + /** + * Get the ZoneType attribute + *

    + * 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 getZoneType() { + return read(ATTR_ZONETYPE); + } + + + /** + * Get the ZoneStatus attribute + *

    + *
    + * The ZoneStatus attribute is a bit map. + *

    + * 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 getZoneStatus() { + return read(ATTR_ZONESTATUS); + } + + + /** + * Set the IAS_CIE_Address 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. + *

    + * The attribute is of type {@link Long}
    + * The implementation of this attribute by a device is MANDATORY + * + * @param ias_Cie_Address the {@link Long} attribute value to be set + * @return the {@link Future} command result future + */ + public Future setIas_Cie_Address(final Object value) { + return write(ATTR_IAS_CIE_ADDRESS, ZclDataType.IEEE_ADDRESS, value); + } + + + /** + * Get the IAS_CIE_Address 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. + *

    + * The attribute is of type {@link Long}
    + * The implementation of this attribute by a device is MANDATORY + * + * @return the {@link Future} command result future + */ + public Future getIas_Cie_Address() { + return read(ATTR_IAS_CIE_ADDRESS); + } + + + /** + * The Zone Enroll Response + * + * @return the {@link Future} command result future + */ + public Future zoneEnrollResponse() { + return send(new ZoneEnrollResponse()); + } + + + /** + * The Zone Status Change Notification Command + * + * @return the {@link Future} command result future + */ + public Future zoneStatusChangeNotificationCommand() { + return send(new ZoneStatusChangeNotificationCommand()); + } + + + /** + * The Zone Enroll Request Command + * + * @return the {@link Future} command result future + */ + public Future zoneEnrollRequestCommand() { + return send(new ZoneEnrollRequestCommand()); + } + + + /** + * Add a binding for this cluster to the local node + * + * @return the {@link Future} command result future + */ + public Future bind() { + return bind(); + } + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclIdentifyCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclIdentifyCluster.java new file mode 100644 index 000000000..19c83b87d --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclIdentifyCluster.java @@ -0,0 +1,151 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.clusters.identify.IdentifyCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.identify.IdentifyQueryCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.identify.IdentifyQueryResponse; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * 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. + *

    + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclIdentifyCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0003; + + // Attribute constants + private final int ATTR_IDENTIFYTIME = 0x0000; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(1); + + attributeMap.put(ATTR_IDENTIFYTIME, new ZclAttribute(0, ZclDataType.UNSIGNED_16_BIT_INTEGER, + true, true, true, false)); + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclIdentifyCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + + + /** + * Set the 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. + *

    + * 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(ATTR_IDENTIFYTIME, ZclDataType.UNSIGNED_16_BIT_INTEGER, value); + } + + + /** + * Get the 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. + *

    + * 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 getIdentifyTime() { + return read(ATTR_IDENTIFYTIME); + } + + + /** + * The Identify Command + *

    + * The identify command starts or stops the receiving device identifying itself. + *

    + * + * @return the {@link Future} command result future + */ + public Future identifyCommand() { + return send(new IdentifyCommand()); + } + + + /** + * The Identify Query Command + * + * @return the {@link Future} command result future + */ + public Future identifyQueryCommand() { + return send(new IdentifyQueryCommand()); + } + + + /** + * 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. + *

    + * + * @return the {@link Future} command result future + */ + public Future identifyQueryResponse() { + return send(new IdentifyQueryResponse()); + } + + + /** + * Add a binding for this cluster to the local node + * + * @return the {@link Future} command result future + */ + public Future bind() { + return bind(); + } + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclIlluminanceLevelSensingCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclIlluminanceLevelSensingCluster.java new file mode 100644 index 000000000..67f0e0686 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclIlluminanceLevelSensingCluster.java @@ -0,0 +1,111 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * 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. + *

    + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclIlluminanceLevelSensingCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0401; + + // Attribute constants + private final int ATTR_LEVELSTATUS = 0x0000; + private final int ATTR_LIGHTSENSORTYPE = 0x0001; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(2); + + attributeMap.put(ATTR_LEVELSTATUS, new ZclAttribute(0, ZclDataType.ENUMERATION_8_BIT, + true, true, false, true)); + attributeMap.put(ATTR_LIGHTSENSORTYPE, new ZclAttribute(1, ZclDataType.ENUMERATION_8_BIT, + false, true, false, false)); + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclIlluminanceLevelSensingCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + + + /** + * Get the LevelStatus attribute + *

    + * 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 getLevelStatus() { + return read(ATTR_LEVELSTATUS); + } + + + /** + * Configure reporting for the LevelStatus attribute + *

    + * 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 + * @param reportableChange {@link Object} delta required to trigger report + * @return the {@link Future} command result future + */ + public Future configLevelStatusReporting(final int minInterval, final int maxInterval, final Object reportableChange) { + return report(ATTR_LEVELSTATUS, minInterval, maxInterval, reportableChange); + } + + + /** + * Get the LightSensorType attribute + *

    + *
    + * 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 getLightSensorType() { + return read(ATTR_LIGHTSENSORTYPE); + } + + + /** + * Add a binding for this cluster to the local node + * + * @return the {@link Future} command result future + */ + public Future bind() { + return bind(); + } + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclIlluminanceMeasurementCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclIlluminanceMeasurementCluster.java new file mode 100644 index 000000000..f5dfd5397 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclIlluminanceMeasurementCluster.java @@ -0,0 +1,213 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * 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. + *

    + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclIlluminanceMeasurementCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0400; + + // Attribute constants + private final int ATTR_MEASUREDVALUE = 0x0000; + private final int ATTR_MINMEASUREDVALUE = 0x0001; + private final int ATTR_MAXMEASUREDVALUE = 0x0002; + private final int ATTR_TOLERANCE = 0x0003; + private final int ATTR_LIGHTSENSORTYPE = 0x0004; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(5); + + attributeMap.put(ATTR_MEASUREDVALUE, new ZclAttribute(0, ZclDataType.UNSIGNED_16_BIT_INTEGER, + true, true, false, true)); + attributeMap.put(ATTR_MINMEASUREDVALUE, new ZclAttribute(1, ZclDataType.UNSIGNED_16_BIT_INTEGER, + true, true, false, false)); + attributeMap.put(ATTR_MAXMEASUREDVALUE, new ZclAttribute(2, ZclDataType.UNSIGNED_16_BIT_INTEGER, + true, true, false, false)); + attributeMap.put(ATTR_TOLERANCE, new ZclAttribute(3, ZclDataType.UNSIGNED_16_BIT_INTEGER, + false, true, false, true)); + attributeMap.put(ATTR_LIGHTSENSORTYPE, new ZclAttribute(4, ZclDataType.ENUMERATION_8_BIT, + false, true, false, false)); + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclIlluminanceMeasurementCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + + + /** + * Get the 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.
  • + *

    + * 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 getMeasuredValue() { + return read(ATTR_MEASUREDVALUE); + } + + + /** + * Configure reporting for the 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.
  • + *

    + * 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 configMeasuredValueReporting(final int minInterval, final int maxInterval, final Object reportableChange) { + return report(ATTR_MEASUREDVALUE, minInterval, maxInterval, reportableChange); + } + + + /** + * Get the 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. + *

    + * 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 getMinMeasuredValue() { + return read(ATTR_MINMEASUREDVALUE); + } + + + /** + * Get the 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. + *

    + * 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 getMaxMeasuredValue() { + return read(ATTR_MAXMEASUREDVALUE); + } + + + /** + * Get the 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). + *

    + * 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 getTolerance() { + return read(ATTR_TOLERANCE); + } + + + /** + * Configure reporting for the 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). + *

    + * 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 configToleranceReporting(final int minInterval, final int maxInterval, final Object reportableChange) { + return report(ATTR_TOLERANCE, minInterval, maxInterval, reportableChange); + } + + + /** + * Get the LightSensorType attribute + *

    + *
    + * 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 getLightSensorType() { + return read(ATTR_LIGHTSENSORTYPE); + } + + + /** + * Add a binding for this cluster to the local node + * + * @return the {@link Future} command result future + */ + public Future bind() { + return bind(); + } + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclLevelControlCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclLevelControlCluster.java new file mode 100644 index 000000000..c60e7b825 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclLevelControlCluster.java @@ -0,0 +1,180 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.clusters.levelcontrol.MoveCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.levelcontrol.MoveToLevelCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.levelcontrol.MoveToLevelWithOnOffCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.levelcontrol.MoveWithOnOffCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.levelcontrol.StepCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.levelcontrol.StepWithOnOffCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.levelcontrol.Stop2Command; +import org.bubblecloud.zigbee.v3.zcl.clusters.levelcontrol.StopCommand; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * 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. + *

    + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclLevelControlCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0008; + + // Attribute constants + private final int ATTR_ONLEVEL = 0x0000; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(1); + + attributeMap.put(ATTR_ONLEVEL, new ZclAttribute(0, ZclDataType.UNSIGNED_8_BIT_INTEGER, + false, true, true, false)); + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclLevelControlCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + + + /** + * Set the 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. + *

    + * 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(ATTR_ONLEVEL, ZclDataType.UNSIGNED_8_BIT_INTEGER, value); + } + + + /** + * Get the 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. + *

    + * 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 getOnLevel() { + return read(ATTR_ONLEVEL); + } + + + /** + * The Move to Level Command + * + * @return the {@link Future} command result future + */ + public Future moveToLevelCommand() { + return send(new MoveToLevelCommand()); + } + + + /** + * The Move Command + * + * @return the {@link Future} command result future + */ + public Future moveCommand() { + return send(new MoveCommand()); + } + + + /** + * The Step Command + * + * @return the {@link Future} command result future + */ + public Future stepCommand() { + return send(new StepCommand()); + } + + + /** + * The Stop Command + * + * @return the {@link Future} command result future + */ + public Future stopCommand() { + return send(new StopCommand()); + } + + + /** + * The Move to Level (with On/Off) Command + * + * @return the {@link Future} command result future + */ + public Future moveToLevelWithOnOffCommand() { + return send(new MoveToLevelWithOnOffCommand()); + } + + + /** + * The Move (with On/Off) Command + * + * @return the {@link Future} command result future + */ + public Future moveWithOnOffCommand() { + return send(new MoveWithOnOffCommand()); + } + + + /** + * The Step (with On/Off) Command + * + * @return the {@link Future} command result future + */ + public Future stepWithOnOffCommand() { + return send(new StepWithOnOffCommand()); + } + + + /** + * The Stop 2 Command + * + * @return the {@link Future} command result future + */ + public Future stop2Command() { + return send(new Stop2Command()); + } + + + /** + * Add a binding for this cluster to the local node + * + * @return the {@link Future} command result future + */ + public Future bind() { + return bind(); + } + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclMultistateInputBaCnetExtendedCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclMultistateInputBaCnetExtendedCluster.java new file mode 100644 index 000000000..b885f79aa --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclMultistateInputBaCnetExtendedCluster.java @@ -0,0 +1,37 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Multistate Input (BACnet Extended) cluster implementation (Cluster ID 0x060F). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclMultistateInputBaCnetExtendedCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x060F; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclMultistateInputBaCnetExtendedCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclMultistateInputBaCnetRegularCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclMultistateInputBaCnetRegularCluster.java new file mode 100644 index 000000000..0f21425df --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclMultistateInputBaCnetRegularCluster.java @@ -0,0 +1,37 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Multistate Input (BACnet Regular) cluster implementation (Cluster ID 0x060E). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclMultistateInputBaCnetRegularCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x060E; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclMultistateInputBaCnetRegularCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclMultistateInputBasicCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclMultistateInputBasicCluster.java new file mode 100644 index 000000000..b855f36e4 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclMultistateInputBasicCluster.java @@ -0,0 +1,37 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Multistate Input (Basic) cluster implementation (Cluster ID 0x0012). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclMultistateInputBasicCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0012; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclMultistateInputBasicCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclMultistateOutputBaCnetExtendedCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclMultistateOutputBaCnetExtendedCluster.java new file mode 100644 index 000000000..f7344ba86 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclMultistateOutputBaCnetExtendedCluster.java @@ -0,0 +1,37 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Multistate Output (BACnet Extended) cluster implementation (Cluster ID 0x0611). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclMultistateOutputBaCnetExtendedCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0611; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclMultistateOutputBaCnetExtendedCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclMultistateOutputBaCnetRegularCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclMultistateOutputBaCnetRegularCluster.java new file mode 100644 index 000000000..010d98737 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclMultistateOutputBaCnetRegularCluster.java @@ -0,0 +1,37 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Multistate Output (BACnet Regular) cluster implementation (Cluster ID 0x0610). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclMultistateOutputBaCnetRegularCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0610; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclMultistateOutputBaCnetRegularCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclMultistateOutputBasicCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclMultistateOutputBasicCluster.java new file mode 100644 index 000000000..0be0c5c8a --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclMultistateOutputBasicCluster.java @@ -0,0 +1,37 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Multistate Output (Basic) cluster implementation (Cluster ID 0x0013). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclMultistateOutputBasicCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0013; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclMultistateOutputBasicCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclMultistateValueBaCnetExtendedCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclMultistateValueBaCnetExtendedCluster.java new file mode 100644 index 000000000..5e38a768e --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclMultistateValueBaCnetExtendedCluster.java @@ -0,0 +1,37 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Multistate Value (BACnet Extended) cluster implementation (Cluster ID 0x0613). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclMultistateValueBaCnetExtendedCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0613; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclMultistateValueBaCnetExtendedCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclMultistateValueBaCnetRegularCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclMultistateValueBaCnetRegularCluster.java new file mode 100644 index 000000000..9b5fd5554 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclMultistateValueBaCnetRegularCluster.java @@ -0,0 +1,37 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Multistate Value (BACnet Regular) cluster implementation (Cluster ID 0x0612). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclMultistateValueBaCnetRegularCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0612; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclMultistateValueBaCnetRegularCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclMultistateValueBasicCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclMultistateValueBasicCluster.java new file mode 100644 index 000000000..9b0adfb22 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclMultistateValueBasicCluster.java @@ -0,0 +1,37 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Multistate Value (Basic) cluster implementation (Cluster ID 0x0014). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclMultistateValueBasicCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0014; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclMultistateValueBasicCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclOccupancySensingCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclOccupancySensingCluster.java new file mode 100644 index 000000000..f02a5e32c --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclOccupancySensingCluster.java @@ -0,0 +1,288 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * 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. + *

    + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclOccupancySensingCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0406; + + // Attribute constants + private final int ATTR_OCCUPANCY = 0x0000; + private final int ATTR_OCCUPANCYSENSORTYPE = 0x0001; + private final int ATTR_PIROCCUPIEDTOUNOCCUPIEDDELAY = 0x0010; + private final int ATTR_PIRUNOCCUPIEDTOOCCUPIEDDELAY = 0x0011; + private final int ATTR_ULTRASONICOCCUPIEDTOUNOCCUPIEDDELAY = 0x0020; + private final int ATTR_ULTRASONICUNOCCUPIEDTOOCCUPIEDDELAY = 0x0021; + private final int ATTR_ULTRASONICUNOCCUPIEDTOOCCUPIEDTHRESHOLD = 0x0022; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(7); + + attributeMap.put(ATTR_OCCUPANCY, new ZclAttribute(0, ZclDataType.BITMAP_8_BIT, + true, true, false, true)); + attributeMap.put(ATTR_OCCUPANCYSENSORTYPE, new ZclAttribute(1, ZclDataType.ENUMERATION_8_BIT, + true, true, false, false)); + attributeMap.put(ATTR_PIROCCUPIEDTOUNOCCUPIEDDELAY, new ZclAttribute(16, ZclDataType.UNSIGNED_8_BIT_INTEGER, + false, true, true, false)); + attributeMap.put(ATTR_PIRUNOCCUPIEDTOOCCUPIEDDELAY, new ZclAttribute(17, ZclDataType.UNSIGNED_8_BIT_INTEGER, + false, true, true, false)); + attributeMap.put(ATTR_ULTRASONICOCCUPIEDTOUNOCCUPIEDDELAY, new ZclAttribute(32, ZclDataType.UNSIGNED_8_BIT_INTEGER, + false, true, true, false)); + attributeMap.put(ATTR_ULTRASONICUNOCCUPIEDTOOCCUPIEDDELAY, new ZclAttribute(33, ZclDataType.UNSIGNED_8_BIT_INTEGER, + false, true, true, false)); + attributeMap.put(ATTR_ULTRASONICUNOCCUPIEDTOOCCUPIEDTHRESHOLD, new ZclAttribute(34, ZclDataType.UNSIGNED_8_BIT_INTEGER, + false, true, true, false)); + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclOccupancySensingCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + + + /** + * Get the 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. + *

    + * 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 getOccupancy() { + return read(ATTR_OCCUPANCY); + } + + + /** + * Configure reporting for the 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. + *

    + * 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 configOccupancyReporting(final int minInterval, final int maxInterval, final Object reportableChange) { + return report(ATTR_OCCUPANCY, minInterval, maxInterval, reportableChange); + } + + + /** + * Get the OccupancySensorType attribute + *

    + *
    + * 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 getOccupancySensorType() { + return read(ATTR_OCCUPANCYSENSORTYPE); + } + + + /** + * Set the PIROccupiedToUnoccupiedDelay attribute + *

    + * 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(ATTR_PIROCCUPIEDTOUNOCCUPIEDDELAY, ZclDataType.UNSIGNED_8_BIT_INTEGER, value); + } + + + /** + * Get the PIROccupiedToUnoccupiedDelay 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 getPirOccupiedToUnoccupiedDelay() { + return read(ATTR_PIROCCUPIEDTOUNOCCUPIEDDELAY); + } + + + /** + * Set the PIRUnoccupiedToOccupiedDelay attribute + *

    + * 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(ATTR_PIRUNOCCUPIEDTOOCCUPIEDDELAY, ZclDataType.UNSIGNED_8_BIT_INTEGER, value); + } + + + /** + * Get the PIRUnoccupiedToOccupiedDelay 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 getPirUnoccupiedToOccupiedDelay() { + return read(ATTR_PIRUNOCCUPIEDTOOCCUPIEDDELAY); + } + + + /** + * Set the 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. + *

    + * 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(ATTR_ULTRASONICOCCUPIEDTOUNOCCUPIEDDELAY, ZclDataType.UNSIGNED_8_BIT_INTEGER, value); + } + + + /** + * Get the 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. + *

    + * 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 getUltraSonicOccupiedToUnoccupiedDelay() { + return read(ATTR_ULTRASONICOCCUPIEDTOUNOCCUPIEDDELAY); + } + + + /** + * Set the 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. + *

    + * 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(ATTR_ULTRASONICUNOCCUPIEDTOOCCUPIEDDELAY, ZclDataType.UNSIGNED_8_BIT_INTEGER, value); + } + + + /** + * Get the 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. + *

    + * 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 getUltraSonicUnoccupiedToOccupiedDelay() { + return read(ATTR_ULTRASONICUNOCCUPIEDTOOCCUPIEDDELAY); + } + + + /** + * Set the UltrasonicUnoccupiedToOccupiedThreshold attribute + *

    + * 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(ATTR_ULTRASONICUNOCCUPIEDTOOCCUPIEDTHRESHOLD, ZclDataType.UNSIGNED_8_BIT_INTEGER, value); + } + + + /** + * Get the UltrasonicUnoccupiedToOccupiedThreshold 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 getUltrasonicUnoccupiedToOccupiedThreshold() { + return read(ATTR_ULTRASONICUNOCCUPIEDTOOCCUPIEDTHRESHOLD); + } + + + /** + * Add a binding for this cluster to the local node + * + * @return the {@link Future} command result future + */ + public Future bind() { + return bind(); + } + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclOnOffCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclOnOffCluster.java new file mode 100644 index 000000000..e14fe721d --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclOnOffCluster.java @@ -0,0 +1,121 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.clusters.onoff.OffCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.onoff.OnCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.onoff.ToggleCommand; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * On/Off cluster implementation (Cluster ID 0x0006). + *

    + * Attributes and commands for switching devices between ‘On’ and ‘Off’ states. + *

    + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclOnOffCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0006; + + // Attribute constants + private final int ATTR_ONOFF = 0x0000; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(1); + + attributeMap.put(ATTR_ONOFF, new ZclAttribute(0, ZclDataType.BOOLEAN, + true, true, false, true)); + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclOnOffCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + + + /** + * Get the OnOff attribute + *

    + * 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 getOnOff() { + return read(ATTR_ONOFF); + } + + + /** + * Configure reporting for the OnOff attribute + *

    + * 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 + * @param reportableChange {@link Object} delta required to trigger report + * @return the {@link Future} command result future + */ + public Future configOnOffReporting(final int minInterval, final int maxInterval, final Object reportableChange) { + return report(ATTR_ONOFF, minInterval, maxInterval, reportableChange); + } + + + /** + * The Off Command + * + * @return the {@link Future} command result future + */ + public Future offCommand() { + return send(new OffCommand()); + } + + + /** + * The On Command + * + * @return the {@link Future} command result future + */ + public Future onCommand() { + return send(new OnCommand()); + } + + + /** + * The Toggle Command + * + * @return the {@link Future} command result future + */ + public Future toggleCommand() { + return send(new ToggleCommand()); + } + + + /** + * Add a binding for this cluster to the local node + * + * @return the {@link Future} command result future + */ + public Future bind() { + return bind(); + } + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclOnOffSwitchConfigurationCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclOnOffSwitchConfigurationCluster.java new file mode 100644 index 000000000..0210d1537 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclOnOffSwitchConfigurationCluster.java @@ -0,0 +1,40 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * On/off Switch Configuration cluster implementation (Cluster ID 0x0007). + *

    + * Attributes and commands for configuring On/Off switching devices + *

    + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclOnOffSwitchConfigurationCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0007; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclOnOffSwitchConfigurationCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclPowerConfigurationCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclPowerConfigurationCluster.java new file mode 100644 index 000000000..7ee849b0c --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclPowerConfigurationCluster.java @@ -0,0 +1,620 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * 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. + *

    + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclPowerConfigurationCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0001; + + // Attribute constants + private final int ATTR_MAINSVOLTAGE = 0x0000; + private final int ATTR_MAINSFREQUENCY = 0x0001; + private final int ATTR_MAINSALARMMASK = 0x0010; + private final int ATTR_MAINSVOLTAGEMINTHRESHOLD = 0x0011; + private final int ATTR_MAINSVOLTAGEMAXTHRESHOLD = 0x0012; + private final int ATTR_MAINSVOLTAGEDWELLTRIPPOINT = 0x0013; + private final int ATTR_BATTERYVOLTAGE = 0x0020; + private final int ATTR_BATTERYMANUFACTURER = 0x0030; + private final int ATTR_BATTERYSIZE = 0x0031; + private final int ATTR_BATTERYAHRRATING = 0x0032; + private final int ATTR_BATTERYQUANTITY = 0x0033; + private final int ATTR_BATTERYRATEDVOLTAGE = 0x0034; + private final int ATTR_BATTERYALARMMASK = 0x0035; + private final int ATTR_BATTERYVOLTAGEMINTHRESHOLD = 0x0036; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(14); + + attributeMap.put(ATTR_MAINSVOLTAGE, new ZclAttribute(0, ZclDataType.UNSIGNED_16_BIT_INTEGER, + false, true, false, false)); + attributeMap.put(ATTR_MAINSFREQUENCY, new ZclAttribute(1, ZclDataType.UNSIGNED_16_BIT_INTEGER, + false, true, false, false)); + attributeMap.put(ATTR_MAINSALARMMASK, new ZclAttribute(16, ZclDataType.BITMAP_8_BIT, + false, true, true, false)); + attributeMap.put(ATTR_MAINSVOLTAGEMINTHRESHOLD, new ZclAttribute(17, ZclDataType.UNSIGNED_16_BIT_INTEGER, + false, true, true, false)); + attributeMap.put(ATTR_MAINSVOLTAGEMAXTHRESHOLD, new ZclAttribute(18, ZclDataType.UNSIGNED_16_BIT_INTEGER, + false, true, true, false)); + attributeMap.put(ATTR_MAINSVOLTAGEDWELLTRIPPOINT, new ZclAttribute(19, ZclDataType.UNSIGNED_16_BIT_INTEGER, + false, true, true, false)); + attributeMap.put(ATTR_BATTERYVOLTAGE, new ZclAttribute(32, ZclDataType.UNSIGNED_8_BIT_INTEGER, + false, true, false, false)); + attributeMap.put(ATTR_BATTERYMANUFACTURER, new ZclAttribute(48, ZclDataType.CHARACTER_STRING, + false, true, true, false)); + attributeMap.put(ATTR_BATTERYSIZE, new ZclAttribute(49, ZclDataType.ENUMERATION_8_BIT, + false, true, true, false)); + attributeMap.put(ATTR_BATTERYAHRRATING, new ZclAttribute(50, ZclDataType.UNSIGNED_16_BIT_INTEGER, + false, true, true, false)); + attributeMap.put(ATTR_BATTERYQUANTITY, new ZclAttribute(51, ZclDataType.UNSIGNED_8_BIT_INTEGER, + false, true, true, false)); + attributeMap.put(ATTR_BATTERYRATEDVOLTAGE, new ZclAttribute(52, ZclDataType.UNSIGNED_8_BIT_INTEGER, + false, true, true, false)); + attributeMap.put(ATTR_BATTERYALARMMASK, new ZclAttribute(53, ZclDataType.BITMAP_8_BIT, + false, true, true, false)); + attributeMap.put(ATTR_BATTERYVOLTAGEMINTHRESHOLD, new ZclAttribute(54, ZclDataType.UNSIGNED_8_BIT_INTEGER, + false, true, true, false)); + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclPowerConfigurationCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + + + /** + * Get the 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. + *

    + * 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 getMainsVoltage() { + return read(ATTR_MAINSVOLTAGE); + } + + + /** + * Get the 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.
  • + *

    + * 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 getMainsFrequency() { + return read(ATTR_MAINSFREQUENCY); + } + + + /** + * Set the 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. + *

    + * 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(ATTR_MAINSALARMMASK, ZclDataType.BITMAP_8_BIT, value); + } + + + /** + * Get the 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. + *

    + * 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 getMainsAlarmMask() { + return read(ATTR_MAINSALARMMASK); + } + + + /** + * Set the 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 (see 3.11.2.3.1) 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(ATTR_MAINSVOLTAGEMINTHRESHOLD, ZclDataType.UNSIGNED_16_BIT_INTEGER, value); + } + + + /** + * Get the 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 (see 3.11.2.3.1) 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 getMainsVoltageMinThreshold() { + return read(ATTR_MAINSVOLTAGEMINTHRESHOLD); + } + + + /** + * Set the 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 (see 3.11.2.3.1) 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(ATTR_MAINSVOLTAGEMAXTHRESHOLD, ZclDataType.UNSIGNED_16_BIT_INTEGER, value); + } + + + /** + * Get the 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 (see 3.11.2.3.1) 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 getMainsVoltageMaxThreshold() { + return read(ATTR_MAINSVOLTAGEMAXTHRESHOLD); + } + + + /** + * Set the 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. + *

    + * 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(ATTR_MAINSVOLTAGEDWELLTRIPPOINT, ZclDataType.UNSIGNED_16_BIT_INTEGER, value); + } + + + /** + * Get the 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. + *

    + * 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 getMainsVoltageDwellTripPoint() { + return read(ATTR_MAINSVOLTAGEDWELLTRIPPOINT); + } + + + /** + * Get the 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. + *

    + * 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 getBatteryVoltage() { + return read(ATTR_BATTERYVOLTAGE); + } + + + /** + * Set the 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. + *

    + * 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(ATTR_BATTERYMANUFACTURER, ZclDataType.CHARACTER_STRING, value); + } + + + /** + * Get the 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. + *

    + * 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 getBatteryManufacturer() { + return read(ATTR_BATTERYMANUFACTURER); + } + + + /** + * Set the BatterySize attribute + *

    + *
    + * 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(ATTR_BATTERYSIZE, ZclDataType.ENUMERATION_8_BIT, value); + } + + + /** + * Get the BatterySize attribute + *

    + *
    + * 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 getBatterySize() { + return read(ATTR_BATTERYSIZE); + } + + + /** + * Set the BatteryAHrRating attribute + *

    + *
    + * 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(ATTR_BATTERYAHRRATING, ZclDataType.UNSIGNED_16_BIT_INTEGER, value); + } + + + /** + * Get the BatteryAHrRating attribute + *

    + *
    + * 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 getBatteryAHrRating() { + return read(ATTR_BATTERYAHRRATING); + } + + + /** + * Set the BatteryQuantity attribute + *

    + *
    + * 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(ATTR_BATTERYQUANTITY, ZclDataType.UNSIGNED_8_BIT_INTEGER, value); + } + + + /** + * Get the BatteryQuantity attribute + *

    + *
    + * 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 getBatteryQuantity() { + return read(ATTR_BATTERYQUANTITY); + } + + + /** + * Set the 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. + *

    + * 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(ATTR_BATTERYRATEDVOLTAGE, ZclDataType.UNSIGNED_8_BIT_INTEGER, value); + } + + + /** + * Get the 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. + *

    + * 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 getBatteryRatedVoltage() { + return read(ATTR_BATTERYRATEDVOLTAGE); + } + + + /** + * Set the BatteryAlarmMask attribute + *

    + *
    + * 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(ATTR_BATTERYALARMMASK, ZclDataType.BITMAP_8_BIT, value); + } + + + /** + * Get the BatteryAlarmMask attribute + *

    + *
    + * 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 getBatteryAlarmMask() { + return read(ATTR_BATTERYALARMMASK); + } + + + /** + * Set the 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. + *

    + * 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(ATTR_BATTERYVOLTAGEMINTHRESHOLD, ZclDataType.UNSIGNED_8_BIT_INTEGER, value); + } + + + /** + * Get the 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. + *

    + * 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 getBatteryVoltageMinThreshold() { + return read(ATTR_BATTERYVOLTAGEMINTHRESHOLD); + } + + + /** + * Add a binding for this cluster to the local node + * + * @return the {@link Future} command result future + */ + public Future bind() { + return bind(); + } + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclPressureMeasurementCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclPressureMeasurementCluster.java new file mode 100644 index 000000000..747572724 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclPressureMeasurementCluster.java @@ -0,0 +1,310 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * 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. + *

    + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclPressureMeasurementCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0403; + + // Attribute constants + private final int ATTR_MEASUREDVALUE = 0x0000; + private final int ATTR_MINMEASUREDVALUE = 0x0001; + private final int ATTR_MAXMEASUREDVALUE = 0x0002; + private final int ATTR_TOLERANCE = 0x0003; + private final int ATTR_SCALEDVALUE = 0x0010; + private final int ATTR_MINSCALEDVALUE = 0x0011; + private final int ATTR_MAXSCALEDVALUE = 0x0012; + private final int ATTR_SCALEDTOLERANCE = 0x0013; + private final int ATTR_SCALE = 0x0014; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(9); + + attributeMap.put(ATTR_MEASUREDVALUE, new ZclAttribute(0, ZclDataType.UNSIGNED_16_BIT_INTEGER, + true, true, false, true)); + attributeMap.put(ATTR_MINMEASUREDVALUE, new ZclAttribute(1, ZclDataType.UNSIGNED_16_BIT_INTEGER, + true, true, false, false)); + attributeMap.put(ATTR_MAXMEASUREDVALUE, new ZclAttribute(2, ZclDataType.UNSIGNED_16_BIT_INTEGER, + true, true, false, true)); + attributeMap.put(ATTR_TOLERANCE, new ZclAttribute(3, ZclDataType.UNSIGNED_16_BIT_INTEGER, + false, true, false, false)); + attributeMap.put(ATTR_SCALEDVALUE, new ZclAttribute(16, ZclDataType.UNSIGNED_16_BIT_INTEGER, + false, true, false, true)); + attributeMap.put(ATTR_MINSCALEDVALUE, new ZclAttribute(17, ZclDataType.UNSIGNED_16_BIT_INTEGER, + false, true, false, false)); + attributeMap.put(ATTR_MAXSCALEDVALUE, new ZclAttribute(18, ZclDataType.UNSIGNED_16_BIT_INTEGER, + false, true, false, false)); + attributeMap.put(ATTR_SCALEDTOLERANCE, new ZclAttribute(19, ZclDataType.UNSIGNED_16_BIT_INTEGER, + false, true, false, true)); + attributeMap.put(ATTR_SCALE, new ZclAttribute(20, ZclDataType.UNSIGNED_8_BIT_INTEGER, + false, true, false, false)); + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclPressureMeasurementCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + + + /** + * Get the 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. + *

    + * 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 getMeasuredValue() { + return read(ATTR_MEASUREDVALUE); + } + + + /** + * Configure reporting for the 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. + *

    + * 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 configMeasuredValueReporting(final int minInterval, final int maxInterval, final Object reportableChange) { + return report(ATTR_MEASUREDVALUE, minInterval, maxInterval, reportableChange); + } + + + /** + * Get the 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. + *

    + * 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 getMinMeasuredValue() { + return read(ATTR_MINMEASUREDVALUE); + } + + + /** + * Get the 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. + *

    + * 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 getMaxMeasuredValue() { + return read(ATTR_MAXMEASUREDVALUE); + } + + + /** + * Configure reporting for the 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. + *

    + * 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 configMaxMeasuredValueReporting(final int minInterval, final int maxInterval, final Object reportableChange) { + return report(ATTR_MAXMEASUREDVALUE, minInterval, maxInterval, reportableChange); + } + + + /** + * Get the 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). + *

    + * 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 getTolerance() { + return read(ATTR_TOLERANCE); + } + + + /** + * Get the ScaledValue 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 getScaledValue() { + return read(ATTR_SCALEDVALUE); + } + + + /** + * Configure reporting for the ScaledValue attribute + *

    + * 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 configScaledValueReporting(final int minInterval, final int maxInterval, final Object reportableChange) { + return report(ATTR_SCALEDVALUE, minInterval, maxInterval, reportableChange); + } + + + /** + * Get the MinScaledValue 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 getMinScaledValue() { + return read(ATTR_MINSCALEDVALUE); + } + + + /** + * Get the MaxScaledValue 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 getMaxScaledValue() { + return read(ATTR_MAXSCALEDVALUE); + } + + + /** + * Get the ScaledTolerance 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 getScaledTolerance() { + return read(ATTR_SCALEDTOLERANCE); + } + + + /** + * Configure reporting for the ScaledTolerance attribute + *

    + * 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 configScaledToleranceReporting(final int minInterval, final int maxInterval, final Object reportableChange) { + return report(ATTR_SCALEDTOLERANCE, minInterval, maxInterval, reportableChange); + } + + + /** + * Get the Scale 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 getScale() { + return read(ATTR_SCALE); + } + + + /** + * Add a binding for this cluster to the local node + * + * @return the {@link Future} command result future + */ + public Future bind() { + return bind(); + } + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclPumpConfigurationAndControlCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclPumpConfigurationAndControlCluster.java new file mode 100644 index 000000000..f2770ccc7 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclPumpConfigurationAndControlCluster.java @@ -0,0 +1,37 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Pump Configuration and Control cluster implementation (Cluster ID 0x0200). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclPumpConfigurationAndControlCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0200; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclPumpConfigurationAndControlCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclRelativeHumidityMeasurementCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclRelativeHumidityMeasurementCluster.java new file mode 100644 index 000000000..25c6600d4 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclRelativeHumidityMeasurementCluster.java @@ -0,0 +1,198 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * 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. + *

    + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclRelativeHumidityMeasurementCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0405; + + // Attribute constants + private final int ATTR_MEASUREDVALUE = 0x0000; + private final int ATTR_MINMEASUREDVALUE = 0x0001; + private final int ATTR_MAXMEASUREDVALUE = 0x0002; + private final int ATTR_TOLERANCE = 0x0003; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(4); + + attributeMap.put(ATTR_MEASUREDVALUE, new ZclAttribute(0, ZclDataType.UNSIGNED_16_BIT_INTEGER, + true, true, false, true)); + attributeMap.put(ATTR_MINMEASUREDVALUE, new ZclAttribute(1, ZclDataType.UNSIGNED_16_BIT_INTEGER, + true, true, false, false)); + attributeMap.put(ATTR_MAXMEASUREDVALUE, new ZclAttribute(2, ZclDataType.UNSIGNED_16_BIT_INTEGER, + true, true, false, false)); + attributeMap.put(ATTR_TOLERANCE, new ZclAttribute(3, ZclDataType.UNSIGNED_16_BIT_INTEGER, + false, true, false, true)); + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclRelativeHumidityMeasurementCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + + + /** + * Get the 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. + *

    + * 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 getMeasuredValue() { + return read(ATTR_MEASUREDVALUE); + } + + + /** + * Configure reporting for the 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. + *

    + * 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 configMeasuredValueReporting(final int minInterval, final int maxInterval, final Object reportableChange) { + return report(ATTR_MEASUREDVALUE, minInterval, maxInterval, reportableChange); + } + + + /** + * Get the 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 + *

    + * 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 getMinMeasuredValue() { + return read(ATTR_MINMEASUREDVALUE); + } + + + /** + * Get the 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. + *

    + * 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 getMaxMeasuredValue() { + return read(ATTR_MAXMEASUREDVALUE); + } + + + /** + * Get the 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). + *

    + * 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 getTolerance() { + return read(ATTR_TOLERANCE); + } + + + /** + * Configure reporting for the 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). + *

    + * 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 configToleranceReporting(final int minInterval, final int maxInterval, final Object reportableChange) { + return report(ATTR_TOLERANCE, minInterval, maxInterval, reportableChange); + } + + + /** + * Add a binding for this cluster to the local node + * + * @return the {@link Future} command result future + */ + public Future bind() { + return bind(); + } + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclRssiLocationCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclRssiLocationCluster.java new file mode 100644 index 000000000..d6890dfed --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclRssiLocationCluster.java @@ -0,0 +1,688 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation.AnchorNodeAnnounceCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation.CompactLocationDataNotificationCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation.DeviceConfigurationResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation.GetDeviceConfigurationCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation.GetLocationDataCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation.LocationDataNotificationCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation.LocationDataResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation.ReportRssiMeasurementsCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation.RequestOwnLocationCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation.RssiPingCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation.RssiRequestCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation.RssiResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation.SendPingsCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation.SetAbsoluteLocationCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation.SetDeviceConfigurationCommand; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * RSSI Location cluster implementation (Cluster ID 0x000B). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclRssiLocationCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x000B; + + // Attribute constants + private final int ATTR_LOCATIONTYPE = 0x0000; + private final int ATTR_LOCATIONMETHOD = 0x0001; + private final int ATTR_LOCATIONAGE = 0x0002; + private final int ATTR_QUALITYMEASURE = 0x0003; + private final int ATTR_NUMBEROFDEVICES = 0x0004; + private final int ATTR_COORDINATE1 = 0x0010; + private final int ATTR_COORDINATE2 = 0x0011; + private final int ATTR_COORDINATE3 = 0x0012; + private final int ATTR_POWER = 0x0013; + private final int ATTR_PATHLOSSEXPONENT = 0x0014; + private final int ATTR_REPORTINGPERIOD = 0x0015; + private final int ATTR_CALCULATIONPERIOD = 0x0016; + private final int ATTR_NUMBERRSSIMEASUREMENTS = 0x0017; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(13); + + attributeMap.put(ATTR_LOCATIONTYPE, new ZclAttribute(0, ZclDataType.DATA_8_BIT, + true, true, false, false)); + attributeMap.put(ATTR_LOCATIONMETHOD, new ZclAttribute(1, ZclDataType.ENUMERATION_8_BIT, + true, true, false, false)); + attributeMap.put(ATTR_LOCATIONAGE, new ZclAttribute(2, ZclDataType.UNSIGNED_16_BIT_INTEGER, + false, true, false, false)); + attributeMap.put(ATTR_QUALITYMEASURE, new ZclAttribute(3, ZclDataType.UNSIGNED_8_BIT_INTEGER, + false, true, false, false)); + attributeMap.put(ATTR_NUMBEROFDEVICES, new ZclAttribute(4, ZclDataType.UNSIGNED_8_BIT_INTEGER, + false, true, false, false)); + attributeMap.put(ATTR_COORDINATE1, new ZclAttribute(16, ZclDataType.SIGNED_16_BIT_INTEGER, + true, true, true, false)); + attributeMap.put(ATTR_COORDINATE2, new ZclAttribute(17, ZclDataType.SIGNED_16_BIT_INTEGER, + true, true, true, false)); + attributeMap.put(ATTR_COORDINATE3, new ZclAttribute(18, ZclDataType.SIGNED_16_BIT_INTEGER, + false, true, true, false)); + attributeMap.put(ATTR_POWER, new ZclAttribute(19, ZclDataType.SIGNED_16_BIT_INTEGER, + true, true, true, false)); + attributeMap.put(ATTR_PATHLOSSEXPONENT, new ZclAttribute(20, ZclDataType.SIGNED_16_BIT_INTEGER, + true, true, true, false)); + attributeMap.put(ATTR_REPORTINGPERIOD, new ZclAttribute(21, ZclDataType.SIGNED_16_BIT_INTEGER, + false, true, true, false)); + attributeMap.put(ATTR_CALCULATIONPERIOD, new ZclAttribute(22, ZclDataType.SIGNED_16_BIT_INTEGER, + false, true, true, false)); + attributeMap.put(ATTR_NUMBERRSSIMEASUREMENTS, new ZclAttribute(23, ZclDataType.SIGNED_16_BIT_INTEGER, + false, true, true, false)); + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclRssiLocationCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + + + /** + * Get the LocationType attribute + *

    + * 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 getLocationType() { + return read(ATTR_LOCATIONTYPE); + } + + + /** + * Get the LocationMethod 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 getLocationMethod() { + return read(ATTR_LOCATIONMETHOD); + } + + + /** + * Get the 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. + *

    + * 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 getLocationAge() { + return read(ATTR_LOCATIONAGE); + } + + + /** + * Get the 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. + *

    + * 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 getQualityMeasure() { + return read(ATTR_QUALITYMEASURE); + } + + + /** + * Get the 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. + *

    + * 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 getNumberOfDevices() { + return read(ATTR_NUMBEROFDEVICES); + } + + + /** + * Set the Coordinate1 attribute + *

    + *
    + * 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(ATTR_COORDINATE1, ZclDataType.SIGNED_16_BIT_INTEGER, value); + } + + + /** + * Get the Coordinate1 attribute + *

    + *
    + * 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 getCoordinate1() { + return read(ATTR_COORDINATE1); + } + + + /** + * Set the Coordinate2 attribute + *

    + *
    + * 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(ATTR_COORDINATE2, ZclDataType.SIGNED_16_BIT_INTEGER, value); + } + + + /** + * Get the Coordinate2 attribute + *

    + *
    + * 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 getCoordinate2() { + return read(ATTR_COORDINATE2); + } + + + /** + * Set the Coordinate3 attribute + *

    + *
    + * 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(ATTR_COORDINATE3, ZclDataType.SIGNED_16_BIT_INTEGER, value); + } + + + /** + * Get the Coordinate3 attribute + *

    + *
    + * 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 getCoordinate3() { + return read(ATTR_COORDINATE3); + } + + + /** + * Set the 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. + *

    + * 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(ATTR_POWER, ZclDataType.SIGNED_16_BIT_INTEGER, value); + } + + + /** + * Get the 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. + *

    + * 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 getPower() { + return read(ATTR_POWER); + } + + + /** + * Set the 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. + *

    + * 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(ATTR_PATHLOSSEXPONENT, ZclDataType.SIGNED_16_BIT_INTEGER, value); + } + + + /** + * Get the 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. + *

    + * 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 getPathLossExponent() { + return read(ATTR_PATHLOSSEXPONENT); + } + + + /** + * Set the 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. + *

    + * 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(ATTR_REPORTINGPERIOD, ZclDataType.SIGNED_16_BIT_INTEGER, value); + } + + + /** + * Get the 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. + *

    + * 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 getReportingPeriod() { + return read(ATTR_REPORTINGPERIOD); + } + + + /** + * Set the 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. + *

    + * 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(ATTR_CALCULATIONPERIOD, ZclDataType.SIGNED_16_BIT_INTEGER, value); + } + + + /** + * Get the 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. + *

    + * 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 getCalculationPeriod() { + return read(ATTR_CALCULATIONPERIOD); + } + + + /** + * Set the 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. + *

    + * 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(ATTR_NUMBERRSSIMEASUREMENTS, ZclDataType.SIGNED_16_BIT_INTEGER, value); + } + + + /** + * Get the 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. + *

    + * 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 getNumberRssiMeasurements() { + return read(ATTR_NUMBERRSSIMEASUREMENTS); + } + + + /** + * The Set Absolute Location Command + * + * @return the {@link Future} command result future + */ + public Future setAbsoluteLocationCommand() { + return send(new SetAbsoluteLocationCommand()); + } + + + /** + * The Set Device Configuration Command + * + * @return the {@link Future} command result future + */ + public Future setDeviceConfigurationCommand() { + return send(new SetDeviceConfigurationCommand()); + } + + + /** + * The Get Device Configuration Command + * + * @return the {@link Future} command result future + */ + public Future getDeviceConfigurationCommand() { + return send(new GetDeviceConfigurationCommand()); + } + + + /** + * The Get Location Data Command + * + * @return the {@link Future} command result future + */ + public Future getLocationDataCommand() { + return send(new GetLocationDataCommand()); + } + + + /** + * The RSSI Response + * + * @return the {@link Future} command result future + */ + public Future rssiResponse() { + return send(new RssiResponse()); + } + + + /** + * The Send Pings Command + * + * @return the {@link Future} command result future + */ + public Future sendPingsCommand() { + return send(new SendPingsCommand()); + } + + + /** + * The Anchor Node Announce Command + * + * @return the {@link Future} command result future + */ + public Future anchorNodeAnnounceCommand() { + return send(new AnchorNodeAnnounceCommand()); + } + + + /** + * The Device Configuration Response + * + * @return the {@link Future} command result future + */ + public Future deviceConfigurationResponse() { + return send(new DeviceConfigurationResponse()); + } + + + /** + * The Location Data Response + * + * @return the {@link Future} command result future + */ + public Future locationDataResponse() { + return send(new LocationDataResponse()); + } + + + /** + * The Location Data Notification Command + * + * @return the {@link Future} command result future + */ + public Future locationDataNotificationCommand() { + return send(new LocationDataNotificationCommand()); + } + + + /** + * The Compact Location Data Notification Command + * + * @return the {@link Future} command result future + */ + public Future compactLocationDataNotificationCommand() { + return send(new CompactLocationDataNotificationCommand()); + } + + + /** + * The RSSI Ping Command + * + * @return the {@link Future} command result future + */ + public Future rssiPingCommand() { + return send(new RssiPingCommand()); + } + + + /** + * The RSSI Request Command + * + * @return the {@link Future} command result future + */ + public Future rssiRequestCommand() { + return send(new RssiRequestCommand()); + } + + + /** + * The Report RSSI Measurements Command + * + * @return the {@link Future} command result future + */ + public Future reportRssiMeasurementsCommand() { + return send(new ReportRssiMeasurementsCommand()); + } + + + /** + * The Request Own Location Command + * + * @return the {@link Future} command result future + */ + public Future requestOwnLocationCommand() { + return send(new RequestOwnLocationCommand()); + } + + + /** + * Add a binding for this cluster to the local node + * + * @return the {@link Future} command result future + */ + public Future bind() { + return bind(); + } + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclScenesCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclScenesCluster.java new file mode 100644 index 000000000..b6d483d57 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclScenesCluster.java @@ -0,0 +1,355 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.clusters.scenes.AddSceneCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.scenes.AddSceneResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.scenes.GetSceneMembershipCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.scenes.GetSceneMembershipResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.scenes.RecallSceneCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.scenes.RemoveAllScenesCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.scenes.RemoveAllScenesResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.scenes.RemoveSceneCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.scenes.RemoveSceneResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.scenes.StoreSceneCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.scenes.StoreSceneResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.scenes.ViewSceneCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.scenes.ViewSceneResponse; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * 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. + *

    + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclScenesCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0005; + + // Attribute constants + private final int ATTR_SCENECOUNT = 0x0000; + private final int ATTR_CURRENTSCENE = 0x0001; + private final int ATTR_CURRENTGROUP = 0x0002; + private final int ATTR_SCENEVALID = 0x0003; + private final int ATTR_NAMESUPPORT = 0x0004; + private final int ATTR_LASTCONFIGUREDBY = 0x0005; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(6); + + attributeMap.put(ATTR_SCENECOUNT, new ZclAttribute(0, ZclDataType.UNSIGNED_8_BIT_INTEGER, + true, true, false, false)); + attributeMap.put(ATTR_CURRENTSCENE, new ZclAttribute(1, ZclDataType.UNSIGNED_8_BIT_INTEGER, + true, true, false, false)); + attributeMap.put(ATTR_CURRENTGROUP, new ZclAttribute(2, ZclDataType.UNSIGNED_16_BIT_INTEGER, + true, true, false, false)); + attributeMap.put(ATTR_SCENEVALID, new ZclAttribute(3, ZclDataType.BOOLEAN, + true, true, false, false)); + attributeMap.put(ATTR_NAMESUPPORT, new ZclAttribute(4, ZclDataType.BITMAP_8_BIT, + true, true, false, false)); + attributeMap.put(ATTR_LASTCONFIGUREDBY, new ZclAttribute(5, ZclDataType.IEEE_ADDRESS, + false, true, false, false)); + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclScenesCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + + + /** + * Get the SceneCount attribute + *

    + * 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 getSceneCount() { + return read(ATTR_SCENECOUNT); + } + + + /** + * Get the CurrentScene attribute + *

    + *
    + * 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 getCurrentScene() { + return read(ATTR_CURRENTSCENE); + } + + + /** + * Get the 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. + *

    + * 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 getCurrentGroup() { + return read(ATTR_CURRENTGROUP); + } + + + /** + * Get the 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. + *

    + * 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 getSceneValid() { + return read(ATTR_SCENEVALID); + } + + + /** + * Get the 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. + *

    + * 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 getNameSupport() { + return read(ATTR_NAMESUPPORT); + } + + + /** + * Get the 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. + *

    + * The attribute is of type {@link Long}
    + * The implementation of this attribute by a device is OPTIONAL + * + * @return the {@link Future} command result future + */ + public Future getLastConfiguredBy() { + return read(ATTR_LASTCONFIGUREDBY); + } + + + /** + * The Add Scene Command + *

    + * The Add Scene command shall be addressed to a single device (not a group). + *

    + * + * @return the {@link Future} command result future + */ + public Future addSceneCommand() { + return send(new AddSceneCommand()); + } + + + /** + * The View Scene Command + *

    + * The View Scene command shall be addressed to a single device (not a group). + *

    + * + * @return the {@link Future} command result future + */ + public Future viewSceneCommand() { + return send(new ViewSceneCommand()); + } + + + /** + * The Remove Scene Command + *

    + * The Remove All Scenes may be addressed to a single device or to a group. + *

    + * + * @return the {@link Future} command result future + */ + public Future removeSceneCommand() { + return send(new RemoveSceneCommand()); + } + + + /** + * The Remove All Scenes Command + *

    + * The Remove All Scenes may be addressed to a single device or to a group. + *

    + * + * @return the {@link Future} command result future + */ + public Future removeAllScenesCommand() { + return send(new RemoveAllScenesCommand()); + } + + + /** + * The Store Scene Command + *

    + * The Store Scene command may be addressed to a single device or to a group. + *

    + * + * @return the {@link Future} command result future + */ + public Future storeSceneCommand() { + return send(new StoreSceneCommand()); + } + + + /** + * The Recall Scene Command + *

    + * The Recall Scene command may be addressed to a single device or to a group. + *

    + * + * @return the {@link Future} command result future + */ + public Future recallSceneCommand() { + return send(new RecallSceneCommand()); + } + + + /** + * 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. + *

    + * + * @return the {@link Future} command result future + */ + public Future getSceneMembershipCommand() { + return send(new GetSceneMembershipCommand()); + } + + + /** + * The Add Scene Response + * + * @return the {@link Future} command result future + */ + public Future addSceneResponse() { + return send(new AddSceneResponse()); + } + + + /** + * The View Scene Response + * + * @return the {@link Future} command result future + */ + public Future viewSceneResponse() { + return send(new ViewSceneResponse()); + } + + + /** + * The Remove Scene Response + * + * @return the {@link Future} command result future + */ + public Future removeSceneResponse() { + return send(new RemoveSceneResponse()); + } + + + /** + * The Remove All Scenes Response + * + * @return the {@link Future} command result future + */ + public Future removeAllScenesResponse() { + return send(new RemoveAllScenesResponse()); + } + + + /** + * The Store Scene Response + * + * @return the {@link Future} command result future + */ + public Future storeSceneResponse() { + return send(new StoreSceneResponse()); + } + + + /** + * The Get Scene Membership Response + * + * @return the {@link Future} command result future + */ + public Future getSceneMembershipResponse() { + return send(new GetSceneMembershipResponse()); + } + + + /** + * Add a binding for this cluster to the local node + * + * @return the {@link Future} command result future + */ + public Future bind() { + return bind(); + } + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclShadeConfigurationCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclShadeConfigurationCluster.java new file mode 100644 index 000000000..9438928a5 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclShadeConfigurationCluster.java @@ -0,0 +1,37 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Shade Configuration cluster implementation (Cluster ID 0x0100). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclShadeConfigurationCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0100; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclShadeConfigurationCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclTemperatureMeasurementCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclTemperatureMeasurementCluster.java new file mode 100644 index 000000000..b9e14cdae --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclTemperatureMeasurementCluster.java @@ -0,0 +1,196 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Temperature measurement cluster implementation (Cluster ID 0x0402). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclTemperatureMeasurementCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0402; + + // Attribute constants + private final int ATTR_MEASUREDVALUE = 0x0000; + private final int ATTR_MINMEASUREDVALUE = 0x0001; + private final int ATTR_MAXMEASUREDVALUE = 0x0002; + private final int ATTR_TOLERANCE = 0x0003; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(4); + + attributeMap.put(ATTR_MEASUREDVALUE, new ZclAttribute(0, ZclDataType.UNSIGNED_16_BIT_INTEGER, + true, true, false, true)); + attributeMap.put(ATTR_MINMEASUREDVALUE, new ZclAttribute(1, ZclDataType.UNSIGNED_16_BIT_INTEGER, + true, true, false, false)); + attributeMap.put(ATTR_MAXMEASUREDVALUE, new ZclAttribute(2, ZclDataType.UNSIGNED_16_BIT_INTEGER, + true, true, false, false)); + attributeMap.put(ATTR_TOLERANCE, new ZclAttribute(3, ZclDataType.UNSIGNED_16_BIT_INTEGER, + false, true, false, true)); + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclTemperatureMeasurementCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + + + /** + * Get the 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. + *

    + * 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 getMeasuredValue() { + return read(ATTR_MEASUREDVALUE); + } + + + /** + * Configure reporting for the 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. + *

    + * 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 configMeasuredValueReporting(final int minInterval, final int maxInterval, final Object reportableChange) { + return report(ATTR_MEASUREDVALUE, minInterval, maxInterval, reportableChange); + } + + + /** + * Get the 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. + *

    + * 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 getMinMeasuredValue() { + return read(ATTR_MINMEASUREDVALUE); + } + + + /** + * Get the 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. + *

    + * 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 getMaxMeasuredValue() { + return read(ATTR_MAXMEASUREDVALUE); + } + + + /** + * Get the 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). + *

    + * 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 getTolerance() { + return read(ATTR_TOLERANCE); + } + + + /** + * Configure reporting for the 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). + *

    + * 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 configToleranceReporting(final int minInterval, final int maxInterval, final Object reportableChange) { + return report(ATTR_TOLERANCE, minInterval, maxInterval, reportableChange); + } + + + /** + * Add a binding for this cluster to the local node + * + * @return the {@link Future} command result future + */ + public Future bind() { + return bind(); + } + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclThermostatCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclThermostatCluster.java new file mode 100644 index 000000000..43ff99908 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclThermostatCluster.java @@ -0,0 +1,48 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.clusters.thermostat.SetpointRaiseLowerCommand; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Thermostat cluster implementation (Cluster ID 0x0201). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclThermostatCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0201; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclThermostatCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + + + /** + * The Setpoint Raise/Lower Command + * + * @return the {@link Future} command result future + */ + public Future setpointRaiseLowerCommand() { + return send(new SetpointRaiseLowerCommand()); + } + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclThermostatUserInterfaceConfigurationCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclThermostatUserInterfaceConfigurationCluster.java new file mode 100644 index 000000000..8655e7ea4 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclThermostatUserInterfaceConfigurationCluster.java @@ -0,0 +1,37 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Thermostat User Interface Configuration cluster implementation (Cluster ID 0x0204). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclThermostatUserInterfaceConfigurationCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x0204; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(0); + + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclThermostatUserInterfaceConfigurationCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclTimeCluster.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclTimeCluster.java new file mode 100644 index 000000000..954cd7fb2 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/ZclTimeCluster.java @@ -0,0 +1,363 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Future; +import org.bubblecloud.zigbee.v3.CommandResult; +import org.bubblecloud.zigbee.v3.ZigBeeApi; +import org.bubblecloud.zigbee.v3.ZigBeeDevice; +import org.bubblecloud.zigbee.v3.zcl.ZclAttribute; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclDataType; + +/** + * Time cluster implementation (Cluster ID 0x000A). + * This code is autogenerated. Modifications may be overwritten! + */ +public class ZclTimeCluster extends ZclCluster { + // Cluster ID + private static final int CLUSTER_ID = 0x000A; + + // Attribute constants + private final int ATTR_TIME = 0x0000; + private final int ATTR_TIMESTATUS = 0x0001; + private final int ATTR_TIMEZONE = 0x0002; + private final int ATTR_DSTSTART = 0x0003; + private final int ATTR_DSTEND = 0x0004; + private final int ATTR_DSTSHIFT = 0x0005; + private final int ATTR_STANDARDTIME = 0x0006; + private final int ATTR_LOCALTIME = 0x0007; + + // Attribute initialisation + protected Map initializeAttributes() { + Map attributeMap = new HashMap(8); + + attributeMap.put(ATTR_TIME, new ZclAttribute(0, ZclDataType.UTCTIME, + true, true, true, false)); + attributeMap.put(ATTR_TIMESTATUS, new ZclAttribute(1, ZclDataType.UNSIGNED_16_BIT_INTEGER, + false, true, true, false)); + attributeMap.put(ATTR_TIMEZONE, new ZclAttribute(2, ZclDataType.SIGNED_32_BIT_INTEGER, + false, true, true, false)); + attributeMap.put(ATTR_DSTSTART, new ZclAttribute(3, ZclDataType.UNSIGNED_32_BIT_INTEGER, + false, true, true, false)); + attributeMap.put(ATTR_DSTEND, new ZclAttribute(4, ZclDataType.UNSIGNED_32_BIT_INTEGER, + false, true, true, false)); + attributeMap.put(ATTR_DSTSHIFT, new ZclAttribute(5, ZclDataType.SIGNED_32_BIT_INTEGER, + false, true, true, false)); + attributeMap.put(ATTR_STANDARDTIME, new ZclAttribute(6, ZclDataType.SIGNED_32_BIT_INTEGER, + false, true, false, false)); + attributeMap.put(ATTR_LOCALTIME, new ZclAttribute(7, ZclDataType.SIGNED_32_BIT_INTEGER, + false, true, false, false)); + + return attributeMap; + } + + /** + * Default constructor. + */ + public ZclTimeCluster(final ZigBeeApi zigbeeApi, final ZigBeeDevice zigbeeDevice) { + super(zigbeeApi, zigbeeDevice, CLUSTER_ID); + } + + + + /** + * Set the 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. + *

    + * 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(ATTR_TIME, ZclDataType.UTCTIME, value); + } + + + /** + * Get the 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. + *

    + * 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 getTime() { + return read(ATTR_TIME); + } + + + /** + * Set the TimeStatus attribute + *

    + *
    + * 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(ATTR_TIMESTATUS, ZclDataType.UNSIGNED_16_BIT_INTEGER, value); + } + + + /** + * Get the TimeStatus attribute + *

    + *
    + * 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 getTimeStatus() { + return read(ATTR_TIMESTATUS); + } + + + /** + * Set the 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. + *

    + * 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(ATTR_TIMEZONE, ZclDataType.SIGNED_32_BIT_INTEGER, value); + } + + + /** + * Get the 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. + *

    + * 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 getTimeZone() { + return read(ATTR_TIMEZONE); + } + + + /** + * Set the DstStart attribute + *

    + *
    + * 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(ATTR_DSTSTART, ZclDataType.UNSIGNED_32_BIT_INTEGER, value); + } + + + /** + * Get the DstStart attribute + *

    + *
    + * 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 getDstStart() { + return read(ATTR_DSTSTART); + } + + + /** + * Set the 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. + *
    + * 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(ATTR_DSTEND, ZclDataType.UNSIGNED_32_BIT_INTEGER, value); + } + + + /** + * Get the 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. + *
    + * 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 getDstEnd() { + return read(ATTR_DSTEND); + } + + + /** + * Set the 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. + *

    + * 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(ATTR_DSTSHIFT, ZclDataType.SIGNED_32_BIT_INTEGER, value); + } + + + /** + * Get the 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. + *

    + * 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 getDstShift() { + return read(ATTR_DSTSHIFT); + } + + + /** + * Get the 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. + *

    + * 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 getStandardTime() { + return read(ATTR_STANDARDTIME); + } + + + /** + * Get the 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. + *

    + * 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 getLocalTime() { + return read(ATTR_LOCALTIME); + } + + + /** + * Add a binding for this cluster to the local node + * + * @return the {@link Future} command result future + */ + public Future bind() { + return bind(); + } + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/alarms/AlarmCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/alarms/AlarmCommand.java similarity index 75% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/alarms/AlarmCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/alarms/AlarmCommand.java index 5254dd602..b80b461a1 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/alarms/AlarmCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/alarms/AlarmCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.alarms; +package org.bubblecloud.zigbee.v3.zcl.clusters.alarms; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,24 @@ /** - * Code generated Alarm Command value object class. + * Alarm Command value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class AlarmCommand extends ZclCommand { /** @@ -23,7 +40,7 @@ public class AlarmCommand extends ZclCommand { * Default constructor setting the command type field. */ public AlarmCommand() { - this.setType(ZclCommandType.ALARM_COMMAND); + setType(ZclCommandType.ALARM_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/alarms/GetAlarmCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/alarms/GetAlarmCommand.java similarity index 52% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/alarms/GetAlarmCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/alarms/GetAlarmCommand.java index 5841f0104..63d609d19 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/alarms/GetAlarmCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/alarms/GetAlarmCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.alarms; +package org.bubblecloud.zigbee.v3.zcl.clusters.alarms; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -6,7 +6,24 @@ /** - * Code generated Get Alarm Command value object class. + * Get Alarm Command value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class GetAlarmCommand extends ZclCommand { @@ -14,7 +31,7 @@ public class GetAlarmCommand extends ZclCommand { * Default constructor setting the command type field. */ public GetAlarmCommand() { - this.setType(ZclCommandType.GET_ALARM_COMMAND); + setType(ZclCommandType.GET_ALARM_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/alarms/GetAlarmResponseCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/alarms/GetAlarmResponse.java similarity index 73% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/alarms/GetAlarmResponseCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/alarms/GetAlarmResponse.java index eef2e5575..6a1e2a2dd 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/alarms/GetAlarmResponseCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/alarms/GetAlarmResponse.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.alarms; +package org.bubblecloud.zigbee.v3.zcl.clusters.alarms; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,9 +7,26 @@ /** - * Code generated Get Alarm Response Command value object class. + * Get Alarm Response value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ -public class GetAlarmResponseCommand extends ZclCommand { +public class GetAlarmResponse extends ZclCommand { /** * Status command message field. */ @@ -30,29 +47,29 @@ public class GetAlarmResponseCommand extends ZclCommand { /** * Default constructor setting the command type field. */ - public GetAlarmResponseCommand() { - this.setType(ZclCommandType.GET_ALARM_RESPONSE_COMMAND); + public GetAlarmResponse() { + setType(ZclCommandType.GET_ALARM_RESPONSE); } /** * Constructor copying field values from command message. * @param message the command message */ - public GetAlarmResponseCommand(final ZclCommandMessage message) { + public GetAlarmResponse(final ZclCommandMessage message) { super(message); - this.status = (Integer) message.getFields().get(ZclFieldType.GET_ALARM_RESPONSE_COMMAND_STATUS); - this.alarmCode = (Integer) message.getFields().get(ZclFieldType.GET_ALARM_RESPONSE_COMMAND_ALARM_CODE); - this.clusterIdentifier = (Integer) message.getFields().get(ZclFieldType.GET_ALARM_RESPONSE_COMMAND_CLUSTER_IDENTIFIER); - this.timestamp = (Integer) message.getFields().get(ZclFieldType.GET_ALARM_RESPONSE_COMMAND_TIMESTAMP); + this.status = (Integer) message.getFields().get(ZclFieldType.GET_ALARM_RESPONSE_STATUS); + this.alarmCode = (Integer) message.getFields().get(ZclFieldType.GET_ALARM_RESPONSE_ALARM_CODE); + this.clusterIdentifier = (Integer) message.getFields().get(ZclFieldType.GET_ALARM_RESPONSE_CLUSTER_IDENTIFIER); + this.timestamp = (Integer) message.getFields().get(ZclFieldType.GET_ALARM_RESPONSE_TIMESTAMP); } @Override public ZclCommandMessage toCommandMessage() { final ZclCommandMessage message = super.toCommandMessage(); - message.getFields().put(ZclFieldType.GET_ALARM_RESPONSE_COMMAND_STATUS,status); - message.getFields().put(ZclFieldType.GET_ALARM_RESPONSE_COMMAND_ALARM_CODE,alarmCode); - message.getFields().put(ZclFieldType.GET_ALARM_RESPONSE_COMMAND_CLUSTER_IDENTIFIER,clusterIdentifier); - message.getFields().put(ZclFieldType.GET_ALARM_RESPONSE_COMMAND_TIMESTAMP,timestamp); + message.getFields().put(ZclFieldType.GET_ALARM_RESPONSE_STATUS,status); + message.getFields().put(ZclFieldType.GET_ALARM_RESPONSE_ALARM_CODE,alarmCode); + message.getFields().put(ZclFieldType.GET_ALARM_RESPONSE_CLUSTER_IDENTIFIER,clusterIdentifier); + message.getFields().put(ZclFieldType.GET_ALARM_RESPONSE_TIMESTAMP,timestamp); return message; } diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/alarms/ResetAlarmCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/alarms/ResetAlarmCommand.java similarity index 75% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/alarms/ResetAlarmCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/alarms/ResetAlarmCommand.java index 0970fb3d3..385dad5c2 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/alarms/ResetAlarmCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/alarms/ResetAlarmCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.alarms; +package org.bubblecloud.zigbee.v3.zcl.clusters.alarms; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,24 @@ /** - * Code generated Reset Alarm Command value object class. + * Reset Alarm Command value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class ResetAlarmCommand extends ZclCommand { /** @@ -23,7 +40,7 @@ public class ResetAlarmCommand extends ZclCommand { * Default constructor setting the command type field. */ public ResetAlarmCommand() { - this.setType(ZclCommandType.RESET_ALARM_COMMAND); + setType(ZclCommandType.RESET_ALARM_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/alarms/ResetAlarmLogCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/alarms/ResetAlarmLogCommand.java similarity index 52% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/alarms/ResetAlarmLogCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/alarms/ResetAlarmLogCommand.java index 83d5f3785..5fe5eb0f6 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/alarms/ResetAlarmLogCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/alarms/ResetAlarmLogCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.alarms; +package org.bubblecloud.zigbee.v3.zcl.clusters.alarms; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -6,7 +6,24 @@ /** - * Code generated Reset Alarm Log Command value object class. + * Reset Alarm Log Command value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class ResetAlarmLogCommand extends ZclCommand { @@ -14,7 +31,7 @@ public class ResetAlarmLogCommand extends ZclCommand { * Default constructor setting the command type field. */ public ResetAlarmLogCommand() { - this.setType(ZclCommandType.RESET_ALARM_LOG_COMMAND); + setType(ZclCommandType.RESET_ALARM_LOG_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/alarms/ResetAllAlarmsCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/alarms/ResetAllAlarmsCommand.java similarity index 52% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/alarms/ResetAllAlarmsCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/alarms/ResetAllAlarmsCommand.java index 3a15a55d4..40b03b7c0 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/alarms/ResetAllAlarmsCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/alarms/ResetAllAlarmsCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.alarms; +package org.bubblecloud.zigbee.v3.zcl.clusters.alarms; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -6,7 +6,24 @@ /** - * Code generated Reset All Alarms Command value object class. + * Reset All Alarms Command value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class ResetAllAlarmsCommand extends ZclCommand { @@ -14,7 +31,7 @@ public class ResetAllAlarmsCommand extends ZclCommand { * Default constructor setting the command type field. */ public ResetAllAlarmsCommand() { - this.setType(ZclCommandType.RESET_ALL_ALARMS_COMMAND); + setType(ZclCommandType.RESET_ALL_ALARMS_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/basic/ResetToFactoryDefaultsCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/basic/ResetToFactoryDefaultsCommand.java similarity index 77% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/basic/ResetToFactoryDefaultsCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/basic/ResetToFactoryDefaultsCommand.java index 25cb5f1d2..cbf5bd1e2 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/basic/ResetToFactoryDefaultsCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/basic/ResetToFactoryDefaultsCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.basic; +package org.bubblecloud.zigbee.v3.zcl.clusters.basic; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -6,7 +6,12 @@ /** - * Code generated Reset to Factory Defaults Command value object class. + * Reset to Factory Defaults Command value object class. + * + * + * Cluster: Basic + * + * Code is autogenerated. Modifications may be overwritten! */ public class ResetToFactoryDefaultsCommand extends ZclCommand { @@ -14,7 +19,7 @@ public class ResetToFactoryDefaultsCommand extends ZclCommand { * Default constructor setting the command type field. */ public ResetToFactoryDefaultsCommand() { - this.setType(ZclCommandType.RESET_TO_FACTORY_DEFAULTS_COMMAND); + setType(ZclCommandType.RESET_TO_FACTORY_DEFAULTS_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/color/control/MoveColorCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/colorcontrol/MoveColorCommand.java similarity index 80% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/color/control/MoveColorCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/colorcontrol/MoveColorCommand.java index 60c8527ee..c7eb566c0 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/color/control/MoveColorCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/colorcontrol/MoveColorCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.color.control; +package org.bubblecloud.zigbee.v3.zcl.clusters.colorcontrol; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,16 @@ /** - * Code generated Move Color Command value object class. + * Move Color Command value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class MoveColorCommand extends ZclCommand { /** @@ -23,7 +32,7 @@ public class MoveColorCommand extends ZclCommand { * Default constructor setting the command type field. */ public MoveColorCommand() { - this.setType(ZclCommandType.MOVE_COLOR_COMMAND); + setType(ZclCommandType.MOVE_COLOR_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/color/control/MoveHueCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/colorcontrol/MoveHueCommand.java similarity index 80% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/color/control/MoveHueCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/colorcontrol/MoveHueCommand.java index cae80ab3f..b52b6d2d0 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/color/control/MoveHueCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/colorcontrol/MoveHueCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.color.control; +package org.bubblecloud.zigbee.v3.zcl.clusters.colorcontrol; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,16 @@ /** - * Code generated Move Hue Command value object class. + * Move Hue Command value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class MoveHueCommand extends ZclCommand { /** @@ -23,7 +32,7 @@ public class MoveHueCommand extends ZclCommand { * Default constructor setting the command type field. */ public MoveHueCommand() { - this.setType(ZclCommandType.MOVE_HUE_COMMAND); + setType(ZclCommandType.MOVE_HUE_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/color/control/MoveSaturationCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/colorcontrol/MoveSaturationCommand.java similarity index 80% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/color/control/MoveSaturationCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/colorcontrol/MoveSaturationCommand.java index 8b8f92aed..e27fbab0e 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/color/control/MoveSaturationCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/colorcontrol/MoveSaturationCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.color.control; +package org.bubblecloud.zigbee.v3.zcl.clusters.colorcontrol; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,16 @@ /** - * Code generated Move Saturation Command value object class. + * Move Saturation Command value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class MoveSaturationCommand extends ZclCommand { /** @@ -23,7 +32,7 @@ public class MoveSaturationCommand extends ZclCommand { * Default constructor setting the command type field. */ public MoveSaturationCommand() { - this.setType(ZclCommandType.MOVE_SATURATION_COMMAND); + setType(ZclCommandType.MOVE_SATURATION_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/color/control/MoveToColorCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/colorcontrol/MoveToColorCommand.java similarity index 85% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/color/control/MoveToColorCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/colorcontrol/MoveToColorCommand.java index cc8ccd06a..5c64daf8f 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/color/control/MoveToColorCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/colorcontrol/MoveToColorCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.color.control; +package org.bubblecloud.zigbee.v3.zcl.clusters.colorcontrol; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,16 @@ /** - * Code generated Move to Color Command value object class. + * Move to Color Command value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class MoveToColorCommand extends ZclCommand { /** @@ -27,7 +36,7 @@ public class MoveToColorCommand extends ZclCommand { * Default constructor setting the command type field. */ public MoveToColorCommand() { - this.setType(ZclCommandType.MOVE_TO_COLOR_COMMAND); + setType(ZclCommandType.MOVE_TO_COLOR_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/color/control/MoveToColorTemperatureCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/colorcontrol/MoveToColorTemperatureCommand.java similarity index 82% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/color/control/MoveToColorTemperatureCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/colorcontrol/MoveToColorTemperatureCommand.java index f270359fd..ab3d949ff 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/color/control/MoveToColorTemperatureCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/colorcontrol/MoveToColorTemperatureCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.color.control; +package org.bubblecloud.zigbee.v3.zcl.clusters.colorcontrol; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,16 @@ /** - * Code generated Move to Color Temperature Command value object class. + * Move to Color Temperature Command value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class MoveToColorTemperatureCommand extends ZclCommand { /** @@ -23,7 +32,7 @@ public class MoveToColorTemperatureCommand extends ZclCommand { * Default constructor setting the command type field. */ public MoveToColorTemperatureCommand() { - this.setType(ZclCommandType.MOVE_TO_COLOR_TEMPERATURE_COMMAND); + setType(ZclCommandType.MOVE_TO_COLOR_TEMPERATURE_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/color/control/MoveToHueAndSaturationCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/colorcontrol/MoveToHueAndSaturationCommand.java similarity index 84% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/color/control/MoveToHueAndSaturationCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/colorcontrol/MoveToHueAndSaturationCommand.java index 02587ebec..8384a59ea 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/color/control/MoveToHueAndSaturationCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/colorcontrol/MoveToHueAndSaturationCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.color.control; +package org.bubblecloud.zigbee.v3.zcl.clusters.colorcontrol; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,16 @@ /** - * Code generated Move to Hue and Saturation Command value object class. + * Move to Hue and Saturation Command value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class MoveToHueAndSaturationCommand extends ZclCommand { /** @@ -27,7 +36,7 @@ public class MoveToHueAndSaturationCommand extends ZclCommand { * Default constructor setting the command type field. */ public MoveToHueAndSaturationCommand() { - this.setType(ZclCommandType.MOVE_TO_HUE_AND_SATURATION_COMMAND); + setType(ZclCommandType.MOVE_TO_HUE_AND_SATURATION_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/color/control/MoveToHueCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/colorcontrol/MoveToHueCommand.java similarity index 85% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/color/control/MoveToHueCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/colorcontrol/MoveToHueCommand.java index 3f75fa226..bd6133848 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/color/control/MoveToHueCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/colorcontrol/MoveToHueCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.color.control; +package org.bubblecloud.zigbee.v3.zcl.clusters.colorcontrol; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,16 @@ /** - * Code generated Move to Hue Command value object class. + * Move to Hue Command value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class MoveToHueCommand extends ZclCommand { /** @@ -27,7 +36,7 @@ public class MoveToHueCommand extends ZclCommand { * Default constructor setting the command type field. */ public MoveToHueCommand() { - this.setType(ZclCommandType.MOVE_TO_HUE_COMMAND); + setType(ZclCommandType.MOVE_TO_HUE_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/color/control/MoveToSaturationCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/colorcontrol/MoveToSaturationCommand.java similarity index 82% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/color/control/MoveToSaturationCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/colorcontrol/MoveToSaturationCommand.java index cdf5b01fb..59add5a25 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/color/control/MoveToSaturationCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/colorcontrol/MoveToSaturationCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.color.control; +package org.bubblecloud.zigbee.v3.zcl.clusters.colorcontrol; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,16 @@ /** - * Code generated Move to Saturation Command value object class. + * Move to Saturation Command value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class MoveToSaturationCommand extends ZclCommand { /** @@ -23,7 +32,7 @@ public class MoveToSaturationCommand extends ZclCommand { * Default constructor setting the command type field. */ public MoveToSaturationCommand() { - this.setType(ZclCommandType.MOVE_TO_SATURATION_COMMAND); + setType(ZclCommandType.MOVE_TO_SATURATION_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/color/control/StepColorCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/colorcontrol/StepColorCommand.java similarity index 84% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/color/control/StepColorCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/colorcontrol/StepColorCommand.java index 4ee0d9540..e870dbc00 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/color/control/StepColorCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/colorcontrol/StepColorCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.color.control; +package org.bubblecloud.zigbee.v3.zcl.clusters.colorcontrol; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,16 @@ /** - * Code generated Step Color Command value object class. + * Step Color Command value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class StepColorCommand extends ZclCommand { /** @@ -27,7 +36,7 @@ public class StepColorCommand extends ZclCommand { * Default constructor setting the command type field. */ public StepColorCommand() { - this.setType(ZclCommandType.STEP_COLOR_COMMAND); + setType(ZclCommandType.STEP_COLOR_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/color/control/StepHueCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/colorcontrol/StepHueCommand.java similarity index 85% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/color/control/StepHueCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/colorcontrol/StepHueCommand.java index e79e587d4..e17cfcd48 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/color/control/StepHueCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/colorcontrol/StepHueCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.color.control; +package org.bubblecloud.zigbee.v3.zcl.clusters.colorcontrol; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,16 @@ /** - * Code generated Step Hue Command value object class. + * Step Hue Command value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class StepHueCommand extends ZclCommand { /** @@ -27,7 +36,7 @@ public class StepHueCommand extends ZclCommand { * Default constructor setting the command type field. */ public StepHueCommand() { - this.setType(ZclCommandType.STEP_HUE_COMMAND); + setType(ZclCommandType.STEP_HUE_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/color/control/StepSaturationCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/colorcontrol/StepSaturationCommand.java similarity index 85% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/color/control/StepSaturationCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/colorcontrol/StepSaturationCommand.java index 89ddabc9f..7a14d9d5e 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/color/control/StepSaturationCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/colorcontrol/StepSaturationCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.color.control; +package org.bubblecloud.zigbee.v3.zcl.clusters.colorcontrol; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,16 @@ /** - * Code generated Step Saturation Command value object class. + * Step Saturation Command value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class StepSaturationCommand extends ZclCommand { /** @@ -27,7 +36,7 @@ public class StepSaturationCommand extends ZclCommand { * Default constructor setting the command type field. */ public StepSaturationCommand() { - this.setType(ZclCommandType.STEP_SATURATION_COMMAND); + setType(ZclCommandType.STEP_SATURATION_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/commissioning/ResetStartupParametersCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/commissioning/ResetStartupParametersCommand.java similarity index 89% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/commissioning/ResetStartupParametersCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/commissioning/ResetStartupParametersCommand.java index ce44caca2..82c4ac7bc 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/commissioning/ResetStartupParametersCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/commissioning/ResetStartupParametersCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.commissioning; +package org.bubblecloud.zigbee.v3.zcl.clusters.commissioning; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,12 @@ /** - * Code generated Reset Startup Parameters Command value object class. + * Reset Startup Parameters Command value object class. + * + * + * Cluster: Commissioning + * + * Code is autogenerated. Modifications may be overwritten! */ public class ResetStartupParametersCommand extends ZclCommand { /** @@ -23,7 +28,7 @@ public class ResetStartupParametersCommand extends ZclCommand { * Default constructor setting the command type field. */ public ResetStartupParametersCommand() { - this.setType(ZclCommandType.RESET_STARTUP_PARAMETERS_COMMAND); + setType(ZclCommandType.RESET_STARTUP_PARAMETERS_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/commissioning/ResetStartupParametersResponseCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/commissioning/ResetStartupParametersResponse.java similarity index 72% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/commissioning/ResetStartupParametersResponseCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/commissioning/ResetStartupParametersResponse.java index 1850c6f0a..d2359557c 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/commissioning/ResetStartupParametersResponseCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/commissioning/ResetStartupParametersResponse.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.commissioning; +package org.bubblecloud.zigbee.v3.zcl.clusters.commissioning; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,9 +7,14 @@ /** - * Code generated Reset Startup Parameters Response Command value object class. + * Reset Startup Parameters Response value object class. + * + * + * Cluster: Commissioning + * + * Code is autogenerated. Modifications may be overwritten! */ -public class ResetStartupParametersResponseCommand extends ZclCommand { +public class ResetStartupParametersResponse extends ZclCommand { /** * Status command message field. */ @@ -18,23 +23,23 @@ public class ResetStartupParametersResponseCommand extends ZclCommand { /** * Default constructor setting the command type field. */ - public ResetStartupParametersResponseCommand() { - this.setType(ZclCommandType.RESET_STARTUP_PARAMETERS_RESPONSE_COMMAND); + public ResetStartupParametersResponse() { + setType(ZclCommandType.RESET_STARTUP_PARAMETERS_RESPONSE); } /** * Constructor copying field values from command message. * @param message the command message */ - public ResetStartupParametersResponseCommand(final ZclCommandMessage message) { + public ResetStartupParametersResponse(final ZclCommandMessage message) { super(message); - this.status = (Integer) message.getFields().get(ZclFieldType.RESET_STARTUP_PARAMETERS_RESPONSE_COMMAND_STATUS); + this.status = (Integer) message.getFields().get(ZclFieldType.RESET_STARTUP_PARAMETERS_RESPONSE_STATUS); } @Override public ZclCommandMessage toCommandMessage() { final ZclCommandMessage message = super.toCommandMessage(); - message.getFields().put(ZclFieldType.RESET_STARTUP_PARAMETERS_RESPONSE_COMMAND_STATUS,status); + message.getFields().put(ZclFieldType.RESET_STARTUP_PARAMETERS_RESPONSE_STATUS,status); return message; } diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/commissioning/RestartDeviceCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/commissioning/RestartDeviceCommand.java similarity index 91% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/commissioning/RestartDeviceCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/commissioning/RestartDeviceCommand.java index 13eaf3dfd..42e92fda8 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/commissioning/RestartDeviceCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/commissioning/RestartDeviceCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.commissioning; +package org.bubblecloud.zigbee.v3.zcl.clusters.commissioning; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,12 @@ /** - * Code generated Restart Device Command value object class. + * Restart Device Command value object class. + * + * + * Cluster: Commissioning + * + * Code is autogenerated. Modifications may be overwritten! */ public class RestartDeviceCommand extends ZclCommand { /** @@ -27,7 +32,7 @@ public class RestartDeviceCommand extends ZclCommand { * Default constructor setting the command type field. */ public RestartDeviceCommand() { - this.setType(ZclCommandType.RESTART_DEVICE_COMMAND); + setType(ZclCommandType.RESTART_DEVICE_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/commissioning/RestartDeviceResponseResponseCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/commissioning/RestartDeviceResponseResponse.java similarity index 72% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/commissioning/RestartDeviceResponseResponseCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/commissioning/RestartDeviceResponseResponse.java index 6584f9d08..0caed30af 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/commissioning/RestartDeviceResponseResponseCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/commissioning/RestartDeviceResponseResponse.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.commissioning; +package org.bubblecloud.zigbee.v3.zcl.clusters.commissioning; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,9 +7,14 @@ /** - * Code generated Restart Device Response Response Command value object class. + * Restart Device Response Response value object class. + * + * + * Cluster: Commissioning + * + * Code is autogenerated. Modifications may be overwritten! */ -public class RestartDeviceResponseResponseCommand extends ZclCommand { +public class RestartDeviceResponseResponse extends ZclCommand { /** * Status command message field. */ @@ -18,23 +23,23 @@ public class RestartDeviceResponseResponseCommand extends ZclCommand { /** * Default constructor setting the command type field. */ - public RestartDeviceResponseResponseCommand() { - this.setType(ZclCommandType.RESTART_DEVICE_RESPONSE_RESPONSE_COMMAND); + public RestartDeviceResponseResponse() { + setType(ZclCommandType.RESTART_DEVICE_RESPONSE_RESPONSE); } /** * Constructor copying field values from command message. * @param message the command message */ - public RestartDeviceResponseResponseCommand(final ZclCommandMessage message) { + public RestartDeviceResponseResponse(final ZclCommandMessage message) { super(message); - this.status = (Integer) message.getFields().get(ZclFieldType.RESTART_DEVICE_RESPONSE_RESPONSE_COMMAND_STATUS); + this.status = (Integer) message.getFields().get(ZclFieldType.RESTART_DEVICE_RESPONSE_RESPONSE_STATUS); } @Override public ZclCommandMessage toCommandMessage() { final ZclCommandMessage message = super.toCommandMessage(); - message.getFields().put(ZclFieldType.RESTART_DEVICE_RESPONSE_RESPONSE_COMMAND_STATUS,status); + message.getFields().put(ZclFieldType.RESTART_DEVICE_RESPONSE_RESPONSE_STATUS,status); return message; } diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/commissioning/RestoreStartupParametersCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/commissioning/RestoreStartupParametersCommand.java similarity index 89% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/commissioning/RestoreStartupParametersCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/commissioning/RestoreStartupParametersCommand.java index 6c9a97553..a69e9d547 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/commissioning/RestoreStartupParametersCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/commissioning/RestoreStartupParametersCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.commissioning; +package org.bubblecloud.zigbee.v3.zcl.clusters.commissioning; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,12 @@ /** - * Code generated Restore Startup Parameters Command value object class. + * Restore Startup Parameters Command value object class. + * + * + * Cluster: Commissioning + * + * Code is autogenerated. Modifications may be overwritten! */ public class RestoreStartupParametersCommand extends ZclCommand { /** @@ -23,7 +28,7 @@ public class RestoreStartupParametersCommand extends ZclCommand { * Default constructor setting the command type field. */ public RestoreStartupParametersCommand() { - this.setType(ZclCommandType.RESTORE_STARTUP_PARAMETERS_COMMAND); + setType(ZclCommandType.RESTORE_STARTUP_PARAMETERS_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/commissioning/RestoreStartupParametersResponseCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/commissioning/RestoreStartupParametersResponse.java similarity index 71% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/commissioning/RestoreStartupParametersResponseCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/commissioning/RestoreStartupParametersResponse.java index c1434b91f..44dca62e6 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/commissioning/RestoreStartupParametersResponseCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/commissioning/RestoreStartupParametersResponse.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.commissioning; +package org.bubblecloud.zigbee.v3.zcl.clusters.commissioning; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,9 +7,14 @@ /** - * Code generated Restore Startup Parameters Response Command value object class. + * Restore Startup Parameters Response value object class. + * + * + * Cluster: Commissioning + * + * Code is autogenerated. Modifications may be overwritten! */ -public class RestoreStartupParametersResponseCommand extends ZclCommand { +public class RestoreStartupParametersResponse extends ZclCommand { /** * Status command message field. */ @@ -18,23 +23,23 @@ public class RestoreStartupParametersResponseCommand extends ZclCommand { /** * Default constructor setting the command type field. */ - public RestoreStartupParametersResponseCommand() { - this.setType(ZclCommandType.RESTORE_STARTUP_PARAMETERS_RESPONSE_COMMAND); + public RestoreStartupParametersResponse() { + setType(ZclCommandType.RESTORE_STARTUP_PARAMETERS_RESPONSE); } /** * Constructor copying field values from command message. * @param message the command message */ - public RestoreStartupParametersResponseCommand(final ZclCommandMessage message) { + public RestoreStartupParametersResponse(final ZclCommandMessage message) { super(message); - this.status = (Integer) message.getFields().get(ZclFieldType.RESTORE_STARTUP_PARAMETERS_RESPONSE_COMMAND_STATUS); + this.status = (Integer) message.getFields().get(ZclFieldType.RESTORE_STARTUP_PARAMETERS_RESPONSE_STATUS); } @Override public ZclCommandMessage toCommandMessage() { final ZclCommandMessage message = super.toCommandMessage(); - message.getFields().put(ZclFieldType.RESTORE_STARTUP_PARAMETERS_RESPONSE_COMMAND_STATUS,status); + message.getFields().put(ZclFieldType.RESTORE_STARTUP_PARAMETERS_RESPONSE_STATUS,status); return message; } diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/commissioning/SaveStartupParametersCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/commissioning/SaveStartupParametersCommand.java similarity index 89% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/commissioning/SaveStartupParametersCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/commissioning/SaveStartupParametersCommand.java index 1ee4d218f..7ec894242 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/commissioning/SaveStartupParametersCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/commissioning/SaveStartupParametersCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.commissioning; +package org.bubblecloud.zigbee.v3.zcl.clusters.commissioning; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,12 @@ /** - * Code generated Save Startup Parameters Command value object class. + * Save Startup Parameters Command value object class. + * + * + * Cluster: Commissioning + * + * Code is autogenerated. Modifications may be overwritten! */ public class SaveStartupParametersCommand extends ZclCommand { /** @@ -23,7 +28,7 @@ public class SaveStartupParametersCommand extends ZclCommand { * Default constructor setting the command type field. */ public SaveStartupParametersCommand() { - this.setType(ZclCommandType.SAVE_STARTUP_PARAMETERS_COMMAND); + setType(ZclCommandType.SAVE_STARTUP_PARAMETERS_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/commissioning/SaveStartupParametersResponseCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/commissioning/SaveStartupParametersResponse.java similarity index 72% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/commissioning/SaveStartupParametersResponseCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/commissioning/SaveStartupParametersResponse.java index 66e877999..bf38fc873 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/commissioning/SaveStartupParametersResponseCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/commissioning/SaveStartupParametersResponse.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.commissioning; +package org.bubblecloud.zigbee.v3.zcl.clusters.commissioning; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,9 +7,14 @@ /** - * Code generated Save Startup Parameters Response Command value object class. + * Save Startup Parameters Response value object class. + * + * + * Cluster: Commissioning + * + * Code is autogenerated. Modifications may be overwritten! */ -public class SaveStartupParametersResponseCommand extends ZclCommand { +public class SaveStartupParametersResponse extends ZclCommand { /** * Status command message field. */ @@ -18,23 +23,23 @@ public class SaveStartupParametersResponseCommand extends ZclCommand { /** * Default constructor setting the command type field. */ - public SaveStartupParametersResponseCommand() { - this.setType(ZclCommandType.SAVE_STARTUP_PARAMETERS_RESPONSE_COMMAND); + public SaveStartupParametersResponse() { + setType(ZclCommandType.SAVE_STARTUP_PARAMETERS_RESPONSE); } /** * Constructor copying field values from command message. * @param message the command message */ - public SaveStartupParametersResponseCommand(final ZclCommandMessage message) { + public SaveStartupParametersResponse(final ZclCommandMessage message) { super(message); - this.status = (Integer) message.getFields().get(ZclFieldType.SAVE_STARTUP_PARAMETERS_RESPONSE_COMMAND_STATUS); + this.status = (Integer) message.getFields().get(ZclFieldType.SAVE_STARTUP_PARAMETERS_RESPONSE_STATUS); } @Override public ZclCommandMessage toCommandMessage() { final ZclCommandMessage message = super.toCommandMessage(); - message.getFields().put(ZclFieldType.SAVE_STARTUP_PARAMETERS_RESPONSE_COMMAND_STATUS,status); + message.getFields().put(ZclFieldType.SAVE_STARTUP_PARAMETERS_RESPONSE_STATUS,status); return message; } diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/door/lock/LockDoorCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/doorlock/LockDoorCommand.java similarity index 87% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/door/lock/LockDoorCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/doorlock/LockDoorCommand.java index 75983d8f9..5b0b4bdbc 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/door/lock/LockDoorCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/doorlock/LockDoorCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.door.lock; +package org.bubblecloud.zigbee.v3.zcl.clusters.doorlock; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,12 @@ /** - * Code generated Lock Door Command value object class. + * Lock Door Command value object class. + * + * + * Cluster: Door Lock + * + * Code is autogenerated. Modifications may be overwritten! */ public class LockDoorCommand extends ZclCommand { /** @@ -19,7 +24,7 @@ public class LockDoorCommand extends ZclCommand { * Default constructor setting the command type field. */ public LockDoorCommand() { - this.setType(ZclCommandType.LOCK_DOOR_COMMAND); + setType(ZclCommandType.LOCK_DOOR_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/door/lock/LockDoorResponseCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/doorlock/LockDoorResponse.java similarity index 76% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/door/lock/LockDoorResponseCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/doorlock/LockDoorResponse.java index 8c7b59553..94369fd81 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/door/lock/LockDoorResponseCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/doorlock/LockDoorResponse.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.door.lock; +package org.bubblecloud.zigbee.v3.zcl.clusters.doorlock; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,9 +7,14 @@ /** - * Code generated Lock Door Response Command value object class. + * Lock Door Response value object class. + * + * + * Cluster: Door Lock + * + * Code is autogenerated. Modifications may be overwritten! */ -public class LockDoorResponseCommand extends ZclCommand { +public class LockDoorResponse extends ZclCommand { /** * Status command message field. */ @@ -18,23 +23,23 @@ public class LockDoorResponseCommand extends ZclCommand { /** * Default constructor setting the command type field. */ - public LockDoorResponseCommand() { - this.setType(ZclCommandType.LOCK_DOOR_RESPONSE_COMMAND); + public LockDoorResponse() { + setType(ZclCommandType.LOCK_DOOR_RESPONSE); } /** * Constructor copying field values from command message. * @param message the command message */ - public LockDoorResponseCommand(final ZclCommandMessage message) { + public LockDoorResponse(final ZclCommandMessage message) { super(message); - this.status = (Integer) message.getFields().get(ZclFieldType.LOCK_DOOR_RESPONSE_COMMAND_STATUS); + this.status = (Integer) message.getFields().get(ZclFieldType.LOCK_DOOR_RESPONSE_STATUS); } @Override public ZclCommandMessage toCommandMessage() { final ZclCommandMessage message = super.toCommandMessage(); - message.getFields().put(ZclFieldType.LOCK_DOOR_RESPONSE_COMMAND_STATUS,status); + message.getFields().put(ZclFieldType.LOCK_DOOR_RESPONSE_STATUS,status); return message; } diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/door/lock/UnlockDoorCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/doorlock/UnlockDoorCommand.java similarity index 87% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/door/lock/UnlockDoorCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/doorlock/UnlockDoorCommand.java index b61b94c7f..7bc2320fe 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/door/lock/UnlockDoorCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/doorlock/UnlockDoorCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.door.lock; +package org.bubblecloud.zigbee.v3.zcl.clusters.doorlock; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,12 @@ /** - * Code generated Unlock Door Command value object class. + * Unlock Door Command value object class. + * + * + * Cluster: Door Lock + * + * Code is autogenerated. Modifications may be overwritten! */ public class UnlockDoorCommand extends ZclCommand { /** @@ -19,7 +24,7 @@ public class UnlockDoorCommand extends ZclCommand { * Default constructor setting the command type field. */ public UnlockDoorCommand() { - this.setType(ZclCommandType.UNLOCK_DOOR_COMMAND); + setType(ZclCommandType.UNLOCK_DOOR_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/door/lock/UnlockDoorResponseCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/doorlock/UnlockDoorResponse.java similarity index 75% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/door/lock/UnlockDoorResponseCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/doorlock/UnlockDoorResponse.java index d68805957..81bf3a630 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/door/lock/UnlockDoorResponseCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/doorlock/UnlockDoorResponse.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.door.lock; +package org.bubblecloud.zigbee.v3.zcl.clusters.doorlock; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,9 +7,14 @@ /** - * Code generated Unlock Door Response Command value object class. + * Unlock Door Response value object class. + * + * + * Cluster: Door Lock + * + * Code is autogenerated. Modifications may be overwritten! */ -public class UnlockDoorResponseCommand extends ZclCommand { +public class UnlockDoorResponse extends ZclCommand { /** * Status command message field. */ @@ -18,23 +23,23 @@ public class UnlockDoorResponseCommand extends ZclCommand { /** * Default constructor setting the command type field. */ - public UnlockDoorResponseCommand() { - this.setType(ZclCommandType.UNLOCK_DOOR_RESPONSE_COMMAND); + public UnlockDoorResponse() { + setType(ZclCommandType.UNLOCK_DOOR_RESPONSE); } /** * Constructor copying field values from command message. * @param message the command message */ - public UnlockDoorResponseCommand(final ZclCommandMessage message) { + public UnlockDoorResponse(final ZclCommandMessage message) { super(message); - this.status = (Integer) message.getFields().get(ZclFieldType.UNLOCK_DOOR_RESPONSE_COMMAND_STATUS); + this.status = (Integer) message.getFields().get(ZclFieldType.UNLOCK_DOOR_RESPONSE_STATUS); } @Override public ZclCommandMessage toCommandMessage() { final ZclCommandMessage message = super.toCommandMessage(); - message.getFields().put(ZclFieldType.UNLOCK_DOOR_RESPONSE_COMMAND_STATUS,status); + message.getFields().put(ZclFieldType.UNLOCK_DOOR_RESPONSE_STATUS,status); return message; } diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/ConfigureReportingCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/ConfigureReportingCommand.java similarity index 88% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/ConfigureReportingCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/ConfigureReportingCommand.java index 13982bf6c..f8e76bccc 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/ConfigureReportingCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/ConfigureReportingCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.general; +package org.bubblecloud.zigbee.v3.zcl.clusters.general; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -9,7 +9,12 @@ import java.util.List; /** - * Code generated Configure Reporting Command value object class. + * Configure Reporting Command value object class. + * + * + * Cluster: General + * + * Code is autogenerated. Modifications may be overwritten! */ public class ConfigureReportingCommand extends ZclCommand { /** @@ -21,7 +26,7 @@ public class ConfigureReportingCommand extends ZclCommand { * Default constructor setting the command type field. */ public ConfigureReportingCommand() { - this.setType(ZclCommandType.CONFIGURE_REPORTING_COMMAND); + setType(ZclCommandType.CONFIGURE_REPORTING_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/ConfigureReportingResponseCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/ConfigureReportingResponse.java similarity index 74% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/ConfigureReportingResponseCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/ConfigureReportingResponse.java index 6e141c8c3..754438930 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/ConfigureReportingResponseCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/ConfigureReportingResponse.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.general; +package org.bubblecloud.zigbee.v3.zcl.clusters.general; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -9,9 +9,14 @@ import java.util.List; /** - * Code generated Configure Reporting Response Command value object class. + * Configure Reporting Response value object class. + * + * + * Cluster: General + * + * Code is autogenerated. Modifications may be overwritten! */ -public class ConfigureReportingResponseCommand extends ZclCommand { +public class ConfigureReportingResponse extends ZclCommand { /** * Records command message field. */ @@ -20,23 +25,23 @@ public class ConfigureReportingResponseCommand extends ZclCommand { /** * Default constructor setting the command type field. */ - public ConfigureReportingResponseCommand() { - this.setType(ZclCommandType.CONFIGURE_REPORTING_RESPONSE_COMMAND); + public ConfigureReportingResponse() { + setType(ZclCommandType.CONFIGURE_REPORTING_RESPONSE); } /** * Constructor copying field values from command message. * @param message the command message */ - public ConfigureReportingResponseCommand(final ZclCommandMessage message) { + public ConfigureReportingResponse(final ZclCommandMessage message) { super(message); - this.records = (List) message.getFields().get(ZclFieldType.CONFIGURE_REPORTING_RESPONSE_COMMAND_RECORDS); + this.records = (List) message.getFields().get(ZclFieldType.CONFIGURE_REPORTING_RESPONSE_RECORDS); } @Override public ZclCommandMessage toCommandMessage() { final ZclCommandMessage message = super.toCommandMessage(); - message.getFields().put(ZclFieldType.CONFIGURE_REPORTING_RESPONSE_COMMAND_RECORDS,records); + message.getFields().put(ZclFieldType.CONFIGURE_REPORTING_RESPONSE_RECORDS,records); return message; } diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/DefaultResponseCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/DefaultResponse.java similarity index 78% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/DefaultResponseCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/DefaultResponse.java index fe9c241ab..852299705 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/DefaultResponseCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/DefaultResponse.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.general; +package org.bubblecloud.zigbee.v3.zcl.clusters.general; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,9 +7,14 @@ /** - * Code generated Default Response Command value object class. + * Default Response value object class. + * + * + * Cluster: General + * + * Code is autogenerated. Modifications may be overwritten! */ -public class DefaultResponseCommand extends ZclCommand { +public class DefaultResponse extends ZclCommand { /** * Command identifier command message field. */ @@ -22,25 +27,25 @@ public class DefaultResponseCommand extends ZclCommand { /** * Default constructor setting the command type field. */ - public DefaultResponseCommand() { - this.setType(ZclCommandType.DEFAULT_RESPONSE_COMMAND); + public DefaultResponse() { + setType(ZclCommandType.DEFAULT_RESPONSE); } /** * Constructor copying field values from command message. * @param message the command message */ - public DefaultResponseCommand(final ZclCommandMessage message) { + public DefaultResponse(final ZclCommandMessage message) { super(message); - this.commandIdentifier = (Integer) message.getFields().get(ZclFieldType.DEFAULT_RESPONSE_COMMAND_COMMAND_IDENTIFIER); - this.statusCode = (Integer) message.getFields().get(ZclFieldType.DEFAULT_RESPONSE_COMMAND_STATUS_CODE); + this.commandIdentifier = (Integer) message.getFields().get(ZclFieldType.DEFAULT_RESPONSE_COMMAND_IDENTIFIER); + this.statusCode = (Integer) message.getFields().get(ZclFieldType.DEFAULT_RESPONSE_STATUS_CODE); } @Override public ZclCommandMessage toCommandMessage() { final ZclCommandMessage message = super.toCommandMessage(); - message.getFields().put(ZclFieldType.DEFAULT_RESPONSE_COMMAND_COMMAND_IDENTIFIER,commandIdentifier); - message.getFields().put(ZclFieldType.DEFAULT_RESPONSE_COMMAND_STATUS_CODE,statusCode); + message.getFields().put(ZclFieldType.DEFAULT_RESPONSE_COMMAND_IDENTIFIER,commandIdentifier); + message.getFields().put(ZclFieldType.DEFAULT_RESPONSE_STATUS_CODE,statusCode); return message; } diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/DiscoverAttributesCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/DiscoverAttributesCommand.java similarity index 92% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/DiscoverAttributesCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/DiscoverAttributesCommand.java index c030f65ff..77e10ae66 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/DiscoverAttributesCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/DiscoverAttributesCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.general; +package org.bubblecloud.zigbee.v3.zcl.clusters.general; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,12 @@ /** - * Code generated Discover Attributes Command value object class. + * Discover Attributes Command value object class. + * + * + * Cluster: General + * + * Code is autogenerated. Modifications may be overwritten! */ public class DiscoverAttributesCommand extends ZclCommand { /** @@ -23,7 +28,7 @@ public class DiscoverAttributesCommand extends ZclCommand { * Default constructor setting the command type field. */ public DiscoverAttributesCommand() { - this.setType(ZclCommandType.DISCOVER_ATTRIBUTES_COMMAND); + setType(ZclCommandType.DISCOVER_ATTRIBUTES_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/DiscoverAttributesResponseCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/DiscoverAttributesResponse.java similarity index 78% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/DiscoverAttributesResponseCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/DiscoverAttributesResponse.java index 0aafac859..3c1119a4a 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/DiscoverAttributesResponseCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/DiscoverAttributesResponse.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.general; +package org.bubblecloud.zigbee.v3.zcl.clusters.general; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -9,9 +9,14 @@ import java.util.List; /** - * Code generated Discover Attributes Response Command value object class. + * Discover Attributes Response value object class. + * + * + * Cluster: General + * + * Code is autogenerated. Modifications may be overwritten! */ -public class DiscoverAttributesResponseCommand extends ZclCommand { +public class DiscoverAttributesResponse extends ZclCommand { /** * Command identifier command message field. */ @@ -24,25 +29,25 @@ public class DiscoverAttributesResponseCommand extends ZclCommand { /** * Default constructor setting the command type field. */ - public DiscoverAttributesResponseCommand() { - this.setType(ZclCommandType.DISCOVER_ATTRIBUTES_RESPONSE_COMMAND); + public DiscoverAttributesResponse() { + setType(ZclCommandType.DISCOVER_ATTRIBUTES_RESPONSE); } /** * Constructor copying field values from command message. * @param message the command message */ - public DiscoverAttributesResponseCommand(final ZclCommandMessage message) { + public DiscoverAttributesResponse(final ZclCommandMessage message) { super(message); - this.commandIdentifier = (Boolean) message.getFields().get(ZclFieldType.DISCOVER_ATTRIBUTES_RESPONSE_COMMAND_COMMAND_IDENTIFIER); - this.information = (List) message.getFields().get(ZclFieldType.DISCOVER_ATTRIBUTES_RESPONSE_COMMAND_INFORMATION); + this.commandIdentifier = (Boolean) message.getFields().get(ZclFieldType.DISCOVER_ATTRIBUTES_RESPONSE_COMMAND_IDENTIFIER); + this.information = (List) message.getFields().get(ZclFieldType.DISCOVER_ATTRIBUTES_RESPONSE_INFORMATION); } @Override public ZclCommandMessage toCommandMessage() { final ZclCommandMessage message = super.toCommandMessage(); - message.getFields().put(ZclFieldType.DISCOVER_ATTRIBUTES_RESPONSE_COMMAND_COMMAND_IDENTIFIER,commandIdentifier); - message.getFields().put(ZclFieldType.DISCOVER_ATTRIBUTES_RESPONSE_COMMAND_INFORMATION,information); + message.getFields().put(ZclFieldType.DISCOVER_ATTRIBUTES_RESPONSE_COMMAND_IDENTIFIER,commandIdentifier); + message.getFields().put(ZclFieldType.DISCOVER_ATTRIBUTES_RESPONSE_INFORMATION,information); return message; } diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/ReadAttributesCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/ReadAttributesCommand.java similarity index 88% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/ReadAttributesCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/ReadAttributesCommand.java index 726847645..569639d8c 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/ReadAttributesCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/ReadAttributesCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.general; +package org.bubblecloud.zigbee.v3.zcl.clusters.general; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -9,7 +9,12 @@ import java.util.List; /** - * Code generated Read Attributes Command value object class. + * Read Attributes Command value object class. + * + * + * Cluster: General + * + * Code is autogenerated. Modifications may be overwritten! */ public class ReadAttributesCommand extends ZclCommand { /** @@ -21,7 +26,7 @@ public class ReadAttributesCommand extends ZclCommand { * Default constructor setting the command type field. */ public ReadAttributesCommand() { - this.setType(ZclCommandType.READ_ATTRIBUTES_COMMAND); + setType(ZclCommandType.READ_ATTRIBUTES_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/ReadAttributesResponseCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/ReadAttributesResponse.java similarity index 75% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/ReadAttributesResponseCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/ReadAttributesResponse.java index d147b2b5b..6c7f4843b 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/ReadAttributesResponseCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/ReadAttributesResponse.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.general; +package org.bubblecloud.zigbee.v3.zcl.clusters.general; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -9,9 +9,14 @@ import java.util.List; /** - * Code generated Read Attributes Response Command value object class. + * Read Attributes Response value object class. + * + * + * Cluster: General + * + * Code is autogenerated. Modifications may be overwritten! */ -public class ReadAttributesResponseCommand extends ZclCommand { +public class ReadAttributesResponse extends ZclCommand { /** * Records command message field. */ @@ -20,23 +25,23 @@ public class ReadAttributesResponseCommand extends ZclCommand { /** * Default constructor setting the command type field. */ - public ReadAttributesResponseCommand() { - this.setType(ZclCommandType.READ_ATTRIBUTES_RESPONSE_COMMAND); + public ReadAttributesResponse() { + setType(ZclCommandType.READ_ATTRIBUTES_RESPONSE); } /** * Constructor copying field values from command message. * @param message the command message */ - public ReadAttributesResponseCommand(final ZclCommandMessage message) { + public ReadAttributesResponse(final ZclCommandMessage message) { super(message); - this.records = (List) message.getFields().get(ZclFieldType.READ_ATTRIBUTES_RESPONSE_COMMAND_RECORDS); + this.records = (List) message.getFields().get(ZclFieldType.READ_ATTRIBUTES_RESPONSE_RECORDS); } @Override public ZclCommandMessage toCommandMessage() { final ZclCommandMessage message = super.toCommandMessage(); - message.getFields().put(ZclFieldType.READ_ATTRIBUTES_RESPONSE_COMMAND_RECORDS,records); + message.getFields().put(ZclFieldType.READ_ATTRIBUTES_RESPONSE_RECORDS,records); return message; } diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/ReadAttributesStructuredCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/ReadAttributesStructuredCommand.java similarity index 87% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/ReadAttributesStructuredCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/ReadAttributesStructuredCommand.java index ed70f1576..067d5f225 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/ReadAttributesStructuredCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/ReadAttributesStructuredCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.general; +package org.bubblecloud.zigbee.v3.zcl.clusters.general; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,12 @@ /** - * Code generated Read Attributes Structured Command value object class. + * Read Attributes Structured Command value object class. + * + * + * Cluster: General + * + * Code is autogenerated. Modifications may be overwritten! */ public class ReadAttributesStructuredCommand extends ZclCommand { /** @@ -19,7 +24,7 @@ public class ReadAttributesStructuredCommand extends ZclCommand { * Default constructor setting the command type field. */ public ReadAttributesStructuredCommand() { - this.setType(ZclCommandType.READ_ATTRIBUTES_STRUCTURED_COMMAND); + setType(ZclCommandType.READ_ATTRIBUTES_STRUCTURED_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/ReadReportingConfigurationCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/ReadReportingConfigurationCommand.java similarity index 87% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/ReadReportingConfigurationCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/ReadReportingConfigurationCommand.java index a4be2ca1c..c444de393 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/ReadReportingConfigurationCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/ReadReportingConfigurationCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.general; +package org.bubblecloud.zigbee.v3.zcl.clusters.general; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -9,7 +9,12 @@ import java.util.List; /** - * Code generated Read Reporting Configuration Command value object class. + * Read Reporting Configuration Command value object class. + * + * + * Cluster: General + * + * Code is autogenerated. Modifications may be overwritten! */ public class ReadReportingConfigurationCommand extends ZclCommand { /** @@ -21,7 +26,7 @@ public class ReadReportingConfigurationCommand extends ZclCommand { * Default constructor setting the command type field. */ public ReadReportingConfigurationCommand() { - this.setType(ZclCommandType.READ_REPORTING_CONFIGURATION_COMMAND); + setType(ZclCommandType.READ_REPORTING_CONFIGURATION_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/ReadReportingConfigurationResponseCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/ReadReportingConfigurationResponse.java similarity index 75% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/ReadReportingConfigurationResponseCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/ReadReportingConfigurationResponse.java index bd193ae4d..b925ba82a 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/ReadReportingConfigurationResponseCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/ReadReportingConfigurationResponse.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.general; +package org.bubblecloud.zigbee.v3.zcl.clusters.general; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -9,9 +9,14 @@ import java.util.List; /** - * Code generated Read Reporting Configuration Response Command value object class. + * Read Reporting Configuration Response value object class. + * + * + * Cluster: General + * + * Code is autogenerated. Modifications may be overwritten! */ -public class ReadReportingConfigurationResponseCommand extends ZclCommand { +public class ReadReportingConfigurationResponse extends ZclCommand { /** * Records command message field. */ @@ -20,23 +25,23 @@ public class ReadReportingConfigurationResponseCommand extends ZclCommand { /** * Default constructor setting the command type field. */ - public ReadReportingConfigurationResponseCommand() { - this.setType(ZclCommandType.READ_REPORTING_CONFIGURATION_RESPONSE_COMMAND); + public ReadReportingConfigurationResponse() { + setType(ZclCommandType.READ_REPORTING_CONFIGURATION_RESPONSE); } /** * Constructor copying field values from command message. * @param message the command message */ - public ReadReportingConfigurationResponseCommand(final ZclCommandMessage message) { + public ReadReportingConfigurationResponse(final ZclCommandMessage message) { super(message); - this.records = (List) message.getFields().get(ZclFieldType.READ_REPORTING_CONFIGURATION_RESPONSE_COMMAND_RECORDS); + this.records = (List) message.getFields().get(ZclFieldType.READ_REPORTING_CONFIGURATION_RESPONSE_RECORDS); } @Override public ZclCommandMessage toCommandMessage() { final ZclCommandMessage message = super.toCommandMessage(); - message.getFields().put(ZclFieldType.READ_REPORTING_CONFIGURATION_RESPONSE_COMMAND_RECORDS,records); + message.getFields().put(ZclFieldType.READ_REPORTING_CONFIGURATION_RESPONSE_RECORDS,records); return message; } diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/ReportAttributesCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/ReportAttributesCommand.java similarity index 87% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/ReportAttributesCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/ReportAttributesCommand.java index 75a07585a..e0ed92656 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/ReportAttributesCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/ReportAttributesCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.general; +package org.bubblecloud.zigbee.v3.zcl.clusters.general; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -9,7 +9,12 @@ import java.util.List; /** - * Code generated Report Attributes Command value object class. + * Report Attributes Command value object class. + * + * + * Cluster: General + * + * Code is autogenerated. Modifications may be overwritten! */ public class ReportAttributesCommand extends ZclCommand { /** @@ -21,7 +26,7 @@ public class ReportAttributesCommand extends ZclCommand { * Default constructor setting the command type field. */ public ReportAttributesCommand() { - this.setType(ZclCommandType.REPORT_ATTRIBUTES_COMMAND); + setType(ZclCommandType.REPORT_ATTRIBUTES_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/WriteAttributesCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/WriteAttributesCommand.java similarity index 87% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/WriteAttributesCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/WriteAttributesCommand.java index 0aea8e838..098a43f5a 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/WriteAttributesCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/WriteAttributesCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.general; +package org.bubblecloud.zigbee.v3.zcl.clusters.general; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -9,7 +9,12 @@ import java.util.List; /** - * Code generated Write Attributes Command value object class. + * Write Attributes Command value object class. + * + * + * Cluster: General + * + * Code is autogenerated. Modifications may be overwritten! */ public class WriteAttributesCommand extends ZclCommand { /** @@ -21,7 +26,7 @@ public class WriteAttributesCommand extends ZclCommand { * Default constructor setting the command type field. */ public WriteAttributesCommand() { - this.setType(ZclCommandType.WRITE_ATTRIBUTES_COMMAND); + setType(ZclCommandType.WRITE_ATTRIBUTES_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/WriteAttributesNoResponseCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/WriteAttributesNoResponse.java similarity index 74% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/WriteAttributesNoResponseCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/WriteAttributesNoResponse.java index e3480c916..12cd01206 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/WriteAttributesNoResponseCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/WriteAttributesNoResponse.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.general; +package org.bubblecloud.zigbee.v3.zcl.clusters.general; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -9,9 +9,14 @@ import java.util.List; /** - * Code generated Write Attributes No Response Command value object class. + * Write Attributes No Response value object class. + * + * + * Cluster: General + * + * Code is autogenerated. Modifications may be overwritten! */ -public class WriteAttributesNoResponseCommand extends ZclCommand { +public class WriteAttributesNoResponse extends ZclCommand { /** * Records command message field. */ @@ -20,23 +25,23 @@ public class WriteAttributesNoResponseCommand extends ZclCommand { /** * Default constructor setting the command type field. */ - public WriteAttributesNoResponseCommand() { - this.setType(ZclCommandType.WRITE_ATTRIBUTES_NO_RESPONSE_COMMAND); + public WriteAttributesNoResponse() { + setType(ZclCommandType.WRITE_ATTRIBUTES_NO_RESPONSE); } /** * Constructor copying field values from command message. * @param message the command message */ - public WriteAttributesNoResponseCommand(final ZclCommandMessage message) { + public WriteAttributesNoResponse(final ZclCommandMessage message) { super(message); - this.records = (List) message.getFields().get(ZclFieldType.WRITE_ATTRIBUTES_NO_RESPONSE_COMMAND_RECORDS); + this.records = (List) message.getFields().get(ZclFieldType.WRITE_ATTRIBUTES_NO_RESPONSE_RECORDS); } @Override public ZclCommandMessage toCommandMessage() { final ZclCommandMessage message = super.toCommandMessage(); - message.getFields().put(ZclFieldType.WRITE_ATTRIBUTES_NO_RESPONSE_COMMAND_RECORDS,records); + message.getFields().put(ZclFieldType.WRITE_ATTRIBUTES_NO_RESPONSE_RECORDS,records); return message; } diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/WriteAttributesResponseCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/WriteAttributesResponse.java similarity index 75% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/WriteAttributesResponseCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/WriteAttributesResponse.java index 2bcabbb9e..d03f81801 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/WriteAttributesResponseCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/WriteAttributesResponse.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.general; +package org.bubblecloud.zigbee.v3.zcl.clusters.general; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -9,9 +9,14 @@ import java.util.List; /** - * Code generated Write Attributes Response Command value object class. + * Write Attributes Response value object class. + * + * + * Cluster: General + * + * Code is autogenerated. Modifications may be overwritten! */ -public class WriteAttributesResponseCommand extends ZclCommand { +public class WriteAttributesResponse extends ZclCommand { /** * Records command message field. */ @@ -20,23 +25,23 @@ public class WriteAttributesResponseCommand extends ZclCommand { /** * Default constructor setting the command type field. */ - public WriteAttributesResponseCommand() { - this.setType(ZclCommandType.WRITE_ATTRIBUTES_RESPONSE_COMMAND); + public WriteAttributesResponse() { + setType(ZclCommandType.WRITE_ATTRIBUTES_RESPONSE); } /** * Constructor copying field values from command message. * @param message the command message */ - public WriteAttributesResponseCommand(final ZclCommandMessage message) { + public WriteAttributesResponse(final ZclCommandMessage message) { super(message); - this.records = (List) message.getFields().get(ZclFieldType.WRITE_ATTRIBUTES_RESPONSE_COMMAND_RECORDS); + this.records = (List) message.getFields().get(ZclFieldType.WRITE_ATTRIBUTES_RESPONSE_RECORDS); } @Override public ZclCommandMessage toCommandMessage() { final ZclCommandMessage message = super.toCommandMessage(); - message.getFields().put(ZclFieldType.WRITE_ATTRIBUTES_RESPONSE_COMMAND_RECORDS,records); + message.getFields().put(ZclFieldType.WRITE_ATTRIBUTES_RESPONSE_RECORDS,records); return message; } diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/WriteAttributesStructuredCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/WriteAttributesStructuredCommand.java similarity index 87% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/WriteAttributesStructuredCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/WriteAttributesStructuredCommand.java index c6fdc0c46..960e21188 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/WriteAttributesStructuredCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/WriteAttributesStructuredCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.general; +package org.bubblecloud.zigbee.v3.zcl.clusters.general; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,12 @@ /** - * Code generated Write Attributes Structured Command value object class. + * Write Attributes Structured Command value object class. + * + * + * Cluster: General + * + * Code is autogenerated. Modifications may be overwritten! */ public class WriteAttributesStructuredCommand extends ZclCommand { /** @@ -19,7 +24,7 @@ public class WriteAttributesStructuredCommand extends ZclCommand { * Default constructor setting the command type field. */ public WriteAttributesStructuredCommand() { - this.setType(ZclCommandType.WRITE_ATTRIBUTES_STRUCTURED_COMMAND); + setType(ZclCommandType.WRITE_ATTRIBUTES_STRUCTURED_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/WriteAttributesStructuredResponseCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/WriteAttributesStructuredResponse.java similarity index 75% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/WriteAttributesStructuredResponseCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/WriteAttributesStructuredResponse.java index 974d39938..415bbc10c 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/WriteAttributesStructuredResponseCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/WriteAttributesStructuredResponse.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.general; +package org.bubblecloud.zigbee.v3.zcl.clusters.general; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -9,9 +9,14 @@ import java.util.List; /** - * Code generated Write Attributes Structured Response Command value object class. + * Write Attributes Structured Response value object class. + * + * + * Cluster: General + * + * Code is autogenerated. Modifications may be overwritten! */ -public class WriteAttributesStructuredResponseCommand extends ZclCommand { +public class WriteAttributesStructuredResponse extends ZclCommand { /** * Records command message field. */ @@ -20,23 +25,23 @@ public class WriteAttributesStructuredResponseCommand extends ZclCommand { /** * Default constructor setting the command type field. */ - public WriteAttributesStructuredResponseCommand() { - this.setType(ZclCommandType.WRITE_ATTRIBUTES_STRUCTURED_RESPONSE_COMMAND); + public WriteAttributesStructuredResponse() { + setType(ZclCommandType.WRITE_ATTRIBUTES_STRUCTURED_RESPONSE); } /** * Constructor copying field values from command message. * @param message the command message */ - public WriteAttributesStructuredResponseCommand(final ZclCommandMessage message) { + public WriteAttributesStructuredResponse(final ZclCommandMessage message) { super(message); - this.records = (List) message.getFields().get(ZclFieldType.WRITE_ATTRIBUTES_STRUCTURED_RESPONSE_COMMAND_RECORDS); + this.records = (List) message.getFields().get(ZclFieldType.WRITE_ATTRIBUTES_STRUCTURED_RESPONSE_RECORDS); } @Override public ZclCommandMessage toCommandMessage() { final ZclCommandMessage message = super.toCommandMessage(); - message.getFields().put(ZclFieldType.WRITE_ATTRIBUTES_STRUCTURED_RESPONSE_COMMAND_RECORDS,records); + message.getFields().put(ZclFieldType.WRITE_ATTRIBUTES_STRUCTURED_RESPONSE_RECORDS,records); return message; } diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/WriteAttributesUndividedCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/WriteAttributesUndividedCommand.java similarity index 87% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/WriteAttributesUndividedCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/WriteAttributesUndividedCommand.java index 03d617b49..31b79bdf7 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/general/WriteAttributesUndividedCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/general/WriteAttributesUndividedCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.general; +package org.bubblecloud.zigbee.v3.zcl.clusters.general; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -9,7 +9,12 @@ import java.util.List; /** - * Code generated Write Attributes Undivided Command value object class. + * Write Attributes Undivided Command value object class. + * + * + * Cluster: General + * + * Code is autogenerated. Modifications may be overwritten! */ public class WriteAttributesUndividedCommand extends ZclCommand { /** @@ -21,7 +26,7 @@ public class WriteAttributesUndividedCommand extends ZclCommand { * Default constructor setting the command type field. */ public WriteAttributesUndividedCommand() { - this.setType(ZclCommandType.WRITE_ATTRIBUTES_UNDIVIDED_COMMAND); + setType(ZclCommandType.WRITE_ATTRIBUTES_UNDIVIDED_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/groups/AddGroupCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/groups/AddGroupCommand.java similarity index 61% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/groups/AddGroupCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/groups/AddGroupCommand.java index 8b2da804b..72811a4ba 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/groups/AddGroupCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/groups/AddGroupCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.groups; +package org.bubblecloud.zigbee.v3.zcl.clusters.groups; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,29 @@ /** - * Code generated Add Group Command value object class. + * Add Group Command value object class. + * + * + * Cluster: 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 + * + * Code is autogenerated. Modifications may be overwritten! */ public class AddGroupCommand extends ZclCommand { /** @@ -23,7 +45,7 @@ public class AddGroupCommand extends ZclCommand { * Default constructor setting the command type field. */ public AddGroupCommand() { - this.setType(ZclCommandType.ADD_GROUP_COMMAND); + setType(ZclCommandType.ADD_GROUP_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/groups/AddGroupIfIdentifyingCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/groups/AddGroupIfIdentifyingCommand.java similarity index 61% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/groups/AddGroupIfIdentifyingCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/groups/AddGroupIfIdentifyingCommand.java index cfad4f294..273e5c045 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/groups/AddGroupIfIdentifyingCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/groups/AddGroupIfIdentifyingCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.groups; +package org.bubblecloud.zigbee.v3.zcl.clusters.groups; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,29 @@ /** - * Code generated Add Group If Identifying Command value object class. + * Add Group If Identifying Command value object class. + * + * + * Cluster: 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 + * + * Code is autogenerated. Modifications may be overwritten! */ public class AddGroupIfIdentifyingCommand extends ZclCommand { /** @@ -23,7 +45,7 @@ public class AddGroupIfIdentifyingCommand extends ZclCommand { * Default constructor setting the command type field. */ public AddGroupIfIdentifyingCommand() { - this.setType(ZclCommandType.ADD_GROUP_IF_IDENTIFYING_COMMAND); + setType(ZclCommandType.ADD_GROUP_IF_IDENTIFYING_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/groups/AddGroupResponseCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/groups/AddGroupResponse.java similarity index 54% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/groups/AddGroupResponseCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/groups/AddGroupResponse.java index 56752ee29..ed289fe28 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/groups/AddGroupResponseCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/groups/AddGroupResponse.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.groups; +package org.bubblecloud.zigbee.v3.zcl.clusters.groups; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,9 +7,31 @@ /** - * Code generated Add Group Response Command value object class. + * Add Group Response value object class. + * + * + * Cluster: 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 + * + * Code is autogenerated. Modifications may be overwritten! */ -public class AddGroupResponseCommand extends ZclCommand { +public class AddGroupResponse extends ZclCommand { /** * Status command message field. */ @@ -22,25 +44,25 @@ public class AddGroupResponseCommand extends ZclCommand { /** * Default constructor setting the command type field. */ - public AddGroupResponseCommand() { - this.setType(ZclCommandType.ADD_GROUP_RESPONSE_COMMAND); + public AddGroupResponse() { + setType(ZclCommandType.ADD_GROUP_RESPONSE); } /** * Constructor copying field values from command message. * @param message the command message */ - public AddGroupResponseCommand(final ZclCommandMessage message) { + public AddGroupResponse(final ZclCommandMessage message) { super(message); - this.status = (Integer) message.getFields().get(ZclFieldType.ADD_GROUP_RESPONSE_COMMAND_STATUS); - this.groupId = (Integer) message.getFields().get(ZclFieldType.ADD_GROUP_RESPONSE_COMMAND_GROUP_ID); + this.status = (Integer) message.getFields().get(ZclFieldType.ADD_GROUP_RESPONSE_STATUS); + this.groupId = (Integer) message.getFields().get(ZclFieldType.ADD_GROUP_RESPONSE_GROUP_ID); } @Override public ZclCommandMessage toCommandMessage() { final ZclCommandMessage message = super.toCommandMessage(); - message.getFields().put(ZclFieldType.ADD_GROUP_RESPONSE_COMMAND_STATUS,status); - message.getFields().put(ZclFieldType.ADD_GROUP_RESPONSE_COMMAND_GROUP_ID,groupId); + message.getFields().put(ZclFieldType.ADD_GROUP_RESPONSE_STATUS,status); + message.getFields().put(ZclFieldType.ADD_GROUP_RESPONSE_GROUP_ID,groupId); return message; } diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/groups/GetGroupMembershipCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/groups/GetGroupMembershipCommand.java similarity index 63% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/groups/GetGroupMembershipCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/groups/GetGroupMembershipCommand.java index 65969aa14..3ef868748 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/groups/GetGroupMembershipCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/groups/GetGroupMembershipCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.groups; +package org.bubblecloud.zigbee.v3.zcl.clusters.groups; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -9,7 +9,29 @@ import java.util.List; /** - * Code generated Get Group Membership Command value object class. + * Get Group Membership Command value object class. + * + * + * Cluster: 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 + * + * Code is autogenerated. Modifications may be overwritten! */ public class GetGroupMembershipCommand extends ZclCommand { /** @@ -25,7 +47,7 @@ public class GetGroupMembershipCommand extends ZclCommand { * Default constructor setting the command type field. */ public GetGroupMembershipCommand() { - this.setType(ZclCommandType.GET_GROUP_MEMBERSHIP_COMMAND); + setType(ZclCommandType.GET_GROUP_MEMBERSHIP_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/groups/GetGroupMembershipResponseCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/groups/GetGroupMembershipResponse.java similarity index 59% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/groups/GetGroupMembershipResponseCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/groups/GetGroupMembershipResponse.java index 860242e89..82e7fdbc5 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/groups/GetGroupMembershipResponseCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/groups/GetGroupMembershipResponse.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.groups; +package org.bubblecloud.zigbee.v3.zcl.clusters.groups; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -9,9 +9,31 @@ import java.util.List; /** - * Code generated Get Group Membership Response Command value object class. + * Get Group Membership Response value object class. + * + * + * Cluster: 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 + * + * Code is autogenerated. Modifications may be overwritten! */ -public class GetGroupMembershipResponseCommand extends ZclCommand { +public class GetGroupMembershipResponse extends ZclCommand { /** * Capacity command message field. */ @@ -28,27 +50,27 @@ public class GetGroupMembershipResponseCommand extends ZclCommand { /** * Default constructor setting the command type field. */ - public GetGroupMembershipResponseCommand() { - this.setType(ZclCommandType.GET_GROUP_MEMBERSHIP_RESPONSE_COMMAND); + public GetGroupMembershipResponse() { + setType(ZclCommandType.GET_GROUP_MEMBERSHIP_RESPONSE); } /** * Constructor copying field values from command message. * @param message the command message */ - public GetGroupMembershipResponseCommand(final ZclCommandMessage message) { + public GetGroupMembershipResponse(final ZclCommandMessage message) { super(message); - this.capacity = (Integer) message.getFields().get(ZclFieldType.GET_GROUP_MEMBERSHIP_RESPONSE_COMMAND_CAPACITY); - this.groupCount = (Integer) message.getFields().get(ZclFieldType.GET_GROUP_MEMBERSHIP_RESPONSE_COMMAND_GROUP_COUNT); - this.groupList = (List) message.getFields().get(ZclFieldType.GET_GROUP_MEMBERSHIP_RESPONSE_COMMAND_GROUP_LIST); + this.capacity = (Integer) message.getFields().get(ZclFieldType.GET_GROUP_MEMBERSHIP_RESPONSE_CAPACITY); + this.groupCount = (Integer) message.getFields().get(ZclFieldType.GET_GROUP_MEMBERSHIP_RESPONSE_GROUP_COUNT); + this.groupList = (List) message.getFields().get(ZclFieldType.GET_GROUP_MEMBERSHIP_RESPONSE_GROUP_LIST); } @Override public ZclCommandMessage toCommandMessage() { final ZclCommandMessage message = super.toCommandMessage(); - message.getFields().put(ZclFieldType.GET_GROUP_MEMBERSHIP_RESPONSE_COMMAND_CAPACITY,capacity); - message.getFields().put(ZclFieldType.GET_GROUP_MEMBERSHIP_RESPONSE_COMMAND_GROUP_COUNT,groupCount); - message.getFields().put(ZclFieldType.GET_GROUP_MEMBERSHIP_RESPONSE_COMMAND_GROUP_LIST,groupList); + message.getFields().put(ZclFieldType.GET_GROUP_MEMBERSHIP_RESPONSE_CAPACITY,capacity); + message.getFields().put(ZclFieldType.GET_GROUP_MEMBERSHIP_RESPONSE_GROUP_COUNT,groupCount); + message.getFields().put(ZclFieldType.GET_GROUP_MEMBERSHIP_RESPONSE_GROUP_LIST,groupList); return message; } diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/groups/RemoveAllGroupsCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/groups/RemoveAllGroupsCommand.java new file mode 100644 index 000000000..6f07ea417 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/groups/RemoveAllGroupsCommand.java @@ -0,0 +1,63 @@ +package org.bubblecloud.zigbee.v3.zcl.clusters.groups; + +import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; +import org.bubblecloud.zigbee.v3.zcl.ZclCommand; +import org.bubblecloud.zigbee.v3.zcl.protocol.ZclCommandType; + + +/** + * Remove All Groups Command value object class. + * + * + * Cluster: 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 + * + * Code is autogenerated. Modifications may be overwritten! + */ +public class RemoveAllGroupsCommand extends ZclCommand { + + /** + * Default constructor setting the command type field. + */ + public RemoveAllGroupsCommand() { + setType(ZclCommandType.REMOVE_ALL_GROUPS_COMMAND); + } + + /** + * Constructor copying field values from command message. + * @param message the command message + */ + public RemoveAllGroupsCommand(final ZclCommandMessage message) { + super(message); + } + + @Override + public ZclCommandMessage toCommandMessage() { + final ZclCommandMessage message = super.toCommandMessage(); + return message; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(); + builder.append(super.toString()); + return builder.toString(); + } + +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/groups/RemoveGroupCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/groups/RemoveGroupCommand.java similarity index 52% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/groups/RemoveGroupCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/groups/RemoveGroupCommand.java index 22340d780..a1e0c0721 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/groups/RemoveGroupCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/groups/RemoveGroupCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.groups; +package org.bubblecloud.zigbee.v3.zcl.clusters.groups; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,29 @@ /** - * Code generated Remove Group Command value object class. + * Remove Group Command value object class. + * + * + * Cluster: 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 + * + * Code is autogenerated. Modifications may be overwritten! */ public class RemoveGroupCommand extends ZclCommand { /** @@ -19,7 +41,7 @@ public class RemoveGroupCommand extends ZclCommand { * Default constructor setting the command type field. */ public RemoveGroupCommand() { - this.setType(ZclCommandType.REMOVE_GROUP_COMMAND); + setType(ZclCommandType.REMOVE_GROUP_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/groups/RemoveGroupResponseCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/groups/RemoveGroupResponse.java similarity index 53% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/groups/RemoveGroupResponseCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/groups/RemoveGroupResponse.java index eed9105e5..9445589e5 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/groups/RemoveGroupResponseCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/groups/RemoveGroupResponse.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.groups; +package org.bubblecloud.zigbee.v3.zcl.clusters.groups; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,9 +7,31 @@ /** - * Code generated Remove Group Response Command value object class. + * Remove Group Response value object class. + * + * + * Cluster: 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 + * + * Code is autogenerated. Modifications may be overwritten! */ -public class RemoveGroupResponseCommand extends ZclCommand { +public class RemoveGroupResponse extends ZclCommand { /** * Status command message field. */ @@ -22,25 +44,25 @@ public class RemoveGroupResponseCommand extends ZclCommand { /** * Default constructor setting the command type field. */ - public RemoveGroupResponseCommand() { - this.setType(ZclCommandType.REMOVE_GROUP_RESPONSE_COMMAND); + public RemoveGroupResponse() { + setType(ZclCommandType.REMOVE_GROUP_RESPONSE); } /** * Constructor copying field values from command message. * @param message the command message */ - public RemoveGroupResponseCommand(final ZclCommandMessage message) { + public RemoveGroupResponse(final ZclCommandMessage message) { super(message); - this.status = (Integer) message.getFields().get(ZclFieldType.REMOVE_GROUP_RESPONSE_COMMAND_STATUS); - this.groupId = (Integer) message.getFields().get(ZclFieldType.REMOVE_GROUP_RESPONSE_COMMAND_GROUP_ID); + this.status = (Integer) message.getFields().get(ZclFieldType.REMOVE_GROUP_RESPONSE_STATUS); + this.groupId = (Integer) message.getFields().get(ZclFieldType.REMOVE_GROUP_RESPONSE_GROUP_ID); } @Override public ZclCommandMessage toCommandMessage() { final ZclCommandMessage message = super.toCommandMessage(); - message.getFields().put(ZclFieldType.REMOVE_GROUP_RESPONSE_COMMAND_STATUS,status); - message.getFields().put(ZclFieldType.REMOVE_GROUP_RESPONSE_COMMAND_GROUP_ID,groupId); + message.getFields().put(ZclFieldType.REMOVE_GROUP_RESPONSE_STATUS,status); + message.getFields().put(ZclFieldType.REMOVE_GROUP_RESPONSE_GROUP_ID,groupId); return message; } diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/groups/ViewGroupCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/groups/ViewGroupCommand.java similarity index 52% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/groups/ViewGroupCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/groups/ViewGroupCommand.java index e443cffaa..c204ee937 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/groups/ViewGroupCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/groups/ViewGroupCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.groups; +package org.bubblecloud.zigbee.v3.zcl.clusters.groups; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,29 @@ /** - * Code generated View Group Command value object class. + * View Group Command value object class. + * + * + * Cluster: 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 + * + * Code is autogenerated. Modifications may be overwritten! */ public class ViewGroupCommand extends ZclCommand { /** @@ -19,7 +41,7 @@ public class ViewGroupCommand extends ZclCommand { * Default constructor setting the command type field. */ public ViewGroupCommand() { - this.setType(ZclCommandType.VIEW_GROUP_COMMAND); + setType(ZclCommandType.VIEW_GROUP_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/groups/ViewGroupResponseCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/groups/ViewGroupResponse.java similarity index 60% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/groups/ViewGroupResponseCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/groups/ViewGroupResponse.java index e40850a41..663a95e9a 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/groups/ViewGroupResponseCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/groups/ViewGroupResponse.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.groups; +package org.bubblecloud.zigbee.v3.zcl.clusters.groups; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,9 +7,31 @@ /** - * Code generated View Group Response Command value object class. + * View Group Response value object class. + * + * + * Cluster: 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 + * + * Code is autogenerated. Modifications may be overwritten! */ -public class ViewGroupResponseCommand extends ZclCommand { +public class ViewGroupResponse extends ZclCommand { /** * Status command message field. */ @@ -26,27 +48,27 @@ public class ViewGroupResponseCommand extends ZclCommand { /** * Default constructor setting the command type field. */ - public ViewGroupResponseCommand() { - this.setType(ZclCommandType.VIEW_GROUP_RESPONSE_COMMAND); + public ViewGroupResponse() { + setType(ZclCommandType.VIEW_GROUP_RESPONSE); } /** * Constructor copying field values from command message. * @param message the command message */ - public ViewGroupResponseCommand(final ZclCommandMessage message) { + public ViewGroupResponse(final ZclCommandMessage message) { super(message); - this.status = (Integer) message.getFields().get(ZclFieldType.VIEW_GROUP_RESPONSE_COMMAND_STATUS); - this.groupId = (Integer) message.getFields().get(ZclFieldType.VIEW_GROUP_RESPONSE_COMMAND_GROUP_ID); - this.groupName = (String) message.getFields().get(ZclFieldType.VIEW_GROUP_RESPONSE_COMMAND_GROUP_NAME); + this.status = (Integer) message.getFields().get(ZclFieldType.VIEW_GROUP_RESPONSE_STATUS); + this.groupId = (Integer) message.getFields().get(ZclFieldType.VIEW_GROUP_RESPONSE_GROUP_ID); + this.groupName = (String) message.getFields().get(ZclFieldType.VIEW_GROUP_RESPONSE_GROUP_NAME); } @Override public ZclCommandMessage toCommandMessage() { final ZclCommandMessage message = super.toCommandMessage(); - message.getFields().put(ZclFieldType.VIEW_GROUP_RESPONSE_COMMAND_STATUS,status); - message.getFields().put(ZclFieldType.VIEW_GROUP_RESPONSE_COMMAND_GROUP_ID,groupId); - message.getFields().put(ZclFieldType.VIEW_GROUP_RESPONSE_COMMAND_GROUP_NAME,groupName); + message.getFields().put(ZclFieldType.VIEW_GROUP_RESPONSE_STATUS,status); + message.getFields().put(ZclFieldType.VIEW_GROUP_RESPONSE_GROUP_ID,groupId); + message.getFields().put(ZclFieldType.VIEW_GROUP_RESPONSE_GROUP_NAME,groupName); return message; } diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/ace/ArmCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iasace/ArmCommand.java similarity index 76% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/ace/ArmCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iasace/ArmCommand.java index 79024979b..c135c4cda 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/ace/ArmCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iasace/ArmCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.ias.ace; +package org.bubblecloud.zigbee.v3.zcl.clusters.iasace; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,16 @@ /** - * Code generated Arm Command value object class. + * Arm Command value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class ArmCommand extends ZclCommand { /** @@ -19,7 +28,7 @@ public class ArmCommand extends ZclCommand { * Default constructor setting the command type field. */ public ArmCommand() { - this.setType(ZclCommandType.ARM_COMMAND); + setType(ZclCommandType.ARM_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/ace/ArmResponseCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iasace/ArmResponse.java similarity index 66% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/ace/ArmResponseCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iasace/ArmResponse.java index af065186e..30fb55e8c 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/ace/ArmResponseCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iasace/ArmResponse.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.ias.ace; +package org.bubblecloud.zigbee.v3.zcl.clusters.iasace; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,9 +7,18 @@ /** - * Code generated Arm Response Command value object class. + * Arm Response value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ -public class ArmResponseCommand extends ZclCommand { +public class ArmResponse extends ZclCommand { /** * Arm Notification command message field. */ @@ -18,23 +27,23 @@ public class ArmResponseCommand extends ZclCommand { /** * Default constructor setting the command type field. */ - public ArmResponseCommand() { - this.setType(ZclCommandType.ARM_RESPONSE_COMMAND); + public ArmResponse() { + setType(ZclCommandType.ARM_RESPONSE); } /** * Constructor copying field values from command message. * @param message the command message */ - public ArmResponseCommand(final ZclCommandMessage message) { + public ArmResponse(final ZclCommandMessage message) { super(message); - this.armNotification = (Integer) message.getFields().get(ZclFieldType.ARM_RESPONSE_COMMAND_ARM_NOTIFICATION); + this.armNotification = (Integer) message.getFields().get(ZclFieldType.ARM_RESPONSE_ARM_NOTIFICATION); } @Override public ZclCommandMessage toCommandMessage() { final ZclCommandMessage message = super.toCommandMessage(); - message.getFields().put(ZclFieldType.ARM_RESPONSE_COMMAND_ARM_NOTIFICATION,armNotification); + message.getFields().put(ZclFieldType.ARM_RESPONSE_ARM_NOTIFICATION,armNotification); return message; } diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/ace/BypassCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iasace/BypassCommand.java similarity index 83% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/ace/BypassCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iasace/BypassCommand.java index d0a22395d..546d7264d 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/ace/BypassCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iasace/BypassCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.ias.ace; +package org.bubblecloud.zigbee.v3.zcl.clusters.iasace; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -9,7 +9,16 @@ import java.util.List; /** - * Code generated Bypass Command value object class. + * Bypass Command value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class BypassCommand extends ZclCommand { /** @@ -25,7 +34,7 @@ public class BypassCommand extends ZclCommand { * Default constructor setting the command type field. */ public BypassCommand() { - this.setType(ZclCommandType.BYPASS_COMMAND); + setType(ZclCommandType.BYPASS_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/ace/EmergencyCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iasace/EmergencyCommand.java similarity index 64% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/ace/EmergencyCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iasace/EmergencyCommand.java index bb54e4d2e..66461bda7 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/ace/EmergencyCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iasace/EmergencyCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.ias.ace; +package org.bubblecloud.zigbee.v3.zcl.clusters.iasace; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -6,7 +6,16 @@ /** - * Code generated Emergency Command value object class. + * Emergency Command value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class EmergencyCommand extends ZclCommand { @@ -14,7 +23,7 @@ public class EmergencyCommand extends ZclCommand { * Default constructor setting the command type field. */ public EmergencyCommand() { - this.setType(ZclCommandType.EMERGENCY_COMMAND); + setType(ZclCommandType.EMERGENCY_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/ace/FireCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iasace/FireCommand.java similarity index 64% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/ace/FireCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iasace/FireCommand.java index 400c6e127..c868ad9a2 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/ace/FireCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iasace/FireCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.ias.ace; +package org.bubblecloud.zigbee.v3.zcl.clusters.iasace; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -6,7 +6,16 @@ /** - * Code generated Fire Command value object class. + * Fire Command value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class FireCommand extends ZclCommand { @@ -14,7 +23,7 @@ public class FireCommand extends ZclCommand { * Default constructor setting the command type field. */ public FireCommand() { - this.setType(ZclCommandType.FIRE_COMMAND); + setType(ZclCommandType.FIRE_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/ace/GetZoneIdMapCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iasace/GetZoneIdMapCommand.java similarity index 64% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/ace/GetZoneIdMapCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iasace/GetZoneIdMapCommand.java index 04f9afba0..d24ed85c4 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/ace/GetZoneIdMapCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iasace/GetZoneIdMapCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.ias.ace; +package org.bubblecloud.zigbee.v3.zcl.clusters.iasace; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -6,7 +6,16 @@ /** - * Code generated Get Zone ID Map Command value object class. + * Get Zone ID Map Command value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class GetZoneIdMapCommand extends ZclCommand { @@ -14,7 +23,7 @@ public class GetZoneIdMapCommand extends ZclCommand { * Default constructor setting the command type field. */ public GetZoneIdMapCommand() { - this.setType(ZclCommandType.GET_ZONE_ID_MAP_COMMAND); + setType(ZclCommandType.GET_ZONE_ID_MAP_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/ace/GetZoneIdMapResponseCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iasace/GetZoneIdMapResponse.java similarity index 84% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/ace/GetZoneIdMapResponseCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iasace/GetZoneIdMapResponse.java index d8c6f7b46..b83f17d6e 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/ace/GetZoneIdMapResponseCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iasace/GetZoneIdMapResponse.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.ias.ace; +package org.bubblecloud.zigbee.v3.zcl.clusters.iasace; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,9 +7,18 @@ /** - * Code generated Get Zone ID Map Response Command value object class. + * Get Zone ID Map Response value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ -public class GetZoneIdMapResponseCommand extends ZclCommand { +public class GetZoneIdMapResponse extends ZclCommand { /** * Zone ID Map section 0 command message field. */ @@ -78,53 +87,53 @@ public class GetZoneIdMapResponseCommand extends ZclCommand { /** * Default constructor setting the command type field. */ - public GetZoneIdMapResponseCommand() { - this.setType(ZclCommandType.GET_ZONE_ID_MAP_RESPONSE_COMMAND); + public GetZoneIdMapResponse() { + setType(ZclCommandType.GET_ZONE_ID_MAP_RESPONSE); } /** * Constructor copying field values from command message. * @param message the command message */ - public GetZoneIdMapResponseCommand(final ZclCommandMessage message) { + public GetZoneIdMapResponse(final ZclCommandMessage message) { super(message); - this.zoneIdMapSection0 = (Integer) message.getFields().get(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_0); - this.zoneIdMapSection1 = (Integer) message.getFields().get(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_1); - this.zoneIdMapSection2 = (Integer) message.getFields().get(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_2); - this.zoneIdMapSection3 = (Integer) message.getFields().get(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_3); - this.zoneIdMapSection4 = (Integer) message.getFields().get(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_4); - this.zoneIdMapSection5 = (Integer) message.getFields().get(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_5); - this.zoneIdMapSection6 = (Integer) message.getFields().get(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_6); - this.zoneIdMapSection7 = (Integer) message.getFields().get(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_7); - this.zoneIdMapSection8 = (Integer) message.getFields().get(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_8); - this.zoneIdMapSection9 = (Integer) message.getFields().get(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_9); - this.zoneIdMapSection10 = (Integer) message.getFields().get(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_10); - this.zoneIdMapSection11 = (Integer) message.getFields().get(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_11); - this.zoneIdMapSection12 = (Integer) message.getFields().get(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_12); - this.zoneIdMapSection13 = (Integer) message.getFields().get(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_13); - this.zoneIdMapSection14 = (Integer) message.getFields().get(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_14); - this.zoneIdMapSection15 = (Integer) message.getFields().get(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_15); + this.zoneIdMapSection0 = (Integer) message.getFields().get(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_0); + this.zoneIdMapSection1 = (Integer) message.getFields().get(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_1); + this.zoneIdMapSection2 = (Integer) message.getFields().get(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_2); + this.zoneIdMapSection3 = (Integer) message.getFields().get(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_3); + this.zoneIdMapSection4 = (Integer) message.getFields().get(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_4); + this.zoneIdMapSection5 = (Integer) message.getFields().get(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_5); + this.zoneIdMapSection6 = (Integer) message.getFields().get(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_6); + this.zoneIdMapSection7 = (Integer) message.getFields().get(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_7); + this.zoneIdMapSection8 = (Integer) message.getFields().get(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_8); + this.zoneIdMapSection9 = (Integer) message.getFields().get(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_9); + this.zoneIdMapSection10 = (Integer) message.getFields().get(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_10); + this.zoneIdMapSection11 = (Integer) message.getFields().get(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_11); + this.zoneIdMapSection12 = (Integer) message.getFields().get(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_12); + this.zoneIdMapSection13 = (Integer) message.getFields().get(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_13); + this.zoneIdMapSection14 = (Integer) message.getFields().get(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_14); + this.zoneIdMapSection15 = (Integer) message.getFields().get(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_15); } @Override public ZclCommandMessage toCommandMessage() { final ZclCommandMessage message = super.toCommandMessage(); - message.getFields().put(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_0,zoneIdMapSection0); - message.getFields().put(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_1,zoneIdMapSection1); - message.getFields().put(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_2,zoneIdMapSection2); - message.getFields().put(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_3,zoneIdMapSection3); - message.getFields().put(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_4,zoneIdMapSection4); - message.getFields().put(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_5,zoneIdMapSection5); - message.getFields().put(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_6,zoneIdMapSection6); - message.getFields().put(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_7,zoneIdMapSection7); - message.getFields().put(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_8,zoneIdMapSection8); - message.getFields().put(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_9,zoneIdMapSection9); - message.getFields().put(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_10,zoneIdMapSection10); - message.getFields().put(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_11,zoneIdMapSection11); - message.getFields().put(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_12,zoneIdMapSection12); - message.getFields().put(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_13,zoneIdMapSection13); - message.getFields().put(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_14,zoneIdMapSection14); - message.getFields().put(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_15,zoneIdMapSection15); + message.getFields().put(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_0,zoneIdMapSection0); + message.getFields().put(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_1,zoneIdMapSection1); + message.getFields().put(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_2,zoneIdMapSection2); + message.getFields().put(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_3,zoneIdMapSection3); + message.getFields().put(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_4,zoneIdMapSection4); + message.getFields().put(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_5,zoneIdMapSection5); + message.getFields().put(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_6,zoneIdMapSection6); + message.getFields().put(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_7,zoneIdMapSection7); + message.getFields().put(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_8,zoneIdMapSection8); + message.getFields().put(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_9,zoneIdMapSection9); + message.getFields().put(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_10,zoneIdMapSection10); + message.getFields().put(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_11,zoneIdMapSection11); + message.getFields().put(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_12,zoneIdMapSection12); + message.getFields().put(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_13,zoneIdMapSection13); + message.getFields().put(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_14,zoneIdMapSection14); + message.getFields().put(ZclFieldType.GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_15,zoneIdMapSection15); return message; } diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/ace/GetZoneInformationCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iasace/GetZoneInformationCommand.java similarity index 76% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/ace/GetZoneInformationCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iasace/GetZoneInformationCommand.java index a76f57dc5..5fe86a240 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/ace/GetZoneInformationCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iasace/GetZoneInformationCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.ias.ace; +package org.bubblecloud.zigbee.v3.zcl.clusters.iasace; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,16 @@ /** - * Code generated Get Zone Information Command value object class. + * Get Zone Information Command value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class GetZoneInformationCommand extends ZclCommand { /** @@ -19,7 +28,7 @@ public class GetZoneInformationCommand extends ZclCommand { * Default constructor setting the command type field. */ public GetZoneInformationCommand() { - this.setType(ZclCommandType.GET_ZONE_INFORMATION_COMMAND); + setType(ZclCommandType.GET_ZONE_INFORMATION_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/ace/GetZoneInformationResponseCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iasace/GetZoneInformationResponse.java similarity index 74% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/ace/GetZoneInformationResponseCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iasace/GetZoneInformationResponse.java index 3c4974bfd..bf42eb72a 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/ace/GetZoneInformationResponseCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iasace/GetZoneInformationResponse.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.ias.ace; +package org.bubblecloud.zigbee.v3.zcl.clusters.iasace; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,9 +7,18 @@ /** - * Code generated Get Zone Information Response Command value object class. + * Get Zone Information Response value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ -public class GetZoneInformationResponseCommand extends ZclCommand { +public class GetZoneInformationResponse extends ZclCommand { /** * Zone ID command message field. */ @@ -26,27 +35,27 @@ public class GetZoneInformationResponseCommand extends ZclCommand { /** * Default constructor setting the command type field. */ - public GetZoneInformationResponseCommand() { - this.setType(ZclCommandType.GET_ZONE_INFORMATION_RESPONSE_COMMAND); + public GetZoneInformationResponse() { + setType(ZclCommandType.GET_ZONE_INFORMATION_RESPONSE); } /** * Constructor copying field values from command message. * @param message the command message */ - public GetZoneInformationResponseCommand(final ZclCommandMessage message) { + public GetZoneInformationResponse(final ZclCommandMessage message) { super(message); - this.zoneId = (Integer) message.getFields().get(ZclFieldType.GET_ZONE_INFORMATION_RESPONSE_COMMAND_ZONE_ID); - this.zoneType = (Integer) message.getFields().get(ZclFieldType.GET_ZONE_INFORMATION_RESPONSE_COMMAND_ZONE_TYPE); - this.ieeeAddress = (Long) message.getFields().get(ZclFieldType.GET_ZONE_INFORMATION_RESPONSE_COMMAND_IEEE_ADDRESS); + this.zoneId = (Integer) message.getFields().get(ZclFieldType.GET_ZONE_INFORMATION_RESPONSE_ZONE_ID); + this.zoneType = (Integer) message.getFields().get(ZclFieldType.GET_ZONE_INFORMATION_RESPONSE_ZONE_TYPE); + this.ieeeAddress = (Long) message.getFields().get(ZclFieldType.GET_ZONE_INFORMATION_RESPONSE_IEEE_ADDRESS); } @Override public ZclCommandMessage toCommandMessage() { final ZclCommandMessage message = super.toCommandMessage(); - message.getFields().put(ZclFieldType.GET_ZONE_INFORMATION_RESPONSE_COMMAND_ZONE_ID,zoneId); - message.getFields().put(ZclFieldType.GET_ZONE_INFORMATION_RESPONSE_COMMAND_ZONE_TYPE,zoneType); - message.getFields().put(ZclFieldType.GET_ZONE_INFORMATION_RESPONSE_COMMAND_IEEE_ADDRESS,ieeeAddress); + message.getFields().put(ZclFieldType.GET_ZONE_INFORMATION_RESPONSE_ZONE_ID,zoneId); + message.getFields().put(ZclFieldType.GET_ZONE_INFORMATION_RESPONSE_ZONE_TYPE,zoneType); + message.getFields().put(ZclFieldType.GET_ZONE_INFORMATION_RESPONSE_IEEE_ADDRESS,ieeeAddress); return message; } diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/ace/PanicCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iasace/PanicCommand.java similarity index 64% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/ace/PanicCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iasace/PanicCommand.java index 7613ecfd6..a6bfe2899 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/ace/PanicCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iasace/PanicCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.ias.ace; +package org.bubblecloud.zigbee.v3.zcl.clusters.iasace; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -6,7 +6,16 @@ /** - * Code generated Panic Command value object class. + * Panic Command value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class PanicCommand extends ZclCommand { @@ -14,7 +23,7 @@ public class PanicCommand extends ZclCommand { * Default constructor setting the command type field. */ public PanicCommand() { - this.setType(ZclCommandType.PANIC_COMMAND); + setType(ZclCommandType.PANIC_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/wd/SquawkCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iaswd/SquawkCommand.java similarity index 74% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/wd/SquawkCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iaswd/SquawkCommand.java index 1e2efbef0..798b9e089 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/wd/SquawkCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iaswd/SquawkCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.ias.wd; +package org.bubblecloud.zigbee.v3.zcl.clusters.iaswd; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,16 @@ /** - * Code generated Squawk Command value object class. + * Squawk Command value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class SquawkCommand extends ZclCommand { /** @@ -19,7 +28,7 @@ public class SquawkCommand extends ZclCommand { * Default constructor setting the command type field. */ public SquawkCommand() { - this.setType(ZclCommandType.SQUAWK_COMMAND); + setType(ZclCommandType.SQUAWK_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/wd/StartWarningCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iaswd/StartWarningCommand.java similarity index 75% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/wd/StartWarningCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iaswd/StartWarningCommand.java index 0949dee26..4100c2444 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/wd/StartWarningCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iaswd/StartWarningCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.ias.wd; +package org.bubblecloud.zigbee.v3.zcl.clusters.iaswd; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,21 @@ /** - * Code generated Start Warning Command value object class. + * Start Warning Command value object class. + * + * 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. + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class StartWarningCommand extends ZclCommand { /** @@ -23,7 +37,7 @@ public class StartWarningCommand extends ZclCommand { * Default constructor setting the command type field. */ public StartWarningCommand() { - this.setType(ZclCommandType.START_WARNING_COMMAND); + setType(ZclCommandType.START_WARNING_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/zone/ZoneEnrollRequestCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iaszone/ZoneEnrollRequestCommand.java similarity index 84% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/zone/ZoneEnrollRequestCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iaszone/ZoneEnrollRequestCommand.java index b9c63f59f..3cab4cd7f 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/zone/ZoneEnrollRequestCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iaszone/ZoneEnrollRequestCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.ias.zone; +package org.bubblecloud.zigbee.v3.zcl.clusters.iaszone; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,15 @@ /** - * Code generated Zone Enroll Request Command value object class. + * Zone Enroll Request Command value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class ZoneEnrollRequestCommand extends ZclCommand { /** @@ -23,7 +31,7 @@ public class ZoneEnrollRequestCommand extends ZclCommand { * Default constructor setting the command type field. */ public ZoneEnrollRequestCommand() { - this.setType(ZclCommandType.ZONE_ENROLL_REQUEST_COMMAND); + setType(ZclCommandType.ZONE_ENROLL_REQUEST_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/zone/ZoneEnrollResponseCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iaszone/ZoneEnrollResponse.java similarity index 74% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/zone/ZoneEnrollResponseCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iaszone/ZoneEnrollResponse.java index 571e268c9..2875c09f4 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/zone/ZoneEnrollResponseCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iaszone/ZoneEnrollResponse.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.ias.zone; +package org.bubblecloud.zigbee.v3.zcl.clusters.iaszone; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,9 +7,17 @@ /** - * Code generated Zone Enroll Response Command value object class. + * Zone Enroll Response value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ -public class ZoneEnrollResponseCommand extends ZclCommand { +public class ZoneEnrollResponse extends ZclCommand { /** * Enroll response code command message field. */ @@ -22,25 +30,25 @@ public class ZoneEnrollResponseCommand extends ZclCommand { /** * Default constructor setting the command type field. */ - public ZoneEnrollResponseCommand() { - this.setType(ZclCommandType.ZONE_ENROLL_RESPONSE_COMMAND); + public ZoneEnrollResponse() { + setType(ZclCommandType.ZONE_ENROLL_RESPONSE); } /** * Constructor copying field values from command message. * @param message the command message */ - public ZoneEnrollResponseCommand(final ZclCommandMessage message) { + public ZoneEnrollResponse(final ZclCommandMessage message) { super(message); - this.enrollResponseCode = (Integer) message.getFields().get(ZclFieldType.ZONE_ENROLL_RESPONSE_COMMAND_ENROLL_RESPONSE_CODE); - this.zoneId = (Integer) message.getFields().get(ZclFieldType.ZONE_ENROLL_RESPONSE_COMMAND_ZONE_ID); + this.enrollResponseCode = (Integer) message.getFields().get(ZclFieldType.ZONE_ENROLL_RESPONSE_ENROLL_RESPONSE_CODE); + this.zoneId = (Integer) message.getFields().get(ZclFieldType.ZONE_ENROLL_RESPONSE_ZONE_ID); } @Override public ZclCommandMessage toCommandMessage() { final ZclCommandMessage message = super.toCommandMessage(); - message.getFields().put(ZclFieldType.ZONE_ENROLL_RESPONSE_COMMAND_ENROLL_RESPONSE_CODE,enrollResponseCode); - message.getFields().put(ZclFieldType.ZONE_ENROLL_RESPONSE_COMMAND_ZONE_ID,zoneId); + message.getFields().put(ZclFieldType.ZONE_ENROLL_RESPONSE_ENROLL_RESPONSE_CODE,enrollResponseCode); + message.getFields().put(ZclFieldType.ZONE_ENROLL_RESPONSE_ZONE_ID,zoneId); return message; } diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/zone/ZoneStatusChangeNotificationCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iaszone/ZoneStatusChangeNotificationCommand.java similarity index 84% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/zone/ZoneStatusChangeNotificationCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iaszone/ZoneStatusChangeNotificationCommand.java index 935e04879..10236f03b 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/ias/zone/ZoneStatusChangeNotificationCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/iaszone/ZoneStatusChangeNotificationCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.ias.zone; +package org.bubblecloud.zigbee.v3.zcl.clusters.iaszone; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,15 @@ /** - * Code generated Zone Status Change Notification Command value object class. + * Zone Status Change Notification Command value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class ZoneStatusChangeNotificationCommand extends ZclCommand { /** @@ -23,7 +31,7 @@ public class ZoneStatusChangeNotificationCommand extends ZclCommand { * Default constructor setting the command type field. */ public ZoneStatusChangeNotificationCommand() { - this.setType(ZclCommandType.ZONE_STATUS_CHANGE_NOTIFICATION_COMMAND); + setType(ZclCommandType.ZONE_STATUS_CHANGE_NOTIFICATION_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/identify/IdentifyCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/identify/IdentifyCommand.java similarity index 69% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/identify/IdentifyCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/identify/IdentifyCommand.java index 972fc5c44..7e99e50ba 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/identify/IdentifyCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/identify/IdentifyCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.identify; +package org.bubblecloud.zigbee.v3.zcl.clusters.identify; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,19 @@ /** - * Code generated Identify Command value object class. + * Identify Command value object class. + * + * The identify command starts or stops the receiving device identifying itself. + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class IdentifyCommand extends ZclCommand { /** @@ -19,7 +31,7 @@ public class IdentifyCommand extends ZclCommand { * Default constructor setting the command type field. */ public IdentifyCommand() { - this.setType(ZclCommandType.IDENTIFY_COMMAND); + setType(ZclCommandType.IDENTIFY_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/identify/IdentifyQueryCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/identify/IdentifyQueryCommand.java similarity index 57% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/identify/IdentifyQueryCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/identify/IdentifyQueryCommand.java index 15e023f60..e02874876 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/identify/IdentifyQueryCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/identify/IdentifyQueryCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.identify; +package org.bubblecloud.zigbee.v3.zcl.clusters.identify; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -6,7 +6,18 @@ /** - * Code generated Identify Query Command value object class. + * Identify Query Command value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class IdentifyQueryCommand extends ZclCommand { @@ -14,7 +25,7 @@ public class IdentifyQueryCommand extends ZclCommand { * Default constructor setting the command type field. */ public IdentifyQueryCommand() { - this.setType(ZclCommandType.IDENTIFY_QUERY_COMMAND); + setType(ZclCommandType.IDENTIFY_QUERY_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/identify/IdentifyQueryResponseCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/identify/IdentifyQueryResponse.java similarity index 58% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/identify/IdentifyQueryResponseCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/identify/IdentifyQueryResponse.java index a0c75cd25..3e4630340 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/identify/IdentifyQueryResponseCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/identify/IdentifyQueryResponse.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.identify; +package org.bubblecloud.zigbee.v3.zcl.clusters.identify; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,9 +7,22 @@ /** - * Code generated Identify Query Response Command value object class. + * Identify Query Response value object class. + * + * 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. + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ -public class IdentifyQueryResponseCommand extends ZclCommand { +public class IdentifyQueryResponse extends ZclCommand { /** * Identify Time command message field. */ @@ -18,23 +31,23 @@ public class IdentifyQueryResponseCommand extends ZclCommand { /** * Default constructor setting the command type field. */ - public IdentifyQueryResponseCommand() { - this.setType(ZclCommandType.IDENTIFY_QUERY_RESPONSE_COMMAND); + public IdentifyQueryResponse() { + setType(ZclCommandType.IDENTIFY_QUERY_RESPONSE); } /** * Constructor copying field values from command message. * @param message the command message */ - public IdentifyQueryResponseCommand(final ZclCommandMessage message) { + public IdentifyQueryResponse(final ZclCommandMessage message) { super(message); - this.identifyTime = (Integer) message.getFields().get(ZclFieldType.IDENTIFY_QUERY_RESPONSE_COMMAND_IDENTIFY_TIME); + this.identifyTime = (Integer) message.getFields().get(ZclFieldType.IDENTIFY_QUERY_RESPONSE_IDENTIFY_TIME); } @Override public ZclCommandMessage toCommandMessage() { final ZclCommandMessage message = super.toCommandMessage(); - message.getFields().put(ZclFieldType.IDENTIFY_QUERY_RESPONSE_COMMAND_IDENTIFY_TIME,identifyTime); + message.getFields().put(ZclFieldType.IDENTIFY_QUERY_RESPONSE_IDENTIFY_TIME,identifyTime); return message; } diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/level/control/MoveCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/levelcontrol/MoveCommand.java similarity index 83% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/level/control/MoveCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/levelcontrol/MoveCommand.java index f5ca4a778..85831848d 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/level/control/MoveCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/levelcontrol/MoveCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.level.control; +package org.bubblecloud.zigbee.v3.zcl.clusters.levelcontrol; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,15 @@ /** - * Code generated Move Command value object class. + * Move Command value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class MoveCommand extends ZclCommand { /** @@ -23,7 +31,7 @@ public class MoveCommand extends ZclCommand { * Default constructor setting the command type field. */ public MoveCommand() { - this.setType(ZclCommandType.MOVE_COMMAND); + setType(ZclCommandType.MOVE_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/level/control/MoveToLevelCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/levelcontrol/MoveToLevelCommand.java similarity index 83% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/level/control/MoveToLevelCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/levelcontrol/MoveToLevelCommand.java index d5924471e..3e8087454 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/level/control/MoveToLevelCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/levelcontrol/MoveToLevelCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.level.control; +package org.bubblecloud.zigbee.v3.zcl.clusters.levelcontrol; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,15 @@ /** - * Code generated Move to Level Command value object class. + * Move to Level Command value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class MoveToLevelCommand extends ZclCommand { /** @@ -23,7 +31,7 @@ public class MoveToLevelCommand extends ZclCommand { * Default constructor setting the command type field. */ public MoveToLevelCommand() { - this.setType(ZclCommandType.MOVE_TO_LEVEL_COMMAND); + setType(ZclCommandType.MOVE_TO_LEVEL_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/level/control/MoveToLevelWithOnOffCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/levelcontrol/MoveToLevelWithOnOffCommand.java similarity index 83% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/level/control/MoveToLevelWithOnOffCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/levelcontrol/MoveToLevelWithOnOffCommand.java index bcef0dc5d..5095d8a81 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/level/control/MoveToLevelWithOnOffCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/levelcontrol/MoveToLevelWithOnOffCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.level.control; +package org.bubblecloud.zigbee.v3.zcl.clusters.levelcontrol; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,15 @@ /** - * Code generated Move to Level (with On/Off) Command value object class. + * Move to Level (with On/Off) Command value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class MoveToLevelWithOnOffCommand extends ZclCommand { /** @@ -23,7 +31,7 @@ public class MoveToLevelWithOnOffCommand extends ZclCommand { * Default constructor setting the command type field. */ public MoveToLevelWithOnOffCommand() { - this.setType(ZclCommandType.MOVE_TO_LEVEL__WITH_ON_OFF__COMMAND); + setType(ZclCommandType.MOVE_TO_LEVEL__WITH_ON_OFF__COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/level/control/MoveWithOnOffCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/levelcontrol/MoveWithOnOffCommand.java similarity index 82% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/level/control/MoveWithOnOffCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/levelcontrol/MoveWithOnOffCommand.java index 311ee65a0..d0c3380fe 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/level/control/MoveWithOnOffCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/levelcontrol/MoveWithOnOffCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.level.control; +package org.bubblecloud.zigbee.v3.zcl.clusters.levelcontrol; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,15 @@ /** - * Code generated Move (with On/Off) Command value object class. + * Move (with On/Off) Command value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class MoveWithOnOffCommand extends ZclCommand { /** @@ -23,7 +31,7 @@ public class MoveWithOnOffCommand extends ZclCommand { * Default constructor setting the command type field. */ public MoveWithOnOffCommand() { - this.setType(ZclCommandType.MOVE__WITH_ON_OFF__COMMAND); + setType(ZclCommandType.MOVE__WITH_ON_OFF__COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/level/control/StepCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/levelcontrol/StepCommand.java similarity index 87% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/level/control/StepCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/levelcontrol/StepCommand.java index d0e03a2a7..acd5866eb 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/level/control/StepCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/levelcontrol/StepCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.level.control; +package org.bubblecloud.zigbee.v3.zcl.clusters.levelcontrol; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,15 @@ /** - * Code generated Step Command value object class. + * Step Command value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class StepCommand extends ZclCommand { /** @@ -27,7 +35,7 @@ public class StepCommand extends ZclCommand { * Default constructor setting the command type field. */ public StepCommand() { - this.setType(ZclCommandType.STEP_COMMAND); + setType(ZclCommandType.STEP_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/level/control/StepWithOnOffCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/levelcontrol/StepWithOnOffCommand.java similarity index 86% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/level/control/StepWithOnOffCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/levelcontrol/StepWithOnOffCommand.java index 55ad11267..d73e5287c 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/level/control/StepWithOnOffCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/levelcontrol/StepWithOnOffCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.level.control; +package org.bubblecloud.zigbee.v3.zcl.clusters.levelcontrol; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,15 @@ /** - * Code generated Step (with On/Off) Command value object class. + * Step (with On/Off) Command value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class StepWithOnOffCommand extends ZclCommand { /** @@ -27,7 +35,7 @@ public class StepWithOnOffCommand extends ZclCommand { * Default constructor setting the command type field. */ public StepWithOnOffCommand() { - this.setType(ZclCommandType.STEP__WITH_ON_OFF__COMMAND); + setType(ZclCommandType.STEP__WITH_ON_OFF__COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/level/control/Stop2Command.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/levelcontrol/Stop2Command.java similarity index 65% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/level/control/Stop2Command.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/levelcontrol/Stop2Command.java index 0e7ef7d61..f0a590827 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/level/control/Stop2Command.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/levelcontrol/Stop2Command.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.level.control; +package org.bubblecloud.zigbee.v3.zcl.clusters.levelcontrol; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -6,7 +6,15 @@ /** - * Code generated Stop 2 Command value object class. + * Stop 2 Command value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class Stop2Command extends ZclCommand { @@ -14,7 +22,7 @@ public class Stop2Command extends ZclCommand { * Default constructor setting the command type field. */ public Stop2Command() { - this.setType(ZclCommandType.STOP_2_COMMAND); + setType(ZclCommandType.STOP_2_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/level/control/StopCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/levelcontrol/StopCommand.java similarity index 65% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/level/control/StopCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/levelcontrol/StopCommand.java index 466d8d5eb..b78818183 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/level/control/StopCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/levelcontrol/StopCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.level.control; +package org.bubblecloud.zigbee.v3.zcl.clusters.levelcontrol; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -6,7 +6,15 @@ /** - * Code generated Stop Command value object class. + * Stop Command value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class StopCommand extends ZclCommand { @@ -14,7 +22,7 @@ public class StopCommand extends ZclCommand { * Default constructor setting the command type field. */ public StopCommand() { - this.setType(ZclCommandType.STOP_COMMAND); + setType(ZclCommandType.STOP_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/on/off/OffCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/onoff/OffCommand.java similarity index 74% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/on/off/OffCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/onoff/OffCommand.java index 21c0b00c1..cbe1af7e0 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/on/off/OffCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/onoff/OffCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.on.off; +package org.bubblecloud.zigbee.v3.zcl.clusters.onoff; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -6,7 +6,13 @@ /** - * Code generated Off Command value object class. + * Off Command value object class. + * + * + * Cluster: On/Off + * Attributes and commands for switching devices between ‘On’ and ‘Off’ states. + * + * Code is autogenerated. Modifications may be overwritten! */ public class OffCommand extends ZclCommand { @@ -14,7 +20,7 @@ public class OffCommand extends ZclCommand { * Default constructor setting the command type field. */ public OffCommand() { - this.setType(ZclCommandType.OFF_COMMAND); + setType(ZclCommandType.OFF_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/on/off/OnCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/onoff/OnCommand.java similarity index 74% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/on/off/OnCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/onoff/OnCommand.java index 04cd96172..7d1035ded 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/on/off/OnCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/onoff/OnCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.on.off; +package org.bubblecloud.zigbee.v3.zcl.clusters.onoff; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -6,7 +6,13 @@ /** - * Code generated On Command value object class. + * On Command value object class. + * + * + * Cluster: On/Off + * Attributes and commands for switching devices between ‘On’ and ‘Off’ states. + * + * Code is autogenerated. Modifications may be overwritten! */ public class OnCommand extends ZclCommand { @@ -14,7 +20,7 @@ public class OnCommand extends ZclCommand { * Default constructor setting the command type field. */ public OnCommand() { - this.setType(ZclCommandType.ON_COMMAND); + setType(ZclCommandType.ON_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/on/off/ToggleCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/onoff/ToggleCommand.java similarity index 73% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/on/off/ToggleCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/onoff/ToggleCommand.java index d43d60e3e..fae545bdc 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/on/off/ToggleCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/onoff/ToggleCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.on.off; +package org.bubblecloud.zigbee.v3.zcl.clusters.onoff; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -6,7 +6,13 @@ /** - * Code generated Toggle Command value object class. + * Toggle Command value object class. + * + * + * Cluster: On/Off + * Attributes and commands for switching devices between ‘On’ and ‘Off’ states. + * + * Code is autogenerated. Modifications may be overwritten! */ public class ToggleCommand extends ZclCommand { @@ -14,7 +20,7 @@ public class ToggleCommand extends ZclCommand { * Default constructor setting the command type field. */ public ToggleCommand() { - this.setType(ZclCommandType.TOGGLE_COMMAND); + setType(ZclCommandType.TOGGLE_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/AnchorNodeAnnounceCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/AnchorNodeAnnounceCommand.java similarity index 93% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/AnchorNodeAnnounceCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/AnchorNodeAnnounceCommand.java index 448620c94..3e6d47e05 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/AnchorNodeAnnounceCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/AnchorNodeAnnounceCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.rssi.location; +package org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,12 @@ /** - * Code generated Anchor Node Announce Command value object class. + * Anchor Node Announce Command value object class. + * + * + * Cluster: RSSI Location + * + * Code is autogenerated. Modifications may be overwritten! */ public class AnchorNodeAnnounceCommand extends ZclCommand { /** @@ -31,7 +36,7 @@ public class AnchorNodeAnnounceCommand extends ZclCommand { * Default constructor setting the command type field. */ public AnchorNodeAnnounceCommand() { - this.setType(ZclCommandType.ANCHOR_NODE_ANNOUNCE_COMMAND); + setType(ZclCommandType.ANCHOR_NODE_ANNOUNCE_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/CompactLocationDataNotificationCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/CompactLocationDataNotificationCommand.java similarity index 76% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/CompactLocationDataNotificationCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/CompactLocationDataNotificationCommand.java index 5573c5bdd..77ea83468 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/CompactLocationDataNotificationCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/CompactLocationDataNotificationCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.rssi.location; +package org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -6,7 +6,12 @@ /** - * Code generated Compact Location Data Notification Command value object class. + * Compact Location Data Notification Command value object class. + * + * + * Cluster: RSSI Location + * + * Code is autogenerated. Modifications may be overwritten! */ public class CompactLocationDataNotificationCommand extends ZclCommand { @@ -14,7 +19,7 @@ public class CompactLocationDataNotificationCommand extends ZclCommand { * Default constructor setting the command type field. */ public CompactLocationDataNotificationCommand() { - this.setType(ZclCommandType.COMPACT_LOCATION_DATA_NOTIFICATION_COMMAND); + setType(ZclCommandType.COMPACT_LOCATION_DATA_NOTIFICATION_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/DeviceConfigurationResponseCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/DeviceConfigurationResponse.java similarity index 82% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/DeviceConfigurationResponseCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/DeviceConfigurationResponse.java index 63302ec94..7288e5d56 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/DeviceConfigurationResponseCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/DeviceConfigurationResponse.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.rssi.location; +package org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,9 +7,14 @@ /** - * Code generated Device Configuration Response Command value object class. + * Device Configuration Response value object class. + * + * + * Cluster: RSSI Location + * + * Code is autogenerated. Modifications may be overwritten! */ -public class DeviceConfigurationResponseCommand extends ZclCommand { +public class DeviceConfigurationResponse extends ZclCommand { /** * Status command message field. */ @@ -38,33 +43,33 @@ public class DeviceConfigurationResponseCommand extends ZclCommand { /** * Default constructor setting the command type field. */ - public DeviceConfigurationResponseCommand() { - this.setType(ZclCommandType.DEVICE_CONFIGURATION_RESPONSE_COMMAND); + public DeviceConfigurationResponse() { + setType(ZclCommandType.DEVICE_CONFIGURATION_RESPONSE); } /** * Constructor copying field values from command message. * @param message the command message */ - public DeviceConfigurationResponseCommand(final ZclCommandMessage message) { + public DeviceConfigurationResponse(final ZclCommandMessage message) { super(message); - this.status = (Integer) message.getFields().get(ZclFieldType.DEVICE_CONFIGURATION_RESPONSE_COMMAND_STATUS); - this.power = (Integer) message.getFields().get(ZclFieldType.DEVICE_CONFIGURATION_RESPONSE_COMMAND_POWER); - this.pathLossExponent = (Integer) message.getFields().get(ZclFieldType.DEVICE_CONFIGURATION_RESPONSE_COMMAND_PATH_LOSS_EXPONENT); - this.calculationPeriod = (Integer) message.getFields().get(ZclFieldType.DEVICE_CONFIGURATION_RESPONSE_COMMAND_CALCULATION_PERIOD); - this.numberRssiMeasurements = (Integer) message.getFields().get(ZclFieldType.DEVICE_CONFIGURATION_RESPONSE_COMMAND_NUMBER_RSSI_MEASUREMENTS); - this.reportingPeriod = (Integer) message.getFields().get(ZclFieldType.DEVICE_CONFIGURATION_RESPONSE_COMMAND_REPORTING_PERIOD); + this.status = (Integer) message.getFields().get(ZclFieldType.DEVICE_CONFIGURATION_RESPONSE_STATUS); + this.power = (Integer) message.getFields().get(ZclFieldType.DEVICE_CONFIGURATION_RESPONSE_POWER); + this.pathLossExponent = (Integer) message.getFields().get(ZclFieldType.DEVICE_CONFIGURATION_RESPONSE_PATH_LOSS_EXPONENT); + this.calculationPeriod = (Integer) message.getFields().get(ZclFieldType.DEVICE_CONFIGURATION_RESPONSE_CALCULATION_PERIOD); + this.numberRssiMeasurements = (Integer) message.getFields().get(ZclFieldType.DEVICE_CONFIGURATION_RESPONSE_NUMBER_RSSI_MEASUREMENTS); + this.reportingPeriod = (Integer) message.getFields().get(ZclFieldType.DEVICE_CONFIGURATION_RESPONSE_REPORTING_PERIOD); } @Override public ZclCommandMessage toCommandMessage() { final ZclCommandMessage message = super.toCommandMessage(); - message.getFields().put(ZclFieldType.DEVICE_CONFIGURATION_RESPONSE_COMMAND_STATUS,status); - message.getFields().put(ZclFieldType.DEVICE_CONFIGURATION_RESPONSE_COMMAND_POWER,power); - message.getFields().put(ZclFieldType.DEVICE_CONFIGURATION_RESPONSE_COMMAND_PATH_LOSS_EXPONENT,pathLossExponent); - message.getFields().put(ZclFieldType.DEVICE_CONFIGURATION_RESPONSE_COMMAND_CALCULATION_PERIOD,calculationPeriod); - message.getFields().put(ZclFieldType.DEVICE_CONFIGURATION_RESPONSE_COMMAND_NUMBER_RSSI_MEASUREMENTS,numberRssiMeasurements); - message.getFields().put(ZclFieldType.DEVICE_CONFIGURATION_RESPONSE_COMMAND_REPORTING_PERIOD,reportingPeriod); + message.getFields().put(ZclFieldType.DEVICE_CONFIGURATION_RESPONSE_STATUS,status); + message.getFields().put(ZclFieldType.DEVICE_CONFIGURATION_RESPONSE_POWER,power); + message.getFields().put(ZclFieldType.DEVICE_CONFIGURATION_RESPONSE_PATH_LOSS_EXPONENT,pathLossExponent); + message.getFields().put(ZclFieldType.DEVICE_CONFIGURATION_RESPONSE_CALCULATION_PERIOD,calculationPeriod); + message.getFields().put(ZclFieldType.DEVICE_CONFIGURATION_RESPONSE_NUMBER_RSSI_MEASUREMENTS,numberRssiMeasurements); + message.getFields().put(ZclFieldType.DEVICE_CONFIGURATION_RESPONSE_REPORTING_PERIOD,reportingPeriod); return message; } diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/GetDeviceConfigurationCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/GetDeviceConfigurationCommand.java similarity index 86% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/GetDeviceConfigurationCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/GetDeviceConfigurationCommand.java index a4705392e..4388984b9 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/GetDeviceConfigurationCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/GetDeviceConfigurationCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.rssi.location; +package org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,12 @@ /** - * Code generated Get Device Configuration Command value object class. + * Get Device Configuration Command value object class. + * + * + * Cluster: RSSI Location + * + * Code is autogenerated. Modifications may be overwritten! */ public class GetDeviceConfigurationCommand extends ZclCommand { /** @@ -19,7 +24,7 @@ public class GetDeviceConfigurationCommand extends ZclCommand { * Default constructor setting the command type field. */ public GetDeviceConfigurationCommand() { - this.setType(ZclCommandType.GET_DEVICE_CONFIGURATION_COMMAND); + setType(ZclCommandType.GET_DEVICE_CONFIGURATION_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/GetLocationDataCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/GetLocationDataCommand.java similarity index 92% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/GetLocationDataCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/GetLocationDataCommand.java index 432fceeaf..bedc0677d 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/GetLocationDataCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/GetLocationDataCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.rssi.location; +package org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,12 @@ /** - * Code generated Get Location Data Command value object class. + * Get Location Data Command value object class. + * + * + * Cluster: RSSI Location + * + * Code is autogenerated. Modifications may be overwritten! */ public class GetLocationDataCommand extends ZclCommand { /** @@ -27,7 +32,7 @@ public class GetLocationDataCommand extends ZclCommand { * Default constructor setting the command type field. */ public GetLocationDataCommand() { - this.setType(ZclCommandType.GET_LOCATION_DATA_COMMAND); + setType(ZclCommandType.GET_LOCATION_DATA_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/LocationDataNotificationCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/LocationDataNotificationCommand.java similarity index 96% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/LocationDataNotificationCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/LocationDataNotificationCommand.java index 239a5b812..e71568fab 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/LocationDataNotificationCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/LocationDataNotificationCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.rssi.location; +package org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,12 @@ /** - * Code generated Location Data Notification Command value object class. + * Location Data Notification Command value object class. + * + * + * Cluster: RSSI Location + * + * Code is autogenerated. Modifications may be overwritten! */ public class LocationDataNotificationCommand extends ZclCommand { /** @@ -51,7 +56,7 @@ public class LocationDataNotificationCommand extends ZclCommand { * Default constructor setting the command type field. */ public LocationDataNotificationCommand() { - this.setType(ZclCommandType.LOCATION_DATA_NOTIFICATION_COMMAND); + setType(ZclCommandType.LOCATION_DATA_NOTIFICATION_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/LocationDataResponseCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/LocationDataResponse.java similarity index 85% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/LocationDataResponseCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/LocationDataResponse.java index b4c130778..c25582737 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/LocationDataResponseCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/LocationDataResponse.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.rssi.location; +package org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,9 +7,14 @@ /** - * Code generated Location Data Response Command value object class. + * Location Data Response value object class. + * + * + * Cluster: RSSI Location + * + * Code is autogenerated. Modifications may be overwritten! */ -public class LocationDataResponseCommand extends ZclCommand { +public class LocationDataResponse extends ZclCommand { /** * Status command message field. */ @@ -54,41 +59,41 @@ public class LocationDataResponseCommand extends ZclCommand { /** * Default constructor setting the command type field. */ - public LocationDataResponseCommand() { - this.setType(ZclCommandType.LOCATION_DATA_RESPONSE_COMMAND); + public LocationDataResponse() { + setType(ZclCommandType.LOCATION_DATA_RESPONSE); } /** * Constructor copying field values from command message. * @param message the command message */ - public LocationDataResponseCommand(final ZclCommandMessage message) { + public LocationDataResponse(final ZclCommandMessage message) { super(message); - this.status = (Integer) message.getFields().get(ZclFieldType.LOCATION_DATA_RESPONSE_COMMAND_STATUS); - this.locationType = (Integer) message.getFields().get(ZclFieldType.LOCATION_DATA_RESPONSE_COMMAND_LOCATION_TYPE); - this.coordinate1 = (Integer) message.getFields().get(ZclFieldType.LOCATION_DATA_RESPONSE_COMMAND_COORDINATE_1); - this.coordinate2 = (Integer) message.getFields().get(ZclFieldType.LOCATION_DATA_RESPONSE_COMMAND_COORDINATE_2); - this.coordinate3 = (Integer) message.getFields().get(ZclFieldType.LOCATION_DATA_RESPONSE_COMMAND_COORDINATE_3); - this.power = (Integer) message.getFields().get(ZclFieldType.LOCATION_DATA_RESPONSE_COMMAND_POWER); - this.pathLossExponent = (Integer) message.getFields().get(ZclFieldType.LOCATION_DATA_RESPONSE_COMMAND_PATH_LOSS_EXPONENT); - this.locationMethod = (Integer) message.getFields().get(ZclFieldType.LOCATION_DATA_RESPONSE_COMMAND_LOCATION_METHOD); - this.qualityMeasure = (Integer) message.getFields().get(ZclFieldType.LOCATION_DATA_RESPONSE_COMMAND_QUALITY_MEASURE); - this.locationAge = (Integer) message.getFields().get(ZclFieldType.LOCATION_DATA_RESPONSE_COMMAND_LOCATION_AGE); + this.status = (Integer) message.getFields().get(ZclFieldType.LOCATION_DATA_RESPONSE_STATUS); + this.locationType = (Integer) message.getFields().get(ZclFieldType.LOCATION_DATA_RESPONSE_LOCATION_TYPE); + this.coordinate1 = (Integer) message.getFields().get(ZclFieldType.LOCATION_DATA_RESPONSE_COORDINATE_1); + this.coordinate2 = (Integer) message.getFields().get(ZclFieldType.LOCATION_DATA_RESPONSE_COORDINATE_2); + this.coordinate3 = (Integer) message.getFields().get(ZclFieldType.LOCATION_DATA_RESPONSE_COORDINATE_3); + this.power = (Integer) message.getFields().get(ZclFieldType.LOCATION_DATA_RESPONSE_POWER); + this.pathLossExponent = (Integer) message.getFields().get(ZclFieldType.LOCATION_DATA_RESPONSE_PATH_LOSS_EXPONENT); + this.locationMethod = (Integer) message.getFields().get(ZclFieldType.LOCATION_DATA_RESPONSE_LOCATION_METHOD); + this.qualityMeasure = (Integer) message.getFields().get(ZclFieldType.LOCATION_DATA_RESPONSE_QUALITY_MEASURE); + this.locationAge = (Integer) message.getFields().get(ZclFieldType.LOCATION_DATA_RESPONSE_LOCATION_AGE); } @Override public ZclCommandMessage toCommandMessage() { final ZclCommandMessage message = super.toCommandMessage(); - message.getFields().put(ZclFieldType.LOCATION_DATA_RESPONSE_COMMAND_STATUS,status); - message.getFields().put(ZclFieldType.LOCATION_DATA_RESPONSE_COMMAND_LOCATION_TYPE,locationType); - message.getFields().put(ZclFieldType.LOCATION_DATA_RESPONSE_COMMAND_COORDINATE_1,coordinate1); - message.getFields().put(ZclFieldType.LOCATION_DATA_RESPONSE_COMMAND_COORDINATE_2,coordinate2); - message.getFields().put(ZclFieldType.LOCATION_DATA_RESPONSE_COMMAND_COORDINATE_3,coordinate3); - message.getFields().put(ZclFieldType.LOCATION_DATA_RESPONSE_COMMAND_POWER,power); - message.getFields().put(ZclFieldType.LOCATION_DATA_RESPONSE_COMMAND_PATH_LOSS_EXPONENT,pathLossExponent); - message.getFields().put(ZclFieldType.LOCATION_DATA_RESPONSE_COMMAND_LOCATION_METHOD,locationMethod); - message.getFields().put(ZclFieldType.LOCATION_DATA_RESPONSE_COMMAND_QUALITY_MEASURE,qualityMeasure); - message.getFields().put(ZclFieldType.LOCATION_DATA_RESPONSE_COMMAND_LOCATION_AGE,locationAge); + message.getFields().put(ZclFieldType.LOCATION_DATA_RESPONSE_STATUS,status); + message.getFields().put(ZclFieldType.LOCATION_DATA_RESPONSE_LOCATION_TYPE,locationType); + message.getFields().put(ZclFieldType.LOCATION_DATA_RESPONSE_COORDINATE_1,coordinate1); + message.getFields().put(ZclFieldType.LOCATION_DATA_RESPONSE_COORDINATE_2,coordinate2); + message.getFields().put(ZclFieldType.LOCATION_DATA_RESPONSE_COORDINATE_3,coordinate3); + message.getFields().put(ZclFieldType.LOCATION_DATA_RESPONSE_POWER,power); + message.getFields().put(ZclFieldType.LOCATION_DATA_RESPONSE_PATH_LOSS_EXPONENT,pathLossExponent); + message.getFields().put(ZclFieldType.LOCATION_DATA_RESPONSE_LOCATION_METHOD,locationMethod); + message.getFields().put(ZclFieldType.LOCATION_DATA_RESPONSE_QUALITY_MEASURE,qualityMeasure); + message.getFields().put(ZclFieldType.LOCATION_DATA_RESPONSE_LOCATION_AGE,locationAge); return message; } diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/ReportRssiMeasurementsCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/ReportRssiMeasurementsCommand.java similarity index 93% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/ReportRssiMeasurementsCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/ReportRssiMeasurementsCommand.java index bf358f49c..390bbb93a 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/ReportRssiMeasurementsCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/ReportRssiMeasurementsCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.rssi.location; +package org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -9,7 +9,12 @@ import java.util.List; /** - * Code generated Report RSSI Measurements Command value object class. + * Report RSSI Measurements Command value object class. + * + * + * Cluster: RSSI Location + * + * Code is autogenerated. Modifications may be overwritten! */ public class ReportRssiMeasurementsCommand extends ZclCommand { /** @@ -29,7 +34,7 @@ public class ReportRssiMeasurementsCommand extends ZclCommand { * Default constructor setting the command type field. */ public ReportRssiMeasurementsCommand() { - this.setType(ZclCommandType.REPORT_RSSI_MEASUREMENTS_COMMAND); + setType(ZclCommandType.REPORT_RSSI_MEASUREMENTS_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/RequestOwnLocationCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/RequestOwnLocationCommand.java similarity index 87% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/RequestOwnLocationCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/RequestOwnLocationCommand.java index 3d44d86fa..23d38411d 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/RequestOwnLocationCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/RequestOwnLocationCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.rssi.location; +package org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,12 @@ /** - * Code generated Request Own Location Command value object class. + * Request Own Location Command value object class. + * + * + * Cluster: RSSI Location + * + * Code is autogenerated. Modifications may be overwritten! */ public class RequestOwnLocationCommand extends ZclCommand { /** @@ -19,7 +24,7 @@ public class RequestOwnLocationCommand extends ZclCommand { * Default constructor setting the command type field. */ public RequestOwnLocationCommand() { - this.setType(ZclCommandType.REQUEST_OWN_LOCATION_COMMAND); + setType(ZclCommandType.REQUEST_OWN_LOCATION_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/RssiPingCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/RssiPingCommand.java similarity index 87% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/RssiPingCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/RssiPingCommand.java index 0944ce2d2..05060f010 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/RssiPingCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/RssiPingCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.rssi.location; +package org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,12 @@ /** - * Code generated RSSI Ping Command value object class. + * RSSI Ping Command value object class. + * + * + * Cluster: RSSI Location + * + * Code is autogenerated. Modifications may be overwritten! */ public class RssiPingCommand extends ZclCommand { /** @@ -19,7 +24,7 @@ public class RssiPingCommand extends ZclCommand { * Default constructor setting the command type field. */ public RssiPingCommand() { - this.setType(ZclCommandType.RSSI_PING_COMMAND); + setType(ZclCommandType.RSSI_PING_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/RssiRequestCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/RssiRequestCommand.java similarity index 78% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/RssiRequestCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/RssiRequestCommand.java index 096231cc6..778727ecd 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/RssiRequestCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/RssiRequestCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.rssi.location; +package org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -6,7 +6,12 @@ /** - * Code generated RSSI Request Command value object class. + * RSSI Request Command value object class. + * + * + * Cluster: RSSI Location + * + * Code is autogenerated. Modifications may be overwritten! */ public class RssiRequestCommand extends ZclCommand { @@ -14,7 +19,7 @@ public class RssiRequestCommand extends ZclCommand { * Default constructor setting the command type field. */ public RssiRequestCommand() { - this.setType(ZclCommandType.RSSI_REQUEST_COMMAND); + setType(ZclCommandType.RSSI_REQUEST_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/RssiResponseCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/RssiResponse.java similarity index 79% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/RssiResponseCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/RssiResponse.java index 3421c10fc..a0562564f 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/RssiResponseCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/RssiResponse.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.rssi.location; +package org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,9 +7,14 @@ /** - * Code generated RSSI Response Command value object class. + * RSSI Response value object class. + * + * + * Cluster: RSSI Location + * + * Code is autogenerated. Modifications may be overwritten! */ -public class RssiResponseCommand extends ZclCommand { +public class RssiResponse extends ZclCommand { /** * Replying Device command message field. */ @@ -38,33 +43,33 @@ public class RssiResponseCommand extends ZclCommand { /** * Default constructor setting the command type field. */ - public RssiResponseCommand() { - this.setType(ZclCommandType.RSSI_RESPONSE_COMMAND); + public RssiResponse() { + setType(ZclCommandType.RSSI_RESPONSE); } /** * Constructor copying field values from command message. * @param message the command message */ - public RssiResponseCommand(final ZclCommandMessage message) { + public RssiResponse(final ZclCommandMessage message) { super(message); - this.replyingDevice = (Long) message.getFields().get(ZclFieldType.RSSI_RESPONSE_COMMAND_REPLYING_DEVICE); - this.coordinate1 = (Integer) message.getFields().get(ZclFieldType.RSSI_RESPONSE_COMMAND_COORDINATE_1); - this.coordinate2 = (Integer) message.getFields().get(ZclFieldType.RSSI_RESPONSE_COMMAND_COORDINATE_2); - this.coordinate3 = (Integer) message.getFields().get(ZclFieldType.RSSI_RESPONSE_COMMAND_COORDINATE_3); - this.rssi = (Integer) message.getFields().get(ZclFieldType.RSSI_RESPONSE_COMMAND_RSSI); - this.numberRssiMeasurements = (Integer) message.getFields().get(ZclFieldType.RSSI_RESPONSE_COMMAND_NUMBER_RSSI_MEASUREMENTS); + this.replyingDevice = (Long) message.getFields().get(ZclFieldType.RSSI_RESPONSE_REPLYING_DEVICE); + this.coordinate1 = (Integer) message.getFields().get(ZclFieldType.RSSI_RESPONSE_COORDINATE_1); + this.coordinate2 = (Integer) message.getFields().get(ZclFieldType.RSSI_RESPONSE_COORDINATE_2); + this.coordinate3 = (Integer) message.getFields().get(ZclFieldType.RSSI_RESPONSE_COORDINATE_3); + this.rssi = (Integer) message.getFields().get(ZclFieldType.RSSI_RESPONSE_RSSI); + this.numberRssiMeasurements = (Integer) message.getFields().get(ZclFieldType.RSSI_RESPONSE_NUMBER_RSSI_MEASUREMENTS); } @Override public ZclCommandMessage toCommandMessage() { final ZclCommandMessage message = super.toCommandMessage(); - message.getFields().put(ZclFieldType.RSSI_RESPONSE_COMMAND_REPLYING_DEVICE,replyingDevice); - message.getFields().put(ZclFieldType.RSSI_RESPONSE_COMMAND_COORDINATE_1,coordinate1); - message.getFields().put(ZclFieldType.RSSI_RESPONSE_COMMAND_COORDINATE_2,coordinate2); - message.getFields().put(ZclFieldType.RSSI_RESPONSE_COMMAND_COORDINATE_3,coordinate3); - message.getFields().put(ZclFieldType.RSSI_RESPONSE_COMMAND_RSSI,rssi); - message.getFields().put(ZclFieldType.RSSI_RESPONSE_COMMAND_NUMBER_RSSI_MEASUREMENTS,numberRssiMeasurements); + message.getFields().put(ZclFieldType.RSSI_RESPONSE_REPLYING_DEVICE,replyingDevice); + message.getFields().put(ZclFieldType.RSSI_RESPONSE_COORDINATE_1,coordinate1); + message.getFields().put(ZclFieldType.RSSI_RESPONSE_COORDINATE_2,coordinate2); + message.getFields().put(ZclFieldType.RSSI_RESPONSE_COORDINATE_3,coordinate3); + message.getFields().put(ZclFieldType.RSSI_RESPONSE_RSSI,rssi); + message.getFields().put(ZclFieldType.RSSI_RESPONSE_NUMBER_RSSI_MEASUREMENTS,numberRssiMeasurements); return message; } diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/SendPingsCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/SendPingsCommand.java similarity index 93% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/SendPingsCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/SendPingsCommand.java index 9f50778b2..e1a8747ab 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/SendPingsCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/SendPingsCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.rssi.location; +package org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,12 @@ /** - * Code generated Send Pings Command value object class. + * Send Pings Command value object class. + * + * + * Cluster: RSSI Location + * + * Code is autogenerated. Modifications may be overwritten! */ public class SendPingsCommand extends ZclCommand { /** @@ -27,7 +32,7 @@ public class SendPingsCommand extends ZclCommand { * Default constructor setting the command type field. */ public SendPingsCommand() { - this.setType(ZclCommandType.SEND_PINGS_COMMAND); + setType(ZclCommandType.SEND_PINGS_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/SetAbsoluteLocationCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/SetAbsoluteLocationCommand.java similarity index 94% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/SetAbsoluteLocationCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/SetAbsoluteLocationCommand.java index 0d16ecdd3..7de56947f 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/SetAbsoluteLocationCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/SetAbsoluteLocationCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.rssi.location; +package org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,12 @@ /** - * Code generated Set Absolute Location Command value object class. + * Set Absolute Location Command value object class. + * + * + * Cluster: RSSI Location + * + * Code is autogenerated. Modifications may be overwritten! */ public class SetAbsoluteLocationCommand extends ZclCommand { /** @@ -35,7 +40,7 @@ public class SetAbsoluteLocationCommand extends ZclCommand { * Default constructor setting the command type field. */ public SetAbsoluteLocationCommand() { - this.setType(ZclCommandType.SET_ABSOLUTE_LOCATION_COMMAND); + setType(ZclCommandType.SET_ABSOLUTE_LOCATION_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/SetDeviceConfigurationCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/SetDeviceConfigurationCommand.java similarity index 95% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/SetDeviceConfigurationCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/SetDeviceConfigurationCommand.java index 89b2dc34f..baecbca15 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/SetDeviceConfigurationCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/rssilocation/SetDeviceConfigurationCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.rssi.location; +package org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,12 @@ /** - * Code generated Set Device Configuration Command value object class. + * Set Device Configuration Command value object class. + * + * + * Cluster: RSSI Location + * + * Code is autogenerated. Modifications may be overwritten! */ public class SetDeviceConfigurationCommand extends ZclCommand { /** @@ -35,7 +40,7 @@ public class SetDeviceConfigurationCommand extends ZclCommand { * Default constructor setting the command type field. */ public SetDeviceConfigurationCommand() { - this.setType(ZclCommandType.SET_DEVICE_CONFIGURATION_COMMAND); + setType(ZclCommandType.SET_DEVICE_CONFIGURATION_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/AddSceneCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/AddSceneCommand.java similarity index 84% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/AddSceneCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/AddSceneCommand.java index e16646dba..51eccf6a8 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/AddSceneCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/AddSceneCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.scenes; +package org.bubblecloud.zigbee.v3.zcl.clusters.scenes; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -9,7 +9,22 @@ import java.util.List; /** - * Code generated Add Scene Command value object class. + * Add Scene Command value object class. + * + * The Add Scene command shall be addressed to a single device (not a group). + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class AddSceneCommand extends ZclCommand { /** @@ -37,7 +52,7 @@ public class AddSceneCommand extends ZclCommand { * Default constructor setting the command type field. */ public AddSceneCommand() { - this.setType(ZclCommandType.ADD_SCENE_COMMAND); + setType(ZclCommandType.ADD_SCENE_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/AddSceneResponseCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/AddSceneResponse.java similarity index 69% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/AddSceneResponseCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/AddSceneResponse.java index eccb62631..318c7d179 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/AddSceneResponseCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/AddSceneResponse.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.scenes; +package org.bubblecloud.zigbee.v3.zcl.clusters.scenes; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,9 +7,23 @@ /** - * Code generated Add Scene Response Command value object class. + * Add Scene Response value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ -public class AddSceneResponseCommand extends ZclCommand { +public class AddSceneResponse extends ZclCommand { /** * Status command message field. */ @@ -26,27 +40,27 @@ public class AddSceneResponseCommand extends ZclCommand { /** * Default constructor setting the command type field. */ - public AddSceneResponseCommand() { - this.setType(ZclCommandType.ADD_SCENE_RESPONSE_COMMAND); + public AddSceneResponse() { + setType(ZclCommandType.ADD_SCENE_RESPONSE); } /** * Constructor copying field values from command message. * @param message the command message */ - public AddSceneResponseCommand(final ZclCommandMessage message) { + public AddSceneResponse(final ZclCommandMessage message) { super(message); - this.status = (Integer) message.getFields().get(ZclFieldType.ADD_SCENE_RESPONSE_COMMAND_STATUS); - this.groupId = (Integer) message.getFields().get(ZclFieldType.ADD_SCENE_RESPONSE_COMMAND_GROUP_ID); - this.sceneId = (Integer) message.getFields().get(ZclFieldType.ADD_SCENE_RESPONSE_COMMAND_SCENE_ID); + this.status = (Integer) message.getFields().get(ZclFieldType.ADD_SCENE_RESPONSE_STATUS); + this.groupId = (Integer) message.getFields().get(ZclFieldType.ADD_SCENE_RESPONSE_GROUP_ID); + this.sceneId = (Integer) message.getFields().get(ZclFieldType.ADD_SCENE_RESPONSE_SCENE_ID); } @Override public ZclCommandMessage toCommandMessage() { final ZclCommandMessage message = super.toCommandMessage(); - message.getFields().put(ZclFieldType.ADD_SCENE_RESPONSE_COMMAND_STATUS,status); - message.getFields().put(ZclFieldType.ADD_SCENE_RESPONSE_COMMAND_GROUP_ID,groupId); - message.getFields().put(ZclFieldType.ADD_SCENE_RESPONSE_COMMAND_SCENE_ID,sceneId); + message.getFields().put(ZclFieldType.ADD_SCENE_RESPONSE_STATUS,status); + message.getFields().put(ZclFieldType.ADD_SCENE_RESPONSE_GROUP_ID,groupId); + message.getFields().put(ZclFieldType.ADD_SCENE_RESPONSE_SCENE_ID,sceneId); return message; } diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/GetSceneMembershipCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/GetSceneMembershipCommand.java similarity index 59% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/GetSceneMembershipCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/GetSceneMembershipCommand.java index dbd6d1428..9315a18b4 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/GetSceneMembershipCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/GetSceneMembershipCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.scenes; +package org.bubblecloud.zigbee.v3.zcl.clusters.scenes; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,25 @@ /** - * Code generated Get Scene Membership Command value object class. + * Get Scene Membership Command value object class. + * + * 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. + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class GetSceneMembershipCommand extends ZclCommand { /** @@ -19,7 +37,7 @@ public class GetSceneMembershipCommand extends ZclCommand { * Default constructor setting the command type field. */ public GetSceneMembershipCommand() { - this.setType(ZclCommandType.GET_SCENE_MEMBERSHIP_COMMAND); + setType(ZclCommandType.GET_SCENE_MEMBERSHIP_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/GetSceneMembershipResponseCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/GetSceneMembershipResponse.java similarity index 73% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/GetSceneMembershipResponseCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/GetSceneMembershipResponse.java index 69286b621..e244b3dcc 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/GetSceneMembershipResponseCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/GetSceneMembershipResponse.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.scenes; +package org.bubblecloud.zigbee.v3.zcl.clusters.scenes; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -9,9 +9,23 @@ import java.util.List; /** - * Code generated Get Scene Membership Response Command value object class. + * Get Scene Membership Response value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ -public class GetSceneMembershipResponseCommand extends ZclCommand { +public class GetSceneMembershipResponse extends ZclCommand { /** * Status command message field. */ @@ -36,31 +50,31 @@ public class GetSceneMembershipResponseCommand extends ZclCommand { /** * Default constructor setting the command type field. */ - public GetSceneMembershipResponseCommand() { - this.setType(ZclCommandType.GET_SCENE_MEMBERSHIP_RESPONSE_COMMAND); + public GetSceneMembershipResponse() { + setType(ZclCommandType.GET_SCENE_MEMBERSHIP_RESPONSE); } /** * Constructor copying field values from command message. * @param message the command message */ - public GetSceneMembershipResponseCommand(final ZclCommandMessage message) { + public GetSceneMembershipResponse(final ZclCommandMessage message) { super(message); - this.status = (Integer) message.getFields().get(ZclFieldType.GET_SCENE_MEMBERSHIP_RESPONSE_COMMAND_STATUS); - this.capacity = (Integer) message.getFields().get(ZclFieldType.GET_SCENE_MEMBERSHIP_RESPONSE_COMMAND_CAPACITY); - this.groupId = (Integer) message.getFields().get(ZclFieldType.GET_SCENE_MEMBERSHIP_RESPONSE_COMMAND_GROUP_ID); - this.sceneCount = (Integer) message.getFields().get(ZclFieldType.GET_SCENE_MEMBERSHIP_RESPONSE_COMMAND_SCENE_COUNT); - this.sceneList = (List) message.getFields().get(ZclFieldType.GET_SCENE_MEMBERSHIP_RESPONSE_COMMAND_SCENE_LIST); + this.status = (Integer) message.getFields().get(ZclFieldType.GET_SCENE_MEMBERSHIP_RESPONSE_STATUS); + this.capacity = (Integer) message.getFields().get(ZclFieldType.GET_SCENE_MEMBERSHIP_RESPONSE_CAPACITY); + this.groupId = (Integer) message.getFields().get(ZclFieldType.GET_SCENE_MEMBERSHIP_RESPONSE_GROUP_ID); + this.sceneCount = (Integer) message.getFields().get(ZclFieldType.GET_SCENE_MEMBERSHIP_RESPONSE_SCENE_COUNT); + this.sceneList = (List) message.getFields().get(ZclFieldType.GET_SCENE_MEMBERSHIP_RESPONSE_SCENE_LIST); } @Override public ZclCommandMessage toCommandMessage() { final ZclCommandMessage message = super.toCommandMessage(); - message.getFields().put(ZclFieldType.GET_SCENE_MEMBERSHIP_RESPONSE_COMMAND_STATUS,status); - message.getFields().put(ZclFieldType.GET_SCENE_MEMBERSHIP_RESPONSE_COMMAND_CAPACITY,capacity); - message.getFields().put(ZclFieldType.GET_SCENE_MEMBERSHIP_RESPONSE_COMMAND_GROUP_ID,groupId); - message.getFields().put(ZclFieldType.GET_SCENE_MEMBERSHIP_RESPONSE_COMMAND_SCENE_COUNT,sceneCount); - message.getFields().put(ZclFieldType.GET_SCENE_MEMBERSHIP_RESPONSE_COMMAND_SCENE_LIST,sceneList); + message.getFields().put(ZclFieldType.GET_SCENE_MEMBERSHIP_RESPONSE_STATUS,status); + message.getFields().put(ZclFieldType.GET_SCENE_MEMBERSHIP_RESPONSE_CAPACITY,capacity); + message.getFields().put(ZclFieldType.GET_SCENE_MEMBERSHIP_RESPONSE_GROUP_ID,groupId); + message.getFields().put(ZclFieldType.GET_SCENE_MEMBERSHIP_RESPONSE_SCENE_COUNT,sceneCount); + message.getFields().put(ZclFieldType.GET_SCENE_MEMBERSHIP_RESPONSE_SCENE_LIST,sceneList); return message; } diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/RecallSceneCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/RecallSceneCommand.java similarity index 71% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/RecallSceneCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/RecallSceneCommand.java index 152637421..bb2508086 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/RecallSceneCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/RecallSceneCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.scenes; +package org.bubblecloud.zigbee.v3.zcl.clusters.scenes; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,22 @@ /** - * Code generated Recall Scene Command value object class. + * Recall Scene Command value object class. + * + * The Recall Scene command may be addressed to a single device or to a group. + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class RecallSceneCommand extends ZclCommand { /** @@ -23,7 +38,7 @@ public class RecallSceneCommand extends ZclCommand { * Default constructor setting the command type field. */ public RecallSceneCommand() { - this.setType(ZclCommandType.RECALL_SCENE_COMMAND); + setType(ZclCommandType.RECALL_SCENE_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/RemoveAllScenesCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/RemoveAllScenesCommand.java similarity index 64% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/RemoveAllScenesCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/RemoveAllScenesCommand.java index 16cb44c07..712ff5745 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/RemoveAllScenesCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/RemoveAllScenesCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.scenes; +package org.bubblecloud.zigbee.v3.zcl.clusters.scenes; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,22 @@ /** - * Code generated Remove All Scenes Command value object class. + * Remove All Scenes Command value object class. + * + * The Remove All Scenes may be addressed to a single device or to a group. + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class RemoveAllScenesCommand extends ZclCommand { /** @@ -19,7 +34,7 @@ public class RemoveAllScenesCommand extends ZclCommand { * Default constructor setting the command type field. */ public RemoveAllScenesCommand() { - this.setType(ZclCommandType.REMOVE_ALL_SCENES_COMMAND); + setType(ZclCommandType.REMOVE_ALL_SCENES_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/RemoveAllScenesResponseCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/RemoveAllScenesResponse.java similarity index 63% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/RemoveAllScenesResponseCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/RemoveAllScenesResponse.java index 3dd1868b7..db453e7fe 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/RemoveAllScenesResponseCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/RemoveAllScenesResponse.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.scenes; +package org.bubblecloud.zigbee.v3.zcl.clusters.scenes; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,9 +7,23 @@ /** - * Code generated Remove All Scenes Response Command value object class. + * Remove All Scenes Response value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ -public class RemoveAllScenesResponseCommand extends ZclCommand { +public class RemoveAllScenesResponse extends ZclCommand { /** * Status command message field. */ @@ -22,25 +36,25 @@ public class RemoveAllScenesResponseCommand extends ZclCommand { /** * Default constructor setting the command type field. */ - public RemoveAllScenesResponseCommand() { - this.setType(ZclCommandType.REMOVE_ALL_SCENES_RESPONSE_COMMAND); + public RemoveAllScenesResponse() { + setType(ZclCommandType.REMOVE_ALL_SCENES_RESPONSE); } /** * Constructor copying field values from command message. * @param message the command message */ - public RemoveAllScenesResponseCommand(final ZclCommandMessage message) { + public RemoveAllScenesResponse(final ZclCommandMessage message) { super(message); - this.status = (Integer) message.getFields().get(ZclFieldType.REMOVE_ALL_SCENES_RESPONSE_COMMAND_STATUS); - this.groupId = (Integer) message.getFields().get(ZclFieldType.REMOVE_ALL_SCENES_RESPONSE_COMMAND_GROUP_ID); + this.status = (Integer) message.getFields().get(ZclFieldType.REMOVE_ALL_SCENES_RESPONSE_STATUS); + this.groupId = (Integer) message.getFields().get(ZclFieldType.REMOVE_ALL_SCENES_RESPONSE_GROUP_ID); } @Override public ZclCommandMessage toCommandMessage() { final ZclCommandMessage message = super.toCommandMessage(); - message.getFields().put(ZclFieldType.REMOVE_ALL_SCENES_RESPONSE_COMMAND_STATUS,status); - message.getFields().put(ZclFieldType.REMOVE_ALL_SCENES_RESPONSE_COMMAND_GROUP_ID,groupId); + message.getFields().put(ZclFieldType.REMOVE_ALL_SCENES_RESPONSE_STATUS,status); + message.getFields().put(ZclFieldType.REMOVE_ALL_SCENES_RESPONSE_GROUP_ID,groupId); return message; } diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/RemoveSceneCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/RemoveSceneCommand.java similarity index 71% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/RemoveSceneCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/RemoveSceneCommand.java index 3f0072597..1b1815e33 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/RemoveSceneCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/RemoveSceneCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.scenes; +package org.bubblecloud.zigbee.v3.zcl.clusters.scenes; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,22 @@ /** - * Code generated Remove Scene Command value object class. + * Remove Scene Command value object class. + * + * The Remove All Scenes may be addressed to a single device or to a group. + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class RemoveSceneCommand extends ZclCommand { /** @@ -23,7 +38,7 @@ public class RemoveSceneCommand extends ZclCommand { * Default constructor setting the command type field. */ public RemoveSceneCommand() { - this.setType(ZclCommandType.REMOVE_SCENE_COMMAND); + setType(ZclCommandType.REMOVE_SCENE_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/RemoveSceneResponseCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/RemoveSceneResponse.java similarity index 69% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/RemoveSceneResponseCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/RemoveSceneResponse.java index 060ef1d23..e84481307 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/RemoveSceneResponseCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/RemoveSceneResponse.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.scenes; +package org.bubblecloud.zigbee.v3.zcl.clusters.scenes; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,9 +7,23 @@ /** - * Code generated Remove Scene Response Command value object class. + * Remove Scene Response value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ -public class RemoveSceneResponseCommand extends ZclCommand { +public class RemoveSceneResponse extends ZclCommand { /** * Status command message field. */ @@ -26,27 +40,27 @@ public class RemoveSceneResponseCommand extends ZclCommand { /** * Default constructor setting the command type field. */ - public RemoveSceneResponseCommand() { - this.setType(ZclCommandType.REMOVE_SCENE_RESPONSE_COMMAND); + public RemoveSceneResponse() { + setType(ZclCommandType.REMOVE_SCENE_RESPONSE); } /** * Constructor copying field values from command message. * @param message the command message */ - public RemoveSceneResponseCommand(final ZclCommandMessage message) { + public RemoveSceneResponse(final ZclCommandMessage message) { super(message); - this.status = (Integer) message.getFields().get(ZclFieldType.REMOVE_SCENE_RESPONSE_COMMAND_STATUS); - this.groupId = (Integer) message.getFields().get(ZclFieldType.REMOVE_SCENE_RESPONSE_COMMAND_GROUP_ID); - this.sceneId = (Integer) message.getFields().get(ZclFieldType.REMOVE_SCENE_RESPONSE_COMMAND_SCENE_ID); + this.status = (Integer) message.getFields().get(ZclFieldType.REMOVE_SCENE_RESPONSE_STATUS); + this.groupId = (Integer) message.getFields().get(ZclFieldType.REMOVE_SCENE_RESPONSE_GROUP_ID); + this.sceneId = (Integer) message.getFields().get(ZclFieldType.REMOVE_SCENE_RESPONSE_SCENE_ID); } @Override public ZclCommandMessage toCommandMessage() { final ZclCommandMessage message = super.toCommandMessage(); - message.getFields().put(ZclFieldType.REMOVE_SCENE_RESPONSE_COMMAND_STATUS,status); - message.getFields().put(ZclFieldType.REMOVE_SCENE_RESPONSE_COMMAND_GROUP_ID,groupId); - message.getFields().put(ZclFieldType.REMOVE_SCENE_RESPONSE_COMMAND_SCENE_ID,sceneId); + message.getFields().put(ZclFieldType.REMOVE_SCENE_RESPONSE_STATUS,status); + message.getFields().put(ZclFieldType.REMOVE_SCENE_RESPONSE_GROUP_ID,groupId); + message.getFields().put(ZclFieldType.REMOVE_SCENE_RESPONSE_SCENE_ID,sceneId); return message; } diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/StoreSceneCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/StoreSceneCommand.java similarity index 71% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/StoreSceneCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/StoreSceneCommand.java index 48d09fc44..487379759 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/StoreSceneCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/StoreSceneCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.scenes; +package org.bubblecloud.zigbee.v3.zcl.clusters.scenes; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,22 @@ /** - * Code generated Store Scene Command value object class. + * Store Scene Command value object class. + * + * The Store Scene command may be addressed to a single device or to a group. + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class StoreSceneCommand extends ZclCommand { /** @@ -23,7 +38,7 @@ public class StoreSceneCommand extends ZclCommand { * Default constructor setting the command type field. */ public StoreSceneCommand() { - this.setType(ZclCommandType.STORE_SCENE_COMMAND); + setType(ZclCommandType.STORE_SCENE_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/StoreSceneResponseCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/StoreSceneResponse.java similarity index 69% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/StoreSceneResponseCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/StoreSceneResponse.java index 151ffd42e..64916c58c 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/StoreSceneResponseCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/StoreSceneResponse.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.scenes; +package org.bubblecloud.zigbee.v3.zcl.clusters.scenes; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,9 +7,23 @@ /** - * Code generated Store Scene Response Command value object class. + * Store Scene Response value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ -public class StoreSceneResponseCommand extends ZclCommand { +public class StoreSceneResponse extends ZclCommand { /** * Status command message field. */ @@ -26,27 +40,27 @@ public class StoreSceneResponseCommand extends ZclCommand { /** * Default constructor setting the command type field. */ - public StoreSceneResponseCommand() { - this.setType(ZclCommandType.STORE_SCENE_RESPONSE_COMMAND); + public StoreSceneResponse() { + setType(ZclCommandType.STORE_SCENE_RESPONSE); } /** * Constructor copying field values from command message. * @param message the command message */ - public StoreSceneResponseCommand(final ZclCommandMessage message) { + public StoreSceneResponse(final ZclCommandMessage message) { super(message); - this.status = (Integer) message.getFields().get(ZclFieldType.STORE_SCENE_RESPONSE_COMMAND_STATUS); - this.groupId = (Integer) message.getFields().get(ZclFieldType.STORE_SCENE_RESPONSE_COMMAND_GROUP_ID); - this.sceneId = (Integer) message.getFields().get(ZclFieldType.STORE_SCENE_RESPONSE_COMMAND_SCENE_ID); + this.status = (Integer) message.getFields().get(ZclFieldType.STORE_SCENE_RESPONSE_STATUS); + this.groupId = (Integer) message.getFields().get(ZclFieldType.STORE_SCENE_RESPONSE_GROUP_ID); + this.sceneId = (Integer) message.getFields().get(ZclFieldType.STORE_SCENE_RESPONSE_SCENE_ID); } @Override public ZclCommandMessage toCommandMessage() { final ZclCommandMessage message = super.toCommandMessage(); - message.getFields().put(ZclFieldType.STORE_SCENE_RESPONSE_COMMAND_STATUS,status); - message.getFields().put(ZclFieldType.STORE_SCENE_RESPONSE_COMMAND_GROUP_ID,groupId); - message.getFields().put(ZclFieldType.STORE_SCENE_RESPONSE_COMMAND_SCENE_ID,sceneId); + message.getFields().put(ZclFieldType.STORE_SCENE_RESPONSE_STATUS,status); + message.getFields().put(ZclFieldType.STORE_SCENE_RESPONSE_GROUP_ID,groupId); + message.getFields().put(ZclFieldType.STORE_SCENE_RESPONSE_SCENE_ID,sceneId); return message; } diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/ViewSceneCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/ViewSceneCommand.java similarity index 71% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/ViewSceneCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/ViewSceneCommand.java index 4dc9c2ef0..b67e6f0be 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/ViewSceneCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/ViewSceneCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.scenes; +package org.bubblecloud.zigbee.v3.zcl.clusters.scenes; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,22 @@ /** - * Code generated View Scene Command value object class. + * View Scene Command value object class. + * + * The View Scene command shall be addressed to a single device (not a group). + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ public class ViewSceneCommand extends ZclCommand { /** @@ -23,7 +38,7 @@ public class ViewSceneCommand extends ZclCommand { * Default constructor setting the command type field. */ public ViewSceneCommand() { - this.setType(ZclCommandType.VIEW_SCENE_COMMAND); + setType(ZclCommandType.VIEW_SCENE_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/ViewSceneResponseCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/ViewSceneResponse.java similarity index 77% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/ViewSceneResponseCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/ViewSceneResponse.java index 9b9363f83..360e61d83 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/scenes/ViewSceneResponseCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/scenes/ViewSceneResponse.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.scenes; +package org.bubblecloud.zigbee.v3.zcl.clusters.scenes; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -9,9 +9,23 @@ import java.util.List; /** - * Code generated View Scene Response Command value object class. + * View Scene Response value object class. + * + * + * Cluster: 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. + * + * Code is autogenerated. Modifications may be overwritten! */ -public class ViewSceneResponseCommand extends ZclCommand { +public class ViewSceneResponse extends ZclCommand { /** * Status command message field. */ @@ -40,33 +54,33 @@ public class ViewSceneResponseCommand extends ZclCommand { /** * Default constructor setting the command type field. */ - public ViewSceneResponseCommand() { - this.setType(ZclCommandType.VIEW_SCENE_RESPONSE_COMMAND); + public ViewSceneResponse() { + setType(ZclCommandType.VIEW_SCENE_RESPONSE); } /** * Constructor copying field values from command message. * @param message the command message */ - public ViewSceneResponseCommand(final ZclCommandMessage message) { + public ViewSceneResponse(final ZclCommandMessage message) { super(message); - this.status = (Integer) message.getFields().get(ZclFieldType.VIEW_SCENE_RESPONSE_COMMAND_STATUS); - this.groupId = (Integer) message.getFields().get(ZclFieldType.VIEW_SCENE_RESPONSE_COMMAND_GROUP_ID); - this.sceneId = (Integer) message.getFields().get(ZclFieldType.VIEW_SCENE_RESPONSE_COMMAND_SCENE_ID); - this.transitionTime = (Integer) message.getFields().get(ZclFieldType.VIEW_SCENE_RESPONSE_COMMAND_TRANSITION_TIME); - this.sceneName = (String) message.getFields().get(ZclFieldType.VIEW_SCENE_RESPONSE_COMMAND_SCENE_NAME); - this.extensionFieldSets = (List) message.getFields().get(ZclFieldType.VIEW_SCENE_RESPONSE_COMMAND_EXTENSION_FIELD_SETS); + this.status = (Integer) message.getFields().get(ZclFieldType.VIEW_SCENE_RESPONSE_STATUS); + this.groupId = (Integer) message.getFields().get(ZclFieldType.VIEW_SCENE_RESPONSE_GROUP_ID); + this.sceneId = (Integer) message.getFields().get(ZclFieldType.VIEW_SCENE_RESPONSE_SCENE_ID); + this.transitionTime = (Integer) message.getFields().get(ZclFieldType.VIEW_SCENE_RESPONSE_TRANSITION_TIME); + this.sceneName = (String) message.getFields().get(ZclFieldType.VIEW_SCENE_RESPONSE_SCENE_NAME); + this.extensionFieldSets = (List) message.getFields().get(ZclFieldType.VIEW_SCENE_RESPONSE_EXTENSION_FIELD_SETS); } @Override public ZclCommandMessage toCommandMessage() { final ZclCommandMessage message = super.toCommandMessage(); - message.getFields().put(ZclFieldType.VIEW_SCENE_RESPONSE_COMMAND_STATUS,status); - message.getFields().put(ZclFieldType.VIEW_SCENE_RESPONSE_COMMAND_GROUP_ID,groupId); - message.getFields().put(ZclFieldType.VIEW_SCENE_RESPONSE_COMMAND_SCENE_ID,sceneId); - message.getFields().put(ZclFieldType.VIEW_SCENE_RESPONSE_COMMAND_TRANSITION_TIME,transitionTime); - message.getFields().put(ZclFieldType.VIEW_SCENE_RESPONSE_COMMAND_SCENE_NAME,sceneName); - message.getFields().put(ZclFieldType.VIEW_SCENE_RESPONSE_COMMAND_EXTENSION_FIELD_SETS,extensionFieldSets); + message.getFields().put(ZclFieldType.VIEW_SCENE_RESPONSE_STATUS,status); + message.getFields().put(ZclFieldType.VIEW_SCENE_RESPONSE_GROUP_ID,groupId); + message.getFields().put(ZclFieldType.VIEW_SCENE_RESPONSE_SCENE_ID,sceneId); + message.getFields().put(ZclFieldType.VIEW_SCENE_RESPONSE_TRANSITION_TIME,transitionTime); + message.getFields().put(ZclFieldType.VIEW_SCENE_RESPONSE_SCENE_NAME,sceneName); + message.getFields().put(ZclFieldType.VIEW_SCENE_RESPONSE_EXTENSION_FIELD_SETS,extensionFieldSets); return message; } diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/thermostat/SetpointRaiseLowerCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/thermostat/SetpointRaiseLowerCommand.java similarity index 89% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/thermostat/SetpointRaiseLowerCommand.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/thermostat/SetpointRaiseLowerCommand.java index 11061764c..e3522f99f 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/thermostat/SetpointRaiseLowerCommand.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/clusters/thermostat/SetpointRaiseLowerCommand.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.thermostat; +package org.bubblecloud.zigbee.v3.zcl.clusters.thermostat; import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; import org.bubblecloud.zigbee.v3.zcl.ZclCommand; @@ -7,7 +7,12 @@ /** - * Code generated Setpoint Raise/Lower Command value object class. + * Setpoint Raise/Lower Command value object class. + * + * + * Cluster: Thermostat + * + * Code is autogenerated. Modifications may be overwritten! */ public class SetpointRaiseLowerCommand extends ZclCommand { /** @@ -23,7 +28,7 @@ public class SetpointRaiseLowerCommand extends ZclCommand { * Default constructor setting the command type field. */ public SetpointRaiseLowerCommand() { - this.setType(ZclCommandType.SETPOINT_RAISE_LOWER_COMMAND); + setType(ZclCommandType.SETPOINT_RAISE_LOWER_COMMAND); } /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/ZclClusterType.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/ZclClusterType.java index ad239ab6a..b6ef54cd2 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/ZclClusterType.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/ZclClusterType.java @@ -1,81 +1,86 @@ package org.bubblecloud.zigbee.v3.zcl.protocol; +import org.bubblecloud.zigbee.v3.zcl.ZclCluster; +import org.bubblecloud.zigbee.v3.zcl.clusters.*; + import java.util.HashMap; import java.util.Map; public enum ZclClusterType { - BASIC(0, ZclProfileType.HOME_AUTOMATION, "Basic"), - POWER_CONFIGURATION(1, ZclProfileType.HOME_AUTOMATION, "Power configuration"), - DEVICE_TEMPERATURE_CONFIGURATION(2, ZclProfileType.HOME_AUTOMATION, "Device Temperature Configuration"), - IDENTIFY(3, ZclProfileType.HOME_AUTOMATION, "Identify"), - GROUPS(4, ZclProfileType.HOME_AUTOMATION, "Groups"), - SCENES(5, ZclProfileType.HOME_AUTOMATION, "Scenes"), - ON_OFF(6, ZclProfileType.HOME_AUTOMATION, "On/off"), - ON_OFF_SWITCH_CONFIGURATION(7, ZclProfileType.HOME_AUTOMATION, "On/off Switch Configuration"), - LEVEL_CONTROL(8, ZclProfileType.HOME_AUTOMATION, "Level Control"), - ALARMS(9, ZclProfileType.HOME_AUTOMATION, "Alarms"), - TIME(10, ZclProfileType.HOME_AUTOMATION, "Time"), - RSSI_LOCATION(11, ZclProfileType.HOME_AUTOMATION, "RSSI Location"), - ANALOG_INPUT__BASIC_(12, ZclProfileType.HOME_AUTOMATION, "Analog Input (Basic)"), - ANALOG_OUTPUT__BASIC_(13, ZclProfileType.HOME_AUTOMATION, "Analog Output (Basic)"), - ANALOG_VALUE__BASIC_(14, ZclProfileType.HOME_AUTOMATION, "Analog Value (Basic)"), - BINARY_INPUT__BASIC_(15, ZclProfileType.HOME_AUTOMATION, "Binary Input (Basic)"), - BINARY_OUTPUT__BASIC_(16, ZclProfileType.HOME_AUTOMATION, "Binary Output (Basic)"), - BINARY_VALUE__BASIC_(17, ZclProfileType.HOME_AUTOMATION, "Binary Value (Basic)"), - MULTISTATE_INPUT__BASIC_(18, ZclProfileType.HOME_AUTOMATION, "Multistate Input (Basic)"), - MULTISTATE_OUTPUT__BASIC_(19, ZclProfileType.HOME_AUTOMATION, "Multistate Output (Basic)"), - MULTISTATE_VALUE__BASIC_(20, ZclProfileType.HOME_AUTOMATION, "Multistate Value (Basic)"), - COMMISSIONING(21, ZclProfileType.HOME_AUTOMATION, "Commissioning"), - SHADE_CONFIGURATION(256, ZclProfileType.HOME_AUTOMATION, "Shade Configuration"), - DOOR_LOCK(257, ZclProfileType.HOME_AUTOMATION, "Door Lock"), - PUMP_CONFIGURATION_AND_CONTROL(512, ZclProfileType.HOME_AUTOMATION, "Pump Configuration and Control"), - THERMOSTAT(513, ZclProfileType.HOME_AUTOMATION, "Thermostat"), - FAN_CONTROL(514, ZclProfileType.HOME_AUTOMATION, "Fan Control"), - DEHUMIDIFICATION_CONTROL(515, ZclProfileType.HOME_AUTOMATION, "Dehumidification Control"), - THERMOSTAT_USER_INTERFACE_CONFIGURATION(516, ZclProfileType.HOME_AUTOMATION, "Thermostat User Interface Configuration"), - COLOR_CONTROL(768, ZclProfileType.HOME_AUTOMATION, "Color control"), - BALLAST_CONFIGURATION(769, ZclProfileType.HOME_AUTOMATION, "Ballast Configuration"), - ILLUMINANCE_MEASUREMENT(1024, ZclProfileType.HOME_AUTOMATION, "Illuminance measurement"), - ILLUMINANCE_LEVEL_SENSING(1025, ZclProfileType.HOME_AUTOMATION, "Illuminance level sensing"), - TEMPERATURE_MEASUREMENT(1026, ZclProfileType.HOME_AUTOMATION, "Temperature measurement"), - PRESSURE_MEASUREMENT(1027, ZclProfileType.HOME_AUTOMATION, "Pressure measurement"), - FLOW_MEASUREMENT(1028, ZclProfileType.HOME_AUTOMATION, "Flow measurement"), - RELATIVE_HUMIDITY_MEASUREMENT(1029, ZclProfileType.HOME_AUTOMATION, "Relative humidity measurement"), - OCCUPANCY_SENSING(1030, ZclProfileType.HOME_AUTOMATION, "Occupancy sensing"), - IAS_ZONE(1280, ZclProfileType.HOME_AUTOMATION, "IAS Zone"), - IAS_ACE(1281, ZclProfileType.HOME_AUTOMATION, "IAS ACE"), - IAS_WD(1282, ZclProfileType.HOME_AUTOMATION, "IAS WD"), - GENERIC_TUNNEL(1536, ZclProfileType.HOME_AUTOMATION, "Generic Tunnel"), - BACNET_PROTOCOL_TUNNEL(1537, ZclProfileType.HOME_AUTOMATION, "BACnet Protocol Tunnel"), - ANALOG_INPUT__BACNET_REGULAR_(1538, ZclProfileType.HOME_AUTOMATION, "Analog Input (BACnet Regular)"), - ANALOG_INPUT__BACNET_EXTENDED_(1539, ZclProfileType.HOME_AUTOMATION, "Analog Input (BACnet Extended)"), - ANALOG_OUTPUT__BACNET_REGULAR_(1540, ZclProfileType.HOME_AUTOMATION, "Analog Output (BACnet Regular)"), - ANALOG_OUTPUT__BACNET_EXTENDED_(1541, ZclProfileType.HOME_AUTOMATION, "Analog Output (BACnet Extended)"), - ANALOG_VALUE__BACNET_REGULAR_(1542, ZclProfileType.HOME_AUTOMATION, "Analog Value (BACnet Regular)"), - ANALOG_VALUE__BACNET_EXTENDED_(1543, ZclProfileType.HOME_AUTOMATION, "Analog Value (BACnet Extended)"), - BINARY_INPUT__BACNET_REGULAR_(1544, ZclProfileType.HOME_AUTOMATION, "Binary Input (BACnet Regular)"), - BINARY_INPUT__BACNET_EXTENDED_(1545, ZclProfileType.HOME_AUTOMATION, "Binary Input (BACnet Extended)"), - BINARY_OUTPUT__BACNET_REGULAR_(1546, ZclProfileType.HOME_AUTOMATION, "Binary Output (BACnet Regular)"), - BINARY_OUTPUT__BACNET_EXTENDED_(1547, ZclProfileType.HOME_AUTOMATION, "Binary Output (BACnet Extended)"), - BINARY_VALUE__BACNET_REGULAR_(1548, ZclProfileType.HOME_AUTOMATION, "Binary Value (BACnet Regular)"), - BINARY_VALUE__BACNET_EXTENDED_(1549, ZclProfileType.HOME_AUTOMATION, "Binary Value (BACnet Extended)"), - MULTISTATE_INPUT__BACNET_REGULAR_(1550, ZclProfileType.HOME_AUTOMATION, "Multistate Input (BACnet Regular)"), - MULTISTATE_INPUT__BACNET_EXTENDED_(1551, ZclProfileType.HOME_AUTOMATION, "Multistate Input (BACnet Extended)"), - MULTISTATE_OUTPUT__BACNET_REGULAR_(1552, ZclProfileType.HOME_AUTOMATION, "Multistate Output (BACnet Regular)"), - MULTISTATE_OUTPUT__BACNET_EXTENDED_(1553, ZclProfileType.HOME_AUTOMATION, "Multistate Output (BACnet Extended)"), - MULTISTATE_VALUE__BACNET_REGULAR_(1554, ZclProfileType.HOME_AUTOMATION, "Multistate Value (BACnet Regular)"), - MULTISTATE_VALUE__BACNET_EXTENDED_(1555, ZclProfileType.HOME_AUTOMATION, "Multistate Value (BACnet Extended)"), - GENERAL(65535, ZclProfileType.HOME_AUTOMATION, "General"); + BASIC(0, ZclProfileType.HOME_AUTOMATION, ZclBasicCluster.class, "Basic"), + POWER_CONFIGURATION(1, ZclProfileType.HOME_AUTOMATION, ZclPowerConfigurationCluster.class, "Power configuration"), + DEVICE_TEMPERATURE_CONFIGURATION(2, ZclProfileType.HOME_AUTOMATION, ZclDeviceTemperatureConfigurationCluster.class, "Device Temperature Configuration"), + IDENTIFY(3, ZclProfileType.HOME_AUTOMATION, ZclIdentifyCluster.class, "Identify"), + GROUPS(4, ZclProfileType.HOME_AUTOMATION, ZclGroupsCluster.class, "Groups"), + SCENES(5, ZclProfileType.HOME_AUTOMATION, ZclScenesCluster.class, "Scenes"), + ON_OFF(6, ZclProfileType.HOME_AUTOMATION, ZclOnOffCluster.class, "On/Off"), + ON_OFF_SWITCH_CONFIGURATION(7, ZclProfileType.HOME_AUTOMATION, ZclOnOffSwitchConfigurationCluster.class, "On/off Switch Configuration"), + LEVEL_CONTROL(8, ZclProfileType.HOME_AUTOMATION, ZclLevelControlCluster.class, "Level Control"), + ALARMS(9, ZclProfileType.HOME_AUTOMATION, ZclAlarmsCluster.class, "Alarms"), + TIME(10, ZclProfileType.HOME_AUTOMATION, ZclTimeCluster.class, "Time"), + RSSI_LOCATION(11, ZclProfileType.HOME_AUTOMATION, ZclRssiLocationCluster.class, "RSSI Location"), + ANALOG_INPUT__BASIC_(12, ZclProfileType.HOME_AUTOMATION, ZclAnalogInputBasicCluster.class, "Analog Input (Basic)"), + ANALOG_OUTPUT__BASIC_(13, ZclProfileType.HOME_AUTOMATION, ZclAnalogOutputBasicCluster.class, "Analog Output (Basic)"), + ANALOG_VALUE__BASIC_(14, ZclProfileType.HOME_AUTOMATION, ZclAnalogValueBasicCluster.class, "Analog Value (Basic)"), + BINARY_INPUT__BASIC_(15, ZclProfileType.HOME_AUTOMATION, ZclBinaryInputBasicCluster.class, "Binary Input (Basic)"), + BINARY_OUTPUT__BASIC_(16, ZclProfileType.HOME_AUTOMATION, ZclBinaryOutputBasicCluster.class, "Binary Output (Basic)"), + BINARY_VALUE__BASIC_(17, ZclProfileType.HOME_AUTOMATION, ZclBinaryValueBasicCluster.class, "Binary Value (Basic)"), + MULTISTATE_INPUT__BASIC_(18, ZclProfileType.HOME_AUTOMATION, ZclMultistateInputBasicCluster.class, "Multistate Input (Basic)"), + MULTISTATE_OUTPUT__BASIC_(19, ZclProfileType.HOME_AUTOMATION, ZclMultistateOutputBasicCluster.class, "Multistate Output (Basic)"), + MULTISTATE_VALUE__BASIC_(20, ZclProfileType.HOME_AUTOMATION, ZclMultistateValueBasicCluster.class, "Multistate Value (Basic)"), + COMMISSIONING(21, ZclProfileType.HOME_AUTOMATION, ZclCommissioningCluster.class, "Commissioning"), + SHADE_CONFIGURATION(256, ZclProfileType.HOME_AUTOMATION, ZclShadeConfigurationCluster.class, "Shade Configuration"), + DOOR_LOCK(257, ZclProfileType.HOME_AUTOMATION, ZclDoorLockCluster.class, "Door Lock"), + PUMP_CONFIGURATION_AND_CONTROL(512, ZclProfileType.HOME_AUTOMATION, ZclPumpConfigurationAndControlCluster.class, "Pump Configuration and Control"), + THERMOSTAT(513, ZclProfileType.HOME_AUTOMATION, ZclThermostatCluster.class, "Thermostat"), + FAN_CONTROL(514, ZclProfileType.HOME_AUTOMATION, ZclFanControlCluster.class, "Fan Control"), + DEHUMIDIFICATION_CONTROL(515, ZclProfileType.HOME_AUTOMATION, ZclDehumidificationControlCluster.class, "Dehumidification Control"), + THERMOSTAT_USER_INTERFACE_CONFIGURATION(516, ZclProfileType.HOME_AUTOMATION, ZclThermostatUserInterfaceConfigurationCluster.class, "Thermostat User Interface Configuration"), + COLOR_CONTROL(768, ZclProfileType.HOME_AUTOMATION, ZclColorControlCluster.class, "Color control"), + BALLAST_CONFIGURATION(769, ZclProfileType.HOME_AUTOMATION, ZclBallastConfigurationCluster.class, "Ballast Configuration"), + ILLUMINANCE_MEASUREMENT(1024, ZclProfileType.HOME_AUTOMATION, ZclIlluminanceMeasurementCluster.class, "Illuminance measurement"), + ILLUMINANCE_LEVEL_SENSING(1025, ZclProfileType.HOME_AUTOMATION, ZclIlluminanceLevelSensingCluster.class, "Illuminance level sensing"), + TEMPERATURE_MEASUREMENT(1026, ZclProfileType.HOME_AUTOMATION, ZclTemperatureMeasurementCluster.class, "Temperature measurement"), + PRESSURE_MEASUREMENT(1027, ZclProfileType.HOME_AUTOMATION, ZclPressureMeasurementCluster.class, "Pressure measurement"), + FLOW_MEASUREMENT(1028, ZclProfileType.HOME_AUTOMATION, ZclFlowMeasurementCluster.class, "Flow measurement"), + RELATIVE_HUMIDITY_MEASUREMENT(1029, ZclProfileType.HOME_AUTOMATION, ZclRelativeHumidityMeasurementCluster.class, "Relative humidity measurement"), + OCCUPANCY_SENSING(1030, ZclProfileType.HOME_AUTOMATION, ZclOccupancySensingCluster.class, "Occupancy sensing"), + IAS_ZONE(1280, ZclProfileType.HOME_AUTOMATION, ZclIasZoneCluster.class, "IAS Zone"), + IAS_ACE(1281, ZclProfileType.HOME_AUTOMATION, ZclIasAceCluster.class, "IAS ACE"), + IAS_WD(1282, ZclProfileType.HOME_AUTOMATION, ZclIasWdCluster.class, "IAS WD"), + GENERIC_TUNNEL(1536, ZclProfileType.HOME_AUTOMATION, ZclGenericTunnelCluster.class, "Generic Tunnel"), + BACNET_PROTOCOL_TUNNEL(1537, ZclProfileType.HOME_AUTOMATION, ZclBaCnetProtocolTunnelCluster.class, "BACnet Protocol Tunnel"), + ANALOG_INPUT__BACNET_REGULAR_(1538, ZclProfileType.HOME_AUTOMATION, ZclAnalogInputBaCnetRegularCluster.class, "Analog Input (BACnet Regular)"), + ANALOG_INPUT__BACNET_EXTENDED_(1539, ZclProfileType.HOME_AUTOMATION, ZclAnalogInputBaCnetExtendedCluster.class, "Analog Input (BACnet Extended)"), + ANALOG_OUTPUT__BACNET_REGULAR_(1540, ZclProfileType.HOME_AUTOMATION, ZclAnalogOutputBaCnetRegularCluster.class, "Analog Output (BACnet Regular)"), + ANALOG_OUTPUT__BACNET_EXTENDED_(1541, ZclProfileType.HOME_AUTOMATION, ZclAnalogOutputBaCnetExtendedCluster.class, "Analog Output (BACnet Extended)"), + ANALOG_VALUE__BACNET_REGULAR_(1542, ZclProfileType.HOME_AUTOMATION, ZclAnalogValueBaCnetRegularCluster.class, "Analog Value (BACnet Regular)"), + ANALOG_VALUE__BACNET_EXTENDED_(1543, ZclProfileType.HOME_AUTOMATION, ZclAnalogValueBaCnetExtendedCluster.class, "Analog Value (BACnet Extended)"), + BINARY_INPUT__BACNET_REGULAR_(1544, ZclProfileType.HOME_AUTOMATION, ZclBinaryInputBaCnetRegularCluster.class, "Binary Input (BACnet Regular)"), + BINARY_INPUT__BACNET_EXTENDED_(1545, ZclProfileType.HOME_AUTOMATION, ZclBinaryInputBaCnetExtendedCluster.class, "Binary Input (BACnet Extended)"), + BINARY_OUTPUT__BACNET_REGULAR_(1546, ZclProfileType.HOME_AUTOMATION, ZclBinaryOutputBaCnetRegularCluster.class, "Binary Output (BACnet Regular)"), + BINARY_OUTPUT__BACNET_EXTENDED_(1547, ZclProfileType.HOME_AUTOMATION, ZclBinaryOutputBaCnetExtendedCluster.class, "Binary Output (BACnet Extended)"), + BINARY_VALUE__BACNET_REGULAR_(1548, ZclProfileType.HOME_AUTOMATION, ZclBinaryValueBaCnetRegularCluster.class, "Binary Value (BACnet Regular)"), + BINARY_VALUE__BACNET_EXTENDED_(1549, ZclProfileType.HOME_AUTOMATION, ZclBinaryValueBaCnetExtendedCluster.class, "Binary Value (BACnet Extended)"), + MULTISTATE_INPUT__BACNET_REGULAR_(1550, ZclProfileType.HOME_AUTOMATION, ZclMultistateInputBaCnetRegularCluster.class, "Multistate Input (BACnet Regular)"), + MULTISTATE_INPUT__BACNET_EXTENDED_(1551, ZclProfileType.HOME_AUTOMATION, ZclMultistateInputBaCnetExtendedCluster.class, "Multistate Input (BACnet Extended)"), + MULTISTATE_OUTPUT__BACNET_REGULAR_(1552, ZclProfileType.HOME_AUTOMATION, ZclMultistateOutputBaCnetRegularCluster.class, "Multistate Output (BACnet Regular)"), + MULTISTATE_OUTPUT__BACNET_EXTENDED_(1553, ZclProfileType.HOME_AUTOMATION, ZclMultistateOutputBaCnetExtendedCluster.class, "Multistate Output (BACnet Extended)"), + MULTISTATE_VALUE__BACNET_REGULAR_(1554, ZclProfileType.HOME_AUTOMATION, ZclMultistateValueBaCnetRegularCluster.class, "Multistate Value (BACnet Regular)"), + MULTISTATE_VALUE__BACNET_EXTENDED_(1555, ZclProfileType.HOME_AUTOMATION, ZclMultistateValueBaCnetExtendedCluster.class, "Multistate Value (BACnet Extended)"), + GENERAL(65535, ZclProfileType.HOME_AUTOMATION, ZclGeneralCluster.class, "General"); private static final Map idValueMap = new HashMap(); private final int id; private final ZclProfileType profileType; private final String label; + private final Class clusterClass; - ZclClusterType(final int id, final ZclProfileType profileType, final String label) { + ZclClusterType(final int id, final ZclProfileType profileType, final ClassclusterClass, final String label) { this.id = id; this.profileType = profileType; + this.clusterClass = clusterClass; this.label = label; } @@ -83,6 +88,7 @@ public enum ZclClusterType { public ZclProfileType getProfileType() { return profileType; } public String getLabel() { return label; } public String toString() { return label; } + public Class getClusterClass() { return clusterClass; } public static ZclClusterType getValueById(final int id) { return idValueMap.get(id); diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/ZclCommandType.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/ZclCommandType.java index a9e4500a7..59db20ac7 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/ZclCommandType.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/ZclCommandType.java @@ -1,141 +1,274 @@ package org.bubblecloud.zigbee.v3.zcl.protocol; +import org.bubblecloud.zigbee.v3.zcl.ZclCommand; + +import org.bubblecloud.zigbee.v3.zcl.clusters.basic.ResetToFactoryDefaultsCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.identify.IdentifyCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.identify.IdentifyQueryResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.identify.IdentifyQueryCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.groups.AddGroupCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.groups.AddGroupResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.groups.ViewGroupCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.groups.ViewGroupResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.groups.GetGroupMembershipCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.groups.GetGroupMembershipResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.groups.RemoveGroupCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.groups.RemoveGroupResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.groups.RemoveAllGroupsCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.groups.AddGroupIfIdentifyingCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.scenes.AddSceneCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.scenes.AddSceneResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.scenes.ViewSceneCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.scenes.ViewSceneResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.scenes.RemoveSceneCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.scenes.RemoveSceneResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.scenes.RemoveAllScenesCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.scenes.RemoveAllScenesResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.scenes.StoreSceneCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.scenes.StoreSceneResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.scenes.RecallSceneCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.scenes.GetSceneMembershipResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.scenes.GetSceneMembershipCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.onoff.OffCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.onoff.OnCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.onoff.ToggleCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.levelcontrol.MoveToLevelCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.levelcontrol.MoveCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.levelcontrol.StepCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.levelcontrol.StopCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.levelcontrol.MoveToLevelWithOnOffCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.levelcontrol.MoveWithOnOffCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.levelcontrol.StepWithOnOffCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.levelcontrol.Stop2Command; +import org.bubblecloud.zigbee.v3.zcl.clusters.alarms.ResetAlarmCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.alarms.AlarmCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.alarms.ResetAllAlarmsCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.alarms.GetAlarmResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.alarms.GetAlarmCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.alarms.ResetAlarmLogCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation.SetAbsoluteLocationCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation.DeviceConfigurationResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation.SetDeviceConfigurationCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation.LocationDataResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation.GetDeviceConfigurationCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation.LocationDataNotificationCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation.GetLocationDataCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation.CompactLocationDataNotificationCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation.RssiResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation.RssiPingCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation.SendPingsCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation.RssiRequestCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation.AnchorNodeAnnounceCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation.ReportRssiMeasurementsCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation.RequestOwnLocationCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.commissioning.RestartDeviceCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.commissioning.RestartDeviceResponseResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.commissioning.SaveStartupParametersCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.commissioning.SaveStartupParametersResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.commissioning.RestoreStartupParametersCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.commissioning.RestoreStartupParametersResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.commissioning.ResetStartupParametersCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.commissioning.ResetStartupParametersResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.doorlock.LockDoorCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.doorlock.LockDoorResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.doorlock.UnlockDoorCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.doorlock.UnlockDoorResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.thermostat.SetpointRaiseLowerCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.colorcontrol.MoveToHueCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.colorcontrol.MoveHueCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.colorcontrol.StepHueCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.colorcontrol.MoveToSaturationCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.colorcontrol.MoveSaturationCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.colorcontrol.StepSaturationCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.colorcontrol.MoveToHueAndSaturationCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.colorcontrol.MoveToColorCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.colorcontrol.MoveColorCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.colorcontrol.StepColorCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.colorcontrol.MoveToColorTemperatureCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.iaszone.ZoneEnrollResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.iaszone.ZoneStatusChangeNotificationCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.iaszone.ZoneEnrollRequestCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.iasace.ArmCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.iasace.ArmResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.iasace.BypassCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.iasace.GetZoneIdMapResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.iasace.EmergencyCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.iasace.GetZoneInformationResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.iasace.FireCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.iasace.PanicCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.iasace.GetZoneIdMapCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.iasace.GetZoneInformationCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.iaswd.StartWarningCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.iaswd.SquawkCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.ReadAttributesCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.ReadAttributesResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.WriteAttributesCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.WriteAttributesUndividedCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.WriteAttributesResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.WriteAttributesNoResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.ConfigureReportingCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.ConfigureReportingResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.ReadReportingConfigurationCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.ReadReportingConfigurationResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.ReportAttributesCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.DefaultResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.DiscoverAttributesCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.DiscoverAttributesResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.ReadAttributesStructuredCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.WriteAttributesStructuredCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.WriteAttributesStructuredResponse; + + +/** + * Code generated command type. + */ public enum ZclCommandType { - RESET_TO_FACTORY_DEFAULTS_COMMAND(0, ZclClusterType.BASIC, "Reset to Factory Defaults Command", true, false), - IDENTIFY_COMMAND(0, ZclClusterType.IDENTIFY, "Identify Command", true, false), - IDENTIFY_QUERY_COMMAND(1, ZclClusterType.IDENTIFY, "Identify Query Command", true, false), - IDENTIFY_QUERY_RESPONSE_COMMAND(0, ZclClusterType.IDENTIFY, "Identify Query Response Command", false, false), - ADD_GROUP_COMMAND(0, ZclClusterType.GROUPS, "Add Group Command", true, false), - VIEW_GROUP_COMMAND(1, ZclClusterType.GROUPS, "View Group Command", true, false), - GET_GROUP_MEMBERSHIP_COMMAND(2, ZclClusterType.GROUPS, "Get Group Membership Command", true, false), - REMOVE_GROUP_COMMAND(3, ZclClusterType.GROUPS, "Remove Group Command", true, false), - REMOVE_ALL_GROUPS_COMMAND(4, ZclClusterType.GROUPS, "Remove All Groups Command", true, false), - ADD_GROUP_IF_IDENTIFYING_COMMAND(5, ZclClusterType.GROUPS, "Add Group If Identifying Command", true, false), - ADD_GROUP_RESPONSE_COMMAND(0, ZclClusterType.GROUPS, "Add Group Response Command", false, false), - VIEW_GROUP_RESPONSE_COMMAND(1, ZclClusterType.GROUPS, "View Group Response Command", false, false), - GET_GROUP_MEMBERSHIP_RESPONSE_COMMAND(2, ZclClusterType.GROUPS, "Get Group Membership Response Command", false, false), - REMOVE_GROUP_RESPONSE_COMMAND(3, ZclClusterType.GROUPS, "Remove Group Response Command", false, false), - ADD_SCENE_COMMAND(0, ZclClusterType.SCENES, "Add Scene Command", true, false), - VIEW_SCENE_COMMAND(1, ZclClusterType.SCENES, "View Scene Command", true, false), - REMOVE_SCENE_COMMAND(2, ZclClusterType.SCENES, "Remove Scene Command", true, false), - REMOVE_ALL_SCENES_COMMAND(3, ZclClusterType.SCENES, "Remove All Scenes Command", true, false), - STORE_SCENE_COMMAND(4, ZclClusterType.SCENES, "Store Scene Command", true, false), - RECALL_SCENE_COMMAND(5, ZclClusterType.SCENES, "Recall Scene Command", true, false), - GET_SCENE_MEMBERSHIP_COMMAND(6, ZclClusterType.SCENES, "Get Scene Membership Command", true, false), - ADD_SCENE_RESPONSE_COMMAND(0, ZclClusterType.SCENES, "Add Scene Response Command", false, false), - VIEW_SCENE_RESPONSE_COMMAND(1, ZclClusterType.SCENES, "View Scene Response Command", false, false), - REMOVE_SCENE_RESPONSE_COMMAND(2, ZclClusterType.SCENES, "Remove Scene Response Command", false, false), - REMOVE_ALL_SCENES_RESPONSE_COMMAND(3, ZclClusterType.SCENES, "Remove All Scenes Response Command", false, false), - STORE_SCENE_RESPONSE_COMMAND(4, ZclClusterType.SCENES, "Store Scene Response Command", false, false), - GET_SCENE_MEMBERSHIP_RESPONSE_COMMAND(5, ZclClusterType.SCENES, "Get Scene Membership Response Command", false, false), - OFF_COMMAND(0, ZclClusterType.ON_OFF, "Off Command", true, false), - ON_COMMAND(1, ZclClusterType.ON_OFF, "On Command", true, false), - TOGGLE_COMMAND(2, ZclClusterType.ON_OFF, "Toggle Command", true, false), - MOVE_TO_LEVEL_COMMAND(0, ZclClusterType.LEVEL_CONTROL, "Move to Level Command", true, false), - MOVE_COMMAND(1, ZclClusterType.LEVEL_CONTROL, "Move Command", true, false), - STEP_COMMAND(2, ZclClusterType.LEVEL_CONTROL, "Step Command", true, false), - STOP_COMMAND(3, ZclClusterType.LEVEL_CONTROL, "Stop Command", true, false), - MOVE_TO_LEVEL__WITH_ON_OFF__COMMAND(4, ZclClusterType.LEVEL_CONTROL, "Move to Level (with On/Off) Command", true, false), - MOVE__WITH_ON_OFF__COMMAND(5, ZclClusterType.LEVEL_CONTROL, "Move (with On/Off) Command", true, false), - STEP__WITH_ON_OFF__COMMAND(6, ZclClusterType.LEVEL_CONTROL, "Step (with On/Off) Command", true, false), - STOP_2_COMMAND(7, ZclClusterType.LEVEL_CONTROL, "Stop 2 Command", true, false), - RESET_ALARM_COMMAND(0, ZclClusterType.ALARMS, "Reset Alarm Command", true, false), - RESET_ALL_ALARMS_COMMAND(1, ZclClusterType.ALARMS, "Reset All Alarms Command", true, false), - GET_ALARM_COMMAND(2, ZclClusterType.ALARMS, "Get Alarm Command", true, false), - RESET_ALARM_LOG_COMMAND(3, ZclClusterType.ALARMS, "Reset Alarm Log Command", true, false), - ALARM_COMMAND(0, ZclClusterType.ALARMS, "Alarm Command", false, false), - GET_ALARM_RESPONSE_COMMAND(1, ZclClusterType.ALARMS, "Get Alarm Response Command", false, false), - SET_ABSOLUTE_LOCATION_COMMAND(0, ZclClusterType.RSSI_LOCATION, "Set Absolute Location Command", true, false), - SET_DEVICE_CONFIGURATION_COMMAND(1, ZclClusterType.RSSI_LOCATION, "Set Device Configuration Command", true, false), - GET_DEVICE_CONFIGURATION_COMMAND(2, ZclClusterType.RSSI_LOCATION, "Get Device Configuration Command", true, false), - GET_LOCATION_DATA_COMMAND(3, ZclClusterType.RSSI_LOCATION, "Get Location Data Command", true, false), - RSSI_RESPONSE_COMMAND(4, ZclClusterType.RSSI_LOCATION, "RSSI Response Command", true, false), - SEND_PINGS_COMMAND(5, ZclClusterType.RSSI_LOCATION, "Send Pings Command", true, false), - ANCHOR_NODE_ANNOUNCE_COMMAND(6, ZclClusterType.RSSI_LOCATION, "Anchor Node Announce Command", true, false), - DEVICE_CONFIGURATION_RESPONSE_COMMAND(0, ZclClusterType.RSSI_LOCATION, "Device Configuration Response Command", false, false), - LOCATION_DATA_RESPONSE_COMMAND(1, ZclClusterType.RSSI_LOCATION, "Location Data Response Command", false, false), - LOCATION_DATA_NOTIFICATION_COMMAND(2, ZclClusterType.RSSI_LOCATION, "Location Data Notification Command", false, false), - COMPACT_LOCATION_DATA_NOTIFICATION_COMMAND(3, ZclClusterType.RSSI_LOCATION, "Compact Location Data Notification Command", false, false), - RSSI_PING_COMMAND(4, ZclClusterType.RSSI_LOCATION, "RSSI Ping Command", false, false), - RSSI_REQUEST_COMMAND(5, ZclClusterType.RSSI_LOCATION, "RSSI Request Command", false, false), - REPORT_RSSI_MEASUREMENTS_COMMAND(6, ZclClusterType.RSSI_LOCATION, "Report RSSI Measurements Command", false, false), - REQUEST_OWN_LOCATION_COMMAND(7, ZclClusterType.RSSI_LOCATION, "Request Own Location Command", false, false), - RESTART_DEVICE_COMMAND(0, ZclClusterType.COMMISSIONING, "Restart Device Command", true, false), - SAVE_STARTUP_PARAMETERS_COMMAND(1, ZclClusterType.COMMISSIONING, "Save Startup Parameters Command", true, false), - RESTORE_STARTUP_PARAMETERS_COMMAND(2, ZclClusterType.COMMISSIONING, "Restore Startup Parameters Command", true, false), - RESET_STARTUP_PARAMETERS_COMMAND(3, ZclClusterType.COMMISSIONING, "Reset Startup Parameters Command", true, false), - RESTART_DEVICE_RESPONSE_RESPONSE_COMMAND(0, ZclClusterType.COMMISSIONING, "Restart Device Response Response Command", false, false), - SAVE_STARTUP_PARAMETERS_RESPONSE_COMMAND(1, ZclClusterType.COMMISSIONING, "Save Startup Parameters Response Command", false, false), - RESTORE_STARTUP_PARAMETERS_RESPONSE_COMMAND(2, ZclClusterType.COMMISSIONING, "Restore Startup Parameters Response Command", false, false), - RESET_STARTUP_PARAMETERS_RESPONSE_COMMAND(3, ZclClusterType.COMMISSIONING, "Reset Startup Parameters Response Command", false, false), - LOCK_DOOR_COMMAND(0, ZclClusterType.DOOR_LOCK, "Lock Door Command", true, false), - UNLOCK_DOOR_COMMAND(1, ZclClusterType.DOOR_LOCK, "Unlock Door Command", true, false), - LOCK_DOOR_RESPONSE_COMMAND(0, ZclClusterType.DOOR_LOCK, "Lock Door Response Command", false, false), - UNLOCK_DOOR_RESPONSE_COMMAND(1, ZclClusterType.DOOR_LOCK, "Unlock Door Response Command", false, false), - SETPOINT_RAISE_LOWER_COMMAND(0, ZclClusterType.THERMOSTAT, "Setpoint Raise/Lower Command", true, false), - MOVE_TO_HUE_COMMAND(0, ZclClusterType.COLOR_CONTROL, "Move to Hue Command", true, false), - MOVE_HUE_COMMAND(1, ZclClusterType.COLOR_CONTROL, "Move Hue Command", true, false), - STEP_HUE_COMMAND(2, ZclClusterType.COLOR_CONTROL, "Step Hue Command", true, false), - MOVE_TO_SATURATION_COMMAND(3, ZclClusterType.COLOR_CONTROL, "Move to Saturation Command", true, false), - MOVE_SATURATION_COMMAND(4, ZclClusterType.COLOR_CONTROL, "Move Saturation Command", true, false), - STEP_SATURATION_COMMAND(5, ZclClusterType.COLOR_CONTROL, "Step Saturation Command", true, false), - MOVE_TO_HUE_AND_SATURATION_COMMAND(6, ZclClusterType.COLOR_CONTROL, "Move to Hue and Saturation Command", true, false), - MOVE_TO_COLOR_COMMAND(7, ZclClusterType.COLOR_CONTROL, "Move to Color Command", true, false), - MOVE_COLOR_COMMAND(8, ZclClusterType.COLOR_CONTROL, "Move Color Command", true, false), - STEP_COLOR_COMMAND(9, ZclClusterType.COLOR_CONTROL, "Step Color Command", true, false), - MOVE_TO_COLOR_TEMPERATURE_COMMAND(10, ZclClusterType.COLOR_CONTROL, "Move to Color Temperature Command", true, false), - ZONE_ENROLL_RESPONSE_COMMAND(0, ZclClusterType.IAS_ZONE, "Zone Enroll Response Command", true, false), - ZONE_STATUS_CHANGE_NOTIFICATION_COMMAND(0, ZclClusterType.IAS_ZONE, "Zone Status Change Notification Command", false, false), - ZONE_ENROLL_REQUEST_COMMAND(1, ZclClusterType.IAS_ZONE, "Zone Enroll Request Command", false, false), - ARM_COMMAND(0, ZclClusterType.IAS_ACE, "Arm Command", true, false), - BYPASS_COMMAND(1, ZclClusterType.IAS_ACE, "Bypass Command", true, false), - EMERGENCY_COMMAND(2, ZclClusterType.IAS_ACE, "Emergency Command", true, false), - FIRE_COMMAND(3, ZclClusterType.IAS_ACE, "Fire Command", true, false), - PANIC_COMMAND(4, ZclClusterType.IAS_ACE, "Panic Command", true, false), - GET_ZONE_ID_MAP_COMMAND(5, ZclClusterType.IAS_ACE, "Get Zone ID Map Command", true, false), - GET_ZONE_INFORMATION_COMMAND(6, ZclClusterType.IAS_ACE, "Get Zone Information Command", true, false), - ARM_RESPONSE_COMMAND(0, ZclClusterType.IAS_ACE, "Arm Response Command", false, false), - GET_ZONE_ID_MAP_RESPONSE_COMMAND(1, ZclClusterType.IAS_ACE, "Get Zone ID Map Response Command", false, false), - GET_ZONE_INFORMATION_RESPONSE_COMMAND(2, ZclClusterType.IAS_ACE, "Get Zone Information Response Command", false, false), - START_WARNING_COMMAND(0, ZclClusterType.IAS_WD, "Start Warning Command", true, false), - SQUAWK_COMMAND(2, ZclClusterType.IAS_WD, "Squawk Command", true, false), - READ_ATTRIBUTES_COMMAND(0, ZclClusterType.GENERAL, "Read Attributes Command", true, true), - READ_ATTRIBUTES_RESPONSE_COMMAND(1, ZclClusterType.GENERAL, "Read Attributes Response Command", true, true), - WRITE_ATTRIBUTES_COMMAND(2, ZclClusterType.GENERAL, "Write Attributes Command", true, true), - WRITE_ATTRIBUTES_UNDIVIDED_COMMAND(3, ZclClusterType.GENERAL, "Write Attributes Undivided Command", true, true), - WRITE_ATTRIBUTES_RESPONSE_COMMAND(4, ZclClusterType.GENERAL, "Write Attributes Response Command", true, true), - WRITE_ATTRIBUTES_NO_RESPONSE_COMMAND(5, ZclClusterType.GENERAL, "Write Attributes No Response Command", true, true), - CONFIGURE_REPORTING_COMMAND(6, ZclClusterType.GENERAL, "Configure Reporting Command", true, true), - CONFIGURE_REPORTING_RESPONSE_COMMAND(7, ZclClusterType.GENERAL, "Configure Reporting Response Command", true, true), - READ_REPORTING_CONFIGURATION_COMMAND(8, ZclClusterType.GENERAL, "Read Reporting Configuration Command", true, true), - READ_REPORTING_CONFIGURATION_RESPONSE_COMMAND(9, ZclClusterType.GENERAL, "Read Reporting Configuration Response Command", true, true), - REPORT_ATTRIBUTES_COMMAND(10, ZclClusterType.GENERAL, "Report Attributes Command", true, true), - DEFAULT_RESPONSE_COMMAND(11, ZclClusterType.GENERAL, "Default Response Command", true, true), - DISCOVER_ATTRIBUTES_COMMAND(12, ZclClusterType.GENERAL, "Discover Attributes Command", true, true), - DISCOVER_ATTRIBUTES_RESPONSE_COMMAND(13, ZclClusterType.GENERAL, "Discover Attributes Response Command", true, true), - READ_ATTRIBUTES_STRUCTURED_COMMAND(14, ZclClusterType.GENERAL, "Read Attributes Structured Command", true, true), - WRITE_ATTRIBUTES_STRUCTURED_COMMAND(15, ZclClusterType.GENERAL, "Write Attributes Structured Command", true, true), - WRITE_ATTRIBUTES_STRUCTURED_RESPONSE_COMMAND(16, ZclClusterType.GENERAL, "Write Attributes Structured Response Command", true, true); + /** + * Register command types. + */ + RESET_TO_FACTORY_DEFAULTS_COMMAND(ZclClusterType.BASIC, 0, ResetToFactoryDefaultsCommand.class, "Reset to Factory Defaults Command", true), + IDENTIFY_COMMAND(ZclClusterType.IDENTIFY, 0, IdentifyCommand.class, "Identify Command", true), + IDENTIFY_QUERY_RESPONSE(ZclClusterType.IDENTIFY, 0, IdentifyQueryResponse.class, " Identify Query Response", false), + IDENTIFY_QUERY_COMMAND(ZclClusterType.IDENTIFY, 1, IdentifyQueryCommand.class, "Identify Query Command", true), + ADD_GROUP_COMMAND(ZclClusterType.GROUPS, 0, AddGroupCommand.class, "Add Group Command", true), + ADD_GROUP_RESPONSE(ZclClusterType.GROUPS, 0, AddGroupResponse.class, " Add Group Response", false), + VIEW_GROUP_COMMAND(ZclClusterType.GROUPS, 1, ViewGroupCommand.class, "View Group Command", true), + VIEW_GROUP_RESPONSE(ZclClusterType.GROUPS, 1, ViewGroupResponse.class, " View Group Response", false), + GET_GROUP_MEMBERSHIP_COMMAND(ZclClusterType.GROUPS, 2, GetGroupMembershipCommand.class, "Get Group Membership Command", true), + GET_GROUP_MEMBERSHIP_RESPONSE(ZclClusterType.GROUPS, 2, GetGroupMembershipResponse.class, " Get Group Membership Response", false), + REMOVE_GROUP_COMMAND(ZclClusterType.GROUPS, 3, RemoveGroupCommand.class, "Remove Group Command", true), + REMOVE_GROUP_RESPONSE(ZclClusterType.GROUPS, 3, RemoveGroupResponse.class, " Remove Group Response", false), + REMOVE_ALL_GROUPS_COMMAND(ZclClusterType.GROUPS, 4, RemoveAllGroupsCommand.class, "Remove All Groups Command", true), + ADD_GROUP_IF_IDENTIFYING_COMMAND(ZclClusterType.GROUPS, 5, AddGroupIfIdentifyingCommand.class, "Add Group If Identifying Command", true), + ADD_SCENE_COMMAND(ZclClusterType.SCENES, 0, AddSceneCommand.class, "Add Scene Command", true), + ADD_SCENE_RESPONSE(ZclClusterType.SCENES, 0, AddSceneResponse.class, " Add Scene Response", false), + VIEW_SCENE_COMMAND(ZclClusterType.SCENES, 1, ViewSceneCommand.class, "View Scene Command", true), + VIEW_SCENE_RESPONSE(ZclClusterType.SCENES, 1, ViewSceneResponse.class, " View Scene Response", false), + REMOVE_SCENE_COMMAND(ZclClusterType.SCENES, 2, RemoveSceneCommand.class, "Remove Scene Command", true), + REMOVE_SCENE_RESPONSE(ZclClusterType.SCENES, 2, RemoveSceneResponse.class, " Remove Scene Response", false), + REMOVE_ALL_SCENES_COMMAND(ZclClusterType.SCENES, 3, RemoveAllScenesCommand.class, "Remove All Scenes Command", true), + REMOVE_ALL_SCENES_RESPONSE(ZclClusterType.SCENES, 3, RemoveAllScenesResponse.class, " Remove All Scenes Response", false), + STORE_SCENE_COMMAND(ZclClusterType.SCENES, 4, StoreSceneCommand.class, "Store Scene Command", true), + STORE_SCENE_RESPONSE(ZclClusterType.SCENES, 4, StoreSceneResponse.class, " Store Scene Response", false), + RECALL_SCENE_COMMAND(ZclClusterType.SCENES, 5, RecallSceneCommand.class, "Recall Scene Command", true), + GET_SCENE_MEMBERSHIP_RESPONSE(ZclClusterType.SCENES, 5, GetSceneMembershipResponse.class, " Get Scene Membership Response", false), + GET_SCENE_MEMBERSHIP_COMMAND(ZclClusterType.SCENES, 6, GetSceneMembershipCommand.class, "Get Scene Membership Command", true), + OFF_COMMAND(ZclClusterType.ON_OFF, 0, OffCommand.class, "Off Command", true), + ON_COMMAND(ZclClusterType.ON_OFF, 1, OnCommand.class, "On Command", true), + TOGGLE_COMMAND(ZclClusterType.ON_OFF, 2, ToggleCommand.class, "Toggle Command", true), + MOVE_TO_LEVEL_COMMAND(ZclClusterType.LEVEL_CONTROL, 0, MoveToLevelCommand.class, "Move to Level Command", true), + MOVE_COMMAND(ZclClusterType.LEVEL_CONTROL, 1, MoveCommand.class, "Move Command", true), + STEP_COMMAND(ZclClusterType.LEVEL_CONTROL, 2, StepCommand.class, "Step Command", true), + STOP_COMMAND(ZclClusterType.LEVEL_CONTROL, 3, StopCommand.class, "Stop Command", true), + MOVE_TO_LEVEL__WITH_ON_OFF__COMMAND(ZclClusterType.LEVEL_CONTROL, 4, MoveToLevelWithOnOffCommand.class, "Move to Level (with On/Off) Command", true), + MOVE__WITH_ON_OFF__COMMAND(ZclClusterType.LEVEL_CONTROL, 5, MoveWithOnOffCommand.class, "Move (with On/Off) Command", true), + STEP__WITH_ON_OFF__COMMAND(ZclClusterType.LEVEL_CONTROL, 6, StepWithOnOffCommand.class, "Step (with On/Off) Command", true), + STOP_2_COMMAND(ZclClusterType.LEVEL_CONTROL, 7, Stop2Command.class, "Stop 2 Command", true), + RESET_ALARM_COMMAND(ZclClusterType.ALARMS, 0, ResetAlarmCommand.class, "Reset Alarm Command", true), + ALARM_COMMAND(ZclClusterType.ALARMS, 0, AlarmCommand.class, "Alarm Command", false), + RESET_ALL_ALARMS_COMMAND(ZclClusterType.ALARMS, 1, ResetAllAlarmsCommand.class, "Reset All Alarms Command", true), + GET_ALARM_RESPONSE(ZclClusterType.ALARMS, 1, GetAlarmResponse.class, " Get Alarm Response", false), + GET_ALARM_COMMAND(ZclClusterType.ALARMS, 2, GetAlarmCommand.class, "Get Alarm Command", true), + RESET_ALARM_LOG_COMMAND(ZclClusterType.ALARMS, 3, ResetAlarmLogCommand.class, "Reset Alarm Log Command", true), + SET_ABSOLUTE_LOCATION_COMMAND(ZclClusterType.RSSI_LOCATION, 0, SetAbsoluteLocationCommand.class, "Set Absolute Location Command", true), + DEVICE_CONFIGURATION_RESPONSE(ZclClusterType.RSSI_LOCATION, 0, DeviceConfigurationResponse.class, " Device Configuration Response", false), + SET_DEVICE_CONFIGURATION_COMMAND(ZclClusterType.RSSI_LOCATION, 1, SetDeviceConfigurationCommand.class, "Set Device Configuration Command", true), + LOCATION_DATA_RESPONSE(ZclClusterType.RSSI_LOCATION, 1, LocationDataResponse.class, " Location Data Response", false), + GET_DEVICE_CONFIGURATION_COMMAND(ZclClusterType.RSSI_LOCATION, 2, GetDeviceConfigurationCommand.class, "Get Device Configuration Command", true), + LOCATION_DATA_NOTIFICATION_COMMAND(ZclClusterType.RSSI_LOCATION, 2, LocationDataNotificationCommand.class, "Location Data Notification Command", false), + GET_LOCATION_DATA_COMMAND(ZclClusterType.RSSI_LOCATION, 3, GetLocationDataCommand.class, "Get Location Data Command", true), + COMPACT_LOCATION_DATA_NOTIFICATION_COMMAND(ZclClusterType.RSSI_LOCATION, 3, CompactLocationDataNotificationCommand.class, "Compact Location Data Notification Command", false), + RSSI_RESPONSE(ZclClusterType.RSSI_LOCATION, 4, RssiResponse.class, " RSSI Response", true), + RSSI_PING_COMMAND(ZclClusterType.RSSI_LOCATION, 4, RssiPingCommand.class, "RSSI Ping Command", false), + SEND_PINGS_COMMAND(ZclClusterType.RSSI_LOCATION, 5, SendPingsCommand.class, "Send Pings Command", true), + RSSI_REQUEST_COMMAND(ZclClusterType.RSSI_LOCATION, 5, RssiRequestCommand.class, "RSSI Request Command", false), + ANCHOR_NODE_ANNOUNCE_COMMAND(ZclClusterType.RSSI_LOCATION, 6, AnchorNodeAnnounceCommand.class, "Anchor Node Announce Command", true), + REPORT_RSSI_MEASUREMENTS_COMMAND(ZclClusterType.RSSI_LOCATION, 6, ReportRssiMeasurementsCommand.class, "Report RSSI Measurements Command", false), + REQUEST_OWN_LOCATION_COMMAND(ZclClusterType.RSSI_LOCATION, 7, RequestOwnLocationCommand.class, "Request Own Location Command", false), + RESTART_DEVICE_COMMAND(ZclClusterType.COMMISSIONING, 0, RestartDeviceCommand.class, "Restart Device Command", true), + RESTART_DEVICE_RESPONSE_RESPONSE(ZclClusterType.COMMISSIONING, 0, RestartDeviceResponseResponse.class, " Restart Device Response Response", false), + SAVE_STARTUP_PARAMETERS_COMMAND(ZclClusterType.COMMISSIONING, 1, SaveStartupParametersCommand.class, "Save Startup Parameters Command", true), + SAVE_STARTUP_PARAMETERS_RESPONSE(ZclClusterType.COMMISSIONING, 1, SaveStartupParametersResponse.class, " Save Startup Parameters Response", false), + RESTORE_STARTUP_PARAMETERS_COMMAND(ZclClusterType.COMMISSIONING, 2, RestoreStartupParametersCommand.class, "Restore Startup Parameters Command", true), + RESTORE_STARTUP_PARAMETERS_RESPONSE(ZclClusterType.COMMISSIONING, 2, RestoreStartupParametersResponse.class, " Restore Startup Parameters Response", false), + RESET_STARTUP_PARAMETERS_COMMAND(ZclClusterType.COMMISSIONING, 3, ResetStartupParametersCommand.class, "Reset Startup Parameters Command", true), + RESET_STARTUP_PARAMETERS_RESPONSE(ZclClusterType.COMMISSIONING, 3, ResetStartupParametersResponse.class, " Reset Startup Parameters Response", false), + LOCK_DOOR_COMMAND(ZclClusterType.DOOR_LOCK, 0, LockDoorCommand.class, "Lock Door Command", true), + LOCK_DOOR_RESPONSE(ZclClusterType.DOOR_LOCK, 0, LockDoorResponse.class, " Lock Door Response", false), + UNLOCK_DOOR_COMMAND(ZclClusterType.DOOR_LOCK, 1, UnlockDoorCommand.class, "Unlock Door Command", true), + UNLOCK_DOOR_RESPONSE(ZclClusterType.DOOR_LOCK, 1, UnlockDoorResponse.class, " Unlock Door Response", false), + SETPOINT_RAISE_LOWER_COMMAND(ZclClusterType.THERMOSTAT, 0, SetpointRaiseLowerCommand.class, "Setpoint Raise/Lower Command", true), + MOVE_TO_HUE_COMMAND(ZclClusterType.COLOR_CONTROL, 0, MoveToHueCommand.class, "Move to Hue Command", true), + MOVE_HUE_COMMAND(ZclClusterType.COLOR_CONTROL, 1, MoveHueCommand.class, "Move Hue Command", true), + STEP_HUE_COMMAND(ZclClusterType.COLOR_CONTROL, 2, StepHueCommand.class, "Step Hue Command", true), + MOVE_TO_SATURATION_COMMAND(ZclClusterType.COLOR_CONTROL, 3, MoveToSaturationCommand.class, "Move to Saturation Command", true), + MOVE_SATURATION_COMMAND(ZclClusterType.COLOR_CONTROL, 4, MoveSaturationCommand.class, "Move Saturation Command", true), + STEP_SATURATION_COMMAND(ZclClusterType.COLOR_CONTROL, 5, StepSaturationCommand.class, "Step Saturation Command", true), + MOVE_TO_HUE_AND_SATURATION_COMMAND(ZclClusterType.COLOR_CONTROL, 6, MoveToHueAndSaturationCommand.class, "Move to Hue and Saturation Command", true), + MOVE_TO_COLOR_COMMAND(ZclClusterType.COLOR_CONTROL, 7, MoveToColorCommand.class, "Move to Color Command", true), + MOVE_COLOR_COMMAND(ZclClusterType.COLOR_CONTROL, 8, MoveColorCommand.class, "Move Color Command", true), + STEP_COLOR_COMMAND(ZclClusterType.COLOR_CONTROL, 9, StepColorCommand.class, "Step Color Command", true), + MOVE_TO_COLOR_TEMPERATURE_COMMAND(ZclClusterType.COLOR_CONTROL, 10, MoveToColorTemperatureCommand.class, "Move to Color Temperature Command", true), + ZONE_ENROLL_RESPONSE(ZclClusterType.IAS_ZONE, 0, ZoneEnrollResponse.class, " Zone Enroll Response", true), + ZONE_STATUS_CHANGE_NOTIFICATION_COMMAND(ZclClusterType.IAS_ZONE, 0, ZoneStatusChangeNotificationCommand.class, "Zone Status Change Notification Command", false), + ZONE_ENROLL_REQUEST_COMMAND(ZclClusterType.IAS_ZONE, 1, ZoneEnrollRequestCommand.class, "Zone Enroll Request Command", false), + ARM_COMMAND(ZclClusterType.IAS_ACE, 0, ArmCommand.class, "Arm Command", true), + ARM_RESPONSE(ZclClusterType.IAS_ACE, 0, ArmResponse.class, " Arm Response", false), + BYPASS_COMMAND(ZclClusterType.IAS_ACE, 1, BypassCommand.class, "Bypass Command", true), + GET_ZONE_ID_MAP_RESPONSE(ZclClusterType.IAS_ACE, 1, GetZoneIdMapResponse.class, " Get Zone ID Map Response", false), + EMERGENCY_COMMAND(ZclClusterType.IAS_ACE, 2, EmergencyCommand.class, "Emergency Command", true), + GET_ZONE_INFORMATION_RESPONSE(ZclClusterType.IAS_ACE, 2, GetZoneInformationResponse.class, " Get Zone Information Response", false), + FIRE_COMMAND(ZclClusterType.IAS_ACE, 3, FireCommand.class, "Fire Command", true), + PANIC_COMMAND(ZclClusterType.IAS_ACE, 4, PanicCommand.class, "Panic Command", true), + GET_ZONE_ID_MAP_COMMAND(ZclClusterType.IAS_ACE, 5, GetZoneIdMapCommand.class, "Get Zone ID Map Command", true), + GET_ZONE_INFORMATION_COMMAND(ZclClusterType.IAS_ACE, 6, GetZoneInformationCommand.class, "Get Zone Information Command", true), + START_WARNING_COMMAND(ZclClusterType.IAS_WD, 0, StartWarningCommand.class, "Start Warning Command", true), + SQUAWK_COMMAND(ZclClusterType.IAS_WD, 2, SquawkCommand.class, "Squawk Command", true), + READ_ATTRIBUTES_COMMAND(ZclClusterType.GENERAL, 0, ReadAttributesCommand.class, "Read Attributes Command", true), + READ_ATTRIBUTES_RESPONSE(ZclClusterType.GENERAL, 1, ReadAttributesResponse.class, " Read Attributes Response", true), + WRITE_ATTRIBUTES_COMMAND(ZclClusterType.GENERAL, 2, WriteAttributesCommand.class, "Write Attributes Command", true), + WRITE_ATTRIBUTES_UNDIVIDED_COMMAND(ZclClusterType.GENERAL, 3, WriteAttributesUndividedCommand.class, "Write Attributes Undivided Command", true), + WRITE_ATTRIBUTES_RESPONSE(ZclClusterType.GENERAL, 4, WriteAttributesResponse.class, " Write Attributes Response", true), + WRITE_ATTRIBUTES_NO_RESPONSE(ZclClusterType.GENERAL, 5, WriteAttributesNoResponse.class, " Write Attributes No Response", true), + CONFIGURE_REPORTING_COMMAND(ZclClusterType.GENERAL, 6, ConfigureReportingCommand.class, "Configure Reporting Command", true), + CONFIGURE_REPORTING_RESPONSE(ZclClusterType.GENERAL, 7, ConfigureReportingResponse.class, " Configure Reporting Response", true), + READ_REPORTING_CONFIGURATION_COMMAND(ZclClusterType.GENERAL, 8, ReadReportingConfigurationCommand.class, "Read Reporting Configuration Command", true), + READ_REPORTING_CONFIGURATION_RESPONSE(ZclClusterType.GENERAL, 9, ReadReportingConfigurationResponse.class, " Read Reporting Configuration Response", true), + REPORT_ATTRIBUTES_COMMAND(ZclClusterType.GENERAL, 10, ReportAttributesCommand.class, "Report Attributes Command", true), + DEFAULT_RESPONSE(ZclClusterType.GENERAL, 11, DefaultResponse.class, " Default Response", true), + DISCOVER_ATTRIBUTES_COMMAND(ZclClusterType.GENERAL, 12, DiscoverAttributesCommand.class, "Discover Attributes Command", true), + DISCOVER_ATTRIBUTES_RESPONSE(ZclClusterType.GENERAL, 13, DiscoverAttributesResponse.class, " Discover Attributes Response", true), + READ_ATTRIBUTES_STRUCTURED_COMMAND(ZclClusterType.GENERAL, 14, ReadAttributesStructuredCommand.class, "Read Attributes Structured Command", true), + WRITE_ATTRIBUTES_STRUCTURED_COMMAND(ZclClusterType.GENERAL, 15, WriteAttributesStructuredCommand.class, "Write Attributes Structured Command", true), + WRITE_ATTRIBUTES_STRUCTURED_RESPONSE(ZclClusterType.GENERAL, 16, WriteAttributesStructuredResponse.class, " Write Attributes Structured Response", true); - private final int id; + private final int commandId; private final ZclClusterType clusterType; + private final Class commandClass; private final String label; private final boolean received; - private final boolean generic; - ZclCommandType(final int id, final ZclClusterType clusterType, final String label, final boolean received, final boolean generic) { - this.id = id; + ZclCommandType(final ZclClusterType clusterType, final int commandId, final Class commandClass, final String label, final boolean received) { this.clusterType = clusterType; + this.commandId = commandId; + this.commandClass = commandClass; this.label = label; this.received = received; - this.generic = generic; } - public int getId() { return id; } public ZclClusterType getClusterType() { return clusterType; } + public int getId() { return commandId; } public String getLabel() { return label; } + public boolean isGeneric() { return clusterType==ZclClusterType.GENERAL; } public boolean isReceived() { return received; } - public boolean isGeneric() { return generic; } - public String toString() { return label; } + public Class getCommandClass() { return commandClass; } + public static ZclCommandType getValueById(final ZclClusterType clusterType, final int commandId) { + for (final ZclCommandType value : values()) { + if(value.clusterType == clusterType && value.commandId == commandId) { + return value; + } + } + return null; + } } diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/ZclCommandTypeRegistrar.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/ZclCommandTypeRegistrar.java deleted file mode 100644 index 65c8b11e1..000000000 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/ZclCommandTypeRegistrar.java +++ /dev/null @@ -1,359 +0,0 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol; - -import org.bubblecloud.zigbee.v3.zcl.ZclUtil; - -/** - * Code generated command type registrar class. - */ -public class ZclCommandTypeRegistrar { - /** - * Register command types. - */ - public static void register() { - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.RESET_TO_FACTORY_DEFAULTS_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.basic. - ResetToFactoryDefaultsCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.IDENTIFY_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.identify. - IdentifyCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.IDENTIFY_QUERY_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.identify. - IdentifyQueryCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.IDENTIFY_QUERY_RESPONSE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.identify. - IdentifyQueryResponseCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.ADD_GROUP_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.groups. - AddGroupCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.VIEW_GROUP_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.groups. - ViewGroupCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.GET_GROUP_MEMBERSHIP_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.groups. - GetGroupMembershipCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.REMOVE_GROUP_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.groups. - RemoveGroupCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.REMOVE_ALL_GROUPS_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.groups. - RemoveAllGroupsCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.ADD_GROUP_IF_IDENTIFYING_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.groups. - AddGroupIfIdentifyingCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.ADD_GROUP_RESPONSE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.groups. - AddGroupResponseCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.VIEW_GROUP_RESPONSE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.groups. - ViewGroupResponseCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.GET_GROUP_MEMBERSHIP_RESPONSE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.groups. - GetGroupMembershipResponseCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.REMOVE_GROUP_RESPONSE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.groups. - RemoveGroupResponseCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.ADD_SCENE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.scenes. - AddSceneCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.VIEW_SCENE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.scenes. - ViewSceneCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.REMOVE_SCENE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.scenes. - RemoveSceneCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.REMOVE_ALL_SCENES_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.scenes. - RemoveAllScenesCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.STORE_SCENE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.scenes. - StoreSceneCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.RECALL_SCENE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.scenes. - RecallSceneCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.GET_SCENE_MEMBERSHIP_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.scenes. - GetSceneMembershipCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.ADD_SCENE_RESPONSE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.scenes. - AddSceneResponseCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.VIEW_SCENE_RESPONSE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.scenes. - ViewSceneResponseCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.REMOVE_SCENE_RESPONSE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.scenes. - RemoveSceneResponseCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.REMOVE_ALL_SCENES_RESPONSE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.scenes. - RemoveAllScenesResponseCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.STORE_SCENE_RESPONSE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.scenes. - StoreSceneResponseCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.GET_SCENE_MEMBERSHIP_RESPONSE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.scenes. - GetSceneMembershipResponseCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.OFF_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.on.off. - OffCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.ON_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.on.off. - OnCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.TOGGLE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.on.off. - ToggleCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.MOVE_TO_LEVEL_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.level.control. - MoveToLevelCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.MOVE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.level.control. - MoveCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.STEP_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.level.control. - StepCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.STOP_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.level.control. - StopCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.MOVE_TO_LEVEL__WITH_ON_OFF__COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.level.control. - MoveToLevelWithOnOffCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.MOVE__WITH_ON_OFF__COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.level.control. - MoveWithOnOffCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.STEP__WITH_ON_OFF__COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.level.control. - StepWithOnOffCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.STOP_2_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.level.control. - Stop2Command.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.RESET_ALARM_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.alarms. - ResetAlarmCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.RESET_ALL_ALARMS_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.alarms. - ResetAllAlarmsCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.GET_ALARM_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.alarms. - GetAlarmCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.RESET_ALARM_LOG_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.alarms. - ResetAlarmLogCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.ALARM_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.alarms. - AlarmCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.GET_ALARM_RESPONSE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.alarms. - GetAlarmResponseCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.SET_ABSOLUTE_LOCATION_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.rssi.location. - SetAbsoluteLocationCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.SET_DEVICE_CONFIGURATION_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.rssi.location. - SetDeviceConfigurationCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.GET_DEVICE_CONFIGURATION_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.rssi.location. - GetDeviceConfigurationCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.GET_LOCATION_DATA_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.rssi.location. - GetLocationDataCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.RSSI_RESPONSE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.rssi.location. - RssiResponseCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.SEND_PINGS_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.rssi.location. - SendPingsCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.ANCHOR_NODE_ANNOUNCE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.rssi.location. - AnchorNodeAnnounceCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.DEVICE_CONFIGURATION_RESPONSE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.rssi.location. - DeviceConfigurationResponseCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.LOCATION_DATA_RESPONSE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.rssi.location. - LocationDataResponseCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.LOCATION_DATA_NOTIFICATION_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.rssi.location. - LocationDataNotificationCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.COMPACT_LOCATION_DATA_NOTIFICATION_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.rssi.location. - CompactLocationDataNotificationCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.RSSI_PING_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.rssi.location. - RssiPingCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.RSSI_REQUEST_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.rssi.location. - RssiRequestCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.REPORT_RSSI_MEASUREMENTS_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.rssi.location. - ReportRssiMeasurementsCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.REQUEST_OWN_LOCATION_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.rssi.location. - RequestOwnLocationCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.RESTART_DEVICE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.commissioning. - RestartDeviceCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.SAVE_STARTUP_PARAMETERS_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.commissioning. - SaveStartupParametersCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.RESTORE_STARTUP_PARAMETERS_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.commissioning. - RestoreStartupParametersCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.RESET_STARTUP_PARAMETERS_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.commissioning. - ResetStartupParametersCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.RESTART_DEVICE_RESPONSE_RESPONSE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.commissioning. - RestartDeviceResponseResponseCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.SAVE_STARTUP_PARAMETERS_RESPONSE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.commissioning. - SaveStartupParametersResponseCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.RESTORE_STARTUP_PARAMETERS_RESPONSE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.commissioning. - RestoreStartupParametersResponseCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.RESET_STARTUP_PARAMETERS_RESPONSE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.commissioning. - ResetStartupParametersResponseCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.LOCK_DOOR_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.door.lock. - LockDoorCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.UNLOCK_DOOR_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.door.lock. - UnlockDoorCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.LOCK_DOOR_RESPONSE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.door.lock. - LockDoorResponseCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.UNLOCK_DOOR_RESPONSE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.door.lock. - UnlockDoorResponseCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.SETPOINT_RAISE_LOWER_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.thermostat. - SetpointRaiseLowerCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.MOVE_TO_HUE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.color.control. - MoveToHueCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.MOVE_HUE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.color.control. - MoveHueCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.STEP_HUE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.color.control. - StepHueCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.MOVE_TO_SATURATION_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.color.control. - MoveToSaturationCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.MOVE_SATURATION_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.color.control. - MoveSaturationCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.STEP_SATURATION_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.color.control. - StepSaturationCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.MOVE_TO_HUE_AND_SATURATION_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.color.control. - MoveToHueAndSaturationCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.MOVE_TO_COLOR_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.color.control. - MoveToColorCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.MOVE_COLOR_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.color.control. - MoveColorCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.STEP_COLOR_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.color.control. - StepColorCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.MOVE_TO_COLOR_TEMPERATURE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.color.control. - MoveToColorTemperatureCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.ZONE_ENROLL_RESPONSE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.ias.zone. - ZoneEnrollResponseCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.ZONE_STATUS_CHANGE_NOTIFICATION_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.ias.zone. - ZoneStatusChangeNotificationCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.ZONE_ENROLL_REQUEST_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.ias.zone. - ZoneEnrollRequestCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.ARM_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.ias.ace. - ArmCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.BYPASS_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.ias.ace. - BypassCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.EMERGENCY_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.ias.ace. - EmergencyCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.FIRE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.ias.ace. - FireCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.PANIC_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.ias.ace. - PanicCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.GET_ZONE_ID_MAP_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.ias.ace. - GetZoneIdMapCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.GET_ZONE_INFORMATION_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.ias.ace. - GetZoneInformationCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.ARM_RESPONSE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.ias.ace. - ArmResponseCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.GET_ZONE_ID_MAP_RESPONSE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.ias.ace. - GetZoneIdMapResponseCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.GET_ZONE_INFORMATION_RESPONSE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.ias.ace. - GetZoneInformationResponseCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.START_WARNING_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.ias.wd. - StartWarningCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.SQUAWK_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.ias.wd. - SquawkCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.READ_ATTRIBUTES_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.general. - ReadAttributesCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.READ_ATTRIBUTES_RESPONSE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.general. - ReadAttributesResponseCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.WRITE_ATTRIBUTES_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.general. - WriteAttributesCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.WRITE_ATTRIBUTES_UNDIVIDED_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.general. - WriteAttributesUndividedCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.WRITE_ATTRIBUTES_RESPONSE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.general. - WriteAttributesResponseCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.WRITE_ATTRIBUTES_NO_RESPONSE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.general. - WriteAttributesNoResponseCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.CONFIGURE_REPORTING_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.general. - ConfigureReportingCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.CONFIGURE_REPORTING_RESPONSE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.general. - ConfigureReportingResponseCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.READ_REPORTING_CONFIGURATION_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.general. - ReadReportingConfigurationCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.READ_REPORTING_CONFIGURATION_RESPONSE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.general. - ReadReportingConfigurationResponseCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.REPORT_ATTRIBUTES_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.general. - ReportAttributesCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.DEFAULT_RESPONSE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.general. - DefaultResponseCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.DISCOVER_ATTRIBUTES_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.general. - DiscoverAttributesCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.DISCOVER_ATTRIBUTES_RESPONSE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.general. - DiscoverAttributesResponseCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.READ_ATTRIBUTES_STRUCTURED_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.general. - ReadAttributesStructuredCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.WRITE_ATTRIBUTES_STRUCTURED_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.general. - WriteAttributesStructuredCommand.class); - ZclUtil.registerCommandTypeClassMapping(ZclCommandType.WRITE_ATTRIBUTES_STRUCTURED_RESPONSE_COMMAND, - org.bubblecloud.zigbee.v3.zcl.protocol.command.general. - WriteAttributesStructuredResponseCommand.class); - } -} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/ZclCommandTypeXXX.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/ZclCommandTypeXXX.java new file mode 100644 index 000000000..932daece9 --- /dev/null +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/ZclCommandTypeXXX.java @@ -0,0 +1,140 @@ +package org.bubblecloud.zigbee.v3.zcl.protocol; + +public enum ZclCommandTypeXXX { + RESET_TO_FACTORY_DEFAULTS_COMMAND(0, ZclClusterType.BASIC, "Reset to Factory Defaults Command", true, false), + IDENTIFY_COMMAND(0, ZclClusterType.IDENTIFY, "Identify Command", true, false), + IDENTIFY_QUERY_COMMAND(1, ZclClusterType.IDENTIFY, "Identify Query Command", true, false), + IDENTIFY_QUERY_RESPONSE(0, ZclClusterType.IDENTIFY, " Identify Query Response", false, false), + ADD_GROUP_COMMAND(0, ZclClusterType.GROUPS, "Add Group Command", true, false), + VIEW_GROUP_COMMAND(1, ZclClusterType.GROUPS, "View Group Command", true, false), + GET_GROUP_MEMBERSHIP_COMMAND(2, ZclClusterType.GROUPS, "Get Group Membership Command", true, false), + REMOVE_GROUP_COMMAND(3, ZclClusterType.GROUPS, "Remove Group Command", true, false), + REMOVE_ALL_GROUPS_COMMAND(4, ZclClusterType.GROUPS, "Remove All Groups Command", true, false), + ADD_GROUP_IF_IDENTIFYING_COMMAND(5, ZclClusterType.GROUPS, "Add Group If Identifying Command", true, false), + ADD_GROUP_RESPONSE(0, ZclClusterType.GROUPS, " Add Group Response", false, false), + VIEW_GROUP_RESPONSE(1, ZclClusterType.GROUPS, " View Group Response", false, false), + GET_GROUP_MEMBERSHIP_RESPONSE(2, ZclClusterType.GROUPS, " Get Group Membership Response", false, false), + REMOVE_GROUP_RESPONSE(3, ZclClusterType.GROUPS, " Remove Group Response", false, false), + ADD_SCENE_COMMAND(0, ZclClusterType.SCENES, "Add Scene Command", true, false), + VIEW_SCENE_COMMAND(1, ZclClusterType.SCENES, "View Scene Command", true, false), + REMOVE_SCENE_COMMAND(2, ZclClusterType.SCENES, "Remove Scene Command", true, false), + REMOVE_ALL_SCENES_COMMAND(3, ZclClusterType.SCENES, "Remove All Scenes Command", true, false), + STORE_SCENE_COMMAND(4, ZclClusterType.SCENES, "Store Scene Command", true, false), + RECALL_SCENE_COMMAND(5, ZclClusterType.SCENES, "Recall Scene Command", true, false), + GET_SCENE_MEMBERSHIP_COMMAND(6, ZclClusterType.SCENES, "Get Scene Membership Command", true, false), + ADD_SCENE_RESPONSE(0, ZclClusterType.SCENES, " Add Scene Response", false, false), + VIEW_SCENE_RESPONSE(1, ZclClusterType.SCENES, " View Scene Response", false, false), + REMOVE_SCENE_RESPONSE(2, ZclClusterType.SCENES, " Remove Scene Response", false, false), + REMOVE_ALL_SCENES_RESPONSE(3, ZclClusterType.SCENES, " Remove All Scenes Response", false, false), + STORE_SCENE_RESPONSE(4, ZclClusterType.SCENES, " Store Scene Response", false, false), + GET_SCENE_MEMBERSHIP_RESPONSE(5, ZclClusterType.SCENES, " Get Scene Membership Response", false, false), + OFF_COMMAND(0, ZclClusterType.ON_OFF, "Off Command", true, false), + ON_COMMAND(1, ZclClusterType.ON_OFF, "On Command", true, false), + TOGGLE_COMMAND(2, ZclClusterType.ON_OFF, "Toggle Command", true, false), + MOVE_TO_LEVEL_COMMAND(0, ZclClusterType.LEVEL_CONTROL, "Move to Level Command", true, false), + MOVE_COMMAND(1, ZclClusterType.LEVEL_CONTROL, "Move Command", true, false), + STEP_COMMAND(2, ZclClusterType.LEVEL_CONTROL, "Step Command", true, false), + STOP_COMMAND(3, ZclClusterType.LEVEL_CONTROL, "Stop Command", true, false), + MOVE_TO_LEVEL__WITH_ON_OFF__COMMAND(4, ZclClusterType.LEVEL_CONTROL, "Move to Level (with On/Off) Command", true, false), + MOVE__WITH_ON_OFF__COMMAND(5, ZclClusterType.LEVEL_CONTROL, "Move (with On/Off) Command", true, false), + STEP__WITH_ON_OFF__COMMAND(6, ZclClusterType.LEVEL_CONTROL, "Step (with On/Off) Command", true, false), + STOP_2_COMMAND(7, ZclClusterType.LEVEL_CONTROL, "Stop 2 Command", true, false), + RESET_ALARM_COMMAND(0, ZclClusterType.ALARMS, "Reset Alarm Command", true, false), + RESET_ALL_ALARMS_COMMAND(1, ZclClusterType.ALARMS, "Reset All Alarms Command", true, false), + GET_ALARM_COMMAND(2, ZclClusterType.ALARMS, "Get Alarm Command", true, false), + RESET_ALARM_LOG_COMMAND(3, ZclClusterType.ALARMS, "Reset Alarm Log Command", true, false), + ALARM_COMMAND(0, ZclClusterType.ALARMS, "Alarm Command", false, false), + GET_ALARM_RESPONSE(1, ZclClusterType.ALARMS, " Get Alarm Response", false, false), + SET_ABSOLUTE_LOCATION_COMMAND(0, ZclClusterType.RSSI_LOCATION, "Set Absolute Location Command", true, false), + SET_DEVICE_CONFIGURATION_COMMAND(1, ZclClusterType.RSSI_LOCATION, "Set Device Configuration Command", true, false), + GET_DEVICE_CONFIGURATION_COMMAND(2, ZclClusterType.RSSI_LOCATION, "Get Device Configuration Command", true, false), + GET_LOCATION_DATA_COMMAND(3, ZclClusterType.RSSI_LOCATION, "Get Location Data Command", true, false), + RSSI_RESPONSE(4, ZclClusterType.RSSI_LOCATION, " RSSI Response", true, false), + SEND_PINGS_COMMAND(5, ZclClusterType.RSSI_LOCATION, "Send Pings Command", true, false), + ANCHOR_NODE_ANNOUNCE_COMMAND(6, ZclClusterType.RSSI_LOCATION, "Anchor Node Announce Command", true, false), + DEVICE_CONFIGURATION_RESPONSE(0, ZclClusterType.RSSI_LOCATION, " Device Configuration Response", false, false), + LOCATION_DATA_RESPONSE(1, ZclClusterType.RSSI_LOCATION, " Location Data Response", false, false), + LOCATION_DATA_NOTIFICATION_COMMAND(2, ZclClusterType.RSSI_LOCATION, "Location Data Notification Command", false, false), + COMPACT_LOCATION_DATA_NOTIFICATION_COMMAND(3, ZclClusterType.RSSI_LOCATION, "Compact Location Data Notification Command", false, false), + RSSI_PING_COMMAND(4, ZclClusterType.RSSI_LOCATION, "RSSI Ping Command", false, false), + RSSI_REQUEST_COMMAND(5, ZclClusterType.RSSI_LOCATION, "RSSI Request Command", false, false), + REPORT_RSSI_MEASUREMENTS_COMMAND(6, ZclClusterType.RSSI_LOCATION, "Report RSSI Measurements Command", false, false), + REQUEST_OWN_LOCATION_COMMAND(7, ZclClusterType.RSSI_LOCATION, "Request Own Location Command", false, false), + RESTART_DEVICE_COMMAND(0, ZclClusterType.COMMISSIONING, "Restart Device Command", true, false), + SAVE_STARTUP_PARAMETERS_COMMAND(1, ZclClusterType.COMMISSIONING, "Save Startup Parameters Command", true, false), + RESTORE_STARTUP_PARAMETERS_COMMAND(2, ZclClusterType.COMMISSIONING, "Restore Startup Parameters Command", true, false), + RESET_STARTUP_PARAMETERS_COMMAND(3, ZclClusterType.COMMISSIONING, "Reset Startup Parameters Command", true, false), + RESTART_DEVICE_RESPONSE_RESPONSE(0, ZclClusterType.COMMISSIONING, " Restart Device Response Response", false, false), + SAVE_STARTUP_PARAMETERS_RESPONSE(1, ZclClusterType.COMMISSIONING, " Save Startup Parameters Response", false, false), + RESTORE_STARTUP_PARAMETERS_RESPONSE(2, ZclClusterType.COMMISSIONING, " Restore Startup Parameters Response", false, false), + RESET_STARTUP_PARAMETERS_RESPONSE(3, ZclClusterType.COMMISSIONING, " Reset Startup Parameters Response", false, false), + LOCK_DOOR_COMMAND(0, ZclClusterType.DOOR_LOCK, "Lock Door Command", true, false), + UNLOCK_DOOR_COMMAND(1, ZclClusterType.DOOR_LOCK, "Unlock Door Command", true, false), + LOCK_DOOR_RESPONSE(0, ZclClusterType.DOOR_LOCK, " Lock Door Response", false, false), + UNLOCK_DOOR_RESPONSE(1, ZclClusterType.DOOR_LOCK, " Unlock Door Response", false, false), + SETPOINT_RAISE_LOWER_COMMAND(0, ZclClusterType.THERMOSTAT, "Setpoint Raise/Lower Command", true, false), + MOVE_TO_HUE_COMMAND(0, ZclClusterType.COLOR_CONTROL, "Move to Hue Command", true, false), + MOVE_HUE_COMMAND(1, ZclClusterType.COLOR_CONTROL, "Move Hue Command", true, false), + STEP_HUE_COMMAND(2, ZclClusterType.COLOR_CONTROL, "Step Hue Command", true, false), + MOVE_TO_SATURATION_COMMAND(3, ZclClusterType.COLOR_CONTROL, "Move to Saturation Command", true, false), + MOVE_SATURATION_COMMAND(4, ZclClusterType.COLOR_CONTROL, "Move Saturation Command", true, false), + STEP_SATURATION_COMMAND(5, ZclClusterType.COLOR_CONTROL, "Step Saturation Command", true, false), + MOVE_TO_HUE_AND_SATURATION_COMMAND(6, ZclClusterType.COLOR_CONTROL, "Move to Hue and Saturation Command", true, false), + MOVE_TO_COLOR_COMMAND(7, ZclClusterType.COLOR_CONTROL, "Move to Color Command", true, false), + MOVE_COLOR_COMMAND(8, ZclClusterType.COLOR_CONTROL, "Move Color Command", true, false), + STEP_COLOR_COMMAND(9, ZclClusterType.COLOR_CONTROL, "Step Color Command", true, false), + MOVE_TO_COLOR_TEMPERATURE_COMMAND(10, ZclClusterType.COLOR_CONTROL, "Move to Color Temperature Command", true, false), + ZONE_ENROLL_RESPONSE(0, ZclClusterType.IAS_ZONE, " Zone Enroll Response", true, false), + ZONE_STATUS_CHANGE_NOTIFICATION_COMMAND(0, ZclClusterType.IAS_ZONE, "Zone Status Change Notification Command", false, false), + ZONE_ENROLL_REQUEST_COMMAND(1, ZclClusterType.IAS_ZONE, "Zone Enroll Request Command", false, false), + ARM_COMMAND(0, ZclClusterType.IAS_ACE, "Arm Command", true, false), + BYPASS_COMMAND(1, ZclClusterType.IAS_ACE, "Bypass Command", true, false), + EMERGENCY_COMMAND(2, ZclClusterType.IAS_ACE, "Emergency Command", true, false), + FIRE_COMMAND(3, ZclClusterType.IAS_ACE, "Fire Command", true, false), + PANIC_COMMAND(4, ZclClusterType.IAS_ACE, "Panic Command", true, false), + GET_ZONE_ID_MAP_COMMAND(5, ZclClusterType.IAS_ACE, "Get Zone ID Map Command", true, false), + GET_ZONE_INFORMATION_COMMAND(6, ZclClusterType.IAS_ACE, "Get Zone Information Command", true, false), + ARM_RESPONSE(0, ZclClusterType.IAS_ACE, " Arm Response", false, false), + GET_ZONE_ID_MAP_RESPONSE(1, ZclClusterType.IAS_ACE, " Get Zone ID Map Response", false, false), + GET_ZONE_INFORMATION_RESPONSE(2, ZclClusterType.IAS_ACE, " Get Zone Information Response", false, false), + START_WARNING_COMMAND(0, ZclClusterType.IAS_WD, "Start Warning Command", true, false), + SQUAWK_COMMAND(2, ZclClusterType.IAS_WD, "Squawk Command", true, false), + READ_ATTRIBUTES_COMMAND(0, ZclClusterType.GENERAL, "Read Attributes Command", true, true), + READ_ATTRIBUTES_RESPONSE(1, ZclClusterType.GENERAL, " Read Attributes Response", true, true), + WRITE_ATTRIBUTES_COMMAND(2, ZclClusterType.GENERAL, "Write Attributes Command", true, true), + WRITE_ATTRIBUTES_UNDIVIDED_COMMAND(3, ZclClusterType.GENERAL, "Write Attributes Undivided Command", true, true), + WRITE_ATTRIBUTES_RESPONSE(4, ZclClusterType.GENERAL, " Write Attributes Response", true, true), + WRITE_ATTRIBUTES_NO_RESPONSE(5, ZclClusterType.GENERAL, " Write Attributes No Response", true, true), + CONFIGURE_REPORTING_COMMAND(6, ZclClusterType.GENERAL, "Configure Reporting Command", true, true), + CONFIGURE_REPORTING_RESPONSE(7, ZclClusterType.GENERAL, " Configure Reporting Response", true, true), + READ_REPORTING_CONFIGURATION_COMMAND(8, ZclClusterType.GENERAL, "Read Reporting Configuration Command", true, true), + READ_REPORTING_CONFIGURATION_RESPONSE(9, ZclClusterType.GENERAL, " Read Reporting Configuration Response", true, true), + REPORT_ATTRIBUTES_COMMAND(10, ZclClusterType.GENERAL, "Report Attributes Command", true, true), + DEFAULT_RESPONSE(11, ZclClusterType.GENERAL, " Default Response", true, true), + DISCOVER_ATTRIBUTES_COMMAND(12, ZclClusterType.GENERAL, "Discover Attributes Command", true, true), + DISCOVER_ATTRIBUTES_RESPONSE(13, ZclClusterType.GENERAL, " Discover Attributes Response", true, true), + READ_ATTRIBUTES_STRUCTURED_COMMAND(14, ZclClusterType.GENERAL, "Read Attributes Structured Command", true, true), + WRITE_ATTRIBUTES_STRUCTURED_COMMAND(15, ZclClusterType.GENERAL, "Write Attributes Structured Command", true, true), + WRITE_ATTRIBUTES_STRUCTURED_RESPONSE(16, ZclClusterType.GENERAL, " Write Attributes Structured Response", true, true); + + private final int id; + private final ZclClusterType clusterType; + private final String label; + private final boolean received; + private final boolean generic; + + ZclCommandTypeXXX(final int id, final ZclClusterType clusterType, final String label, final boolean received, final boolean generic) { + this.id = id; + this.clusterType = clusterType; + this.label = label; + this.received = received; + this.generic = generic; + } + + public int getId() { return id; } + public ZclClusterType getClusterType() { return clusterType; } + public String getLabel() { return label; } + public boolean isReceived() { return received; } + public boolean isGeneric() { return generic; } + public String toString() { return label; } +} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/ZclDataType.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/ZclDataType.java index bc0680b25..9e7401790 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/ZclDataType.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/ZclDataType.java @@ -1,11 +1,17 @@ package org.bubblecloud.zigbee.v3.zcl.protocol; +import java.util.Calendar; import org.bubblecloud.zigbee.v3.zcl.field.*; public enum ZclDataType { + BITMAP_16_BIT("16-bit Bitmap",Integer.class), + BITMAP_8_BIT("8-bit Bitmap",Integer.class), BOOLEAN("Boolean",Boolean.class), CHARACTER_STRING("Character string",String.class), - IEEE_ADDRESS("IEEE address",Long.class), + DATA_8_BIT("8-bit data",Integer.class), + ENUMERATION_16_BIT("16-bit Enumeration",Integer.class), + ENUMERATION_8_BIT("8-bit Enumeration",Integer.class), + IEEE_ADDRESS("IEEE Address",Long.class), N_X_ATTRIBUTE_IDENTIFIER("N X Attribute identifier",AttributeIdentifier.class), N_X_ATTRIBUTE_INFORMATION("N X Attribute information",AttributeInformation.class), N_X_ATTRIBUTE_RECORD("N X Attribute record",AttributeRecord.class), @@ -22,15 +28,13 @@ public enum ZclDataType { N_X_WRITE_ATTRIBUTE_STATUS_RECORD("N X Write attribute status record",WriteAttributeStatusRecord.class), OCTET_STRING("Octet string",String.class), SIGNED_16_BIT_INTEGER("Signed 16-bit integer",Integer.class), + SIGNED_32_BIT_INTEGER("Signed 32-bit integer",Integer.class), SIGNED_8_BIT_INTEGER("Signed 8-bit integer",Integer.class), UNSIGNED_16_BIT_INTEGER("Unsigned 16-bit integer",Integer.class), UNSIGNED_32_BIT_INTEGER("Unsigned 32-bit integer",Integer.class), UNSIGNED_8_BIT_INTEGER("Unsigned 8-bit integer",Integer.class), - _16_BIT_BITMAP("16-bit bitmap",Integer.class), - _16_BIT_ENUMERATION("16-bit enumeration",Integer.class), - _8_BIT_BITMAP("8-bit bitmap",Integer.class), - _8_BIT_DATA("8-bit data",Integer.class), - _8_BIT_ENUMERATION("8-bit enumeration",Integer.class); + UTCTIME("UTCTime",Calendar.class); + private final String label; private final Class dataClass; @@ -41,5 +45,4 @@ public enum ZclDataType { public String getLabel() { return label; } public Class getDataClass() { return dataClass; } - } diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/ZclFieldType.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/ZclFieldType.java index 57522b9a4..a4091a33c 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/ZclFieldType.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/ZclFieldType.java @@ -2,7 +2,7 @@ public enum ZclFieldType { IDENTIFY_COMMAND_IDENTIFY_TIME(0, ZclCommandType.IDENTIFY_COMMAND, "Identify Time",ZclDataType.UNSIGNED_16_BIT_INTEGER), - IDENTIFY_QUERY_RESPONSE_COMMAND_IDENTIFY_TIME(0, ZclCommandType.IDENTIFY_QUERY_RESPONSE_COMMAND, "Identify Time",ZclDataType.UNSIGNED_16_BIT_INTEGER), + IDENTIFY_QUERY_RESPONSE_IDENTIFY_TIME(0, ZclCommandType.IDENTIFY_QUERY_RESPONSE, "Identify Time",ZclDataType.UNSIGNED_16_BIT_INTEGER), ADD_GROUP_COMMAND_GROUP_ID(0, ZclCommandType.ADD_GROUP_COMMAND, "Group ID",ZclDataType.UNSIGNED_16_BIT_INTEGER), ADD_GROUP_COMMAND_GROUP_NAME(1, ZclCommandType.ADD_GROUP_COMMAND, "Group Name",ZclDataType.CHARACTER_STRING), VIEW_GROUP_COMMAND_GROUP_ID(0, ZclCommandType.VIEW_GROUP_COMMAND, "Group ID",ZclDataType.UNSIGNED_16_BIT_INTEGER), @@ -11,16 +11,16 @@ public enum ZclFieldType { REMOVE_GROUP_COMMAND_GROUP_ID(0, ZclCommandType.REMOVE_GROUP_COMMAND, "Group ID",ZclDataType.UNSIGNED_16_BIT_INTEGER), ADD_GROUP_IF_IDENTIFYING_COMMAND_GROUP_ID(0, ZclCommandType.ADD_GROUP_IF_IDENTIFYING_COMMAND, "Group ID",ZclDataType.UNSIGNED_16_BIT_INTEGER), ADD_GROUP_IF_IDENTIFYING_COMMAND_GROUP_NAME(1, ZclCommandType.ADD_GROUP_IF_IDENTIFYING_COMMAND, "Group Name",ZclDataType.CHARACTER_STRING), - ADD_GROUP_RESPONSE_COMMAND_STATUS(0, ZclCommandType.ADD_GROUP_RESPONSE_COMMAND, "Status",ZclDataType._8_BIT_ENUMERATION), - ADD_GROUP_RESPONSE_COMMAND_GROUP_ID(1, ZclCommandType.ADD_GROUP_RESPONSE_COMMAND, "Group ID",ZclDataType.UNSIGNED_16_BIT_INTEGER), - VIEW_GROUP_RESPONSE_COMMAND_STATUS(0, ZclCommandType.VIEW_GROUP_RESPONSE_COMMAND, "Status",ZclDataType._8_BIT_ENUMERATION), - VIEW_GROUP_RESPONSE_COMMAND_GROUP_ID(1, ZclCommandType.VIEW_GROUP_RESPONSE_COMMAND, "Group ID",ZclDataType.UNSIGNED_16_BIT_INTEGER), - VIEW_GROUP_RESPONSE_COMMAND_GROUP_NAME(2, ZclCommandType.VIEW_GROUP_RESPONSE_COMMAND, "Group Name",ZclDataType.CHARACTER_STRING), - GET_GROUP_MEMBERSHIP_RESPONSE_COMMAND_CAPACITY(0, ZclCommandType.GET_GROUP_MEMBERSHIP_RESPONSE_COMMAND, "Capacity",ZclDataType.UNSIGNED_8_BIT_INTEGER), - GET_GROUP_MEMBERSHIP_RESPONSE_COMMAND_GROUP_COUNT(1, ZclCommandType.GET_GROUP_MEMBERSHIP_RESPONSE_COMMAND, "Group count",ZclDataType.UNSIGNED_8_BIT_INTEGER), - GET_GROUP_MEMBERSHIP_RESPONSE_COMMAND_GROUP_LIST(2, ZclCommandType.GET_GROUP_MEMBERSHIP_RESPONSE_COMMAND, "Group list",ZclDataType.N_X_UNSIGNED_16_BIT_INTEGER), - REMOVE_GROUP_RESPONSE_COMMAND_STATUS(0, ZclCommandType.REMOVE_GROUP_RESPONSE_COMMAND, "Status",ZclDataType._8_BIT_ENUMERATION), - REMOVE_GROUP_RESPONSE_COMMAND_GROUP_ID(1, ZclCommandType.REMOVE_GROUP_RESPONSE_COMMAND, "Group ID",ZclDataType.UNSIGNED_16_BIT_INTEGER), + ADD_GROUP_RESPONSE_STATUS(0, ZclCommandType.ADD_GROUP_RESPONSE, "Status",ZclDataType.ENUMERATION_8_BIT), + ADD_GROUP_RESPONSE_GROUP_ID(1, ZclCommandType.ADD_GROUP_RESPONSE, "Group ID",ZclDataType.UNSIGNED_16_BIT_INTEGER), + VIEW_GROUP_RESPONSE_STATUS(0, ZclCommandType.VIEW_GROUP_RESPONSE, "Status",ZclDataType.ENUMERATION_8_BIT), + VIEW_GROUP_RESPONSE_GROUP_ID(1, ZclCommandType.VIEW_GROUP_RESPONSE, "Group ID",ZclDataType.UNSIGNED_16_BIT_INTEGER), + VIEW_GROUP_RESPONSE_GROUP_NAME(2, ZclCommandType.VIEW_GROUP_RESPONSE, "Group Name",ZclDataType.CHARACTER_STRING), + GET_GROUP_MEMBERSHIP_RESPONSE_CAPACITY(0, ZclCommandType.GET_GROUP_MEMBERSHIP_RESPONSE, "Capacity",ZclDataType.UNSIGNED_8_BIT_INTEGER), + GET_GROUP_MEMBERSHIP_RESPONSE_GROUP_COUNT(1, ZclCommandType.GET_GROUP_MEMBERSHIP_RESPONSE, "Group count",ZclDataType.UNSIGNED_8_BIT_INTEGER), + GET_GROUP_MEMBERSHIP_RESPONSE_GROUP_LIST(2, ZclCommandType.GET_GROUP_MEMBERSHIP_RESPONSE, "Group list",ZclDataType.N_X_UNSIGNED_16_BIT_INTEGER), + REMOVE_GROUP_RESPONSE_STATUS(0, ZclCommandType.REMOVE_GROUP_RESPONSE, "Status",ZclDataType.ENUMERATION_8_BIT), + REMOVE_GROUP_RESPONSE_GROUP_ID(1, ZclCommandType.REMOVE_GROUP_RESPONSE, "Group ID",ZclDataType.UNSIGNED_16_BIT_INTEGER), ADD_SCENE_COMMAND_GROUP_ID(0, ZclCommandType.ADD_SCENE_COMMAND, "Group ID",ZclDataType.UNSIGNED_16_BIT_INTEGER), ADD_SCENE_COMMAND_SCENE_ID(1, ZclCommandType.ADD_SCENE_COMMAND, "Scene ID",ZclDataType.UNSIGNED_8_BIT_INTEGER), ADD_SCENE_COMMAND_TRANSITION_TIME(2, ZclCommandType.ADD_SCENE_COMMAND, "Transition time",ZclDataType.UNSIGNED_16_BIT_INTEGER), @@ -36,50 +36,50 @@ public enum ZclFieldType { RECALL_SCENE_COMMAND_GROUP_ID(0, ZclCommandType.RECALL_SCENE_COMMAND, "Group ID",ZclDataType.UNSIGNED_16_BIT_INTEGER), RECALL_SCENE_COMMAND_SCENE_ID(1, ZclCommandType.RECALL_SCENE_COMMAND, "Scene ID",ZclDataType.UNSIGNED_8_BIT_INTEGER), GET_SCENE_MEMBERSHIP_COMMAND_GROUP_ID(0, ZclCommandType.GET_SCENE_MEMBERSHIP_COMMAND, "Group ID",ZclDataType.UNSIGNED_16_BIT_INTEGER), - ADD_SCENE_RESPONSE_COMMAND_STATUS(0, ZclCommandType.ADD_SCENE_RESPONSE_COMMAND, "Status",ZclDataType._8_BIT_ENUMERATION), - ADD_SCENE_RESPONSE_COMMAND_GROUP_ID(1, ZclCommandType.ADD_SCENE_RESPONSE_COMMAND, "Group ID",ZclDataType.UNSIGNED_16_BIT_INTEGER), - ADD_SCENE_RESPONSE_COMMAND_SCENE_ID(2, ZclCommandType.ADD_SCENE_RESPONSE_COMMAND, "Scene ID",ZclDataType.UNSIGNED_8_BIT_INTEGER), - VIEW_SCENE_RESPONSE_COMMAND_STATUS(0, ZclCommandType.VIEW_SCENE_RESPONSE_COMMAND, "Status",ZclDataType._8_BIT_ENUMERATION), - VIEW_SCENE_RESPONSE_COMMAND_GROUP_ID(1, ZclCommandType.VIEW_SCENE_RESPONSE_COMMAND, "Group ID",ZclDataType.UNSIGNED_16_BIT_INTEGER), - VIEW_SCENE_RESPONSE_COMMAND_SCENE_ID(2, ZclCommandType.VIEW_SCENE_RESPONSE_COMMAND, "Scene ID",ZclDataType.UNSIGNED_8_BIT_INTEGER), - VIEW_SCENE_RESPONSE_COMMAND_TRANSITION_TIME(3, ZclCommandType.VIEW_SCENE_RESPONSE_COMMAND, "Transition time",ZclDataType.UNSIGNED_16_BIT_INTEGER), - VIEW_SCENE_RESPONSE_COMMAND_SCENE_NAME(4, ZclCommandType.VIEW_SCENE_RESPONSE_COMMAND, "Scene Name",ZclDataType.CHARACTER_STRING), - VIEW_SCENE_RESPONSE_COMMAND_EXTENSION_FIELD_SETS(5, ZclCommandType.VIEW_SCENE_RESPONSE_COMMAND, "Extension field sets",ZclDataType.N_X_EXTENSION_FIELD_SET), - REMOVE_SCENE_RESPONSE_COMMAND_STATUS(0, ZclCommandType.REMOVE_SCENE_RESPONSE_COMMAND, "Status",ZclDataType._8_BIT_ENUMERATION), - REMOVE_SCENE_RESPONSE_COMMAND_GROUP_ID(1, ZclCommandType.REMOVE_SCENE_RESPONSE_COMMAND, "Group ID",ZclDataType.UNSIGNED_16_BIT_INTEGER), - REMOVE_SCENE_RESPONSE_COMMAND_SCENE_ID(2, ZclCommandType.REMOVE_SCENE_RESPONSE_COMMAND, "Scene ID",ZclDataType.UNSIGNED_8_BIT_INTEGER), - REMOVE_ALL_SCENES_RESPONSE_COMMAND_STATUS(0, ZclCommandType.REMOVE_ALL_SCENES_RESPONSE_COMMAND, "Status",ZclDataType._8_BIT_ENUMERATION), - REMOVE_ALL_SCENES_RESPONSE_COMMAND_GROUP_ID(1, ZclCommandType.REMOVE_ALL_SCENES_RESPONSE_COMMAND, "Group ID",ZclDataType.UNSIGNED_16_BIT_INTEGER), - STORE_SCENE_RESPONSE_COMMAND_STATUS(0, ZclCommandType.STORE_SCENE_RESPONSE_COMMAND, "Status",ZclDataType._8_BIT_ENUMERATION), - STORE_SCENE_RESPONSE_COMMAND_GROUP_ID(1, ZclCommandType.STORE_SCENE_RESPONSE_COMMAND, "Group ID",ZclDataType.UNSIGNED_16_BIT_INTEGER), - STORE_SCENE_RESPONSE_COMMAND_SCENE_ID(2, ZclCommandType.STORE_SCENE_RESPONSE_COMMAND, "Scene ID",ZclDataType.UNSIGNED_8_BIT_INTEGER), - GET_SCENE_MEMBERSHIP_RESPONSE_COMMAND_STATUS(0, ZclCommandType.GET_SCENE_MEMBERSHIP_RESPONSE_COMMAND, "Status",ZclDataType._8_BIT_ENUMERATION), - GET_SCENE_MEMBERSHIP_RESPONSE_COMMAND_CAPACITY(1, ZclCommandType.GET_SCENE_MEMBERSHIP_RESPONSE_COMMAND, "Capacity",ZclDataType.UNSIGNED_8_BIT_INTEGER), - GET_SCENE_MEMBERSHIP_RESPONSE_COMMAND_GROUP_ID(2, ZclCommandType.GET_SCENE_MEMBERSHIP_RESPONSE_COMMAND, "Group ID",ZclDataType.UNSIGNED_16_BIT_INTEGER), - GET_SCENE_MEMBERSHIP_RESPONSE_COMMAND_SCENE_COUNT(3, ZclCommandType.GET_SCENE_MEMBERSHIP_RESPONSE_COMMAND, "Scene count",ZclDataType.UNSIGNED_8_BIT_INTEGER), - GET_SCENE_MEMBERSHIP_RESPONSE_COMMAND_SCENE_LIST(4, ZclCommandType.GET_SCENE_MEMBERSHIP_RESPONSE_COMMAND, "Scene list",ZclDataType.N_X_UNSIGNED_8_BIT_INTEGER), + ADD_SCENE_RESPONSE_STATUS(0, ZclCommandType.ADD_SCENE_RESPONSE, "Status",ZclDataType.ENUMERATION_8_BIT), + ADD_SCENE_RESPONSE_GROUP_ID(1, ZclCommandType.ADD_SCENE_RESPONSE, "Group ID",ZclDataType.UNSIGNED_16_BIT_INTEGER), + ADD_SCENE_RESPONSE_SCENE_ID(2, ZclCommandType.ADD_SCENE_RESPONSE, "Scene ID",ZclDataType.UNSIGNED_8_BIT_INTEGER), + VIEW_SCENE_RESPONSE_STATUS(0, ZclCommandType.VIEW_SCENE_RESPONSE, "Status",ZclDataType.ENUMERATION_8_BIT), + VIEW_SCENE_RESPONSE_GROUP_ID(1, ZclCommandType.VIEW_SCENE_RESPONSE, "Group ID",ZclDataType.UNSIGNED_16_BIT_INTEGER), + VIEW_SCENE_RESPONSE_SCENE_ID(2, ZclCommandType.VIEW_SCENE_RESPONSE, "Scene ID",ZclDataType.UNSIGNED_8_BIT_INTEGER), + VIEW_SCENE_RESPONSE_TRANSITION_TIME(3, ZclCommandType.VIEW_SCENE_RESPONSE, "Transition time",ZclDataType.UNSIGNED_16_BIT_INTEGER), + VIEW_SCENE_RESPONSE_SCENE_NAME(4, ZclCommandType.VIEW_SCENE_RESPONSE, "Scene Name",ZclDataType.CHARACTER_STRING), + VIEW_SCENE_RESPONSE_EXTENSION_FIELD_SETS(5, ZclCommandType.VIEW_SCENE_RESPONSE, "Extension field sets",ZclDataType.N_X_EXTENSION_FIELD_SET), + REMOVE_SCENE_RESPONSE_STATUS(0, ZclCommandType.REMOVE_SCENE_RESPONSE, "Status",ZclDataType.ENUMERATION_8_BIT), + REMOVE_SCENE_RESPONSE_GROUP_ID(1, ZclCommandType.REMOVE_SCENE_RESPONSE, "Group ID",ZclDataType.UNSIGNED_16_BIT_INTEGER), + REMOVE_SCENE_RESPONSE_SCENE_ID(2, ZclCommandType.REMOVE_SCENE_RESPONSE, "Scene ID",ZclDataType.UNSIGNED_8_BIT_INTEGER), + REMOVE_ALL_SCENES_RESPONSE_STATUS(0, ZclCommandType.REMOVE_ALL_SCENES_RESPONSE, "Status",ZclDataType.ENUMERATION_8_BIT), + REMOVE_ALL_SCENES_RESPONSE_GROUP_ID(1, ZclCommandType.REMOVE_ALL_SCENES_RESPONSE, "Group ID",ZclDataType.UNSIGNED_16_BIT_INTEGER), + STORE_SCENE_RESPONSE_STATUS(0, ZclCommandType.STORE_SCENE_RESPONSE, "Status",ZclDataType.ENUMERATION_8_BIT), + STORE_SCENE_RESPONSE_GROUP_ID(1, ZclCommandType.STORE_SCENE_RESPONSE, "Group ID",ZclDataType.UNSIGNED_16_BIT_INTEGER), + STORE_SCENE_RESPONSE_SCENE_ID(2, ZclCommandType.STORE_SCENE_RESPONSE, "Scene ID",ZclDataType.UNSIGNED_8_BIT_INTEGER), + GET_SCENE_MEMBERSHIP_RESPONSE_STATUS(0, ZclCommandType.GET_SCENE_MEMBERSHIP_RESPONSE, "Status",ZclDataType.ENUMERATION_8_BIT), + GET_SCENE_MEMBERSHIP_RESPONSE_CAPACITY(1, ZclCommandType.GET_SCENE_MEMBERSHIP_RESPONSE, "Capacity",ZclDataType.UNSIGNED_8_BIT_INTEGER), + GET_SCENE_MEMBERSHIP_RESPONSE_GROUP_ID(2, ZclCommandType.GET_SCENE_MEMBERSHIP_RESPONSE, "Group ID",ZclDataType.UNSIGNED_16_BIT_INTEGER), + GET_SCENE_MEMBERSHIP_RESPONSE_SCENE_COUNT(3, ZclCommandType.GET_SCENE_MEMBERSHIP_RESPONSE, "Scene count",ZclDataType.UNSIGNED_8_BIT_INTEGER), + GET_SCENE_MEMBERSHIP_RESPONSE_SCENE_LIST(4, ZclCommandType.GET_SCENE_MEMBERSHIP_RESPONSE, "Scene list",ZclDataType.N_X_UNSIGNED_8_BIT_INTEGER), MOVE_TO_LEVEL_COMMAND_LEVEL(0, ZclCommandType.MOVE_TO_LEVEL_COMMAND, "Level",ZclDataType.UNSIGNED_8_BIT_INTEGER), MOVE_TO_LEVEL_COMMAND_TRANSITION_TIME(1, ZclCommandType.MOVE_TO_LEVEL_COMMAND, "Transition time",ZclDataType.UNSIGNED_16_BIT_INTEGER), - MOVE_COMMAND_MOVE_MODE(0, ZclCommandType.MOVE_COMMAND, "Move mode",ZclDataType._8_BIT_ENUMERATION), + MOVE_COMMAND_MOVE_MODE(0, ZclCommandType.MOVE_COMMAND, "Move mode",ZclDataType.ENUMERATION_8_BIT), MOVE_COMMAND_RATE(1, ZclCommandType.MOVE_COMMAND, "Rate",ZclDataType.UNSIGNED_8_BIT_INTEGER), - STEP_COMMAND_STEP_MODE(0, ZclCommandType.STEP_COMMAND, "Step mode",ZclDataType._8_BIT_ENUMERATION), + STEP_COMMAND_STEP_MODE(0, ZclCommandType.STEP_COMMAND, "Step mode",ZclDataType.ENUMERATION_8_BIT), STEP_COMMAND_STEP_SIZE(1, ZclCommandType.STEP_COMMAND, "Step size",ZclDataType.UNSIGNED_8_BIT_INTEGER), STEP_COMMAND_TRANSITION_TIME(2, ZclCommandType.STEP_COMMAND, "Transition time",ZclDataType.UNSIGNED_16_BIT_INTEGER), MOVE_TO_LEVEL__WITH_ON_OFF__COMMAND_LEVEL(0, ZclCommandType.MOVE_TO_LEVEL__WITH_ON_OFF__COMMAND, "Level",ZclDataType.UNSIGNED_8_BIT_INTEGER), MOVE_TO_LEVEL__WITH_ON_OFF__COMMAND_TRANSITION_TIME(1, ZclCommandType.MOVE_TO_LEVEL__WITH_ON_OFF__COMMAND, "Transition time",ZclDataType.UNSIGNED_16_BIT_INTEGER), - MOVE__WITH_ON_OFF__COMMAND_MOVE_MODE(0, ZclCommandType.MOVE__WITH_ON_OFF__COMMAND, "Move mode",ZclDataType._8_BIT_ENUMERATION), + MOVE__WITH_ON_OFF__COMMAND_MOVE_MODE(0, ZclCommandType.MOVE__WITH_ON_OFF__COMMAND, "Move mode",ZclDataType.ENUMERATION_8_BIT), MOVE__WITH_ON_OFF__COMMAND_RATE(1, ZclCommandType.MOVE__WITH_ON_OFF__COMMAND, "Rate",ZclDataType.UNSIGNED_8_BIT_INTEGER), - STEP__WITH_ON_OFF__COMMAND_STEP_MODE(0, ZclCommandType.STEP__WITH_ON_OFF__COMMAND, "Step mode",ZclDataType._8_BIT_ENUMERATION), + STEP__WITH_ON_OFF__COMMAND_STEP_MODE(0, ZclCommandType.STEP__WITH_ON_OFF__COMMAND, "Step mode",ZclDataType.ENUMERATION_8_BIT), STEP__WITH_ON_OFF__COMMAND_STEP_SIZE(1, ZclCommandType.STEP__WITH_ON_OFF__COMMAND, "Step size",ZclDataType.UNSIGNED_8_BIT_INTEGER), STEP__WITH_ON_OFF__COMMAND_TRANSITION_TIME(2, ZclCommandType.STEP__WITH_ON_OFF__COMMAND, "Transition time",ZclDataType.UNSIGNED_16_BIT_INTEGER), - RESET_ALARM_COMMAND_ALARM_CODE(0, ZclCommandType.RESET_ALARM_COMMAND, "Alarm code",ZclDataType._8_BIT_ENUMERATION), + RESET_ALARM_COMMAND_ALARM_CODE(0, ZclCommandType.RESET_ALARM_COMMAND, "Alarm code",ZclDataType.ENUMERATION_8_BIT), RESET_ALARM_COMMAND_CLUSTER_IDENTIFIER(1, ZclCommandType.RESET_ALARM_COMMAND, "Cluster identifier",ZclDataType.UNSIGNED_16_BIT_INTEGER), - ALARM_COMMAND_ALARM_CODE(0, ZclCommandType.ALARM_COMMAND, "Alarm code",ZclDataType._8_BIT_ENUMERATION), + ALARM_COMMAND_ALARM_CODE(0, ZclCommandType.ALARM_COMMAND, "Alarm code",ZclDataType.ENUMERATION_8_BIT), ALARM_COMMAND_CLUSTER_IDENTIFIER(1, ZclCommandType.ALARM_COMMAND, "Cluster identifier",ZclDataType.UNSIGNED_16_BIT_INTEGER), - GET_ALARM_RESPONSE_COMMAND_STATUS(0, ZclCommandType.GET_ALARM_RESPONSE_COMMAND, "Status",ZclDataType._8_BIT_ENUMERATION), - GET_ALARM_RESPONSE_COMMAND_ALARM_CODE(1, ZclCommandType.GET_ALARM_RESPONSE_COMMAND, "Alarm code",ZclDataType._8_BIT_ENUMERATION), - GET_ALARM_RESPONSE_COMMAND_CLUSTER_IDENTIFIER(2, ZclCommandType.GET_ALARM_RESPONSE_COMMAND, "Cluster identifier",ZclDataType.UNSIGNED_16_BIT_INTEGER), - GET_ALARM_RESPONSE_COMMAND_TIMESTAMP(3, ZclCommandType.GET_ALARM_RESPONSE_COMMAND, "Timestamp",ZclDataType.UNSIGNED_32_BIT_INTEGER), + GET_ALARM_RESPONSE_STATUS(0, ZclCommandType.GET_ALARM_RESPONSE, "Status",ZclDataType.ENUMERATION_8_BIT), + GET_ALARM_RESPONSE_ALARM_CODE(1, ZclCommandType.GET_ALARM_RESPONSE, "Alarm code",ZclDataType.ENUMERATION_8_BIT), + GET_ALARM_RESPONSE_CLUSTER_IDENTIFIER(2, ZclCommandType.GET_ALARM_RESPONSE, "Cluster identifier",ZclDataType.UNSIGNED_16_BIT_INTEGER), + GET_ALARM_RESPONSE_TIMESTAMP(3, ZclCommandType.GET_ALARM_RESPONSE, "Timestamp",ZclDataType.UNSIGNED_32_BIT_INTEGER), SET_ABSOLUTE_LOCATION_COMMAND_COORDINATE_1(0, ZclCommandType.SET_ABSOLUTE_LOCATION_COMMAND, "Coordinate 1",ZclDataType.SIGNED_16_BIT_INTEGER), SET_ABSOLUTE_LOCATION_COMMAND_COORDINATE_2(1, ZclCommandType.SET_ABSOLUTE_LOCATION_COMMAND, "Coordinate 2",ZclDataType.SIGNED_16_BIT_INTEGER), SET_ABSOLUTE_LOCATION_COMMAND_COORDINATE_3(2, ZclCommandType.SET_ABSOLUTE_LOCATION_COMMAND, "Coordinate 3",ZclDataType.SIGNED_16_BIT_INTEGER), @@ -91,15 +91,15 @@ public enum ZclFieldType { SET_DEVICE_CONFIGURATION_COMMAND_NUMBER_RSSI_MEASUREMENTS(3, ZclCommandType.SET_DEVICE_CONFIGURATION_COMMAND, "Number RSSI Measurements",ZclDataType.UNSIGNED_8_BIT_INTEGER), SET_DEVICE_CONFIGURATION_COMMAND_REPORTING_PERIOD(4, ZclCommandType.SET_DEVICE_CONFIGURATION_COMMAND, "Reporting Period",ZclDataType.UNSIGNED_16_BIT_INTEGER), GET_DEVICE_CONFIGURATION_COMMAND_TARGET_ADDRESS(0, ZclCommandType.GET_DEVICE_CONFIGURATION_COMMAND, "Target Address",ZclDataType.IEEE_ADDRESS), - GET_LOCATION_DATA_COMMAND_HEADER(0, ZclCommandType.GET_LOCATION_DATA_COMMAND, "Header",ZclDataType._8_BIT_BITMAP), + GET_LOCATION_DATA_COMMAND_HEADER(0, ZclCommandType.GET_LOCATION_DATA_COMMAND, "Header",ZclDataType.BITMAP_8_BIT), GET_LOCATION_DATA_COMMAND_NUMBER_RESPONSES(1, ZclCommandType.GET_LOCATION_DATA_COMMAND, "Number Responses",ZclDataType.UNSIGNED_8_BIT_INTEGER), GET_LOCATION_DATA_COMMAND_TARGET_ADDRESS(2, ZclCommandType.GET_LOCATION_DATA_COMMAND, "Target Address",ZclDataType.IEEE_ADDRESS), - RSSI_RESPONSE_COMMAND_REPLYING_DEVICE(0, ZclCommandType.RSSI_RESPONSE_COMMAND, "Replying Device",ZclDataType.IEEE_ADDRESS), - RSSI_RESPONSE_COMMAND_COORDINATE_1(1, ZclCommandType.RSSI_RESPONSE_COMMAND, "Coordinate 1",ZclDataType.SIGNED_16_BIT_INTEGER), - RSSI_RESPONSE_COMMAND_COORDINATE_2(2, ZclCommandType.RSSI_RESPONSE_COMMAND, "Coordinate 2",ZclDataType.SIGNED_16_BIT_INTEGER), - RSSI_RESPONSE_COMMAND_COORDINATE_3(3, ZclCommandType.RSSI_RESPONSE_COMMAND, "Coordinate 3",ZclDataType.SIGNED_16_BIT_INTEGER), - RSSI_RESPONSE_COMMAND_RSSI(4, ZclCommandType.RSSI_RESPONSE_COMMAND, "RSSI",ZclDataType.SIGNED_8_BIT_INTEGER), - RSSI_RESPONSE_COMMAND_NUMBER_RSSI_MEASUREMENTS(5, ZclCommandType.RSSI_RESPONSE_COMMAND, "Number RSSI Measurements",ZclDataType.UNSIGNED_8_BIT_INTEGER), + RSSI_RESPONSE_REPLYING_DEVICE(0, ZclCommandType.RSSI_RESPONSE, "Replying Device",ZclDataType.IEEE_ADDRESS), + RSSI_RESPONSE_COORDINATE_1(1, ZclCommandType.RSSI_RESPONSE, "Coordinate 1",ZclDataType.SIGNED_16_BIT_INTEGER), + RSSI_RESPONSE_COORDINATE_2(2, ZclCommandType.RSSI_RESPONSE, "Coordinate 2",ZclDataType.SIGNED_16_BIT_INTEGER), + RSSI_RESPONSE_COORDINATE_3(3, ZclCommandType.RSSI_RESPONSE, "Coordinate 3",ZclDataType.SIGNED_16_BIT_INTEGER), + RSSI_RESPONSE_RSSI(4, ZclCommandType.RSSI_RESPONSE, "RSSI",ZclDataType.SIGNED_8_BIT_INTEGER), + RSSI_RESPONSE_NUMBER_RSSI_MEASUREMENTS(5, ZclCommandType.RSSI_RESPONSE, "Number RSSI Measurements",ZclDataType.UNSIGNED_8_BIT_INTEGER), SEND_PINGS_COMMAND_TARGET_ADDRESS(0, ZclCommandType.SEND_PINGS_COMMAND, "Target Address",ZclDataType.IEEE_ADDRESS), SEND_PINGS_COMMAND_NUMBER_RSSI_MEASUREMENTS(1, ZclCommandType.SEND_PINGS_COMMAND, "Number RSSI Measurements",ZclDataType.UNSIGNED_8_BIT_INTEGER), SEND_PINGS_COMMAND_CALCULATION_PERIOD(2, ZclCommandType.SEND_PINGS_COMMAND, "Calculation Period",ZclDataType.UNSIGNED_16_BIT_INTEGER), @@ -107,68 +107,68 @@ public enum ZclFieldType { ANCHOR_NODE_ANNOUNCE_COMMAND_COORDINATE_1(1, ZclCommandType.ANCHOR_NODE_ANNOUNCE_COMMAND, "Coordinate 1",ZclDataType.SIGNED_16_BIT_INTEGER), ANCHOR_NODE_ANNOUNCE_COMMAND_COORDINATE_2(2, ZclCommandType.ANCHOR_NODE_ANNOUNCE_COMMAND, "Coordinate 2",ZclDataType.SIGNED_16_BIT_INTEGER), ANCHOR_NODE_ANNOUNCE_COMMAND_COORDINATE_3(3, ZclCommandType.ANCHOR_NODE_ANNOUNCE_COMMAND, "Coordinate 3",ZclDataType.SIGNED_16_BIT_INTEGER), - DEVICE_CONFIGURATION_RESPONSE_COMMAND_STATUS(0, ZclCommandType.DEVICE_CONFIGURATION_RESPONSE_COMMAND, "Status",ZclDataType._8_BIT_ENUMERATION), - DEVICE_CONFIGURATION_RESPONSE_COMMAND_POWER(1, ZclCommandType.DEVICE_CONFIGURATION_RESPONSE_COMMAND, "Power",ZclDataType.SIGNED_16_BIT_INTEGER), - DEVICE_CONFIGURATION_RESPONSE_COMMAND_PATH_LOSS_EXPONENT(2, ZclCommandType.DEVICE_CONFIGURATION_RESPONSE_COMMAND, "Path Loss Exponent",ZclDataType.UNSIGNED_16_BIT_INTEGER), - DEVICE_CONFIGURATION_RESPONSE_COMMAND_CALCULATION_PERIOD(3, ZclCommandType.DEVICE_CONFIGURATION_RESPONSE_COMMAND, "Calculation Period",ZclDataType.UNSIGNED_16_BIT_INTEGER), - DEVICE_CONFIGURATION_RESPONSE_COMMAND_NUMBER_RSSI_MEASUREMENTS(4, ZclCommandType.DEVICE_CONFIGURATION_RESPONSE_COMMAND, "Number RSSI Measurements",ZclDataType.UNSIGNED_8_BIT_INTEGER), - DEVICE_CONFIGURATION_RESPONSE_COMMAND_REPORTING_PERIOD(5, ZclCommandType.DEVICE_CONFIGURATION_RESPONSE_COMMAND, "Reporting Period",ZclDataType.UNSIGNED_16_BIT_INTEGER), - LOCATION_DATA_RESPONSE_COMMAND_STATUS(0, ZclCommandType.LOCATION_DATA_RESPONSE_COMMAND, "Status",ZclDataType._8_BIT_ENUMERATION), - LOCATION_DATA_RESPONSE_COMMAND_LOCATION_TYPE(1, ZclCommandType.LOCATION_DATA_RESPONSE_COMMAND, "Location Type",ZclDataType._8_BIT_DATA), - LOCATION_DATA_RESPONSE_COMMAND_COORDINATE_1(2, ZclCommandType.LOCATION_DATA_RESPONSE_COMMAND, "Coordinate 1",ZclDataType.SIGNED_16_BIT_INTEGER), - LOCATION_DATA_RESPONSE_COMMAND_COORDINATE_2(3, ZclCommandType.LOCATION_DATA_RESPONSE_COMMAND, "Coordinate 2",ZclDataType.SIGNED_16_BIT_INTEGER), - LOCATION_DATA_RESPONSE_COMMAND_COORDINATE_3(4, ZclCommandType.LOCATION_DATA_RESPONSE_COMMAND, "Coordinate 3",ZclDataType.SIGNED_16_BIT_INTEGER), - LOCATION_DATA_RESPONSE_COMMAND_POWER(5, ZclCommandType.LOCATION_DATA_RESPONSE_COMMAND, "Power",ZclDataType.SIGNED_16_BIT_INTEGER), - LOCATION_DATA_RESPONSE_COMMAND_PATH_LOSS_EXPONENT(6, ZclCommandType.LOCATION_DATA_RESPONSE_COMMAND, "Path Loss Exponent",ZclDataType.UNSIGNED_16_BIT_INTEGER), - LOCATION_DATA_RESPONSE_COMMAND_LOCATION_METHOD(7, ZclCommandType.LOCATION_DATA_RESPONSE_COMMAND, "Location Method",ZclDataType._8_BIT_ENUMERATION), - LOCATION_DATA_RESPONSE_COMMAND_QUALITY_MEASURE(8, ZclCommandType.LOCATION_DATA_RESPONSE_COMMAND, "Quality Measure",ZclDataType.UNSIGNED_8_BIT_INTEGER), - LOCATION_DATA_RESPONSE_COMMAND_LOCATION_AGE(9, ZclCommandType.LOCATION_DATA_RESPONSE_COMMAND, "Location Age",ZclDataType.UNSIGNED_16_BIT_INTEGER), - LOCATION_DATA_NOTIFICATION_COMMAND_LOCATION_TYPE(0, ZclCommandType.LOCATION_DATA_NOTIFICATION_COMMAND, "Location Type",ZclDataType._8_BIT_DATA), + DEVICE_CONFIGURATION_RESPONSE_STATUS(0, ZclCommandType.DEVICE_CONFIGURATION_RESPONSE, "Status",ZclDataType.ENUMERATION_8_BIT), + DEVICE_CONFIGURATION_RESPONSE_POWER(1, ZclCommandType.DEVICE_CONFIGURATION_RESPONSE, "Power",ZclDataType.SIGNED_16_BIT_INTEGER), + DEVICE_CONFIGURATION_RESPONSE_PATH_LOSS_EXPONENT(2, ZclCommandType.DEVICE_CONFIGURATION_RESPONSE, "Path Loss Exponent",ZclDataType.UNSIGNED_16_BIT_INTEGER), + DEVICE_CONFIGURATION_RESPONSE_CALCULATION_PERIOD(3, ZclCommandType.DEVICE_CONFIGURATION_RESPONSE, "Calculation Period",ZclDataType.UNSIGNED_16_BIT_INTEGER), + DEVICE_CONFIGURATION_RESPONSE_NUMBER_RSSI_MEASUREMENTS(4, ZclCommandType.DEVICE_CONFIGURATION_RESPONSE, "Number RSSI Measurements",ZclDataType.UNSIGNED_8_BIT_INTEGER), + DEVICE_CONFIGURATION_RESPONSE_REPORTING_PERIOD(5, ZclCommandType.DEVICE_CONFIGURATION_RESPONSE, "Reporting Period",ZclDataType.UNSIGNED_16_BIT_INTEGER), + LOCATION_DATA_RESPONSE_STATUS(0, ZclCommandType.LOCATION_DATA_RESPONSE, "Status",ZclDataType.ENUMERATION_8_BIT), + LOCATION_DATA_RESPONSE_LOCATION_TYPE(1, ZclCommandType.LOCATION_DATA_RESPONSE, "Location Type",ZclDataType.DATA_8_BIT), + LOCATION_DATA_RESPONSE_COORDINATE_1(2, ZclCommandType.LOCATION_DATA_RESPONSE, "Coordinate 1",ZclDataType.SIGNED_16_BIT_INTEGER), + LOCATION_DATA_RESPONSE_COORDINATE_2(3, ZclCommandType.LOCATION_DATA_RESPONSE, "Coordinate 2",ZclDataType.SIGNED_16_BIT_INTEGER), + LOCATION_DATA_RESPONSE_COORDINATE_3(4, ZclCommandType.LOCATION_DATA_RESPONSE, "Coordinate 3",ZclDataType.SIGNED_16_BIT_INTEGER), + LOCATION_DATA_RESPONSE_POWER(5, ZclCommandType.LOCATION_DATA_RESPONSE, "Power",ZclDataType.SIGNED_16_BIT_INTEGER), + LOCATION_DATA_RESPONSE_PATH_LOSS_EXPONENT(6, ZclCommandType.LOCATION_DATA_RESPONSE, "Path Loss Exponent",ZclDataType.UNSIGNED_16_BIT_INTEGER), + LOCATION_DATA_RESPONSE_LOCATION_METHOD(7, ZclCommandType.LOCATION_DATA_RESPONSE, "Location Method",ZclDataType.ENUMERATION_8_BIT), + LOCATION_DATA_RESPONSE_QUALITY_MEASURE(8, ZclCommandType.LOCATION_DATA_RESPONSE, "Quality Measure",ZclDataType.UNSIGNED_8_BIT_INTEGER), + LOCATION_DATA_RESPONSE_LOCATION_AGE(9, ZclCommandType.LOCATION_DATA_RESPONSE, "Location Age",ZclDataType.UNSIGNED_16_BIT_INTEGER), + LOCATION_DATA_NOTIFICATION_COMMAND_LOCATION_TYPE(0, ZclCommandType.LOCATION_DATA_NOTIFICATION_COMMAND, "Location Type",ZclDataType.DATA_8_BIT), LOCATION_DATA_NOTIFICATION_COMMAND_COORDINATE_1(1, ZclCommandType.LOCATION_DATA_NOTIFICATION_COMMAND, "Coordinate 1",ZclDataType.SIGNED_16_BIT_INTEGER), LOCATION_DATA_NOTIFICATION_COMMAND_COORDINATE_2(2, ZclCommandType.LOCATION_DATA_NOTIFICATION_COMMAND, "Coordinate 2",ZclDataType.SIGNED_16_BIT_INTEGER), LOCATION_DATA_NOTIFICATION_COMMAND_COORDINATE_3(3, ZclCommandType.LOCATION_DATA_NOTIFICATION_COMMAND, "Coordinate 3",ZclDataType.SIGNED_16_BIT_INTEGER), LOCATION_DATA_NOTIFICATION_COMMAND_POWER(4, ZclCommandType.LOCATION_DATA_NOTIFICATION_COMMAND, "Power",ZclDataType.SIGNED_16_BIT_INTEGER), LOCATION_DATA_NOTIFICATION_COMMAND_PATH_LOSS_EXPONENT(5, ZclCommandType.LOCATION_DATA_NOTIFICATION_COMMAND, "Path Loss Exponent",ZclDataType.UNSIGNED_16_BIT_INTEGER), - LOCATION_DATA_NOTIFICATION_COMMAND_LOCATION_METHOD(6, ZclCommandType.LOCATION_DATA_NOTIFICATION_COMMAND, "Location Method",ZclDataType._8_BIT_ENUMERATION), + LOCATION_DATA_NOTIFICATION_COMMAND_LOCATION_METHOD(6, ZclCommandType.LOCATION_DATA_NOTIFICATION_COMMAND, "Location Method",ZclDataType.ENUMERATION_8_BIT), LOCATION_DATA_NOTIFICATION_COMMAND_QUALITY_MEASURE(7, ZclCommandType.LOCATION_DATA_NOTIFICATION_COMMAND, "Quality Measure",ZclDataType.UNSIGNED_8_BIT_INTEGER), LOCATION_DATA_NOTIFICATION_COMMAND_LOCATION_AGE(8, ZclCommandType.LOCATION_DATA_NOTIFICATION_COMMAND, "Location Age",ZclDataType.UNSIGNED_16_BIT_INTEGER), - RSSI_PING_COMMAND_LOCATION_TYPE(0, ZclCommandType.RSSI_PING_COMMAND, "Location Type",ZclDataType._8_BIT_DATA), + RSSI_PING_COMMAND_LOCATION_TYPE(0, ZclCommandType.RSSI_PING_COMMAND, "Location Type",ZclDataType.DATA_8_BIT), REPORT_RSSI_MEASUREMENTS_COMMAND_REPORTING_ADDRESS(0, ZclCommandType.REPORT_RSSI_MEASUREMENTS_COMMAND, "Reporting Address",ZclDataType.IEEE_ADDRESS), REPORT_RSSI_MEASUREMENTS_COMMAND_NUMBER_OF_NEIGHBORS(1, ZclCommandType.REPORT_RSSI_MEASUREMENTS_COMMAND, "Number of Neighbors",ZclDataType.UNSIGNED_8_BIT_INTEGER), REPORT_RSSI_MEASUREMENTS_COMMAND_NEIGHBORS_INFORMATION(2, ZclCommandType.REPORT_RSSI_MEASUREMENTS_COMMAND, "Neighbors Information",ZclDataType.N_X_NEIGHBORS_INFORMATION), REQUEST_OWN_LOCATION_COMMAND_REQUESTING_ADDRESS(0, ZclCommandType.REQUEST_OWN_LOCATION_COMMAND, "Requesting Address",ZclDataType.IEEE_ADDRESS), - RESTART_DEVICE_COMMAND_OPTION(0, ZclCommandType.RESTART_DEVICE_COMMAND, "Option",ZclDataType._8_BIT_BITMAP), + RESTART_DEVICE_COMMAND_OPTION(0, ZclCommandType.RESTART_DEVICE_COMMAND, "Option",ZclDataType.BITMAP_8_BIT), RESTART_DEVICE_COMMAND_DELAY(1, ZclCommandType.RESTART_DEVICE_COMMAND, "Delay",ZclDataType.UNSIGNED_8_BIT_INTEGER), RESTART_DEVICE_COMMAND_JITTER(2, ZclCommandType.RESTART_DEVICE_COMMAND, "Jitter",ZclDataType.UNSIGNED_8_BIT_INTEGER), - SAVE_STARTUP_PARAMETERS_COMMAND_OPTION(0, ZclCommandType.SAVE_STARTUP_PARAMETERS_COMMAND, "Option",ZclDataType._8_BIT_BITMAP), + SAVE_STARTUP_PARAMETERS_COMMAND_OPTION(0, ZclCommandType.SAVE_STARTUP_PARAMETERS_COMMAND, "Option",ZclDataType.BITMAP_8_BIT), SAVE_STARTUP_PARAMETERS_COMMAND_INDEX(1, ZclCommandType.SAVE_STARTUP_PARAMETERS_COMMAND, "Index",ZclDataType.UNSIGNED_8_BIT_INTEGER), - RESTORE_STARTUP_PARAMETERS_COMMAND_OPTION(0, ZclCommandType.RESTORE_STARTUP_PARAMETERS_COMMAND, "Option",ZclDataType._8_BIT_BITMAP), + RESTORE_STARTUP_PARAMETERS_COMMAND_OPTION(0, ZclCommandType.RESTORE_STARTUP_PARAMETERS_COMMAND, "Option",ZclDataType.BITMAP_8_BIT), RESTORE_STARTUP_PARAMETERS_COMMAND_INDEX(1, ZclCommandType.RESTORE_STARTUP_PARAMETERS_COMMAND, "Index",ZclDataType.UNSIGNED_8_BIT_INTEGER), - RESET_STARTUP_PARAMETERS_COMMAND_OPTION(0, ZclCommandType.RESET_STARTUP_PARAMETERS_COMMAND, "Option",ZclDataType._8_BIT_BITMAP), + RESET_STARTUP_PARAMETERS_COMMAND_OPTION(0, ZclCommandType.RESET_STARTUP_PARAMETERS_COMMAND, "Option",ZclDataType.BITMAP_8_BIT), RESET_STARTUP_PARAMETERS_COMMAND_INDEX(1, ZclCommandType.RESET_STARTUP_PARAMETERS_COMMAND, "Index",ZclDataType.UNSIGNED_8_BIT_INTEGER), - RESTART_DEVICE_RESPONSE_RESPONSE_COMMAND_STATUS(0, ZclCommandType.RESTART_DEVICE_RESPONSE_RESPONSE_COMMAND, "Status",ZclDataType._8_BIT_ENUMERATION), - SAVE_STARTUP_PARAMETERS_RESPONSE_COMMAND_STATUS(0, ZclCommandType.SAVE_STARTUP_PARAMETERS_RESPONSE_COMMAND, "Status",ZclDataType._8_BIT_ENUMERATION), - RESTORE_STARTUP_PARAMETERS_RESPONSE_COMMAND_STATUS(0, ZclCommandType.RESTORE_STARTUP_PARAMETERS_RESPONSE_COMMAND, "Status",ZclDataType._8_BIT_ENUMERATION), - RESET_STARTUP_PARAMETERS_RESPONSE_COMMAND_STATUS(0, ZclCommandType.RESET_STARTUP_PARAMETERS_RESPONSE_COMMAND, "Status",ZclDataType._8_BIT_ENUMERATION), + RESTART_DEVICE_RESPONSE_RESPONSE_STATUS(0, ZclCommandType.RESTART_DEVICE_RESPONSE_RESPONSE, "Status",ZclDataType.ENUMERATION_8_BIT), + SAVE_STARTUP_PARAMETERS_RESPONSE_STATUS(0, ZclCommandType.SAVE_STARTUP_PARAMETERS_RESPONSE, "Status",ZclDataType.ENUMERATION_8_BIT), + RESTORE_STARTUP_PARAMETERS_RESPONSE_STATUS(0, ZclCommandType.RESTORE_STARTUP_PARAMETERS_RESPONSE, "Status",ZclDataType.ENUMERATION_8_BIT), + RESET_STARTUP_PARAMETERS_RESPONSE_STATUS(0, ZclCommandType.RESET_STARTUP_PARAMETERS_RESPONSE, "Status",ZclDataType.ENUMERATION_8_BIT), LOCK_DOOR_COMMAND_PIN_CODE(0, ZclCommandType.LOCK_DOOR_COMMAND, "Pin code",ZclDataType.OCTET_STRING), UNLOCK_DOOR_COMMAND_PIN_CODE(0, ZclCommandType.UNLOCK_DOOR_COMMAND, "Pin code",ZclDataType.OCTET_STRING), - LOCK_DOOR_RESPONSE_COMMAND_STATUS(0, ZclCommandType.LOCK_DOOR_RESPONSE_COMMAND, "Status",ZclDataType._8_BIT_ENUMERATION), - UNLOCK_DOOR_RESPONSE_COMMAND_STATUS(0, ZclCommandType.UNLOCK_DOOR_RESPONSE_COMMAND, "Status",ZclDataType._8_BIT_ENUMERATION), - SETPOINT_RAISE_LOWER_COMMAND_MODE(0, ZclCommandType.SETPOINT_RAISE_LOWER_COMMAND, "Mode",ZclDataType._8_BIT_ENUMERATION), + LOCK_DOOR_RESPONSE_STATUS(0, ZclCommandType.LOCK_DOOR_RESPONSE, "Status",ZclDataType.ENUMERATION_8_BIT), + UNLOCK_DOOR_RESPONSE_STATUS(0, ZclCommandType.UNLOCK_DOOR_RESPONSE, "Status",ZclDataType.ENUMERATION_8_BIT), + SETPOINT_RAISE_LOWER_COMMAND_MODE(0, ZclCommandType.SETPOINT_RAISE_LOWER_COMMAND, "Mode",ZclDataType.ENUMERATION_8_BIT), SETPOINT_RAISE_LOWER_COMMAND_AMOUNT(1, ZclCommandType.SETPOINT_RAISE_LOWER_COMMAND, "Amount",ZclDataType.SIGNED_8_BIT_INTEGER), MOVE_TO_HUE_COMMAND_HUE(0, ZclCommandType.MOVE_TO_HUE_COMMAND, "Hue",ZclDataType.UNSIGNED_8_BIT_INTEGER), - MOVE_TO_HUE_COMMAND_DIRECTION(1, ZclCommandType.MOVE_TO_HUE_COMMAND, "Direction",ZclDataType._8_BIT_ENUMERATION), + MOVE_TO_HUE_COMMAND_DIRECTION(1, ZclCommandType.MOVE_TO_HUE_COMMAND, "Direction",ZclDataType.ENUMERATION_8_BIT), MOVE_TO_HUE_COMMAND_TRANSITION_TIME(2, ZclCommandType.MOVE_TO_HUE_COMMAND, "Transition time",ZclDataType.UNSIGNED_16_BIT_INTEGER), - MOVE_HUE_COMMAND_MOVE_MODE(0, ZclCommandType.MOVE_HUE_COMMAND, "Move mode",ZclDataType._8_BIT_ENUMERATION), + MOVE_HUE_COMMAND_MOVE_MODE(0, ZclCommandType.MOVE_HUE_COMMAND, "Move mode",ZclDataType.ENUMERATION_8_BIT), MOVE_HUE_COMMAND_RATE(1, ZclCommandType.MOVE_HUE_COMMAND, "Rate",ZclDataType.UNSIGNED_8_BIT_INTEGER), - STEP_HUE_COMMAND_STEP_MODE(0, ZclCommandType.STEP_HUE_COMMAND, "Step mode",ZclDataType._8_BIT_ENUMERATION), + STEP_HUE_COMMAND_STEP_MODE(0, ZclCommandType.STEP_HUE_COMMAND, "Step mode",ZclDataType.ENUMERATION_8_BIT), STEP_HUE_COMMAND_STEP_SIZE(1, ZclCommandType.STEP_HUE_COMMAND, "Step size",ZclDataType.UNSIGNED_8_BIT_INTEGER), STEP_HUE_COMMAND_TRANSITION_TIME(2, ZclCommandType.STEP_HUE_COMMAND, "Transition time",ZclDataType.UNSIGNED_8_BIT_INTEGER), MOVE_TO_SATURATION_COMMAND_SATURATION(0, ZclCommandType.MOVE_TO_SATURATION_COMMAND, "Saturation",ZclDataType.UNSIGNED_8_BIT_INTEGER), MOVE_TO_SATURATION_COMMAND_TRANSITION_TIME(1, ZclCommandType.MOVE_TO_SATURATION_COMMAND, "Transition time",ZclDataType.UNSIGNED_16_BIT_INTEGER), - MOVE_SATURATION_COMMAND_MOVE_MODE(0, ZclCommandType.MOVE_SATURATION_COMMAND, "Move mode",ZclDataType._8_BIT_ENUMERATION), + MOVE_SATURATION_COMMAND_MOVE_MODE(0, ZclCommandType.MOVE_SATURATION_COMMAND, "Move mode",ZclDataType.ENUMERATION_8_BIT), MOVE_SATURATION_COMMAND_RATE(1, ZclCommandType.MOVE_SATURATION_COMMAND, "Rate",ZclDataType.UNSIGNED_8_BIT_INTEGER), - STEP_SATURATION_COMMAND_STEP_MODE(0, ZclCommandType.STEP_SATURATION_COMMAND, "Step mode",ZclDataType._8_BIT_ENUMERATION), + STEP_SATURATION_COMMAND_STEP_MODE(0, ZclCommandType.STEP_SATURATION_COMMAND, "Step mode",ZclDataType.ENUMERATION_8_BIT), STEP_SATURATION_COMMAND_STEP_SIZE(1, ZclCommandType.STEP_SATURATION_COMMAND, "Step size",ZclDataType.UNSIGNED_8_BIT_INTEGER), STEP_SATURATION_COMMAND_TRANSITION_TIME(2, ZclCommandType.STEP_SATURATION_COMMAND, "Transition time",ZclDataType.UNSIGNED_8_BIT_INTEGER), MOVE_TO_HUE_AND_SATURATION_COMMAND_HUE(0, ZclCommandType.MOVE_TO_HUE_AND_SATURATION_COMMAND, "Hue",ZclDataType.UNSIGNED_8_BIT_INTEGER), @@ -184,59 +184,59 @@ public enum ZclFieldType { STEP_COLOR_COMMAND_TRANSITION_TIME(2, ZclCommandType.STEP_COLOR_COMMAND, "Transition time",ZclDataType.UNSIGNED_16_BIT_INTEGER), MOVE_TO_COLOR_TEMPERATURE_COMMAND_COLOR_TEMPERATURE(0, ZclCommandType.MOVE_TO_COLOR_TEMPERATURE_COMMAND, "Color Temperature",ZclDataType.UNSIGNED_16_BIT_INTEGER), MOVE_TO_COLOR_TEMPERATURE_COMMAND_TRANSITION_TIME(1, ZclCommandType.MOVE_TO_COLOR_TEMPERATURE_COMMAND, "Transition time",ZclDataType.UNSIGNED_16_BIT_INTEGER), - ZONE_ENROLL_RESPONSE_COMMAND_ENROLL_RESPONSE_CODE(0, ZclCommandType.ZONE_ENROLL_RESPONSE_COMMAND, "Enroll response code",ZclDataType._8_BIT_ENUMERATION), - ZONE_ENROLL_RESPONSE_COMMAND_ZONE_ID(1, ZclCommandType.ZONE_ENROLL_RESPONSE_COMMAND, "Zone ID",ZclDataType.UNSIGNED_8_BIT_INTEGER), - ZONE_STATUS_CHANGE_NOTIFICATION_COMMAND_ZONE_STATUS(0, ZclCommandType.ZONE_STATUS_CHANGE_NOTIFICATION_COMMAND, "Zone Status",ZclDataType._16_BIT_ENUMERATION), - ZONE_STATUS_CHANGE_NOTIFICATION_COMMAND_EXTENDED_STATUS(1, ZclCommandType.ZONE_STATUS_CHANGE_NOTIFICATION_COMMAND, "Extended Status",ZclDataType._8_BIT_ENUMERATION), - ZONE_ENROLL_REQUEST_COMMAND_ZONE_TYPE(0, ZclCommandType.ZONE_ENROLL_REQUEST_COMMAND, "Zone Type",ZclDataType._16_BIT_ENUMERATION), + ZONE_ENROLL_RESPONSE_ENROLL_RESPONSE_CODE(0, ZclCommandType.ZONE_ENROLL_RESPONSE, "Enroll response code",ZclDataType.ENUMERATION_8_BIT), + ZONE_ENROLL_RESPONSE_ZONE_ID(1, ZclCommandType.ZONE_ENROLL_RESPONSE, "Zone ID",ZclDataType.UNSIGNED_8_BIT_INTEGER), + ZONE_STATUS_CHANGE_NOTIFICATION_COMMAND_ZONE_STATUS(0, ZclCommandType.ZONE_STATUS_CHANGE_NOTIFICATION_COMMAND, "Zone Status",ZclDataType.ENUMERATION_16_BIT), + ZONE_STATUS_CHANGE_NOTIFICATION_COMMAND_EXTENDED_STATUS(1, ZclCommandType.ZONE_STATUS_CHANGE_NOTIFICATION_COMMAND, "Extended Status",ZclDataType.ENUMERATION_8_BIT), + ZONE_ENROLL_REQUEST_COMMAND_ZONE_TYPE(0, ZclCommandType.ZONE_ENROLL_REQUEST_COMMAND, "Zone Type",ZclDataType.ENUMERATION_16_BIT), ZONE_ENROLL_REQUEST_COMMAND_MANUFACTURER_CODE(1, ZclCommandType.ZONE_ENROLL_REQUEST_COMMAND, "Manufacturer Code",ZclDataType.UNSIGNED_16_BIT_INTEGER), - ARM_COMMAND_ARM_MODE(0, ZclCommandType.ARM_COMMAND, "Arm Mode",ZclDataType._8_BIT_ENUMERATION), + ARM_COMMAND_ARM_MODE(0, ZclCommandType.ARM_COMMAND, "Arm Mode",ZclDataType.ENUMERATION_8_BIT), BYPASS_COMMAND_NUMBER_OF_ZONES(0, ZclCommandType.BYPASS_COMMAND, "Number of Zones",ZclDataType.UNSIGNED_8_BIT_INTEGER), BYPASS_COMMAND_ZONE_IDS(1, ZclCommandType.BYPASS_COMMAND, "Zone IDs",ZclDataType.N_X_UNSIGNED_8_BIT_INTEGER), GET_ZONE_INFORMATION_COMMAND_ZONE_ID(0, ZclCommandType.GET_ZONE_INFORMATION_COMMAND, "Zone ID",ZclDataType.UNSIGNED_8_BIT_INTEGER), - ARM_RESPONSE_COMMAND_ARM_NOTIFICATION(0, ZclCommandType.ARM_RESPONSE_COMMAND, "Arm Notification",ZclDataType._8_BIT_ENUMERATION), - GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_0(0, ZclCommandType.GET_ZONE_ID_MAP_RESPONSE_COMMAND, "Zone ID Map section 0",ZclDataType._16_BIT_BITMAP), - GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_1(1, ZclCommandType.GET_ZONE_ID_MAP_RESPONSE_COMMAND, "Zone ID Map section 1",ZclDataType._16_BIT_BITMAP), - GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_2(2, ZclCommandType.GET_ZONE_ID_MAP_RESPONSE_COMMAND, "Zone ID Map section 2",ZclDataType._16_BIT_BITMAP), - GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_3(3, ZclCommandType.GET_ZONE_ID_MAP_RESPONSE_COMMAND, "Zone ID Map section 3",ZclDataType._16_BIT_BITMAP), - GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_4(4, ZclCommandType.GET_ZONE_ID_MAP_RESPONSE_COMMAND, "Zone ID Map section 4",ZclDataType._16_BIT_BITMAP), - GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_5(5, ZclCommandType.GET_ZONE_ID_MAP_RESPONSE_COMMAND, "Zone ID Map section 5",ZclDataType._16_BIT_BITMAP), - GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_6(6, ZclCommandType.GET_ZONE_ID_MAP_RESPONSE_COMMAND, "Zone ID Map section 6",ZclDataType._16_BIT_BITMAP), - GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_7(7, ZclCommandType.GET_ZONE_ID_MAP_RESPONSE_COMMAND, "Zone ID Map section 7",ZclDataType._16_BIT_BITMAP), - GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_8(8, ZclCommandType.GET_ZONE_ID_MAP_RESPONSE_COMMAND, "Zone ID Map section 8",ZclDataType._16_BIT_BITMAP), - GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_9(9, ZclCommandType.GET_ZONE_ID_MAP_RESPONSE_COMMAND, "Zone ID Map section 9",ZclDataType._16_BIT_BITMAP), - GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_10(10, ZclCommandType.GET_ZONE_ID_MAP_RESPONSE_COMMAND, "Zone ID Map section 10",ZclDataType._16_BIT_BITMAP), - GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_11(11, ZclCommandType.GET_ZONE_ID_MAP_RESPONSE_COMMAND, "Zone ID Map section 11",ZclDataType._16_BIT_BITMAP), - GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_12(12, ZclCommandType.GET_ZONE_ID_MAP_RESPONSE_COMMAND, "Zone ID Map section 12",ZclDataType._16_BIT_BITMAP), - GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_13(13, ZclCommandType.GET_ZONE_ID_MAP_RESPONSE_COMMAND, "Zone ID Map section 13",ZclDataType._16_BIT_BITMAP), - GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_14(14, ZclCommandType.GET_ZONE_ID_MAP_RESPONSE_COMMAND, "Zone ID Map section 14",ZclDataType._16_BIT_BITMAP), - GET_ZONE_ID_MAP_RESPONSE_COMMAND_ZONE_ID_MAP_SECTION_15(15, ZclCommandType.GET_ZONE_ID_MAP_RESPONSE_COMMAND, "Zone ID Map section 15",ZclDataType._16_BIT_BITMAP), - GET_ZONE_INFORMATION_RESPONSE_COMMAND_ZONE_ID(0, ZclCommandType.GET_ZONE_INFORMATION_RESPONSE_COMMAND, "Zone ID",ZclDataType.UNSIGNED_8_BIT_INTEGER), - GET_ZONE_INFORMATION_RESPONSE_COMMAND_ZONE_TYPE(1, ZclCommandType.GET_ZONE_INFORMATION_RESPONSE_COMMAND, "Zone Type",ZclDataType._16_BIT_ENUMERATION), - GET_ZONE_INFORMATION_RESPONSE_COMMAND_IEEE_ADDRESS(2, ZclCommandType.GET_ZONE_INFORMATION_RESPONSE_COMMAND, "IEEE address",ZclDataType.IEEE_ADDRESS), - START_WARNING_COMMAND_HEADER(0, ZclCommandType.START_WARNING_COMMAND, "Header",ZclDataType._8_BIT_DATA), + ARM_RESPONSE_ARM_NOTIFICATION(0, ZclCommandType.ARM_RESPONSE, "Arm Notification",ZclDataType.ENUMERATION_8_BIT), + GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_0(0, ZclCommandType.GET_ZONE_ID_MAP_RESPONSE, "Zone ID Map section 0",ZclDataType.BITMAP_16_BIT), + GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_1(1, ZclCommandType.GET_ZONE_ID_MAP_RESPONSE, "Zone ID Map section 1",ZclDataType.BITMAP_16_BIT), + GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_2(2, ZclCommandType.GET_ZONE_ID_MAP_RESPONSE, "Zone ID Map section 2",ZclDataType.BITMAP_16_BIT), + GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_3(3, ZclCommandType.GET_ZONE_ID_MAP_RESPONSE, "Zone ID Map section 3",ZclDataType.BITMAP_16_BIT), + GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_4(4, ZclCommandType.GET_ZONE_ID_MAP_RESPONSE, "Zone ID Map section 4",ZclDataType.BITMAP_16_BIT), + GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_5(5, ZclCommandType.GET_ZONE_ID_MAP_RESPONSE, "Zone ID Map section 5",ZclDataType.BITMAP_16_BIT), + GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_6(6, ZclCommandType.GET_ZONE_ID_MAP_RESPONSE, "Zone ID Map section 6",ZclDataType.BITMAP_16_BIT), + GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_7(7, ZclCommandType.GET_ZONE_ID_MAP_RESPONSE, "Zone ID Map section 7",ZclDataType.BITMAP_16_BIT), + GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_8(8, ZclCommandType.GET_ZONE_ID_MAP_RESPONSE, "Zone ID Map section 8",ZclDataType.BITMAP_16_BIT), + GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_9(9, ZclCommandType.GET_ZONE_ID_MAP_RESPONSE, "Zone ID Map section 9",ZclDataType.BITMAP_16_BIT), + GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_10(10, ZclCommandType.GET_ZONE_ID_MAP_RESPONSE, "Zone ID Map section 10",ZclDataType.BITMAP_16_BIT), + GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_11(11, ZclCommandType.GET_ZONE_ID_MAP_RESPONSE, "Zone ID Map section 11",ZclDataType.BITMAP_16_BIT), + GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_12(12, ZclCommandType.GET_ZONE_ID_MAP_RESPONSE, "Zone ID Map section 12",ZclDataType.BITMAP_16_BIT), + GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_13(13, ZclCommandType.GET_ZONE_ID_MAP_RESPONSE, "Zone ID Map section 13",ZclDataType.BITMAP_16_BIT), + GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_14(14, ZclCommandType.GET_ZONE_ID_MAP_RESPONSE, "Zone ID Map section 14",ZclDataType.BITMAP_16_BIT), + GET_ZONE_ID_MAP_RESPONSE_ZONE_ID_MAP_SECTION_15(15, ZclCommandType.GET_ZONE_ID_MAP_RESPONSE, "Zone ID Map section 15",ZclDataType.BITMAP_16_BIT), + GET_ZONE_INFORMATION_RESPONSE_ZONE_ID(0, ZclCommandType.GET_ZONE_INFORMATION_RESPONSE, "Zone ID",ZclDataType.UNSIGNED_8_BIT_INTEGER), + GET_ZONE_INFORMATION_RESPONSE_ZONE_TYPE(1, ZclCommandType.GET_ZONE_INFORMATION_RESPONSE, "Zone Type",ZclDataType.ENUMERATION_16_BIT), + GET_ZONE_INFORMATION_RESPONSE_IEEE_ADDRESS(2, ZclCommandType.GET_ZONE_INFORMATION_RESPONSE, "IEEE address",ZclDataType.IEEE_ADDRESS), + START_WARNING_COMMAND_HEADER(0, ZclCommandType.START_WARNING_COMMAND, "Header",ZclDataType.DATA_8_BIT), START_WARNING_COMMAND_WARNING_DURATION(1, ZclCommandType.START_WARNING_COMMAND, "Warning duration",ZclDataType.UNSIGNED_16_BIT_INTEGER), - SQUAWK_COMMAND_HEADER(0, ZclCommandType.SQUAWK_COMMAND, "Header",ZclDataType._8_BIT_DATA), + SQUAWK_COMMAND_HEADER(0, ZclCommandType.SQUAWK_COMMAND, "Header",ZclDataType.DATA_8_BIT), READ_ATTRIBUTES_COMMAND_IDENTIFIERS(0, ZclCommandType.READ_ATTRIBUTES_COMMAND, "Identifiers",ZclDataType.N_X_ATTRIBUTE_IDENTIFIER), - READ_ATTRIBUTES_RESPONSE_COMMAND_RECORDS(0, ZclCommandType.READ_ATTRIBUTES_RESPONSE_COMMAND, "Records",ZclDataType.N_X_READ_ATTRIBUTE_STATUS_RECORD), + READ_ATTRIBUTES_RESPONSE_RECORDS(0, ZclCommandType.READ_ATTRIBUTES_RESPONSE, "Records",ZclDataType.N_X_READ_ATTRIBUTE_STATUS_RECORD), WRITE_ATTRIBUTES_COMMAND_RECORDS(0, ZclCommandType.WRITE_ATTRIBUTES_COMMAND, "Records",ZclDataType.N_X_WRITE_ATTRIBUTE_RECORD), WRITE_ATTRIBUTES_UNDIVIDED_COMMAND_RECORDS(0, ZclCommandType.WRITE_ATTRIBUTES_UNDIVIDED_COMMAND, "Records",ZclDataType.N_X_WRITE_ATTRIBUTE_RECORD), - WRITE_ATTRIBUTES_RESPONSE_COMMAND_RECORDS(0, ZclCommandType.WRITE_ATTRIBUTES_RESPONSE_COMMAND, "Records",ZclDataType.N_X_WRITE_ATTRIBUTE_STATUS_RECORD), - WRITE_ATTRIBUTES_NO_RESPONSE_COMMAND_RECORDS(0, ZclCommandType.WRITE_ATTRIBUTES_NO_RESPONSE_COMMAND, "Records",ZclDataType.N_X_WRITE_ATTRIBUTE_RECORD), + WRITE_ATTRIBUTES_RESPONSE_RECORDS(0, ZclCommandType.WRITE_ATTRIBUTES_RESPONSE, "Records",ZclDataType.N_X_WRITE_ATTRIBUTE_STATUS_RECORD), + WRITE_ATTRIBUTES_NO_RESPONSE_RECORDS(0, ZclCommandType.WRITE_ATTRIBUTES_NO_RESPONSE, "Records",ZclDataType.N_X_WRITE_ATTRIBUTE_RECORD), CONFIGURE_REPORTING_COMMAND_RECORDS(0, ZclCommandType.CONFIGURE_REPORTING_COMMAND, "Records",ZclDataType.N_X_ATTRIBUTE_REPORTING_CONFIGURATION_RECORD), - CONFIGURE_REPORTING_RESPONSE_COMMAND_RECORDS(0, ZclCommandType.CONFIGURE_REPORTING_RESPONSE_COMMAND, "Records",ZclDataType.N_X_ATTRIBUTE_STATUS_RECORD), + CONFIGURE_REPORTING_RESPONSE_RECORDS(0, ZclCommandType.CONFIGURE_REPORTING_RESPONSE, "Records",ZclDataType.N_X_ATTRIBUTE_STATUS_RECORD), READ_REPORTING_CONFIGURATION_COMMAND_RECORDS(0, ZclCommandType.READ_REPORTING_CONFIGURATION_COMMAND, "Records",ZclDataType.N_X_ATTRIBUTE_RECORD), - READ_REPORTING_CONFIGURATION_RESPONSE_COMMAND_RECORDS(0, ZclCommandType.READ_REPORTING_CONFIGURATION_RESPONSE_COMMAND, "Records",ZclDataType.N_X_ATTRIBUTE_REPORTING_CONFIGURATION_RECORD), + READ_REPORTING_CONFIGURATION_RESPONSE_RECORDS(0, ZclCommandType.READ_REPORTING_CONFIGURATION_RESPONSE, "Records",ZclDataType.N_X_ATTRIBUTE_REPORTING_CONFIGURATION_RECORD), REPORT_ATTRIBUTES_COMMAND_REPORTS(0, ZclCommandType.REPORT_ATTRIBUTES_COMMAND, "Reports",ZclDataType.N_X_ATTRIBUTE_REPORT), - DEFAULT_RESPONSE_COMMAND_COMMAND_IDENTIFIER(0, ZclCommandType.DEFAULT_RESPONSE_COMMAND, "Command identifier",ZclDataType.UNSIGNED_8_BIT_INTEGER), - DEFAULT_RESPONSE_COMMAND_STATUS_CODE(1, ZclCommandType.DEFAULT_RESPONSE_COMMAND, "Status code",ZclDataType._8_BIT_ENUMERATION), + DEFAULT_RESPONSE_COMMAND_IDENTIFIER(0, ZclCommandType.DEFAULT_RESPONSE, "Command identifier",ZclDataType.UNSIGNED_8_BIT_INTEGER), + DEFAULT_RESPONSE_STATUS_CODE(1, ZclCommandType.DEFAULT_RESPONSE, "Status code",ZclDataType.ENUMERATION_8_BIT), DISCOVER_ATTRIBUTES_COMMAND_START_ATTRIBUTE_IDENTIFIER(0, ZclCommandType.DISCOVER_ATTRIBUTES_COMMAND, "Start attribute identifier",ZclDataType.UNSIGNED_16_BIT_INTEGER), DISCOVER_ATTRIBUTES_COMMAND_MAXIMUM_ATTRIBUTE_IDENTIFIERS(1, ZclCommandType.DISCOVER_ATTRIBUTES_COMMAND, "Maximum attribute identifiers",ZclDataType.UNSIGNED_8_BIT_INTEGER), - DISCOVER_ATTRIBUTES_RESPONSE_COMMAND_COMMAND_IDENTIFIER(0, ZclCommandType.DISCOVER_ATTRIBUTES_RESPONSE_COMMAND, "Command identifier",ZclDataType.BOOLEAN), - DISCOVER_ATTRIBUTES_RESPONSE_COMMAND_INFORMATION(1, ZclCommandType.DISCOVER_ATTRIBUTES_RESPONSE_COMMAND, "Information",ZclDataType.N_X_ATTRIBUTE_INFORMATION), + DISCOVER_ATTRIBUTES_RESPONSE_COMMAND_IDENTIFIER(0, ZclCommandType.DISCOVER_ATTRIBUTES_RESPONSE, "Command identifier",ZclDataType.BOOLEAN), + DISCOVER_ATTRIBUTES_RESPONSE_INFORMATION(1, ZclCommandType.DISCOVER_ATTRIBUTES_RESPONSE, "Information",ZclDataType.N_X_ATTRIBUTE_INFORMATION), READ_ATTRIBUTES_STRUCTURED_COMMAND_ATTRIBUTE_SELECTORS(0, ZclCommandType.READ_ATTRIBUTES_STRUCTURED_COMMAND, "Attribute selectors",ZclDataType.N_X_ATTRIBUTE_SELECTOR), WRITE_ATTRIBUTES_STRUCTURED_COMMAND_ATTRIBUTE_SELECTORS(0, ZclCommandType.WRITE_ATTRIBUTES_STRUCTURED_COMMAND, "Attribute selectors",ZclDataType.N_X_ATTRIBUTE_SELECTOR), - WRITE_ATTRIBUTES_STRUCTURED_RESPONSE_COMMAND_RECORDS(0, ZclCommandType.WRITE_ATTRIBUTES_STRUCTURED_RESPONSE_COMMAND, "Records",ZclDataType.N_X_WRITE_ATTRIBUTE_STATUS_RECORD); + WRITE_ATTRIBUTES_STRUCTURED_RESPONSE_RECORDS(0, ZclCommandType.WRITE_ATTRIBUTES_STRUCTURED_RESPONSE, "Records",ZclDataType.N_X_WRITE_ATTRIBUTE_STATUS_RECORD); private final int id; private final ZclCommandType commandType; diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/groups/RemoveAllGroupsCommand.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/groups/RemoveAllGroupsCommand.java deleted file mode 100644 index 578186210..000000000 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/groups/RemoveAllGroupsCommand.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.bubblecloud.zigbee.v3.zcl.protocol.command.groups; - -import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage; -import org.bubblecloud.zigbee.v3.zcl.ZclCommand; -import org.bubblecloud.zigbee.v3.zcl.protocol.ZclCommandType; - - -/** - * Code generated Remove All Groups Command value object class. - */ -public class RemoveAllGroupsCommand extends ZclCommand { - - /** - * Default constructor setting the command type field. - */ - public RemoveAllGroupsCommand() { - this.setType(ZclCommandType.REMOVE_ALL_GROUPS_COMMAND); - } - - /** - * Constructor copying field values from command message. - * @param message the command message - */ - public RemoveAllGroupsCommand(final ZclCommandMessage message) { - super(message); - } - - @Override - public ZclCommandMessage toCommandMessage() { - final ZclCommandMessage message = super.toCommandMessage(); - return message; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(); - builder.append(super.toString()); - return builder.toString(); - } - -} diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/ZdoRequest.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/ZdoRequest.java similarity index 84% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/ZdoRequest.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/ZdoRequest.java index 9be99fde6..f8174d4d9 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/ZdoRequest.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/ZdoRequest.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3; +package org.bubblecloud.zigbee.v3.zdo; /** * Common interface for response commands.. diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/ZdoResponse.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/ZdoResponse.java similarity index 88% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/ZdoResponse.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/ZdoResponse.java index 8fb1a90a9..36d8f1723 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/ZdoResponse.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/ZdoResponse.java @@ -1,4 +1,4 @@ -package org.bubblecloud.zigbee.v3; +package org.bubblecloud.zigbee.v3.zdo; /** * Common interface for response commands.. diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/ZdoResponseMatcher.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/ZdoResponseMatcher.java similarity index 53% rename from zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/ZdoResponseMatcher.java rename to zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/ZdoResponseMatcher.java index 366bf042f..c7aa193c2 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/ZdoResponseMatcher.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/ZdoResponseMatcher.java @@ -1,7 +1,13 @@ -package org.bubblecloud.zigbee.v3; +package org.bubblecloud.zigbee.v3.zdo; + +import org.bubblecloud.zigbee.v3.Command; +import org.bubblecloud.zigbee.v3.CommandResponseMatcher; /** - * The ZCL response matcher. + * The ZDO response matcher. + * + * The matcher will return true if the the response packet is a {@link ZdoResponse} + * and the response source address matches the destination of the request. */ public class ZdoResponseMatcher implements CommandResponseMatcher { diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/ActiveEndpointsRequest.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/ActiveEndpointsRequest.java index aeb929cb6..6b286c621 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/ActiveEndpointsRequest.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/ActiveEndpointsRequest.java @@ -1,7 +1,7 @@ package org.bubblecloud.zigbee.v3.zdo.command; import org.bubblecloud.zigbee.v3.zdo.ZdoCommand; -import org.bubblecloud.zigbee.v3.ZdoRequest; +import org.bubblecloud.zigbee.v3.zdo.ZdoRequest; /** * Created by tlaukkan on 6/9/2016. diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/ActiveEndpointsResponse.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/ActiveEndpointsResponse.java index f2dc0dedb..d1d363426 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/ActiveEndpointsResponse.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/ActiveEndpointsResponse.java @@ -1,7 +1,7 @@ package org.bubblecloud.zigbee.v3.zdo.command; import org.bubblecloud.zigbee.v3.zdo.ZdoCommand; -import org.bubblecloud.zigbee.v3.ZdoResponse; +import org.bubblecloud.zigbee.v3.zdo.ZdoResponse; import java.util.Arrays; diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/BindRequest.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/BindRequest.java index c55117805..c005e5d82 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/BindRequest.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/BindRequest.java @@ -1,7 +1,7 @@ package org.bubblecloud.zigbee.v3.zdo.command; import org.bubblecloud.zigbee.v3.zdo.ZdoCommand; -import org.bubblecloud.zigbee.v3.ZdoRequest; +import org.bubblecloud.zigbee.v3.zdo.ZdoRequest; /** * BindRequest. diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/BindResponse.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/BindResponse.java index 18fd69654..5d1a69957 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/BindResponse.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/BindResponse.java @@ -1,7 +1,7 @@ package org.bubblecloud.zigbee.v3.zdo.command; import org.bubblecloud.zigbee.v3.zdo.ZdoCommand; -import org.bubblecloud.zigbee.v3.ZdoResponse; +import org.bubblecloud.zigbee.v3.zdo.ZdoResponse; /** * BindResponse. diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/IeeeAddressRequest.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/IeeeAddressRequest.java index 345714211..816632703 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/IeeeAddressRequest.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/IeeeAddressRequest.java @@ -1,7 +1,7 @@ package org.bubblecloud.zigbee.v3.zdo.command; import org.bubblecloud.zigbee.v3.zdo.ZdoCommand; -import org.bubblecloud.zigbee.v3.ZdoRequest; +import org.bubblecloud.zigbee.v3.zdo.ZdoRequest; /** * IeeeAddressRequest. diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/IeeeAddressResponse.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/IeeeAddressResponse.java index 64c2915c2..da989e8e9 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/IeeeAddressResponse.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/IeeeAddressResponse.java @@ -1,7 +1,7 @@ package org.bubblecloud.zigbee.v3.zdo.command; import org.bubblecloud.zigbee.v3.zdo.ZdoCommand; -import org.bubblecloud.zigbee.v3.ZdoResponse; +import org.bubblecloud.zigbee.v3.zdo.ZdoResponse; import java.util.Arrays; diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/ManagementLqiRequest.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/ManagementLqiRequest.java index 12d1aeebe..d31b67adf 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/ManagementLqiRequest.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/ManagementLqiRequest.java @@ -1,7 +1,7 @@ package org.bubblecloud.zigbee.v3.zdo.command; import org.bubblecloud.zigbee.v3.zdo.ZdoCommand; -import org.bubblecloud.zigbee.v3.ZdoRequest; +import org.bubblecloud.zigbee.v3.zdo.ZdoRequest; /** * ManagementLqiRequest. diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/ManagementLqiResponse.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/ManagementLqiResponse.java index 5a6e280d3..1ba5a82fb 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/ManagementLqiResponse.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/ManagementLqiResponse.java @@ -1,7 +1,7 @@ package org.bubblecloud.zigbee.v3.zdo.command; import org.bubblecloud.zigbee.v3.zdo.ZdoCommand; -import org.bubblecloud.zigbee.v3.ZdoResponse; +import org.bubblecloud.zigbee.v3.zdo.ZdoResponse; import java.util.Arrays; diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/ManagementPermitJoinRequest.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/ManagementPermitJoinRequest.java index 53d95bba1..01d3033c4 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/ManagementPermitJoinRequest.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/ManagementPermitJoinRequest.java @@ -1,7 +1,7 @@ package org.bubblecloud.zigbee.v3.zdo.command; import org.bubblecloud.zigbee.v3.zdo.ZdoCommand; -import org.bubblecloud.zigbee.v3.ZdoRequest; +import org.bubblecloud.zigbee.v3.zdo.ZdoRequest; /** * ManagementPermitJoinRequest. @@ -16,7 +16,7 @@ public class ManagementPermitJoinRequest extends ZdoCommand implements ZdoReques */ private int destinationAddress; /** - * Dduration to permit joining. 0 = join disabled. 0xff = join enabled. 0x01-0xfe = number of seconds to permit joining. + * Duration to permit joining. 0 = join disabled. 0xff = join enabled. 0x01-0xfe = number of seconds to permit joining. */ private int duration; /** diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/ManagementPermitJoinResponse.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/ManagementPermitJoinResponse.java index 8ccbbee76..22c8c6baa 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/ManagementPermitJoinResponse.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/ManagementPermitJoinResponse.java @@ -1,7 +1,7 @@ package org.bubblecloud.zigbee.v3.zdo.command; import org.bubblecloud.zigbee.v3.zdo.ZdoCommand; -import org.bubblecloud.zigbee.v3.ZdoResponse; +import org.bubblecloud.zigbee.v3.zdo.ZdoResponse; /** * ManagementPermitJoinResponse. diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/NodeDescriptorRequest.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/NodeDescriptorRequest.java index 297ce2e41..cca298ecf 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/NodeDescriptorRequest.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/NodeDescriptorRequest.java @@ -1,7 +1,7 @@ package org.bubblecloud.zigbee.v3.zdo.command; import org.bubblecloud.zigbee.v3.zdo.ZdoCommand; -import org.bubblecloud.zigbee.v3.ZdoRequest; +import org.bubblecloud.zigbee.v3.zdo.ZdoRequest; /** * NodeDescriptorRequest. diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/NodeDescriptorResponse.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/NodeDescriptorResponse.java index a7140acb3..1bb7bd6e4 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/NodeDescriptorResponse.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/NodeDescriptorResponse.java @@ -1,7 +1,7 @@ package org.bubblecloud.zigbee.v3.zdo.command; import org.bubblecloud.zigbee.v3.zdo.ZdoCommand; -import org.bubblecloud.zigbee.v3.ZdoResponse; +import org.bubblecloud.zigbee.v3.zdo.ZdoResponse; /** * NodeDescriptorResponse. diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/SimpleDescriptorRequest.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/SimpleDescriptorRequest.java index 84b700ee7..db0c61c97 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/SimpleDescriptorRequest.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/SimpleDescriptorRequest.java @@ -1,7 +1,7 @@ package org.bubblecloud.zigbee.v3.zdo.command; import org.bubblecloud.zigbee.v3.zdo.ZdoCommand; -import org.bubblecloud.zigbee.v3.ZdoRequest; +import org.bubblecloud.zigbee.v3.zdo.ZdoRequest; /** * SimpleDescriptorRequest diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/SimpleDescriptorResponse.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/SimpleDescriptorResponse.java index 708b636c9..e1b0a47c6 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/SimpleDescriptorResponse.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/SimpleDescriptorResponse.java @@ -1,7 +1,7 @@ package org.bubblecloud.zigbee.v3.zdo.command; import org.bubblecloud.zigbee.v3.zdo.ZdoCommand; -import org.bubblecloud.zigbee.v3.ZdoResponse; +import org.bubblecloud.zigbee.v3.zdo.ZdoResponse; import java.util.Arrays; diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/UnbindRequest.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/UnbindRequest.java index b44c006ac..1d2bf65a4 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/UnbindRequest.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/UnbindRequest.java @@ -1,7 +1,7 @@ package org.bubblecloud.zigbee.v3.zdo.command; import org.bubblecloud.zigbee.v3.zdo.ZdoCommand; -import org.bubblecloud.zigbee.v3.ZdoRequest; +import org.bubblecloud.zigbee.v3.zdo.ZdoRequest; /** * UnbindRequest. diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/UnbindResponse.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/UnbindResponse.java index 315ee4602..e2f147adb 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/UnbindResponse.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/UnbindResponse.java @@ -1,7 +1,7 @@ package org.bubblecloud.zigbee.v3.zdo.command; import org.bubblecloud.zigbee.v3.zdo.ZdoCommand; -import org.bubblecloud.zigbee.v3.ZdoResponse; +import org.bubblecloud.zigbee.v3.zdo.ZdoResponse; /** * UnbindResponse. diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/UserDescriptorConfiguration.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/UserDescriptorConfiguration.java index 0625730ea..26ae12594 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/UserDescriptorConfiguration.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/UserDescriptorConfiguration.java @@ -1,7 +1,7 @@ package org.bubblecloud.zigbee.v3.zdo.command; import org.bubblecloud.zigbee.v3.zdo.ZdoCommand; -import org.bubblecloud.zigbee.v3.ZdoResponse; +import org.bubblecloud.zigbee.v3.zdo.ZdoResponse; /** * User Descriptor Configuration. diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/UserDescriptorRequest.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/UserDescriptorRequest.java index 975ad8e0f..dae6aa4aa 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/UserDescriptorRequest.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/UserDescriptorRequest.java @@ -1,7 +1,7 @@ package org.bubblecloud.zigbee.v3.zdo.command; import org.bubblecloud.zigbee.v3.zdo.ZdoCommand; -import org.bubblecloud.zigbee.v3.ZdoRequest; +import org.bubblecloud.zigbee.v3.zdo.ZdoRequest; /** * UserDescriptorRequest. diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/UserDescriptorResponse.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/UserDescriptorResponse.java index d109b8bba..ee2497994 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/UserDescriptorResponse.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/UserDescriptorResponse.java @@ -1,7 +1,7 @@ package org.bubblecloud.zigbee.v3.zdo.command; import org.bubblecloud.zigbee.v3.zdo.ZdoCommand; -import org.bubblecloud.zigbee.v3.ZdoResponse; +import org.bubblecloud.zigbee.v3.zdo.ZdoResponse; /** * Created by tlaukkan on 6/9/2016. diff --git a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/UserDescriptorSet.java b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/UserDescriptorSet.java index f519648dd..60c9ae2ff 100644 --- a/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/UserDescriptorSet.java +++ b/zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zdo/command/UserDescriptorSet.java @@ -1,7 +1,7 @@ package org.bubblecloud.zigbee.v3.zdo.command; import org.bubblecloud.zigbee.v3.zdo.ZdoCommand; -import org.bubblecloud.zigbee.v3.ZdoRequest; +import org.bubblecloud.zigbee.v3.zdo.ZdoRequest; /** * UserDescriptorSet. diff --git a/zigbee-common/src/test/java/org/bubblecloud/zigbee/v3/zcl/ZclCommandProtocolTest.java b/zigbee-common/src/test/java/org/bubblecloud/zigbee/v3/zcl/ZclCommandProtocolTest.java index 579e272dc..bf26f1050 100644 --- a/zigbee-common/src/test/java/org/bubblecloud/zigbee/v3/zcl/ZclCommandProtocolTest.java +++ b/zigbee-common/src/test/java/org/bubblecloud/zigbee/v3/zcl/ZclCommandProtocolTest.java @@ -1,14 +1,26 @@ package org.bubblecloud.zigbee.v3.zcl; import org.bubblecloud.zigbee.v3.model.ZigBeeType; +import org.bubblecloud.zigbee.v3.zcl.clusters.doorlock.LockDoorCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.doorlock.UnlockDoorCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.ConfigureReportingCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.ConfigureReportingResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.DiscoverAttributesCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.DiscoverAttributesResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.ReadAttributesCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.ReadAttributesResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.ReadReportingConfigurationCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.ReadReportingConfigurationResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.ReportAttributesCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.WriteAttributesCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.WriteAttributesNoResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.WriteAttributesResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.WriteAttributesUndividedCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.groups.GetGroupMembershipCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.iasace.BypassCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.rssilocation.ReportRssiMeasurementsCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.scenes.AddSceneCommand; import org.bubblecloud.zigbee.v3.zcl.field.*; -import org.bubblecloud.zigbee.v3.zcl.protocol.command.door.lock.LockDoorCommand; -import org.bubblecloud.zigbee.v3.zcl.protocol.command.door.lock.UnlockDoorCommand; -import org.bubblecloud.zigbee.v3.zcl.protocol.command.general.*; -import org.bubblecloud.zigbee.v3.zcl.protocol.command.groups.GetGroupMembershipCommand; -import org.bubblecloud.zigbee.v3.zcl.protocol.command.ias.ace.BypassCommand; -import org.bubblecloud.zigbee.v3.zcl.protocol.command.rssi.location.ReportRssiMeasurementsCommand; -import org.bubblecloud.zigbee.v3.zcl.protocol.command.scenes.AddSceneCommand; import org.codehaus.jackson.map.ObjectMapper; import org.junit.Assert; import org.junit.Test; @@ -46,7 +58,7 @@ public void testDiscoverAttributesCommand() throws Exception { @Test public void testDiscoverAttributesResponseCommand() throws Exception { - final DiscoverAttributesResponseCommand command = new DiscoverAttributesResponseCommand(); + final DiscoverAttributesResponse command = new DiscoverAttributesResponse(); command.setCommandIdentifier(true); final List list = new ArrayList(); final AttributeInformation data = new AttributeInformation(); @@ -70,7 +82,7 @@ public void testReadAttributesCommand() throws Exception { @Test public void testReadAttributesResponseCommand() throws Exception { - final ReadAttributesResponseCommand command = new ReadAttributesResponseCommand(); + final ReadAttributesResponse command = new ReadAttributesResponse(); final List list = new ArrayList(); final ReadAttributeStatusRecord data = new ReadAttributeStatusRecord(); data.setAttributeIdentifier(1); @@ -110,7 +122,7 @@ public void testWriteAttributesUndividedCommand() throws Exception { @Test public void testWriteAttributesNoResponseCommand() throws Exception { - final WriteAttributesNoResponseCommand command = new WriteAttributesNoResponseCommand(); + final WriteAttributesNoResponse command = new WriteAttributesNoResponse(); final List list = new ArrayList(); final WriteAttributeRecord data = new WriteAttributeRecord(); data.setAttributeIdentifier(1); @@ -123,7 +135,7 @@ public void testWriteAttributesNoResponseCommand() throws Exception { @Test public void testWriteAttributesResponseCommand() throws Exception { - final WriteAttributesResponseCommand command = new WriteAttributesResponseCommand(); + final WriteAttributesResponse command = new WriteAttributesResponse(); final List list = new ArrayList(); final WriteAttributeStatusRecord data = new WriteAttributeStatusRecord(); data.setStatus(1); @@ -151,7 +163,7 @@ public void testConfigureReportingCommand() throws Exception { @Test public void testConfigureReportingResponseCommand() throws Exception { - final ConfigureReportingResponseCommand command = new ConfigureReportingResponseCommand(); + final ConfigureReportingResponse command = new ConfigureReportingResponse(); final List list = new ArrayList(); final AttributeStatusRecord data = new AttributeStatusRecord(); data.setStatus(0); @@ -176,7 +188,7 @@ public void testReadReportingConfigurationCommand() throws Exception { @Test public void testReadReportingConfigurationResponseCommand() throws Exception { - final ReadReportingConfigurationResponseCommand command = new ReadReportingConfigurationResponseCommand(); + final ReadReportingConfigurationResponse command = new ReadReportingConfigurationResponse(); final List list = new ArrayList(); final AttributeReportingConfigurationRecord data = new AttributeReportingConfigurationRecord(); data.setAttributeIdentifier(1); diff --git a/zigbee-gateway-client/src/test/java/org/bubblecloud/zigbee/ZigBeeGatewayClientTest.java b/zigbee-gateway-client/src/test/java/org/bubblecloud/zigbee/ZigBeeGatewayClientTest.java index 7848062bf..b6fb128dd 100644 --- a/zigbee-gateway-client/src/test/java/org/bubblecloud/zigbee/ZigBeeGatewayClientTest.java +++ b/zigbee-gateway-client/src/test/java/org/bubblecloud/zigbee/ZigBeeGatewayClientTest.java @@ -1,8 +1,8 @@ package org.bubblecloud.zigbee; import org.bubblecloud.zigbee.v3.ZigBeeGatewayClient; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.ReadAttributesCommand; import org.bubblecloud.zigbee.v3.zcl.field.AttributeIdentifier; -import org.bubblecloud.zigbee.v3.zcl.protocol.command.general.ReadAttributesCommand; import org.bubblecloud.zigbee.v3.Command; import org.junit.Assert; import org.bubblecloud.zigbee.v3.CommandListener; diff --git a/zigbee-gateway-server/src/main/java/org/bubblecloud/zigbee/v3/ZigBeeGateway.java b/zigbee-gateway-server/src/main/java/org/bubblecloud/zigbee/v3/ZigBeeGateway.java index edbb13167..140003a96 100644 --- a/zigbee-gateway-server/src/main/java/org/bubblecloud/zigbee/v3/ZigBeeGateway.java +++ b/zigbee-gateway-server/src/main/java/org/bubblecloud/zigbee/v3/ZigBeeGateway.java @@ -8,13 +8,13 @@ import org.bubblecloud.zigbee.v3.model.Status; import org.bubblecloud.zigbee.v3.model.ZigBeeType; import org.bubblecloud.zigbee.v3.model.ZToolAddress64; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.ConfigureReportingResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.ReadAttributesResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.ReportAttributesCommand; +import org.bubblecloud.zigbee.v3.zcl.clusters.general.WriteAttributesResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.groups.GetGroupMembershipResponse; +import org.bubblecloud.zigbee.v3.zcl.clusters.groups.ViewGroupResponse; import org.bubblecloud.zigbee.v3.zcl.field.Unsigned16BitInteger; -import org.bubblecloud.zigbee.v3.zcl.protocol.command.general.ConfigureReportingResponseCommand; -import org.bubblecloud.zigbee.v3.zcl.protocol.command.general.ReadAttributesResponseCommand; -import org.bubblecloud.zigbee.v3.zcl.protocol.command.general.ReportAttributesCommand; -import org.bubblecloud.zigbee.v3.zcl.protocol.command.general.WriteAttributesResponseCommand; -import org.bubblecloud.zigbee.v3.zcl.protocol.command.groups.GetGroupMembershipResponseCommand; -import org.bubblecloud.zigbee.v3.zcl.protocol.command.groups.ViewGroupResponseCommand; import java.io.BufferedReader; import java.io.IOException; @@ -199,7 +199,7 @@ public void processArgs(final String[] args, final PrintStream out) { } } - public ZigBeeApiDongleImpl getZigBeeApi() { + public ZigBeeApi getZigBeeApi() { return zigBeeApi; } @@ -269,7 +269,7 @@ private String getDeviceSummary(final ZigBeeDevice device) { * @param destinationIdentifier the device identifier or group ID * @return the device */ - private ZigBeeDestination getDestination(final ZigBeeApiDongleImpl zigbeeApi, final String destinationIdentifier + private ZigBeeDestination getDestination(final ZigBeeApi zigbeeApi, final String destinationIdentifier ,final PrintStream out) { final ZigBeeDevice device = getDevice(zigbeeApi, destinationIdentifier); @@ -301,7 +301,7 @@ private ZigBeeDestination getDestination(final ZigBeeApiDongleImpl zigbeeApi, fi * @param deviceIdentifier the device identifier * @return the device */ - private ZigBeeDevice getDevice(ZigBeeApiDongleImpl zigbeeApi, final String deviceIdentifier) { + private ZigBeeDevice getDevice(ZigBeeApi zigbeeApi, final String deviceIdentifier) { for (final ZigBeeDevice zigBeeDevice : zigbeeApi.getNetworkState().getDevices()) { if (deviceIdentifier.equals(zigBeeDevice.getNetworkAddress() + "/" + zigBeeDevice.getEndpoint())) { return zigBeeDevice; @@ -1171,7 +1171,7 @@ public boolean process(final ZigBeeApiDongleImpl zigbeeApi, final String[] args, final CommandResult result = zigbeeApi.report(device, clusterId, attributeId, minInterval, maxInterval, reportableChange).get(); if (result.isSuccess()) { - final ConfigureReportingResponseCommand response = result.getResponse(); + final ConfigureReportingResponse response = result.getResponse(); final int statusCode = response.getRecords().get(0).getStatus(); if (statusCode == 0) { out.println("Attribute value configure reporting success."); @@ -1235,7 +1235,7 @@ public boolean process(final ZigBeeApiDongleImpl zigbeeApi, final String[] args, final CommandResult result = zigbeeApi.report(device, clusterId, attributeId, 0, 0xffff, reportableChange).get(); if (result.isSuccess()) { - final ConfigureReportingResponseCommand response = result.getResponse(); + final ConfigureReportingResponse response = result.getResponse(); final int statusCode = response.getRecords().get(0).getStatus(); if (statusCode == 0) { out.println("Attribute value configure reporting success."); @@ -1299,7 +1299,7 @@ public boolean process(final ZigBeeApiDongleImpl zigbeeApi, final String[] args, final CommandResult result = zigbeeApi.read(device, clusterId, attributeId).get(); if (result.isSuccess()) { - final ReadAttributesResponseCommand response = result.getResponse(); + final ReadAttributesResponse response = result.getResponse(); final int statusCode = response.getRecords().get(0).getStatus(); if (statusCode == 0) { @@ -1369,7 +1369,7 @@ public boolean process(final ZigBeeApiDongleImpl zigbeeApi, final String[] args, final CommandResult result = zigbeeApi.write(device, clusterId, attributeId, value).get(); if (result.isSuccess()) { - final WriteAttributesResponseCommand response = result.getResponse(); + final WriteAttributesResponse response = result.getResponse(); final int statusCode = response.getRecords().get(0).getStatus(); if (statusCode == 0) { out.println("Attribute value write success."); @@ -1795,7 +1795,7 @@ public boolean process(final ZigBeeApiDongleImpl zigbeeApi, final String[] args, final CommandResult result = zigbeeApi.viewMembership(device, groupId).get(); if (result.isSuccess()) { - final ViewGroupResponseCommand response = result.getResponse(); + final ViewGroupResponse response = result.getResponse(); final int statusCode = response.getStatus(); if (statusCode == 0) { out.println("Group name: " + response.getGroupName()); @@ -1843,9 +1843,8 @@ public boolean process(final ZigBeeApiDongleImpl zigbeeApi, final String[] args, } final CommandResult result = zigbeeApi.getGroupMemberships(device).get(); - if (result.isSuccess()) { - final GetGroupMembershipResponseCommand response = result.getResponse(); + final GetGroupMembershipResponse response = result.getResponse(); out.print("Member of groups:"); for (final Unsigned16BitInteger value : response.getGroupList()) { out.print(' '); diff --git a/zigbee-gateway-server/src/main/java/org/bubblecloud/zigbee/v3/ZigBeeGatewayMain.java b/zigbee-gateway-server/src/main/java/org/bubblecloud/zigbee/v3/ZigBeeGatewayMain.java index 7c580cbea..0da427886 100644 --- a/zigbee-gateway-server/src/main/java/org/bubblecloud/zigbee/v3/ZigBeeGatewayMain.java +++ b/zigbee-gateway-server/src/main/java/org/bubblecloud/zigbee/v3/ZigBeeGatewayMain.java @@ -23,7 +23,7 @@ public class ZigBeeGatewayMain { /** * The usage. */ - public static final String USAGE = "Syntax: java -jar zigbee4java-serialPort.jar SERIALPORT CHANNEL PAN RESET" + + public static final String USAGE = "Syntax: java -jar zigbee4java-serialPort.jar SERIALPORT CHANNEL PAN NETWORK_KEY RESET" + " [HTTP(S) PORT] [AUTHORIZATION TOKEN] [KEYSTORE] [SSLPROTOCOL1,SSLPROTOCOL2...]"; /**