diff --git a/com.zsmartsystems.zigbee.dongle.cc2531/src/test/java/com/zsmartsystems/zigbee/dongle/cc2531/Cc2351TestPacket.java b/com.zsmartsystems.zigbee.dongle.cc2531/src/test/java/com/zsmartsystems/zigbee/dongle/cc2531/Cc2351TestPacket.java index 044945874..aecbcfe8c 100644 --- a/com.zsmartsystems.zigbee.dongle.cc2531/src/test/java/com/zsmartsystems/zigbee/dongle/cc2531/Cc2351TestPacket.java +++ b/com.zsmartsystems.zigbee.dongle.cc2531/src/test/java/com/zsmartsystems/zigbee/dongle/cc2531/Cc2351TestPacket.java @@ -111,13 +111,5 @@ public boolean open(int baudRate, FlowControl flowControl) { @Override public void purgeRxBuffer() { } - - @Override - public void setDtr(boolean state) { - } - - @Override - public void setRts(boolean state) { - } } } diff --git a/com.zsmartsystems.zigbee.dongle.ember/src/test/java/com/zsmartsystems/zigbee/dongle/ember/internal/EmberFirmwareUpdateHandlerTest.java b/com.zsmartsystems.zigbee.dongle.ember/src/test/java/com/zsmartsystems/zigbee/dongle/ember/internal/EmberFirmwareUpdateHandlerTest.java index 8a4605b56..2b3419ed9 100644 --- a/com.zsmartsystems.zigbee.dongle.ember/src/test/java/com/zsmartsystems/zigbee/dongle/ember/internal/EmberFirmwareUpdateHandlerTest.java +++ b/com.zsmartsystems.zigbee.dongle.ember/src/test/java/com/zsmartsystems/zigbee/dongle/ember/internal/EmberFirmwareUpdateHandlerTest.java @@ -202,14 +202,6 @@ public boolean open(int baudRate, FlowControl flowControl) { public void purgeRxBuffer() { } - @Override - public void setDtr(boolean state) { - } - - @Override - public void setRts(boolean state) { - } - public byte[] getOutput() { return Arrays.copyOfRange(output, 0, cnt); } diff --git a/com.zsmartsystems.zigbee.dongle.ember/src/test/java/com/zsmartsystems/zigbee/dongle/ember/internal/ash/AshFrameHandlerTest.java b/com.zsmartsystems.zigbee.dongle.ember/src/test/java/com/zsmartsystems/zigbee/dongle/ember/internal/ash/AshFrameHandlerTest.java index 62b294eec..d35af6d74 100644 --- a/com.zsmartsystems.zigbee.dongle.ember/src/test/java/com/zsmartsystems/zigbee/dongle/ember/internal/ash/AshFrameHandlerTest.java +++ b/com.zsmartsystems.zigbee.dongle.ember/src/test/java/com/zsmartsystems/zigbee/dongle/ember/internal/ash/AshFrameHandlerTest.java @@ -206,14 +206,6 @@ public boolean open(int baudRate, FlowControl flowControl) { public void purgeRxBuffer() { } - @Override - public void setDtr(boolean state) { - } - - @Override - public void setRts(boolean state) { - } - public List getOutputData() { return outputData; } diff --git a/com.zsmartsystems.zigbee.dongle.ember/src/test/java/com/zsmartsystems/zigbee/dongle/ember/internal/spi/SpiFrameHandlerTest.java b/com.zsmartsystems.zigbee.dongle.ember/src/test/java/com/zsmartsystems/zigbee/dongle/ember/internal/spi/SpiFrameHandlerTest.java index 6a71caa1d..fe3df70a9 100644 --- a/com.zsmartsystems.zigbee.dongle.ember/src/test/java/com/zsmartsystems/zigbee/dongle/ember/internal/spi/SpiFrameHandlerTest.java +++ b/com.zsmartsystems.zigbee.dongle.ember/src/test/java/com/zsmartsystems/zigbee/dongle/ember/internal/spi/SpiFrameHandlerTest.java @@ -354,13 +354,5 @@ public boolean open(int baudRate, FlowControl flowControl) { @Override public void purgeRxBuffer() { } - - @Override - public void setDtr(boolean state) { - } - - @Override - public void setRts(boolean state) { - } } } diff --git a/com.zsmartsystems.zigbee.dongle.telegesis/src/test/java/com/zsmartsystems/zigbee/dongle/telegesis/internal/TelegesisFirmwareUpdateHandlerTest.java b/com.zsmartsystems.zigbee.dongle.telegesis/src/test/java/com/zsmartsystems/zigbee/dongle/telegesis/internal/TelegesisFirmwareUpdateHandlerTest.java index 7ffca8f6a..1781a584a 100644 --- a/com.zsmartsystems.zigbee.dongle.telegesis/src/test/java/com/zsmartsystems/zigbee/dongle/telegesis/internal/TelegesisFirmwareUpdateHandlerTest.java +++ b/com.zsmartsystems.zigbee.dongle.telegesis/src/test/java/com/zsmartsystems/zigbee/dongle/telegesis/internal/TelegesisFirmwareUpdateHandlerTest.java @@ -203,14 +203,6 @@ public boolean open(int baudRate, FlowControl flowControl) { public void purgeRxBuffer() { } - @Override - public void setDtr(boolean state) { - } - - @Override - public void setRts(boolean state) { - } - public byte[] getOutput() { return Arrays.copyOfRange(output, 0, cnt); } diff --git a/com.zsmartsystems.zigbee.dongle.telegesis/src/test/java/com/zsmartsystems/zigbee/dongle/telegesis/internal/TelegesisFrameHandlerTest.java b/com.zsmartsystems.zigbee.dongle.telegesis/src/test/java/com/zsmartsystems/zigbee/dongle/telegesis/internal/TelegesisFrameHandlerTest.java index 57ed8c165..c053c3c9a 100644 --- a/com.zsmartsystems.zigbee.dongle.telegesis/src/test/java/com/zsmartsystems/zigbee/dongle/telegesis/internal/TelegesisFrameHandlerTest.java +++ b/com.zsmartsystems.zigbee.dongle.telegesis/src/test/java/com/zsmartsystems/zigbee/dongle/telegesis/internal/TelegesisFrameHandlerTest.java @@ -328,13 +328,5 @@ public boolean open(int baudRate, FlowControl flowControl) { @Override public void purgeRxBuffer() { } - - @Override - public void setDtr(boolean state) { - } - - @Override - public void setRts(boolean state) { - } } } diff --git a/com.zsmartsystems.zigbee.dongle.xbee/src/test/java/com/zsmartsystems/zigbee/dongle/xbee/internal/XBeeFrameHandlerTest.java b/com.zsmartsystems.zigbee.dongle.xbee/src/test/java/com/zsmartsystems/zigbee/dongle/xbee/internal/XBeeFrameHandlerTest.java index 486755c25..133a63cb9 100644 --- a/com.zsmartsystems.zigbee.dongle.xbee/src/test/java/com/zsmartsystems/zigbee/dongle/xbee/internal/XBeeFrameHandlerTest.java +++ b/com.zsmartsystems.zigbee.dongle.xbee/src/test/java/com/zsmartsystems/zigbee/dongle/xbee/internal/XBeeFrameHandlerTest.java @@ -151,13 +151,5 @@ public boolean open(int baudRate, FlowControl flowControl) { @Override public void purgeRxBuffer() { } - - @Override - public void setDtr(boolean state) { - } - - @Override - public void setRts(boolean state) { - } } } diff --git a/com.zsmartsystems.zigbee.dongle.zstack.autocode/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/autocode/CommandGenerator.java b/com.zsmartsystems.zigbee.dongle.zstack.autocode/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/autocode/CommandGenerator.java index 6ba0a9e76..c15c59916 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack.autocode/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/autocode/CommandGenerator.java +++ b/com.zsmartsystems.zigbee.dongle.zstack.autocode/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/autocode/CommandGenerator.java @@ -14,6 +14,7 @@ import java.io.PrintWriter; import java.io.StringWriter; import java.io.UnsupportedEncodingException; +import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -93,9 +94,10 @@ private void createCommandClass(String className, Command command, List"); } out.println(" * Note that this code is autogenerated. Manual changes may be overwritten."); - out.println(" *"); - out.println(" * @author Chris Jackson"); out.println(" */"); + out.println(""); + addImport("javax.annotation.Generated"); + out.println("@Generated(value = \"com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator\", date = \"" + new Date() + "\")"); if (className.endsWith("Srsp") || className.endsWith("Areq")) { addImport(zstackCommandPackage + ".ZstackFrameResponse"); diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/ZstackFrameFactory.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/ZstackFrameFactory.java index 1e0833ed5..d8731ae15 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/ZstackFrameFactory.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/ZstackFrameFactory.java @@ -1,242 +1,242 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api; - -import com.zsmartsystems.zigbee.dongle.zstack.api.af.ZstackAfDataConfirmAreq; -import com.zsmartsystems.zigbee.dongle.zstack.api.af.ZstackAfDataRequestSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.af.ZstackAfIncomingMsgAreq; -import com.zsmartsystems.zigbee.dongle.zstack.api.af.ZstackAfRegisterSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.appcnf.ZstackAppCnfBdbAddInstallcodeSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.appcnf.ZstackAppCnfBdbCommissioningNotificationAreq; -import com.zsmartsystems.zigbee.dongle.zstack.api.appcnf.ZstackAppCnfBdbSetActiveDefaultCentralizedKeySrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.appcnf.ZstackAppCnfBdbSetChannelSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.appcnf.ZstackAppCnfBdbSetJoinusesinstallcodekeySrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.appcnf.ZstackAppCnfBdbSetTcRequireKeyExchangeSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.appcnf.ZstackAppCnfSetAllowrejoinTcPolicySrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.mac.ZstackMacScanReqSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.sapi.ZstackZbGetDeviceInfoSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.sapi.ZstackZbReadConfigurationSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.sapi.ZstackZbWriteConfigurationSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.sbl.ZstackSbHandshakeCmdSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.sbl.ZstackSbWriteCmdSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.sys.ZstackSysGetExtAddrSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.sys.ZstackSysNvReadSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.sys.ZstackSysOsalNvReadSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.sys.ZstackSysOsalNvWriteSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.sys.ZstackSysPingSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.sys.ZstackSysResetIndAreq; -import com.zsmartsystems.zigbee.dongle.zstack.api.sys.ZstackSysSetExtAddrSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.sys.ZstackSysSetTxPowerSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.sys.ZstackSysVersionSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.sys.ZstackSysZdiagsClearStatsSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.sys.ZstackSysZdiagsGetStatsSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.sys.ZstackSysZdiagsInitStatsSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.sys.ZstackSysZdiagsRestoreStatsNvSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.sys.ZstackSysZdiagsSaveStatsToNvSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.util.ZstackUtilApsmeLinkKeyDataGetSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.util.ZstackUtilApsmeLinkKeyNvIdGetSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.util.ZstackUtilGetDeviceInfoSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.util.ZstackUtilGetNvInfoSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.util.ZstackUtilLedControlSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.util.ZstackUtilSetChannelsSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.util.ZstackUtilSetPanidSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.util.ZstackUtilSetPrecfgkeySrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.util.ZstackUtilSetSeclevelSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.zdo.ZstackZdoExtNwkInfoSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.zdo.ZstackZdoGetLinkKeySrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.zdo.ZstackZdoLeaveIndAreq; -import com.zsmartsystems.zigbee.dongle.zstack.api.zdo.ZstackZdoMsgCbIncomingAreq; -import com.zsmartsystems.zigbee.dongle.zstack.api.zdo.ZstackZdoMsgCbRegisterSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.zdo.ZstackZdoNwkDiscoveryReqSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.zdo.ZstackZdoRemoveLinkKeySrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.zdo.ZstackZdoSetLinkKeySrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.zdo.ZstackZdoStartupFromAppSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.zdo.ZstackZdoStateChangeIndAreq; -import com.zsmartsystems.zigbee.dongle.zstack.api.zdo.ZstackZdoTcDevIndAreq; -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; -import java.util.HashMap; -import java.util.Map; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - - -/** - * Factory class to create Z-Stack commands from incoming data. This will only create {@link ZstackFrameResponse}s. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackFrameFactory { - /** - * Logger - */ - private static Logger logger = LoggerFactory.getLogger(ZstackFrameFactory.class); - - /* - * Subsystem definitions - */ - public static int ZSTACK_RPC = 0x0000; - public static int ZSTACK_SYS = 0x0100; - public static int ZSTACK_MAC = 0x0200; - public static int ZSTACK_AF = 0x0400; - public static int ZSTACK_ZDO = 0x0500; - public static int ZSTACK_SAPI = 0x0600; - public static int ZSTACK_UTIL = 0x0700; - public static int ZSTACK_APP_CNF = 0x0F00; - public static int ZSTACK_SBL = 0x0D00; - - /** - * Subsystem definition mask - */ - private static int ZSTACK_SUBSYSTEM_MASK = 0x1F; - - private static final int AF_DATA_CONFIRM = 0x80; - private static final int AF_DATA_REQUEST = 0x01; - private static final int AF_INCOMING_MSG = 0x81; - private static final int AF_REGISTER = 0x00; - private static final int APP_CNF_BDB_ADD_INSTALLCODE = 0x04; - private static final int APP_CNF_BDB_COMMISSIONING_NOTIFICATION = 0x80; - private static final int APP_CNF_BDB_SET_ACTIVE_DEFAULT_CENTRALIZED_KEY = 0x07; - private static final int APP_CNF_BDB_SET_CHANNEL = 0x08; - private static final int APP_CNF_BDB_SET_JOINUSESINSTALLCODEKEY = 0x06; - private static final int APP_CNF_BDB_SET_TC_REQUIRE_KEY_EXCHANGE = 0x09; - private static final int APP_CNF_SET_ALLOWREJOIN_TC_POLICY = 0x03; - private static final int MAC_SCAN_REQ = 0x0C; - private static final int RPC_SREQ_ERROR = 0x00; - private static final int SB_HANDSHAKE_CMD = 0x04; - private static final int SB_WRITE_CMD = 0x00; - private static final int SYS_GET_EXT_ADDR = 0x04; - private static final int SYS_NV_READ = 0x33; - private static final int SYS_OSAL_NV_READ = 0x08; - private static final int SYS_OSAL_NV_WRITE = 0x09; - private static final int SYS_PING = 0x01; - private static final int SYS_RESET_IND = 0x80; - private static final int SYS_SET_EXT_ADDR = 0x03; - private static final int SYS_SET_TX_POWER = 0x14; - private static final int SYS_VERSION = 0x02; - private static final int SYS_ZDIAGS_CLEAR_STATS = 0x18; - private static final int SYS_ZDIAGS_GET_STATS = 0x19; - private static final int SYS_ZDIAGS_INIT_STATS = 0x17; - private static final int SYS_ZDIAGS_RESTORE_STATS_NV = 0x1A; - private static final int SYS_ZDIAGS_SAVE_STATS_TO_NV = 0x1B; - private static final int UTIL_APSME_LINK_KEY_DATA_GET = 0x44; - private static final int UTIL_APSME_LINK_KEY_NV_ID_GET = 0x45; - private static final int UTIL_GET_DEVICE_INFO = 0x00; - private static final int UTIL_GET_NV_INFO = 0x01; - private static final int UTIL_LED_CONTROL = 0x09; - private static final int UTIL_SET_CHANNELS = 0x03; - private static final int UTIL_SET_PANID = 0x02; - private static final int UTIL_SET_PRECFGKEY = 0x05; - private static final int UTIL_SET_SECLEVEL = 0x04; - private static final int ZB_GET_DEVICE_INFO = 0x06; - private static final int ZB_READ_CONFIGURATION = 0x04; - private static final int ZB_WRITE_CONFIGURATION = 0x05; - private static final int ZDO_EXT_NWK_INFO = 0x50; - private static final int ZDO_GET_LINK_KEY = 0x25; - private static final int ZDO_LEAVE_IND = 0xC9; - private static final int ZDO_MSG_CB_INCOMING = 0xFF; - private static final int ZDO_MSG_CB_REGISTER = 0x3E; - private static final int ZDO_NWK_DISCOVERY_REQ = 0x26; - private static final int ZDO_REMOVE_LINK_KEY = 0x24; - private static final int ZDO_SET_LINK_KEY = 0x23; - private static final int ZDO_STARTUP_FROM_APP = 0x40; - private static final int ZDO_STATE_CHANGE_IND = 0xC0; - private static final int ZDO_TC_DEV_IND = 0xCA; - - private static Map> zstackFrameMap = new HashMap>(); - - static { - zstackFrameMap.put(ZSTACK_AF + AF_DATA_CONFIRM, ZstackAfDataConfirmAreq.class); - zstackFrameMap.put(ZSTACK_AF + AF_DATA_REQUEST, ZstackAfDataRequestSrsp.class); - zstackFrameMap.put(ZSTACK_AF + AF_INCOMING_MSG, ZstackAfIncomingMsgAreq.class); - zstackFrameMap.put(ZSTACK_AF + AF_REGISTER, ZstackAfRegisterSrsp.class); - zstackFrameMap.put(ZSTACK_APP_CNF + APP_CNF_BDB_ADD_INSTALLCODE, ZstackAppCnfBdbAddInstallcodeSrsp.class); - zstackFrameMap.put(ZSTACK_APP_CNF + APP_CNF_BDB_COMMISSIONING_NOTIFICATION, ZstackAppCnfBdbCommissioningNotificationAreq.class); - zstackFrameMap.put(ZSTACK_APP_CNF + APP_CNF_BDB_SET_ACTIVE_DEFAULT_CENTRALIZED_KEY, ZstackAppCnfBdbSetActiveDefaultCentralizedKeySrsp.class); - zstackFrameMap.put(ZSTACK_APP_CNF + APP_CNF_BDB_SET_CHANNEL, ZstackAppCnfBdbSetChannelSrsp.class); - zstackFrameMap.put(ZSTACK_APP_CNF + APP_CNF_BDB_SET_JOINUSESINSTALLCODEKEY, ZstackAppCnfBdbSetJoinusesinstallcodekeySrsp.class); - zstackFrameMap.put(ZSTACK_APP_CNF + APP_CNF_BDB_SET_TC_REQUIRE_KEY_EXCHANGE, ZstackAppCnfBdbSetTcRequireKeyExchangeSrsp.class); - zstackFrameMap.put(ZSTACK_APP_CNF + APP_CNF_SET_ALLOWREJOIN_TC_POLICY, ZstackAppCnfSetAllowrejoinTcPolicySrsp.class); - zstackFrameMap.put(ZSTACK_MAC + MAC_SCAN_REQ, ZstackMacScanReqSrsp.class); - zstackFrameMap.put(ZSTACK_RPC + RPC_SREQ_ERROR, ZstackRpcSreqErrorSrsp.class); - zstackFrameMap.put(ZSTACK_SBL + SB_HANDSHAKE_CMD, ZstackSbHandshakeCmdSrsp.class); - zstackFrameMap.put(ZSTACK_SBL + SB_WRITE_CMD, ZstackSbWriteCmdSrsp.class); - zstackFrameMap.put(ZSTACK_SYS + SYS_GET_EXT_ADDR, ZstackSysGetExtAddrSrsp.class); - zstackFrameMap.put(ZSTACK_SYS + SYS_NV_READ, ZstackSysNvReadSrsp.class); - zstackFrameMap.put(ZSTACK_SYS + SYS_OSAL_NV_READ, ZstackSysOsalNvReadSrsp.class); - zstackFrameMap.put(ZSTACK_SYS + SYS_OSAL_NV_WRITE, ZstackSysOsalNvWriteSrsp.class); - zstackFrameMap.put(ZSTACK_SYS + SYS_PING, ZstackSysPingSrsp.class); - zstackFrameMap.put(ZSTACK_SYS + SYS_RESET_IND, ZstackSysResetIndAreq.class); - zstackFrameMap.put(ZSTACK_SYS + SYS_SET_EXT_ADDR, ZstackSysSetExtAddrSrsp.class); - zstackFrameMap.put(ZSTACK_SYS + SYS_SET_TX_POWER, ZstackSysSetTxPowerSrsp.class); - zstackFrameMap.put(ZSTACK_SYS + SYS_VERSION, ZstackSysVersionSrsp.class); - zstackFrameMap.put(ZSTACK_SYS + SYS_ZDIAGS_CLEAR_STATS, ZstackSysZdiagsClearStatsSrsp.class); - zstackFrameMap.put(ZSTACK_SYS + SYS_ZDIAGS_GET_STATS, ZstackSysZdiagsGetStatsSrsp.class); - zstackFrameMap.put(ZSTACK_SYS + SYS_ZDIAGS_INIT_STATS, ZstackSysZdiagsInitStatsSrsp.class); - zstackFrameMap.put(ZSTACK_SYS + SYS_ZDIAGS_RESTORE_STATS_NV, ZstackSysZdiagsRestoreStatsNvSrsp.class); - zstackFrameMap.put(ZSTACK_SYS + SYS_ZDIAGS_SAVE_STATS_TO_NV, ZstackSysZdiagsSaveStatsToNvSrsp.class); - zstackFrameMap.put(ZSTACK_UTIL + UTIL_APSME_LINK_KEY_DATA_GET, ZstackUtilApsmeLinkKeyDataGetSrsp.class); - zstackFrameMap.put(ZSTACK_UTIL + UTIL_APSME_LINK_KEY_NV_ID_GET, ZstackUtilApsmeLinkKeyNvIdGetSrsp.class); - zstackFrameMap.put(ZSTACK_UTIL + UTIL_GET_DEVICE_INFO, ZstackUtilGetDeviceInfoSrsp.class); - zstackFrameMap.put(ZSTACK_UTIL + UTIL_GET_NV_INFO, ZstackUtilGetNvInfoSrsp.class); - zstackFrameMap.put(ZSTACK_UTIL + UTIL_LED_CONTROL, ZstackUtilLedControlSrsp.class); - zstackFrameMap.put(ZSTACK_UTIL + UTIL_SET_CHANNELS, ZstackUtilSetChannelsSrsp.class); - zstackFrameMap.put(ZSTACK_UTIL + UTIL_SET_PANID, ZstackUtilSetPanidSrsp.class); - zstackFrameMap.put(ZSTACK_UTIL + UTIL_SET_PRECFGKEY, ZstackUtilSetPrecfgkeySrsp.class); - zstackFrameMap.put(ZSTACK_UTIL + UTIL_SET_SECLEVEL, ZstackUtilSetSeclevelSrsp.class); - zstackFrameMap.put(ZSTACK_SAPI + ZB_GET_DEVICE_INFO, ZstackZbGetDeviceInfoSrsp.class); - zstackFrameMap.put(ZSTACK_SAPI + ZB_READ_CONFIGURATION, ZstackZbReadConfigurationSrsp.class); - zstackFrameMap.put(ZSTACK_SAPI + ZB_WRITE_CONFIGURATION, ZstackZbWriteConfigurationSrsp.class); - zstackFrameMap.put(ZSTACK_ZDO + ZDO_EXT_NWK_INFO, ZstackZdoExtNwkInfoSrsp.class); - zstackFrameMap.put(ZSTACK_ZDO + ZDO_GET_LINK_KEY, ZstackZdoGetLinkKeySrsp.class); - zstackFrameMap.put(ZSTACK_ZDO + ZDO_LEAVE_IND, ZstackZdoLeaveIndAreq.class); - zstackFrameMap.put(ZSTACK_ZDO + ZDO_MSG_CB_INCOMING, ZstackZdoMsgCbIncomingAreq.class); - zstackFrameMap.put(ZSTACK_ZDO + ZDO_MSG_CB_REGISTER, ZstackZdoMsgCbRegisterSrsp.class); - zstackFrameMap.put(ZSTACK_ZDO + ZDO_NWK_DISCOVERY_REQ, ZstackZdoNwkDiscoveryReqSrsp.class); - zstackFrameMap.put(ZSTACK_ZDO + ZDO_REMOVE_LINK_KEY, ZstackZdoRemoveLinkKeySrsp.class); - zstackFrameMap.put(ZSTACK_ZDO + ZDO_SET_LINK_KEY, ZstackZdoSetLinkKeySrsp.class); - zstackFrameMap.put(ZSTACK_ZDO + ZDO_STARTUP_FROM_APP, ZstackZdoStartupFromAppSrsp.class); - zstackFrameMap.put(ZSTACK_ZDO + ZDO_STATE_CHANGE_IND, ZstackZdoStateChangeIndAreq.class); - zstackFrameMap.put(ZSTACK_ZDO + ZDO_TC_DEV_IND, ZstackZdoTcDevIndAreq.class); - } - - /** - * Creates and {@link ZstackFrameResponse} from the incoming data. - * - * @param data the int[] containing the ZStack data from which to generate the frame - * @return the {@link ZstackFrameResponse} or null if the response can't be created. - */ - public static ZstackFrameResponse createFrame(int[] data) { - if (data.length < 2) { - return null; - } - - int cmdId = ((data[0] & ZSTACK_SUBSYSTEM_MASK) << 8) + data[1]; - Class zstackClass = zstackFrameMap.get(cmdId); - - if (zstackClass == null) { - return null; - } - - Constructor ctor; - try { - ctor = zstackClass.getConstructor(int[].class); - return (ZstackFrameResponse) ctor.newInstance(data); - } catch (SecurityException | NoSuchMethodException | IllegalArgumentException | InstantiationException - | IllegalAccessException | InvocationTargetException e) { - logger.debug("Error creating instance of ZstackCommand", e); - } - - return null; - } - - -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api; + +import com.zsmartsystems.zigbee.dongle.zstack.api.af.ZstackAfDataConfirmAreq; +import com.zsmartsystems.zigbee.dongle.zstack.api.af.ZstackAfDataRequestSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.af.ZstackAfIncomingMsgAreq; +import com.zsmartsystems.zigbee.dongle.zstack.api.af.ZstackAfRegisterSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.appcnf.ZstackAppCnfBdbAddInstallcodeSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.appcnf.ZstackAppCnfBdbCommissioningNotificationAreq; +import com.zsmartsystems.zigbee.dongle.zstack.api.appcnf.ZstackAppCnfBdbSetActiveDefaultCentralizedKeySrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.appcnf.ZstackAppCnfBdbSetChannelSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.appcnf.ZstackAppCnfBdbSetJoinusesinstallcodekeySrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.appcnf.ZstackAppCnfBdbSetTcRequireKeyExchangeSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.appcnf.ZstackAppCnfSetAllowrejoinTcPolicySrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.mac.ZstackMacScanReqSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.sapi.ZstackZbGetDeviceInfoSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.sapi.ZstackZbReadConfigurationSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.sapi.ZstackZbWriteConfigurationSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.sbl.ZstackSbHandshakeCmdSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.sbl.ZstackSbWriteCmdSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.sys.ZstackSysGetExtAddrSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.sys.ZstackSysNvReadSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.sys.ZstackSysOsalNvReadSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.sys.ZstackSysOsalNvWriteSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.sys.ZstackSysPingSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.sys.ZstackSysResetIndAreq; +import com.zsmartsystems.zigbee.dongle.zstack.api.sys.ZstackSysSetExtAddrSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.sys.ZstackSysSetTxPowerSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.sys.ZstackSysVersionSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.sys.ZstackSysZdiagsClearStatsSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.sys.ZstackSysZdiagsGetStatsSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.sys.ZstackSysZdiagsInitStatsSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.sys.ZstackSysZdiagsRestoreStatsNvSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.sys.ZstackSysZdiagsSaveStatsToNvSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.util.ZstackUtilApsmeLinkKeyDataGetSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.util.ZstackUtilApsmeLinkKeyNvIdGetSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.util.ZstackUtilGetDeviceInfoSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.util.ZstackUtilGetNvInfoSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.util.ZstackUtilLedControlSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.util.ZstackUtilSetChannelsSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.util.ZstackUtilSetPanidSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.util.ZstackUtilSetPrecfgkeySrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.util.ZstackUtilSetSeclevelSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.zdo.ZstackZdoExtNwkInfoSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.zdo.ZstackZdoGetLinkKeySrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.zdo.ZstackZdoLeaveIndAreq; +import com.zsmartsystems.zigbee.dongle.zstack.api.zdo.ZstackZdoMsgCbIncomingAreq; +import com.zsmartsystems.zigbee.dongle.zstack.api.zdo.ZstackZdoMsgCbRegisterSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.zdo.ZstackZdoNwkDiscoveryReqSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.zdo.ZstackZdoRemoveLinkKeySrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.zdo.ZstackZdoSetLinkKeySrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.zdo.ZstackZdoStartupFromAppSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.zdo.ZstackZdoStateChangeIndAreq; +import com.zsmartsystems.zigbee.dongle.zstack.api.zdo.ZstackZdoTcDevIndAreq; +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.util.HashMap; +import java.util.Map; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +/** + * Factory class to create Z-Stack commands from incoming data. This will only create {@link ZstackFrameResponse}s. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + * + * @author Chris Jackson + */ +public class ZstackFrameFactory { + /** + * Logger + */ + private static Logger logger = LoggerFactory.getLogger(ZstackFrameFactory.class); + + /* + * Subsystem definitions + */ + public static int ZSTACK_RPC = 0x0000; + public static int ZSTACK_SYS = 0x0100; + public static int ZSTACK_MAC = 0x0200; + public static int ZSTACK_AF = 0x0400; + public static int ZSTACK_ZDO = 0x0500; + public static int ZSTACK_SAPI = 0x0600; + public static int ZSTACK_UTIL = 0x0700; + public static int ZSTACK_APP_CNF = 0x0F00; + public static int ZSTACK_SBL = 0x0D00; + + /** + * Subsystem definition mask + */ + private static int ZSTACK_SUBSYSTEM_MASK = 0x1F; + + private static final int AF_DATA_CONFIRM = 0x80; + private static final int AF_DATA_REQUEST = 0x01; + private static final int AF_INCOMING_MSG = 0x81; + private static final int AF_REGISTER = 0x00; + private static final int APP_CNF_BDB_ADD_INSTALLCODE = 0x04; + private static final int APP_CNF_BDB_COMMISSIONING_NOTIFICATION = 0x80; + private static final int APP_CNF_BDB_SET_ACTIVE_DEFAULT_CENTRALIZED_KEY = 0x07; + private static final int APP_CNF_BDB_SET_CHANNEL = 0x08; + private static final int APP_CNF_BDB_SET_JOINUSESINSTALLCODEKEY = 0x06; + private static final int APP_CNF_BDB_SET_TC_REQUIRE_KEY_EXCHANGE = 0x09; + private static final int APP_CNF_SET_ALLOWREJOIN_TC_POLICY = 0x03; + private static final int MAC_SCAN_REQ = 0x0C; + private static final int RPC_SREQ_ERROR = 0x00; + private static final int SB_HANDSHAKE_CMD = 0x04; + private static final int SB_WRITE_CMD = 0x00; + private static final int SYS_GET_EXT_ADDR = 0x04; + private static final int SYS_NV_READ = 0x33; + private static final int SYS_OSAL_NV_READ = 0x08; + private static final int SYS_OSAL_NV_WRITE = 0x09; + private static final int SYS_PING = 0x01; + private static final int SYS_RESET_IND = 0x80; + private static final int SYS_SET_EXT_ADDR = 0x03; + private static final int SYS_SET_TX_POWER = 0x14; + private static final int SYS_VERSION = 0x02; + private static final int SYS_ZDIAGS_CLEAR_STATS = 0x18; + private static final int SYS_ZDIAGS_GET_STATS = 0x19; + private static final int SYS_ZDIAGS_INIT_STATS = 0x17; + private static final int SYS_ZDIAGS_RESTORE_STATS_NV = 0x1A; + private static final int SYS_ZDIAGS_SAVE_STATS_TO_NV = 0x1B; + private static final int UTIL_APSME_LINK_KEY_DATA_GET = 0x44; + private static final int UTIL_APSME_LINK_KEY_NV_ID_GET = 0x45; + private static final int UTIL_GET_DEVICE_INFO = 0x00; + private static final int UTIL_GET_NV_INFO = 0x01; + private static final int UTIL_LED_CONTROL = 0x09; + private static final int UTIL_SET_CHANNELS = 0x03; + private static final int UTIL_SET_PANID = 0x02; + private static final int UTIL_SET_PRECFGKEY = 0x05; + private static final int UTIL_SET_SECLEVEL = 0x04; + private static final int ZB_GET_DEVICE_INFO = 0x06; + private static final int ZB_READ_CONFIGURATION = 0x04; + private static final int ZB_WRITE_CONFIGURATION = 0x05; + private static final int ZDO_EXT_NWK_INFO = 0x50; + private static final int ZDO_GET_LINK_KEY = 0x25; + private static final int ZDO_LEAVE_IND = 0xC9; + private static final int ZDO_MSG_CB_INCOMING = 0xFF; + private static final int ZDO_MSG_CB_REGISTER = 0x3E; + private static final int ZDO_NWK_DISCOVERY_REQ = 0x26; + private static final int ZDO_REMOVE_LINK_KEY = 0x24; + private static final int ZDO_SET_LINK_KEY = 0x23; + private static final int ZDO_STARTUP_FROM_APP = 0x40; + private static final int ZDO_STATE_CHANGE_IND = 0xC0; + private static final int ZDO_TC_DEV_IND = 0xCA; + + private static Map> zstackFrameMap = new HashMap>(); + + static { + zstackFrameMap.put(ZSTACK_AF + AF_DATA_CONFIRM, ZstackAfDataConfirmAreq.class); + zstackFrameMap.put(ZSTACK_AF + AF_DATA_REQUEST, ZstackAfDataRequestSrsp.class); + zstackFrameMap.put(ZSTACK_AF + AF_INCOMING_MSG, ZstackAfIncomingMsgAreq.class); + zstackFrameMap.put(ZSTACK_AF + AF_REGISTER, ZstackAfRegisterSrsp.class); + zstackFrameMap.put(ZSTACK_APP_CNF + APP_CNF_BDB_ADD_INSTALLCODE, ZstackAppCnfBdbAddInstallcodeSrsp.class); + zstackFrameMap.put(ZSTACK_APP_CNF + APP_CNF_BDB_COMMISSIONING_NOTIFICATION, ZstackAppCnfBdbCommissioningNotificationAreq.class); + zstackFrameMap.put(ZSTACK_APP_CNF + APP_CNF_BDB_SET_ACTIVE_DEFAULT_CENTRALIZED_KEY, ZstackAppCnfBdbSetActiveDefaultCentralizedKeySrsp.class); + zstackFrameMap.put(ZSTACK_APP_CNF + APP_CNF_BDB_SET_CHANNEL, ZstackAppCnfBdbSetChannelSrsp.class); + zstackFrameMap.put(ZSTACK_APP_CNF + APP_CNF_BDB_SET_JOINUSESINSTALLCODEKEY, ZstackAppCnfBdbSetJoinusesinstallcodekeySrsp.class); + zstackFrameMap.put(ZSTACK_APP_CNF + APP_CNF_BDB_SET_TC_REQUIRE_KEY_EXCHANGE, ZstackAppCnfBdbSetTcRequireKeyExchangeSrsp.class); + zstackFrameMap.put(ZSTACK_APP_CNF + APP_CNF_SET_ALLOWREJOIN_TC_POLICY, ZstackAppCnfSetAllowrejoinTcPolicySrsp.class); + zstackFrameMap.put(ZSTACK_MAC + MAC_SCAN_REQ, ZstackMacScanReqSrsp.class); + zstackFrameMap.put(ZSTACK_RPC + RPC_SREQ_ERROR, ZstackRpcSreqErrorSrsp.class); + zstackFrameMap.put(ZSTACK_SBL + SB_HANDSHAKE_CMD, ZstackSbHandshakeCmdSrsp.class); + zstackFrameMap.put(ZSTACK_SBL + SB_WRITE_CMD, ZstackSbWriteCmdSrsp.class); + zstackFrameMap.put(ZSTACK_SYS + SYS_GET_EXT_ADDR, ZstackSysGetExtAddrSrsp.class); + zstackFrameMap.put(ZSTACK_SYS + SYS_NV_READ, ZstackSysNvReadSrsp.class); + zstackFrameMap.put(ZSTACK_SYS + SYS_OSAL_NV_READ, ZstackSysOsalNvReadSrsp.class); + zstackFrameMap.put(ZSTACK_SYS + SYS_OSAL_NV_WRITE, ZstackSysOsalNvWriteSrsp.class); + zstackFrameMap.put(ZSTACK_SYS + SYS_PING, ZstackSysPingSrsp.class); + zstackFrameMap.put(ZSTACK_SYS + SYS_RESET_IND, ZstackSysResetIndAreq.class); + zstackFrameMap.put(ZSTACK_SYS + SYS_SET_EXT_ADDR, ZstackSysSetExtAddrSrsp.class); + zstackFrameMap.put(ZSTACK_SYS + SYS_SET_TX_POWER, ZstackSysSetTxPowerSrsp.class); + zstackFrameMap.put(ZSTACK_SYS + SYS_VERSION, ZstackSysVersionSrsp.class); + zstackFrameMap.put(ZSTACK_SYS + SYS_ZDIAGS_CLEAR_STATS, ZstackSysZdiagsClearStatsSrsp.class); + zstackFrameMap.put(ZSTACK_SYS + SYS_ZDIAGS_GET_STATS, ZstackSysZdiagsGetStatsSrsp.class); + zstackFrameMap.put(ZSTACK_SYS + SYS_ZDIAGS_INIT_STATS, ZstackSysZdiagsInitStatsSrsp.class); + zstackFrameMap.put(ZSTACK_SYS + SYS_ZDIAGS_RESTORE_STATS_NV, ZstackSysZdiagsRestoreStatsNvSrsp.class); + zstackFrameMap.put(ZSTACK_SYS + SYS_ZDIAGS_SAVE_STATS_TO_NV, ZstackSysZdiagsSaveStatsToNvSrsp.class); + zstackFrameMap.put(ZSTACK_UTIL + UTIL_APSME_LINK_KEY_DATA_GET, ZstackUtilApsmeLinkKeyDataGetSrsp.class); + zstackFrameMap.put(ZSTACK_UTIL + UTIL_APSME_LINK_KEY_NV_ID_GET, ZstackUtilApsmeLinkKeyNvIdGetSrsp.class); + zstackFrameMap.put(ZSTACK_UTIL + UTIL_GET_DEVICE_INFO, ZstackUtilGetDeviceInfoSrsp.class); + zstackFrameMap.put(ZSTACK_UTIL + UTIL_GET_NV_INFO, ZstackUtilGetNvInfoSrsp.class); + zstackFrameMap.put(ZSTACK_UTIL + UTIL_LED_CONTROL, ZstackUtilLedControlSrsp.class); + zstackFrameMap.put(ZSTACK_UTIL + UTIL_SET_CHANNELS, ZstackUtilSetChannelsSrsp.class); + zstackFrameMap.put(ZSTACK_UTIL + UTIL_SET_PANID, ZstackUtilSetPanidSrsp.class); + zstackFrameMap.put(ZSTACK_UTIL + UTIL_SET_PRECFGKEY, ZstackUtilSetPrecfgkeySrsp.class); + zstackFrameMap.put(ZSTACK_UTIL + UTIL_SET_SECLEVEL, ZstackUtilSetSeclevelSrsp.class); + zstackFrameMap.put(ZSTACK_SAPI + ZB_GET_DEVICE_INFO, ZstackZbGetDeviceInfoSrsp.class); + zstackFrameMap.put(ZSTACK_SAPI + ZB_READ_CONFIGURATION, ZstackZbReadConfigurationSrsp.class); + zstackFrameMap.put(ZSTACK_SAPI + ZB_WRITE_CONFIGURATION, ZstackZbWriteConfigurationSrsp.class); + zstackFrameMap.put(ZSTACK_ZDO + ZDO_EXT_NWK_INFO, ZstackZdoExtNwkInfoSrsp.class); + zstackFrameMap.put(ZSTACK_ZDO + ZDO_GET_LINK_KEY, ZstackZdoGetLinkKeySrsp.class); + zstackFrameMap.put(ZSTACK_ZDO + ZDO_LEAVE_IND, ZstackZdoLeaveIndAreq.class); + zstackFrameMap.put(ZSTACK_ZDO + ZDO_MSG_CB_INCOMING, ZstackZdoMsgCbIncomingAreq.class); + zstackFrameMap.put(ZSTACK_ZDO + ZDO_MSG_CB_REGISTER, ZstackZdoMsgCbRegisterSrsp.class); + zstackFrameMap.put(ZSTACK_ZDO + ZDO_NWK_DISCOVERY_REQ, ZstackZdoNwkDiscoveryReqSrsp.class); + zstackFrameMap.put(ZSTACK_ZDO + ZDO_REMOVE_LINK_KEY, ZstackZdoRemoveLinkKeySrsp.class); + zstackFrameMap.put(ZSTACK_ZDO + ZDO_SET_LINK_KEY, ZstackZdoSetLinkKeySrsp.class); + zstackFrameMap.put(ZSTACK_ZDO + ZDO_STARTUP_FROM_APP, ZstackZdoStartupFromAppSrsp.class); + zstackFrameMap.put(ZSTACK_ZDO + ZDO_STATE_CHANGE_IND, ZstackZdoStateChangeIndAreq.class); + zstackFrameMap.put(ZSTACK_ZDO + ZDO_TC_DEV_IND, ZstackZdoTcDevIndAreq.class); + } + + /** + * Creates and {@link ZstackFrameResponse} from the incoming data. + * + * @param data the int[] containing the ZStack data from which to generate the frame + * @return the {@link ZstackFrameResponse} or null if the response can't be created. + */ + public static ZstackFrameResponse createFrame(int[] data) { + if (data.length < 2) { + return null; + } + + int cmdId = ((data[0] & ZSTACK_SUBSYSTEM_MASK) << 8) + data[1]; + Class zstackClass = zstackFrameMap.get(cmdId); + + if (zstackClass == null) { + return null; + } + + Constructor ctor; + try { + ctor = zstackClass.getConstructor(int[].class); + return (ZstackFrameResponse) ctor.newInstance(data); + } catch (SecurityException | NoSuchMethodException | IllegalArgumentException | InstantiationException + | IllegalAccessException | InvocationTargetException e) { + logger.debug("Error creating instance of ZstackCommand", e); + } + + return null; + } + + +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/ZstackResponseCode.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/ZstackResponseCode.java index 7ff62ee6e..c74b6589d 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/ZstackResponseCode.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/ZstackResponseCode.java @@ -1,129 +1,129 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api; - -import java.util.HashMap; -import java.util.Map; - -/** - * Class to implement the Z-Stack Enumeration ZstackResponseCode. - *

- * Global response codes - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public enum ZstackResponseCode { - /** - * Default unknown value - */ - UNKNOWN(-1), - - /** - * - */ - SUCCESS(0x0000), - - /** - * - */ - FAILURE(0x0001), - - /** - * - */ - AF_INVALID_PARAMETER(0x0002), - - /** - * Security manager key table full - */ - AF_MEM_FAIL(0x0010), - - /** - * Security manager key table full - */ - KEY_TABLE_FULL(0x0011), - - /** - * The operation could not be completed because no memory resources were available - */ - MAC_NO_RESOURCES(0x001A), - - /** - * Invalid Request - */ - INVALID_REQUEST(0x00C2), - - /** - * Not Permitted - */ - NOT_PERMITTED(0x00C3), - - /** - * Unknown Device - */ - UNKNOWN_DEVICE(0x00C8), - - /** - * - */ - AF_NO_ROUTE(0x00CD), - - /** - * The scan request failed because a scan is already in progress - */ - MAC_SCAN_IN_PROGRESS(0x00FC), - - /** - * The outstanding transaction has expired - */ - MAC_TRANSACTION_EXPIRED(0x00F0); - - /** - * A mapping between the integer code and its corresponding type to - * facilitate lookup by code. - */ - private static Map codeMapping; - - private int key; - - static { - codeMapping = new HashMap(); - for (ZstackResponseCode s : values()) { - codeMapping.put(s.key, s); - } - } - - private ZstackResponseCode(int key) { - this.key = key; - } - - /** - * Lookup function based on the type code. Returns null if the code does not exist. - * - * @param code the code to lookup - * @return enumeration value of the alarm type. - */ - public static ZstackResponseCode valueOf(int code) { - if (codeMapping.get(code) == null) { - return UNKNOWN; - } - - return codeMapping.get(code); - } - - /** - * Returns the Z-Stack protocol defined value for this enumeration. - * - * @return the Z-Stack protocol key - */ - public int getKey() { - return key; - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api; + +import java.util.HashMap; +import java.util.Map; + +/** + * Class to implement the Z-Stack Enumeration ZstackResponseCode. + *

+ * Global response codes + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + * + * @author Chris Jackson + */ +public enum ZstackResponseCode { + /** + * Default unknown value + */ + UNKNOWN(-1), + + /** + * + */ + SUCCESS(0x0000), + + /** + * + */ + FAILURE(0x0001), + + /** + * + */ + AF_INVALID_PARAMETER(0x0002), + + /** + * Security manager key table full + */ + AF_MEM_FAIL(0x0010), + + /** + * Security manager key table full + */ + KEY_TABLE_FULL(0x0011), + + /** + * The operation could not be completed because no memory resources were available + */ + MAC_NO_RESOURCES(0x001A), + + /** + * Invalid Request + */ + INVALID_REQUEST(0x00C2), + + /** + * Not Permitted + */ + NOT_PERMITTED(0x00C3), + + /** + * Unknown Device + */ + UNKNOWN_DEVICE(0x00C8), + + /** + * + */ + AF_NO_ROUTE(0x00CD), + + /** + * The scan request failed because a scan is already in progress + */ + MAC_SCAN_IN_PROGRESS(0x00FC), + + /** + * The outstanding transaction has expired + */ + MAC_TRANSACTION_EXPIRED(0x00F0); + + /** + * A mapping between the integer code and its corresponding type to + * facilitate lookup by code. + */ + private static Map codeMapping; + + private int key; + + static { + codeMapping = new HashMap(); + for (ZstackResponseCode s : values()) { + codeMapping.put(s.key, s); + } + } + + private ZstackResponseCode(int key) { + this.key = key; + } + + /** + * Lookup function based on the type code. Returns null if the code does not exist. + * + * @param code the code to lookup + * @return enumeration value of the alarm type. + */ + public static ZstackResponseCode valueOf(int code) { + if (codeMapping.get(code) == null) { + return UNKNOWN; + } + + return codeMapping.get(code); + } + + /** + * Returns the Z-Stack protocol defined value for this enumeration. + * + * @return the Z-Stack protocol key + */ + public int getKey() { + return key; + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/af/AfDataOptions.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/af/AfDataOptions.java index d53716698..d385f2e5f 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/af/AfDataOptions.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/af/AfDataOptions.java @@ -1,82 +1,82 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.af; - -import java.util.HashMap; -import java.util.Map; - -/** - * Class to implement the Z-Stack Enumeration AfDataOptions. - *

- * Options applied when sending frames - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public enum AfDataOptions { - - /** - * Set this bit to request APS acknowledgement for this packet - */ - AF_ACK_REQUEST(0x0010), - - /** - * Set this bit to force route discovery if a routing table entry doesn’t exist - */ - AF_DISCV_ROUTE(0x0020), - - /** - * Set this bit to enable APS security for this packet. - */ - AF_EN_SECURITY(0x0040), - - /** - * Skip routing. - */ - AF_NO_ROUTING(0x0080); - - /** - * A mapping between the integer code and its corresponding type to - * facilitate lookup by code. - */ - private static Map codeMapping; - - private int key; - - static { - codeMapping = new HashMap(); - for (AfDataOptions s : values()) { - codeMapping.put(s.key, s); - } - } - - private AfDataOptions(int key) { - this.key = key; - } - - /** - * Lookup function based on the type code. Returns null if the code does not exist. - * - * @param code the code to lookup - * @return enumeration value of the alarm type. - */ - public static AfDataOptions valueOf(int code) { - - return codeMapping.get(code); - } - - /** - * Returns the Z-Stack protocol defined value for this enumeration. - * - * @return the Z-Stack protocol key - */ - public int getKey() { - return key; - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.af; + +import java.util.HashMap; +import java.util.Map; + +/** + * Class to implement the Z-Stack Enumeration AfDataOptions. + *

+ * Options applied when sending frames + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + * + * @author Chris Jackson + */ +public enum AfDataOptions { + + /** + * Set this bit to request APS acknowledgement for this packet + */ + AF_ACK_REQUEST(0x0010), + + /** + * Set this bit to force route discovery if a routing table entry doesn’t exist + */ + AF_DISCV_ROUTE(0x0020), + + /** + * Set this bit to enable APS security for this packet. + */ + AF_EN_SECURITY(0x0040), + + /** + * Skip routing. + */ + AF_NO_ROUTING(0x0080); + + /** + * A mapping between the integer code and its corresponding type to + * facilitate lookup by code. + */ + private static Map codeMapping; + + private int key; + + static { + codeMapping = new HashMap(); + for (AfDataOptions s : values()) { + codeMapping.put(s.key, s); + } + } + + private AfDataOptions(int key) { + this.key = key; + } + + /** + * Lookup function based on the type code. Returns null if the code does not exist. + * + * @param code the code to lookup + * @return enumeration value of the alarm type. + */ + public static AfDataOptions valueOf(int code) { + + return codeMapping.get(code); + } + + /** + * Returns the Z-Stack protocol defined value for this enumeration. + * + * @return the Z-Stack protocol key + */ + public int getKey() { + return key; + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/af/ZstackAfDataConfirmAreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/af/ZstackAfDataConfirmAreq.java index e0680b3c9..bda5a24c7 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/af/ZstackAfDataConfirmAreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/af/ZstackAfDataConfirmAreq.java @@ -1,124 +1,125 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.af; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; - -/** - * Class to implement the Z-Stack command AF_DATA_CONFIRM. - *

- * This command is sent by the device to the user after it receives an AF_DATA_REQUEST. For each AF_DATA_REQUEST, a - * AF_DATA_CONFIRM is always returned. If APS acknowledgement was used for the AF_DATA_REQUEST, the confirm carries the status - * of whether the APS acknowledgement was received or not (ZApsNoAck – 0xb7). If APS acknowledgement was not used, then the confirm - * carries the status of whether the MAC acknowledgement (“next hop” acknowledgment) was received or not (ZMacNoACK – 0xe9). This - * also applies to packets that are sent using AF_DATA_REQUEST_EXT and AF_DATA_STORE. For APS fragmented packets, the value of - * the configuration item ZCD_NV_APSF_WINDOW_SIZE determines when an AF_DATA_CONFIRM that carries the status of the APS - * acknowledgement is received. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackAfDataConfirmAreq extends ZstackFrameResponse { - - /** - * Status is either Success (0) or Failure (1). - */ - private ZstackResponseCode status; - - /** - * Endpoint of the device. - */ - private int endpoint; - - /** - * Specifies the transaction sequence number of the message. - */ - private int transId; - - /** - * Response and Handler constructor - */ - public ZstackAfDataConfirmAreq(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - // Deserialize the fields - status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); - endpoint = deserializer.deserializeUInt8(); - transId = deserializer.deserializeUInt8(); - } - - /** - * Status is either Success (0) or Failure (1). - * - * @return the current status as {@link ZstackResponseCode} - */ - public ZstackResponseCode getStatus() { - return status; - } - - /** - * Status is either Success (0) or Failure (1). - * - * @param status the Status to set as {@link ZstackResponseCode} - */ - public void setStatus(ZstackResponseCode status) { - this.status = status; - } - - /** - * Endpoint of the device. - * - * @return the current endpoint as {@link int} - */ - public int getEndpoint() { - return endpoint; - } - - /** - * Endpoint of the device. - * - * @param endpoint the Endpoint to set as {@link int} - */ - public void setEndpoint(int endpoint) { - this.endpoint = endpoint; - } - - /** - * Specifies the transaction sequence number of the message. - * - * @return the current transId as {@link int} - */ - public int getTransId() { - return transId; - } - - /** - * Specifies the transaction sequence number of the message. - * - * @param transId the TransId to set as {@link int} - */ - public void setTransId(int transId) { - this.transId = transId; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(101); - builder.append("ZstackAfDataConfirmAreq [status="); - builder.append(status); - builder.append(", endpoint="); - builder.append(String.format("%02X", endpoint)); - builder.append(", transId="); - builder.append(String.format("%02X", transId)); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.af; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command AF_DATA_CONFIRM. + *

+ * This command is sent by the device to the user after it receives an AF_DATA_REQUEST. For each AF_DATA_REQUEST, a + * AF_DATA_CONFIRM is always returned. If APS acknowledgement was used for the AF_DATA_REQUEST, the confirm carries the status + * of whether the APS acknowledgement was received or not (ZApsNoAck – 0xb7). If APS acknowledgement was not used, then the confirm + * carries the status of whether the MAC acknowledgement (“next hop” acknowledgment) was received or not (ZMacNoACK – 0xe9). This + * also applies to packets that are sent using AF_DATA_REQUEST_EXT and AF_DATA_STORE. For APS fragmented packets, the value of + * the configuration item ZCD_NV_APSF_WINDOW_SIZE determines when an AF_DATA_CONFIRM that carries the status of the APS + * acknowledgement is received. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackAfDataConfirmAreq extends ZstackFrameResponse { + + /** + * Status is either Success (0) or Failure (1). + */ + private ZstackResponseCode status; + + /** + * Endpoint of the device. + */ + private int endpoint; + + /** + * Specifies the transaction sequence number of the message. + */ + private int transId; + + /** + * Response and Handler constructor + */ + public ZstackAfDataConfirmAreq(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + // Deserialize the fields + status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); + endpoint = deserializer.deserializeUInt8(); + transId = deserializer.deserializeUInt8(); + } + + /** + * Status is either Success (0) or Failure (1). + * + * @return the current status as {@link ZstackResponseCode} + */ + public ZstackResponseCode getStatus() { + return status; + } + + /** + * Status is either Success (0) or Failure (1). + * + * @param status the Status to set as {@link ZstackResponseCode} + */ + public void setStatus(ZstackResponseCode status) { + this.status = status; + } + + /** + * Endpoint of the device. + * + * @return the current endpoint as {@link int} + */ + public int getEndpoint() { + return endpoint; + } + + /** + * Endpoint of the device. + * + * @param endpoint the Endpoint to set as {@link int} + */ + public void setEndpoint(int endpoint) { + this.endpoint = endpoint; + } + + /** + * Specifies the transaction sequence number of the message. + * + * @return the current transId as {@link int} + */ + public int getTransId() { + return transId; + } + + /** + * Specifies the transaction sequence number of the message. + * + * @param transId the TransId to set as {@link int} + */ + public void setTransId(int transId) { + this.transId = transId; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(101); + builder.append("ZstackAfDataConfirmAreq [status="); + builder.append(status); + builder.append(", endpoint="); + builder.append(String.format("%02X", endpoint)); + builder.append(", transId="); + builder.append(String.format("%02X", transId)); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/af/ZstackAfDataRequestSreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/af/ZstackAfDataRequestSreq.java index fc19d27a9..7b8fa96d1 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/af/ZstackAfDataRequestSreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/af/ZstackAfDataRequestSreq.java @@ -1,290 +1,291 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.af; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.af.AfDataOptions; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; -import java.util.HashSet; -import java.util.Set; - -/** - * Class to implement the Z-Stack command AF_DATA_REQUEST. - *

- * This command is used by the App processor to build and send a message through AF layer. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackAfDataRequestSreq extends ZstackFrameRequest { - - /** - * Short address of the destination device. - */ - private int dstAddr; - - /** - * Endpoint of the destination device. - */ - private int destEndpoint; - - /** - * Endpoint of the source device. - */ - private int srcEndpoint; - - /** - * Specifies the cluster ID. - */ - private int clusterId; - - /** - * Specifies the transaction sequence number of the message. The corresponding AF_DATA_CONFIRM will have the same TransID. This - * can be useful if the application wishes to match up AF_DATA_REQUESTs with AF_DATA_CONFIRMs. - */ - private int transId; - - /** - * The transmit options field is organized as a bitmask. The following enumerates the values for the various supported bitmasks. - * For example, a value of 0x10 means that bit 4 is set. - *

- * Parameter allows multiple options so implemented as a {@link Set}. - */ - private Set options = new HashSet<>(); - - /** - * Specifies the list of Input Cluster Ids ( 2bytes each ). - */ - private int radius; - - /** - * 0-99 bytes data. Without any security (99 bytes), with NWK security (81 bytes), with NWK and APS security (64 bytes). - */ - private int[] data; - - /** - * Request constructor - */ - public ZstackAfDataRequestSreq() { - synchronousCommand = true; - } - - /** - * Short address of the destination device. - * - * @return the current dstAddr as {@link int} - */ - public int getDstAddr() { - return dstAddr; - } - - /** - * Short address of the destination device. - * - * @param dstAddr the DstAddr to set as {@link int} - */ - public void setDstAddr(int dstAddr) { - this.dstAddr = dstAddr; - } - - /** - * Endpoint of the destination device. - * - * @return the current destEndpoint as {@link int} - */ - public int getDestEndpoint() { - return destEndpoint; - } - - /** - * Endpoint of the destination device. - * - * @param destEndpoint the DestEndpoint to set as {@link int} - */ - public void setDestEndpoint(int destEndpoint) { - this.destEndpoint = destEndpoint; - } - - /** - * Endpoint of the source device. - * - * @return the current srcEndpoint as {@link int} - */ - public int getSrcEndpoint() { - return srcEndpoint; - } - - /** - * Endpoint of the source device. - * - * @param srcEndpoint the SrcEndpoint to set as {@link int} - */ - public void setSrcEndpoint(int srcEndpoint) { - this.srcEndpoint = srcEndpoint; - } - - /** - * Specifies the cluster ID. - * - * @return the current clusterId as {@link int} - */ - public int getClusterID() { - return clusterId; - } - - /** - * Specifies the cluster ID. - * - * @param clusterId the ClusterID to set as {@link int} - */ - public void setClusterID(int clusterId) { - this.clusterId = clusterId; - } - - /** - * Specifies the transaction sequence number of the message. The corresponding AF_DATA_CONFIRM will have the same TransID. This - * can be useful if the application wishes to match up AF_DATA_REQUESTs with AF_DATA_CONFIRMs. - * - * @return the current transId as {@link int} - */ - public int getTransID() { - return transId; - } - - /** - * Specifies the transaction sequence number of the message. The corresponding AF_DATA_CONFIRM will have the same TransID. This - * can be useful if the application wishes to match up AF_DATA_REQUESTs with AF_DATA_CONFIRMs. - * - * @param transId the TransID to set as {@link int} - */ - public void setTransID(int transId) { - this.transId = transId; - } - - /** - * The transmit options field is organized as a bitmask. The following enumerates the values for the various supported bitmasks. - * For example, a value of 0x10 means that bit 4 is set. - * - * @return the current options as {@link Set} of {@link AfDataOptions} - */ - public Set getOptions() { - return options; - } - - /** - * The transmit options field is organized as a bitmask. The following enumerates the values for the various supported bitmasks. - * For example, a value of 0x10 means that bit 4 is set. - * - * @param options the Options to add to the {@link Set} as {@link AfDataOptions} - */ - public void addOptions(AfDataOptions options) { - this.options.add(options); - } - - /** - * The transmit options field is organized as a bitmask. The following enumerates the values for the various supported bitmasks. - * For example, a value of 0x10 means that bit 4 is set. - * - * @param options the Options to remove to the {@link Set} as {@link AfDataOptions} - */ - public void removeOptions(AfDataOptions options) { - this.options.remove(options); - } - - /** - * Specifies the list of Input Cluster Ids ( 2bytes each ). - * - * @return the current radius as {@link int} - */ - public int getRadius() { - return radius; - } - - /** - * Specifies the list of Input Cluster Ids ( 2bytes each ). - * - * @param radius the Radius to set as {@link int} - */ - public void setRadius(int radius) { - this.radius = radius; - } - - /** - * 0-99 bytes data. Without any security (99 bytes), with NWK security (81 bytes), with NWK and APS security (64 bytes). - * - * @return the current data as {@link int[]} - */ - public int[] getData() { - return data; - } - - /** - * 0-99 bytes data. Without any security (99 bytes), with NWK security (81 bytes), with NWK and APS security (64 bytes). - * - * @param data the Data to set as {@link int[]} - */ - public void setData(int[] data) { - this.data = data; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_AF) && (response.getReqCmd1() == 0x01)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_AF, 0x01); - - // Serialize the fields - serializer.serializeUInt16(dstAddr); - serializer.serializeUInt8(destEndpoint); - serializer.serializeUInt8(srcEndpoint); - serializer.serializeUInt16(clusterId); - serializer.serializeUInt8(transId); - int tmpOptions = 0; - for (AfDataOptions value : options) { - tmpOptions += value.getKey(); - } - serializer.serializeUInt8(tmpOptions); - serializer.serializeUInt8(radius); - serializer.serializeUInt8(data.length); - serializer.serializeUInt8Array(data); - return getPayload(); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(251); - builder.append("ZstackAfDataRequestSreq [dstAddr="); - builder.append(String.format("%04X", dstAddr)); - builder.append(", destEndpoint="); - builder.append(String.format("%02X", destEndpoint)); - builder.append(", srcEndpoint="); - builder.append(String.format("%02X", srcEndpoint)); - builder.append(", clusterId="); - builder.append(String.format("%04X", clusterId)); - builder.append(", transId="); - builder.append(String.format("%02X", transId)); - builder.append(", options="); - builder.append(options); - builder.append(", radius="); - builder.append(radius); - builder.append(", data="); - for (int c = 0; c < data.length; c++) { - if (c > 0) { - builder.append(' '); - } - builder.append(String.format("%02X", data[c])); - } - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.af; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.af.AfDataOptions; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import java.util.HashSet; +import java.util.Set; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command AF_DATA_REQUEST. + *

+ * This command is used by the App processor to build and send a message through AF layer. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackAfDataRequestSreq extends ZstackFrameRequest { + + /** + * Short address of the destination device. + */ + private int dstAddr; + + /** + * Endpoint of the destination device. + */ + private int destEndpoint; + + /** + * Endpoint of the source device. + */ + private int srcEndpoint; + + /** + * Specifies the cluster ID. + */ + private int clusterId; + + /** + * Specifies the transaction sequence number of the message. The corresponding AF_DATA_CONFIRM will have the same TransID. This + * can be useful if the application wishes to match up AF_DATA_REQUESTs with AF_DATA_CONFIRMs. + */ + private int transId; + + /** + * The transmit options field is organized as a bitmask. The following enumerates the values for the various supported bitmasks. + * For example, a value of 0x10 means that bit 4 is set. + *

+ * Parameter allows multiple options so implemented as a {@link Set}. + */ + private Set options = new HashSet<>(); + + /** + * Specifies the list of Input Cluster Ids ( 2bytes each ). + */ + private int radius; + + /** + * 0-99 bytes data. Without any security (99 bytes), with NWK security (81 bytes), with NWK and APS security (64 bytes). + */ + private int[] data; + + /** + * Request constructor + */ + public ZstackAfDataRequestSreq() { + synchronousCommand = true; + } + + /** + * Short address of the destination device. + * + * @return the current dstAddr as {@link int} + */ + public int getDstAddr() { + return dstAddr; + } + + /** + * Short address of the destination device. + * + * @param dstAddr the DstAddr to set as {@link int} + */ + public void setDstAddr(int dstAddr) { + this.dstAddr = dstAddr; + } + + /** + * Endpoint of the destination device. + * + * @return the current destEndpoint as {@link int} + */ + public int getDestEndpoint() { + return destEndpoint; + } + + /** + * Endpoint of the destination device. + * + * @param destEndpoint the DestEndpoint to set as {@link int} + */ + public void setDestEndpoint(int destEndpoint) { + this.destEndpoint = destEndpoint; + } + + /** + * Endpoint of the source device. + * + * @return the current srcEndpoint as {@link int} + */ + public int getSrcEndpoint() { + return srcEndpoint; + } + + /** + * Endpoint of the source device. + * + * @param srcEndpoint the SrcEndpoint to set as {@link int} + */ + public void setSrcEndpoint(int srcEndpoint) { + this.srcEndpoint = srcEndpoint; + } + + /** + * Specifies the cluster ID. + * + * @return the current clusterId as {@link int} + */ + public int getClusterID() { + return clusterId; + } + + /** + * Specifies the cluster ID. + * + * @param clusterId the ClusterID to set as {@link int} + */ + public void setClusterID(int clusterId) { + this.clusterId = clusterId; + } + + /** + * Specifies the transaction sequence number of the message. The corresponding AF_DATA_CONFIRM will have the same TransID. This + * can be useful if the application wishes to match up AF_DATA_REQUESTs with AF_DATA_CONFIRMs. + * + * @return the current transId as {@link int} + */ + public int getTransID() { + return transId; + } + + /** + * Specifies the transaction sequence number of the message. The corresponding AF_DATA_CONFIRM will have the same TransID. This + * can be useful if the application wishes to match up AF_DATA_REQUESTs with AF_DATA_CONFIRMs. + * + * @param transId the TransID to set as {@link int} + */ + public void setTransID(int transId) { + this.transId = transId; + } + + /** + * The transmit options field is organized as a bitmask. The following enumerates the values for the various supported bitmasks. + * For example, a value of 0x10 means that bit 4 is set. + * + * @return the current options as {@link Set} of {@link AfDataOptions} + */ + public Set getOptions() { + return options; + } + + /** + * The transmit options field is organized as a bitmask. The following enumerates the values for the various supported bitmasks. + * For example, a value of 0x10 means that bit 4 is set. + * + * @param options the Options to add to the {@link Set} as {@link AfDataOptions} + */ + public void addOptions(AfDataOptions options) { + this.options.add(options); + } + + /** + * The transmit options field is organized as a bitmask. The following enumerates the values for the various supported bitmasks. + * For example, a value of 0x10 means that bit 4 is set. + * + * @param options the Options to remove to the {@link Set} as {@link AfDataOptions} + */ + public void removeOptions(AfDataOptions options) { + this.options.remove(options); + } + + /** + * Specifies the list of Input Cluster Ids ( 2bytes each ). + * + * @return the current radius as {@link int} + */ + public int getRadius() { + return radius; + } + + /** + * Specifies the list of Input Cluster Ids ( 2bytes each ). + * + * @param radius the Radius to set as {@link int} + */ + public void setRadius(int radius) { + this.radius = radius; + } + + /** + * 0-99 bytes data. Without any security (99 bytes), with NWK security (81 bytes), with NWK and APS security (64 bytes). + * + * @return the current data as {@link int[]} + */ + public int[] getData() { + return data; + } + + /** + * 0-99 bytes data. Without any security (99 bytes), with NWK security (81 bytes), with NWK and APS security (64 bytes). + * + * @param data the Data to set as {@link int[]} + */ + public void setData(int[] data) { + this.data = data; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_AF) && (response.getReqCmd1() == 0x01)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_AF, 0x01); + + // Serialize the fields + serializer.serializeUInt16(dstAddr); + serializer.serializeUInt8(destEndpoint); + serializer.serializeUInt8(srcEndpoint); + serializer.serializeUInt16(clusterId); + serializer.serializeUInt8(transId); + int tmpOptions = 0; + for (AfDataOptions value : options) { + tmpOptions += value.getKey(); + } + serializer.serializeUInt8(tmpOptions); + serializer.serializeUInt8(radius); + serializer.serializeUInt8(data.length); + serializer.serializeUInt8Array(data); + return getPayload(); + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(251); + builder.append("ZstackAfDataRequestSreq [dstAddr="); + builder.append(String.format("%04X", dstAddr)); + builder.append(", destEndpoint="); + builder.append(String.format("%02X", destEndpoint)); + builder.append(", srcEndpoint="); + builder.append(String.format("%02X", srcEndpoint)); + builder.append(", clusterId="); + builder.append(String.format("%04X", clusterId)); + builder.append(", transId="); + builder.append(String.format("%02X", transId)); + builder.append(", options="); + builder.append(options); + builder.append(", radius="); + builder.append(radius); + builder.append(", data="); + for (int c = 0; c < data.length; c++) { + if (c > 0) { + builder.append(' '); + } + builder.append(String.format("%02X", data[c])); + } + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/af/ZstackAfDataRequestSrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/af/ZstackAfDataRequestSrsp.java index afcc1c318..bf404068a 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/af/ZstackAfDataRequestSrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/af/ZstackAfDataRequestSrsp.java @@ -1,68 +1,69 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.af; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; - -/** - * Class to implement the Z-Stack command AF_DATA_REQUEST. - *

- * This command is used by the App processor to build and send a message through AF layer. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackAfDataRequestSrsp extends ZstackFrameResponse { - - /** - * Status is either Success (0) or Failure (1). - */ - private ZstackResponseCode status; - - /** - * Response and Handler constructor - */ - public ZstackAfDataRequestSrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); - } - - /** - * Status is either Success (0) or Failure (1). - * - * @return the current status as {@link ZstackResponseCode} - */ - public ZstackResponseCode getStatus() { - return status; - } - - /** - * Status is either Success (0) or Failure (1). - * - * @param status the Status to set as {@link ZstackResponseCode} - */ - public void setStatus(ZstackResponseCode status) { - this.status = status; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(51); - builder.append("ZstackAfDataRequestSrsp [status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.af; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command AF_DATA_REQUEST. + *

+ * This command is used by the App processor to build and send a message through AF layer. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackAfDataRequestSrsp extends ZstackFrameResponse { + + /** + * Status is either Success (0) or Failure (1). + */ + private ZstackResponseCode status; + + /** + * Response and Handler constructor + */ + public ZstackAfDataRequestSrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); + } + + /** + * Status is either Success (0) or Failure (1). + * + * @return the current status as {@link ZstackResponseCode} + */ + public ZstackResponseCode getStatus() { + return status; + } + + /** + * Status is either Success (0) or Failure (1). + * + * @param status the Status to set as {@link ZstackResponseCode} + */ + public void setStatus(ZstackResponseCode status) { + this.status = status; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(51); + builder.append("ZstackAfDataRequestSrsp [status="); + builder.append(status); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/af/ZstackAfIncomingMsgAreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/af/ZstackAfIncomingMsgAreq.java index d985a7e38..b461d84ec 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/af/ZstackAfIncomingMsgAreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/af/ZstackAfIncomingMsgAreq.java @@ -1,334 +1,335 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.af; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; - -/** - * Class to implement the Z-Stack command AF_INCOMING_MSG. - *

- * This callback message is in response to incoming data to any of the registered endpoints on this device. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackAfIncomingMsgAreq extends ZstackFrameResponse { - - /** - * Specifies the group ID of the device. - */ - private int groupId; - - /** - * Specifies the cluster ID. - */ - private int clusterId; - - /** - * Specifies the ZigBee network address of the source device sending the message. - */ - private int srcAddr; - - /** - * Specifies the source endpoint of the message. - */ - private int srcEndpoint; - - /** - * Specifies the destination endpoint of the message. - */ - private int destEndpoint; - - /** - * Specifies if the message was a broadcast or not. - */ - private boolean wasBroadcast; - - /** - * Indicates the link quality measured during reception. - */ - private int linkQuality; - - /** - * Specifies if the security is used or not. - */ - private boolean securityUse; - - /** - * Specifies the timestamp of the message. - */ - private int timeStamp; - - /** - * Specifies transaction sequence number of the message. - */ - private int seqNumber; - - /** - * Contains 0 to 99 bytes of data. Without any security (99 bytes), with NWK security (81 bytes), with NWK and APS security (64 - * bytes). - */ - private int[] data; - - /** - * Response and Handler constructor - */ - public ZstackAfIncomingMsgAreq(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - // Deserialize the fields - groupId = deserializer.deserializeUInt16(); - clusterId = deserializer.deserializeUInt16(); - srcAddr = deserializer.deserializeUInt16(); - srcEndpoint = deserializer.deserializeUInt8(); - destEndpoint = deserializer.deserializeUInt8(); - wasBroadcast = deserializer.deserializeBoolean(); - linkQuality = deserializer.deserializeUInt8(); - securityUse = deserializer.deserializeBoolean(); - timeStamp = deserializer.deserializeUInt32(); - seqNumber = deserializer.deserializeUInt8(); - int len = deserializer.deserializeUInt8(); - data = deserializer.deserializeUInt8Array(len); - } - - /** - * Specifies the group ID of the device. - * - * @return the current groupId as {@link int} - */ - public int getGroupId() { - return groupId; - } - - /** - * Specifies the group ID of the device. - * - * @param groupId the GroupId to set as {@link int} - */ - public void setGroupId(int groupId) { - this.groupId = groupId; - } - - /** - * Specifies the cluster ID. - * - * @return the current clusterId as {@link int} - */ - public int getClusterId() { - return clusterId; - } - - /** - * Specifies the cluster ID. - * - * @param clusterId the ClusterId to set as {@link int} - */ - public void setClusterId(int clusterId) { - this.clusterId = clusterId; - } - - /** - * Specifies the ZigBee network address of the source device sending the message. - * - * @return the current srcAddr as {@link int} - */ - public int getSrcAddr() { - return srcAddr; - } - - /** - * Specifies the ZigBee network address of the source device sending the message. - * - * @param srcAddr the SrcAddr to set as {@link int} - */ - public void setSrcAddr(int srcAddr) { - this.srcAddr = srcAddr; - } - - /** - * Specifies the source endpoint of the message. - * - * @return the current srcEndpoint as {@link int} - */ - public int getSrcEndpoint() { - return srcEndpoint; - } - - /** - * Specifies the source endpoint of the message. - * - * @param srcEndpoint the SrcEndpoint to set as {@link int} - */ - public void setSrcEndpoint(int srcEndpoint) { - this.srcEndpoint = srcEndpoint; - } - - /** - * Specifies the destination endpoint of the message. - * - * @return the current destEndpoint as {@link int} - */ - public int getDestEndpoint() { - return destEndpoint; - } - - /** - * Specifies the destination endpoint of the message. - * - * @param destEndpoint the DestEndpoint to set as {@link int} - */ - public void setDestEndpoint(int destEndpoint) { - this.destEndpoint = destEndpoint; - } - - /** - * Specifies if the message was a broadcast or not. - * - * @return the current wasBroadcast as {@link boolean} - */ - public boolean getWasBroadcast() { - return wasBroadcast; - } - - /** - * Specifies if the message was a broadcast or not. - * - * @param wasBroadcast the WasBroadcast to set as {@link boolean} - */ - public void setWasBroadcast(boolean wasBroadcast) { - this.wasBroadcast = wasBroadcast; - } - - /** - * Indicates the link quality measured during reception. - * - * @return the current linkQuality as {@link int} - */ - public int getLinkQuality() { - return linkQuality; - } - - /** - * Indicates the link quality measured during reception. - * - * @param linkQuality the LinkQuality to set as {@link int} - */ - public void setLinkQuality(int linkQuality) { - this.linkQuality = linkQuality; - } - - /** - * Specifies if the security is used or not. - * - * @return the current securityUse as {@link boolean} - */ - public boolean getSecurityUse() { - return securityUse; - } - - /** - * Specifies if the security is used or not. - * - * @param securityUse the SecurityUse to set as {@link boolean} - */ - public void setSecurityUse(boolean securityUse) { - this.securityUse = securityUse; - } - - /** - * Specifies the timestamp of the message. - * - * @return the current timeStamp as {@link int} - */ - public int getTimeStamp() { - return timeStamp; - } - - /** - * Specifies the timestamp of the message. - * - * @param timeStamp the TimeStamp to set as {@link int} - */ - public void setTimeStamp(int timeStamp) { - this.timeStamp = timeStamp; - } - - /** - * Specifies transaction sequence number of the message. - * - * @return the current seqNumber as {@link int} - */ - public int getSeqNumber() { - return seqNumber; - } - - /** - * Specifies transaction sequence number of the message. - * - * @param seqNumber the SeqNumber to set as {@link int} - */ - public void setSeqNumber(int seqNumber) { - this.seqNumber = seqNumber; - } - - /** - * Contains 0 to 99 bytes of data. Without any security (99 bytes), with NWK security (81 bytes), with NWK and APS security (64 - * bytes). - * - * @return the current data as {@link int[]} - */ - public int[] getData() { - return data; - } - - /** - * Contains 0 to 99 bytes of data. Without any security (99 bytes), with NWK security (81 bytes), with NWK and APS security (64 - * bytes). - * - * @param data the Data to set as {@link int[]} - */ - public void setData(int[] data) { - this.data = data; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(326); - builder.append("ZstackAfIncomingMsgAreq [groupId="); - builder.append(String.format("%04X", groupId)); - builder.append(", clusterId="); - builder.append(String.format("%04X", clusterId)); - builder.append(", srcAddr="); - builder.append(String.format("%04X", srcAddr)); - builder.append(", srcEndpoint="); - builder.append(String.format("%02X", srcEndpoint)); - builder.append(", destEndpoint="); - builder.append(String.format("%02X", destEndpoint)); - builder.append(", wasBroadcast="); - builder.append(wasBroadcast); - builder.append(", linkQuality="); - builder.append(linkQuality); - builder.append(", securityUse="); - builder.append(securityUse); - builder.append(", timeStamp="); - builder.append(String.format("%08X", timeStamp)); - builder.append(", seqNumber="); - builder.append(String.format("%02X", seqNumber)); - builder.append(", data="); - for (int c = 0; c < data.length; c++) { - if (c > 0) { - builder.append(' '); - } - builder.append(String.format("%02X", data[c])); - } - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.af; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command AF_INCOMING_MSG. + *

+ * This callback message is in response to incoming data to any of the registered endpoints on this device. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackAfIncomingMsgAreq extends ZstackFrameResponse { + + /** + * Specifies the group ID of the device. + */ + private int groupId; + + /** + * Specifies the cluster ID. + */ + private int clusterId; + + /** + * Specifies the ZigBee network address of the source device sending the message. + */ + private int srcAddr; + + /** + * Specifies the source endpoint of the message. + */ + private int srcEndpoint; + + /** + * Specifies the destination endpoint of the message. + */ + private int destEndpoint; + + /** + * Specifies if the message was a broadcast or not. + */ + private boolean wasBroadcast; + + /** + * Indicates the link quality measured during reception. + */ + private int linkQuality; + + /** + * Specifies if the security is used or not. + */ + private boolean securityUse; + + /** + * Specifies the timestamp of the message. + */ + private int timeStamp; + + /** + * Specifies transaction sequence number of the message. + */ + private int seqNumber; + + /** + * Contains 0 to 99 bytes of data. Without any security (99 bytes), with NWK security (81 bytes), with NWK and APS security (64 + * bytes). + */ + private int[] data; + + /** + * Response and Handler constructor + */ + public ZstackAfIncomingMsgAreq(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + // Deserialize the fields + groupId = deserializer.deserializeUInt16(); + clusterId = deserializer.deserializeUInt16(); + srcAddr = deserializer.deserializeUInt16(); + srcEndpoint = deserializer.deserializeUInt8(); + destEndpoint = deserializer.deserializeUInt8(); + wasBroadcast = deserializer.deserializeBoolean(); + linkQuality = deserializer.deserializeUInt8(); + securityUse = deserializer.deserializeBoolean(); + timeStamp = deserializer.deserializeUInt32(); + seqNumber = deserializer.deserializeUInt8(); + int len = deserializer.deserializeUInt8(); + data = deserializer.deserializeUInt8Array(len); + } + + /** + * Specifies the group ID of the device. + * + * @return the current groupId as {@link int} + */ + public int getGroupId() { + return groupId; + } + + /** + * Specifies the group ID of the device. + * + * @param groupId the GroupId to set as {@link int} + */ + public void setGroupId(int groupId) { + this.groupId = groupId; + } + + /** + * Specifies the cluster ID. + * + * @return the current clusterId as {@link int} + */ + public int getClusterId() { + return clusterId; + } + + /** + * Specifies the cluster ID. + * + * @param clusterId the ClusterId to set as {@link int} + */ + public void setClusterId(int clusterId) { + this.clusterId = clusterId; + } + + /** + * Specifies the ZigBee network address of the source device sending the message. + * + * @return the current srcAddr as {@link int} + */ + public int getSrcAddr() { + return srcAddr; + } + + /** + * Specifies the ZigBee network address of the source device sending the message. + * + * @param srcAddr the SrcAddr to set as {@link int} + */ + public void setSrcAddr(int srcAddr) { + this.srcAddr = srcAddr; + } + + /** + * Specifies the source endpoint of the message. + * + * @return the current srcEndpoint as {@link int} + */ + public int getSrcEndpoint() { + return srcEndpoint; + } + + /** + * Specifies the source endpoint of the message. + * + * @param srcEndpoint the SrcEndpoint to set as {@link int} + */ + public void setSrcEndpoint(int srcEndpoint) { + this.srcEndpoint = srcEndpoint; + } + + /** + * Specifies the destination endpoint of the message. + * + * @return the current destEndpoint as {@link int} + */ + public int getDestEndpoint() { + return destEndpoint; + } + + /** + * Specifies the destination endpoint of the message. + * + * @param destEndpoint the DestEndpoint to set as {@link int} + */ + public void setDestEndpoint(int destEndpoint) { + this.destEndpoint = destEndpoint; + } + + /** + * Specifies if the message was a broadcast or not. + * + * @return the current wasBroadcast as {@link boolean} + */ + public boolean getWasBroadcast() { + return wasBroadcast; + } + + /** + * Specifies if the message was a broadcast or not. + * + * @param wasBroadcast the WasBroadcast to set as {@link boolean} + */ + public void setWasBroadcast(boolean wasBroadcast) { + this.wasBroadcast = wasBroadcast; + } + + /** + * Indicates the link quality measured during reception. + * + * @return the current linkQuality as {@link int} + */ + public int getLinkQuality() { + return linkQuality; + } + + /** + * Indicates the link quality measured during reception. + * + * @param linkQuality the LinkQuality to set as {@link int} + */ + public void setLinkQuality(int linkQuality) { + this.linkQuality = linkQuality; + } + + /** + * Specifies if the security is used or not. + * + * @return the current securityUse as {@link boolean} + */ + public boolean getSecurityUse() { + return securityUse; + } + + /** + * Specifies if the security is used or not. + * + * @param securityUse the SecurityUse to set as {@link boolean} + */ + public void setSecurityUse(boolean securityUse) { + this.securityUse = securityUse; + } + + /** + * Specifies the timestamp of the message. + * + * @return the current timeStamp as {@link int} + */ + public int getTimeStamp() { + return timeStamp; + } + + /** + * Specifies the timestamp of the message. + * + * @param timeStamp the TimeStamp to set as {@link int} + */ + public void setTimeStamp(int timeStamp) { + this.timeStamp = timeStamp; + } + + /** + * Specifies transaction sequence number of the message. + * + * @return the current seqNumber as {@link int} + */ + public int getSeqNumber() { + return seqNumber; + } + + /** + * Specifies transaction sequence number of the message. + * + * @param seqNumber the SeqNumber to set as {@link int} + */ + public void setSeqNumber(int seqNumber) { + this.seqNumber = seqNumber; + } + + /** + * Contains 0 to 99 bytes of data. Without any security (99 bytes), with NWK security (81 bytes), with NWK and APS security (64 + * bytes). + * + * @return the current data as {@link int[]} + */ + public int[] getData() { + return data; + } + + /** + * Contains 0 to 99 bytes of data. Without any security (99 bytes), with NWK security (81 bytes), with NWK and APS security (64 + * bytes). + * + * @param data the Data to set as {@link int[]} + */ + public void setData(int[] data) { + this.data = data; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(326); + builder.append("ZstackAfIncomingMsgAreq [groupId="); + builder.append(String.format("%04X", groupId)); + builder.append(", clusterId="); + builder.append(String.format("%04X", clusterId)); + builder.append(", srcAddr="); + builder.append(String.format("%04X", srcAddr)); + builder.append(", srcEndpoint="); + builder.append(String.format("%02X", srcEndpoint)); + builder.append(", destEndpoint="); + builder.append(String.format("%02X", destEndpoint)); + builder.append(", wasBroadcast="); + builder.append(wasBroadcast); + builder.append(", linkQuality="); + builder.append(linkQuality); + builder.append(", securityUse="); + builder.append(securityUse); + builder.append(", timeStamp="); + builder.append(String.format("%08X", timeStamp)); + builder.append(", seqNumber="); + builder.append(String.format("%02X", seqNumber)); + builder.append(", data="); + for (int c = 0; c < data.length; c++) { + if (c > 0) { + builder.append(' '); + } + builder.append(String.format("%02X", data[c])); + } + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/af/ZstackAfRegisterSreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/af/ZstackAfRegisterSreq.java index f9941b60b..1b45701a8 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/af/ZstackAfRegisterSreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/af/ZstackAfRegisterSreq.java @@ -1,248 +1,249 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.af; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; - -/** - * Class to implement the Z-Stack command AF_REGISTER. - *

- * This command enables the host processor to register an application’s endpoint description (and its simple descriptor). - * Multiple endpoints may be registered with the AF by making multiple calls to AF_REGISTER. This could be useful in the case where - * the device needs to support multiple application profiles, where each AF_REGISTER call would register a unique endpoint - * description per application profile. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackAfRegisterSreq extends ZstackFrameRequest { - - /** - * Specifies the endpoint of this simple descriptor. - */ - private int endPoint; - - /** - * Specifies the profile id of the application. - */ - private int appProfId; - - /** - * Specifies the device description id for this endpoint. - */ - private int appDeviceId; - - /** - * Specifies the device version number. - */ - private int appDevVer; - - /** - * Specifies latency. For ZigBee the only applicable value is 0x00. 0x00-No latency 0x01-fast beacons 0x02-slow beacons - */ - private int latencyReq; - - /** - * Specifies the list of Input Cluster Ids (2 bytes each). - */ - private int[] appInClusterList; - - /** - * Specifies the list of Output Cluster Ids (2 bytes each) - */ - private int[] appOutClusterList; - - /** - * Request constructor - */ - public ZstackAfRegisterSreq() { - synchronousCommand = true; - } - - /** - * Specifies the endpoint of this simple descriptor. - * - * @return the current endPoint as {@link int} - */ - public int getEndPoint() { - return endPoint; - } - - /** - * Specifies the endpoint of this simple descriptor. - * - * @param endPoint the EndPoint to set as {@link int} - */ - public void setEndPoint(int endPoint) { - this.endPoint = endPoint; - } - - /** - * Specifies the profile id of the application. - * - * @return the current appProfId as {@link int} - */ - public int getAppProfId() { - return appProfId; - } - - /** - * Specifies the profile id of the application. - * - * @param appProfId the AppProfId to set as {@link int} - */ - public void setAppProfId(int appProfId) { - this.appProfId = appProfId; - } - - /** - * Specifies the device description id for this endpoint. - * - * @return the current appDeviceId as {@link int} - */ - public int getAppDeviceId() { - return appDeviceId; - } - - /** - * Specifies the device description id for this endpoint. - * - * @param appDeviceId the AppDeviceId to set as {@link int} - */ - public void setAppDeviceId(int appDeviceId) { - this.appDeviceId = appDeviceId; - } - - /** - * Specifies the device version number. - * - * @return the current appDevVer as {@link int} - */ - public int getAppDevVer() { - return appDevVer; - } - - /** - * Specifies the device version number. - * - * @param appDevVer the AppDevVer to set as {@link int} - */ - public void setAppDevVer(int appDevVer) { - this.appDevVer = appDevVer; - } - - /** - * Specifies latency. For ZigBee the only applicable value is 0x00. 0x00-No latency 0x01-fast beacons 0x02-slow beacons - * - * @return the current latencyReq as {@link int} - */ - public int getLatencyReq() { - return latencyReq; - } - - /** - * Specifies latency. For ZigBee the only applicable value is 0x00. 0x00-No latency 0x01-fast beacons 0x02-slow beacons - * - * @param latencyReq the LatencyReq to set as {@link int} - */ - public void setLatencyReq(int latencyReq) { - this.latencyReq = latencyReq; - } - - /** - * Specifies the list of Input Cluster Ids (2 bytes each). - * - * @return the current appInClusterList as {@link int[]} - */ - public int[] getAppInClusterList() { - return appInClusterList; - } - - /** - * Specifies the list of Input Cluster Ids (2 bytes each). - * - * @param appInClusterList the AppInClusterList to set as {@link int[]} - */ - public void setAppInClusterList(int[] appInClusterList) { - this.appInClusterList = appInClusterList; - } - - /** - * Specifies the list of Output Cluster Ids (2 bytes each) - * - * @return the current appOutClusterList as {@link int[]} - */ - public int[] getAppOutClusterList() { - return appOutClusterList; - } - - /** - * Specifies the list of Output Cluster Ids (2 bytes each) - * - * @param appOutClusterList the AppOutClusterList to set as {@link int[]} - */ - public void setAppOutClusterList(int[] appOutClusterList) { - this.appOutClusterList = appOutClusterList; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_AF) && (response.getReqCmd1() == 0x00)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_AF, 0x00); - - // Serialize the fields - serializer.serializeUInt8(endPoint); - serializer.serializeUInt16(appProfId); - serializer.serializeUInt16(appDeviceId); - serializer.serializeUInt8(appDevVer); - serializer.serializeUInt8(latencyReq); - serializer.serializeUInt8(appInClusterList.length); - serializer.serializeUInt16Array(appInClusterList); - serializer.serializeUInt8(appOutClusterList.length); - serializer.serializeUInt16Array(appOutClusterList); - return getPayload(); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(248); - builder.append("ZstackAfRegisterSreq [endPoint="); - builder.append(String.format("%02X", endPoint)); - builder.append(", appProfId="); - builder.append(String.format("%04X", appProfId)); - builder.append(", appDeviceId="); - builder.append(appDeviceId); - builder.append(", appDevVer="); - builder.append(appDevVer); - builder.append(", latencyReq="); - builder.append(latencyReq); - builder.append(", appInClusterList="); - for (int c = 0; c < appInClusterList.length; c++) { - if (c > 0) { - builder.append(' '); - } - builder.append(String.format("%04X", appInClusterList[c])); - } - builder.append(", appOutClusterList="); - for (int c = 0; c < appOutClusterList.length; c++) { - if (c > 0) { - builder.append(' '); - } - builder.append(String.format("%04X", appOutClusterList[c])); - } - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.af; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command AF_REGISTER. + *

+ * This command enables the host processor to register an application’s endpoint description (and its simple descriptor). + * Multiple endpoints may be registered with the AF by making multiple calls to AF_REGISTER. This could be useful in the case where + * the device needs to support multiple application profiles, where each AF_REGISTER call would register a unique endpoint + * description per application profile. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackAfRegisterSreq extends ZstackFrameRequest { + + /** + * Specifies the endpoint of this simple descriptor. + */ + private int endPoint; + + /** + * Specifies the profile id of the application. + */ + private int appProfId; + + /** + * Specifies the device description id for this endpoint. + */ + private int appDeviceId; + + /** + * Specifies the device version number. + */ + private int appDevVer; + + /** + * Specifies latency. For ZigBee the only applicable value is 0x00. 0x00-No latency 0x01-fast beacons 0x02-slow beacons + */ + private int latencyReq; + + /** + * Specifies the list of Input Cluster Ids (2 bytes each). + */ + private int[] appInClusterList; + + /** + * Specifies the list of Output Cluster Ids (2 bytes each) + */ + private int[] appOutClusterList; + + /** + * Request constructor + */ + public ZstackAfRegisterSreq() { + synchronousCommand = true; + } + + /** + * Specifies the endpoint of this simple descriptor. + * + * @return the current endPoint as {@link int} + */ + public int getEndPoint() { + return endPoint; + } + + /** + * Specifies the endpoint of this simple descriptor. + * + * @param endPoint the EndPoint to set as {@link int} + */ + public void setEndPoint(int endPoint) { + this.endPoint = endPoint; + } + + /** + * Specifies the profile id of the application. + * + * @return the current appProfId as {@link int} + */ + public int getAppProfId() { + return appProfId; + } + + /** + * Specifies the profile id of the application. + * + * @param appProfId the AppProfId to set as {@link int} + */ + public void setAppProfId(int appProfId) { + this.appProfId = appProfId; + } + + /** + * Specifies the device description id for this endpoint. + * + * @return the current appDeviceId as {@link int} + */ + public int getAppDeviceId() { + return appDeviceId; + } + + /** + * Specifies the device description id for this endpoint. + * + * @param appDeviceId the AppDeviceId to set as {@link int} + */ + public void setAppDeviceId(int appDeviceId) { + this.appDeviceId = appDeviceId; + } + + /** + * Specifies the device version number. + * + * @return the current appDevVer as {@link int} + */ + public int getAppDevVer() { + return appDevVer; + } + + /** + * Specifies the device version number. + * + * @param appDevVer the AppDevVer to set as {@link int} + */ + public void setAppDevVer(int appDevVer) { + this.appDevVer = appDevVer; + } + + /** + * Specifies latency. For ZigBee the only applicable value is 0x00. 0x00-No latency 0x01-fast beacons 0x02-slow beacons + * + * @return the current latencyReq as {@link int} + */ + public int getLatencyReq() { + return latencyReq; + } + + /** + * Specifies latency. For ZigBee the only applicable value is 0x00. 0x00-No latency 0x01-fast beacons 0x02-slow beacons + * + * @param latencyReq the LatencyReq to set as {@link int} + */ + public void setLatencyReq(int latencyReq) { + this.latencyReq = latencyReq; + } + + /** + * Specifies the list of Input Cluster Ids (2 bytes each). + * + * @return the current appInClusterList as {@link int[]} + */ + public int[] getAppInClusterList() { + return appInClusterList; + } + + /** + * Specifies the list of Input Cluster Ids (2 bytes each). + * + * @param appInClusterList the AppInClusterList to set as {@link int[]} + */ + public void setAppInClusterList(int[] appInClusterList) { + this.appInClusterList = appInClusterList; + } + + /** + * Specifies the list of Output Cluster Ids (2 bytes each) + * + * @return the current appOutClusterList as {@link int[]} + */ + public int[] getAppOutClusterList() { + return appOutClusterList; + } + + /** + * Specifies the list of Output Cluster Ids (2 bytes each) + * + * @param appOutClusterList the AppOutClusterList to set as {@link int[]} + */ + public void setAppOutClusterList(int[] appOutClusterList) { + this.appOutClusterList = appOutClusterList; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_AF) && (response.getReqCmd1() == 0x00)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_AF, 0x00); + + // Serialize the fields + serializer.serializeUInt8(endPoint); + serializer.serializeUInt16(appProfId); + serializer.serializeUInt16(appDeviceId); + serializer.serializeUInt8(appDevVer); + serializer.serializeUInt8(latencyReq); + serializer.serializeUInt8(appInClusterList.length); + serializer.serializeUInt16Array(appInClusterList); + serializer.serializeUInt8(appOutClusterList.length); + serializer.serializeUInt16Array(appOutClusterList); + return getPayload(); + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(248); + builder.append("ZstackAfRegisterSreq [endPoint="); + builder.append(String.format("%02X", endPoint)); + builder.append(", appProfId="); + builder.append(String.format("%04X", appProfId)); + builder.append(", appDeviceId="); + builder.append(appDeviceId); + builder.append(", appDevVer="); + builder.append(appDevVer); + builder.append(", latencyReq="); + builder.append(latencyReq); + builder.append(", appInClusterList="); + for (int c = 0; c < appInClusterList.length; c++) { + if (c > 0) { + builder.append(' '); + } + builder.append(String.format("%04X", appInClusterList[c])); + } + builder.append(", appOutClusterList="); + for (int c = 0; c < appOutClusterList.length; c++) { + if (c > 0) { + builder.append(' '); + } + builder.append(String.format("%04X", appOutClusterList[c])); + } + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/af/ZstackAfRegisterSrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/af/ZstackAfRegisterSrsp.java index 4d9a261d2..2ae478fb9 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/af/ZstackAfRegisterSrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/af/ZstackAfRegisterSrsp.java @@ -1,71 +1,72 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.af; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; - -/** - * Class to implement the Z-Stack command AF_REGISTER. - *

- * This command enables the host processor to register an application’s endpoint description (and its simple descriptor). - * Multiple endpoints may be registered with the AF by making multiple calls to AF_REGISTER. This could be useful in the case where - * the device needs to support multiple application profiles, where each AF_REGISTER call would register a unique endpoint - * description per application profile. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackAfRegisterSrsp extends ZstackFrameResponse { - - /** - * Status is either Success (0) or Failure (1). - */ - private ZstackResponseCode status; - - /** - * Response and Handler constructor - */ - public ZstackAfRegisterSrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); - } - - /** - * Status is either Success (0) or Failure (1). - * - * @return the current status as {@link ZstackResponseCode} - */ - public ZstackResponseCode getStatus() { - return status; - } - - /** - * Status is either Success (0) or Failure (1). - * - * @param status the Status to set as {@link ZstackResponseCode} - */ - public void setStatus(ZstackResponseCode status) { - this.status = status; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(48); - builder.append("ZstackAfRegisterSrsp [status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.af; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command AF_REGISTER. + *

+ * This command enables the host processor to register an application’s endpoint description (and its simple descriptor). + * Multiple endpoints may be registered with the AF by making multiple calls to AF_REGISTER. This could be useful in the case where + * the device needs to support multiple application profiles, where each AF_REGISTER call would register a unique endpoint + * description per application profile. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackAfRegisterSrsp extends ZstackFrameResponse { + + /** + * Status is either Success (0) or Failure (1). + */ + private ZstackResponseCode status; + + /** + * Response and Handler constructor + */ + public ZstackAfRegisterSrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); + } + + /** + * Status is either Success (0) or Failure (1). + * + * @return the current status as {@link ZstackResponseCode} + */ + public ZstackResponseCode getStatus() { + return status; + } + + /** + * Status is either Success (0) or Failure (1). + * + * @param status the Status to set as {@link ZstackResponseCode} + */ + public void setStatus(ZstackResponseCode status) { + this.status = status; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(48); + builder.append("ZstackAfRegisterSrsp [status="); + builder.append(status); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbAddInstallcodeSreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbAddInstallcodeSreq.java index f86dc6f75..5aff8234c 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbAddInstallcodeSreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbAddInstallcodeSreq.java @@ -1,134 +1,135 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.appcnf; - -import com.zsmartsystems.zigbee.IeeeAddress; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; -import com.zsmartsystems.zigbee.security.ZigBeeKey; - -/** - * Class to implement the Z-Stack command APP_CNF_BDB_ADD_INSTALLCODE. - *

- * Add a preconfigured key (plain key or IC) to Trust Center device. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackAppCnfBdbAddInstallcodeSreq extends ZstackFrameRequest { - - /** - * This value specifies the format in which the install code is being added. The following list contains the values corresponding - * to the supported formats: 0x01 Install Code + CRC 0x02 Key derived from Install Code - */ - private ZstackInstallCodeFormat installCodeFormat; - - /** - * Full IEEE address for the device joining the network - */ - private IeeeAddress ieeeAddress; - - /** - * 16 Bytes for the Key derived from the IC. 18 Bytes for the Install Code +CRC - */ - private ZigBeeKey installCode; - - /** - * Request constructor - */ - public ZstackAppCnfBdbAddInstallcodeSreq() { - synchronousCommand = true; - } - - /** - * This value specifies the format in which the install code is being added. The following list contains the values corresponding - * to the supported formats: 0x01 Install Code + CRC 0x02 Key derived from Install Code - * - * @return the current installCodeFormat as {@link ZstackInstallCodeFormat} - */ - public ZstackInstallCodeFormat getInstallCodeFormat() { - return installCodeFormat; - } - - /** - * This value specifies the format in which the install code is being added. The following list contains the values corresponding - * to the supported formats: 0x01 Install Code + CRC 0x02 Key derived from Install Code - * - * @param installCodeFormat the InstallCodeFormat to set as {@link ZstackInstallCodeFormat} - */ - public void setInstallCodeFormat(ZstackInstallCodeFormat installCodeFormat) { - this.installCodeFormat = installCodeFormat; - } - - /** - * Full IEEE address for the device joining the network - * - * @return the current ieeeAddress as {@link IeeeAddress} - */ - public IeeeAddress getIeeeAddress() { - return ieeeAddress; - } - - /** - * Full IEEE address for the device joining the network - * - * @param ieeeAddress the IeeeAddress to set as {@link IeeeAddress} - */ - public void setIeeeAddress(IeeeAddress ieeeAddress) { - this.ieeeAddress = ieeeAddress; - } - - /** - * 16 Bytes for the Key derived from the IC. 18 Bytes for the Install Code +CRC - * - * @return the current installCode as {@link ZigBeeKey} - */ - public ZigBeeKey getInstallCode() { - return installCode; - } - - /** - * 16 Bytes for the Key derived from the IC. 18 Bytes for the Install Code +CRC - * - * @param installCode the InstallCode to set as {@link ZigBeeKey} - */ - public void setInstallCode(ZigBeeKey installCode) { - this.installCode = installCode; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_APP_CNF) && (response.getReqCmd1() == 0x04)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_APP_CNF, 0x04); - - // Serialize the fields - serializer.serializeUInt8(installCodeFormat.getKey()); - serializer.serializeIeeeAddress(ieeeAddress); - serializer.serializeZigBeeKey(installCode); - return getPayload(); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(111); - builder.append("ZstackAppCnfBdbAddInstallcodeSreq [installCodeFormat="); - builder.append(installCodeFormat); - builder.append(", ieeeAddress="); - builder.append(ieeeAddress); - builder.append(", installCode="); - builder.append(installCode); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.appcnf; + +import com.zsmartsystems.zigbee.IeeeAddress; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import com.zsmartsystems.zigbee.security.ZigBeeKey; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command APP_CNF_BDB_ADD_INSTALLCODE. + *

+ * Add a preconfigured key (plain key or IC) to Trust Center device. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackAppCnfBdbAddInstallcodeSreq extends ZstackFrameRequest { + + /** + * This value specifies the format in which the install code is being added. The following list contains the values corresponding + * to the supported formats: 0x01 Install Code + CRC 0x02 Key derived from Install Code + */ + private ZstackInstallCodeFormat installCodeFormat; + + /** + * Full IEEE address for the device joining the network + */ + private IeeeAddress ieeeAddress; + + /** + * 16 Bytes for the Key derived from the IC. 18 Bytes for the Install Code +CRC + */ + private ZigBeeKey installCode; + + /** + * Request constructor + */ + public ZstackAppCnfBdbAddInstallcodeSreq() { + synchronousCommand = true; + } + + /** + * This value specifies the format in which the install code is being added. The following list contains the values corresponding + * to the supported formats: 0x01 Install Code + CRC 0x02 Key derived from Install Code + * + * @return the current installCodeFormat as {@link ZstackInstallCodeFormat} + */ + public ZstackInstallCodeFormat getInstallCodeFormat() { + return installCodeFormat; + } + + /** + * This value specifies the format in which the install code is being added. The following list contains the values corresponding + * to the supported formats: 0x01 Install Code + CRC 0x02 Key derived from Install Code + * + * @param installCodeFormat the InstallCodeFormat to set as {@link ZstackInstallCodeFormat} + */ + public void setInstallCodeFormat(ZstackInstallCodeFormat installCodeFormat) { + this.installCodeFormat = installCodeFormat; + } + + /** + * Full IEEE address for the device joining the network + * + * @return the current ieeeAddress as {@link IeeeAddress} + */ + public IeeeAddress getIeeeAddress() { + return ieeeAddress; + } + + /** + * Full IEEE address for the device joining the network + * + * @param ieeeAddress the IeeeAddress to set as {@link IeeeAddress} + */ + public void setIeeeAddress(IeeeAddress ieeeAddress) { + this.ieeeAddress = ieeeAddress; + } + + /** + * 16 Bytes for the Key derived from the IC. 18 Bytes for the Install Code +CRC + * + * @return the current installCode as {@link ZigBeeKey} + */ + public ZigBeeKey getInstallCode() { + return installCode; + } + + /** + * 16 Bytes for the Key derived from the IC. 18 Bytes for the Install Code +CRC + * + * @param installCode the InstallCode to set as {@link ZigBeeKey} + */ + public void setInstallCode(ZigBeeKey installCode) { + this.installCode = installCode; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_APP_CNF) && (response.getReqCmd1() == 0x04)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_APP_CNF, 0x04); + + // Serialize the fields + serializer.serializeUInt8(installCodeFormat.getKey()); + serializer.serializeIeeeAddress(ieeeAddress); + serializer.serializeZigBeeKey(installCode); + return getPayload(); + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(111); + builder.append("ZstackAppCnfBdbAddInstallcodeSreq [installCodeFormat="); + builder.append(installCodeFormat); + builder.append(", ieeeAddress="); + builder.append(ieeeAddress); + builder.append(", installCode="); + builder.append(installCode); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbAddInstallcodeSrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbAddInstallcodeSrsp.java index a09d94051..ab85ac1f7 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbAddInstallcodeSrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbAddInstallcodeSrsp.java @@ -1,68 +1,69 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.appcnf; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; - -/** - * Class to implement the Z-Stack command APP_CNF_BDB_ADD_INSTALLCODE. - *

- * Add a preconfigured key (plain key or IC) to Trust Center device. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackAppCnfBdbAddInstallcodeSrsp extends ZstackFrameResponse { - - /** - * Status values: 0x00 Success. 0x01 Failure (IC not supported) 0x02 Invalid parameter (bad CRC). - */ - private ZstackResponseCode status; - - /** - * Response and Handler constructor - */ - public ZstackAppCnfBdbAddInstallcodeSrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); - } - - /** - * Status values: 0x00 Success. 0x01 Failure (IC not supported) 0x02 Invalid parameter (bad CRC). - * - * @return the current status as {@link ZstackResponseCode} - */ - public ZstackResponseCode getStatus() { - return status; - } - - /** - * Status values: 0x00 Success. 0x01 Failure (IC not supported) 0x02 Invalid parameter (bad CRC). - * - * @param status the Status to set as {@link ZstackResponseCode} - */ - public void setStatus(ZstackResponseCode status) { - this.status = status; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(61); - builder.append("ZstackAppCnfBdbAddInstallcodeSrsp [status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.appcnf; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command APP_CNF_BDB_ADD_INSTALLCODE. + *

+ * Add a preconfigured key (plain key or IC) to Trust Center device. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackAppCnfBdbAddInstallcodeSrsp extends ZstackFrameResponse { + + /** + * Status values: 0x00 Success. 0x01 Failure (IC not supported) 0x02 Invalid parameter (bad CRC). + */ + private ZstackResponseCode status; + + /** + * Response and Handler constructor + */ + public ZstackAppCnfBdbAddInstallcodeSrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); + } + + /** + * Status values: 0x00 Success. 0x01 Failure (IC not supported) 0x02 Invalid parameter (bad CRC). + * + * @return the current status as {@link ZstackResponseCode} + */ + public ZstackResponseCode getStatus() { + return status; + } + + /** + * Status values: 0x00 Success. 0x01 Failure (IC not supported) 0x02 Invalid parameter (bad CRC). + * + * @param status the Status to set as {@link ZstackResponseCode} + */ + public void setStatus(ZstackResponseCode status) { + this.status = status; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(61); + builder.append("ZstackAppCnfBdbAddInstallcodeSrsp [status="); + builder.append(status); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbCommissioningNotificationAreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbCommissioningNotificationAreq.java index ca7866fe4..2e28f0105 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbCommissioningNotificationAreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbCommissioningNotificationAreq.java @@ -1,136 +1,137 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.appcnf; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; -import com.zsmartsystems.zigbee.dongle.zstack.api.appcnf.ZstackBdbRemainingCommissioningModes; -import java.util.HashSet; -import java.util.Set; - -/** - * Class to implement the Z-Stack command APP_CNF_BDB_COMMISSIONING_NOTIFICATION. - *

- * Callback to receive notifications from BDB process. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackAppCnfBdbCommissioningNotificationAreq extends ZstackFrameResponse { - - /** - * Status of the commissioning mode being notified - */ - private ZstackBdbStatus status; - - /** - * Commissioning mode for which the notification is done and to which the status is related - */ - private ZstackBdbCommissioningMode commissioningMode; - - /** - * Bitmask of the remaining commissioning modes after this notification. - *

- * Parameter allows multiple options so implemented as a {@link Set}. - */ - private Set remainingCommissioningModes = new HashSet<>(); - - /** - * Response and Handler constructor - */ - public ZstackAppCnfBdbCommissioningNotificationAreq(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - // Deserialize the fields - status = ZstackBdbStatus.valueOf(deserializer.deserializeUInt8()); - commissioningMode = ZstackBdbCommissioningMode.valueOf(deserializer.deserializeUInt8()); - int tmpRemainingCommissioningModes = deserializer.deserializeUInt8(); - for (ZstackBdbRemainingCommissioningModes value : ZstackBdbRemainingCommissioningModes.values()) { - if ((tmpRemainingCommissioningModes & value.getKey()) != 0) { - remainingCommissioningModes.add(value); - } - } - } - - /** - * Status of the commissioning mode being notified - * - * @return the current status as {@link ZstackBdbStatus} - */ - public ZstackBdbStatus getStatus() { - return status; - } - - /** - * Status of the commissioning mode being notified - * - * @param status the Status to set as {@link ZstackBdbStatus} - */ - public void setStatus(ZstackBdbStatus status) { - this.status = status; - } - - /** - * Commissioning mode for which the notification is done and to which the status is related - * - * @return the current commissioningMode as {@link ZstackBdbCommissioningMode} - */ - public ZstackBdbCommissioningMode getCommissioningMode() { - return commissioningMode; - } - - /** - * Commissioning mode for which the notification is done and to which the status is related - * - * @param commissioningMode the CommissioningMode to set as {@link ZstackBdbCommissioningMode} - */ - public void setCommissioningMode(ZstackBdbCommissioningMode commissioningMode) { - this.commissioningMode = commissioningMode; - } - - /** - * Bitmask of the remaining commissioning modes after this notification. - * - * @return the current remainingCommissioningModes as {@link Set} of {@link ZstackBdbRemainingCommissioningModes} - */ - public Set getRemainingCommissioningModes() { - return remainingCommissioningModes; - } - - /** - * Bitmask of the remaining commissioning modes after this notification. - * - * @param remainingCommissioningModes the RemainingCommissioningModes to add to the {@link Set} as {@link ZstackBdbRemainingCommissioningModes} - */ - public void addRemainingCommissioningModes(ZstackBdbRemainingCommissioningModes remainingCommissioningModes) { - this.remainingCommissioningModes.add(remainingCommissioningModes); - } - - /** - * Bitmask of the remaining commissioning modes after this notification. - * - * @param remainingCommissioningModes the RemainingCommissioningModes to remove to the {@link Set} as {@link ZstackBdbRemainingCommissioningModes} - */ - public void removeRemainingCommissioningModes(ZstackBdbRemainingCommissioningModes remainingCommissioningModes) { - this.remainingCommissioningModes.remove(remainingCommissioningModes); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(122); - builder.append("ZstackAppCnfBdbCommissioningNotificationAreq [status="); - builder.append(status); - builder.append(", commissioningMode="); - builder.append(commissioningMode); - builder.append(", remainingCommissioningModes="); - builder.append(remainingCommissioningModes); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.appcnf; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import com.zsmartsystems.zigbee.dongle.zstack.api.appcnf.ZstackBdbRemainingCommissioningModes; +import java.util.HashSet; +import java.util.Set; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command APP_CNF_BDB_COMMISSIONING_NOTIFICATION. + *

+ * Callback to receive notifications from BDB process. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackAppCnfBdbCommissioningNotificationAreq extends ZstackFrameResponse { + + /** + * Status of the commissioning mode being notified + */ + private ZstackBdbStatus status; + + /** + * Commissioning mode for which the notification is done and to which the status is related + */ + private ZstackBdbCommissioningMode commissioningMode; + + /** + * Bitmask of the remaining commissioning modes after this notification. + *

+ * Parameter allows multiple options so implemented as a {@link Set}. + */ + private Set remainingCommissioningModes = new HashSet<>(); + + /** + * Response and Handler constructor + */ + public ZstackAppCnfBdbCommissioningNotificationAreq(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + // Deserialize the fields + status = ZstackBdbStatus.valueOf(deserializer.deserializeUInt8()); + commissioningMode = ZstackBdbCommissioningMode.valueOf(deserializer.deserializeUInt8()); + int tmpRemainingCommissioningModes = deserializer.deserializeUInt8(); + for (ZstackBdbRemainingCommissioningModes value : ZstackBdbRemainingCommissioningModes.values()) { + if ((tmpRemainingCommissioningModes & value.getKey()) != 0) { + remainingCommissioningModes.add(value); + } + } + } + + /** + * Status of the commissioning mode being notified + * + * @return the current status as {@link ZstackBdbStatus} + */ + public ZstackBdbStatus getStatus() { + return status; + } + + /** + * Status of the commissioning mode being notified + * + * @param status the Status to set as {@link ZstackBdbStatus} + */ + public void setStatus(ZstackBdbStatus status) { + this.status = status; + } + + /** + * Commissioning mode for which the notification is done and to which the status is related + * + * @return the current commissioningMode as {@link ZstackBdbCommissioningMode} + */ + public ZstackBdbCommissioningMode getCommissioningMode() { + return commissioningMode; + } + + /** + * Commissioning mode for which the notification is done and to which the status is related + * + * @param commissioningMode the CommissioningMode to set as {@link ZstackBdbCommissioningMode} + */ + public void setCommissioningMode(ZstackBdbCommissioningMode commissioningMode) { + this.commissioningMode = commissioningMode; + } + + /** + * Bitmask of the remaining commissioning modes after this notification. + * + * @return the current remainingCommissioningModes as {@link Set} of {@link ZstackBdbRemainingCommissioningModes} + */ + public Set getRemainingCommissioningModes() { + return remainingCommissioningModes; + } + + /** + * Bitmask of the remaining commissioning modes after this notification. + * + * @param remainingCommissioningModes the RemainingCommissioningModes to add to the {@link Set} as {@link ZstackBdbRemainingCommissioningModes} + */ + public void addRemainingCommissioningModes(ZstackBdbRemainingCommissioningModes remainingCommissioningModes) { + this.remainingCommissioningModes.add(remainingCommissioningModes); + } + + /** + * Bitmask of the remaining commissioning modes after this notification. + * + * @param remainingCommissioningModes the RemainingCommissioningModes to remove to the {@link Set} as {@link ZstackBdbRemainingCommissioningModes} + */ + public void removeRemainingCommissioningModes(ZstackBdbRemainingCommissioningModes remainingCommissioningModes) { + this.remainingCommissioningModes.remove(remainingCommissioningModes); + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(122); + builder.append("ZstackAppCnfBdbCommissioningNotificationAreq [status="); + builder.append(status); + builder.append(", commissioningMode="); + builder.append(commissioningMode); + builder.append(", remainingCommissioningModes="); + builder.append(remainingCommissioningModes); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbSetActiveDefaultCentralizedKeySreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbSetActiveDefaultCentralizedKeySreq.java index d363ca876..c6c472cc9 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbSetActiveDefaultCentralizedKeySreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbSetActiveDefaultCentralizedKeySreq.java @@ -1,108 +1,109 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.appcnf; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; - -/** - * Class to implement the Z-Stack command APP_CNF_BDB_SET_ACTIVE_DEFAULT_CENTRALIZED_KEY. - *

- * Sets the policy to mandate or not the usage of an Install Code upon joining. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackAppCnfBdbSetActiveDefaultCentralizedKeySreq extends ZstackFrameRequest { - - /** - * This parameter controls which key will be used when performing association to a centralized network. - */ - private ZstackCentralizedLinkKeyMode centralizedLinkKeyMode; - - /** - * Buffer with the key in any of its formats. - */ - private int[] installCode; - - /** - * Request constructor - */ - public ZstackAppCnfBdbSetActiveDefaultCentralizedKeySreq() { - synchronousCommand = true; - } - - /** - * This parameter controls which key will be used when performing association to a centralized network. - * - * @return the current centralizedLinkKeyMode as {@link ZstackCentralizedLinkKeyMode} - */ - public ZstackCentralizedLinkKeyMode getCentralizedLinkKeyMode() { - return centralizedLinkKeyMode; - } - - /** - * This parameter controls which key will be used when performing association to a centralized network. - * - * @param centralizedLinkKeyMode the CentralizedLinkKeyMode to set as {@link ZstackCentralizedLinkKeyMode} - */ - public void setCentralizedLinkKeyMode(ZstackCentralizedLinkKeyMode centralizedLinkKeyMode) { - this.centralizedLinkKeyMode = centralizedLinkKeyMode; - } - - /** - * Buffer with the key in any of its formats. - * - * @return the current installCode as {@link int[]} - */ - public int[] getInstallCode() { - return installCode; - } - - /** - * Buffer with the key in any of its formats. - * - * @param installCode the InstallCode to set as {@link int[]} - */ - public void setInstallCode(int[] installCode) { - this.installCode = installCode; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_APP_CNF) && (response.getReqCmd1() == 0x07)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_APP_CNF, 0x07); - - // Serialize the fields - serializer.serializeUInt8(centralizedLinkKeyMode.getKey()); - serializer.serializeUInt8Array(installCode); - return getPayload(); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(102); - builder.append("ZstackAppCnfBdbSetActiveDefaultCentralizedKeySreq [centralizedLinkKeyMode="); - builder.append(centralizedLinkKeyMode); - builder.append(", installCode="); - for (int c = 0; c < installCode.length; c++) { - if (c > 0) { - builder.append(' '); - } - builder.append(String.format("%02X", installCode[c])); - } - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.appcnf; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command APP_CNF_BDB_SET_ACTIVE_DEFAULT_CENTRALIZED_KEY. + *

+ * Sets the policy to mandate or not the usage of an Install Code upon joining. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackAppCnfBdbSetActiveDefaultCentralizedKeySreq extends ZstackFrameRequest { + + /** + * This parameter controls which key will be used when performing association to a centralized network. + */ + private ZstackCentralizedLinkKeyMode centralizedLinkKeyMode; + + /** + * Buffer with the key in any of its formats. + */ + private int[] installCode; + + /** + * Request constructor + */ + public ZstackAppCnfBdbSetActiveDefaultCentralizedKeySreq() { + synchronousCommand = true; + } + + /** + * This parameter controls which key will be used when performing association to a centralized network. + * + * @return the current centralizedLinkKeyMode as {@link ZstackCentralizedLinkKeyMode} + */ + public ZstackCentralizedLinkKeyMode getCentralizedLinkKeyMode() { + return centralizedLinkKeyMode; + } + + /** + * This parameter controls which key will be used when performing association to a centralized network. + * + * @param centralizedLinkKeyMode the CentralizedLinkKeyMode to set as {@link ZstackCentralizedLinkKeyMode} + */ + public void setCentralizedLinkKeyMode(ZstackCentralizedLinkKeyMode centralizedLinkKeyMode) { + this.centralizedLinkKeyMode = centralizedLinkKeyMode; + } + + /** + * Buffer with the key in any of its formats. + * + * @return the current installCode as {@link int[]} + */ + public int[] getInstallCode() { + return installCode; + } + + /** + * Buffer with the key in any of its formats. + * + * @param installCode the InstallCode to set as {@link int[]} + */ + public void setInstallCode(int[] installCode) { + this.installCode = installCode; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_APP_CNF) && (response.getReqCmd1() == 0x07)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_APP_CNF, 0x07); + + // Serialize the fields + serializer.serializeUInt8(centralizedLinkKeyMode.getKey()); + serializer.serializeUInt8Array(installCode); + return getPayload(); + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(102); + builder.append("ZstackAppCnfBdbSetActiveDefaultCentralizedKeySreq [centralizedLinkKeyMode="); + builder.append(centralizedLinkKeyMode); + builder.append(", installCode="); + for (int c = 0; c < installCode.length; c++) { + if (c > 0) { + builder.append(' '); + } + builder.append(String.format("%02X", installCode[c])); + } + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbSetActiveDefaultCentralizedKeySrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbSetActiveDefaultCentralizedKeySrsp.java index 3cd012b12..2ebcc7dc4 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbSetActiveDefaultCentralizedKeySrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbSetActiveDefaultCentralizedKeySrsp.java @@ -1,68 +1,69 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.appcnf; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; - -/** - * Class to implement the Z-Stack command APP_CNF_BDB_SET_ACTIVE_DEFAULT_CENTRALIZED_KEY. - *

- * Sets the policy to mandate or not the usage of an Install Code upon joining. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackAppCnfBdbSetActiveDefaultCentralizedKeySrsp extends ZstackFrameResponse { - - /** - * 0x00 Success 0x01 Failure (IC not supported) 0x02 Invalid Parameters (bad CRC). - */ - private ZstackResponseCode status; - - /** - * Response and Handler constructor - */ - public ZstackAppCnfBdbSetActiveDefaultCentralizedKeySrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); - } - - /** - * 0x00 Success 0x01 Failure (IC not supported) 0x02 Invalid Parameters (bad CRC). - * - * @return the current status as {@link ZstackResponseCode} - */ - public ZstackResponseCode getStatus() { - return status; - } - - /** - * 0x00 Success 0x01 Failure (IC not supported) 0x02 Invalid Parameters (bad CRC). - * - * @param status the Status to set as {@link ZstackResponseCode} - */ - public void setStatus(ZstackResponseCode status) { - this.status = status; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(77); - builder.append("ZstackAppCnfBdbSetActiveDefaultCentralizedKeySrsp [status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.appcnf; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command APP_CNF_BDB_SET_ACTIVE_DEFAULT_CENTRALIZED_KEY. + *

+ * Sets the policy to mandate or not the usage of an Install Code upon joining. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackAppCnfBdbSetActiveDefaultCentralizedKeySrsp extends ZstackFrameResponse { + + /** + * 0x00 Success 0x01 Failure (IC not supported) 0x02 Invalid Parameters (bad CRC). + */ + private ZstackResponseCode status; + + /** + * Response and Handler constructor + */ + public ZstackAppCnfBdbSetActiveDefaultCentralizedKeySrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); + } + + /** + * 0x00 Success 0x01 Failure (IC not supported) 0x02 Invalid Parameters (bad CRC). + * + * @return the current status as {@link ZstackResponseCode} + */ + public ZstackResponseCode getStatus() { + return status; + } + + /** + * 0x00 Success 0x01 Failure (IC not supported) 0x02 Invalid Parameters (bad CRC). + * + * @param status the Status to set as {@link ZstackResponseCode} + */ + public void setStatus(ZstackResponseCode status) { + this.status = status; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(77); + builder.append("ZstackAppCnfBdbSetActiveDefaultCentralizedKeySrsp [status="); + builder.append(status); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbSetChannelSreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbSetChannelSreq.java index 31106ec45..fe98126d5 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbSetChannelSreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbSetChannelSreq.java @@ -1,103 +1,104 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.appcnf; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; - -/** - * Class to implement the Z-Stack command APP_CNF_BDB_SET_CHANNEL. - *

- * This command is used to store a channel select bit-mask to be used in commissioning. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackAppCnfBdbSetChannelSreq extends ZstackFrameRequest { - - /** - * Mask is used for primary channel selection. - */ - private boolean isPrimary; - - /** - * A bit-mask representing the channel(s) to scan the next time the target device resets. - */ - private int channels; - - /** - * Request constructor - */ - public ZstackAppCnfBdbSetChannelSreq() { - synchronousCommand = true; - } - - /** - * Mask is used for primary channel selection. - * - * @return the current isPrimary as {@link boolean} - */ - public boolean getIsPrimary() { - return isPrimary; - } - - /** - * Mask is used for primary channel selection. - * - * @param isPrimary the IsPrimary to set as {@link boolean} - */ - public void setIsPrimary(boolean isPrimary) { - this.isPrimary = isPrimary; - } - - /** - * A bit-mask representing the channel(s) to scan the next time the target device resets. - * - * @return the current channels as {@link int} - */ - public int getChannels() { - return channels; - } - - /** - * A bit-mask representing the channel(s) to scan the next time the target device resets. - * - * @param channels the Channels to set as {@link int} - */ - public void setChannels(int channels) { - this.channels = channels; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_APP_CNF) && (response.getReqCmd1() == 0x08)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_APP_CNF, 0x08); - - // Serialize the fields - serializer.serializeBoolean(isPrimary); - serializer.serializeUInt32(channels); - return getPayload(); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(82); - builder.append("ZstackAppCnfBdbSetChannelSreq [isPrimary="); - builder.append(isPrimary); - builder.append(", channels="); - builder.append(channels); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.appcnf; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command APP_CNF_BDB_SET_CHANNEL. + *

+ * This command is used to store a channel select bit-mask to be used in commissioning. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackAppCnfBdbSetChannelSreq extends ZstackFrameRequest { + + /** + * Mask is used for primary channel selection. + */ + private boolean isPrimary; + + /** + * A bit-mask representing the channel(s) to scan the next time the target device resets. + */ + private int channels; + + /** + * Request constructor + */ + public ZstackAppCnfBdbSetChannelSreq() { + synchronousCommand = true; + } + + /** + * Mask is used for primary channel selection. + * + * @return the current isPrimary as {@link boolean} + */ + public boolean getIsPrimary() { + return isPrimary; + } + + /** + * Mask is used for primary channel selection. + * + * @param isPrimary the IsPrimary to set as {@link boolean} + */ + public void setIsPrimary(boolean isPrimary) { + this.isPrimary = isPrimary; + } + + /** + * A bit-mask representing the channel(s) to scan the next time the target device resets. + * + * @return the current channels as {@link int} + */ + public int getChannels() { + return channels; + } + + /** + * A bit-mask representing the channel(s) to scan the next time the target device resets. + * + * @param channels the Channels to set as {@link int} + */ + public void setChannels(int channels) { + this.channels = channels; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_APP_CNF) && (response.getReqCmd1() == 0x08)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_APP_CNF, 0x08); + + // Serialize the fields + serializer.serializeBoolean(isPrimary); + serializer.serializeUInt32(channels); + return getPayload(); + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(82); + builder.append("ZstackAppCnfBdbSetChannelSreq [isPrimary="); + builder.append(isPrimary); + builder.append(", channels="); + builder.append(channels); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbSetChannelSrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbSetChannelSrsp.java index e94a18a7f..197e3b04c 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbSetChannelSrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbSetChannelSrsp.java @@ -1,68 +1,69 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.appcnf; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; - -/** - * Class to implement the Z-Stack command APP_CNF_BDB_SET_CHANNEL. - *

- * This command is used to store a channel select bit-mask to be used in commissioning. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackAppCnfBdbSetChannelSrsp extends ZstackFrameResponse { - - /** - * Status is either Success (0) or Failure (1). - */ - private ZstackResponseCode status; - - /** - * Response and Handler constructor - */ - public ZstackAppCnfBdbSetChannelSrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); - } - - /** - * Status is either Success (0) or Failure (1). - * - * @return the current status as {@link ZstackResponseCode} - */ - public ZstackResponseCode getStatus() { - return status; - } - - /** - * Status is either Success (0) or Failure (1). - * - * @param status the Status to set as {@link ZstackResponseCode} - */ - public void setStatus(ZstackResponseCode status) { - this.status = status; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(57); - builder.append("ZstackAppCnfBdbSetChannelSrsp [status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.appcnf; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command APP_CNF_BDB_SET_CHANNEL. + *

+ * This command is used to store a channel select bit-mask to be used in commissioning. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackAppCnfBdbSetChannelSrsp extends ZstackFrameResponse { + + /** + * Status is either Success (0) or Failure (1). + */ + private ZstackResponseCode status; + + /** + * Response and Handler constructor + */ + public ZstackAppCnfBdbSetChannelSrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); + } + + /** + * Status is either Success (0) or Failure (1). + * + * @return the current status as {@link ZstackResponseCode} + */ + public ZstackResponseCode getStatus() { + return status; + } + + /** + * Status is either Success (0) or Failure (1). + * + * @param status the Status to set as {@link ZstackResponseCode} + */ + public void setStatus(ZstackResponseCode status) { + this.status = status; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(57); + builder.append("ZstackAppCnfBdbSetChannelSrsp [status="); + builder.append(status); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbSetJoinusesinstallcodekeySreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbSetJoinusesinstallcodekeySreq.java index fa0dbec4e..5f6c76ef1 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbSetJoinusesinstallcodekeySreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbSetJoinusesinstallcodekeySreq.java @@ -1,101 +1,102 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.appcnf; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; - -/** - * Class to implement the Z-Stack command APP_CNF_BDB_SET_JOINUSESINSTALLCODEKEY. - *

- * Sets the policy to mandate or not the usage of an Install Code upon joining. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackAppCnfBdbSetJoinusesinstallcodekeySreq extends ZstackFrameRequest { - - /** - * If it is equal to TRUE and the installation code derived link key is not stored, the Trust Center SHALL terminate the procedure for - * adding a new node into the network. If bdbJoinUsesInstall- CodeKey is equal to TRUE and the installation code derived link key is - * stored, the Trust Center SHALL first find the entry in apsDeviceKeyPairSet that corresponds to the joining node and then - * overwrite the LinkKey entry with the installation code derived link key and set the KeyAttributes field to PROVISIONAL_KEY. - * The Trust Center MAY then set OutgoingFrame- Counter to 0 and SHALL set IncomingFrameCounter to 0. If - * bdbJoinUsesInstallCodeKey is equal to FALSE, the Trust Center SHALL first find the entry in apsDeviceKeyPairSet that - * corresponds to the joining node and then overwrite the LinkKey entry with the default global Trust Center link key and set the - * KeyAttributes field to PROVISIONAL_KEY. The Trust Center MAY then set OutgoingFrameCounter to 0 and SHALL set - * IncomingFrameCounter to 0. - */ - private boolean joinUsesInstallCodeKey; - - /** - * Request constructor - */ - public ZstackAppCnfBdbSetJoinusesinstallcodekeySreq() { - synchronousCommand = true; - } - - /** - * If it is equal to TRUE and the installation code derived link key is not stored, the Trust Center SHALL terminate the procedure for - * adding a new node into the network. If bdbJoinUsesInstall- CodeKey is equal to TRUE and the installation code derived link key is - * stored, the Trust Center SHALL first find the entry in apsDeviceKeyPairSet that corresponds to the joining node and then - * overwrite the LinkKey entry with the installation code derived link key and set the KeyAttributes field to PROVISIONAL_KEY. - * The Trust Center MAY then set OutgoingFrame- Counter to 0 and SHALL set IncomingFrameCounter to 0. If - * bdbJoinUsesInstallCodeKey is equal to FALSE, the Trust Center SHALL first find the entry in apsDeviceKeyPairSet that - * corresponds to the joining node and then overwrite the LinkKey entry with the default global Trust Center link key and set the - * KeyAttributes field to PROVISIONAL_KEY. The Trust Center MAY then set OutgoingFrameCounter to 0 and SHALL set - * IncomingFrameCounter to 0. - * - * @return the current joinUsesInstallCodeKey as {@link boolean} - */ - public boolean getJoinUsesInstallCodeKey() { - return joinUsesInstallCodeKey; - } - - /** - * If it is equal to TRUE and the installation code derived link key is not stored, the Trust Center SHALL terminate the procedure for - * adding a new node into the network. If bdbJoinUsesInstall- CodeKey is equal to TRUE and the installation code derived link key is - * stored, the Trust Center SHALL first find the entry in apsDeviceKeyPairSet that corresponds to the joining node and then - * overwrite the LinkKey entry with the installation code derived link key and set the KeyAttributes field to PROVISIONAL_KEY. - * The Trust Center MAY then set OutgoingFrame- Counter to 0 and SHALL set IncomingFrameCounter to 0. If - * bdbJoinUsesInstallCodeKey is equal to FALSE, the Trust Center SHALL first find the entry in apsDeviceKeyPairSet that - * corresponds to the joining node and then overwrite the LinkKey entry with the default global Trust Center link key and set the - * KeyAttributes field to PROVISIONAL_KEY. The Trust Center MAY then set OutgoingFrameCounter to 0 and SHALL set - * IncomingFrameCounter to 0. - * - * @param joinUsesInstallCodeKey the JoinUsesInstallCodeKey to set as {@link boolean} - */ - public void setJoinUsesInstallCodeKey(boolean joinUsesInstallCodeKey) { - this.joinUsesInstallCodeKey = joinUsesInstallCodeKey; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_APP_CNF) && (response.getReqCmd1() == 0x06)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_APP_CNF, 0x06); - - // Serialize the fields - serializer.serializeBoolean(joinUsesInstallCodeKey); - return getPayload(); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(72); - builder.append("ZstackAppCnfBdbSetJoinusesinstallcodekeySreq [joinUsesInstallCodeKey="); - builder.append(joinUsesInstallCodeKey); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.appcnf; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command APP_CNF_BDB_SET_JOINUSESINSTALLCODEKEY. + *

+ * Sets the policy to mandate or not the usage of an Install Code upon joining. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackAppCnfBdbSetJoinusesinstallcodekeySreq extends ZstackFrameRequest { + + /** + * If it is equal to TRUE and the installation code derived link key is not stored, the Trust Center SHALL terminate the procedure for + * adding a new node into the network. If bdbJoinUsesInstall- CodeKey is equal to TRUE and the installation code derived link key is + * stored, the Trust Center SHALL first find the entry in apsDeviceKeyPairSet that corresponds to the joining node and then + * overwrite the LinkKey entry with the installation code derived link key and set the KeyAttributes field to PROVISIONAL_KEY. + * The Trust Center MAY then set OutgoingFrame- Counter to 0 and SHALL set IncomingFrameCounter to 0. If + * bdbJoinUsesInstallCodeKey is equal to FALSE, the Trust Center SHALL first find the entry in apsDeviceKeyPairSet that + * corresponds to the joining node and then overwrite the LinkKey entry with the default global Trust Center link key and set the + * KeyAttributes field to PROVISIONAL_KEY. The Trust Center MAY then set OutgoingFrameCounter to 0 and SHALL set + * IncomingFrameCounter to 0. + */ + private boolean joinUsesInstallCodeKey; + + /** + * Request constructor + */ + public ZstackAppCnfBdbSetJoinusesinstallcodekeySreq() { + synchronousCommand = true; + } + + /** + * If it is equal to TRUE and the installation code derived link key is not stored, the Trust Center SHALL terminate the procedure for + * adding a new node into the network. If bdbJoinUsesInstall- CodeKey is equal to TRUE and the installation code derived link key is + * stored, the Trust Center SHALL first find the entry in apsDeviceKeyPairSet that corresponds to the joining node and then + * overwrite the LinkKey entry with the installation code derived link key and set the KeyAttributes field to PROVISIONAL_KEY. + * The Trust Center MAY then set OutgoingFrame- Counter to 0 and SHALL set IncomingFrameCounter to 0. If + * bdbJoinUsesInstallCodeKey is equal to FALSE, the Trust Center SHALL first find the entry in apsDeviceKeyPairSet that + * corresponds to the joining node and then overwrite the LinkKey entry with the default global Trust Center link key and set the + * KeyAttributes field to PROVISIONAL_KEY. The Trust Center MAY then set OutgoingFrameCounter to 0 and SHALL set + * IncomingFrameCounter to 0. + * + * @return the current joinUsesInstallCodeKey as {@link boolean} + */ + public boolean getJoinUsesInstallCodeKey() { + return joinUsesInstallCodeKey; + } + + /** + * If it is equal to TRUE and the installation code derived link key is not stored, the Trust Center SHALL terminate the procedure for + * adding a new node into the network. If bdbJoinUsesInstall- CodeKey is equal to TRUE and the installation code derived link key is + * stored, the Trust Center SHALL first find the entry in apsDeviceKeyPairSet that corresponds to the joining node and then + * overwrite the LinkKey entry with the installation code derived link key and set the KeyAttributes field to PROVISIONAL_KEY. + * The Trust Center MAY then set OutgoingFrame- Counter to 0 and SHALL set IncomingFrameCounter to 0. If + * bdbJoinUsesInstallCodeKey is equal to FALSE, the Trust Center SHALL first find the entry in apsDeviceKeyPairSet that + * corresponds to the joining node and then overwrite the LinkKey entry with the default global Trust Center link key and set the + * KeyAttributes field to PROVISIONAL_KEY. The Trust Center MAY then set OutgoingFrameCounter to 0 and SHALL set + * IncomingFrameCounter to 0. + * + * @param joinUsesInstallCodeKey the JoinUsesInstallCodeKey to set as {@link boolean} + */ + public void setJoinUsesInstallCodeKey(boolean joinUsesInstallCodeKey) { + this.joinUsesInstallCodeKey = joinUsesInstallCodeKey; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_APP_CNF) && (response.getReqCmd1() == 0x06)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_APP_CNF, 0x06); + + // Serialize the fields + serializer.serializeBoolean(joinUsesInstallCodeKey); + return getPayload(); + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(72); + builder.append("ZstackAppCnfBdbSetJoinusesinstallcodekeySreq [joinUsesInstallCodeKey="); + builder.append(joinUsesInstallCodeKey); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbSetJoinusesinstallcodekeySrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbSetJoinusesinstallcodekeySrsp.java index 3c21ebd0b..a2c435eb1 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbSetJoinusesinstallcodekeySrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbSetJoinusesinstallcodekeySrsp.java @@ -1,68 +1,69 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.appcnf; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; - -/** - * Class to implement the Z-Stack command APP_CNF_BDB_SET_JOINUSESINSTALLCODEKEY. - *

- * Sets the policy to mandate or not the usage of an Install Code upon joining. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackAppCnfBdbSetJoinusesinstallcodekeySrsp extends ZstackFrameResponse { - - /** - * Status is either Success (0) or Failure (1). - */ - private ZstackResponseCode status; - - /** - * Response and Handler constructor - */ - public ZstackAppCnfBdbSetJoinusesinstallcodekeySrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); - } - - /** - * Status is either Success (0) or Failure (1). - * - * @return the current status as {@link ZstackResponseCode} - */ - public ZstackResponseCode getStatus() { - return status; - } - - /** - * Status is either Success (0) or Failure (1). - * - * @param status the Status to set as {@link ZstackResponseCode} - */ - public void setStatus(ZstackResponseCode status) { - this.status = status; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(72); - builder.append("ZstackAppCnfBdbSetJoinusesinstallcodekeySrsp [status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.appcnf; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command APP_CNF_BDB_SET_JOINUSESINSTALLCODEKEY. + *

+ * Sets the policy to mandate or not the usage of an Install Code upon joining. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackAppCnfBdbSetJoinusesinstallcodekeySrsp extends ZstackFrameResponse { + + /** + * Status is either Success (0) or Failure (1). + */ + private ZstackResponseCode status; + + /** + * Response and Handler constructor + */ + public ZstackAppCnfBdbSetJoinusesinstallcodekeySrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); + } + + /** + * Status is either Success (0) or Failure (1). + * + * @return the current status as {@link ZstackResponseCode} + */ + public ZstackResponseCode getStatus() { + return status; + } + + /** + * Status is either Success (0) or Failure (1). + * + * @param status the Status to set as {@link ZstackResponseCode} + */ + public void setStatus(ZstackResponseCode status) { + this.status = status; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(72); + builder.append("ZstackAppCnfBdbSetJoinusesinstallcodekeySrsp [status="); + builder.append(status); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbSetTcRequireKeyExchangeSreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbSetTcRequireKeyExchangeSreq.java index c04465408..ed90c12f9 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbSetTcRequireKeyExchangeSreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbSetTcRequireKeyExchangeSreq.java @@ -1,89 +1,90 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.appcnf; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; - -/** - * Class to implement the Z-Stack command APP_CNF_BDB_SET_TC_REQUIRE_KEY_EXCHANGE. - *

- * Sets the policy flag on Trust Center device to mandate or not the TCLK exchange procedure. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackAppCnfBdbSetTcRequireKeyExchangeSreq extends ZstackFrameRequest { - - /** - * The bdbTrustCenterRequireKeyExchange attribute specifies whether the Trust Center requires a joining device to exchange - * its initial link key with a new link key generated by the Trust Center. If bdbTrustCenterRequireKeyExchange is equal to TRUE, - * the joining node must undergo the link key exchange procedure; failure to exchange the link key will result in the node being - * removed from the network. If bdbTrustCenterRequireKeyExchange is equal to FALSE, the Trust Center will permit the joining - * node to remain on the network without exchanging its initial link key. This attribute is used by ZigBee coordinator nodes. - */ - private boolean trustCenterRequireKeyExchange; - - /** - * Request constructor - */ - public ZstackAppCnfBdbSetTcRequireKeyExchangeSreq() { - synchronousCommand = true; - } - - /** - * The bdbTrustCenterRequireKeyExchange attribute specifies whether the Trust Center requires a joining device to exchange - * its initial link key with a new link key generated by the Trust Center. If bdbTrustCenterRequireKeyExchange is equal to TRUE, - * the joining node must undergo the link key exchange procedure; failure to exchange the link key will result in the node being - * removed from the network. If bdbTrustCenterRequireKeyExchange is equal to FALSE, the Trust Center will permit the joining - * node to remain on the network without exchanging its initial link key. This attribute is used by ZigBee coordinator nodes. - * - * @return the current trustCenterRequireKeyExchange as {@link boolean} - */ - public boolean getTrustCenterRequireKeyExchange() { - return trustCenterRequireKeyExchange; - } - - /** - * The bdbTrustCenterRequireKeyExchange attribute specifies whether the Trust Center requires a joining device to exchange - * its initial link key with a new link key generated by the Trust Center. If bdbTrustCenterRequireKeyExchange is equal to TRUE, - * the joining node must undergo the link key exchange procedure; failure to exchange the link key will result in the node being - * removed from the network. If bdbTrustCenterRequireKeyExchange is equal to FALSE, the Trust Center will permit the joining - * node to remain on the network without exchanging its initial link key. This attribute is used by ZigBee coordinator nodes. - * - * @param trustCenterRequireKeyExchange the TrustCenterRequireKeyExchange to set as {@link boolean} - */ - public void setTrustCenterRequireKeyExchange(boolean trustCenterRequireKeyExchange) { - this.trustCenterRequireKeyExchange = trustCenterRequireKeyExchange; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_APP_CNF) && (response.getReqCmd1() == 0x09)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_APP_CNF, 0x09); - - // Serialize the fields - serializer.serializeBoolean(trustCenterRequireKeyExchange); - return getPayload(); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(70); - builder.append("ZstackAppCnfBdbSetTcRequireKeyExchangeSreq [trustCenterRequireKeyExchange="); - builder.append(trustCenterRequireKeyExchange); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.appcnf; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command APP_CNF_BDB_SET_TC_REQUIRE_KEY_EXCHANGE. + *

+ * Sets the policy flag on Trust Center device to mandate or not the TCLK exchange procedure. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackAppCnfBdbSetTcRequireKeyExchangeSreq extends ZstackFrameRequest { + + /** + * The bdbTrustCenterRequireKeyExchange attribute specifies whether the Trust Center requires a joining device to exchange + * its initial link key with a new link key generated by the Trust Center. If bdbTrustCenterRequireKeyExchange is equal to TRUE, + * the joining node must undergo the link key exchange procedure; failure to exchange the link key will result in the node being + * removed from the network. If bdbTrustCenterRequireKeyExchange is equal to FALSE, the Trust Center will permit the joining + * node to remain on the network without exchanging its initial link key. This attribute is used by ZigBee coordinator nodes. + */ + private boolean trustCenterRequireKeyExchange; + + /** + * Request constructor + */ + public ZstackAppCnfBdbSetTcRequireKeyExchangeSreq() { + synchronousCommand = true; + } + + /** + * The bdbTrustCenterRequireKeyExchange attribute specifies whether the Trust Center requires a joining device to exchange + * its initial link key with a new link key generated by the Trust Center. If bdbTrustCenterRequireKeyExchange is equal to TRUE, + * the joining node must undergo the link key exchange procedure; failure to exchange the link key will result in the node being + * removed from the network. If bdbTrustCenterRequireKeyExchange is equal to FALSE, the Trust Center will permit the joining + * node to remain on the network without exchanging its initial link key. This attribute is used by ZigBee coordinator nodes. + * + * @return the current trustCenterRequireKeyExchange as {@link boolean} + */ + public boolean getTrustCenterRequireKeyExchange() { + return trustCenterRequireKeyExchange; + } + + /** + * The bdbTrustCenterRequireKeyExchange attribute specifies whether the Trust Center requires a joining device to exchange + * its initial link key with a new link key generated by the Trust Center. If bdbTrustCenterRequireKeyExchange is equal to TRUE, + * the joining node must undergo the link key exchange procedure; failure to exchange the link key will result in the node being + * removed from the network. If bdbTrustCenterRequireKeyExchange is equal to FALSE, the Trust Center will permit the joining + * node to remain on the network without exchanging its initial link key. This attribute is used by ZigBee coordinator nodes. + * + * @param trustCenterRequireKeyExchange the TrustCenterRequireKeyExchange to set as {@link boolean} + */ + public void setTrustCenterRequireKeyExchange(boolean trustCenterRequireKeyExchange) { + this.trustCenterRequireKeyExchange = trustCenterRequireKeyExchange; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_APP_CNF) && (response.getReqCmd1() == 0x09)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_APP_CNF, 0x09); + + // Serialize the fields + serializer.serializeBoolean(trustCenterRequireKeyExchange); + return getPayload(); + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(70); + builder.append("ZstackAppCnfBdbSetTcRequireKeyExchangeSreq [trustCenterRequireKeyExchange="); + builder.append(trustCenterRequireKeyExchange); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbSetTcRequireKeyExchangeSrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbSetTcRequireKeyExchangeSrsp.java index dd76b3087..07a3e806c 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbSetTcRequireKeyExchangeSrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfBdbSetTcRequireKeyExchangeSrsp.java @@ -1,68 +1,69 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.appcnf; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; - -/** - * Class to implement the Z-Stack command APP_CNF_BDB_SET_TC_REQUIRE_KEY_EXCHANGE. - *

- * Sets the policy flag on Trust Center device to mandate or not the TCLK exchange procedure. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackAppCnfBdbSetTcRequireKeyExchangeSrsp extends ZstackFrameResponse { - - /** - * Status is either Success (0) or Failure (1). - */ - private ZstackResponseCode status; - - /** - * Response and Handler constructor - */ - public ZstackAppCnfBdbSetTcRequireKeyExchangeSrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); - } - - /** - * Status is either Success (0) or Failure (1). - * - * @return the current status as {@link ZstackResponseCode} - */ - public ZstackResponseCode getStatus() { - return status; - } - - /** - * Status is either Success (0) or Failure (1). - * - * @param status the Status to set as {@link ZstackResponseCode} - */ - public void setStatus(ZstackResponseCode status) { - this.status = status; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(70); - builder.append("ZstackAppCnfBdbSetTcRequireKeyExchangeSrsp [status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.appcnf; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command APP_CNF_BDB_SET_TC_REQUIRE_KEY_EXCHANGE. + *

+ * Sets the policy flag on Trust Center device to mandate or not the TCLK exchange procedure. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackAppCnfBdbSetTcRequireKeyExchangeSrsp extends ZstackFrameResponse { + + /** + * Status is either Success (0) or Failure (1). + */ + private ZstackResponseCode status; + + /** + * Response and Handler constructor + */ + public ZstackAppCnfBdbSetTcRequireKeyExchangeSrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); + } + + /** + * Status is either Success (0) or Failure (1). + * + * @return the current status as {@link ZstackResponseCode} + */ + public ZstackResponseCode getStatus() { + return status; + } + + /** + * Status is either Success (0) or Failure (1). + * + * @param status the Status to set as {@link ZstackResponseCode} + */ + public void setStatus(ZstackResponseCode status) { + this.status = status; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(70); + builder.append("ZstackAppCnfBdbSetTcRequireKeyExchangeSrsp [status="); + builder.append(status); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfSetAllowrejoinTcPolicySreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfSetAllowrejoinTcPolicySreq.java index fc64e1449..16c126715 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfSetAllowrejoinTcPolicySreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfSetAllowrejoinTcPolicySreq.java @@ -1,77 +1,78 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.appcnf; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; - -/** - * Class to implement the Z-Stack command APP_CNF_SET_ALLOWREJOIN_TC_POLICY. - *

- * Sets the AllowRejoin TC policy. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackAppCnfSetAllowrejoinTcPolicySreq extends ZstackFrameRequest { - - /** - * This value specifies whether or not the Trust Center allows devices to rejoin. - */ - private boolean allowRejoin; - - /** - * Request constructor - */ - public ZstackAppCnfSetAllowrejoinTcPolicySreq() { - synchronousCommand = true; - } - - /** - * This value specifies whether or not the Trust Center allows devices to rejoin. - * - * @return the current allowRejoin as {@link boolean} - */ - public boolean getAllowRejoin() { - return allowRejoin; - } - - /** - * This value specifies whether or not the Trust Center allows devices to rejoin. - * - * @param allowRejoin the AllowRejoin to set as {@link boolean} - */ - public void setAllowRejoin(boolean allowRejoin) { - this.allowRejoin = allowRejoin; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_APP_CNF) && (response.getReqCmd1() == 0x03)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_APP_CNF, 0x03); - - // Serialize the fields - serializer.serializeBoolean(allowRejoin); - return getPayload(); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(66); - builder.append("ZstackAppCnfSetAllowrejoinTcPolicySreq [allowRejoin="); - builder.append(allowRejoin); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.appcnf; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command APP_CNF_SET_ALLOWREJOIN_TC_POLICY. + *

+ * Sets the AllowRejoin TC policy. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackAppCnfSetAllowrejoinTcPolicySreq extends ZstackFrameRequest { + + /** + * This value specifies whether or not the Trust Center allows devices to rejoin. + */ + private boolean allowRejoin; + + /** + * Request constructor + */ + public ZstackAppCnfSetAllowrejoinTcPolicySreq() { + synchronousCommand = true; + } + + /** + * This value specifies whether or not the Trust Center allows devices to rejoin. + * + * @return the current allowRejoin as {@link boolean} + */ + public boolean getAllowRejoin() { + return allowRejoin; + } + + /** + * This value specifies whether or not the Trust Center allows devices to rejoin. + * + * @param allowRejoin the AllowRejoin to set as {@link boolean} + */ + public void setAllowRejoin(boolean allowRejoin) { + this.allowRejoin = allowRejoin; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_APP_CNF) && (response.getReqCmd1() == 0x03)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_APP_CNF, 0x03); + + // Serialize the fields + serializer.serializeBoolean(allowRejoin); + return getPayload(); + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(66); + builder.append("ZstackAppCnfSetAllowrejoinTcPolicySreq [allowRejoin="); + builder.append(allowRejoin); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfSetAllowrejoinTcPolicySrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfSetAllowrejoinTcPolicySrsp.java index 847b181d2..e4c948a9e 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfSetAllowrejoinTcPolicySrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAppCnfSetAllowrejoinTcPolicySrsp.java @@ -1,68 +1,69 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.appcnf; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; - -/** - * Class to implement the Z-Stack command APP_CNF_SET_ALLOWREJOIN_TC_POLICY. - *

- * Sets the AllowRejoin TC policy. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackAppCnfSetAllowrejoinTcPolicySrsp extends ZstackFrameResponse { - - /** - * Status is either Success (0) or Failure (1). - */ - private ZstackResponseCode status; - - /** - * Response and Handler constructor - */ - public ZstackAppCnfSetAllowrejoinTcPolicySrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); - } - - /** - * Status is either Success (0) or Failure (1). - * - * @return the current status as {@link ZstackResponseCode} - */ - public ZstackResponseCode getStatus() { - return status; - } - - /** - * Status is either Success (0) or Failure (1). - * - * @param status the Status to set as {@link ZstackResponseCode} - */ - public void setStatus(ZstackResponseCode status) { - this.status = status; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(66); - builder.append("ZstackAppCnfSetAllowrejoinTcPolicySrsp [status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.appcnf; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command APP_CNF_SET_ALLOWREJOIN_TC_POLICY. + *

+ * Sets the AllowRejoin TC policy. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackAppCnfSetAllowrejoinTcPolicySrsp extends ZstackFrameResponse { + + /** + * Status is either Success (0) or Failure (1). + */ + private ZstackResponseCode status; + + /** + * Response and Handler constructor + */ + public ZstackAppCnfSetAllowrejoinTcPolicySrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); + } + + /** + * Status is either Success (0) or Failure (1). + * + * @return the current status as {@link ZstackResponseCode} + */ + public ZstackResponseCode getStatus() { + return status; + } + + /** + * Status is either Success (0) or Failure (1). + * + * @param status the Status to set as {@link ZstackResponseCode} + */ + public void setStatus(ZstackResponseCode status) { + this.status = status; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(66); + builder.append("ZstackAppCnfSetAllowrejoinTcPolicySrsp [status="); + builder.append(status); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAuthenticationOption.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAuthenticationOption.java index 5eb88d198..a07bd1864 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAuthenticationOption.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackAuthenticationOption.java @@ -1,75 +1,75 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.appcnf; - -import java.util.HashMap; -import java.util.Map; - -/** - * Class to implement the Z-Stack Enumeration ZstackAuthenticationOption. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public enum ZstackAuthenticationOption { - - /** - * The device has not been authenticated - */ - NOT_AUTHENTICATED(0x0000), - - /** - * The device has been authenticated using CBKE - */ - AUTHENTICATED_CBCK(0x0001), - - /** - * The device has been authenticated using EA - */ - AUTHENTICATED_EA(0x0002); - - /** - * A mapping between the integer code and its corresponding type to - * facilitate lookup by code. - */ - private static Map codeMapping; - - private int key; - - static { - codeMapping = new HashMap(); - for (ZstackAuthenticationOption s : values()) { - codeMapping.put(s.key, s); - } - } - - private ZstackAuthenticationOption(int key) { - this.key = key; - } - - /** - * Lookup function based on the type code. Returns null if the code does not exist. - * - * @param code the code to lookup - * @return enumeration value of the alarm type. - */ - public static ZstackAuthenticationOption valueOf(int code) { - - return codeMapping.get(code); - } - - /** - * Returns the Z-Stack protocol defined value for this enumeration. - * - * @return the Z-Stack protocol key - */ - public int getKey() { - return key; - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.appcnf; + +import java.util.HashMap; +import java.util.Map; + +/** + * Class to implement the Z-Stack Enumeration ZstackAuthenticationOption. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + * + * @author Chris Jackson + */ +public enum ZstackAuthenticationOption { + + /** + * The device has not been authenticated + */ + NOT_AUTHENTICATED(0x0000), + + /** + * The device has been authenticated using CBKE + */ + AUTHENTICATED_CBCK(0x0001), + + /** + * The device has been authenticated using EA + */ + AUTHENTICATED_EA(0x0002); + + /** + * A mapping between the integer code and its corresponding type to + * facilitate lookup by code. + */ + private static Map codeMapping; + + private int key; + + static { + codeMapping = new HashMap(); + for (ZstackAuthenticationOption s : values()) { + codeMapping.put(s.key, s); + } + } + + private ZstackAuthenticationOption(int key) { + this.key = key; + } + + /** + * Lookup function based on the type code. Returns null if the code does not exist. + * + * @param code the code to lookup + * @return enumeration value of the alarm type. + */ + public static ZstackAuthenticationOption valueOf(int code) { + + return codeMapping.get(code); + } + + /** + * Returns the Z-Stack protocol defined value for this enumeration. + * + * @return the Z-Stack protocol key + */ + public int getKey() { + return key; + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackBdbCommissioningMode.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackBdbCommissioningMode.java index ce8ece91c..f87ca8028 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackBdbCommissioningMode.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackBdbCommissioningMode.java @@ -1,90 +1,90 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.appcnf; - -import java.util.HashMap; -import java.util.Map; - -/** - * Class to implement the Z-Stack Enumeration ZstackBdbCommissioningMode. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public enum ZstackBdbCommissioningMode { - - /** - * - */ - BDB_COMMISSIONING_INITIALIZATION(0x0000), - - /** - * - */ - BDB_COMMISSIONING_NWK_STEERING(0x0001), - - /** - * - */ - BDB_COMMISSIONING_FORMATION(0x0002), - - /** - * - */ - BDB_COMMISSIONING_FINDING_BINDING(0x0003), - - /** - * - */ - BDB_COMMISSIONING_TOUCHLINK(0x0004), - - /** - * - */ - BDB_COMMISSIONING_PARENT_LOST(0x0005); - - /** - * A mapping between the integer code and its corresponding type to - * facilitate lookup by code. - */ - private static Map codeMapping; - - private int key; - - static { - codeMapping = new HashMap(); - for (ZstackBdbCommissioningMode s : values()) { - codeMapping.put(s.key, s); - } - } - - private ZstackBdbCommissioningMode(int key) { - this.key = key; - } - - /** - * Lookup function based on the type code. Returns null if the code does not exist. - * - * @param code the code to lookup - * @return enumeration value of the alarm type. - */ - public static ZstackBdbCommissioningMode valueOf(int code) { - - return codeMapping.get(code); - } - - /** - * Returns the Z-Stack protocol defined value for this enumeration. - * - * @return the Z-Stack protocol key - */ - public int getKey() { - return key; - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.appcnf; + +import java.util.HashMap; +import java.util.Map; + +/** + * Class to implement the Z-Stack Enumeration ZstackBdbCommissioningMode. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + * + * @author Chris Jackson + */ +public enum ZstackBdbCommissioningMode { + + /** + * + */ + BDB_COMMISSIONING_INITIALIZATION(0x0000), + + /** + * + */ + BDB_COMMISSIONING_NWK_STEERING(0x0001), + + /** + * + */ + BDB_COMMISSIONING_FORMATION(0x0002), + + /** + * + */ + BDB_COMMISSIONING_FINDING_BINDING(0x0003), + + /** + * + */ + BDB_COMMISSIONING_TOUCHLINK(0x0004), + + /** + * + */ + BDB_COMMISSIONING_PARENT_LOST(0x0005); + + /** + * A mapping between the integer code and its corresponding type to + * facilitate lookup by code. + */ + private static Map codeMapping; + + private int key; + + static { + codeMapping = new HashMap(); + for (ZstackBdbCommissioningMode s : values()) { + codeMapping.put(s.key, s); + } + } + + private ZstackBdbCommissioningMode(int key) { + this.key = key; + } + + /** + * Lookup function based on the type code. Returns null if the code does not exist. + * + * @param code the code to lookup + * @return enumeration value of the alarm type. + */ + public static ZstackBdbCommissioningMode valueOf(int code) { + + return codeMapping.get(code); + } + + /** + * Returns the Z-Stack protocol defined value for this enumeration. + * + * @return the Z-Stack protocol key + */ + public int getKey() { + return key; + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackBdbRemainingCommissioningModes.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackBdbRemainingCommissioningModes.java index c81ea2358..b89081285 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackBdbRemainingCommissioningModes.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackBdbRemainingCommissioningModes.java @@ -1,90 +1,90 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.appcnf; - -import java.util.HashMap; -import java.util.Map; - -/** - * Class to implement the Z-Stack Enumeration ZstackBdbRemainingCommissioningModes. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public enum ZstackBdbRemainingCommissioningModes { - - /** - * - */ - BDB_COMMISSIONING_MODE_INITIATOR_TL(0x0001), - - /** - * - */ - BDB_COMMISSIONING_MODE_NWK_STEERING(0x0002), - - /** - * - */ - BDB_COMMISSIONING_MODE_NWK_FORMATION(0x0004), - - /** - * - */ - BDB_COMMISSIONING_MODE_FINDING_BINDING(0x0008), - - /** - * - */ - BDB_COMMISSIONING_MODE_INITIALIZATION(0x0010), - - /** - * - */ - BDB_COMMISSIONING_MODE_PARENT_LOST(0x0020); - - /** - * A mapping between the integer code and its corresponding type to - * facilitate lookup by code. - */ - private static Map codeMapping; - - private int key; - - static { - codeMapping = new HashMap(); - for (ZstackBdbRemainingCommissioningModes s : values()) { - codeMapping.put(s.key, s); - } - } - - private ZstackBdbRemainingCommissioningModes(int key) { - this.key = key; - } - - /** - * Lookup function based on the type code. Returns null if the code does not exist. - * - * @param code the code to lookup - * @return enumeration value of the alarm type. - */ - public static ZstackBdbRemainingCommissioningModes valueOf(int code) { - - return codeMapping.get(code); - } - - /** - * Returns the Z-Stack protocol defined value for this enumeration. - * - * @return the Z-Stack protocol key - */ - public int getKey() { - return key; - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.appcnf; + +import java.util.HashMap; +import java.util.Map; + +/** + * Class to implement the Z-Stack Enumeration ZstackBdbRemainingCommissioningModes. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + * + * @author Chris Jackson + */ +public enum ZstackBdbRemainingCommissioningModes { + + /** + * + */ + BDB_COMMISSIONING_MODE_INITIATOR_TL(0x0001), + + /** + * + */ + BDB_COMMISSIONING_MODE_NWK_STEERING(0x0002), + + /** + * + */ + BDB_COMMISSIONING_MODE_NWK_FORMATION(0x0004), + + /** + * + */ + BDB_COMMISSIONING_MODE_FINDING_BINDING(0x0008), + + /** + * + */ + BDB_COMMISSIONING_MODE_INITIALIZATION(0x0010), + + /** + * + */ + BDB_COMMISSIONING_MODE_PARENT_LOST(0x0020); + + /** + * A mapping between the integer code and its corresponding type to + * facilitate lookup by code. + */ + private static Map codeMapping; + + private int key; + + static { + codeMapping = new HashMap(); + for (ZstackBdbRemainingCommissioningModes s : values()) { + codeMapping.put(s.key, s); + } + } + + private ZstackBdbRemainingCommissioningModes(int key) { + this.key = key; + } + + /** + * Lookup function based on the type code. Returns null if the code does not exist. + * + * @param code the code to lookup + * @return enumeration value of the alarm type. + */ + public static ZstackBdbRemainingCommissioningModes valueOf(int code) { + + return codeMapping.get(code); + } + + /** + * Returns the Z-Stack protocol defined value for this enumeration. + * + * @return the Z-Stack protocol key + */ + public int getKey() { + return key; + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackBdbStatus.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackBdbStatus.java index 5164503bd..69f557c8a 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackBdbStatus.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackBdbStatus.java @@ -1,135 +1,135 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.appcnf; - -import java.util.HashMap; -import java.util.Map; - -/** - * Class to implement the Z-Stack Enumeration ZstackBdbStatus. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public enum ZstackBdbStatus { - - /** - * - */ - BDB_COMMISSIONING_SUCCESS(0x0000), - - /** - * - */ - BDB_COMMISSIONING_IN_PROGRESS(0x0001), - - /** - * - */ - BDB_COMMISSIONING_NO_NETWORK(0x0002), - - /** - * - */ - BDB_COMMISSIONING_TL_TARGET_FAILURE(0x0003), - - /** - * - */ - BDB_COMMISSIONING_TL_NOT_AA_CAPABLE(0x0004), - - /** - * - */ - BDB_COMMISSIONING_TL_NO_SCAN_RESPONSE(0x0005), - - /** - * - */ - BDB_COMMISSIONING_TL_NOT_PERMITTED(0x0006), - - /** - * - */ - BDB_COMMISSIONING_TCLK_EX_FAILURE(0x0007), - - /** - * - */ - BDB_COMMISSIONING_FORMATION_FAILURE(0x0008), - - /** - * - */ - BDB_COMMISSIONING_FB_TARGET_IN_PROGRESS(0x0009), - - /** - * - */ - BDB_COMMISSIONING_FB_INITIATOR_IN_PROGRESS(0x000A), - - /** - * - */ - BDB_COMMISSIONING_FB_NO_IDENTIFY_QUERY_RESPONSE(0x000B), - - /** - * - */ - BDB_COMMISSIONING_FB_BINDING_TABLE_FULL(0x000C), - - /** - * - */ - BDB_COMMISSIONING_NETWORK_RESTORED(0x000D), - - /** - * - */ - BDB_COMMISSIONING_FAILURE(0x000E); - - /** - * A mapping between the integer code and its corresponding type to - * facilitate lookup by code. - */ - private static Map codeMapping; - - private int key; - - static { - codeMapping = new HashMap(); - for (ZstackBdbStatus s : values()) { - codeMapping.put(s.key, s); - } - } - - private ZstackBdbStatus(int key) { - this.key = key; - } - - /** - * Lookup function based on the type code. Returns null if the code does not exist. - * - * @param code the code to lookup - * @return enumeration value of the alarm type. - */ - public static ZstackBdbStatus valueOf(int code) { - - return codeMapping.get(code); - } - - /** - * Returns the Z-Stack protocol defined value for this enumeration. - * - * @return the Z-Stack protocol key - */ - public int getKey() { - return key; - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.appcnf; + +import java.util.HashMap; +import java.util.Map; + +/** + * Class to implement the Z-Stack Enumeration ZstackBdbStatus. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + * + * @author Chris Jackson + */ +public enum ZstackBdbStatus { + + /** + * + */ + BDB_COMMISSIONING_SUCCESS(0x0000), + + /** + * + */ + BDB_COMMISSIONING_IN_PROGRESS(0x0001), + + /** + * + */ + BDB_COMMISSIONING_NO_NETWORK(0x0002), + + /** + * + */ + BDB_COMMISSIONING_TL_TARGET_FAILURE(0x0003), + + /** + * + */ + BDB_COMMISSIONING_TL_NOT_AA_CAPABLE(0x0004), + + /** + * + */ + BDB_COMMISSIONING_TL_NO_SCAN_RESPONSE(0x0005), + + /** + * + */ + BDB_COMMISSIONING_TL_NOT_PERMITTED(0x0006), + + /** + * + */ + BDB_COMMISSIONING_TCLK_EX_FAILURE(0x0007), + + /** + * + */ + BDB_COMMISSIONING_FORMATION_FAILURE(0x0008), + + /** + * + */ + BDB_COMMISSIONING_FB_TARGET_IN_PROGRESS(0x0009), + + /** + * + */ + BDB_COMMISSIONING_FB_INITIATOR_IN_PROGRESS(0x000A), + + /** + * + */ + BDB_COMMISSIONING_FB_NO_IDENTIFY_QUERY_RESPONSE(0x000B), + + /** + * + */ + BDB_COMMISSIONING_FB_BINDING_TABLE_FULL(0x000C), + + /** + * + */ + BDB_COMMISSIONING_NETWORK_RESTORED(0x000D), + + /** + * + */ + BDB_COMMISSIONING_FAILURE(0x000E); + + /** + * A mapping between the integer code and its corresponding type to + * facilitate lookup by code. + */ + private static Map codeMapping; + + private int key; + + static { + codeMapping = new HashMap(); + for (ZstackBdbStatus s : values()) { + codeMapping.put(s.key, s); + } + } + + private ZstackBdbStatus(int key) { + this.key = key; + } + + /** + * Lookup function based on the type code. Returns null if the code does not exist. + * + * @param code the code to lookup + * @return enumeration value of the alarm type. + */ + public static ZstackBdbStatus valueOf(int code) { + + return codeMapping.get(code); + } + + /** + * Returns the Z-Stack protocol defined value for this enumeration. + * + * @return the Z-Stack protocol key + */ + public int getKey() { + return key; + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackCentralizedLinkKeyMode.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackCentralizedLinkKeyMode.java index 4cd908041..3345fbf48 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackCentralizedLinkKeyMode.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackCentralizedLinkKeyMode.java @@ -1,96 +1,96 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.appcnf; - -import java.util.HashMap; -import java.util.Map; - -/** - * Class to implement the Z-Stack Enumeration ZstackCentralizedLinkKeyMode. - *

- * Central link key policies - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public enum ZstackCentralizedLinkKeyMode { - /** - * Default unknown value - */ - UNKNOWN(-1), - - /** - * Instruct joining node to use Default Global Trust Center link key. No key buffer required - */ - DEFAULT_GLOBAL_KEY(0x0000), - - /** - * Instruct the joining node to use the provided install code (16 bytes + 2 CRC bytes) to derive APS Link key to be used during joining - */ - PROVIDED_INSTALL_CODE(0x0001), - - /** - * Instruct the joining node to use the provided install code (16 bytes + 2 CRC bytes) to derive APS Link key to be used during joining. - * If it fails to decrypt Transport Key, it will automatically try Default Global Trust Center Link Key - */ - PROVIDED_INSTALL_CODE_THEN_DEFAULT_GLOBAL_KEY(0x0002), - - /** - * Instruct the joining node to use the provided APS Link key to be used during joining (key size is 16 bytes) - */ - PROVIDED_APS_KEY(0x0003), - - /** - * Instruct the joining node to use the provided APS Link key to be used during joining (key size is 16 bytes). If it fails to decrypt - * Transport Key, it will automatically try Default Global Trust Center Link Key - */ - PROVIDED_APS_CODE_THEN_DEFAULT_GLOBAL_KEY(0x0004); - - /** - * A mapping between the integer code and its corresponding type to - * facilitate lookup by code. - */ - private static Map codeMapping; - - private int key; - - static { - codeMapping = new HashMap(); - for (ZstackCentralizedLinkKeyMode s : values()) { - codeMapping.put(s.key, s); - } - } - - private ZstackCentralizedLinkKeyMode(int key) { - this.key = key; - } - - /** - * Lookup function based on the type code. Returns null if the code does not exist. - * - * @param code the code to lookup - * @return enumeration value of the alarm type. - */ - public static ZstackCentralizedLinkKeyMode valueOf(int code) { - if (codeMapping.get(code) == null) { - return UNKNOWN; - } - - return codeMapping.get(code); - } - - /** - * Returns the Z-Stack protocol defined value for this enumeration. - * - * @return the Z-Stack protocol key - */ - public int getKey() { - return key; - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.appcnf; + +import java.util.HashMap; +import java.util.Map; + +/** + * Class to implement the Z-Stack Enumeration ZstackCentralizedLinkKeyMode. + *

+ * Central link key policies + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + * + * @author Chris Jackson + */ +public enum ZstackCentralizedLinkKeyMode { + /** + * Default unknown value + */ + UNKNOWN(-1), + + /** + * Instruct joining node to use Default Global Trust Center link key. No key buffer required + */ + DEFAULT_GLOBAL_KEY(0x0000), + + /** + * Instruct the joining node to use the provided install code (16 bytes + 2 CRC bytes) to derive APS Link key to be used during joining + */ + PROVIDED_INSTALL_CODE(0x0001), + + /** + * Instruct the joining node to use the provided install code (16 bytes + 2 CRC bytes) to derive APS Link key to be used during joining. + * If it fails to decrypt Transport Key, it will automatically try Default Global Trust Center Link Key + */ + PROVIDED_INSTALL_CODE_THEN_DEFAULT_GLOBAL_KEY(0x0002), + + /** + * Instruct the joining node to use the provided APS Link key to be used during joining (key size is 16 bytes) + */ + PROVIDED_APS_KEY(0x0003), + + /** + * Instruct the joining node to use the provided APS Link key to be used during joining (key size is 16 bytes). If it fails to decrypt + * Transport Key, it will automatically try Default Global Trust Center Link Key + */ + PROVIDED_APS_CODE_THEN_DEFAULT_GLOBAL_KEY(0x0004); + + /** + * A mapping between the integer code and its corresponding type to + * facilitate lookup by code. + */ + private static Map codeMapping; + + private int key; + + static { + codeMapping = new HashMap(); + for (ZstackCentralizedLinkKeyMode s : values()) { + codeMapping.put(s.key, s); + } + } + + private ZstackCentralizedLinkKeyMode(int key) { + this.key = key; + } + + /** + * Lookup function based on the type code. Returns null if the code does not exist. + * + * @param code the code to lookup + * @return enumeration value of the alarm type. + */ + public static ZstackCentralizedLinkKeyMode valueOf(int code) { + if (codeMapping.get(code) == null) { + return UNKNOWN; + } + + return codeMapping.get(code); + } + + /** + * Returns the Z-Stack protocol defined value for this enumeration. + * + * @return the Z-Stack protocol key + */ + public int getKey() { + return key; + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackInstallCodeFormat.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackInstallCodeFormat.java index 9d059278e..ad421512e 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackInstallCodeFormat.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/appcnf/ZstackInstallCodeFormat.java @@ -1,70 +1,70 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.appcnf; - -import java.util.HashMap; -import java.util.Map; - -/** - * Class to implement the Z-Stack Enumeration ZstackInstallCodeFormat. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public enum ZstackInstallCodeFormat { - - /** - * - */ - INSTALL_CODE(0x0001), - - /** - * - */ - DERIVED_KEY(0x0002); - - /** - * A mapping between the integer code and its corresponding type to - * facilitate lookup by code. - */ - private static Map codeMapping; - - private int key; - - static { - codeMapping = new HashMap(); - for (ZstackInstallCodeFormat s : values()) { - codeMapping.put(s.key, s); - } - } - - private ZstackInstallCodeFormat(int key) { - this.key = key; - } - - /** - * Lookup function based on the type code. Returns null if the code does not exist. - * - * @param code the code to lookup - * @return enumeration value of the alarm type. - */ - public static ZstackInstallCodeFormat valueOf(int code) { - - return codeMapping.get(code); - } - - /** - * Returns the Z-Stack protocol defined value for this enumeration. - * - * @return the Z-Stack protocol key - */ - public int getKey() { - return key; - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.appcnf; + +import java.util.HashMap; +import java.util.Map; + +/** + * Class to implement the Z-Stack Enumeration ZstackInstallCodeFormat. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + * + * @author Chris Jackson + */ +public enum ZstackInstallCodeFormat { + + /** + * + */ + INSTALL_CODE(0x0001), + + /** + * + */ + DERIVED_KEY(0x0002); + + /** + * A mapping between the integer code and its corresponding type to + * facilitate lookup by code. + */ + private static Map codeMapping; + + private int key; + + static { + codeMapping = new HashMap(); + for (ZstackInstallCodeFormat s : values()) { + codeMapping.put(s.key, s); + } + } + + private ZstackInstallCodeFormat(int key) { + this.key = key; + } + + /** + * Lookup function based on the type code. Returns null if the code does not exist. + * + * @param code the code to lookup + * @return enumeration value of the alarm type. + */ + public static ZstackInstallCodeFormat valueOf(int code) { + + return codeMapping.get(code); + } + + /** + * Returns the Z-Stack protocol defined value for this enumeration. + * + * @return the Z-Stack protocol key + */ + public int getKey() { + return key; + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/mac/ZstackMacScanReqSreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/mac/ZstackMacScanReqSreq.java index 186387c43..074e19442 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/mac/ZstackMacScanReqSreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/mac/ZstackMacScanReqSreq.java @@ -1,271 +1,272 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.mac; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; - -/** - * Class to implement the Z-Stack command MAC_SCAN_REQ. - *

- * This command is used to send a request to the device to perform a network scan. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackMacScanReqSreq extends ZstackFrameRequest { - - /** - * This represents a bit-mask of channels to be scanned when starting the device: NONE = 0x00000000, ALL_CHANNELS = 0x07FFF800, - * CHANNEL 11 = 0x00000800, CHANNEL 12 = 0x00001000, CHANNEL 13 = 0x00002000, CHANNEL 14 = 0x00004000, CHANNEL 15 = 0x00008000, - * CHANNEL 16 = 0x00010000, CHANNEL 17 = 0x00020000, CHANNEL 18 = 0x00040000, CHANNEL_19 = 0x00080000, CHANNEL 20 = 0x00100000, - * CHANNEL 21 = 0x00200000, CHANNEL 22 = 0x00400000, CHANNEL 23 = 0x00800000, CHANNEL 24 = 0x01000000 CHANNEL 25 = 0x02000000, - * CHANNEL 26 = 0x04000000 - */ - private int scanChannels; - - /** - * Specifies the scan type: - */ - private int scanType; - - /** - * Duration of the scan - The exponent used in the scan duration calculation. - */ - private int scanDuration; - - /** - * The channel page on which to perform the scan. - */ - private int channelPage; - - /** - * Key Source of this data frame. - */ - private int keySource; - - /** - * Security Level of this data frame: - */ - private int securityLevel; - - /** - * Key Id Mode of this data frame: - */ - private int keyIdMode; - - /** - * Key Index of this data frame. - */ - private int keyIndex; - - /** - * Request constructor - */ - public ZstackMacScanReqSreq() { - synchronousCommand = true; - } - - /** - * This represents a bit-mask of channels to be scanned when starting the device: NONE = 0x00000000, ALL_CHANNELS = 0x07FFF800, - * CHANNEL 11 = 0x00000800, CHANNEL 12 = 0x00001000, CHANNEL 13 = 0x00002000, CHANNEL 14 = 0x00004000, CHANNEL 15 = 0x00008000, - * CHANNEL 16 = 0x00010000, CHANNEL 17 = 0x00020000, CHANNEL 18 = 0x00040000, CHANNEL_19 = 0x00080000, CHANNEL 20 = 0x00100000, - * CHANNEL 21 = 0x00200000, CHANNEL 22 = 0x00400000, CHANNEL 23 = 0x00800000, CHANNEL 24 = 0x01000000 CHANNEL 25 = 0x02000000, - * CHANNEL 26 = 0x04000000 - * - * @return the current scanChannels as {@link int} - */ - public int getScanChannels() { - return scanChannels; - } - - /** - * This represents a bit-mask of channels to be scanned when starting the device: NONE = 0x00000000, ALL_CHANNELS = 0x07FFF800, - * CHANNEL 11 = 0x00000800, CHANNEL 12 = 0x00001000, CHANNEL 13 = 0x00002000, CHANNEL 14 = 0x00004000, CHANNEL 15 = 0x00008000, - * CHANNEL 16 = 0x00010000, CHANNEL 17 = 0x00020000, CHANNEL 18 = 0x00040000, CHANNEL_19 = 0x00080000, CHANNEL 20 = 0x00100000, - * CHANNEL 21 = 0x00200000, CHANNEL 22 = 0x00400000, CHANNEL 23 = 0x00800000, CHANNEL 24 = 0x01000000 CHANNEL 25 = 0x02000000, - * CHANNEL 26 = 0x04000000 - * - * @param scanChannels the ScanChannels to set as {@link int} - */ - public void setScanChannels(int scanChannels) { - this.scanChannels = scanChannels; - } - - /** - * Specifies the scan type: - * - * @return the current scanType as {@link int} - */ - public int getScanType() { - return scanType; - } - - /** - * Specifies the scan type: - * - * @param scanType the ScanType to set as {@link int} - */ - public void setScanType(int scanType) { - this.scanType = scanType; - } - - /** - * Duration of the scan - The exponent used in the scan duration calculation. - * - * @return the current scanDuration as {@link int} - */ - public int getScanDuration() { - return scanDuration; - } - - /** - * Duration of the scan - The exponent used in the scan duration calculation. - * - * @param scanDuration the ScanDuration to set as {@link int} - */ - public void setScanDuration(int scanDuration) { - this.scanDuration = scanDuration; - } - - /** - * The channel page on which to perform the scan. - * - * @return the current channelPage as {@link int} - */ - public int getChannelPage() { - return channelPage; - } - - /** - * The channel page on which to perform the scan. - * - * @param channelPage the ChannelPage to set as {@link int} - */ - public void setChannelPage(int channelPage) { - this.channelPage = channelPage; - } - - /** - * Key Source of this data frame. - * - * @return the current keySource as {@link int} - */ - public int getKeySource() { - return keySource; - } - - /** - * Key Source of this data frame. - * - * @param keySource the KeySource to set as {@link int} - */ - public void setKeySource(int keySource) { - this.keySource = keySource; - } - - /** - * Security Level of this data frame: - * - * @return the current securityLevel as {@link int} - */ - public int getSecurityLevel() { - return securityLevel; - } - - /** - * Security Level of this data frame: - * - * @param securityLevel the SecurityLevel to set as {@link int} - */ - public void setSecurityLevel(int securityLevel) { - this.securityLevel = securityLevel; - } - - /** - * Key Id Mode of this data frame: - * - * @return the current keyIdMode as {@link int} - */ - public int getKeyIdMode() { - return keyIdMode; - } - - /** - * Key Id Mode of this data frame: - * - * @param keyIdMode the KeyIdMode to set as {@link int} - */ - public void setKeyIdMode(int keyIdMode) { - this.keyIdMode = keyIdMode; - } - - /** - * Key Index of this data frame. - * - * @return the current keyIndex as {@link int} - */ - public int getKeyIndex() { - return keyIndex; - } - - /** - * Key Index of this data frame. - * - * @param keyIndex the KeyIndex to set as {@link int} - */ - public void setKeyIndex(int keyIndex) { - this.keyIndex = keyIndex; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_MAC) && (response.getReqCmd1() == 0x0C)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_MAC, 0x0C); - - // Serialize the fields - serializer.serializeUInt32(scanChannels); - serializer.serializeUInt8(scanType); - serializer.serializeUInt8(scanDuration); - serializer.serializeUInt8(channelPage); - serializer.serializeUInt8(keySource); - serializer.serializeUInt8(securityLevel); - serializer.serializeUInt8(keyIdMode); - serializer.serializeUInt8(keyIndex); - return getPayload(); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(223); - builder.append("ZstackMacScanReqSreq [scanChannels="); - builder.append(scanChannels); - builder.append(", scanType="); - builder.append(scanType); - builder.append(", scanDuration="); - builder.append(scanDuration); - builder.append(", channelPage="); - builder.append(channelPage); - builder.append(", keySource="); - builder.append(keySource); - builder.append(", securityLevel="); - builder.append(securityLevel); - builder.append(", keyIdMode="); - builder.append(keyIdMode); - builder.append(", keyIndex="); - builder.append(keyIndex); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.mac; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command MAC_SCAN_REQ. + *

+ * This command is used to send a request to the device to perform a network scan. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackMacScanReqSreq extends ZstackFrameRequest { + + /** + * This represents a bit-mask of channels to be scanned when starting the device: NONE = 0x00000000, ALL_CHANNELS = 0x07FFF800, + * CHANNEL 11 = 0x00000800, CHANNEL 12 = 0x00001000, CHANNEL 13 = 0x00002000, CHANNEL 14 = 0x00004000, CHANNEL 15 = 0x00008000, + * CHANNEL 16 = 0x00010000, CHANNEL 17 = 0x00020000, CHANNEL 18 = 0x00040000, CHANNEL_19 = 0x00080000, CHANNEL 20 = 0x00100000, + * CHANNEL 21 = 0x00200000, CHANNEL 22 = 0x00400000, CHANNEL 23 = 0x00800000, CHANNEL 24 = 0x01000000 CHANNEL 25 = 0x02000000, + * CHANNEL 26 = 0x04000000 + */ + private int scanChannels; + + /** + * Specifies the scan type: + */ + private int scanType; + + /** + * Duration of the scan - The exponent used in the scan duration calculation. + */ + private int scanDuration; + + /** + * The channel page on which to perform the scan. + */ + private int channelPage; + + /** + * Key Source of this data frame. + */ + private int keySource; + + /** + * Security Level of this data frame: + */ + private int securityLevel; + + /** + * Key Id Mode of this data frame: + */ + private int keyIdMode; + + /** + * Key Index of this data frame. + */ + private int keyIndex; + + /** + * Request constructor + */ + public ZstackMacScanReqSreq() { + synchronousCommand = true; + } + + /** + * This represents a bit-mask of channels to be scanned when starting the device: NONE = 0x00000000, ALL_CHANNELS = 0x07FFF800, + * CHANNEL 11 = 0x00000800, CHANNEL 12 = 0x00001000, CHANNEL 13 = 0x00002000, CHANNEL 14 = 0x00004000, CHANNEL 15 = 0x00008000, + * CHANNEL 16 = 0x00010000, CHANNEL 17 = 0x00020000, CHANNEL 18 = 0x00040000, CHANNEL_19 = 0x00080000, CHANNEL 20 = 0x00100000, + * CHANNEL 21 = 0x00200000, CHANNEL 22 = 0x00400000, CHANNEL 23 = 0x00800000, CHANNEL 24 = 0x01000000 CHANNEL 25 = 0x02000000, + * CHANNEL 26 = 0x04000000 + * + * @return the current scanChannels as {@link int} + */ + public int getScanChannels() { + return scanChannels; + } + + /** + * This represents a bit-mask of channels to be scanned when starting the device: NONE = 0x00000000, ALL_CHANNELS = 0x07FFF800, + * CHANNEL 11 = 0x00000800, CHANNEL 12 = 0x00001000, CHANNEL 13 = 0x00002000, CHANNEL 14 = 0x00004000, CHANNEL 15 = 0x00008000, + * CHANNEL 16 = 0x00010000, CHANNEL 17 = 0x00020000, CHANNEL 18 = 0x00040000, CHANNEL_19 = 0x00080000, CHANNEL 20 = 0x00100000, + * CHANNEL 21 = 0x00200000, CHANNEL 22 = 0x00400000, CHANNEL 23 = 0x00800000, CHANNEL 24 = 0x01000000 CHANNEL 25 = 0x02000000, + * CHANNEL 26 = 0x04000000 + * + * @param scanChannels the ScanChannels to set as {@link int} + */ + public void setScanChannels(int scanChannels) { + this.scanChannels = scanChannels; + } + + /** + * Specifies the scan type: + * + * @return the current scanType as {@link int} + */ + public int getScanType() { + return scanType; + } + + /** + * Specifies the scan type: + * + * @param scanType the ScanType to set as {@link int} + */ + public void setScanType(int scanType) { + this.scanType = scanType; + } + + /** + * Duration of the scan - The exponent used in the scan duration calculation. + * + * @return the current scanDuration as {@link int} + */ + public int getScanDuration() { + return scanDuration; + } + + /** + * Duration of the scan - The exponent used in the scan duration calculation. + * + * @param scanDuration the ScanDuration to set as {@link int} + */ + public void setScanDuration(int scanDuration) { + this.scanDuration = scanDuration; + } + + /** + * The channel page on which to perform the scan. + * + * @return the current channelPage as {@link int} + */ + public int getChannelPage() { + return channelPage; + } + + /** + * The channel page on which to perform the scan. + * + * @param channelPage the ChannelPage to set as {@link int} + */ + public void setChannelPage(int channelPage) { + this.channelPage = channelPage; + } + + /** + * Key Source of this data frame. + * + * @return the current keySource as {@link int} + */ + public int getKeySource() { + return keySource; + } + + /** + * Key Source of this data frame. + * + * @param keySource the KeySource to set as {@link int} + */ + public void setKeySource(int keySource) { + this.keySource = keySource; + } + + /** + * Security Level of this data frame: + * + * @return the current securityLevel as {@link int} + */ + public int getSecurityLevel() { + return securityLevel; + } + + /** + * Security Level of this data frame: + * + * @param securityLevel the SecurityLevel to set as {@link int} + */ + public void setSecurityLevel(int securityLevel) { + this.securityLevel = securityLevel; + } + + /** + * Key Id Mode of this data frame: + * + * @return the current keyIdMode as {@link int} + */ + public int getKeyIdMode() { + return keyIdMode; + } + + /** + * Key Id Mode of this data frame: + * + * @param keyIdMode the KeyIdMode to set as {@link int} + */ + public void setKeyIdMode(int keyIdMode) { + this.keyIdMode = keyIdMode; + } + + /** + * Key Index of this data frame. + * + * @return the current keyIndex as {@link int} + */ + public int getKeyIndex() { + return keyIndex; + } + + /** + * Key Index of this data frame. + * + * @param keyIndex the KeyIndex to set as {@link int} + */ + public void setKeyIndex(int keyIndex) { + this.keyIndex = keyIndex; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_MAC) && (response.getReqCmd1() == 0x0C)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_MAC, 0x0C); + + // Serialize the fields + serializer.serializeUInt32(scanChannels); + serializer.serializeUInt8(scanType); + serializer.serializeUInt8(scanDuration); + serializer.serializeUInt8(channelPage); + serializer.serializeUInt8(keySource); + serializer.serializeUInt8(securityLevel); + serializer.serializeUInt8(keyIdMode); + serializer.serializeUInt8(keyIndex); + return getPayload(); + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(223); + builder.append("ZstackMacScanReqSreq [scanChannels="); + builder.append(scanChannels); + builder.append(", scanType="); + builder.append(scanType); + builder.append(", scanDuration="); + builder.append(scanDuration); + builder.append(", channelPage="); + builder.append(channelPage); + builder.append(", keySource="); + builder.append(keySource); + builder.append(", securityLevel="); + builder.append(securityLevel); + builder.append(", keyIdMode="); + builder.append(keyIdMode); + builder.append(", keyIndex="); + builder.append(keyIndex); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/mac/ZstackMacScanReqSrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/mac/ZstackMacScanReqSrsp.java index e0ea6b5da..0ecc68682 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/mac/ZstackMacScanReqSrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/mac/ZstackMacScanReqSrsp.java @@ -1,39 +1,40 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.mac; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; - -/** - * Class to implement the Z-Stack command MAC_SCAN_REQ. - *

- * This command is used to send a request to the device to perform a network scan. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackMacScanReqSrsp extends ZstackFrameResponse { - - /** - * Response and Handler constructor - */ - public ZstackMacScanReqSrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - } - - @Override - public String toString() { - return "ZstackMacScanReqSrsp []"; - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.mac; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command MAC_SCAN_REQ. + *

+ * This command is used to send a request to the device to perform a network scan. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackMacScanReqSrsp extends ZstackFrameResponse { + + /** + * Response and Handler constructor + */ + public ZstackMacScanReqSrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + } + + @Override + public String toString() { + return "ZstackMacScanReqSrsp []"; + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/rpc/ZstackRpcSreqErrorSrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/rpc/ZstackRpcSreqErrorSrsp.java index 0d4194c3a..3b713f2da 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/rpc/ZstackRpcSreqErrorSrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/rpc/ZstackRpcSreqErrorSrsp.java @@ -1,119 +1,120 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.rpc; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; - -/** - * Class to implement the Z-Stack command RPC_SREQ_ERROR. - *

- * When the ZNP cannot recognize an SREQ command from the host processor, the following SRSP is returned. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackRpcSreqErrorSrsp extends ZstackFrameResponse { - - /** - * The error code maps to one of the enumerated values. - */ - private ZstackSreqErrorCode errorCode; - - /** - * The Cmd0 value of the processed SREQ - */ - private int reqCmd0; - - /** - * The Cmd1 value of the processed SREQ - */ - private int reqCmd1; - - /** - * Response and Handler constructor - */ - public ZstackRpcSreqErrorSrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - errorCode = ZstackSreqErrorCode.valueOf(deserializer.deserializeUInt8()); - reqCmd0 = deserializer.deserializeUInt8(); - reqCmd1 = deserializer.deserializeUInt8(); - } - - /** - * The error code maps to one of the enumerated values. - * - * @return the current errorCode as {@link ZstackSreqErrorCode} - */ - public ZstackSreqErrorCode getErrorCode() { - return errorCode; - } - - /** - * The error code maps to one of the enumerated values. - * - * @param errorCode the ErrorCode to set as {@link ZstackSreqErrorCode} - */ - public void setErrorCode(ZstackSreqErrorCode errorCode) { - this.errorCode = errorCode; - } - - /** - * The Cmd0 value of the processed SREQ - * - * @return the current reqCmd0 as {@link int} - */ - public int getReqCmd0() { - return reqCmd0; - } - - /** - * The Cmd0 value of the processed SREQ - * - * @param reqCmd0 the ReqCmd0 to set as {@link int} - */ - public void setReqCmd0(int reqCmd0) { - this.reqCmd0 = reqCmd0; - } - - /** - * The Cmd1 value of the processed SREQ - * - * @return the current reqCmd1 as {@link int} - */ - public int getReqCmd1() { - return reqCmd1; - } - - /** - * The Cmd1 value of the processed SREQ - * - * @param reqCmd1 the ReqCmd1 to set as {@link int} - */ - public void setReqCmd1(int reqCmd1) { - this.reqCmd1 = reqCmd1; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(100); - builder.append("ZstackRpcSreqErrorSrsp [errorCode="); - builder.append(errorCode); - builder.append(", reqCmd0="); - builder.append(String.format("%02X", reqCmd0)); - builder.append(", reqCmd1="); - builder.append(String.format("%02X", reqCmd1)); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.rpc; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command RPC_SREQ_ERROR. + *

+ * When the ZNP cannot recognize an SREQ command from the host processor, the following SRSP is returned. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackRpcSreqErrorSrsp extends ZstackFrameResponse { + + /** + * The error code maps to one of the enumerated values. + */ + private ZstackSreqErrorCode errorCode; + + /** + * The Cmd0 value of the processed SREQ + */ + private int reqCmd0; + + /** + * The Cmd1 value of the processed SREQ + */ + private int reqCmd1; + + /** + * Response and Handler constructor + */ + public ZstackRpcSreqErrorSrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + errorCode = ZstackSreqErrorCode.valueOf(deserializer.deserializeUInt8()); + reqCmd0 = deserializer.deserializeUInt8(); + reqCmd1 = deserializer.deserializeUInt8(); + } + + /** + * The error code maps to one of the enumerated values. + * + * @return the current errorCode as {@link ZstackSreqErrorCode} + */ + public ZstackSreqErrorCode getErrorCode() { + return errorCode; + } + + /** + * The error code maps to one of the enumerated values. + * + * @param errorCode the ErrorCode to set as {@link ZstackSreqErrorCode} + */ + public void setErrorCode(ZstackSreqErrorCode errorCode) { + this.errorCode = errorCode; + } + + /** + * The Cmd0 value of the processed SREQ + * + * @return the current reqCmd0 as {@link int} + */ + public int getReqCmd0() { + return reqCmd0; + } + + /** + * The Cmd0 value of the processed SREQ + * + * @param reqCmd0 the ReqCmd0 to set as {@link int} + */ + public void setReqCmd0(int reqCmd0) { + this.reqCmd0 = reqCmd0; + } + + /** + * The Cmd1 value of the processed SREQ + * + * @return the current reqCmd1 as {@link int} + */ + public int getReqCmd1() { + return reqCmd1; + } + + /** + * The Cmd1 value of the processed SREQ + * + * @param reqCmd1 the ReqCmd1 to set as {@link int} + */ + public void setReqCmd1(int reqCmd1) { + this.reqCmd1 = reqCmd1; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(100); + builder.append("ZstackRpcSreqErrorSrsp [errorCode="); + builder.append(errorCode); + builder.append(", reqCmd0="); + builder.append(String.format("%02X", reqCmd0)); + builder.append(", reqCmd1="); + builder.append(String.format("%02X", reqCmd1)); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/rpc/ZstackSreqErrorCode.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/rpc/ZstackSreqErrorCode.java index 1d36c1fa0..1c9a4ed1d 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/rpc/ZstackSreqErrorCode.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/rpc/ZstackSreqErrorCode.java @@ -1,89 +1,89 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.rpc; - -import java.util.HashMap; -import java.util.Map; - -/** - * Class to implement the Z-Stack Enumeration ZstackSreqErrorCode. - *

- * SREQ RPC Error code - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public enum ZstackSreqErrorCode { - /** - * Default unknown value - */ - UNKNOWN(-1), - - /** - * - */ - INVALID_SUBSYSTEM(0x0001), - - /** - * - */ - INVALID_COMMAND_ID(0x0002), - - /** - * - */ - INVALID_PARAMETER(0x0003), - - /** - * - */ - INVALID_LENGTH(0x0003); - - /** - * A mapping between the integer code and its corresponding type to - * facilitate lookup by code. - */ - private static Map codeMapping; - - private int key; - - static { - codeMapping = new HashMap(); - for (ZstackSreqErrorCode s : values()) { - codeMapping.put(s.key, s); - } - } - - private ZstackSreqErrorCode(int key) { - this.key = key; - } - - /** - * Lookup function based on the type code. Returns null if the code does not exist. - * - * @param code the code to lookup - * @return enumeration value of the alarm type. - */ - public static ZstackSreqErrorCode valueOf(int code) { - if (codeMapping.get(code) == null) { - return UNKNOWN; - } - - return codeMapping.get(code); - } - - /** - * Returns the Z-Stack protocol defined value for this enumeration. - * - * @return the Z-Stack protocol key - */ - public int getKey() { - return key; - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.rpc; + +import java.util.HashMap; +import java.util.Map; + +/** + * Class to implement the Z-Stack Enumeration ZstackSreqErrorCode. + *

+ * SREQ RPC Error code + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + * + * @author Chris Jackson + */ +public enum ZstackSreqErrorCode { + /** + * Default unknown value + */ + UNKNOWN(-1), + + /** + * + */ + INVALID_SUBSYSTEM(0x0001), + + /** + * + */ + INVALID_COMMAND_ID(0x0002), + + /** + * + */ + INVALID_PARAMETER(0x0003), + + /** + * + */ + INVALID_LENGTH(0x0003); + + /** + * A mapping between the integer code and its corresponding type to + * facilitate lookup by code. + */ + private static Map codeMapping; + + private int key; + + static { + codeMapping = new HashMap(); + for (ZstackSreqErrorCode s : values()) { + codeMapping.put(s.key, s); + } + } + + private ZstackSreqErrorCode(int key) { + this.key = key; + } + + /** + * Lookup function based on the type code. Returns null if the code does not exist. + * + * @param code the code to lookup + * @return enumeration value of the alarm type. + */ + public static ZstackSreqErrorCode valueOf(int code) { + if (codeMapping.get(code) == null) { + return UNKNOWN; + } + + return codeMapping.get(code); + } + + /** + * Returns the Z-Stack protocol defined value for this enumeration. + * + * @return the Z-Stack protocol key + */ + public int getKey() { + return key; + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sapi/ZstackDeviceInformation.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sapi/ZstackDeviceInformation.java index 3a90139c0..651e217e5 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sapi/ZstackDeviceInformation.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sapi/ZstackDeviceInformation.java @@ -1,109 +1,109 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sapi; - -import java.util.HashMap; -import java.util.Map; - -/** - * Class to implement the Z-Stack Enumeration ZstackDeviceInformation. - *

- * Device Info Constants - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public enum ZstackDeviceInformation { - /** - * Default unknown value - */ - UNKNOWN(-1), - - /** - * - */ - ZB_INFO_DEV_STATE(0x0000), - - /** - * - */ - ZB_INFO_IEEE_ADDR(0x0001), - - /** - * - */ - ZB_INFO_SHORT_ADDR(0x0002), - - /** - * - */ - ZB_INFO_PARENT_SHORT_ADDR(0x0003), - - /** - * - */ - ZB_INFO_PARENT_IEEE_ADDR(0x0004), - - /** - * - */ - ZB_INFO_CHANNEL(0x0005), - - /** - * - */ - ZB_INFO_PAN_ID(0x0006), - - /** - * - */ - ZB_INFO_EXT_PAN_ID(0x0007); - - /** - * A mapping between the integer code and its corresponding type to - * facilitate lookup by code. - */ - private static Map codeMapping; - - private int key; - - static { - codeMapping = new HashMap(); - for (ZstackDeviceInformation s : values()) { - codeMapping.put(s.key, s); - } - } - - private ZstackDeviceInformation(int key) { - this.key = key; - } - - /** - * Lookup function based on the type code. Returns null if the code does not exist. - * - * @param code the code to lookup - * @return enumeration value of the alarm type. - */ - public static ZstackDeviceInformation valueOf(int code) { - if (codeMapping.get(code) == null) { - return UNKNOWN; - } - - return codeMapping.get(code); - } - - /** - * Returns the Z-Stack protocol defined value for this enumeration. - * - * @return the Z-Stack protocol key - */ - public int getKey() { - return key; - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sapi; + +import java.util.HashMap; +import java.util.Map; + +/** + * Class to implement the Z-Stack Enumeration ZstackDeviceInformation. + *

+ * Device Info Constants + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + * + * @author Chris Jackson + */ +public enum ZstackDeviceInformation { + /** + * Default unknown value + */ + UNKNOWN(-1), + + /** + * + */ + ZB_INFO_DEV_STATE(0x0000), + + /** + * + */ + ZB_INFO_IEEE_ADDR(0x0001), + + /** + * + */ + ZB_INFO_SHORT_ADDR(0x0002), + + /** + * + */ + ZB_INFO_PARENT_SHORT_ADDR(0x0003), + + /** + * + */ + ZB_INFO_PARENT_IEEE_ADDR(0x0004), + + /** + * + */ + ZB_INFO_CHANNEL(0x0005), + + /** + * + */ + ZB_INFO_PAN_ID(0x0006), + + /** + * + */ + ZB_INFO_EXT_PAN_ID(0x0007); + + /** + * A mapping between the integer code and its corresponding type to + * facilitate lookup by code. + */ + private static Map codeMapping; + + private int key; + + static { + codeMapping = new HashMap(); + for (ZstackDeviceInformation s : values()) { + codeMapping.put(s.key, s); + } + } + + private ZstackDeviceInformation(int key) { + this.key = key; + } + + /** + * Lookup function based on the type code. Returns null if the code does not exist. + * + * @param code the code to lookup + * @return enumeration value of the alarm type. + */ + public static ZstackDeviceInformation valueOf(int code) { + if (codeMapping.get(code) == null) { + return UNKNOWN; + } + + return codeMapping.get(code); + } + + /** + * Returns the Z-Stack protocol defined value for this enumeration. + * + * @return the Z-Stack protocol key + */ + public int getKey() { + return key; + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sapi/ZstackZbGetDeviceInfoSreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sapi/ZstackZbGetDeviceInfoSreq.java index 98e79a6fa..176c2bd78 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sapi/ZstackZbGetDeviceInfoSreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sapi/ZstackZbGetDeviceInfoSreq.java @@ -1,77 +1,78 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sapi; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; - -/** - * Class to implement the Z-Stack command ZB_GET_DEVICE_INFO. - *

- * This command retrieves a Device Information Property. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackZbGetDeviceInfoSreq extends ZstackFrameRequest { - - /** - * The Identifier for the device information. - */ - private int param; - - /** - * Request constructor - */ - public ZstackZbGetDeviceInfoSreq() { - synchronousCommand = true; - } - - /** - * The Identifier for the device information. - * - * @return the current param as {@link int} - */ - public int getParam() { - return param; - } - - /** - * The Identifier for the device information. - * - * @param param the Param to set as {@link int} - */ - public void setParam(int param) { - this.param = param; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_SAPI) && (response.getReqCmd1() == 0x06)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_SAPI, 0x06); - - // Serialize the fields - serializer.serializeUInt8(param); - return getPayload(); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(53); - builder.append("ZstackZbGetDeviceInfoSreq [param="); - builder.append(param); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sapi; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command ZB_GET_DEVICE_INFO. + *

+ * This command retrieves a Device Information Property. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackZbGetDeviceInfoSreq extends ZstackFrameRequest { + + /** + * The Identifier for the device information. + */ + private int param; + + /** + * Request constructor + */ + public ZstackZbGetDeviceInfoSreq() { + synchronousCommand = true; + } + + /** + * The Identifier for the device information. + * + * @return the current param as {@link int} + */ + public int getParam() { + return param; + } + + /** + * The Identifier for the device information. + * + * @param param the Param to set as {@link int} + */ + public void setParam(int param) { + this.param = param; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_SAPI) && (response.getReqCmd1() == 0x06)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_SAPI, 0x06); + + // Serialize the fields + serializer.serializeUInt8(param); + return getPayload(); + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(53); + builder.append("ZstackZbGetDeviceInfoSreq [param="); + builder.append(param); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sapi/ZstackZbGetDeviceInfoSrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sapi/ZstackZbGetDeviceInfoSrsp.java index 3509ea390..1810fe370 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sapi/ZstackZbGetDeviceInfoSrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sapi/ZstackZbGetDeviceInfoSrsp.java @@ -1,93 +1,94 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sapi; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; - -/** - * Class to implement the Z-Stack command ZB_GET_DEVICE_INFO. - *

- * This command retrieves a Device Information Property. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackZbGetDeviceInfoSrsp extends ZstackFrameResponse { - - /** - * The Identifier for the device information. - */ - private int param; - - /** - * A buffer to hold the device information - */ - private int value; - - /** - * Response and Handler constructor - */ - public ZstackZbGetDeviceInfoSrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - param = deserializer.deserializeUInt8(); - value = deserializer.deserializeUInt16(); - } - - /** - * The Identifier for the device information. - * - * @return the current param as {@link int} - */ - public int getParam() { - return param; - } - - /** - * The Identifier for the device information. - * - * @param param the Param to set as {@link int} - */ - public void setParam(int param) { - this.param = param; - } - - /** - * A buffer to hold the device information - * - * @return the current value as {@link int} - */ - public int getValue() { - return value; - } - - /** - * A buffer to hold the device information - * - * @param value the Value to set as {@link int} - */ - public void setValue(int value) { - this.value = value; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(78); - builder.append("ZstackZbGetDeviceInfoSrsp [param="); - builder.append(param); - builder.append(", value="); - builder.append(value); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sapi; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command ZB_GET_DEVICE_INFO. + *

+ * This command retrieves a Device Information Property. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackZbGetDeviceInfoSrsp extends ZstackFrameResponse { + + /** + * The Identifier for the device information. + */ + private int param; + + /** + * A buffer to hold the device information + */ + private int value; + + /** + * Response and Handler constructor + */ + public ZstackZbGetDeviceInfoSrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + param = deserializer.deserializeUInt8(); + value = deserializer.deserializeUInt16(); + } + + /** + * The Identifier for the device information. + * + * @return the current param as {@link int} + */ + public int getParam() { + return param; + } + + /** + * The Identifier for the device information. + * + * @param param the Param to set as {@link int} + */ + public void setParam(int param) { + this.param = param; + } + + /** + * A buffer to hold the device information + * + * @return the current value as {@link int} + */ + public int getValue() { + return value; + } + + /** + * A buffer to hold the device information + * + * @param value the Value to set as {@link int} + */ + public void setValue(int value) { + this.value = value; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(78); + builder.append("ZstackZbGetDeviceInfoSrsp [param="); + builder.append(param); + builder.append(", value="); + builder.append(value); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sapi/ZstackZbReadConfigurationSreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sapi/ZstackZbReadConfigurationSreq.java index e46404313..c560bcccd 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sapi/ZstackZbReadConfigurationSreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sapi/ZstackZbReadConfigurationSreq.java @@ -1,78 +1,79 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sapi; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.sys.ZstackConfigId; - -/** - * Class to implement the Z-Stack command ZB_READ_CONFIGURATION. - *

- * This command is used to get a configuration property from non-volatile memory. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackZbReadConfigurationSreq extends ZstackFrameRequest { - - /** - * Specifies the Identifier for the configuration property. - */ - private ZstackConfigId configId; - - /** - * Request constructor - */ - public ZstackZbReadConfigurationSreq() { - synchronousCommand = true; - } - - /** - * Specifies the Identifier for the configuration property. - * - * @return the current configId as {@link ZstackConfigId} - */ - public ZstackConfigId getConfigId() { - return configId; - } - - /** - * Specifies the Identifier for the configuration property. - * - * @param configId the ConfigId to set as {@link ZstackConfigId} - */ - public void setConfigId(ZstackConfigId configId) { - this.configId = configId; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_SAPI) && (response.getReqCmd1() == 0x04)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_SAPI, 0x04); - - // Serialize the fields - serializer.serializeUInt16(configId.getKey()); - return getPayload(); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(57); - builder.append("ZstackZbReadConfigurationSreq [configId="); - builder.append(configId); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sapi; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.sys.ZstackConfigId; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command ZB_READ_CONFIGURATION. + *

+ * This command is used to get a configuration property from non-volatile memory. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackZbReadConfigurationSreq extends ZstackFrameRequest { + + /** + * Specifies the Identifier for the configuration property. + */ + private ZstackConfigId configId; + + /** + * Request constructor + */ + public ZstackZbReadConfigurationSreq() { + synchronousCommand = true; + } + + /** + * Specifies the Identifier for the configuration property. + * + * @return the current configId as {@link ZstackConfigId} + */ + public ZstackConfigId getConfigId() { + return configId; + } + + /** + * Specifies the Identifier for the configuration property. + * + * @param configId the ConfigId to set as {@link ZstackConfigId} + */ + public void setConfigId(ZstackConfigId configId) { + this.configId = configId; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_SAPI) && (response.getReqCmd1() == 0x04)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_SAPI, 0x04); + + // Serialize the fields + serializer.serializeUInt16(configId.getKey()); + return getPayload(); + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(57); + builder.append("ZstackZbReadConfigurationSreq [configId="); + builder.append(configId); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sapi/ZstackZbReadConfigurationSrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sapi/ZstackZbReadConfigurationSrsp.java index f82e1bd7d..e8f250afd 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sapi/ZstackZbReadConfigurationSrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sapi/ZstackZbReadConfigurationSrsp.java @@ -1,127 +1,128 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sapi; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; -import com.zsmartsystems.zigbee.dongle.zstack.api.sys.ZstackConfigId; - -/** - * Class to implement the Z-Stack command ZB_READ_CONFIGURATION. - *

- * This command is used to get a configuration property from non-volatile memory. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackZbReadConfigurationSrsp extends ZstackFrameResponse { - - /** - * This field indicates either SUCCESS (0) or FAILURE (1). - */ - private ZstackResponseCode status; - - /** - * Specifies the Identifier for the configuration property. - */ - private ZstackConfigId configId; - - /** - * Buffer to hold the configuration property. - */ - private int[] value; - - /** - * Response and Handler constructor - */ - public ZstackZbReadConfigurationSrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); - configId = ZstackConfigId.valueOf(deserializer.deserializeUInt16()); - int len = deserializer.deserializeUInt8(); - value = deserializer.deserializeUInt8Array(len); - } - - /** - * This field indicates either SUCCESS (0) or FAILURE (1). - * - * @return the current status as {@link ZstackResponseCode} - */ - public ZstackResponseCode getStatus() { - return status; - } - - /** - * This field indicates either SUCCESS (0) or FAILURE (1). - * - * @param status the Status to set as {@link ZstackResponseCode} - */ - public void setStatus(ZstackResponseCode status) { - this.status = status; - } - - /** - * Specifies the Identifier for the configuration property. - * - * @return the current configId as {@link ZstackConfigId} - */ - public ZstackConfigId getConfigId() { - return configId; - } - - /** - * Specifies the Identifier for the configuration property. - * - * @param configId the ConfigId to set as {@link ZstackConfigId} - */ - public void setConfigId(ZstackConfigId configId) { - this.configId = configId; - } - - /** - * Buffer to hold the configuration property. - * - * @return the current value as {@link int[]} - */ - public int[] getValue() { - return value; - } - - /** - * Buffer to hold the configuration property. - * - * @param value the Value to set as {@link int[]} - */ - public void setValue(int[] value) { - this.value = value; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(132); - builder.append("ZstackZbReadConfigurationSrsp [status="); - builder.append(status); - builder.append(", configId="); - builder.append(configId); - builder.append(", value="); - for (int c = 0; c < value.length; c++) { - if (c > 0) { - builder.append(' '); - } - builder.append(String.format("%02X", value[c])); - } - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sapi; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; +import com.zsmartsystems.zigbee.dongle.zstack.api.sys.ZstackConfigId; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command ZB_READ_CONFIGURATION. + *

+ * This command is used to get a configuration property from non-volatile memory. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackZbReadConfigurationSrsp extends ZstackFrameResponse { + + /** + * This field indicates either SUCCESS (0) or FAILURE (1). + */ + private ZstackResponseCode status; + + /** + * Specifies the Identifier for the configuration property. + */ + private ZstackConfigId configId; + + /** + * Buffer to hold the configuration property. + */ + private int[] value; + + /** + * Response and Handler constructor + */ + public ZstackZbReadConfigurationSrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); + configId = ZstackConfigId.valueOf(deserializer.deserializeUInt16()); + int len = deserializer.deserializeUInt8(); + value = deserializer.deserializeUInt8Array(len); + } + + /** + * This field indicates either SUCCESS (0) or FAILURE (1). + * + * @return the current status as {@link ZstackResponseCode} + */ + public ZstackResponseCode getStatus() { + return status; + } + + /** + * This field indicates either SUCCESS (0) or FAILURE (1). + * + * @param status the Status to set as {@link ZstackResponseCode} + */ + public void setStatus(ZstackResponseCode status) { + this.status = status; + } + + /** + * Specifies the Identifier for the configuration property. + * + * @return the current configId as {@link ZstackConfigId} + */ + public ZstackConfigId getConfigId() { + return configId; + } + + /** + * Specifies the Identifier for the configuration property. + * + * @param configId the ConfigId to set as {@link ZstackConfigId} + */ + public void setConfigId(ZstackConfigId configId) { + this.configId = configId; + } + + /** + * Buffer to hold the configuration property. + * + * @return the current value as {@link int[]} + */ + public int[] getValue() { + return value; + } + + /** + * Buffer to hold the configuration property. + * + * @param value the Value to set as {@link int[]} + */ + public void setValue(int[] value) { + this.value = value; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(132); + builder.append("ZstackZbReadConfigurationSrsp [status="); + builder.append(status); + builder.append(", configId="); + builder.append(configId); + builder.append(", value="); + for (int c = 0; c < value.length; c++) { + if (c > 0) { + builder.append(' '); + } + builder.append(String.format("%02X", value[c])); + } + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sapi/ZstackZbWriteConfigurationSreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sapi/ZstackZbWriteConfigurationSreq.java index b70e631f4..d8eda56e2 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sapi/ZstackZbWriteConfigurationSreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sapi/ZstackZbWriteConfigurationSreq.java @@ -1,110 +1,111 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sapi; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; -import com.zsmartsystems.zigbee.dongle.zstack.api.sys.ZstackConfigId; - -/** - * Class to implement the Z-Stack command ZB_WRITE_CONFIGURATION. - *

- * This command is used to write a configuration property to nonvolatile memory. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackZbWriteConfigurationSreq extends ZstackFrameRequest { - - /** - * Specifies the Identifier for the configuration property. - */ - private ZstackConfigId configId; - - /** - * Buffer to hold the configuration property. - */ - private int[] value; - - /** - * Request constructor - */ - public ZstackZbWriteConfigurationSreq() { - synchronousCommand = true; - } - - /** - * Specifies the Identifier for the configuration property. - * - * @return the current configId as {@link ZstackConfigId} - */ - public ZstackConfigId getConfigId() { - return configId; - } - - /** - * Specifies the Identifier for the configuration property. - * - * @param configId the ConfigId to set as {@link ZstackConfigId} - */ - public void setConfigId(ZstackConfigId configId) { - this.configId = configId; - } - - /** - * Buffer to hold the configuration property. - * - * @return the current value as {@link int[]} - */ - public int[] getValue() { - return value; - } - - /** - * Buffer to hold the configuration property. - * - * @param value the Value to set as {@link int[]} - */ - public void setValue(int[] value) { - this.value = value; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_SAPI) && (response.getReqCmd1() == 0x05)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_SAPI, 0x05); - - // Serialize the fields - serializer.serializeUInt16(configId.getKey()); - serializer.serializeUInt8(value.length); - serializer.serializeUInt8Array(value); - return getPayload(); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(108); - builder.append("ZstackZbWriteConfigurationSreq [configId="); - builder.append(configId); - builder.append(", value="); - for (int c = 0; c < value.length; c++) { - if (c > 0) { - builder.append(' '); - } - builder.append(String.format("%02X", value[c])); - } - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sapi; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import com.zsmartsystems.zigbee.dongle.zstack.api.sys.ZstackConfigId; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command ZB_WRITE_CONFIGURATION. + *

+ * This command is used to write a configuration property to nonvolatile memory. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackZbWriteConfigurationSreq extends ZstackFrameRequest { + + /** + * Specifies the Identifier for the configuration property. + */ + private ZstackConfigId configId; + + /** + * Buffer to hold the configuration property. + */ + private int[] value; + + /** + * Request constructor + */ + public ZstackZbWriteConfigurationSreq() { + synchronousCommand = true; + } + + /** + * Specifies the Identifier for the configuration property. + * + * @return the current configId as {@link ZstackConfigId} + */ + public ZstackConfigId getConfigId() { + return configId; + } + + /** + * Specifies the Identifier for the configuration property. + * + * @param configId the ConfigId to set as {@link ZstackConfigId} + */ + public void setConfigId(ZstackConfigId configId) { + this.configId = configId; + } + + /** + * Buffer to hold the configuration property. + * + * @return the current value as {@link int[]} + */ + public int[] getValue() { + return value; + } + + /** + * Buffer to hold the configuration property. + * + * @param value the Value to set as {@link int[]} + */ + public void setValue(int[] value) { + this.value = value; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_SAPI) && (response.getReqCmd1() == 0x05)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_SAPI, 0x05); + + // Serialize the fields + serializer.serializeUInt16(configId.getKey()); + serializer.serializeUInt8(value.length); + serializer.serializeUInt8Array(value); + return getPayload(); + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(108); + builder.append("ZstackZbWriteConfigurationSreq [configId="); + builder.append(configId); + builder.append(", value="); + for (int c = 0; c < value.length; c++) { + if (c > 0) { + builder.append(' '); + } + builder.append(String.format("%02X", value[c])); + } + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sapi/ZstackZbWriteConfigurationSrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sapi/ZstackZbWriteConfigurationSrsp.java index 9c54fe248..5f6b24013 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sapi/ZstackZbWriteConfigurationSrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sapi/ZstackZbWriteConfigurationSrsp.java @@ -1,68 +1,69 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sapi; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; - -/** - * Class to implement the Z-Stack command ZB_WRITE_CONFIGURATION. - *

- * This command is used to write a configuration property to nonvolatile memory. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackZbWriteConfigurationSrsp extends ZstackFrameResponse { - - /** - * This field indicates either SUCCESS (0) or FAILURE (1). - */ - private ZstackResponseCode status; - - /** - * Response and Handler constructor - */ - public ZstackZbWriteConfigurationSrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); - } - - /** - * This field indicates either SUCCESS (0) or FAILURE (1). - * - * @return the current status as {@link ZstackResponseCode} - */ - public ZstackResponseCode getStatus() { - return status; - } - - /** - * This field indicates either SUCCESS (0) or FAILURE (1). - * - * @param status the Status to set as {@link ZstackResponseCode} - */ - public void setStatus(ZstackResponseCode status) { - this.status = status; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(58); - builder.append("ZstackZbWriteConfigurationSrsp [status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sapi; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command ZB_WRITE_CONFIGURATION. + *

+ * This command is used to write a configuration property to nonvolatile memory. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackZbWriteConfigurationSrsp extends ZstackFrameResponse { + + /** + * This field indicates either SUCCESS (0) or FAILURE (1). + */ + private ZstackResponseCode status; + + /** + * Response and Handler constructor + */ + public ZstackZbWriteConfigurationSrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); + } + + /** + * This field indicates either SUCCESS (0) or FAILURE (1). + * + * @return the current status as {@link ZstackResponseCode} + */ + public ZstackResponseCode getStatus() { + return status; + } + + /** + * This field indicates either SUCCESS (0) or FAILURE (1). + * + * @param status the Status to set as {@link ZstackResponseCode} + */ + public void setStatus(ZstackResponseCode status) { + this.status = status; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(58); + builder.append("ZstackZbWriteConfigurationSrsp [status="); + builder.append(status); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sbl/ZstackSbHandshakeCmdSreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sbl/ZstackSbHandshakeCmdSreq.java index 86be7f9db..2f6fd7cc8 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sbl/ZstackSbHandshakeCmdSreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sbl/ZstackSbHandshakeCmdSreq.java @@ -1,47 +1,48 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sbl; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; - -/** - * Class to implement the Z-Stack command SB_HANDSHAKE_CMD. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackSbHandshakeCmdSreq extends ZstackFrameRequest { - - /** - * Request constructor - */ - public ZstackSbHandshakeCmdSreq() { - synchronousCommand = true; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_SBL) && (response.getReqCmd1() == 0x04)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_SBL, 0x04); - - // Serialize the fields - return getPayload(); - } - - @Override - public String toString() { - return "ZstackSbHandshakeCmdSreq []"; - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sbl; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command SB_HANDSHAKE_CMD. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackSbHandshakeCmdSreq extends ZstackFrameRequest { + + /** + * Request constructor + */ + public ZstackSbHandshakeCmdSreq() { + synchronousCommand = true; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_SBL) && (response.getReqCmd1() == 0x04)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_SBL, 0x04); + + // Serialize the fields + return getPayload(); + } + + @Override + public String toString() { + return "ZstackSbHandshakeCmdSreq []"; + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sbl/ZstackSbHandshakeCmdSrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sbl/ZstackSbHandshakeCmdSrsp.java index 664318705..0c6423029 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sbl/ZstackSbHandshakeCmdSrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sbl/ZstackSbHandshakeCmdSrsp.java @@ -1,168 +1,169 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sbl; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; - -/** - * Class to implement the Z-Stack command SB_HANDSHAKE_CMD. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackSbHandshakeCmdSrsp extends ZstackFrameResponse { - - /** - * 0x00 - SUCCESS 0x01 - FAILURE - */ - private ZstackResponseCode status; - - /** - */ - private int bootloaderRevision; - - /** - */ - private int deviceType; - - /** - * The maximum data size to use with Read / Write command - */ - private int bufferLength; - - /** - * 0x800 – CC2538 flash page size - */ - private int pageSize; - - /** - * Response and Handler constructor - */ - public ZstackSbHandshakeCmdSrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); - bootloaderRevision = deserializer.deserializeUInt32(); - deviceType = deserializer.deserializeUInt8(); - bufferLength = deserializer.deserializeUInt32(); - pageSize = deserializer.deserializeUInt32(); - } - - /** - * 0x00 - SUCCESS 0x01 - FAILURE - * - * @return the current status as {@link ZstackResponseCode} - */ - public ZstackResponseCode getStatus() { - return status; - } - - /** - * 0x00 - SUCCESS 0x01 - FAILURE - * - * @param status the Status to set as {@link ZstackResponseCode} - */ - public void setStatus(ZstackResponseCode status) { - this.status = status; - } - - /** - * - * - * @return the current bootloaderRevision as {@link int} - */ - public int getBootloaderRevision() { - return bootloaderRevision; - } - - /** - * - * - * @param bootloaderRevision the BootloaderRevision to set as {@link int} - */ - public void setBootloaderRevision(int bootloaderRevision) { - this.bootloaderRevision = bootloaderRevision; - } - - /** - * - * - * @return the current deviceType as {@link int} - */ - public int getDeviceType() { - return deviceType; - } - - /** - * - * - * @param deviceType the DeviceType to set as {@link int} - */ - public void setDeviceType(int deviceType) { - this.deviceType = deviceType; - } - - /** - * The maximum data size to use with Read / Write command - * - * @return the current bufferLength as {@link int} - */ - public int getBufferLength() { - return bufferLength; - } - - /** - * The maximum data size to use with Read / Write command - * - * @param bufferLength the BufferLength to set as {@link int} - */ - public void setBufferLength(int bufferLength) { - this.bufferLength = bufferLength; - } - - /** - * 0x800 – CC2538 flash page size - * - * @return the current pageSize as {@link int} - */ - public int getPageSize() { - return pageSize; - } - - /** - * 0x800 – CC2538 flash page size - * - * @param pageSize the PageSize to set as {@link int} - */ - public void setPageSize(int pageSize) { - this.pageSize = pageSize; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(152); - builder.append("ZstackSbHandshakeCmdSrsp [status="); - builder.append(status); - builder.append(", bootloaderRevision="); - builder.append(bootloaderRevision); - builder.append(", deviceType="); - builder.append(deviceType); - builder.append(", bufferLength="); - builder.append(bufferLength); - builder.append(", pageSize="); - builder.append(pageSize); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sbl; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command SB_HANDSHAKE_CMD. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackSbHandshakeCmdSrsp extends ZstackFrameResponse { + + /** + * 0x00 - SUCCESS 0x01 - FAILURE + */ + private ZstackResponseCode status; + + /** + */ + private int bootloaderRevision; + + /** + */ + private int deviceType; + + /** + * The maximum data size to use with Read / Write command + */ + private int bufferLength; + + /** + * 0x800 – CC2538 flash page size + */ + private int pageSize; + + /** + * Response and Handler constructor + */ + public ZstackSbHandshakeCmdSrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); + bootloaderRevision = deserializer.deserializeUInt32(); + deviceType = deserializer.deserializeUInt8(); + bufferLength = deserializer.deserializeUInt32(); + pageSize = deserializer.deserializeUInt32(); + } + + /** + * 0x00 - SUCCESS 0x01 - FAILURE + * + * @return the current status as {@link ZstackResponseCode} + */ + public ZstackResponseCode getStatus() { + return status; + } + + /** + * 0x00 - SUCCESS 0x01 - FAILURE + * + * @param status the Status to set as {@link ZstackResponseCode} + */ + public void setStatus(ZstackResponseCode status) { + this.status = status; + } + + /** + * + * + * @return the current bootloaderRevision as {@link int} + */ + public int getBootloaderRevision() { + return bootloaderRevision; + } + + /** + * + * + * @param bootloaderRevision the BootloaderRevision to set as {@link int} + */ + public void setBootloaderRevision(int bootloaderRevision) { + this.bootloaderRevision = bootloaderRevision; + } + + /** + * + * + * @return the current deviceType as {@link int} + */ + public int getDeviceType() { + return deviceType; + } + + /** + * + * + * @param deviceType the DeviceType to set as {@link int} + */ + public void setDeviceType(int deviceType) { + this.deviceType = deviceType; + } + + /** + * The maximum data size to use with Read / Write command + * + * @return the current bufferLength as {@link int} + */ + public int getBufferLength() { + return bufferLength; + } + + /** + * The maximum data size to use with Read / Write command + * + * @param bufferLength the BufferLength to set as {@link int} + */ + public void setBufferLength(int bufferLength) { + this.bufferLength = bufferLength; + } + + /** + * 0x800 – CC2538 flash page size + * + * @return the current pageSize as {@link int} + */ + public int getPageSize() { + return pageSize; + } + + /** + * 0x800 – CC2538 flash page size + * + * @param pageSize the PageSize to set as {@link int} + */ + public void setPageSize(int pageSize) { + this.pageSize = pageSize; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(152); + builder.append("ZstackSbHandshakeCmdSrsp [status="); + builder.append(status); + builder.append(", bootloaderRevision="); + builder.append(bootloaderRevision); + builder.append(", deviceType="); + builder.append(deviceType); + builder.append(", bufferLength="); + builder.append(bufferLength); + builder.append(", pageSize="); + builder.append(pageSize); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sbl/ZstackSbWriteCmdSreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sbl/ZstackSbWriteCmdSreq.java index e10b22b58..2becfbb9b 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sbl/ZstackSbWriteCmdSreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sbl/ZstackSbWriteCmdSreq.java @@ -1,81 +1,82 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sbl; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; - -/** - * Class to implement the Z-Stack command SB_WRITE_CMD. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackSbWriteCmdSreq extends ZstackFrameRequest { - - /** - * Payload data. - */ - private int[] payload; - - /** - * Request constructor - */ - public ZstackSbWriteCmdSreq() { - synchronousCommand = true; - } - - /** - * Payload data. - * - * @return the current payload as {@link int[]} - */ - public int[] getPayload() { - return payload; - } - - /** - * Payload data. - * - * @param payload the Payload to set as {@link int[]} - */ - public void setPayload(int[] payload) { - this.payload = payload; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_SBL) && (response.getReqCmd1() == 0x00)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_SBL, 0x00); - - // Serialize the fields - serializer.serializeUInt32(payload.length); - serializer.serializeUInt8Array(payload); - return getPayload(); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(73); - builder.append("ZstackSbWriteCmdSreq [payload="); - for (int c = 0; c < payload.length; c++) { - if (c > 0) { - builder.append(' '); - } - builder.append(String.format("%02X", payload[c])); - } - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sbl; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command SB_WRITE_CMD. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackSbWriteCmdSreq extends ZstackFrameRequest { + + /** + * Payload data. + */ + private int[] payload; + + /** + * Request constructor + */ + public ZstackSbWriteCmdSreq() { + synchronousCommand = true; + } + + /** + * Payload data. + * + * @return the current payload as {@link int[]} + */ + public int[] getPayload() { + return payload; + } + + /** + * Payload data. + * + * @param payload the Payload to set as {@link int[]} + */ + public void setPayload(int[] payload) { + this.payload = payload; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_SBL) && (response.getReqCmd1() == 0x00)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_SBL, 0x00); + + // Serialize the fields + serializer.serializeUInt32(payload.length); + serializer.serializeUInt8Array(payload); + return getPayload(); + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(73); + builder.append("ZstackSbWriteCmdSreq [payload="); + for (int c = 0; c < payload.length; c++) { + if (c > 0) { + builder.append(' '); + } + builder.append(String.format("%02X", payload[c])); + } + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sbl/ZstackSbWriteCmdSrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sbl/ZstackSbWriteCmdSrsp.java index 7f2dba54a..b4a09e3e9 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sbl/ZstackSbWriteCmdSrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sbl/ZstackSbWriteCmdSrsp.java @@ -1,66 +1,67 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sbl; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; - -/** - * Class to implement the Z-Stack command SB_WRITE_CMD. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackSbWriteCmdSrsp extends ZstackFrameResponse { - - /** - * 0x00 - SUCCESS 0x01 - FAILURE - */ - private ZstackResponseCode status; - - /** - * Response and Handler constructor - */ - public ZstackSbWriteCmdSrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); - } - - /** - * 0x00 - SUCCESS 0x01 - FAILURE - * - * @return the current status as {@link ZstackResponseCode} - */ - public ZstackResponseCode getStatus() { - return status; - } - - /** - * 0x00 - SUCCESS 0x01 - FAILURE - * - * @param status the Status to set as {@link ZstackResponseCode} - */ - public void setStatus(ZstackResponseCode status) { - this.status = status; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(48); - builder.append("ZstackSbWriteCmdSrsp [status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sbl; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command SB_WRITE_CMD. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackSbWriteCmdSrsp extends ZstackFrameResponse { + + /** + * 0x00 - SUCCESS 0x01 - FAILURE + */ + private ZstackResponseCode status; + + /** + * Response and Handler constructor + */ + public ZstackSbWriteCmdSrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); + } + + /** + * 0x00 - SUCCESS 0x01 - FAILURE + * + * @return the current status as {@link ZstackResponseCode} + */ + public ZstackResponseCode getStatus() { + return status; + } + + /** + * 0x00 - SUCCESS 0x01 - FAILURE + * + * @param status the Status to set as {@link ZstackResponseCode} + */ + public void setStatus(ZstackResponseCode status) { + this.status = status; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(48); + builder.append("ZstackSbWriteCmdSrsp [status="); + builder.append(status); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackConfigId.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackConfigId.java index 962e6ae57..65f43f495 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackConfigId.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackConfigId.java @@ -1,663 +1,663 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sys; - -import java.util.HashMap; -import java.util.Map; - -/** - * Class to implement the Z-Stack Enumeration ZstackConfigId. - *

- * Device specific configuration parameters. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public enum ZstackConfigId { - /** - * Default unknown value - */ - UNKNOWN(-1), - - /** - * - */ - ZCD_NV_EXTADDR(0x0000), - - /** - * - */ - ZCD_NV_BOOTCOUNTER(0x0001), - - /** - * This parameter controls the device startup options. Size: 1 byte; Default value: 0 - */ - ZCD_NV_STARTUP_OPTION(0x0003), - - /** - * - */ - ZCD_NV_START_DELAY(0x0004), - - /** - * This item holds all kinds of network information. - */ - ZCD_NV_NIB(0x0021), - - /** - * If this parameter is set to a non-zero value, a CC2530-ZNP device that is configured as an end- device will wake up periodically - * with this duration to check for data with its parent device. This value is specified in milliseconds and can range from 1 to 65000. - * If this parameter is set to zero, the device will not automatically wake up to poll for data. Instead, an external trigger or an - * internal event (for example, via a software timer event) can be used to wake up the device. Size: 4 bytes; Default value: 2000 - */ - ZCD_NV_POLL_RATE_OLD16(0x0035), - - /** - * When an end-device polls for data with its parent and finds that it does have data, it can poll again with a shorter duration in case - * there is more data queued for it at its parent device. This value is specified in milliseconds. This feature can be turned off by - * setting this value to zero. Size: 2 bytes; Default value: 100 - */ - ZCD_NV_QUEUED_POLL_RATE(0x0025), - - /** - * When an end-device sends a data packet, it can poll again with a shorter duration, specified by this parameter, if the - * application is expecting to receive an application level packet in response. This value is specified in milliseconds. This - * feature can be turned off by setting the value to zero. - *

- * Note: The setting of the queued and response poll rates has to be done with caution if the device is sending and receiving - * at the same time or if the device is sending data too fast. If the device is sending data too fast, setting a queued poll rate with a - * higher duration than the sending rate will cause the poll event to be continuously rescheduled to the future. Then the device - * will never poll for data with its parent and consequently it may miss any packets destined for it. Size: 2 bytes; Default value: - * 100 - */ - ZCD_NV_RESPONSE_POLL_RATE(0x0026), - - /** - * - */ - ZCD_NV_REJOIN_POLL_RATE(0x0027), - - /** - * - */ - ZCD_NV_DATA_RETRIES(0x0028), - - /** - * The number of times an end-device will fail when communicating with its parent before invoking the rejoin mechanism to find and - * join a new parent. Size: 1 byte; Default value: 2. - */ - ZCD_NV_POLL_FAILURE_RETRIES(0x0029), - - /** - * - */ - ZCD_NV_STACK_PROFILE(0x002A), - - /** - * The amount of time (in seconds) that a router or coordinator device will buffer messages destined to their end-device child - * nodes. It is recommended that this is at least greater than the poll rate (ZCD_NV_POLL_RATE) to ensure that end-device will have - * a chance to wakeup and poll for the data. Size: 1 byte; Default value: 7 - */ - ZCD_NV_INDIRECT_MSG_TIMEOUT(0x002B), - - /** - * The amount of time (in seconds) for which a route must be idle (i.e. no packets are transmitted on that route) before that routing - * entry is marked as expired. An expired entry may be deleted if the table is full and the space is needed for another new routing - * entry. This can be set to a special value of 0 to turn off route expiry. In this case, route entries are not expired. Size: 1 byte; - * Default value: 60. - */ - ZCD_NV_ROUTE_EXPIRY_TIME(0x002C), - - /** - * This parameter configures the EXTENDED PAN ID in Z-Stack. The extended pan id is used to further segregate the sub network(s) - * among a bigger PAN network. - */ - ZCD_NV_EXTPANID(0x002D), - - /** - * The maximum number of retransmissions that a device will attempt when trying to transmit a broadcast packet. The typical range - * is from 1 through 3. Size: 1 byte; Default value: 2. - */ - ZCD_NV_BCAST_RETRIES(0x002E), - - /** - * The amount of time (in units of 100milliseconds) a device will wait before retransmitting a broadcast packet. The - * retransmission will not happen if the node hears that each of its neighbor nodes have all transmitted that packet. Size: 1 byte; - * Default value: 5 - */ - ZCD_NV_PASSIVE_ACK_TIMEOUT(0x002F), - - /** - * The maximum amount of time (in units of 100ms) that it can take for a broadcast packet to propagate through the entire network. - * This includes time for all retransmissions. - *

- * Note: This parameter must be set with caution. It must be set to a value of at least (ZCD_NV_BCAST_RETRIES + 1) * - * ZCD_NV_PASSIVE_ACK_TIMEOUT To be safe, the actual value should be higher than the above minimum by about 500ms or more. Size: 1 - * byte; Default value: 30. - */ - ZCD_NV_BCAST_DELIVERY_TIME(0x0030), - - /** - * Holds the value of the network operational mode. The default value is NWK_MODE_MESH and must not be modified. - */ - ZCD_NV_NWK_MODE(0x0031), - - /** - * - */ - ZCD_NV_CONCENTRATOR_ENABLE(0x0032), - - /** - * - */ - ZCD_NV_CONCENTRATOR_DISCOVERY(0x0033), - - /** - * - */ - ZCD_NV_CONCENTRATOR_RADIUS(0x0034), - - /** - * If this parameter is set to a non-zero value, a CC2530-ZNP device that is configured as an end- device will wake up periodically - * with this duration to check for data with its parent device. This value is specified in milliseconds and can range from 1 to 65000. - * If this parameter is set to zero, the device will not automatically wake up to poll for data. Instead, an external trigger or an - * internal event (for example, via a software timer event) can be used to wake up the device. Size: 4 bytes; Default value: 2000 - */ - ZCD_NV_POLL_RATE(0x0035), - - /** - * Holds the value of route cache flag. This enables or disables the route cache for coordinator and is FALSE by default. - */ - ZCD_NV_CONCENTRATOR_RC(0x0036), - - /** - * - */ - ZCD_NV_NWK_MGR_MODE(0x0037), - - /** - * - */ - ZCD_NV_SRC_RTG_EXPIRY_TIME(0x0038), - - /** - * - */ - ZCD_NV_ROUTE_DISCOVERY_TIME(0x0039), - - /** - * - */ - ZCD_NV_NWK_ACTIVE_KEY_INFO(0x003A), - - /** - * - */ - ZCD_NV_NWK_ALTERN_KEY_INFO(0x003B), - - /** - * - */ - ZCD_NV_ROUTER_OFF_ASSOC_CLEANUP(0x003C), - - /** - * - */ - ZCD_NV_NWK_LEAVE_REQ_ALLOWED(0x003D), - - /** - * Holds the value of Child Aging capability flag. This enables or disables child aging and must be set to TRUE for Zigbee 3.0 - * compliance. - */ - ZCD_NV_NWK_CHILD_AGE_ENABLE(0x003E), - - /** - * - */ - ZCD_NV_DEVICE_LIST_KA_TIMEOUT(0x003F), - - /** - * - */ - ZCD_NV_BINDING_TABLE(0x0041), - - /** - * - */ - ZCD_NV_GROUP_TABLE(0x0042), - - /** - * The number of retransmissions performed on a data packet at the application layer if the packet was transmitted with the - * end-to-end acknowledgement option enabled. Size: 1 byte; Default value: 3 - */ - ZCD_NV_APS_FRAME_RETRIES(0x0043), - - /** - * The amount of time (in milliseconds) a device will wait before re-transmitting a packet that used the APS acknowledgement - * option. If the APS acknowledgement is not received by this time, the sending device will assume a failure and attempt a - * re-transmission. - *

- * Note: This is recommended to be set to approximately the expected round trip time for the packet. Note that if the - * destination (or source) device is an end-device, the round trip time for the packet will include an additional delay up to the - * poll duration. This is in addition to the delay normally caused by the network. Size: 2 bytes; Default value: 3000 - */ - ZCD_NV_APS_ACK_WAIT_DURATION(0x0044), - - /** - * - */ - ZCD_NV_APS_ACK_WAIT_MULTIPLIER(0x0045), - - /** - * The amount of time (in milliseconds) a device will wait for a response to a binding request. Size: 2 bytes; Default value: 8000 - */ - ZCD_NV_BINDING_TIME(0x0046), - - /** - * - */ - ZCD_NV_APS_USE_EXT_PANID(0x0047), - - /** - * - */ - ZCD_NV_COMMISSIONED_NWK_ADDR(0x0049), - - /** - * - */ - ZCD_NV_APS_NONMEMBER_RADIUS(0x004B), - - /** - * Holds the security manager entries of type ZDSecMgrEntry_t to store the TCKL used to talk with devices in the network that - * require APS security. The number of entries is controled by ZDSECMGR_DEVICE_MAX=3 by default. - */ - ZCD_NV_APS_LINK_KEY_TABLE(0x004C), - - /** - * - */ - ZCD_NV_APS_DUPREJ_TIMEOUT_INC(0x004D), - - /** - * - */ - ZCD_NV_APS_DUPREJ_TIMEOUT_COUNT(0x004E), - - /** - * - */ - ZCD_NV_APS_DUPREJ_TABLE_SIZE(0x004F), - - /** - * - */ - ZCD_NV_DIAGNOSTIC_STATS(0x0050), - - /** - * - */ - ZCD_NV_NWK_PARENT_INFO(0x0051), - - /** - * - */ - ZCD_NV_NWK_ENDDEV_TIMEOUT_DEF(0x0052), - - /** - * Holds the value of Child Aging Timeout. This is the time in seconds used by END DEVICE when sending End Device Timeout Request that - * tells a COORDINATOR the timeout to remove this END DEVICE after no data poll is received. - */ - ZCD_NV_END_DEV_TIMEOUT_VALUE(0x0053), - - /** - * Holds the value of End Device Configuration field when END DEVICE when sending End Device Timeout Request. Is set to 0x00 by - * default which is the only valid value accourding to Zigbee Core spec R21. - */ - ZCD_NV_END_DEV_CONFIGURATION(0x0054), - - /** - * - */ - ZCD_NV_BDBNODEISONANETWORK(0x0055), - - /** - * - */ - ZCD_NV_BDBREPORTINGCONFIG(0x0056), - - /** - * holds the value of network key that is generated by default. The key can be set to a fixed value by setting DEFAULT_KEY macro. This - * is used for securing and un-securing packets in the network, if security is enabled for the network. - *

- * Note: Use of this configuration item requires the ZNP code to be built with the SECURE=1 compile option. Size: 16 bytes; - * Default value: [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F] - */ - ZCD_NV_PRECFGKEY(0x0062), - - /** - * If security functionality is enabled, there are two options to distribute the security key to all devices in the network. If this - * parameter is true, the same security key is assumed to be pre-configured in all devices in the network.If it is set to false, then - * the key only needs to be configured on the coordinator device. In this case, the key is distributed to each device upon joining by - * the coordinator. This key distribution will happen in the “clear” on the last hop of the packet transmission and this - * constitutes a brief “period of vulnerability” during which a malicious device can capture the key. Hence it is not recommended - * unless it can be ensured that there are no malicious devices in the vicinity at the time of network formation. - *

- * Note: Use of this configuration item requires the ZNP code to be built with the SECURE=1 compile option. Size: 1 byte; - * Default value: TRUE - */ - ZCD_NV_PRECFGKEYS_ENABLE(0x0063), - - /** - * This parameter determines if security is used or not in this network. It can be set to 0 (to turn off NWK security) or 1 (to turn on NWK - * security). Size: 1 byte; Default value: 0. - */ - ZCD_NV_SECURITY_MODE(0x0064), - - /** - * This value tells if only secure joins are allowed. Set to TRUE by default which is the only valid value according to Zigbee Core - * spec R21. - */ - ZCD_NV_SECURE_PERMIT_JOIN(0x0065), - - /** - * Is equal to ZG_GLOBAL_LINK_KEY=1 and must not be modified according to Zigbee Core spec R21. - */ - ZCD_NV_APS_LINK_KEY_TYPE(0x0066), - - /** - * - */ - ZCD_NV_APS_ALLOW_R19_SECURITY(0x0067), - - /** - * Default distributed nwk key Id. Nv ID not in use - */ - ZCD_NV_DISTRIBUTED_KEY(0x0068), - - /** - * - */ - ZCD_NV_IMPLICIT_CERTIFICATE(0x0069), - - /** - * - */ - ZCD_NV_DEVICE_PRIVATE_KEY(0x006A), - - /** - * - */ - ZCD_NV_CA_PUBLIC_KEY(0x006B), - - /** - * - */ - ZCD_NV_KE_MAX_DEVICES(0x006C), - - /** - * Controls whether a single pre-configured trust center link key is used or whether multiple pre- configured trust center link - * keys are used, hereby referred to as Single Key Mode and Multiple Key Mode, respectively. In multiple key mode, unique - * pre-configured trust center link keys are used between the trust center and each individual device joining the network. - * Multiple key mode is required by the recommended secure procedure in ZigBeeSE profile Specification. In single key mode, all - * devices are using the same pre-configured trust center link key to join the network. The single key mode provides a simplified - * alternative procedure to set up the network. It can be used for testing and debugging purpose. Size: 1 byte; Default value: TRUE - */ - ZCD_NV_USE_DEFAULT_TCLK(0x006D), - - /** - * - */ - ZCD_NV_RNG_COUNTER(0x006F), - - /** - * - */ - ZCD_NV_RANDOM_SEED(0x0070), - - /** - * - */ - ZCD_NV_TRUSTCENTER_ADDR(0x0071), - - /** - * - */ - ZCD_NV_CERT_283(0x0072), - - /** - * - */ - ZCD_NV_PRIVATE_KEY_283(0x0073), - - /** - * - */ - ZCD_NV_PUBLIC_KEY_283(0x0074), - - /** - * - */ - ZCD_NV_NWK_SEC_MATERIAL_TABLE_START(0x0075), - - /** - * - */ - ZCD_NV_NWK_SEC_MATERIAL_TABLE_END(0x0080), - - /** - * An optional user-defined data (up to 16bytes) that can be configured in a CC2530-ZNP device so that it can easily identified or - * described later. The first byte is the length of the user descriptor data and must not be greater than 16. Size: 17 bytes; Default - * value: “CC2530-ZNP x......” (dots represent the device IEEE address) - */ - ZCD_NV_USERDESC(0x0081), - - /** - * This holds the value of nwkActiveKeyItems structure and restores the NWK key counter after power cycles. - */ - ZCD_NV_NWKKEY(0x0082), - - /** - * This parameter identifies the ZigBee network. This should be set to a value between 0 and 0x3FFF. Networks that exist in the same - * vicinity must have different values for this parameter. It can be set to a special value of 0xFFFF to indicate “don’t care”. Size: - * 2 bytes; Default value: 0xFFFF - */ - ZCD_NV_PANID(0x0083), - - /** - * This parameter is a bit mask of the channels on which this network can operate (note that multiple channels can be selected). See - * section 4.5.16 for a table of the bitmap representation that maps to each channel. Multiple networks that exist in the same - * vicinity are encouraged to have different values. If multiple channels are selected, the coordinator will pick one of the - * channels for network operation. First, an energy scan is performed on each channel and those channels with a high energy level - * are discarded. Then, the coordinator determines the number of existing ZigBee networks on each of the remaining channels and - * picks the one with the fewest networks. For routers and end-devices, the device will simply scan all the selected channels until - * it finds the ZigBee network. Size: 4 bytes; Default value: 0x00000800 - */ - ZCD_NV_CHANLIST(0x0084), - - /** - * - */ - ZCD_NV_SCAN_DURATION(0x0086), - - /** - * This is the logical type of the device in the ZigBee network. This can be set to a COORDINATOR (0x00), ROUTER (0x01) or ENDDEVICE - * (0x02). - *

- * Note: This parameter is read by the CC2530-ZNP device immediately when it powers up after a reset. Size: 1 byte; Default - * value: 0x00 - */ - ZCD_NV_LOGICAL_TYPE(0x0087), - - /** - * - */ - ZCD_NV_NWKMGR_MIN_TX(0x0088), - - /** - * - */ - ZCD_NV_NWKMGR_ADDR(0x0089), - - /** - * This configures the manner in which ZDO responses (hereby referred to as callbacks) are issued to the host processor. By - * default, this item is set to FALSE, which means that the host processor must use the ZDO_MSG_CB_REGISTER command to subscribe to - * a specific ZDO callback in order to receive it. The ZDO callback is then conveyed as part of the ZDO_MSG_CB_INCOMING command. If - * ZCD_NV_ZDO_DIRECT_CB is set TRUE, then the host processor will receive the “verbose” response. For example, the host - * processor would receive the ZDO_IEEE_ADDR_RSP command in response to ZDO_IEEE_ADDR_REQ. Size: 1 byte; Default value: FALSE - */ - ZCD_NV_ZDO_DIRECT_CB(0x008F), - - /** - * - */ - ZCD_NV_SAS_SHORT_ADDR(0x00B1), - - /** - * - */ - ZCD_NV_SAS_EXT_PANID(0x00B2), - - /** - * - */ - ZCD_NV_SAS_PANID(0x00B3), - - /** - * - */ - ZCD_NV_SAS_CHANNEL_MASK(0x00B4), - - /** - * - */ - ZCD_NV_SAS_PROTOCOL_VER(0x00B5), - - /** - * - */ - ZCD_NV_SAS_STACK_PROFILE(0x00B6), - - /** - * - */ - ZCD_NV_SAS_STARTUP_CTRL(0x00B7), - - /** - * - */ - ZCD_NV_SAS_TC_ADDR(0x00C1), - - /** - * - */ - ZCD_NV_SAS_TC_MASTER_KEY(0x00C2), - - /** - * - */ - ZCD_NV_SAS_NWK_KEY(0x00C3), - - /** - * - */ - ZCD_NV_SAS_USE_INSEC_JOIN(0x00C4), - - /** - * - */ - ZCD_NV_SAS_PRECFG_LINK_KEY(0x00C5), - - /** - * - */ - ZCD_NV_SAS_NWK_KEY_SEQ_NUM(0x00C6), - - /** - * - */ - ZCD_NV_SAS_NWK_KEY_TYPE(0x00C7), - - /** - * - */ - ZCD_NV_SAS_NWK_MGR_ADDR(0x00C8), - - /** - * - */ - ZCD_NV_SAS_CURR_TC_MASTER_KEY(0x00D1), - - /** - * - */ - ZCD_NV_SAS_CURR_NWK_KEY(0x00D2), - - /** - * - */ - ZCD_NV_TCLK_TABLE_START(0x0101), - - /** - * - */ - ZCD_NV_TCLK_TABLE_END(0x01FF), - - /** - * - */ - ZCD_NV_APS_LINK_KEY_DATA_START(0x0201), - - /** - * - */ - ZCD_NV_APS_LINK_KEY_DATA_END(0x02FF); - - /** - * A mapping between the integer code and its corresponding type to - * facilitate lookup by code. - */ - private static Map codeMapping; - - private int key; - - static { - codeMapping = new HashMap(); - for (ZstackConfigId s : values()) { - codeMapping.put(s.key, s); - } - } - - private ZstackConfigId(int key) { - this.key = key; - } - - /** - * Lookup function based on the type code. Returns null if the code does not exist. - * - * @param code the code to lookup - * @return enumeration value of the alarm type. - */ - public static ZstackConfigId valueOf(int code) { - if (codeMapping.get(code) == null) { - return UNKNOWN; - } - - return codeMapping.get(code); - } - - /** - * Returns the Z-Stack protocol defined value for this enumeration. - * - * @return the Z-Stack protocol key - */ - public int getKey() { - return key; - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sys; + +import java.util.HashMap; +import java.util.Map; + +/** + * Class to implement the Z-Stack Enumeration ZstackConfigId. + *

+ * Device specific configuration parameters. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + * + * @author Chris Jackson + */ +public enum ZstackConfigId { + /** + * Default unknown value + */ + UNKNOWN(-1), + + /** + * + */ + ZCD_NV_EXTADDR(0x0000), + + /** + * + */ + ZCD_NV_BOOTCOUNTER(0x0001), + + /** + * This parameter controls the device startup options. Size: 1 byte; Default value: 0 + */ + ZCD_NV_STARTUP_OPTION(0x0003), + + /** + * + */ + ZCD_NV_START_DELAY(0x0004), + + /** + * This item holds all kinds of network information. + */ + ZCD_NV_NIB(0x0021), + + /** + * If this parameter is set to a non-zero value, a CC2530-ZNP device that is configured as an end- device will wake up periodically + * with this duration to check for data with its parent device. This value is specified in milliseconds and can range from 1 to 65000. + * If this parameter is set to zero, the device will not automatically wake up to poll for data. Instead, an external trigger or an + * internal event (for example, via a software timer event) can be used to wake up the device. Size: 4 bytes; Default value: 2000 + */ + ZCD_NV_POLL_RATE_OLD16(0x0035), + + /** + * When an end-device polls for data with its parent and finds that it does have data, it can poll again with a shorter duration in case + * there is more data queued for it at its parent device. This value is specified in milliseconds. This feature can be turned off by + * setting this value to zero. Size: 2 bytes; Default value: 100 + */ + ZCD_NV_QUEUED_POLL_RATE(0x0025), + + /** + * When an end-device sends a data packet, it can poll again with a shorter duration, specified by this parameter, if the + * application is expecting to receive an application level packet in response. This value is specified in milliseconds. This + * feature can be turned off by setting the value to zero. + *

+ * Note: The setting of the queued and response poll rates has to be done with caution if the device is sending and receiving + * at the same time or if the device is sending data too fast. If the device is sending data too fast, setting a queued poll rate with a + * higher duration than the sending rate will cause the poll event to be continuously rescheduled to the future. Then the device + * will never poll for data with its parent and consequently it may miss any packets destined for it. Size: 2 bytes; Default value: + * 100 + */ + ZCD_NV_RESPONSE_POLL_RATE(0x0026), + + /** + * + */ + ZCD_NV_REJOIN_POLL_RATE(0x0027), + + /** + * + */ + ZCD_NV_DATA_RETRIES(0x0028), + + /** + * The number of times an end-device will fail when communicating with its parent before invoking the rejoin mechanism to find and + * join a new parent. Size: 1 byte; Default value: 2. + */ + ZCD_NV_POLL_FAILURE_RETRIES(0x0029), + + /** + * + */ + ZCD_NV_STACK_PROFILE(0x002A), + + /** + * The amount of time (in seconds) that a router or coordinator device will buffer messages destined to their end-device child + * nodes. It is recommended that this is at least greater than the poll rate (ZCD_NV_POLL_RATE) to ensure that end-device will have + * a chance to wakeup and poll for the data. Size: 1 byte; Default value: 7 + */ + ZCD_NV_INDIRECT_MSG_TIMEOUT(0x002B), + + /** + * The amount of time (in seconds) for which a route must be idle (i.e. no packets are transmitted on that route) before that routing + * entry is marked as expired. An expired entry may be deleted if the table is full and the space is needed for another new routing + * entry. This can be set to a special value of 0 to turn off route expiry. In this case, route entries are not expired. Size: 1 byte; + * Default value: 60. + */ + ZCD_NV_ROUTE_EXPIRY_TIME(0x002C), + + /** + * This parameter configures the EXTENDED PAN ID in Z-Stack. The extended pan id is used to further segregate the sub network(s) + * among a bigger PAN network. + */ + ZCD_NV_EXTPANID(0x002D), + + /** + * The maximum number of retransmissions that a device will attempt when trying to transmit a broadcast packet. The typical range + * is from 1 through 3. Size: 1 byte; Default value: 2. + */ + ZCD_NV_BCAST_RETRIES(0x002E), + + /** + * The amount of time (in units of 100milliseconds) a device will wait before retransmitting a broadcast packet. The + * retransmission will not happen if the node hears that each of its neighbor nodes have all transmitted that packet. Size: 1 byte; + * Default value: 5 + */ + ZCD_NV_PASSIVE_ACK_TIMEOUT(0x002F), + + /** + * The maximum amount of time (in units of 100ms) that it can take for a broadcast packet to propagate through the entire network. + * This includes time for all retransmissions. + *

+ * Note: This parameter must be set with caution. It must be set to a value of at least (ZCD_NV_BCAST_RETRIES + 1) * + * ZCD_NV_PASSIVE_ACK_TIMEOUT To be safe, the actual value should be higher than the above minimum by about 500ms or more. Size: 1 + * byte; Default value: 30. + */ + ZCD_NV_BCAST_DELIVERY_TIME(0x0030), + + /** + * Holds the value of the network operational mode. The default value is NWK_MODE_MESH and must not be modified. + */ + ZCD_NV_NWK_MODE(0x0031), + + /** + * + */ + ZCD_NV_CONCENTRATOR_ENABLE(0x0032), + + /** + * + */ + ZCD_NV_CONCENTRATOR_DISCOVERY(0x0033), + + /** + * + */ + ZCD_NV_CONCENTRATOR_RADIUS(0x0034), + + /** + * If this parameter is set to a non-zero value, a CC2530-ZNP device that is configured as an end- device will wake up periodically + * with this duration to check for data with its parent device. This value is specified in milliseconds and can range from 1 to 65000. + * If this parameter is set to zero, the device will not automatically wake up to poll for data. Instead, an external trigger or an + * internal event (for example, via a software timer event) can be used to wake up the device. Size: 4 bytes; Default value: 2000 + */ + ZCD_NV_POLL_RATE(0x0035), + + /** + * Holds the value of route cache flag. This enables or disables the route cache for coordinator and is FALSE by default. + */ + ZCD_NV_CONCENTRATOR_RC(0x0036), + + /** + * + */ + ZCD_NV_NWK_MGR_MODE(0x0037), + + /** + * + */ + ZCD_NV_SRC_RTG_EXPIRY_TIME(0x0038), + + /** + * + */ + ZCD_NV_ROUTE_DISCOVERY_TIME(0x0039), + + /** + * + */ + ZCD_NV_NWK_ACTIVE_KEY_INFO(0x003A), + + /** + * + */ + ZCD_NV_NWK_ALTERN_KEY_INFO(0x003B), + + /** + * + */ + ZCD_NV_ROUTER_OFF_ASSOC_CLEANUP(0x003C), + + /** + * + */ + ZCD_NV_NWK_LEAVE_REQ_ALLOWED(0x003D), + + /** + * Holds the value of Child Aging capability flag. This enables or disables child aging and must be set to TRUE for Zigbee 3.0 + * compliance. + */ + ZCD_NV_NWK_CHILD_AGE_ENABLE(0x003E), + + /** + * + */ + ZCD_NV_DEVICE_LIST_KA_TIMEOUT(0x003F), + + /** + * + */ + ZCD_NV_BINDING_TABLE(0x0041), + + /** + * + */ + ZCD_NV_GROUP_TABLE(0x0042), + + /** + * The number of retransmissions performed on a data packet at the application layer if the packet was transmitted with the + * end-to-end acknowledgement option enabled. Size: 1 byte; Default value: 3 + */ + ZCD_NV_APS_FRAME_RETRIES(0x0043), + + /** + * The amount of time (in milliseconds) a device will wait before re-transmitting a packet that used the APS acknowledgement + * option. If the APS acknowledgement is not received by this time, the sending device will assume a failure and attempt a + * re-transmission. + *

+ * Note: This is recommended to be set to approximately the expected round trip time for the packet. Note that if the + * destination (or source) device is an end-device, the round trip time for the packet will include an additional delay up to the + * poll duration. This is in addition to the delay normally caused by the network. Size: 2 bytes; Default value: 3000 + */ + ZCD_NV_APS_ACK_WAIT_DURATION(0x0044), + + /** + * + */ + ZCD_NV_APS_ACK_WAIT_MULTIPLIER(0x0045), + + /** + * The amount of time (in milliseconds) a device will wait for a response to a binding request. Size: 2 bytes; Default value: 8000 + */ + ZCD_NV_BINDING_TIME(0x0046), + + /** + * + */ + ZCD_NV_APS_USE_EXT_PANID(0x0047), + + /** + * + */ + ZCD_NV_COMMISSIONED_NWK_ADDR(0x0049), + + /** + * + */ + ZCD_NV_APS_NONMEMBER_RADIUS(0x004B), + + /** + * Holds the security manager entries of type ZDSecMgrEntry_t to store the TCKL used to talk with devices in the network that + * require APS security. The number of entries is controled by ZDSECMGR_DEVICE_MAX=3 by default. + */ + ZCD_NV_APS_LINK_KEY_TABLE(0x004C), + + /** + * + */ + ZCD_NV_APS_DUPREJ_TIMEOUT_INC(0x004D), + + /** + * + */ + ZCD_NV_APS_DUPREJ_TIMEOUT_COUNT(0x004E), + + /** + * + */ + ZCD_NV_APS_DUPREJ_TABLE_SIZE(0x004F), + + /** + * + */ + ZCD_NV_DIAGNOSTIC_STATS(0x0050), + + /** + * + */ + ZCD_NV_NWK_PARENT_INFO(0x0051), + + /** + * + */ + ZCD_NV_NWK_ENDDEV_TIMEOUT_DEF(0x0052), + + /** + * Holds the value of Child Aging Timeout. This is the time in seconds used by END DEVICE when sending End Device Timeout Request that + * tells a COORDINATOR the timeout to remove this END DEVICE after no data poll is received. + */ + ZCD_NV_END_DEV_TIMEOUT_VALUE(0x0053), + + /** + * Holds the value of End Device Configuration field when END DEVICE when sending End Device Timeout Request. Is set to 0x00 by + * default which is the only valid value accourding to Zigbee Core spec R21. + */ + ZCD_NV_END_DEV_CONFIGURATION(0x0054), + + /** + * + */ + ZCD_NV_BDBNODEISONANETWORK(0x0055), + + /** + * + */ + ZCD_NV_BDBREPORTINGCONFIG(0x0056), + + /** + * holds the value of network key that is generated by default. The key can be set to a fixed value by setting DEFAULT_KEY macro. This + * is used for securing and un-securing packets in the network, if security is enabled for the network. + *

+ * Note: Use of this configuration item requires the ZNP code to be built with the SECURE=1 compile option. Size: 16 bytes; + * Default value: [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F] + */ + ZCD_NV_PRECFGKEY(0x0062), + + /** + * If security functionality is enabled, there are two options to distribute the security key to all devices in the network. If this + * parameter is true, the same security key is assumed to be pre-configured in all devices in the network.If it is set to false, then + * the key only needs to be configured on the coordinator device. In this case, the key is distributed to each device upon joining by + * the coordinator. This key distribution will happen in the “clear” on the last hop of the packet transmission and this + * constitutes a brief “period of vulnerability” during which a malicious device can capture the key. Hence it is not recommended + * unless it can be ensured that there are no malicious devices in the vicinity at the time of network formation. + *

+ * Note: Use of this configuration item requires the ZNP code to be built with the SECURE=1 compile option. Size: 1 byte; + * Default value: TRUE + */ + ZCD_NV_PRECFGKEYS_ENABLE(0x0063), + + /** + * This parameter determines if security is used or not in this network. It can be set to 0 (to turn off NWK security) or 1 (to turn on NWK + * security). Size: 1 byte; Default value: 0. + */ + ZCD_NV_SECURITY_MODE(0x0064), + + /** + * This value tells if only secure joins are allowed. Set to TRUE by default which is the only valid value according to Zigbee Core + * spec R21. + */ + ZCD_NV_SECURE_PERMIT_JOIN(0x0065), + + /** + * Is equal to ZG_GLOBAL_LINK_KEY=1 and must not be modified according to Zigbee Core spec R21. + */ + ZCD_NV_APS_LINK_KEY_TYPE(0x0066), + + /** + * + */ + ZCD_NV_APS_ALLOW_R19_SECURITY(0x0067), + + /** + * Default distributed nwk key Id. Nv ID not in use + */ + ZCD_NV_DISTRIBUTED_KEY(0x0068), + + /** + * + */ + ZCD_NV_IMPLICIT_CERTIFICATE(0x0069), + + /** + * + */ + ZCD_NV_DEVICE_PRIVATE_KEY(0x006A), + + /** + * + */ + ZCD_NV_CA_PUBLIC_KEY(0x006B), + + /** + * + */ + ZCD_NV_KE_MAX_DEVICES(0x006C), + + /** + * Controls whether a single pre-configured trust center link key is used or whether multiple pre- configured trust center link + * keys are used, hereby referred to as Single Key Mode and Multiple Key Mode, respectively. In multiple key mode, unique + * pre-configured trust center link keys are used between the trust center and each individual device joining the network. + * Multiple key mode is required by the recommended secure procedure in ZigBeeSE profile Specification. In single key mode, all + * devices are using the same pre-configured trust center link key to join the network. The single key mode provides a simplified + * alternative procedure to set up the network. It can be used for testing and debugging purpose. Size: 1 byte; Default value: TRUE + */ + ZCD_NV_USE_DEFAULT_TCLK(0x006D), + + /** + * + */ + ZCD_NV_RNG_COUNTER(0x006F), + + /** + * + */ + ZCD_NV_RANDOM_SEED(0x0070), + + /** + * + */ + ZCD_NV_TRUSTCENTER_ADDR(0x0071), + + /** + * + */ + ZCD_NV_CERT_283(0x0072), + + /** + * + */ + ZCD_NV_PRIVATE_KEY_283(0x0073), + + /** + * + */ + ZCD_NV_PUBLIC_KEY_283(0x0074), + + /** + * + */ + ZCD_NV_NWK_SEC_MATERIAL_TABLE_START(0x0075), + + /** + * + */ + ZCD_NV_NWK_SEC_MATERIAL_TABLE_END(0x0080), + + /** + * An optional user-defined data (up to 16bytes) that can be configured in a CC2530-ZNP device so that it can easily identified or + * described later. The first byte is the length of the user descriptor data and must not be greater than 16. Size: 17 bytes; Default + * value: “CC2530-ZNP x......” (dots represent the device IEEE address) + */ + ZCD_NV_USERDESC(0x0081), + + /** + * This holds the value of nwkActiveKeyItems structure and restores the NWK key counter after power cycles. + */ + ZCD_NV_NWKKEY(0x0082), + + /** + * This parameter identifies the ZigBee network. This should be set to a value between 0 and 0x3FFF. Networks that exist in the same + * vicinity must have different values for this parameter. It can be set to a special value of 0xFFFF to indicate “don’t care”. Size: + * 2 bytes; Default value: 0xFFFF + */ + ZCD_NV_PANID(0x0083), + + /** + * This parameter is a bit mask of the channels on which this network can operate (note that multiple channels can be selected). See + * section 4.5.16 for a table of the bitmap representation that maps to each channel. Multiple networks that exist in the same + * vicinity are encouraged to have different values. If multiple channels are selected, the coordinator will pick one of the + * channels for network operation. First, an energy scan is performed on each channel and those channels with a high energy level + * are discarded. Then, the coordinator determines the number of existing ZigBee networks on each of the remaining channels and + * picks the one with the fewest networks. For routers and end-devices, the device will simply scan all the selected channels until + * it finds the ZigBee network. Size: 4 bytes; Default value: 0x00000800 + */ + ZCD_NV_CHANLIST(0x0084), + + /** + * + */ + ZCD_NV_SCAN_DURATION(0x0086), + + /** + * This is the logical type of the device in the ZigBee network. This can be set to a COORDINATOR (0x00), ROUTER (0x01) or ENDDEVICE + * (0x02). + *

+ * Note: This parameter is read by the CC2530-ZNP device immediately when it powers up after a reset. Size: 1 byte; Default + * value: 0x00 + */ + ZCD_NV_LOGICAL_TYPE(0x0087), + + /** + * + */ + ZCD_NV_NWKMGR_MIN_TX(0x0088), + + /** + * + */ + ZCD_NV_NWKMGR_ADDR(0x0089), + + /** + * This configures the manner in which ZDO responses (hereby referred to as callbacks) are issued to the host processor. By + * default, this item is set to FALSE, which means that the host processor must use the ZDO_MSG_CB_REGISTER command to subscribe to + * a specific ZDO callback in order to receive it. The ZDO callback is then conveyed as part of the ZDO_MSG_CB_INCOMING command. If + * ZCD_NV_ZDO_DIRECT_CB is set TRUE, then the host processor will receive the “verbose” response. For example, the host + * processor would receive the ZDO_IEEE_ADDR_RSP command in response to ZDO_IEEE_ADDR_REQ. Size: 1 byte; Default value: FALSE + */ + ZCD_NV_ZDO_DIRECT_CB(0x008F), + + /** + * + */ + ZCD_NV_SAS_SHORT_ADDR(0x00B1), + + /** + * + */ + ZCD_NV_SAS_EXT_PANID(0x00B2), + + /** + * + */ + ZCD_NV_SAS_PANID(0x00B3), + + /** + * + */ + ZCD_NV_SAS_CHANNEL_MASK(0x00B4), + + /** + * + */ + ZCD_NV_SAS_PROTOCOL_VER(0x00B5), + + /** + * + */ + ZCD_NV_SAS_STACK_PROFILE(0x00B6), + + /** + * + */ + ZCD_NV_SAS_STARTUP_CTRL(0x00B7), + + /** + * + */ + ZCD_NV_SAS_TC_ADDR(0x00C1), + + /** + * + */ + ZCD_NV_SAS_TC_MASTER_KEY(0x00C2), + + /** + * + */ + ZCD_NV_SAS_NWK_KEY(0x00C3), + + /** + * + */ + ZCD_NV_SAS_USE_INSEC_JOIN(0x00C4), + + /** + * + */ + ZCD_NV_SAS_PRECFG_LINK_KEY(0x00C5), + + /** + * + */ + ZCD_NV_SAS_NWK_KEY_SEQ_NUM(0x00C6), + + /** + * + */ + ZCD_NV_SAS_NWK_KEY_TYPE(0x00C7), + + /** + * + */ + ZCD_NV_SAS_NWK_MGR_ADDR(0x00C8), + + /** + * + */ + ZCD_NV_SAS_CURR_TC_MASTER_KEY(0x00D1), + + /** + * + */ + ZCD_NV_SAS_CURR_NWK_KEY(0x00D2), + + /** + * + */ + ZCD_NV_TCLK_TABLE_START(0x0101), + + /** + * + */ + ZCD_NV_TCLK_TABLE_END(0x01FF), + + /** + * + */ + ZCD_NV_APS_LINK_KEY_DATA_START(0x0201), + + /** + * + */ + ZCD_NV_APS_LINK_KEY_DATA_END(0x02FF); + + /** + * A mapping between the integer code and its corresponding type to + * facilitate lookup by code. + */ + private static Map codeMapping; + + private int key; + + static { + codeMapping = new HashMap(); + for (ZstackConfigId s : values()) { + codeMapping.put(s.key, s); + } + } + + private ZstackConfigId(int key) { + this.key = key; + } + + /** + * Lookup function based on the type code. Returns null if the code does not exist. + * + * @param code the code to lookup + * @return enumeration value of the alarm type. + */ + public static ZstackConfigId valueOf(int code) { + if (codeMapping.get(code) == null) { + return UNKNOWN; + } + + return codeMapping.get(code); + } + + /** + * Returns the Z-Stack protocol defined value for this enumeration. + * + * @return the Z-Stack protocol key + */ + public int getKey() { + return key; + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackDiagnosticAttribute.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackDiagnosticAttribute.java index 201ceed1b..b83c8b347 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackDiagnosticAttribute.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackDiagnosticAttribute.java @@ -1,144 +1,144 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sys; - -import java.util.HashMap; -import java.util.Map; - -/** - * Class to implement the Z-Stack Enumeration ZstackDiagnosticAttribute. - *

- * Diagnostics attribute IDs. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public enum ZstackDiagnosticAttribute { - /** - * Default unknown value - */ - UNKNOWN(-1), - - /** - * System Clock when stats were saved/cleared - */ - ZDIAGS_SYSTEM_CLOCK(0x0000), - - /** - * Increments every time the system resets - */ - ZDIAGS_NUMBER_OF_RESETS(0x0001), - - /** - * MAC diagnostic CRC success counter - */ - ZDIAGS_MAC_RX_CRC_PASS(0x0064), - - /** - * MAC diagnostic CRC failure counter - */ - ZDIAGS_MAC_RX_CRC_FAIL(0x0065), - - /** - * MAC layer retries a unicast - */ - ZDIAGS_MAC_TX_UCAST_RETRY(0x006A), - - /** - * Mac layer fails to send a unicast - */ - ZDIAGS_MAC_TX_UCAST_FAIL(0x006B), - - /** - * NWK packet decryption failed - */ - ZDIAGS_NWK_DECRYPT_FAILURES(0x00CF), - - /** - * NWK packet drop because of validation error - */ - ZDIAGS_PACKET_VALIDATE_DROP_COUNT(0x00D3), - - /** - * APS layer transmits broadcast - */ - ZDIAGS_APS_TX_BCAST(0x012D), - - /** - * APS layer successfully transmits a unicast - */ - ZDIAGS_APS_TX_UCAST_SUCCESS(0x012F), - - /** - * APS layer retries the sending of a unicast - */ - ZDIAGS_APS_TX_UCAST_RETRY(0x0130), - - /** - * APS layer fails to send a unicast - */ - ZDIAGS_APS_TX_UCAST_FAIL(0x0131), - - /** - * APS packet decryption failed - */ - ZDIAGS_APS_DECRYPT_FAILURES(0x0134), - - /** - * APS invalid packet dropped - */ - ZDIAGS_APS_INVALID_PACKETS(0x0135), - - /** - * Number of MAC retries per APS message - */ - ZDIAGS_MAC_RETRIES_PER_APS_TX_SUCCESS(0x0136); - - /** - * A mapping between the integer code and its corresponding type to - * facilitate lookup by code. - */ - private static Map codeMapping; - - private int key; - - static { - codeMapping = new HashMap(); - for (ZstackDiagnosticAttribute s : values()) { - codeMapping.put(s.key, s); - } - } - - private ZstackDiagnosticAttribute(int key) { - this.key = key; - } - - /** - * Lookup function based on the type code. Returns null if the code does not exist. - * - * @param code the code to lookup - * @return enumeration value of the alarm type. - */ - public static ZstackDiagnosticAttribute valueOf(int code) { - if (codeMapping.get(code) == null) { - return UNKNOWN; - } - - return codeMapping.get(code); - } - - /** - * Returns the Z-Stack protocol defined value for this enumeration. - * - * @return the Z-Stack protocol key - */ - public int getKey() { - return key; - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sys; + +import java.util.HashMap; +import java.util.Map; + +/** + * Class to implement the Z-Stack Enumeration ZstackDiagnosticAttribute. + *

+ * Diagnostics attribute IDs. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + * + * @author Chris Jackson + */ +public enum ZstackDiagnosticAttribute { + /** + * Default unknown value + */ + UNKNOWN(-1), + + /** + * System Clock when stats were saved/cleared + */ + ZDIAGS_SYSTEM_CLOCK(0x0000), + + /** + * Increments every time the system resets + */ + ZDIAGS_NUMBER_OF_RESETS(0x0001), + + /** + * MAC diagnostic CRC success counter + */ + ZDIAGS_MAC_RX_CRC_PASS(0x0064), + + /** + * MAC diagnostic CRC failure counter + */ + ZDIAGS_MAC_RX_CRC_FAIL(0x0065), + + /** + * MAC layer retries a unicast + */ + ZDIAGS_MAC_TX_UCAST_RETRY(0x006A), + + /** + * Mac layer fails to send a unicast + */ + ZDIAGS_MAC_TX_UCAST_FAIL(0x006B), + + /** + * NWK packet decryption failed + */ + ZDIAGS_NWK_DECRYPT_FAILURES(0x00CF), + + /** + * NWK packet drop because of validation error + */ + ZDIAGS_PACKET_VALIDATE_DROP_COUNT(0x00D3), + + /** + * APS layer transmits broadcast + */ + ZDIAGS_APS_TX_BCAST(0x012D), + + /** + * APS layer successfully transmits a unicast + */ + ZDIAGS_APS_TX_UCAST_SUCCESS(0x012F), + + /** + * APS layer retries the sending of a unicast + */ + ZDIAGS_APS_TX_UCAST_RETRY(0x0130), + + /** + * APS layer fails to send a unicast + */ + ZDIAGS_APS_TX_UCAST_FAIL(0x0131), + + /** + * APS packet decryption failed + */ + ZDIAGS_APS_DECRYPT_FAILURES(0x0134), + + /** + * APS invalid packet dropped + */ + ZDIAGS_APS_INVALID_PACKETS(0x0135), + + /** + * Number of MAC retries per APS message + */ + ZDIAGS_MAC_RETRIES_PER_APS_TX_SUCCESS(0x0136); + + /** + * A mapping between the integer code and its corresponding type to + * facilitate lookup by code. + */ + private static Map codeMapping; + + private int key; + + static { + codeMapping = new HashMap(); + for (ZstackDiagnosticAttribute s : values()) { + codeMapping.put(s.key, s); + } + } + + private ZstackDiagnosticAttribute(int key) { + this.key = key; + } + + /** + * Lookup function based on the type code. Returns null if the code does not exist. + * + * @param code the code to lookup + * @return enumeration value of the alarm type. + */ + public static ZstackDiagnosticAttribute valueOf(int code) { + if (codeMapping.get(code) == null) { + return UNKNOWN; + } + + return codeMapping.get(code); + } + + /** + * Returns the Z-Stack protocol defined value for this enumeration. + * + * @return the Z-Stack protocol key + */ + public int getKey() { + return key; + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackNwkKeyDesc.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackNwkKeyDesc.java index 9e1fe4072..58e0ec6d6 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackNwkKeyDesc.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackNwkKeyDesc.java @@ -1,100 +1,100 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sys; - -import com.zsmartsystems.zigbee.dongle.zstack.internal.serializer.ZstackDeserializer; -import com.zsmartsystems.zigbee.dongle.zstack.internal.serializer.ZstackSerializer; -import com.zsmartsystems.zigbee.security.ZigBeeKey; - -/** - * Class to implement the Z-Stack structure ZstackNwkKeyDesc. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackNwkKeyDesc { - - /** - */ - private int keySeqNum; - - /** - */ - private ZigBeeKey key; - - /** - * - * - * @return the current keySeqNum as {@link int} - */ - public int getKeySeqNum() { - return keySeqNum; - } - - /** - * - * - * @param keySeqNum the keySeqNum to set as {@link int} - */ - public void setKeySeqNum(int keySeqNum) { - this.keySeqNum = keySeqNum; - } - - /** - * - * - * @return the current key as {@link ZigBeeKey} - */ - public ZigBeeKey getKey() { - return key; - } - - /** - * - * - * @param key the key to set as {@link ZigBeeKey} - */ - public void setKey(ZigBeeKey key) { - this.key = key; - } - - /** - * Serialize the data from this structure class to an integer array - * - * @param serializer the {@link ZstackSerializer} to use - */ - public int[] serialize(ZstackSerializer serializer) { - // Serialize the fields - serializer.serializeUInt8(keySeqNum); - serializer.serializeZigBeeKey(key); - return serializer.getBuffer(); - } - - /** - * Deserialize the data into this structure class - * - * @param deserializer the {@link ZstackDeserializer} to use - */ - public void deserialize (ZstackDeserializer deserializer) { - // Deserialize the fields - keySeqNum = deserializer.deserializeUInt8(); - key = deserializer.deserializeZigBeeKey(); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(69); - builder.append("ZstackNwkKeyDesc [keySeqNum="); - builder.append(keySeqNum); - builder.append(", key="); - builder.append(key); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sys; + +import com.zsmartsystems.zigbee.dongle.zstack.internal.serializer.ZstackDeserializer; +import com.zsmartsystems.zigbee.dongle.zstack.internal.serializer.ZstackSerializer; +import com.zsmartsystems.zigbee.security.ZigBeeKey; + +/** + * Class to implement the Z-Stack structure ZstackNwkKeyDesc. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + * + * @author Chris Jackson + */ +public class ZstackNwkKeyDesc { + + /** + */ + private int keySeqNum; + + /** + */ + private ZigBeeKey key; + + /** + * + * + * @return the current keySeqNum as {@link int} + */ + public int getKeySeqNum() { + return keySeqNum; + } + + /** + * + * + * @param keySeqNum the keySeqNum to set as {@link int} + */ + public void setKeySeqNum(int keySeqNum) { + this.keySeqNum = keySeqNum; + } + + /** + * + * + * @return the current key as {@link ZigBeeKey} + */ + public ZigBeeKey getKey() { + return key; + } + + /** + * + * + * @param key the key to set as {@link ZigBeeKey} + */ + public void setKey(ZigBeeKey key) { + this.key = key; + } + + /** + * Serialize the data from this structure class to an integer array + * + * @param serializer the {@link ZstackSerializer} to use + */ + public int[] serialize(ZstackSerializer serializer) { + // Serialize the fields + serializer.serializeUInt8(keySeqNum); + serializer.serializeZigBeeKey(key); + return serializer.getBuffer(); + } + + /** + * Deserialize the data into this structure class + * + * @param deserializer the {@link ZstackDeserializer} to use + */ + public void deserialize (ZstackDeserializer deserializer) { + // Deserialize the fields + keySeqNum = deserializer.deserializeUInt8(); + key = deserializer.deserializeZigBeeKey(); + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(69); + builder.append("ZstackNwkKeyDesc [keySeqNum="); + builder.append(keySeqNum); + builder.append(", key="); + builder.append(key); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackResetReason.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackResetReason.java index b3947de67..0e421b35d 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackResetReason.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackResetReason.java @@ -1,84 +1,84 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sys; - -import java.util.HashMap; -import java.util.Map; - -/** - * Class to implement the Z-Stack Enumeration ZstackResetReason. - *

- * Reasons for reset - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public enum ZstackResetReason { - /** - * Default unknown value - */ - UNKNOWN(-1), - - /** - * - */ - POWER_UP(0x0000), - - /** - * - */ - EXTERNAL(0x0001), - - /** - * - */ - WATCH_DOG(0x0002); - - /** - * A mapping between the integer code and its corresponding type to - * facilitate lookup by code. - */ - private static Map codeMapping; - - private int key; - - static { - codeMapping = new HashMap(); - for (ZstackResetReason s : values()) { - codeMapping.put(s.key, s); - } - } - - private ZstackResetReason(int key) { - this.key = key; - } - - /** - * Lookup function based on the type code. Returns null if the code does not exist. - * - * @param code the code to lookup - * @return enumeration value of the alarm type. - */ - public static ZstackResetReason valueOf(int code) { - if (codeMapping.get(code) == null) { - return UNKNOWN; - } - - return codeMapping.get(code); - } - - /** - * Returns the Z-Stack protocol defined value for this enumeration. - * - * @return the Z-Stack protocol key - */ - public int getKey() { - return key; - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sys; + +import java.util.HashMap; +import java.util.Map; + +/** + * Class to implement the Z-Stack Enumeration ZstackResetReason. + *

+ * Reasons for reset + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + * + * @author Chris Jackson + */ +public enum ZstackResetReason { + /** + * Default unknown value + */ + UNKNOWN(-1), + + /** + * + */ + POWER_UP(0x0000), + + /** + * + */ + EXTERNAL(0x0001), + + /** + * + */ + WATCH_DOG(0x0002); + + /** + * A mapping between the integer code and its corresponding type to + * facilitate lookup by code. + */ + private static Map codeMapping; + + private int key; + + static { + codeMapping = new HashMap(); + for (ZstackResetReason s : values()) { + codeMapping.put(s.key, s); + } + } + + private ZstackResetReason(int key) { + this.key = key; + } + + /** + * Lookup function based on the type code. Returns null if the code does not exist. + * + * @param code the code to lookup + * @return enumeration value of the alarm type. + */ + public static ZstackResetReason valueOf(int code) { + if (codeMapping.get(code) == null) { + return UNKNOWN; + } + + return codeMapping.get(code); + } + + /** + * Returns the Z-Stack protocol defined value for this enumeration. + * + * @return the Z-Stack protocol key + */ + public int getKey() { + return key; + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackResetType.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackResetType.java index 87abe5e4d..0c4c19d36 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackResetType.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackResetType.java @@ -1,79 +1,79 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sys; - -import java.util.HashMap; -import java.util.Map; - -/** - * Class to implement the Z-Stack Enumeration ZstackResetType. - *

- * Reset Command Type - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public enum ZstackResetType { - /** - * Default unknown value - */ - UNKNOWN(-1), - - /** - * - */ - TARGET_DEVICE(0x0000), - - /** - * - */ - SERIAL_BOOTLOADER(0x0001); - - /** - * A mapping between the integer code and its corresponding type to - * facilitate lookup by code. - */ - private static Map codeMapping; - - private int key; - - static { - codeMapping = new HashMap(); - for (ZstackResetType s : values()) { - codeMapping.put(s.key, s); - } - } - - private ZstackResetType(int key) { - this.key = key; - } - - /** - * Lookup function based on the type code. Returns null if the code does not exist. - * - * @param code the code to lookup - * @return enumeration value of the alarm type. - */ - public static ZstackResetType valueOf(int code) { - if (codeMapping.get(code) == null) { - return UNKNOWN; - } - - return codeMapping.get(code); - } - - /** - * Returns the Z-Stack protocol defined value for this enumeration. - * - * @return the Z-Stack protocol key - */ - public int getKey() { - return key; - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sys; + +import java.util.HashMap; +import java.util.Map; + +/** + * Class to implement the Z-Stack Enumeration ZstackResetType. + *

+ * Reset Command Type + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + * + * @author Chris Jackson + */ +public enum ZstackResetType { + /** + * Default unknown value + */ + UNKNOWN(-1), + + /** + * + */ + TARGET_DEVICE(0x0000), + + /** + * + */ + SERIAL_BOOTLOADER(0x0001); + + /** + * A mapping between the integer code and its corresponding type to + * facilitate lookup by code. + */ + private static Map codeMapping; + + private int key; + + static { + codeMapping = new HashMap(); + for (ZstackResetType s : values()) { + codeMapping.put(s.key, s); + } + } + + private ZstackResetType(int key) { + this.key = key; + } + + /** + * Lookup function based on the type code. Returns null if the code does not exist. + * + * @param code the code to lookup + * @return enumeration value of the alarm type. + */ + public static ZstackResetType valueOf(int code) { + if (codeMapping.get(code) == null) { + return UNKNOWN; + } + + return codeMapping.get(code); + } + + /** + * Returns the Z-Stack protocol defined value for this enumeration. + * + * @return the Z-Stack protocol key + */ + public int getKey() { + return key; + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSecMgrEntry.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSecMgrEntry.java index ba9399137..740f563a3 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSecMgrEntry.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSecMgrEntry.java @@ -1,128 +1,128 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sys; - -import com.zsmartsystems.zigbee.dongle.zstack.api.appcnf.ZstackAuthenticationOption; -import com.zsmartsystems.zigbee.dongle.zstack.internal.serializer.ZstackDeserializer; -import com.zsmartsystems.zigbee.dongle.zstack.internal.serializer.ZstackSerializer; - -/** - * Class to implement the Z-Stack structure ZstackSecMgrEntry. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackSecMgrEntry { - - /** - * Address manager index that holds the IEEE address of destination device. INVALID_NODE_ADDR = 0xFFFE - */ - private int ami; - - /** - * Index to the Link Key table in NV - */ - private int keyNvId; - - /** - */ - private ZstackAuthenticationOption authenticateOption; - - /** - * Address manager index that holds the IEEE address of destination device. INVALID_NODE_ADDR = 0xFFFE - * - * @return the current ami as {@link int} - */ - public int getAmi() { - return ami; - } - - /** - * Address manager index that holds the IEEE address of destination device. INVALID_NODE_ADDR = 0xFFFE - * - * @param ami the ami to set as {@link int} - */ - public void setAmi(int ami) { - this.ami = ami; - } - - /** - * Index to the Link Key table in NV - * - * @return the current keyNvId as {@link int} - */ - public int getKeyNvId() { - return keyNvId; - } - - /** - * Index to the Link Key table in NV - * - * @param keyNvId the keyNvId to set as {@link int} - */ - public void setKeyNvId(int keyNvId) { - this.keyNvId = keyNvId; - } - - /** - * - * - * @return the current authenticateOption as {@link ZstackAuthenticationOption} - */ - public ZstackAuthenticationOption getAuthenticateOption() { - return authenticateOption; - } - - /** - * - * - * @param authenticateOption the authenticateOption to set as {@link ZstackAuthenticationOption} - */ - public void setAuthenticateOption(ZstackAuthenticationOption authenticateOption) { - this.authenticateOption = authenticateOption; - } - - /** - * Serialize the data from this structure class to an integer array - * - * @param serializer the {@link ZstackSerializer} to use - */ - public int[] serialize(ZstackSerializer serializer) { - // Serialize the fields - serializer.serializeUInt16(ami); - serializer.serializeUInt16(keyNvId); - serializer.serializeUInt8(authenticateOption.getKey()); - return serializer.getBuffer(); - } - - /** - * Deserialize the data into this structure class - * - * @param deserializer the {@link ZstackDeserializer} to use - */ - public void deserialize (ZstackDeserializer deserializer) { - // Deserialize the fields - ami = deserializer.deserializeUInt16(); - keyNvId = deserializer.deserializeUInt16(); - authenticateOption = ZstackAuthenticationOption.valueOf(deserializer.deserializeUInt8()); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(95); - builder.append("ZstackSecMgrEntry [ami="); - builder.append(ami); - builder.append(", keyNvId="); - builder.append(keyNvId); - builder.append(", authenticateOption="); - builder.append(authenticateOption); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sys; + +import com.zsmartsystems.zigbee.dongle.zstack.api.appcnf.ZstackAuthenticationOption; +import com.zsmartsystems.zigbee.dongle.zstack.internal.serializer.ZstackDeserializer; +import com.zsmartsystems.zigbee.dongle.zstack.internal.serializer.ZstackSerializer; + +/** + * Class to implement the Z-Stack structure ZstackSecMgrEntry. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + * + * @author Chris Jackson + */ +public class ZstackSecMgrEntry { + + /** + * Address manager index that holds the IEEE address of destination device. INVALID_NODE_ADDR = 0xFFFE + */ + private int ami; + + /** + * Index to the Link Key table in NV + */ + private int keyNvId; + + /** + */ + private ZstackAuthenticationOption authenticateOption; + + /** + * Address manager index that holds the IEEE address of destination device. INVALID_NODE_ADDR = 0xFFFE + * + * @return the current ami as {@link int} + */ + public int getAmi() { + return ami; + } + + /** + * Address manager index that holds the IEEE address of destination device. INVALID_NODE_ADDR = 0xFFFE + * + * @param ami the ami to set as {@link int} + */ + public void setAmi(int ami) { + this.ami = ami; + } + + /** + * Index to the Link Key table in NV + * + * @return the current keyNvId as {@link int} + */ + public int getKeyNvId() { + return keyNvId; + } + + /** + * Index to the Link Key table in NV + * + * @param keyNvId the keyNvId to set as {@link int} + */ + public void setKeyNvId(int keyNvId) { + this.keyNvId = keyNvId; + } + + /** + * + * + * @return the current authenticateOption as {@link ZstackAuthenticationOption} + */ + public ZstackAuthenticationOption getAuthenticateOption() { + return authenticateOption; + } + + /** + * + * + * @param authenticateOption the authenticateOption to set as {@link ZstackAuthenticationOption} + */ + public void setAuthenticateOption(ZstackAuthenticationOption authenticateOption) { + this.authenticateOption = authenticateOption; + } + + /** + * Serialize the data from this structure class to an integer array + * + * @param serializer the {@link ZstackSerializer} to use + */ + public int[] serialize(ZstackSerializer serializer) { + // Serialize the fields + serializer.serializeUInt16(ami); + serializer.serializeUInt16(keyNvId); + serializer.serializeUInt8(authenticateOption.getKey()); + return serializer.getBuffer(); + } + + /** + * Deserialize the data into this structure class + * + * @param deserializer the {@link ZstackDeserializer} to use + */ + public void deserialize (ZstackDeserializer deserializer) { + // Deserialize the fields + ami = deserializer.deserializeUInt16(); + keyNvId = deserializer.deserializeUInt16(); + authenticateOption = ZstackAuthenticationOption.valueOf(deserializer.deserializeUInt8()); + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(95); + builder.append("ZstackSecMgrEntry [ami="); + builder.append(ami); + builder.append(", keyNvId="); + builder.append(keyNvId); + builder.append(", authenticateOption="); + builder.append(authenticateOption); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysGetExtAddrSreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysGetExtAddrSreq.java index fcffd4b90..4f5a525cf 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysGetExtAddrSreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysGetExtAddrSreq.java @@ -1,49 +1,50 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sys; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; - -/** - * Class to implement the Z-Stack command SYS_GET_EXT_ADDR. - *

- * This command is used to set the extended address of the device. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackSysGetExtAddrSreq extends ZstackFrameRequest { - - /** - * Request constructor - */ - public ZstackSysGetExtAddrSreq() { - synchronousCommand = true; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_SYS) && (response.getReqCmd1() == 0x04)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_SYS, 0x04); - - // Serialize the fields - return getPayload(); - } - - @Override - public String toString() { - return "ZstackSysGetExtAddrSreq []"; - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sys; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command SYS_GET_EXT_ADDR. + *

+ * This command is used to set the extended address of the device. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackSysGetExtAddrSreq extends ZstackFrameRequest { + + /** + * Request constructor + */ + public ZstackSysGetExtAddrSreq() { + synchronousCommand = true; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_SYS) && (response.getReqCmd1() == 0x04)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_SYS, 0x04); + + // Serialize the fields + return getPayload(); + } + + @Override + public String toString() { + return "ZstackSysGetExtAddrSreq []"; + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysGetExtAddrSrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysGetExtAddrSrsp.java index 2faec3ff5..a44248895 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysGetExtAddrSrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysGetExtAddrSrsp.java @@ -1,68 +1,69 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sys; - -import com.zsmartsystems.zigbee.IeeeAddress; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; - -/** - * Class to implement the Z-Stack command SYS_GET_EXT_ADDR. - *

- * This command is used to set the extended address of the device. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackSysGetExtAddrSrsp extends ZstackFrameResponse { - - /** - * The device’s extended address. - */ - private IeeeAddress extAddress; - - /** - * Response and Handler constructor - */ - public ZstackSysGetExtAddrSrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - extAddress = deserializer.deserializeIeeeAddress(); - } - - /** - * The device’s extended address. - * - * @return the current extAddress as {@link IeeeAddress} - */ - public IeeeAddress getExtAddress() { - return extAddress; - } - - /** - * The device’s extended address. - * - * @param extAddress the ExtAddress to set as {@link IeeeAddress} - */ - public void setExtAddress(IeeeAddress extAddress) { - this.extAddress = extAddress; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(51); - builder.append("ZstackSysGetExtAddrSrsp [extAddress="); - builder.append(extAddress); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sys; + +import com.zsmartsystems.zigbee.IeeeAddress; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command SYS_GET_EXT_ADDR. + *

+ * This command is used to set the extended address of the device. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackSysGetExtAddrSrsp extends ZstackFrameResponse { + + /** + * The device’s extended address. + */ + private IeeeAddress extAddress; + + /** + * Response and Handler constructor + */ + public ZstackSysGetExtAddrSrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + extAddress = deserializer.deserializeIeeeAddress(); + } + + /** + * The device’s extended address. + * + * @return the current extAddress as {@link IeeeAddress} + */ + public IeeeAddress getExtAddress() { + return extAddress; + } + + /** + * The device’s extended address. + * + * @param extAddress the ExtAddress to set as {@link IeeeAddress} + */ + public void setExtAddress(IeeeAddress extAddress) { + this.extAddress = extAddress; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(51); + builder.append("ZstackSysGetExtAddrSrsp [extAddress="); + builder.append(extAddress); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysNvReadSreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysNvReadSreq.java index 1d2f49602..765500bf4 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysNvReadSreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysNvReadSreq.java @@ -1,181 +1,182 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sys; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; - -/** - * Class to implement the Z-Stack command SYS_NV_READ. - *

- * This command is used to read a single memory item from the target non-volatile memory. The command returns the item requested - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackSysNvReadSreq extends ZstackFrameRequest { - - /** - * The system id (1 for zstack) - */ - private int sysId; - - /** - * The sub id (0 for legacy) - */ - private int itemId; - - /** - * The Id of the NV item. - */ - private int subId; - - /** - * Number of bytes offset from the beginning or the NV value. - */ - private int offset; - - /** - * Number of bytes to read - */ - private int length; - - /** - * Request constructor - */ - public ZstackSysNvReadSreq() { - synchronousCommand = true; - } - - /** - * The system id (1 for zstack) - * - * @return the current sysId as {@link int} - */ - public int getSysId() { - return sysId; - } - - /** - * The system id (1 for zstack) - * - * @param sysId the sysId to set as {@link int} - */ - public void setSysId(int sysId) { - this.sysId = sysId; - } - - /** - * The sub id (0 for legacy) - * - * @return the current itemId as {@link int} - */ - public int getItemId() { - return itemId; - } - - /** - * The sub id (0 for legacy) - * - * @param itemId the itemId to set as {@link int} - */ - public void setItemId(int itemId) { - this.itemId = itemId; - } - - /** - * The Id of the NV item. - * - * @return the current subId as {@link int} - */ - public int getSubId() { - return subId; - } - - /** - * The Id of the NV item. - * - * @param subId the subId to set as {@link int} - */ - public void setSubId(int subId) { - this.subId = subId; - } - - /** - * Number of bytes offset from the beginning or the NV value. - * - * @return the current offset as {@link int} - */ - public int getOffset() { - return offset; - } - - /** - * Number of bytes offset from the beginning or the NV value. - * - * @param offset the offset to set as {@link int} - */ - public void setOffset(int offset) { - this.offset = offset; - } - - /** - * Number of bytes to read - * - * @return the current length as {@link int} - */ - public int getLength() { - return length; - } - - /** - * Number of bytes to read - * - * @param length the length to set as {@link int} - */ - public void setLength(int length) { - this.length = length; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_SYS) && (response.getReqCmd1() == 0x33)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_SYS, 0x33); - - // Serialize the fields - serializer.serializeUInt8(sysId); - serializer.serializeUInt16(itemId); - serializer.serializeUInt16(subId); - serializer.serializeUInt16(offset); - serializer.serializeUInt8(length); - return getPayload(); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(147); - builder.append("ZstackSysNvReadSreq [sysId="); - builder.append(sysId); - builder.append(", itemId="); - builder.append(itemId); - builder.append(", subId="); - builder.append(subId); - builder.append(", offset="); - builder.append(offset); - builder.append(", length="); - builder.append(length); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sys; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command SYS_NV_READ. + *

+ * This command is used to read a single memory item from the target non-volatile memory. The command returns the item requested + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackSysNvReadSreq extends ZstackFrameRequest { + + /** + * The system id (1 for zstack) + */ + private int sysId; + + /** + * The sub id (0 for legacy) + */ + private int itemId; + + /** + * The Id of the NV item. + */ + private int subId; + + /** + * Number of bytes offset from the beginning or the NV value. + */ + private int offset; + + /** + * Number of bytes to read + */ + private int length; + + /** + * Request constructor + */ + public ZstackSysNvReadSreq() { + synchronousCommand = true; + } + + /** + * The system id (1 for zstack) + * + * @return the current sysId as {@link int} + */ + public int getSysId() { + return sysId; + } + + /** + * The system id (1 for zstack) + * + * @param sysId the sysId to set as {@link int} + */ + public void setSysId(int sysId) { + this.sysId = sysId; + } + + /** + * The sub id (0 for legacy) + * + * @return the current itemId as {@link int} + */ + public int getItemId() { + return itemId; + } + + /** + * The sub id (0 for legacy) + * + * @param itemId the itemId to set as {@link int} + */ + public void setItemId(int itemId) { + this.itemId = itemId; + } + + /** + * The Id of the NV item. + * + * @return the current subId as {@link int} + */ + public int getSubId() { + return subId; + } + + /** + * The Id of the NV item. + * + * @param subId the subId to set as {@link int} + */ + public void setSubId(int subId) { + this.subId = subId; + } + + /** + * Number of bytes offset from the beginning or the NV value. + * + * @return the current offset as {@link int} + */ + public int getOffset() { + return offset; + } + + /** + * Number of bytes offset from the beginning or the NV value. + * + * @param offset the offset to set as {@link int} + */ + public void setOffset(int offset) { + this.offset = offset; + } + + /** + * Number of bytes to read + * + * @return the current length as {@link int} + */ + public int getLength() { + return length; + } + + /** + * Number of bytes to read + * + * @param length the length to set as {@link int} + */ + public void setLength(int length) { + this.length = length; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_SYS) && (response.getReqCmd1() == 0x33)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_SYS, 0x33); + + // Serialize the fields + serializer.serializeUInt8(sysId); + serializer.serializeUInt16(itemId); + serializer.serializeUInt16(subId); + serializer.serializeUInt16(offset); + serializer.serializeUInt8(length); + return getPayload(); + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(147); + builder.append("ZstackSysNvReadSreq [sysId="); + builder.append(sysId); + builder.append(", itemId="); + builder.append(itemId); + builder.append(", subId="); + builder.append(subId); + builder.append(", offset="); + builder.append(offset); + builder.append(", length="); + builder.append(length); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysNvReadSrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysNvReadSrsp.java index eb146c302..264d2a551 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysNvReadSrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysNvReadSrsp.java @@ -1,100 +1,101 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sys; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; - -/** - * Class to implement the Z-Stack command SYS_NV_READ. - *

- * This command is used to read a single memory item from the target non-volatile memory. The command returns the item requested - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackSysNvReadSrsp extends ZstackFrameResponse { - - /** - * Status is either Success (0) or Failure (1). - */ - private ZstackResponseCode status; - - /** - * value of the NV item. - */ - private int[] value; - - /** - * Response and Handler constructor - */ - public ZstackSysNvReadSrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); - int length = deserializer.deserializeUInt8(); - value = deserializer.deserializeUInt8Array(length); - } - - /** - * Status is either Success (0) or Failure (1). - * - * @return the current status as {@link ZstackResponseCode} - */ - public ZstackResponseCode getStatus() { - return status; - } - - /** - * Status is either Success (0) or Failure (1). - * - * @param status the status to set as {@link ZstackResponseCode} - */ - public void setStatus(ZstackResponseCode status) { - this.status = status; - } - - /** - * value of the NV item. - * - * @return the current value as {@link int[]} - */ - public int[] getValue() { - return value; - } - - /** - * value of the NV item. - * - * @param value the value to set as {@link int[]} - */ - public void setValue(int[] value) { - this.value = value; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(97); - builder.append("ZstackSysNvReadSrsp [status="); - builder.append(status); - builder.append(", value="); - for (int c = 0; c < value.length; c++) { - if (c > 0) { - builder.append(' '); - } - builder.append(String.format("%02X", value[c])); - } - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sys; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command SYS_NV_READ. + *

+ * This command is used to read a single memory item from the target non-volatile memory. The command returns the item requested + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackSysNvReadSrsp extends ZstackFrameResponse { + + /** + * Status is either Success (0) or Failure (1). + */ + private ZstackResponseCode status; + + /** + * value of the NV item. + */ + private int[] value; + + /** + * Response and Handler constructor + */ + public ZstackSysNvReadSrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); + int length = deserializer.deserializeUInt8(); + value = deserializer.deserializeUInt8Array(length); + } + + /** + * Status is either Success (0) or Failure (1). + * + * @return the current status as {@link ZstackResponseCode} + */ + public ZstackResponseCode getStatus() { + return status; + } + + /** + * Status is either Success (0) or Failure (1). + * + * @param status the status to set as {@link ZstackResponseCode} + */ + public void setStatus(ZstackResponseCode status) { + this.status = status; + } + + /** + * value of the NV item. + * + * @return the current value as {@link int[]} + */ + public int[] getValue() { + return value; + } + + /** + * value of the NV item. + * + * @param value the value to set as {@link int[]} + */ + public void setValue(int[] value) { + this.value = value; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(97); + builder.append("ZstackSysNvReadSrsp [status="); + builder.append(status); + builder.append(", value="); + for (int c = 0; c < value.length; c++) { + if (c > 0) { + builder.append(' '); + } + builder.append(String.format("%02X", value[c])); + } + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysOsalNvReadSreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysOsalNvReadSreq.java index a59842bec..34175f9b6 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysOsalNvReadSreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysOsalNvReadSreq.java @@ -1,104 +1,105 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sys; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; - -/** - * Class to implement the Z-Stack command SYS_OSAL_NV_READ. - *

- * This command is used to read a single memory item from the target non-volatile memory. The command accepts an attribute Id value - * and data offset and returns the memory value present in the target for the specified attribute Id. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackSysOsalNvReadSreq extends ZstackFrameRequest { - - /** - * The Id of the NV item. - */ - private ZstackConfigId id; - - /** - * Number of bytes offset from the beginning or the NV value. - */ - private int offset; - - /** - * Request constructor - */ - public ZstackSysOsalNvReadSreq() { - synchronousCommand = true; - } - - /** - * The Id of the NV item. - * - * @return the current id as {@link ZstackConfigId} - */ - public ZstackConfigId getId() { - return id; - } - - /** - * The Id of the NV item. - * - * @param id the id to set as {@link ZstackConfigId} - */ - public void setId(ZstackConfigId id) { - this.id = id; - } - - /** - * Number of bytes offset from the beginning or the NV value. - * - * @return the current offset as {@link int} - */ - public int getOffset() { - return offset; - } - - /** - * Number of bytes offset from the beginning or the NV value. - * - * @param offset the Offset to set as {@link int} - */ - public void setOffset(int offset) { - this.offset = offset; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_SYS) && (response.getReqCmd1() == 0x08)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_SYS, 0x08); - - // Serialize the fields - serializer.serializeUInt16(id.getKey()); - serializer.serializeUInt8(offset); - return getPayload(); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(76); - builder.append("ZstackSysOsalNvReadSreq [id="); - builder.append(id); - builder.append(", offset="); - builder.append(offset); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sys; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command SYS_OSAL_NV_READ. + *

+ * This command is used to read a single memory item from the target non-volatile memory. The command accepts an attribute Id value + * and data offset and returns the memory value present in the target for the specified attribute Id. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackSysOsalNvReadSreq extends ZstackFrameRequest { + + /** + * The Id of the NV item. + */ + private ZstackConfigId id; + + /** + * Number of bytes offset from the beginning or the NV value. + */ + private int offset; + + /** + * Request constructor + */ + public ZstackSysOsalNvReadSreq() { + synchronousCommand = true; + } + + /** + * The Id of the NV item. + * + * @return the current id as {@link ZstackConfigId} + */ + public ZstackConfigId getId() { + return id; + } + + /** + * The Id of the NV item. + * + * @param id the id to set as {@link ZstackConfigId} + */ + public void setId(ZstackConfigId id) { + this.id = id; + } + + /** + * Number of bytes offset from the beginning or the NV value. + * + * @return the current offset as {@link int} + */ + public int getOffset() { + return offset; + } + + /** + * Number of bytes offset from the beginning or the NV value. + * + * @param offset the Offset to set as {@link int} + */ + public void setOffset(int offset) { + this.offset = offset; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_SYS) && (response.getReqCmd1() == 0x08)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_SYS, 0x08); + + // Serialize the fields + serializer.serializeUInt16(id.getKey()); + serializer.serializeUInt8(offset); + return getPayload(); + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(76); + builder.append("ZstackSysOsalNvReadSreq [id="); + builder.append(id); + builder.append(", offset="); + builder.append(offset); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysOsalNvReadSrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysOsalNvReadSrsp.java index 43af8d1a3..8b65727b5 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysOsalNvReadSrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysOsalNvReadSrsp.java @@ -1,101 +1,102 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sys; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; - -/** - * Class to implement the Z-Stack command SYS_OSAL_NV_READ. - *

- * This command is used to read a single memory item from the target non-volatile memory. The command accepts an attribute Id value - * and data offset and returns the memory value present in the target for the specified attribute Id. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackSysOsalNvReadSrsp extends ZstackFrameResponse { - - /** - * Status is either Success (0) or Failure (1). - */ - private ZstackResponseCode status; - - /** - * Value of the NV item. - */ - private int[] value; - - /** - * Response and Handler constructor - */ - public ZstackSysOsalNvReadSrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); - int len = deserializer.deserializeUInt8(); - value = deserializer.deserializeUInt8Array(len); - } - - /** - * Status is either Success (0) or Failure (1). - * - * @return the current status as {@link ZstackResponseCode} - */ - public ZstackResponseCode getStatus() { - return status; - } - - /** - * Status is either Success (0) or Failure (1). - * - * @param status the status to set as {@link ZstackResponseCode} - */ - public void setStatus(ZstackResponseCode status) { - this.status = status; - } - - /** - * Value of the NV item. - * - * @return the current value as {@link int[]} - */ - public int[] getValue() { - return value; - } - - /** - * Value of the NV item. - * - * @param value the Value to set as {@link int[]} - */ - public void setValue(int[] value) { - this.value = value; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(101); - builder.append("ZstackSysOsalNvReadSrsp [status="); - builder.append(status); - builder.append(", value="); - for (int c = 0; c < value.length; c++) { - if (c > 0) { - builder.append(' '); - } - builder.append(String.format("%02X", value[c])); - } - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sys; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command SYS_OSAL_NV_READ. + *

+ * This command is used to read a single memory item from the target non-volatile memory. The command accepts an attribute Id value + * and data offset and returns the memory value present in the target for the specified attribute Id. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackSysOsalNvReadSrsp extends ZstackFrameResponse { + + /** + * Status is either Success (0) or Failure (1). + */ + private ZstackResponseCode status; + + /** + * Value of the NV item. + */ + private int[] value; + + /** + * Response and Handler constructor + */ + public ZstackSysOsalNvReadSrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); + int len = deserializer.deserializeUInt8(); + value = deserializer.deserializeUInt8Array(len); + } + + /** + * Status is either Success (0) or Failure (1). + * + * @return the current status as {@link ZstackResponseCode} + */ + public ZstackResponseCode getStatus() { + return status; + } + + /** + * Status is either Success (0) or Failure (1). + * + * @param status the status to set as {@link ZstackResponseCode} + */ + public void setStatus(ZstackResponseCode status) { + this.status = status; + } + + /** + * Value of the NV item. + * + * @return the current value as {@link int[]} + */ + public int[] getValue() { + return value; + } + + /** + * Value of the NV item. + * + * @param value the Value to set as {@link int[]} + */ + public void setValue(int[] value) { + this.value = value; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(101); + builder.append("ZstackSysOsalNvReadSrsp [status="); + builder.append(status); + builder.append(", value="); + for (int c = 0; c < value.length; c++) { + if (c > 0) { + builder.append(' '); + } + builder.append(String.format("%02X", value[c])); + } + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysOsalNvWriteSreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysOsalNvWriteSreq.java index 619c16a2e..ff91e7f81 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysOsalNvWriteSreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysOsalNvWriteSreq.java @@ -1,136 +1,137 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sys; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; - -/** - * Class to implement the Z-Stack command SYS_OSAL_NV_WRITE. - *

- * This command is used to write to a particular item in non-volatile memory. The command accepts an attribute Id, data offset, data - * length, and attribute value. The attribute value is written to the location specified for the attribute Id in the target. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackSysOsalNvWriteSreq extends ZstackFrameRequest { - - /** - * The Id of the NV item. - */ - private ZstackConfigId id; - - /** - * Number of bytes offset from the beginning or the NV value. - */ - private int offset; - - /** - * Value of the NV item. - */ - private int[] value; - - /** - * Request constructor - */ - public ZstackSysOsalNvWriteSreq() { - synchronousCommand = true; - } - - /** - * The Id of the NV item. - * - * @return the current id as {@link ZstackConfigId} - */ - public ZstackConfigId getId() { - return id; - } - - /** - * The Id of the NV item. - * - * @param id the Id to set as {@link ZstackConfigId} - */ - public void setId(ZstackConfigId id) { - this.id = id; - } - - /** - * Number of bytes offset from the beginning or the NV value. - * - * @return the current offset as {@link int} - */ - public int getOffset() { - return offset; - } - - /** - * Number of bytes offset from the beginning or the NV value. - * - * @param offset the Offset to set as {@link int} - */ - public void setOffset(int offset) { - this.offset = offset; - } - - /** - * Value of the NV item. - * - * @return the current value as {@link int[]} - */ - public int[] getValue() { - return value; - } - - /** - * Value of the NV item. - * - * @param value the Value to set as {@link int[]} - */ - public void setValue(int[] value) { - this.value = value; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_SYS) && (response.getReqCmd1() == 0x09)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_SYS, 0x09); - - // Serialize the fields - serializer.serializeUInt16(id.getKey()); - serializer.serializeUInt8(offset); - serializer.serializeUInt8(value.length); - serializer.serializeUInt8Array(value); - return getPayload(); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(127); - builder.append("ZstackSysOsalNvWriteSreq [id="); - builder.append(id); - builder.append(", offset="); - builder.append(offset); - builder.append(", value="); - for (int c = 0; c < value.length; c++) { - if (c > 0) { - builder.append(' '); - } - builder.append(String.format("%02X", value[c])); - } - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sys; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command SYS_OSAL_NV_WRITE. + *

+ * This command is used to write to a particular item in non-volatile memory. The command accepts an attribute Id, data offset, data + * length, and attribute value. The attribute value is written to the location specified for the attribute Id in the target. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackSysOsalNvWriteSreq extends ZstackFrameRequest { + + /** + * The Id of the NV item. + */ + private ZstackConfigId id; + + /** + * Number of bytes offset from the beginning or the NV value. + */ + private int offset; + + /** + * Value of the NV item. + */ + private int[] value; + + /** + * Request constructor + */ + public ZstackSysOsalNvWriteSreq() { + synchronousCommand = true; + } + + /** + * The Id of the NV item. + * + * @return the current id as {@link ZstackConfigId} + */ + public ZstackConfigId getId() { + return id; + } + + /** + * The Id of the NV item. + * + * @param id the Id to set as {@link ZstackConfigId} + */ + public void setId(ZstackConfigId id) { + this.id = id; + } + + /** + * Number of bytes offset from the beginning or the NV value. + * + * @return the current offset as {@link int} + */ + public int getOffset() { + return offset; + } + + /** + * Number of bytes offset from the beginning or the NV value. + * + * @param offset the Offset to set as {@link int} + */ + public void setOffset(int offset) { + this.offset = offset; + } + + /** + * Value of the NV item. + * + * @return the current value as {@link int[]} + */ + public int[] getValue() { + return value; + } + + /** + * Value of the NV item. + * + * @param value the Value to set as {@link int[]} + */ + public void setValue(int[] value) { + this.value = value; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_SYS) && (response.getReqCmd1() == 0x09)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_SYS, 0x09); + + // Serialize the fields + serializer.serializeUInt16(id.getKey()); + serializer.serializeUInt8(offset); + serializer.serializeUInt8(value.length); + serializer.serializeUInt8Array(value); + return getPayload(); + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(127); + builder.append("ZstackSysOsalNvWriteSreq [id="); + builder.append(id); + builder.append(", offset="); + builder.append(offset); + builder.append(", value="); + for (int c = 0; c < value.length; c++) { + if (c > 0) { + builder.append(' '); + } + builder.append(String.format("%02X", value[c])); + } + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysOsalNvWriteSrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysOsalNvWriteSrsp.java index 0efcf52a6..4f1fc56a2 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysOsalNvWriteSrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysOsalNvWriteSrsp.java @@ -1,69 +1,70 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sys; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; - -/** - * Class to implement the Z-Stack command SYS_OSAL_NV_WRITE. - *

- * This command is used to write to a particular item in non-volatile memory. The command accepts an attribute Id, data offset, data - * length, and attribute value. The attribute value is written to the location specified for the attribute Id in the target. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackSysOsalNvWriteSrsp extends ZstackFrameResponse { - - /** - * Status is either Success (0) or Failure (1). - */ - private ZstackResponseCode status; - - /** - * Response and Handler constructor - */ - public ZstackSysOsalNvWriteSrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); - } - - /** - * Status is either Success (0) or Failure (1). - * - * @return the current status as {@link ZstackResponseCode} - */ - public ZstackResponseCode getStatus() { - return status; - } - - /** - * Status is either Success (0) or Failure (1). - * - * @param status the status to set as {@link ZstackResponseCode} - */ - public void setStatus(ZstackResponseCode status) { - this.status = status; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(52); - builder.append("ZstackSysOsalNvWriteSrsp [status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sys; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command SYS_OSAL_NV_WRITE. + *

+ * This command is used to write to a particular item in non-volatile memory. The command accepts an attribute Id, data offset, data + * length, and attribute value. The attribute value is written to the location specified for the attribute Id in the target. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackSysOsalNvWriteSrsp extends ZstackFrameResponse { + + /** + * Status is either Success (0) or Failure (1). + */ + private ZstackResponseCode status; + + /** + * Response and Handler constructor + */ + public ZstackSysOsalNvWriteSrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); + } + + /** + * Status is either Success (0) or Failure (1). + * + * @return the current status as {@link ZstackResponseCode} + */ + public ZstackResponseCode getStatus() { + return status; + } + + /** + * Status is either Success (0) or Failure (1). + * + * @param status the status to set as {@link ZstackResponseCode} + */ + public void setStatus(ZstackResponseCode status) { + this.status = status; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(52); + builder.append("ZstackSysOsalNvWriteSrsp [status="); + builder.append(status); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysPingSreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysPingSreq.java index 17983409a..36052be44 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysPingSreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysPingSreq.java @@ -1,49 +1,50 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sys; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; - -/** - * Class to implement the Z-Stack command SYS_PING. - *

- * This command issues PING requests to verify if a device is active and check the capability of the device. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackSysPingSreq extends ZstackFrameRequest { - - /** - * Request constructor - */ - public ZstackSysPingSreq() { - synchronousCommand = true; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_SYS) && (response.getReqCmd1() == 0x01)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_SYS, 0x01); - - // Serialize the fields - return getPayload(); - } - - @Override - public String toString() { - return "ZstackSysPingSreq []"; - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sys; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command SYS_PING. + *

+ * This command issues PING requests to verify if a device is active and check the capability of the device. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackSysPingSreq extends ZstackFrameRequest { + + /** + * Request constructor + */ + public ZstackSysPingSreq() { + synchronousCommand = true; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_SYS) && (response.getReqCmd1() == 0x01)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_SYS, 0x01); + + // Serialize the fields + return getPayload(); + } + + @Override + public String toString() { + return "ZstackSysPingSreq []"; + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysPingSrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysPingSrsp.java index d63f0f99a..1c2a48169 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysPingSrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysPingSrsp.java @@ -1,67 +1,68 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sys; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; - -/** - * Class to implement the Z-Stack command SYS_PING. - *

- * This command issues PING requests to verify if a device is active and check the capability of the device. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackSysPingSrsp extends ZstackFrameResponse { - - /** - * This field represents the interfaces that this device can handle (compiled into the device). - */ - private int capabilities; - - /** - * Response and Handler constructor - */ - public ZstackSysPingSrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - capabilities = deserializer.deserializeUInt16(); - } - - /** - * This field represents the interfaces that this device can handle (compiled into the device). - * - * @return the current capabilities as {@link int} - */ - public int getCapabilities() { - return capabilities; - } - - /** - * This field represents the interfaces that this device can handle (compiled into the device). - * - * @param capabilities the Capabilities to set as {@link int} - */ - public void setCapabilities(int capabilities) { - this.capabilities = capabilities; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(45); - builder.append("ZstackSysPingSrsp [capabilities="); - builder.append(String.format("%04X", capabilities)); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sys; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command SYS_PING. + *

+ * This command issues PING requests to verify if a device is active and check the capability of the device. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackSysPingSrsp extends ZstackFrameResponse { + + /** + * This field represents the interfaces that this device can handle (compiled into the device). + */ + private int capabilities; + + /** + * Response and Handler constructor + */ + public ZstackSysPingSrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + capabilities = deserializer.deserializeUInt16(); + } + + /** + * This field represents the interfaces that this device can handle (compiled into the device). + * + * @return the current capabilities as {@link int} + */ + public int getCapabilities() { + return capabilities; + } + + /** + * This field represents the interfaces that this device can handle (compiled into the device). + * + * @param capabilities the Capabilities to set as {@link int} + */ + public void setCapabilities(int capabilities) { + this.capabilities = capabilities; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(45); + builder.append("ZstackSysPingSrsp [capabilities="); + builder.append(String.format("%04X", capabilities)); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysResetIndAreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysResetIndAreq.java index 8b8e96c93..48042c97f 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysResetIndAreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysResetIndAreq.java @@ -1,195 +1,196 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sys; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; - -/** - * Class to implement the Z-Stack command SYS_RESET_IND. - *

- * This command is generated by the CC2530 device automatically immediately after a reset. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackSysResetIndAreq extends ZstackFrameResponse { - - /** - * One of the following values indicating the reason for the reset. Power=0x00, External=0x01, Watchdog=0x02 - */ - private ZstackResetReason reason; - - /** - * Transport protocol revision - */ - private int transportRev; - - /** - * Product Id - */ - private int product; - - /** - * Software major release number - */ - private int majorRel; - - /** - * Software minor release number - */ - private int minorRel; - - /** - * Hardware revision number. - */ - private int hwRev; - - /** - * Response and Handler constructor - */ - public ZstackSysResetIndAreq(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - // Deserialize the fields - reason = ZstackResetReason.valueOf(deserializer.deserializeUInt8()); - transportRev = deserializer.deserializeUInt8(); - product = deserializer.deserializeUInt8(); - majorRel = deserializer.deserializeUInt8(); - minorRel = deserializer.deserializeUInt8(); - hwRev = deserializer.deserializeUInt8(); - } - - /** - * One of the following values indicating the reason for the reset. Power=0x00, External=0x01, Watchdog=0x02 - * - * @return the current reason as {@link ZstackResetReason} - */ - public ZstackResetReason getReason() { - return reason; - } - - /** - * One of the following values indicating the reason for the reset. Power=0x00, External=0x01, Watchdog=0x02 - * - * @param reason the Reason to set as {@link ZstackResetReason} - */ - public void setReason(ZstackResetReason reason) { - this.reason = reason; - } - - /** - * Transport protocol revision - * - * @return the current transportRev as {@link int} - */ - public int getTransportRev() { - return transportRev; - } - - /** - * Transport protocol revision - * - * @param transportRev the TransportRev to set as {@link int} - */ - public void setTransportRev(int transportRev) { - this.transportRev = transportRev; - } - - /** - * Product Id - * - * @return the current product as {@link int} - */ - public int getProduct() { - return product; - } - - /** - * Product Id - * - * @param product the Product to set as {@link int} - */ - public void setProduct(int product) { - this.product = product; - } - - /** - * Software major release number - * - * @return the current majorRel as {@link int} - */ - public int getMajorRel() { - return majorRel; - } - - /** - * Software major release number - * - * @param majorRel the MajorRel to set as {@link int} - */ - public void setMajorRel(int majorRel) { - this.majorRel = majorRel; - } - - /** - * Software minor release number - * - * @return the current minorRel as {@link int} - */ - public int getMinorRel() { - return minorRel; - } - - /** - * Software minor release number - * - * @param minorRel the MinorRel to set as {@link int} - */ - public void setMinorRel(int minorRel) { - this.minorRel = minorRel; - } - - /** - * Hardware revision number. - * - * @return the current hwRev as {@link int} - */ - public int getHwRev() { - return hwRev; - } - - /** - * Hardware revision number. - * - * @param hwRev the HwRev to set as {@link int} - */ - public void setHwRev(int hwRev) { - this.hwRev = hwRev; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(174); - builder.append("ZstackSysResetIndAreq [reason="); - builder.append(reason); - builder.append(", transportRev="); - builder.append(transportRev); - builder.append(", product="); - builder.append(product); - builder.append(", majorRel="); - builder.append(majorRel); - builder.append(", minorRel="); - builder.append(minorRel); - builder.append(", hwRev="); - builder.append(hwRev); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sys; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command SYS_RESET_IND. + *

+ * This command is generated by the CC2530 device automatically immediately after a reset. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackSysResetIndAreq extends ZstackFrameResponse { + + /** + * One of the following values indicating the reason for the reset. Power=0x00, External=0x01, Watchdog=0x02 + */ + private ZstackResetReason reason; + + /** + * Transport protocol revision + */ + private int transportRev; + + /** + * Product Id + */ + private int product; + + /** + * Software major release number + */ + private int majorRel; + + /** + * Software minor release number + */ + private int minorRel; + + /** + * Hardware revision number. + */ + private int hwRev; + + /** + * Response and Handler constructor + */ + public ZstackSysResetIndAreq(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + // Deserialize the fields + reason = ZstackResetReason.valueOf(deserializer.deserializeUInt8()); + transportRev = deserializer.deserializeUInt8(); + product = deserializer.deserializeUInt8(); + majorRel = deserializer.deserializeUInt8(); + minorRel = deserializer.deserializeUInt8(); + hwRev = deserializer.deserializeUInt8(); + } + + /** + * One of the following values indicating the reason for the reset. Power=0x00, External=0x01, Watchdog=0x02 + * + * @return the current reason as {@link ZstackResetReason} + */ + public ZstackResetReason getReason() { + return reason; + } + + /** + * One of the following values indicating the reason for the reset. Power=0x00, External=0x01, Watchdog=0x02 + * + * @param reason the Reason to set as {@link ZstackResetReason} + */ + public void setReason(ZstackResetReason reason) { + this.reason = reason; + } + + /** + * Transport protocol revision + * + * @return the current transportRev as {@link int} + */ + public int getTransportRev() { + return transportRev; + } + + /** + * Transport protocol revision + * + * @param transportRev the TransportRev to set as {@link int} + */ + public void setTransportRev(int transportRev) { + this.transportRev = transportRev; + } + + /** + * Product Id + * + * @return the current product as {@link int} + */ + public int getProduct() { + return product; + } + + /** + * Product Id + * + * @param product the Product to set as {@link int} + */ + public void setProduct(int product) { + this.product = product; + } + + /** + * Software major release number + * + * @return the current majorRel as {@link int} + */ + public int getMajorRel() { + return majorRel; + } + + /** + * Software major release number + * + * @param majorRel the MajorRel to set as {@link int} + */ + public void setMajorRel(int majorRel) { + this.majorRel = majorRel; + } + + /** + * Software minor release number + * + * @return the current minorRel as {@link int} + */ + public int getMinorRel() { + return minorRel; + } + + /** + * Software minor release number + * + * @param minorRel the MinorRel to set as {@link int} + */ + public void setMinorRel(int minorRel) { + this.minorRel = minorRel; + } + + /** + * Hardware revision number. + * + * @return the current hwRev as {@link int} + */ + public int getHwRev() { + return hwRev; + } + + /** + * Hardware revision number. + * + * @param hwRev the HwRev to set as {@link int} + */ + public void setHwRev(int hwRev) { + this.hwRev = hwRev; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(174); + builder.append("ZstackSysResetIndAreq [reason="); + builder.append(reason); + builder.append(", transportRev="); + builder.append(transportRev); + builder.append(", product="); + builder.append(product); + builder.append(", majorRel="); + builder.append(majorRel); + builder.append(", minorRel="); + builder.append(minorRel); + builder.append(", hwRev="); + builder.append(hwRev); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysResetReqAcmd.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysResetReqAcmd.java index 5d9fb4ba1..134ecc1df 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysResetReqAcmd.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysResetReqAcmd.java @@ -1,74 +1,75 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sys; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; - -/** - * Class to implement the Z-Stack command SYS_RESET_REQ. - *

- * This command is issued by the application processor to reset the CC2530 device. The reset is achieved through an internal - * watchdog reset on the CC2530. Note that the hardware reset interface is recommended over using this interface. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackSysResetReqAcmd extends ZstackFrameRequest { - - /** - * This requests a target device reset (0) or serial bootloader reset (1). If the target device does not support serial - * bootloading, bootloader reset commands are ignored and no response is sent from the target. - */ - private ZstackResetType type; - - /** - * Request constructor - */ - public ZstackSysResetReqAcmd() { - } - - /** - * This requests a target device reset (0) or serial bootloader reset (1). If the target device does not support serial - * bootloading, bootloader reset commands are ignored and no response is sent from the target. - * - * @return the current type as {@link ZstackResetType} - */ - public ZstackResetType getType() { - return type; - } - - /** - * This requests a target device reset (0) or serial bootloader reset (1). If the target device does not support serial - * bootloading, bootloader reset commands are ignored and no response is sent from the target. - * - * @param type the Type to set as {@link ZstackResetType} - */ - public void setType(ZstackResetType type) { - this.type = type; - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_ACMD, ZSTACK_SYS, 0x00); - - // Serialize the fields - serializer.serializeUInt8(type.getKey()); - return getPayload(); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(49); - builder.append("ZstackSysResetReqAcmd [type="); - builder.append(type); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sys; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command SYS_RESET_REQ. + *

+ * This command is issued by the application processor to reset the CC2530 device. The reset is achieved through an internal + * watchdog reset on the CC2530. Note that the hardware reset interface is recommended over using this interface. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackSysResetReqAcmd extends ZstackFrameRequest { + + /** + * This requests a target device reset (0) or serial bootloader reset (1). If the target device does not support serial + * bootloading, bootloader reset commands are ignored and no response is sent from the target. + */ + private ZstackResetType type; + + /** + * Request constructor + */ + public ZstackSysResetReqAcmd() { + } + + /** + * This requests a target device reset (0) or serial bootloader reset (1). If the target device does not support serial + * bootloading, bootloader reset commands are ignored and no response is sent from the target. + * + * @return the current type as {@link ZstackResetType} + */ + public ZstackResetType getType() { + return type; + } + + /** + * This requests a target device reset (0) or serial bootloader reset (1). If the target device does not support serial + * bootloading, bootloader reset commands are ignored and no response is sent from the target. + * + * @param type the Type to set as {@link ZstackResetType} + */ + public void setType(ZstackResetType type) { + this.type = type; + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_ACMD, ZSTACK_SYS, 0x00); + + // Serialize the fields + serializer.serializeUInt8(type.getKey()); + return getPayload(); + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(49); + builder.append("ZstackSysResetReqAcmd [type="); + builder.append(type); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysSetExtAddrSreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysSetExtAddrSreq.java index ff18f9a06..c5ee41c81 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysSetExtAddrSreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysSetExtAddrSreq.java @@ -1,78 +1,79 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sys; - -import com.zsmartsystems.zigbee.IeeeAddress; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; - -/** - * Class to implement the Z-Stack command SYS_SET_EXT_ADDR. - *

- * This command is used to set the extended address of the device. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackSysSetExtAddrSreq extends ZstackFrameRequest { - - /** - * The device’s extended address. - */ - private IeeeAddress extAddress; - - /** - * Request constructor - */ - public ZstackSysSetExtAddrSreq() { - synchronousCommand = true; - } - - /** - * The device’s extended address. - * - * @return the current extAddress as {@link IeeeAddress} - */ - public IeeeAddress getExtAddress() { - return extAddress; - } - - /** - * The device’s extended address. - * - * @param extAddress the ExtAddress to set as {@link IeeeAddress} - */ - public void setExtAddress(IeeeAddress extAddress) { - this.extAddress = extAddress; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_SYS) && (response.getReqCmd1() == 0x03)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_SYS, 0x03); - - // Serialize the fields - serializer.serializeIeeeAddress(extAddress); - return getPayload(); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(51); - builder.append("ZstackSysSetExtAddrSreq [extAddress="); - builder.append(extAddress); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sys; + +import com.zsmartsystems.zigbee.IeeeAddress; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command SYS_SET_EXT_ADDR. + *

+ * This command is used to set the extended address of the device. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackSysSetExtAddrSreq extends ZstackFrameRequest { + + /** + * The device’s extended address. + */ + private IeeeAddress extAddress; + + /** + * Request constructor + */ + public ZstackSysSetExtAddrSreq() { + synchronousCommand = true; + } + + /** + * The device’s extended address. + * + * @return the current extAddress as {@link IeeeAddress} + */ + public IeeeAddress getExtAddress() { + return extAddress; + } + + /** + * The device’s extended address. + * + * @param extAddress the ExtAddress to set as {@link IeeeAddress} + */ + public void setExtAddress(IeeeAddress extAddress) { + this.extAddress = extAddress; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_SYS) && (response.getReqCmd1() == 0x03)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_SYS, 0x03); + + // Serialize the fields + serializer.serializeIeeeAddress(extAddress); + return getPayload(); + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(51); + builder.append("ZstackSysSetExtAddrSreq [extAddress="); + builder.append(extAddress); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysSetExtAddrSrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysSetExtAddrSrsp.java index c99738073..ecc48af61 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysSetExtAddrSrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysSetExtAddrSrsp.java @@ -1,68 +1,69 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sys; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; - -/** - * Class to implement the Z-Stack command SYS_SET_EXT_ADDR. - *

- * This command is used to set the extended address of the device. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackSysSetExtAddrSrsp extends ZstackFrameResponse { - - /** - * Status is either Success (1) or Failure (0) - */ - private ZstackResponseCode status; - - /** - * Response and Handler constructor - */ - public ZstackSysSetExtAddrSrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); - } - - /** - * Status is either Success (1) or Failure (0) - * - * @return the current status as {@link ZstackResponseCode} - */ - public ZstackResponseCode getStatus() { - return status; - } - - /** - * Status is either Success (1) or Failure (0) - * - * @param status the Status to set as {@link ZstackResponseCode} - */ - public void setStatus(ZstackResponseCode status) { - this.status = status; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(51); - builder.append("ZstackSysSetExtAddrSrsp [status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sys; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command SYS_SET_EXT_ADDR. + *

+ * This command is used to set the extended address of the device. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackSysSetExtAddrSrsp extends ZstackFrameResponse { + + /** + * Status is either Success (1) or Failure (0) + */ + private ZstackResponseCode status; + + /** + * Response and Handler constructor + */ + public ZstackSysSetExtAddrSrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); + } + + /** + * Status is either Success (1) or Failure (0) + * + * @return the current status as {@link ZstackResponseCode} + */ + public ZstackResponseCode getStatus() { + return status; + } + + /** + * Status is either Success (1) or Failure (0) + * + * @param status the Status to set as {@link ZstackResponseCode} + */ + public void setStatus(ZstackResponseCode status) { + this.status = status; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(51); + builder.append("ZstackSysSetExtAddrSrsp [status="); + builder.append(status); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysSetTxPowerSreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysSetTxPowerSreq.java index 0c9f88030..202deb6af 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysSetTxPowerSreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysSetTxPowerSreq.java @@ -1,78 +1,79 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sys; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; - -/** - * Class to implement the Z-Stack command SYS_SET_TX_POWER. - *

- * This command is used by the tester to set the target system radio transmit power. The returned TX power is the actual setting - * applied to the radio – nearest characterized value for the specific radio. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackSysSetTxPowerSreq extends ZstackFrameRequest { - - /** - * Requested TX power setting, in dBm. - */ - private int txPower; - - /** - * Request constructor - */ - public ZstackSysSetTxPowerSreq() { - synchronousCommand = true; - } - - /** - * Requested TX power setting, in dBm. - * - * @return the current txPower as {@link int} - */ - public int getTxPower() { - return txPower; - } - - /** - * Requested TX power setting, in dBm. - * - * @param txPower the TxPower to set as {@link int} - */ - public void setTxPower(int txPower) { - this.txPower = txPower; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_SYS) && (response.getReqCmd1() == 0x14)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_SYS, 0x14); - - // Serialize the fields - serializer.serializeUInt8(txPower); - return getPayload(); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(51); - builder.append("ZstackSysSetTxPowerSreq [txPower="); - builder.append(txPower); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sys; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command SYS_SET_TX_POWER. + *

+ * This command is used by the tester to set the target system radio transmit power. The returned TX power is the actual setting + * applied to the radio – nearest characterized value for the specific radio. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackSysSetTxPowerSreq extends ZstackFrameRequest { + + /** + * Requested TX power setting, in dBm. + */ + private int txPower; + + /** + * Request constructor + */ + public ZstackSysSetTxPowerSreq() { + synchronousCommand = true; + } + + /** + * Requested TX power setting, in dBm. + * + * @return the current txPower as {@link int} + */ + public int getTxPower() { + return txPower; + } + + /** + * Requested TX power setting, in dBm. + * + * @param txPower the TxPower to set as {@link int} + */ + public void setTxPower(int txPower) { + this.txPower = txPower; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_SYS) && (response.getReqCmd1() == 0x14)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_SYS, 0x14); + + // Serialize the fields + serializer.serializeUInt8(txPower); + return getPayload(); + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(51); + builder.append("ZstackSysSetTxPowerSreq [txPower="); + builder.append(txPower); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysSetTxPowerSrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysSetTxPowerSrsp.java index 2c5dee61b..17be7820a 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysSetTxPowerSrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysSetTxPowerSrsp.java @@ -1,69 +1,70 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sys; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; - -/** - * Class to implement the Z-Stack command SYS_SET_TX_POWER. - *

- * This command is used by the tester to set the target system radio transmit power. The returned TX power is the actual setting - * applied to the radio – nearest characterized value for the specific radio. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackSysSetTxPowerSrsp extends ZstackFrameResponse { - - /** - * Staus is either Success (0) or Failure (1). - */ - private ZstackResponseCode status; - - /** - * Response and Handler constructor - */ - public ZstackSysSetTxPowerSrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); - } - - /** - * Staus is either Success (0) or Failure (1). - * - * @return the current status as {@link ZstackResponseCode} - */ - public ZstackResponseCode getStatus() { - return status; - } - - /** - * Staus is either Success (0) or Failure (1). - * - * @param status the Status to set as {@link ZstackResponseCode} - */ - public void setStatus(ZstackResponseCode status) { - this.status = status; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(51); - builder.append("ZstackSysSetTxPowerSrsp [status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sys; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command SYS_SET_TX_POWER. + *

+ * This command is used by the tester to set the target system radio transmit power. The returned TX power is the actual setting + * applied to the radio – nearest characterized value for the specific radio. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackSysSetTxPowerSrsp extends ZstackFrameResponse { + + /** + * Staus is either Success (0) or Failure (1). + */ + private ZstackResponseCode status; + + /** + * Response and Handler constructor + */ + public ZstackSysSetTxPowerSrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); + } + + /** + * Staus is either Success (0) or Failure (1). + * + * @return the current status as {@link ZstackResponseCode} + */ + public ZstackResponseCode getStatus() { + return status; + } + + /** + * Staus is either Success (0) or Failure (1). + * + * @param status the Status to set as {@link ZstackResponseCode} + */ + public void setStatus(ZstackResponseCode status) { + this.status = status; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(51); + builder.append("ZstackSysSetTxPowerSrsp [status="); + builder.append(status); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysVersionSreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysVersionSreq.java index f86dc977b..aa66cd2d1 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysVersionSreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysVersionSreq.java @@ -1,49 +1,50 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sys; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; - -/** - * Class to implement the Z-Stack command SYS_VERSION. - *

- * This command issues PING requests to verify if a device is active and check the capability of the device. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackSysVersionSreq extends ZstackFrameRequest { - - /** - * Request constructor - */ - public ZstackSysVersionSreq() { - synchronousCommand = true; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_SYS) && (response.getReqCmd1() == 0x02)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_SYS, 0x02); - - // Serialize the fields - return getPayload(); - } - - @Override - public String toString() { - return "ZstackSysVersionSreq []"; - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sys; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command SYS_VERSION. + *

+ * This command issues PING requests to verify if a device is active and check the capability of the device. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackSysVersionSreq extends ZstackFrameRequest { + + /** + * Request constructor + */ + public ZstackSysVersionSreq() { + synchronousCommand = true; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_SYS) && (response.getReqCmd1() == 0x02)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_SYS, 0x02); + + // Serialize the fields + return getPayload(); + } + + @Override + public String toString() { + return "ZstackSysVersionSreq []"; + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysVersionSrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysVersionSrsp.java index 8370d199d..f44325747 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysVersionSrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysVersionSrsp.java @@ -1,171 +1,172 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sys; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; - -/** - * Class to implement the Z-Stack command SYS_VERSION. - *

- * This command issues PING requests to verify if a device is active and check the capability of the device. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackSysVersionSrsp extends ZstackFrameResponse { - - /** - * Transport protocol revision - */ - private int transportRev; - - /** - * Product Id - */ - private int product; - - /** - * Software major release number - */ - private int majorRel; - - /** - * Software minor release number - */ - private int minorRel; - - /** - * Software maintenance release number - */ - private int maintRel; - - /** - * Response and Handler constructor - */ - public ZstackSysVersionSrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - transportRev = deserializer.deserializeUInt8(); - product = deserializer.deserializeUInt8(); - majorRel = deserializer.deserializeUInt8(); - minorRel = deserializer.deserializeUInt8(); - maintRel = deserializer.deserializeUInt8(); - } - - /** - * Transport protocol revision - * - * @return the current transportRev as {@link int} - */ - public int getTransportRev() { - return transportRev; - } - - /** - * Transport protocol revision - * - * @param transportRev the TransportRev to set as {@link int} - */ - public void setTransportRev(int transportRev) { - this.transportRev = transportRev; - } - - /** - * Product Id - * - * @return the current product as {@link int} - */ - public int getProduct() { - return product; - } - - /** - * Product Id - * - * @param product the Product to set as {@link int} - */ - public void setProduct(int product) { - this.product = product; - } - - /** - * Software major release number - * - * @return the current majorRel as {@link int} - */ - public int getMajorRel() { - return majorRel; - } - - /** - * Software major release number - * - * @param majorRel the MajorRel to set as {@link int} - */ - public void setMajorRel(int majorRel) { - this.majorRel = majorRel; - } - - /** - * Software minor release number - * - * @return the current minorRel as {@link int} - */ - public int getMinorRel() { - return minorRel; - } - - /** - * Software minor release number - * - * @param minorRel the MinorRel to set as {@link int} - */ - public void setMinorRel(int minorRel) { - this.minorRel = minorRel; - } - - /** - * Software maintenance release number - * - * @return the current maintRel as {@link int} - */ - public int getMaintRel() { - return maintRel; - } - - /** - * Software maintenance release number - * - * @param maintRel the MaintRel to set as {@link int} - */ - public void setMaintRel(int maintRel) { - this.maintRel = maintRel; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(148); - builder.append("ZstackSysVersionSrsp [transportRev="); - builder.append(transportRev); - builder.append(", product="); - builder.append(product); - builder.append(", majorRel="); - builder.append(majorRel); - builder.append(", minorRel="); - builder.append(minorRel); - builder.append(", maintRel="); - builder.append(maintRel); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sys; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command SYS_VERSION. + *

+ * This command issues PING requests to verify if a device is active and check the capability of the device. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackSysVersionSrsp extends ZstackFrameResponse { + + /** + * Transport protocol revision + */ + private int transportRev; + + /** + * Product Id + */ + private int product; + + /** + * Software major release number + */ + private int majorRel; + + /** + * Software minor release number + */ + private int minorRel; + + /** + * Software maintenance release number + */ + private int maintRel; + + /** + * Response and Handler constructor + */ + public ZstackSysVersionSrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + transportRev = deserializer.deserializeUInt8(); + product = deserializer.deserializeUInt8(); + majorRel = deserializer.deserializeUInt8(); + minorRel = deserializer.deserializeUInt8(); + maintRel = deserializer.deserializeUInt8(); + } + + /** + * Transport protocol revision + * + * @return the current transportRev as {@link int} + */ + public int getTransportRev() { + return transportRev; + } + + /** + * Transport protocol revision + * + * @param transportRev the TransportRev to set as {@link int} + */ + public void setTransportRev(int transportRev) { + this.transportRev = transportRev; + } + + /** + * Product Id + * + * @return the current product as {@link int} + */ + public int getProduct() { + return product; + } + + /** + * Product Id + * + * @param product the Product to set as {@link int} + */ + public void setProduct(int product) { + this.product = product; + } + + /** + * Software major release number + * + * @return the current majorRel as {@link int} + */ + public int getMajorRel() { + return majorRel; + } + + /** + * Software major release number + * + * @param majorRel the MajorRel to set as {@link int} + */ + public void setMajorRel(int majorRel) { + this.majorRel = majorRel; + } + + /** + * Software minor release number + * + * @return the current minorRel as {@link int} + */ + public int getMinorRel() { + return minorRel; + } + + /** + * Software minor release number + * + * @param minorRel the MinorRel to set as {@link int} + */ + public void setMinorRel(int minorRel) { + this.minorRel = minorRel; + } + + /** + * Software maintenance release number + * + * @return the current maintRel as {@link int} + */ + public int getMaintRel() { + return maintRel; + } + + /** + * Software maintenance release number + * + * @param maintRel the MaintRel to set as {@link int} + */ + public void setMaintRel(int maintRel) { + this.maintRel = maintRel; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(148); + builder.append("ZstackSysVersionSrsp [transportRev="); + builder.append(transportRev); + builder.append(", product="); + builder.append(product); + builder.append(", majorRel="); + builder.append(majorRel); + builder.append(", minorRel="); + builder.append(minorRel); + builder.append(", maintRel="); + builder.append(maintRel); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsClearStatsSreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsClearStatsSreq.java index 2cf9f4dc1..6ca2be878 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsClearStatsSreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsClearStatsSreq.java @@ -1,78 +1,79 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sys; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; - -/** - * Class to implement the Z-Stack command SYS_ZDIAGS_CLEAR_STATS. - *

- * This command is used to clear the statistics table. To clear data in NV (including the Boot Counter) the clearNV flag shall be set - * to TRUE. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackSysZdiagsClearStatsSreq extends ZstackFrameRequest { - - /** - * TRUE – Clears statistics in NV memory including Boot Counter. FALSE – Clears statistics in RAM only. Boot Counter is preserved. - */ - private boolean clearNv; - - /** - * Request constructor - */ - public ZstackSysZdiagsClearStatsSreq() { - synchronousCommand = true; - } - - /** - * TRUE – Clears statistics in NV memory including Boot Counter. FALSE – Clears statistics in RAM only. Boot Counter is preserved. - * - * @return the current clearNv as {@link boolean} - */ - public boolean getClearNV() { - return clearNv; - } - - /** - * TRUE – Clears statistics in NV memory including Boot Counter. FALSE – Clears statistics in RAM only. Boot Counter is preserved. - * - * @param clearNv the clearNV to set as {@link boolean} - */ - public void setClearNV(boolean clearNv) { - this.clearNv = clearNv; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_SYS) && (response.getReqCmd1() == 0x18)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_SYS, 0x18); - - // Serialize the fields - serializer.serializeBoolean(clearNv); - return getPayload(); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(57); - builder.append("ZstackSysZdiagsClearStatsSreq [clearNv="); - builder.append(clearNv); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sys; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command SYS_ZDIAGS_CLEAR_STATS. + *

+ * This command is used to clear the statistics table. To clear data in NV (including the Boot Counter) the clearNV flag shall be set + * to TRUE. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackSysZdiagsClearStatsSreq extends ZstackFrameRequest { + + /** + * TRUE – Clears statistics in NV memory including Boot Counter. FALSE – Clears statistics in RAM only. Boot Counter is preserved. + */ + private boolean clearNv; + + /** + * Request constructor + */ + public ZstackSysZdiagsClearStatsSreq() { + synchronousCommand = true; + } + + /** + * TRUE – Clears statistics in NV memory including Boot Counter. FALSE – Clears statistics in RAM only. Boot Counter is preserved. + * + * @return the current clearNv as {@link boolean} + */ + public boolean getClearNV() { + return clearNv; + } + + /** + * TRUE – Clears statistics in NV memory including Boot Counter. FALSE – Clears statistics in RAM only. Boot Counter is preserved. + * + * @param clearNv the clearNV to set as {@link boolean} + */ + public void setClearNV(boolean clearNv) { + this.clearNv = clearNv; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_SYS) && (response.getReqCmd1() == 0x18)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_SYS, 0x18); + + // Serialize the fields + serializer.serializeBoolean(clearNv); + return getPayload(); + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(57); + builder.append("ZstackSysZdiagsClearStatsSreq [clearNv="); + builder.append(clearNv); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsClearStatsSrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsClearStatsSrsp.java index e9665f040..1ef77fa0f 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsClearStatsSrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsClearStatsSrsp.java @@ -1,68 +1,69 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sys; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; - -/** - * Class to implement the Z-Stack command SYS_ZDIAGS_CLEAR_STATS. - *

- * This command is used to clear the statistics table. To clear data in NV (including the Boot Counter) the clearNV flag shall be set - * to TRUE. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackSysZdiagsClearStatsSrsp extends ZstackFrameResponse { - - /** - * Milliseconds since last reset. - */ - private int sysClock; - - /** - * Response and Handler constructor - */ - public ZstackSysZdiagsClearStatsSrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - sysClock = deserializer.deserializeUInt32(); - } - - /** - * Milliseconds since last reset. - * - * @return the current sysClock as {@link int} - */ - public int getSysClock() { - return sysClock; - } - - /** - * Milliseconds since last reset. - * - * @param sysClock the SysClock to set as {@link int} - */ - public void setSysClock(int sysClock) { - this.sysClock = sysClock; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(57); - builder.append("ZstackSysZdiagsClearStatsSrsp [sysClock="); - builder.append(sysClock); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sys; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command SYS_ZDIAGS_CLEAR_STATS. + *

+ * This command is used to clear the statistics table. To clear data in NV (including the Boot Counter) the clearNV flag shall be set + * to TRUE. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackSysZdiagsClearStatsSrsp extends ZstackFrameResponse { + + /** + * Milliseconds since last reset. + */ + private int sysClock; + + /** + * Response and Handler constructor + */ + public ZstackSysZdiagsClearStatsSrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + sysClock = deserializer.deserializeUInt32(); + } + + /** + * Milliseconds since last reset. + * + * @return the current sysClock as {@link int} + */ + public int getSysClock() { + return sysClock; + } + + /** + * Milliseconds since last reset. + * + * @param sysClock the SysClock to set as {@link int} + */ + public void setSysClock(int sysClock) { + this.sysClock = sysClock; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(57); + builder.append("ZstackSysZdiagsClearStatsSrsp [sysClock="); + builder.append(sysClock); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsGetStatsSreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsGetStatsSreq.java index c3f0b8fb7..36eaa9609 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsGetStatsSreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsGetStatsSreq.java @@ -1,77 +1,78 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sys; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; - -/** - * Class to implement the Z-Stack command SYS_ZDIAGS_GET_STATS. - *

- * This command is used to read a specific system (attribute) ID statistics and/or metrics value. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackSysZdiagsGetStatsSreq extends ZstackFrameRequest { - - /** - * System Diagnostics (ZDiags) attribute ID, as defined in ZDiags.h module. - */ - private ZstackDiagnosticAttribute attributeId; - - /** - * Request constructor - */ - public ZstackSysZdiagsGetStatsSreq() { - synchronousCommand = true; - } - - /** - * System Diagnostics (ZDiags) attribute ID, as defined in ZDiags.h module. - * - * @return the current attributeId as {@link ZstackDiagnosticAttribute} - */ - public ZstackDiagnosticAttribute getAttributeID() { - return attributeId; - } - - /** - * System Diagnostics (ZDiags) attribute ID, as defined in ZDiags.h module. - * - * @param attributeId the AttributeID to set as {@link ZstackDiagnosticAttribute} - */ - public void setAttributeID(ZstackDiagnosticAttribute attributeId) { - this.attributeId = attributeId; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_SYS) && (response.getReqCmd1() == 0x19)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_SYS, 0x19); - - // Serialize the fields - serializer.serializeUInt16(attributeId.getKey()); - return getPayload(); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(55); - builder.append("ZstackSysZdiagsGetStatsSreq [attributeId="); - builder.append(attributeId); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sys; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command SYS_ZDIAGS_GET_STATS. + *

+ * This command is used to read a specific system (attribute) ID statistics and/or metrics value. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackSysZdiagsGetStatsSreq extends ZstackFrameRequest { + + /** + * System Diagnostics (ZDiags) attribute ID, as defined in ZDiags.h module. + */ + private ZstackDiagnosticAttribute attributeId; + + /** + * Request constructor + */ + public ZstackSysZdiagsGetStatsSreq() { + synchronousCommand = true; + } + + /** + * System Diagnostics (ZDiags) attribute ID, as defined in ZDiags.h module. + * + * @return the current attributeId as {@link ZstackDiagnosticAttribute} + */ + public ZstackDiagnosticAttribute getAttributeID() { + return attributeId; + } + + /** + * System Diagnostics (ZDiags) attribute ID, as defined in ZDiags.h module. + * + * @param attributeId the AttributeID to set as {@link ZstackDiagnosticAttribute} + */ + public void setAttributeID(ZstackDiagnosticAttribute attributeId) { + this.attributeId = attributeId; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_SYS) && (response.getReqCmd1() == 0x19)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_SYS, 0x19); + + // Serialize the fields + serializer.serializeUInt16(attributeId.getKey()); + return getPayload(); + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(55); + builder.append("ZstackSysZdiagsGetStatsSreq [attributeId="); + builder.append(attributeId); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsGetStatsSrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsGetStatsSrsp.java index 9d60d6690..e676c801f 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsGetStatsSrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsGetStatsSrsp.java @@ -1,67 +1,68 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sys; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; - -/** - * Class to implement the Z-Stack command SYS_ZDIAGS_GET_STATS. - *

- * This command is used to read a specific system (attribute) ID statistics and/or metrics value. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackSysZdiagsGetStatsSrsp extends ZstackFrameResponse { - - /** - * Value of the requested attribute. - */ - private int attributeValue; - - /** - * Response and Handler constructor - */ - public ZstackSysZdiagsGetStatsSrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - attributeValue = deserializer.deserializeUInt32(); - } - - /** - * Value of the requested attribute. - * - * @return the current attributeValue as {@link int} - */ - public int getAttributeValue() { - return attributeValue; - } - - /** - * Value of the requested attribute. - * - * @param attributeValue the AttributeValue to set as {@link int} - */ - public void setAttributeValue(int attributeValue) { - this.attributeValue = attributeValue; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(55); - builder.append("ZstackSysZdiagsGetStatsSrsp [attributeValue="); - builder.append(attributeValue); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sys; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command SYS_ZDIAGS_GET_STATS. + *

+ * This command is used to read a specific system (attribute) ID statistics and/or metrics value. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackSysZdiagsGetStatsSrsp extends ZstackFrameResponse { + + /** + * Value of the requested attribute. + */ + private int attributeValue; + + /** + * Response and Handler constructor + */ + public ZstackSysZdiagsGetStatsSrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + attributeValue = deserializer.deserializeUInt32(); + } + + /** + * Value of the requested attribute. + * + * @return the current attributeValue as {@link int} + */ + public int getAttributeValue() { + return attributeValue; + } + + /** + * Value of the requested attribute. + * + * @param attributeValue the AttributeValue to set as {@link int} + */ + public void setAttributeValue(int attributeValue) { + this.attributeValue = attributeValue; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(55); + builder.append("ZstackSysZdiagsGetStatsSrsp [attributeValue="); + builder.append(attributeValue); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsInitStatsSreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsInitStatsSreq.java index 7084cc740..217e821b3 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsInitStatsSreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsInitStatsSreq.java @@ -1,49 +1,50 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sys; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; - -/** - * Class to implement the Z-Stack command SYS_ZDIAGS_INIT_STATS. - *

- * This command is used to initialize the statistics table in NV memory. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackSysZdiagsInitStatsSreq extends ZstackFrameRequest { - - /** - * Request constructor - */ - public ZstackSysZdiagsInitStatsSreq() { - synchronousCommand = true; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_SYS) && (response.getReqCmd1() == 0x17)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_SYS, 0x17); - - // Serialize the fields - return getPayload(); - } - - @Override - public String toString() { - return "ZstackSysZdiagsInitStatsSreq []"; - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sys; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command SYS_ZDIAGS_INIT_STATS. + *

+ * This command is used to initialize the statistics table in NV memory. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackSysZdiagsInitStatsSreq extends ZstackFrameRequest { + + /** + * Request constructor + */ + public ZstackSysZdiagsInitStatsSreq() { + synchronousCommand = true; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_SYS) && (response.getReqCmd1() == 0x17)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_SYS, 0x17); + + // Serialize the fields + return getPayload(); + } + + @Override + public String toString() { + return "ZstackSysZdiagsInitStatsSreq []"; + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsInitStatsSrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsInitStatsSrsp.java index 98ef68a7c..86a2d0580 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsInitStatsSrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsInitStatsSrsp.java @@ -1,68 +1,69 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sys; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; - -/** - * Class to implement the Z-Stack command SYS_ZDIAGS_INIT_STATS. - *

- * This command is used to initialize the statistics table in NV memory. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackSysZdiagsInitStatsSrsp extends ZstackFrameResponse { - - /** - * Status is either Success (0) or Failure (1). - */ - private ZstackResponseCode status; - - /** - * Response and Handler constructor - */ - public ZstackSysZdiagsInitStatsSrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); - } - - /** - * Status is either Success (0) or Failure (1). - * - * @return the current status as {@link ZstackResponseCode} - */ - public ZstackResponseCode getStatus() { - return status; - } - - /** - * Status is either Success (0) or Failure (1). - * - * @param status the Status to set as {@link ZstackResponseCode} - */ - public void setStatus(ZstackResponseCode status) { - this.status = status; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(56); - builder.append("ZstackSysZdiagsInitStatsSrsp [status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sys; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command SYS_ZDIAGS_INIT_STATS. + *

+ * This command is used to initialize the statistics table in NV memory. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackSysZdiagsInitStatsSrsp extends ZstackFrameResponse { + + /** + * Status is either Success (0) or Failure (1). + */ + private ZstackResponseCode status; + + /** + * Response and Handler constructor + */ + public ZstackSysZdiagsInitStatsSrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); + } + + /** + * Status is either Success (0) or Failure (1). + * + * @return the current status as {@link ZstackResponseCode} + */ + public ZstackResponseCode getStatus() { + return status; + } + + /** + * Status is either Success (0) or Failure (1). + * + * @param status the Status to set as {@link ZstackResponseCode} + */ + public void setStatus(ZstackResponseCode status) { + this.status = status; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(56); + builder.append("ZstackSysZdiagsInitStatsSrsp [status="); + builder.append(status); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsRestoreStatsNvSreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsRestoreStatsNvSreq.java index a8644f264..ba276ecb9 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsRestoreStatsNvSreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsRestoreStatsNvSreq.java @@ -1,77 +1,78 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sys; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; - -/** - * Class to implement the Z-Stack command SYS_ZDIAGS_RESTORE_STATS_NV. - *

- * This command is used to restore the statistics table from NV into the RAM table. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackSysZdiagsRestoreStatsNvSreq extends ZstackFrameRequest { - - /** - * System Diagnostics (ZDiags) attribute ID, as defined in ZDiags.h module. - */ - private ZstackDiagnosticAttribute attributeId; - - /** - * Request constructor - */ - public ZstackSysZdiagsRestoreStatsNvSreq() { - synchronousCommand = true; - } - - /** - * System Diagnostics (ZDiags) attribute ID, as defined in ZDiags.h module. - * - * @return the current attributeId as {@link ZstackDiagnosticAttribute} - */ - public ZstackDiagnosticAttribute getAttributeID() { - return attributeId; - } - - /** - * System Diagnostics (ZDiags) attribute ID, as defined in ZDiags.h module. - * - * @param attributeId the AttributeID to set as {@link ZstackDiagnosticAttribute} - */ - public void setAttributeID(ZstackDiagnosticAttribute attributeId) { - this.attributeId = attributeId; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_SYS) && (response.getReqCmd1() == 0x1A)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_SYS, 0x1A); - - // Serialize the fields - serializer.serializeUInt16(attributeId.getKey()); - return getPayload(); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(61); - builder.append("ZstackSysZdiagsRestoreStatsNvSreq [attributeId="); - builder.append(attributeId); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sys; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command SYS_ZDIAGS_RESTORE_STATS_NV. + *

+ * This command is used to restore the statistics table from NV into the RAM table. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackSysZdiagsRestoreStatsNvSreq extends ZstackFrameRequest { + + /** + * System Diagnostics (ZDiags) attribute ID, as defined in ZDiags.h module. + */ + private ZstackDiagnosticAttribute attributeId; + + /** + * Request constructor + */ + public ZstackSysZdiagsRestoreStatsNvSreq() { + synchronousCommand = true; + } + + /** + * System Diagnostics (ZDiags) attribute ID, as defined in ZDiags.h module. + * + * @return the current attributeId as {@link ZstackDiagnosticAttribute} + */ + public ZstackDiagnosticAttribute getAttributeID() { + return attributeId; + } + + /** + * System Diagnostics (ZDiags) attribute ID, as defined in ZDiags.h module. + * + * @param attributeId the AttributeID to set as {@link ZstackDiagnosticAttribute} + */ + public void setAttributeID(ZstackDiagnosticAttribute attributeId) { + this.attributeId = attributeId; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_SYS) && (response.getReqCmd1() == 0x1A)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_SYS, 0x1A); + + // Serialize the fields + serializer.serializeUInt16(attributeId.getKey()); + return getPayload(); + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(61); + builder.append("ZstackSysZdiagsRestoreStatsNvSreq [attributeId="); + builder.append(attributeId); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsRestoreStatsNvSrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsRestoreStatsNvSrsp.java index f0fc7c0d1..a6591d213 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsRestoreStatsNvSrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsRestoreStatsNvSrsp.java @@ -1,68 +1,69 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sys; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; - -/** - * Class to implement the Z-Stack command SYS_ZDIAGS_RESTORE_STATS_NV. - *

- * This command is used to restore the statistics table from NV into the RAM table. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackSysZdiagsRestoreStatsNvSrsp extends ZstackFrameResponse { - - /** - * Status is either Success (0) or Failure (1). - */ - private ZstackResponseCode status; - - /** - * Response and Handler constructor - */ - public ZstackSysZdiagsRestoreStatsNvSrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); - } - - /** - * Status is either Success (0) or Failure (1). - * - * @return the current status as {@link ZstackResponseCode} - */ - public ZstackResponseCode getStatus() { - return status; - } - - /** - * Status is either Success (0) or Failure (1). - * - * @param status the Status to set as {@link ZstackResponseCode} - */ - public void setStatus(ZstackResponseCode status) { - this.status = status; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(61); - builder.append("ZstackSysZdiagsRestoreStatsNvSrsp [status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sys; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command SYS_ZDIAGS_RESTORE_STATS_NV. + *

+ * This command is used to restore the statistics table from NV into the RAM table. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackSysZdiagsRestoreStatsNvSrsp extends ZstackFrameResponse { + + /** + * Status is either Success (0) or Failure (1). + */ + private ZstackResponseCode status; + + /** + * Response and Handler constructor + */ + public ZstackSysZdiagsRestoreStatsNvSrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); + } + + /** + * Status is either Success (0) or Failure (1). + * + * @return the current status as {@link ZstackResponseCode} + */ + public ZstackResponseCode getStatus() { + return status; + } + + /** + * Status is either Success (0) or Failure (1). + * + * @param status the Status to set as {@link ZstackResponseCode} + */ + public void setStatus(ZstackResponseCode status) { + this.status = status; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(61); + builder.append("ZstackSysZdiagsRestoreStatsNvSrsp [status="); + builder.append(status); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsSaveStatsToNvSreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsSaveStatsToNvSreq.java index 9ce977c8c..56ab2a803 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsSaveStatsToNvSreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsSaveStatsToNvSreq.java @@ -1,49 +1,50 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sys; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; - -/** - * Class to implement the Z-Stack command SYS_ZDIAGS_SAVE_STATS_TO_NV. - *

- * This command is used to save the statistics table from RAM to NV. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackSysZdiagsSaveStatsToNvSreq extends ZstackFrameRequest { - - /** - * Request constructor - */ - public ZstackSysZdiagsSaveStatsToNvSreq() { - synchronousCommand = true; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_SYS) && (response.getReqCmd1() == 0x1B)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_SYS, 0x1B); - - // Serialize the fields - return getPayload(); - } - - @Override - public String toString() { - return "ZstackSysZdiagsSaveStatsToNvSreq []"; - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sys; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command SYS_ZDIAGS_SAVE_STATS_TO_NV. + *

+ * This command is used to save the statistics table from RAM to NV. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackSysZdiagsSaveStatsToNvSreq extends ZstackFrameRequest { + + /** + * Request constructor + */ + public ZstackSysZdiagsSaveStatsToNvSreq() { + synchronousCommand = true; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_SYS) && (response.getReqCmd1() == 0x1B)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_SYS, 0x1B); + + // Serialize the fields + return getPayload(); + } + + @Override + public String toString() { + return "ZstackSysZdiagsSaveStatsToNvSreq []"; + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsSaveStatsToNvSrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsSaveStatsToNvSrsp.java index 5b0658cde..bff97ff3f 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsSaveStatsToNvSrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSysZdiagsSaveStatsToNvSrsp.java @@ -1,67 +1,68 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sys; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; - -/** - * Class to implement the Z-Stack command SYS_ZDIAGS_SAVE_STATS_TO_NV. - *

- * This command is used to save the statistics table from RAM to NV. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackSysZdiagsSaveStatsToNvSrsp extends ZstackFrameResponse { - - /** - * Milliseconds since last reset. - */ - private int sysClock; - - /** - * Response and Handler constructor - */ - public ZstackSysZdiagsSaveStatsToNvSrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - sysClock = deserializer.deserializeUInt32(); - } - - /** - * Milliseconds since last reset. - * - * @return the current sysClock as {@link int} - */ - public int getSysClock() { - return sysClock; - } - - /** - * Milliseconds since last reset. - * - * @param sysClock the SysClock to set as {@link int} - */ - public void setSysClock(int sysClock) { - this.sysClock = sysClock; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(60); - builder.append("ZstackSysZdiagsSaveStatsToNvSrsp [sysClock="); - builder.append(sysClock); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sys; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command SYS_ZDIAGS_SAVE_STATS_TO_NV. + *

+ * This command is used to save the statistics table from RAM to NV. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackSysZdiagsSaveStatsToNvSrsp extends ZstackFrameResponse { + + /** + * Milliseconds since last reset. + */ + private int sysClock; + + /** + * Response and Handler constructor + */ + public ZstackSysZdiagsSaveStatsToNvSrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + sysClock = deserializer.deserializeUInt32(); + } + + /** + * Milliseconds since last reset. + * + * @return the current sysClock as {@link int} + */ + public int getSysClock() { + return sysClock; + } + + /** + * Milliseconds since last reset. + * + * @param sysClock the SysClock to set as {@link int} + */ + public void setSysClock(int sysClock) { + this.sysClock = sysClock; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(60); + builder.append("ZstackSysZdiagsSaveStatsToNvSrsp [sysClock="); + builder.append(sysClock); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSystemCapabilities.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSystemCapabilities.java index 557f2dade..a7f24914b 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSystemCapabilities.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackSystemCapabilities.java @@ -1,119 +1,119 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sys; - -import java.util.HashMap; -import java.util.Map; - -/** - * Class to implement the Z-Stack Enumeration ZstackSystemCapabilities. - *

- * Subsystem capabilities bitmap - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public enum ZstackSystemCapabilities { - /** - * Default unknown value - */ - UNKNOWN(-1), - - /** - * - */ - MT_CAP_SYS(0x0001), - - /** - * - */ - MT_CAP_MAC(0x0002), - - /** - * - */ - MT_CAP_NWK(0x0004), - - /** - * - */ - MT_CAP_AF(0x0008), - - /** - * - */ - MT_CAP_ZDO(0x0010), - - /** - * - */ - MT_CAP_SAPI(0x0020), - - /** - * - */ - MT_CAP_UTIL(0x0040), - - /** - * - */ - MT_CAP_DEBUG(0x0080), - - /** - * - */ - MT_CAP_APP(0x0100), - - /** - * - */ - MT_CAP_ZOAD(0x1000); - - /** - * A mapping between the integer code and its corresponding type to - * facilitate lookup by code. - */ - private static Map codeMapping; - - private int key; - - static { - codeMapping = new HashMap(); - for (ZstackSystemCapabilities s : values()) { - codeMapping.put(s.key, s); - } - } - - private ZstackSystemCapabilities(int key) { - this.key = key; - } - - /** - * Lookup function based on the type code. Returns null if the code does not exist. - * - * @param code the code to lookup - * @return enumeration value of the alarm type. - */ - public static ZstackSystemCapabilities valueOf(int code) { - if (codeMapping.get(code) == null) { - return UNKNOWN; - } - - return codeMapping.get(code); - } - - /** - * Returns the Z-Stack protocol defined value for this enumeration. - * - * @return the Z-Stack protocol key - */ - public int getKey() { - return key; - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sys; + +import java.util.HashMap; +import java.util.Map; + +/** + * Class to implement the Z-Stack Enumeration ZstackSystemCapabilities. + *

+ * Subsystem capabilities bitmap + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + * + * @author Chris Jackson + */ +public enum ZstackSystemCapabilities { + /** + * Default unknown value + */ + UNKNOWN(-1), + + /** + * + */ + MT_CAP_SYS(0x0001), + + /** + * + */ + MT_CAP_MAC(0x0002), + + /** + * + */ + MT_CAP_NWK(0x0004), + + /** + * + */ + MT_CAP_AF(0x0008), + + /** + * + */ + MT_CAP_ZDO(0x0010), + + /** + * + */ + MT_CAP_SAPI(0x0020), + + /** + * + */ + MT_CAP_UTIL(0x0040), + + /** + * + */ + MT_CAP_DEBUG(0x0080), + + /** + * + */ + MT_CAP_APP(0x0100), + + /** + * + */ + MT_CAP_ZOAD(0x1000); + + /** + * A mapping between the integer code and its corresponding type to + * facilitate lookup by code. + */ + private static Map codeMapping; + + private int key; + + static { + codeMapping = new HashMap(); + for (ZstackSystemCapabilities s : values()) { + codeMapping.put(s.key, s); + } + } + + private ZstackSystemCapabilities(int key) { + this.key = key; + } + + /** + * Lookup function based on the type code. Returns null if the code does not exist. + * + * @param code the code to lookup + * @return enumeration value of the alarm type. + */ + public static ZstackSystemCapabilities valueOf(int code) { + if (codeMapping.get(code) == null) { + return UNKNOWN; + } + + return codeMapping.get(code); + } + + /** + * Returns the Z-Stack protocol defined value for this enumeration. + * + * @return the Z-Stack protocol key + */ + public int getKey() { + return key; + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackZdoState.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackZdoState.java index 36de6a5f3..0e65efa5b 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackZdoState.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/sys/ZstackZdoState.java @@ -1,122 +1,122 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.sys; - -import java.util.HashMap; -import java.util.Map; - -/** - * Class to implement the Z-Stack Enumeration ZstackZdoState. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public enum ZstackZdoState { - /** - * Default unknown value - */ - UNKNOWN(-1), - - /** - * Initialized - not started automatically - */ - DEV_HOLD(0x0000), - - /** - * Initialized - not connected to anything - */ - DEV_INIT(0x0001), - - /** - * Discovering PAN's to join - */ - DEV_NWK_DISC(0x0002), - - /** - * Joining a PAN - */ - DEV_NWK_JOINING(0x0003), - - /** - * ReJoining a PAN, only for end devices - */ - DEV_NWK_REJOIN(0x0004), - - /** - * Joined but not yet authenticated by trust center - */ - DEV_END_DEVICE_UNAUTH(0x0005), - - /** - * Started as device after authentication - */ - DEV_END_DEVICE(0x0006), - - /** - * Device joined, authenticated and is a router - */ - DEV_ROUTER(0x0007), - - /** - * Starting as Zigbee Coordinator - */ - DEV_COORD_STARTING(0x0008), - - /** - * Started as Zigbee Coordinator - */ - DEV_ZB_COORD(0x0009), - - /** - * Device has lost information about its parent - */ - DEV_NWK_ORPHAN(0x000A); - - /** - * A mapping between the integer code and its corresponding type to - * facilitate lookup by code. - */ - private static Map codeMapping; - - private int key; - - static { - codeMapping = new HashMap(); - for (ZstackZdoState s : values()) { - codeMapping.put(s.key, s); - } - } - - private ZstackZdoState(int key) { - this.key = key; - } - - /** - * Lookup function based on the type code. Returns null if the code does not exist. - * - * @param code the code to lookup - * @return enumeration value of the alarm type. - */ - public static ZstackZdoState valueOf(int code) { - if (codeMapping.get(code) == null) { - return UNKNOWN; - } - - return codeMapping.get(code); - } - - /** - * Returns the Z-Stack protocol defined value for this enumeration. - * - * @return the Z-Stack protocol key - */ - public int getKey() { - return key; - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.sys; + +import java.util.HashMap; +import java.util.Map; + +/** + * Class to implement the Z-Stack Enumeration ZstackZdoState. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + * + * @author Chris Jackson + */ +public enum ZstackZdoState { + /** + * Default unknown value + */ + UNKNOWN(-1), + + /** + * Initialized - not started automatically + */ + DEV_HOLD(0x0000), + + /** + * Initialized - not connected to anything + */ + DEV_INIT(0x0001), + + /** + * Discovering PAN's to join + */ + DEV_NWK_DISC(0x0002), + + /** + * Joining a PAN + */ + DEV_NWK_JOINING(0x0003), + + /** + * ReJoining a PAN, only for end devices + */ + DEV_NWK_REJOIN(0x0004), + + /** + * Joined but not yet authenticated by trust center + */ + DEV_END_DEVICE_UNAUTH(0x0005), + + /** + * Started as device after authentication + */ + DEV_END_DEVICE(0x0006), + + /** + * Device joined, authenticated and is a router + */ + DEV_ROUTER(0x0007), + + /** + * Starting as Zigbee Coordinator + */ + DEV_COORD_STARTING(0x0008), + + /** + * Started as Zigbee Coordinator + */ + DEV_ZB_COORD(0x0009), + + /** + * Device has lost information about its parent + */ + DEV_NWK_ORPHAN(0x000A); + + /** + * A mapping between the integer code and its corresponding type to + * facilitate lookup by code. + */ + private static Map codeMapping; + + private int key; + + static { + codeMapping = new HashMap(); + for (ZstackZdoState s : values()) { + codeMapping.put(s.key, s); + } + } + + private ZstackZdoState(int key) { + this.key = key; + } + + /** + * Lookup function based on the type code. Returns null if the code does not exist. + * + * @param code the code to lookup + * @return enumeration value of the alarm type. + */ + public static ZstackZdoState valueOf(int code) { + if (codeMapping.get(code) == null) { + return UNKNOWN; + } + + return codeMapping.get(code); + } + + /** + * Returns the Z-Stack protocol defined value for this enumeration. + * + * @return the Z-Stack protocol key + */ + public int getKey() { + return key; + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilApsmeLinkKeyDataGetSreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilApsmeLinkKeyDataGetSreq.java index 0ea069c31..ab379f009 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilApsmeLinkKeyDataGetSreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilApsmeLinkKeyDataGetSreq.java @@ -1,78 +1,79 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.util; - -import com.zsmartsystems.zigbee.IeeeAddress; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; - -/** - * Class to implement the Z-Stack command UTIL_APSME_LINK_KEY_DATA_GET. - *

- * This command retrieves APS link key data, Tx and Rx frame counters. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackUtilApsmeLinkKeyDataGetSreq extends ZstackFrameRequest { - - /** - * The extended address for which to get the link key data. - */ - private IeeeAddress extAddr; - - /** - * Request constructor - */ - public ZstackUtilApsmeLinkKeyDataGetSreq() { - synchronousCommand = true; - } - - /** - * The extended address for which to get the link key data. - * - * @return the current extAddr as {@link IeeeAddress} - */ - public IeeeAddress getExtAddr() { - return extAddr; - } - - /** - * The extended address for which to get the link key data. - * - * @param extAddr the ExtAddr to set as {@link IeeeAddress} - */ - public void setExtAddr(IeeeAddress extAddr) { - this.extAddr = extAddr; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_UTIL) && (response.getReqCmd1() == 0x44)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_UTIL, 0x44); - - // Serialize the fields - serializer.serializeIeeeAddress(extAddr); - return getPayload(); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(61); - builder.append("ZstackUtilApsmeLinkKeyDataGetSreq [extAddr="); - builder.append(extAddr); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.util; + +import com.zsmartsystems.zigbee.IeeeAddress; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command UTIL_APSME_LINK_KEY_DATA_GET. + *

+ * This command retrieves APS link key data, Tx and Rx frame counters. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackUtilApsmeLinkKeyDataGetSreq extends ZstackFrameRequest { + + /** + * The extended address for which to get the link key data. + */ + private IeeeAddress extAddr; + + /** + * Request constructor + */ + public ZstackUtilApsmeLinkKeyDataGetSreq() { + synchronousCommand = true; + } + + /** + * The extended address for which to get the link key data. + * + * @return the current extAddr as {@link IeeeAddress} + */ + public IeeeAddress getExtAddr() { + return extAddr; + } + + /** + * The extended address for which to get the link key data. + * + * @param extAddr the ExtAddr to set as {@link IeeeAddress} + */ + public void setExtAddr(IeeeAddress extAddr) { + this.extAddr = extAddr; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_UTIL) && (response.getReqCmd1() == 0x44)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_UTIL, 0x44); + + // Serialize the fields + serializer.serializeIeeeAddress(extAddr); + return getPayload(); + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(61); + builder.append("ZstackUtilApsmeLinkKeyDataGetSreq [extAddr="); + builder.append(extAddr); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilApsmeLinkKeyDataGetSrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilApsmeLinkKeyDataGetSrsp.java index 2bdef2a99..f8a7bcef9 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilApsmeLinkKeyDataGetSrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilApsmeLinkKeyDataGetSrsp.java @@ -1,147 +1,148 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.util; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; -import com.zsmartsystems.zigbee.security.ZigBeeKey; - -/** - * Class to implement the Z-Stack command UTIL_APSME_LINK_KEY_DATA_GET. - *

- * This command retrieves APS link key data, Tx and Rx frame counters. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackUtilApsmeLinkKeyDataGetSrsp extends ZstackFrameResponse { - - /** - * The ZStatus_t returned by the proxy call to APSME_LinkKeyNVIdGet(). - */ - private ZstackResponseCode status; - - /** - * On success, the security key looked up; otherwise N/A. - */ - private ZigBeeKey secKey; - - /** - * On success, the TX frame counter; otherwise N/A. - */ - private int txFrmCntr; - - /** - * On success, the RX frame counter; otherwise N/A. - */ - private int rxFrmCntr; - - /** - * Response and Handler constructor - */ - public ZstackUtilApsmeLinkKeyDataGetSrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); - secKey = deserializer.deserializeZigBeeKey(); - txFrmCntr = deserializer.deserializeUInt32(); - rxFrmCntr = deserializer.deserializeUInt32(); - } - - /** - * The ZStatus_t returned by the proxy call to APSME_LinkKeyNVIdGet(). - * - * @return the current status as {@link ZstackResponseCode} - */ - public ZstackResponseCode getStatus() { - return status; - } - - /** - * The ZStatus_t returned by the proxy call to APSME_LinkKeyNVIdGet(). - * - * @param status the Status to set as {@link ZstackResponseCode} - */ - public void setStatus(ZstackResponseCode status) { - this.status = status; - } - - /** - * On success, the security key looked up; otherwise N/A. - * - * @return the current secKey as {@link ZigBeeKey} - */ - public ZigBeeKey getSecKey() { - return secKey; - } - - /** - * On success, the security key looked up; otherwise N/A. - * - * @param secKey the SecKey to set as {@link ZigBeeKey} - */ - public void setSecKey(ZigBeeKey secKey) { - this.secKey = secKey; - } - - /** - * On success, the TX frame counter; otherwise N/A. - * - * @return the current txFrmCntr as {@link int} - */ - public int getTxFrmCntr() { - return txFrmCntr; - } - - /** - * On success, the TX frame counter; otherwise N/A. - * - * @param txFrmCntr the TxFrmCntr to set as {@link int} - */ - public void setTxFrmCntr(int txFrmCntr) { - this.txFrmCntr = txFrmCntr; - } - - /** - * On success, the RX frame counter; otherwise N/A. - * - * @return the current rxFrmCntr as {@link int} - */ - public int getRxFrmCntr() { - return rxFrmCntr; - } - - /** - * On success, the RX frame counter; otherwise N/A. - * - * @param rxFrmCntr the RxFrmCntr to set as {@link int} - */ - public void setRxFrmCntr(int rxFrmCntr) { - this.rxFrmCntr = rxFrmCntr; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(136); - builder.append("ZstackUtilApsmeLinkKeyDataGetSrsp [status="); - builder.append(status); - builder.append(", secKey="); - builder.append(secKey); - builder.append(", txFrmCntr="); - builder.append(String.format("%08X", txFrmCntr)); - builder.append(", rxFrmCntr="); - builder.append(String.format("%08X", rxFrmCntr)); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.util; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; +import com.zsmartsystems.zigbee.security.ZigBeeKey; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command UTIL_APSME_LINK_KEY_DATA_GET. + *

+ * This command retrieves APS link key data, Tx and Rx frame counters. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackUtilApsmeLinkKeyDataGetSrsp extends ZstackFrameResponse { + + /** + * The ZStatus_t returned by the proxy call to APSME_LinkKeyNVIdGet(). + */ + private ZstackResponseCode status; + + /** + * On success, the security key looked up; otherwise N/A. + */ + private ZigBeeKey secKey; + + /** + * On success, the TX frame counter; otherwise N/A. + */ + private int txFrmCntr; + + /** + * On success, the RX frame counter; otherwise N/A. + */ + private int rxFrmCntr; + + /** + * Response and Handler constructor + */ + public ZstackUtilApsmeLinkKeyDataGetSrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); + secKey = deserializer.deserializeZigBeeKey(); + txFrmCntr = deserializer.deserializeUInt32(); + rxFrmCntr = deserializer.deserializeUInt32(); + } + + /** + * The ZStatus_t returned by the proxy call to APSME_LinkKeyNVIdGet(). + * + * @return the current status as {@link ZstackResponseCode} + */ + public ZstackResponseCode getStatus() { + return status; + } + + /** + * The ZStatus_t returned by the proxy call to APSME_LinkKeyNVIdGet(). + * + * @param status the Status to set as {@link ZstackResponseCode} + */ + public void setStatus(ZstackResponseCode status) { + this.status = status; + } + + /** + * On success, the security key looked up; otherwise N/A. + * + * @return the current secKey as {@link ZigBeeKey} + */ + public ZigBeeKey getSecKey() { + return secKey; + } + + /** + * On success, the security key looked up; otherwise N/A. + * + * @param secKey the SecKey to set as {@link ZigBeeKey} + */ + public void setSecKey(ZigBeeKey secKey) { + this.secKey = secKey; + } + + /** + * On success, the TX frame counter; otherwise N/A. + * + * @return the current txFrmCntr as {@link int} + */ + public int getTxFrmCntr() { + return txFrmCntr; + } + + /** + * On success, the TX frame counter; otherwise N/A. + * + * @param txFrmCntr the TxFrmCntr to set as {@link int} + */ + public void setTxFrmCntr(int txFrmCntr) { + this.txFrmCntr = txFrmCntr; + } + + /** + * On success, the RX frame counter; otherwise N/A. + * + * @return the current rxFrmCntr as {@link int} + */ + public int getRxFrmCntr() { + return rxFrmCntr; + } + + /** + * On success, the RX frame counter; otherwise N/A. + * + * @param rxFrmCntr the RxFrmCntr to set as {@link int} + */ + public void setRxFrmCntr(int rxFrmCntr) { + this.rxFrmCntr = rxFrmCntr; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(136); + builder.append("ZstackUtilApsmeLinkKeyDataGetSrsp [status="); + builder.append(status); + builder.append(", secKey="); + builder.append(secKey); + builder.append(", txFrmCntr="); + builder.append(String.format("%08X", txFrmCntr)); + builder.append(", rxFrmCntr="); + builder.append(String.format("%08X", rxFrmCntr)); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilApsmeLinkKeyNvIdGetSreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilApsmeLinkKeyNvIdGetSreq.java index 8f1b1d023..61751a1a0 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilApsmeLinkKeyNvIdGetSreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilApsmeLinkKeyNvIdGetSreq.java @@ -1,78 +1,79 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.util; - -import com.zsmartsystems.zigbee.IeeeAddress; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; - -/** - * Class to implement the Z-Stack command UTIL_APSME_LINK_KEY_NV_ID_GET. - *

- * This command is a proxy call to the APSME_LinkKeyNvIdGet() function. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackUtilApsmeLinkKeyNvIdGetSreq extends ZstackFrameRequest { - - /** - * The extended address for which to get the link key NV Id. - */ - private IeeeAddress extAddr; - - /** - * Request constructor - */ - public ZstackUtilApsmeLinkKeyNvIdGetSreq() { - synchronousCommand = true; - } - - /** - * The extended address for which to get the link key NV Id. - * - * @return the current extAddr as {@link IeeeAddress} - */ - public IeeeAddress getExtAddr() { - return extAddr; - } - - /** - * The extended address for which to get the link key NV Id. - * - * @param extAddr the ExtAddr to set as {@link IeeeAddress} - */ - public void setExtAddr(IeeeAddress extAddr) { - this.extAddr = extAddr; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_UTIL) && (response.getReqCmd1() == 0x45)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_UTIL, 0x45); - - // Serialize the fields - serializer.serializeIeeeAddress(extAddr); - return getPayload(); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(61); - builder.append("ZstackUtilApsmeLinkKeyNvIdGetSreq [extAddr="); - builder.append(extAddr); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.util; + +import com.zsmartsystems.zigbee.IeeeAddress; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command UTIL_APSME_LINK_KEY_NV_ID_GET. + *

+ * This command is a proxy call to the APSME_LinkKeyNvIdGet() function. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackUtilApsmeLinkKeyNvIdGetSreq extends ZstackFrameRequest { + + /** + * The extended address for which to get the link key NV Id. + */ + private IeeeAddress extAddr; + + /** + * Request constructor + */ + public ZstackUtilApsmeLinkKeyNvIdGetSreq() { + synchronousCommand = true; + } + + /** + * The extended address for which to get the link key NV Id. + * + * @return the current extAddr as {@link IeeeAddress} + */ + public IeeeAddress getExtAddr() { + return extAddr; + } + + /** + * The extended address for which to get the link key NV Id. + * + * @param extAddr the ExtAddr to set as {@link IeeeAddress} + */ + public void setExtAddr(IeeeAddress extAddr) { + this.extAddr = extAddr; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_UTIL) && (response.getReqCmd1() == 0x45)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_UTIL, 0x45); + + // Serialize the fields + serializer.serializeIeeeAddress(extAddr); + return getPayload(); + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(61); + builder.append("ZstackUtilApsmeLinkKeyNvIdGetSreq [extAddr="); + builder.append(extAddr); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilApsmeLinkKeyNvIdGetSrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilApsmeLinkKeyNvIdGetSrsp.java index 294aa355c..d4d97a1fd 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilApsmeLinkKeyNvIdGetSrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilApsmeLinkKeyNvIdGetSrsp.java @@ -1,94 +1,95 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.util; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; - -/** - * Class to implement the Z-Stack command UTIL_APSME_LINK_KEY_NV_ID_GET. - *

- * This command is a proxy call to the APSME_LinkKeyNvIdGet() function. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackUtilApsmeLinkKeyNvIdGetSrsp extends ZstackFrameResponse { - - /** - * The ZStatus_t returned by the proxy call to APSME_LinkKeyNVIdGet(). - */ - private ZstackResponseCode status; - - /** - * On success, link key NV ID. Otherwise 0xFFFF - */ - private int linkKeyNvId; - - /** - * Response and Handler constructor - */ - public ZstackUtilApsmeLinkKeyNvIdGetSrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); - linkKeyNvId = deserializer.deserializeUInt16(); - } - - /** - * The ZStatus_t returned by the proxy call to APSME_LinkKeyNVIdGet(). - * - * @return the current status as {@link ZstackResponseCode} - */ - public ZstackResponseCode getStatus() { - return status; - } - - /** - * The ZStatus_t returned by the proxy call to APSME_LinkKeyNVIdGet(). - * - * @param status the Status to set as {@link ZstackResponseCode} - */ - public void setStatus(ZstackResponseCode status) { - this.status = status; - } - - /** - * On success, link key NV ID. Otherwise 0xFFFF - * - * @return the current linkKeyNvId as {@link int} - */ - public int getLinkKeyNvId() { - return linkKeyNvId; - } - - /** - * On success, link key NV ID. Otherwise 0xFFFF - * - * @param linkKeyNvId the LinkKeyNvId to set as {@link int} - */ - public void setLinkKeyNvId(int linkKeyNvId) { - this.linkKeyNvId = linkKeyNvId; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(86); - builder.append("ZstackUtilApsmeLinkKeyNvIdGetSrsp [status="); - builder.append(status); - builder.append(", linkKeyNvId="); - builder.append(linkKeyNvId); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.util; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command UTIL_APSME_LINK_KEY_NV_ID_GET. + *

+ * This command is a proxy call to the APSME_LinkKeyNvIdGet() function. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackUtilApsmeLinkKeyNvIdGetSrsp extends ZstackFrameResponse { + + /** + * The ZStatus_t returned by the proxy call to APSME_LinkKeyNVIdGet(). + */ + private ZstackResponseCode status; + + /** + * On success, link key NV ID. Otherwise 0xFFFF + */ + private int linkKeyNvId; + + /** + * Response and Handler constructor + */ + public ZstackUtilApsmeLinkKeyNvIdGetSrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); + linkKeyNvId = deserializer.deserializeUInt16(); + } + + /** + * The ZStatus_t returned by the proxy call to APSME_LinkKeyNVIdGet(). + * + * @return the current status as {@link ZstackResponseCode} + */ + public ZstackResponseCode getStatus() { + return status; + } + + /** + * The ZStatus_t returned by the proxy call to APSME_LinkKeyNVIdGet(). + * + * @param status the Status to set as {@link ZstackResponseCode} + */ + public void setStatus(ZstackResponseCode status) { + this.status = status; + } + + /** + * On success, link key NV ID. Otherwise 0xFFFF + * + * @return the current linkKeyNvId as {@link int} + */ + public int getLinkKeyNvId() { + return linkKeyNvId; + } + + /** + * On success, link key NV ID. Otherwise 0xFFFF + * + * @param linkKeyNvId the LinkKeyNvId to set as {@link int} + */ + public void setLinkKeyNvId(int linkKeyNvId) { + this.linkKeyNvId = linkKeyNvId; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(86); + builder.append("ZstackUtilApsmeLinkKeyNvIdGetSrsp [status="); + builder.append(status); + builder.append(", linkKeyNvId="); + builder.append(linkKeyNvId); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilGetDeviceInfoSreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilGetDeviceInfoSreq.java index 631198132..8f8696dfe 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilGetDeviceInfoSreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilGetDeviceInfoSreq.java @@ -1,49 +1,50 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.util; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; - -/** - * Class to implement the Z-Stack command UTIL_GET_DEVICE_INFO. - *

- * This command is used to retrieve the device info. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackUtilGetDeviceInfoSreq extends ZstackFrameRequest { - - /** - * Request constructor - */ - public ZstackUtilGetDeviceInfoSreq() { - synchronousCommand = true; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_UTIL) && (response.getReqCmd1() == 0x00)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_UTIL, 0x00); - - // Serialize the fields - return getPayload(); - } - - @Override - public String toString() { - return "ZstackUtilGetDeviceInfoSreq []"; - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.util; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command UTIL_GET_DEVICE_INFO. + *

+ * This command is used to retrieve the device info. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackUtilGetDeviceInfoSreq extends ZstackFrameRequest { + + /** + * Request constructor + */ + public ZstackUtilGetDeviceInfoSreq() { + synchronousCommand = true; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_UTIL) && (response.getReqCmd1() == 0x00)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_UTIL, 0x00); + + // Serialize the fields + return getPayload(); + } + + @Override + public String toString() { + return "ZstackUtilGetDeviceInfoSreq []"; + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilGetDeviceInfoSrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilGetDeviceInfoSrsp.java index 17e3f7bd3..bd2cacd6a 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilGetDeviceInfoSrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilGetDeviceInfoSrsp.java @@ -1,212 +1,213 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.util; - -import com.zsmartsystems.zigbee.IeeeAddress; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; -import com.zsmartsystems.zigbee.dongle.zstack.api.sys.ZstackZdoState; - -/** - * Class to implement the Z-Stack command UTIL_GET_DEVICE_INFO. - *

- * This command is used to retrieve the device info. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackUtilGetDeviceInfoSrsp extends ZstackFrameResponse { - - /** - * Status is a one byte field and is either success(0) or fail(1). The fail status is returned if the address value in the command - * message was not within the valid range. - */ - private ZstackResponseCode status; - - /** - * IEEE address of the device. - */ - private IeeeAddress ieeeAddress; - - /** - * Short address of the device. - */ - private int shortAddr; - - /** - * Indicates device type, where bits 0 to 2 indicate the capability for the device to operate as a coordinator, router, or end - * device, respectively. - */ - private int deviceType; - - /** - * Indicates the state of the device. - */ - private ZstackZdoState deviceState; - - /** - * Array of 16-bits specifies the network address associated with the device. - */ - private int[] assocDevicesList; - - /** - * Response and Handler constructor - */ - public ZstackUtilGetDeviceInfoSrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); - ieeeAddress = deserializer.deserializeIeeeAddress(); - shortAddr = deserializer.deserializeUInt16(); - deviceType = deserializer.deserializeUInt8(); - deviceState = ZstackZdoState.valueOf(deserializer.deserializeUInt8()); - int numAssocDevices = deserializer.deserializeUInt8(); - assocDevicesList = deserializer.deserializeUInt16Array(numAssocDevices); - } - - /** - * Status is a one byte field and is either success(0) or fail(1). The fail status is returned if the address value in the command - * message was not within the valid range. - * - * @return the current status as {@link ZstackResponseCode} - */ - public ZstackResponseCode getStatus() { - return status; - } - - /** - * Status is a one byte field and is either success(0) or fail(1). The fail status is returned if the address value in the command - * message was not within the valid range. - * - * @param status the Status to set as {@link ZstackResponseCode} - */ - public void setStatus(ZstackResponseCode status) { - this.status = status; - } - - /** - * IEEE address of the device. - * - * @return the current ieeeAddress as {@link IeeeAddress} - */ - public IeeeAddress getIeeeAddress() { - return ieeeAddress; - } - - /** - * IEEE address of the device. - * - * @param ieeeAddress the IeeeAddress to set as {@link IeeeAddress} - */ - public void setIeeeAddress(IeeeAddress ieeeAddress) { - this.ieeeAddress = ieeeAddress; - } - - /** - * Short address of the device. - * - * @return the current shortAddr as {@link int} - */ - public int getShortAddr() { - return shortAddr; - } - - /** - * Short address of the device. - * - * @param shortAddr the ShortAddr to set as {@link int} - */ - public void setShortAddr(int shortAddr) { - this.shortAddr = shortAddr; - } - - /** - * Indicates device type, where bits 0 to 2 indicate the capability for the device to operate as a coordinator, router, or end - * device, respectively. - * - * @return the current deviceType as {@link int} - */ - public int getDeviceType() { - return deviceType; - } - - /** - * Indicates device type, where bits 0 to 2 indicate the capability for the device to operate as a coordinator, router, or end - * device, respectively. - * - * @param deviceType the DeviceType to set as {@link int} - */ - public void setDeviceType(int deviceType) { - this.deviceType = deviceType; - } - - /** - * Indicates the state of the device. - * - * @return the current deviceState as {@link ZstackZdoState} - */ - public ZstackZdoState getDeviceState() { - return deviceState; - } - - /** - * Indicates the state of the device. - * - * @param deviceState the DeviceState to set as {@link ZstackZdoState} - */ - public void setDeviceState(ZstackZdoState deviceState) { - this.deviceState = deviceState; - } - - /** - * Array of 16-bits specifies the network address associated with the device. - * - * @return the current assocDevicesList as {@link int[]} - */ - public int[] getAssocDevicesList() { - return assocDevicesList; - } - - /** - * Array of 16-bits specifies the network address associated with the device. - * - * @param assocDevicesList the AssocDevicesList to set as {@link int[]} - */ - public void setAssocDevicesList(int[] assocDevicesList) { - this.assocDevicesList = assocDevicesList; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(205); - builder.append("ZstackUtilGetDeviceInfoSrsp [status="); - builder.append(status); - builder.append(", ieeeAddress="); - builder.append(ieeeAddress); - builder.append(", shortAddr="); - builder.append(String.format("%04X", shortAddr)); - builder.append(", deviceType="); - builder.append(deviceType); - builder.append(", deviceState="); - builder.append(deviceState); - builder.append(", assocDevicesList="); - for (int c = 0; c < assocDevicesList.length; c++) { - if (c > 0) { - builder.append(' '); - } - builder.append(String.format("%02X", assocDevicesList[c])); - } - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.util; + +import com.zsmartsystems.zigbee.IeeeAddress; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; +import com.zsmartsystems.zigbee.dongle.zstack.api.sys.ZstackZdoState; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command UTIL_GET_DEVICE_INFO. + *

+ * This command is used to retrieve the device info. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackUtilGetDeviceInfoSrsp extends ZstackFrameResponse { + + /** + * Status is a one byte field and is either success(0) or fail(1). The fail status is returned if the address value in the command + * message was not within the valid range. + */ + private ZstackResponseCode status; + + /** + * IEEE address of the device. + */ + private IeeeAddress ieeeAddress; + + /** + * Short address of the device. + */ + private int shortAddr; + + /** + * Indicates device type, where bits 0 to 2 indicate the capability for the device to operate as a coordinator, router, or end + * device, respectively. + */ + private int deviceType; + + /** + * Indicates the state of the device. + */ + private ZstackZdoState deviceState; + + /** + * Array of 16-bits specifies the network address associated with the device. + */ + private int[] assocDevicesList; + + /** + * Response and Handler constructor + */ + public ZstackUtilGetDeviceInfoSrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); + ieeeAddress = deserializer.deserializeIeeeAddress(); + shortAddr = deserializer.deserializeUInt16(); + deviceType = deserializer.deserializeUInt8(); + deviceState = ZstackZdoState.valueOf(deserializer.deserializeUInt8()); + int numAssocDevices = deserializer.deserializeUInt8(); + assocDevicesList = deserializer.deserializeUInt16Array(numAssocDevices); + } + + /** + * Status is a one byte field and is either success(0) or fail(1). The fail status is returned if the address value in the command + * message was not within the valid range. + * + * @return the current status as {@link ZstackResponseCode} + */ + public ZstackResponseCode getStatus() { + return status; + } + + /** + * Status is a one byte field and is either success(0) or fail(1). The fail status is returned if the address value in the command + * message was not within the valid range. + * + * @param status the Status to set as {@link ZstackResponseCode} + */ + public void setStatus(ZstackResponseCode status) { + this.status = status; + } + + /** + * IEEE address of the device. + * + * @return the current ieeeAddress as {@link IeeeAddress} + */ + public IeeeAddress getIeeeAddress() { + return ieeeAddress; + } + + /** + * IEEE address of the device. + * + * @param ieeeAddress the IeeeAddress to set as {@link IeeeAddress} + */ + public void setIeeeAddress(IeeeAddress ieeeAddress) { + this.ieeeAddress = ieeeAddress; + } + + /** + * Short address of the device. + * + * @return the current shortAddr as {@link int} + */ + public int getShortAddr() { + return shortAddr; + } + + /** + * Short address of the device. + * + * @param shortAddr the ShortAddr to set as {@link int} + */ + public void setShortAddr(int shortAddr) { + this.shortAddr = shortAddr; + } + + /** + * Indicates device type, where bits 0 to 2 indicate the capability for the device to operate as a coordinator, router, or end + * device, respectively. + * + * @return the current deviceType as {@link int} + */ + public int getDeviceType() { + return deviceType; + } + + /** + * Indicates device type, where bits 0 to 2 indicate the capability for the device to operate as a coordinator, router, or end + * device, respectively. + * + * @param deviceType the DeviceType to set as {@link int} + */ + public void setDeviceType(int deviceType) { + this.deviceType = deviceType; + } + + /** + * Indicates the state of the device. + * + * @return the current deviceState as {@link ZstackZdoState} + */ + public ZstackZdoState getDeviceState() { + return deviceState; + } + + /** + * Indicates the state of the device. + * + * @param deviceState the DeviceState to set as {@link ZstackZdoState} + */ + public void setDeviceState(ZstackZdoState deviceState) { + this.deviceState = deviceState; + } + + /** + * Array of 16-bits specifies the network address associated with the device. + * + * @return the current assocDevicesList as {@link int[]} + */ + public int[] getAssocDevicesList() { + return assocDevicesList; + } + + /** + * Array of 16-bits specifies the network address associated with the device. + * + * @param assocDevicesList the AssocDevicesList to set as {@link int[]} + */ + public void setAssocDevicesList(int[] assocDevicesList) { + this.assocDevicesList = assocDevicesList; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(205); + builder.append("ZstackUtilGetDeviceInfoSrsp [status="); + builder.append(status); + builder.append(", ieeeAddress="); + builder.append(ieeeAddress); + builder.append(", shortAddr="); + builder.append(String.format("%04X", shortAddr)); + builder.append(", deviceType="); + builder.append(deviceType); + builder.append(", deviceState="); + builder.append(deviceState); + builder.append(", assocDevicesList="); + for (int c = 0; c < assocDevicesList.length; c++) { + if (c > 0) { + builder.append(' '); + } + builder.append(String.format("%02X", assocDevicesList[c])); + } + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilGetNvInfoSreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilGetNvInfoSreq.java index ee95ed1b7..397a95163 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilGetNvInfoSreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilGetNvInfoSreq.java @@ -1,49 +1,50 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.util; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; - -/** - * Class to implement the Z-Stack command UTIL_GET_NV_INFO. - *

- * This command is used to read a block of parameters from non-volatile storage of the target device. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackUtilGetNvInfoSreq extends ZstackFrameRequest { - - /** - * Request constructor - */ - public ZstackUtilGetNvInfoSreq() { - synchronousCommand = true; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_UTIL) && (response.getReqCmd1() == 0x01)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_UTIL, 0x01); - - // Serialize the fields - return getPayload(); - } - - @Override - public String toString() { - return "ZstackUtilGetNvInfoSreq []"; - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.util; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command UTIL_GET_NV_INFO. + *

+ * This command is used to read a block of parameters from non-volatile storage of the target device. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackUtilGetNvInfoSreq extends ZstackFrameRequest { + + /** + * Request constructor + */ + public ZstackUtilGetNvInfoSreq() { + synchronousCommand = true; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_UTIL) && (response.getReqCmd1() == 0x01)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_UTIL, 0x01); + + // Serialize the fields + return getPayload(); + } + + @Override + public String toString() { + return "ZstackUtilGetNvInfoSreq []"; + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilGetNvInfoSrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilGetNvInfoSrsp.java index 2bae41e7b..a1c7a7e3d 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilGetNvInfoSrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilGetNvInfoSrsp.java @@ -1,205 +1,206 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.util; - -import com.zsmartsystems.zigbee.IeeeAddress; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; -import com.zsmartsystems.zigbee.security.ZigBeeKey; - -/** - * Class to implement the Z-Stack command UTIL_GET_NV_INFO. - *

- * This command is used to read a block of parameters from non-volatile storage of the target device. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackUtilGetNvInfoSrsp extends ZstackFrameResponse { - - /** - * A value of zero indicates success. Failure is indicated by a non-zero value, representing a bit mask of each item that failed to be - * retrieved from NV memory. Bit0 is used for the first item (IEEEAddress), bit1 for the second item (ScanChannels), and so forth. - * Data values for failed items are returned as one or more bytes of 0xFF, the typical value read from erased NV memory. - */ - private int status; - - /** - * IEEE address of the device. - */ - private IeeeAddress ieeeAddress; - - /** - * This represents a bit-mask of channels to be scanned when starting the device. - */ - private int scanChannels; - - /** - * Specifies the Pan Id to start or join. Set to 0xFFFF to select a PAN after scanning. - */ - private int panId; - - /** - * This specifies the network messaging security level, zero disables security. - */ - private int securityLevel; - - /** - * This specifies the pre-configured security key. - */ - private ZigBeeKey preConfigKey; - - /** - * Response and Handler constructor - */ - public ZstackUtilGetNvInfoSrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - status = deserializer.deserializeUInt8(); - ieeeAddress = deserializer.deserializeIeeeAddress(); - scanChannels = deserializer.deserializeUInt32(); - panId = deserializer.deserializeUInt16(); - securityLevel = deserializer.deserializeUInt8(); - preConfigKey = deserializer.deserializeZigBeeKey(); - } - - /** - * A value of zero indicates success. Failure is indicated by a non-zero value, representing a bit mask of each item that failed to be - * retrieved from NV memory. Bit0 is used for the first item (IEEEAddress), bit1 for the second item (ScanChannels), and so forth. - * Data values for failed items are returned as one or more bytes of 0xFF, the typical value read from erased NV memory. - * - * @return the current status as {@link int} - */ - public int getStatus() { - return status; - } - - /** - * A value of zero indicates success. Failure is indicated by a non-zero value, representing a bit mask of each item that failed to be - * retrieved from NV memory. Bit0 is used for the first item (IEEEAddress), bit1 for the second item (ScanChannels), and so forth. - * Data values for failed items are returned as one or more bytes of 0xFF, the typical value read from erased NV memory. - * - * @param status the Status to set as {@link int} - */ - public void setStatus(int status) { - this.status = status; - } - - /** - * IEEE address of the device. - * - * @return the current ieeeAddress as {@link IeeeAddress} - */ - public IeeeAddress getIeeeAddress() { - return ieeeAddress; - } - - /** - * IEEE address of the device. - * - * @param ieeeAddress the IeeeAddress to set as {@link IeeeAddress} - */ - public void setIeeeAddress(IeeeAddress ieeeAddress) { - this.ieeeAddress = ieeeAddress; - } - - /** - * This represents a bit-mask of channels to be scanned when starting the device. - * - * @return the current scanChannels as {@link int} - */ - public int getScanChannels() { - return scanChannels; - } - - /** - * This represents a bit-mask of channels to be scanned when starting the device. - * - * @param scanChannels the ScanChannels to set as {@link int} - */ - public void setScanChannels(int scanChannels) { - this.scanChannels = scanChannels; - } - - /** - * Specifies the Pan Id to start or join. Set to 0xFFFF to select a PAN after scanning. - * - * @return the current panId as {@link int} - */ - public int getPanId() { - return panId; - } - - /** - * Specifies the Pan Id to start or join. Set to 0xFFFF to select a PAN after scanning. - * - * @param panId the PanId to set as {@link int} - */ - public void setPanId(int panId) { - this.panId = panId; - } - - /** - * This specifies the network messaging security level, zero disables security. - * - * @return the current securityLevel as {@link int} - */ - public int getSecurityLevel() { - return securityLevel; - } - - /** - * This specifies the network messaging security level, zero disables security. - * - * @param securityLevel the SecurityLevel to set as {@link int} - */ - public void setSecurityLevel(int securityLevel) { - this.securityLevel = securityLevel; - } - - /** - * This specifies the pre-configured security key. - * - * @return the current preConfigKey as {@link ZigBeeKey} - */ - public ZigBeeKey getPreConfigKey() { - return preConfigKey; - } - - /** - * This specifies the pre-configured security key. - * - * @param preConfigKey the PreConfigKey to set as {@link ZigBeeKey} - */ - public void setPreConfigKey(ZigBeeKey preConfigKey) { - this.preConfigKey = preConfigKey; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(176); - builder.append("ZstackUtilGetNvInfoSrsp [status="); - builder.append(status); - builder.append(", ieeeAddress="); - builder.append(ieeeAddress); - builder.append(", scanChannels="); - builder.append(scanChannels); - builder.append(", panId="); - builder.append(String.format("%04X", panId)); - builder.append(", securityLevel="); - builder.append(securityLevel); - builder.append(", preConfigKey="); - builder.append(preConfigKey); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.util; + +import com.zsmartsystems.zigbee.IeeeAddress; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import com.zsmartsystems.zigbee.security.ZigBeeKey; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command UTIL_GET_NV_INFO. + *

+ * This command is used to read a block of parameters from non-volatile storage of the target device. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackUtilGetNvInfoSrsp extends ZstackFrameResponse { + + /** + * A value of zero indicates success. Failure is indicated by a non-zero value, representing a bit mask of each item that failed to be + * retrieved from NV memory. Bit0 is used for the first item (IEEEAddress), bit1 for the second item (ScanChannels), and so forth. + * Data values for failed items are returned as one or more bytes of 0xFF, the typical value read from erased NV memory. + */ + private int status; + + /** + * IEEE address of the device. + */ + private IeeeAddress ieeeAddress; + + /** + * This represents a bit-mask of channels to be scanned when starting the device. + */ + private int scanChannels; + + /** + * Specifies the Pan Id to start or join. Set to 0xFFFF to select a PAN after scanning. + */ + private int panId; + + /** + * This specifies the network messaging security level, zero disables security. + */ + private int securityLevel; + + /** + * This specifies the pre-configured security key. + */ + private ZigBeeKey preConfigKey; + + /** + * Response and Handler constructor + */ + public ZstackUtilGetNvInfoSrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + status = deserializer.deserializeUInt8(); + ieeeAddress = deserializer.deserializeIeeeAddress(); + scanChannels = deserializer.deserializeUInt32(); + panId = deserializer.deserializeUInt16(); + securityLevel = deserializer.deserializeUInt8(); + preConfigKey = deserializer.deserializeZigBeeKey(); + } + + /** + * A value of zero indicates success. Failure is indicated by a non-zero value, representing a bit mask of each item that failed to be + * retrieved from NV memory. Bit0 is used for the first item (IEEEAddress), bit1 for the second item (ScanChannels), and so forth. + * Data values for failed items are returned as one or more bytes of 0xFF, the typical value read from erased NV memory. + * + * @return the current status as {@link int} + */ + public int getStatus() { + return status; + } + + /** + * A value of zero indicates success. Failure is indicated by a non-zero value, representing a bit mask of each item that failed to be + * retrieved from NV memory. Bit0 is used for the first item (IEEEAddress), bit1 for the second item (ScanChannels), and so forth. + * Data values for failed items are returned as one or more bytes of 0xFF, the typical value read from erased NV memory. + * + * @param status the Status to set as {@link int} + */ + public void setStatus(int status) { + this.status = status; + } + + /** + * IEEE address of the device. + * + * @return the current ieeeAddress as {@link IeeeAddress} + */ + public IeeeAddress getIeeeAddress() { + return ieeeAddress; + } + + /** + * IEEE address of the device. + * + * @param ieeeAddress the IeeeAddress to set as {@link IeeeAddress} + */ + public void setIeeeAddress(IeeeAddress ieeeAddress) { + this.ieeeAddress = ieeeAddress; + } + + /** + * This represents a bit-mask of channels to be scanned when starting the device. + * + * @return the current scanChannels as {@link int} + */ + public int getScanChannels() { + return scanChannels; + } + + /** + * This represents a bit-mask of channels to be scanned when starting the device. + * + * @param scanChannels the ScanChannels to set as {@link int} + */ + public void setScanChannels(int scanChannels) { + this.scanChannels = scanChannels; + } + + /** + * Specifies the Pan Id to start or join. Set to 0xFFFF to select a PAN after scanning. + * + * @return the current panId as {@link int} + */ + public int getPanId() { + return panId; + } + + /** + * Specifies the Pan Id to start or join. Set to 0xFFFF to select a PAN after scanning. + * + * @param panId the PanId to set as {@link int} + */ + public void setPanId(int panId) { + this.panId = panId; + } + + /** + * This specifies the network messaging security level, zero disables security. + * + * @return the current securityLevel as {@link int} + */ + public int getSecurityLevel() { + return securityLevel; + } + + /** + * This specifies the network messaging security level, zero disables security. + * + * @param securityLevel the SecurityLevel to set as {@link int} + */ + public void setSecurityLevel(int securityLevel) { + this.securityLevel = securityLevel; + } + + /** + * This specifies the pre-configured security key. + * + * @return the current preConfigKey as {@link ZigBeeKey} + */ + public ZigBeeKey getPreConfigKey() { + return preConfigKey; + } + + /** + * This specifies the pre-configured security key. + * + * @param preConfigKey the PreConfigKey to set as {@link ZigBeeKey} + */ + public void setPreConfigKey(ZigBeeKey preConfigKey) { + this.preConfigKey = preConfigKey; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(176); + builder.append("ZstackUtilGetNvInfoSrsp [status="); + builder.append(status); + builder.append(", ieeeAddress="); + builder.append(ieeeAddress); + builder.append(", scanChannels="); + builder.append(scanChannels); + builder.append(", panId="); + builder.append(String.format("%04X", panId)); + builder.append(", securityLevel="); + builder.append(securityLevel); + builder.append(", preConfigKey="); + builder.append(preConfigKey); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilLedControlSreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilLedControlSreq.java index 2ced0c238..f8ee89812 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilLedControlSreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilLedControlSreq.java @@ -1,103 +1,104 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.util; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; - -/** - * Class to implement the Z-Stack command UTIL_LED_CONTROL. - *

- * This command is used by the tester to control the LEDs on the board. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackUtilLedControlSreq extends ZstackFrameRequest { - - /** - * The LED number. - */ - private int ledId; - - /** - * 0: OFF, 1: ON. - */ - private boolean mode; - - /** - * Request constructor - */ - public ZstackUtilLedControlSreq() { - synchronousCommand = true; - } - - /** - * The LED number. - * - * @return the current ledId as {@link int} - */ - public int getLedId() { - return ledId; - } - - /** - * The LED number. - * - * @param ledId the LedId to set as {@link int} - */ - public void setLedId(int ledId) { - this.ledId = ledId; - } - - /** - * 0: OFF, 1: ON. - * - * @return the current mode as {@link boolean} - */ - public boolean getMode() { - return mode; - } - - /** - * 0: OFF, 1: ON. - * - * @param mode the Mode to set as {@link boolean} - */ - public void setMode(boolean mode) { - this.mode = mode; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_UTIL) && (response.getReqCmd1() == 0x09)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_UTIL, 0x09); - - // Serialize the fields - serializer.serializeUInt8(ledId); - serializer.serializeBoolean(mode); - return getPayload(); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(77); - builder.append("ZstackUtilLedControlSreq [ledId="); - builder.append(ledId); - builder.append(", mode="); - builder.append(mode); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.util; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command UTIL_LED_CONTROL. + *

+ * This command is used by the tester to control the LEDs on the board. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackUtilLedControlSreq extends ZstackFrameRequest { + + /** + * The LED number. + */ + private int ledId; + + /** + * 0: OFF, 1: ON. + */ + private boolean mode; + + /** + * Request constructor + */ + public ZstackUtilLedControlSreq() { + synchronousCommand = true; + } + + /** + * The LED number. + * + * @return the current ledId as {@link int} + */ + public int getLedId() { + return ledId; + } + + /** + * The LED number. + * + * @param ledId the LedId to set as {@link int} + */ + public void setLedId(int ledId) { + this.ledId = ledId; + } + + /** + * 0: OFF, 1: ON. + * + * @return the current mode as {@link boolean} + */ + public boolean getMode() { + return mode; + } + + /** + * 0: OFF, 1: ON. + * + * @param mode the Mode to set as {@link boolean} + */ + public void setMode(boolean mode) { + this.mode = mode; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_UTIL) && (response.getReqCmd1() == 0x09)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_UTIL, 0x09); + + // Serialize the fields + serializer.serializeUInt8(ledId); + serializer.serializeBoolean(mode); + return getPayload(); + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(77); + builder.append("ZstackUtilLedControlSreq [ledId="); + builder.append(ledId); + builder.append(", mode="); + builder.append(mode); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilLedControlSrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilLedControlSrsp.java index 7da788434..5ed5e20c5 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilLedControlSrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilLedControlSrsp.java @@ -1,68 +1,69 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.util; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; - -/** - * Class to implement the Z-Stack command UTIL_LED_CONTROL. - *

- * This command is used by the tester to control the LEDs on the board. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackUtilLedControlSrsp extends ZstackFrameResponse { - - /** - * Status is either Success (0) or Failure (1). - */ - private ZstackResponseCode status; - - /** - * Response and Handler constructor - */ - public ZstackUtilLedControlSrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); - } - - /** - * Status is either Success (0) or Failure (1). - * - * @return the current status as {@link ZstackResponseCode} - */ - public ZstackResponseCode getStatus() { - return status; - } - - /** - * Status is either Success (0) or Failure (1). - * - * @param status the Status to set as {@link ZstackResponseCode} - */ - public void setStatus(ZstackResponseCode status) { - this.status = status; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(52); - builder.append("ZstackUtilLedControlSrsp [status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.util; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command UTIL_LED_CONTROL. + *

+ * This command is used by the tester to control the LEDs on the board. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackUtilLedControlSrsp extends ZstackFrameResponse { + + /** + * Status is either Success (0) or Failure (1). + */ + private ZstackResponseCode status; + + /** + * Response and Handler constructor + */ + public ZstackUtilLedControlSrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); + } + + /** + * Status is either Success (0) or Failure (1). + * + * @return the current status as {@link ZstackResponseCode} + */ + public ZstackResponseCode getStatus() { + return status; + } + + /** + * Status is either Success (0) or Failure (1). + * + * @param status the Status to set as {@link ZstackResponseCode} + */ + public void setStatus(ZstackResponseCode status) { + this.status = status; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(52); + builder.append("ZstackUtilLedControlSrsp [status="); + builder.append(status); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilSetChannelsSreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilSetChannelsSreq.java index 7382df922..593828f5c 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilSetChannelsSreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilSetChannelsSreq.java @@ -1,78 +1,79 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.util; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; - -/** - * Class to implement the Z-Stack command UTIL_SET_CHANNELS. - *

- * This command is used to store a channel select bit-mask into Non-Volatile memory to be used the next time the target device - * resets. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackUtilSetChannelsSreq extends ZstackFrameRequest { - - /** - * A bit-mask representing the channel(s) to scan the next time the target device resets. - */ - private int channels; - - /** - * Request constructor - */ - public ZstackUtilSetChannelsSreq() { - synchronousCommand = true; - } - - /** - * A bit-mask representing the channel(s) to scan the next time the target device resets. - * - * @return the current channels as {@link int} - */ - public int getChannels() { - return channels; - } - - /** - * A bit-mask representing the channel(s) to scan the next time the target device resets. - * - * @param channels the Channels to set as {@link int} - */ - public void setChannels(int channels) { - this.channels = channels; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_UTIL) && (response.getReqCmd1() == 0x03)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_UTIL, 0x03); - - // Serialize the fields - serializer.serializeUInt32(channels); - return getPayload(); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(53); - builder.append("ZstackUtilSetChannelsSreq [channels="); - builder.append(channels); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.util; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command UTIL_SET_CHANNELS. + *

+ * This command is used to store a channel select bit-mask into Non-Volatile memory to be used the next time the target device + * resets. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackUtilSetChannelsSreq extends ZstackFrameRequest { + + /** + * A bit-mask representing the channel(s) to scan the next time the target device resets. + */ + private int channels; + + /** + * Request constructor + */ + public ZstackUtilSetChannelsSreq() { + synchronousCommand = true; + } + + /** + * A bit-mask representing the channel(s) to scan the next time the target device resets. + * + * @return the current channels as {@link int} + */ + public int getChannels() { + return channels; + } + + /** + * A bit-mask representing the channel(s) to scan the next time the target device resets. + * + * @param channels the Channels to set as {@link int} + */ + public void setChannels(int channels) { + this.channels = channels; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_UTIL) && (response.getReqCmd1() == 0x03)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_UTIL, 0x03); + + // Serialize the fields + serializer.serializeUInt32(channels); + return getPayload(); + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(53); + builder.append("ZstackUtilSetChannelsSreq [channels="); + builder.append(channels); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilSetChannelsSrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilSetChannelsSrsp.java index f1956c52e..407968472 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilSetChannelsSrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilSetChannelsSrsp.java @@ -1,69 +1,70 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.util; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; - -/** - * Class to implement the Z-Stack command UTIL_SET_CHANNELS. - *

- * This command is used to store a channel select bit-mask into Non-Volatile memory to be used the next time the target device - * resets. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackUtilSetChannelsSrsp extends ZstackFrameResponse { - - /** - * Status is either Success (0) or Failure (1). - */ - private ZstackResponseCode status; - - /** - * Response and Handler constructor - */ - public ZstackUtilSetChannelsSrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); - } - - /** - * Status is either Success (0) or Failure (1). - * - * @return the current status as {@link ZstackResponseCode} - */ - public ZstackResponseCode getStatus() { - return status; - } - - /** - * Status is either Success (0) or Failure (1). - * - * @param status the Status to set as {@link ZstackResponseCode} - */ - public void setStatus(ZstackResponseCode status) { - this.status = status; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(53); - builder.append("ZstackUtilSetChannelsSrsp [status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.util; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command UTIL_SET_CHANNELS. + *

+ * This command is used to store a channel select bit-mask into Non-Volatile memory to be used the next time the target device + * resets. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackUtilSetChannelsSrsp extends ZstackFrameResponse { + + /** + * Status is either Success (0) or Failure (1). + */ + private ZstackResponseCode status; + + /** + * Response and Handler constructor + */ + public ZstackUtilSetChannelsSrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); + } + + /** + * Status is either Success (0) or Failure (1). + * + * @return the current status as {@link ZstackResponseCode} + */ + public ZstackResponseCode getStatus() { + return status; + } + + /** + * Status is either Success (0) or Failure (1). + * + * @param status the Status to set as {@link ZstackResponseCode} + */ + public void setStatus(ZstackResponseCode status) { + this.status = status; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(53); + builder.append("ZstackUtilSetChannelsSrsp [status="); + builder.append(status); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilSetPanidSreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilSetPanidSreq.java index f027e61be..8db559b96 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilSetPanidSreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilSetPanidSreq.java @@ -1,77 +1,78 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.util; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; - -/** - * Class to implement the Z-Stack command UTIL_SET_PANID. - *

- * Store a PanId value into Non-Volatile memory to be used the next time the target device resets. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackUtilSetPanidSreq extends ZstackFrameRequest { - - /** - * PanId that will be set. - */ - private int panId; - - /** - * Request constructor - */ - public ZstackUtilSetPanidSreq() { - synchronousCommand = true; - } - - /** - * PanId that will be set. - * - * @return the current panId as {@link int} - */ - public int getPanId() { - return panId; - } - - /** - * PanId that will be set. - * - * @param panId the PanId to set as {@link int} - */ - public void setPanId(int panId) { - this.panId = panId; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_UTIL) && (response.getReqCmd1() == 0x02)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_UTIL, 0x02); - - // Serialize the fields - serializer.serializeUInt16(panId); - return getPayload(); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(50); - builder.append("ZstackUtilSetPanidSreq [panId="); - builder.append(String.format("%04X", panId)); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.util; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command UTIL_SET_PANID. + *

+ * Store a PanId value into Non-Volatile memory to be used the next time the target device resets. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackUtilSetPanidSreq extends ZstackFrameRequest { + + /** + * PanId that will be set. + */ + private int panId; + + /** + * Request constructor + */ + public ZstackUtilSetPanidSreq() { + synchronousCommand = true; + } + + /** + * PanId that will be set. + * + * @return the current panId as {@link int} + */ + public int getPanId() { + return panId; + } + + /** + * PanId that will be set. + * + * @param panId the PanId to set as {@link int} + */ + public void setPanId(int panId) { + this.panId = panId; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_UTIL) && (response.getReqCmd1() == 0x02)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_UTIL, 0x02); + + // Serialize the fields + serializer.serializeUInt16(panId); + return getPayload(); + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(50); + builder.append("ZstackUtilSetPanidSreq [panId="); + builder.append(String.format("%04X", panId)); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilSetPanidSrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilSetPanidSrsp.java index 940c02f0b..e88a10fa1 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilSetPanidSrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilSetPanidSrsp.java @@ -1,68 +1,69 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.util; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; - -/** - * Class to implement the Z-Stack command UTIL_SET_PANID. - *

- * Store a PanId value into Non-Volatile memory to be used the next time the target device resets. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackUtilSetPanidSrsp extends ZstackFrameResponse { - - /** - * Status is either Success (0) or Failure (1). - */ - private ZstackResponseCode status; - - /** - * Response and Handler constructor - */ - public ZstackUtilSetPanidSrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); - } - - /** - * Status is either Success (0) or Failure (1). - * - * @return the current status as {@link ZstackResponseCode} - */ - public ZstackResponseCode getStatus() { - return status; - } - - /** - * Status is either Success (0) or Failure (1). - * - * @param status the Status to set as {@link ZstackResponseCode} - */ - public void setStatus(ZstackResponseCode status) { - this.status = status; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(50); - builder.append("ZstackUtilSetPanidSrsp [status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.util; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command UTIL_SET_PANID. + *

+ * Store a PanId value into Non-Volatile memory to be used the next time the target device resets. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackUtilSetPanidSrsp extends ZstackFrameResponse { + + /** + * Status is either Success (0) or Failure (1). + */ + private ZstackResponseCode status; + + /** + * Response and Handler constructor + */ + public ZstackUtilSetPanidSrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); + } + + /** + * Status is either Success (0) or Failure (1). + * + * @return the current status as {@link ZstackResponseCode} + */ + public ZstackResponseCode getStatus() { + return status; + } + + /** + * Status is either Success (0) or Failure (1). + * + * @param status the Status to set as {@link ZstackResponseCode} + */ + public void setStatus(ZstackResponseCode status) { + this.status = status; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(50); + builder.append("ZstackUtilSetPanidSrsp [status="); + builder.append(status); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilSetPrecfgkeySreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilSetPrecfgkeySreq.java index 25a12bf45..6f9259db1 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilSetPrecfgkeySreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilSetPrecfgkeySreq.java @@ -1,79 +1,80 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.util; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; -import com.zsmartsystems.zigbee.security.ZigBeeKey; - -/** - * Class to implement the Z-Stack command UTIL_SET_PRECFGKEY. - *

- * This command is used to store a pre-configured key array into Non-Volatile memory to be used the next time the target device - * resets. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackUtilSetPrecfgkeySreq extends ZstackFrameRequest { - - /** - * An array representing the pre-configured key to use the next time the target device resets. - */ - private ZigBeeKey preCfgKey; - - /** - * Request constructor - */ - public ZstackUtilSetPrecfgkeySreq() { - synchronousCommand = true; - } - - /** - * An array representing the pre-configured key to use the next time the target device resets. - * - * @return the current preCfgKey as {@link ZigBeeKey} - */ - public ZigBeeKey getPreCfgKey() { - return preCfgKey; - } - - /** - * An array representing the pre-configured key to use the next time the target device resets. - * - * @param preCfgKey the PreCfgKey to set as {@link ZigBeeKey} - */ - public void setPreCfgKey(ZigBeeKey preCfgKey) { - this.preCfgKey = preCfgKey; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_UTIL) && (response.getReqCmd1() == 0x05)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_UTIL, 0x05); - - // Serialize the fields - serializer.serializeZigBeeKey(preCfgKey); - return getPayload(); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(54); - builder.append("ZstackUtilSetPrecfgkeySreq [preCfgKey="); - builder.append(preCfgKey); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.util; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import com.zsmartsystems.zigbee.security.ZigBeeKey; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command UTIL_SET_PRECFGKEY. + *

+ * This command is used to store a pre-configured key array into Non-Volatile memory to be used the next time the target device + * resets. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackUtilSetPrecfgkeySreq extends ZstackFrameRequest { + + /** + * An array representing the pre-configured key to use the next time the target device resets. + */ + private ZigBeeKey preCfgKey; + + /** + * Request constructor + */ + public ZstackUtilSetPrecfgkeySreq() { + synchronousCommand = true; + } + + /** + * An array representing the pre-configured key to use the next time the target device resets. + * + * @return the current preCfgKey as {@link ZigBeeKey} + */ + public ZigBeeKey getPreCfgKey() { + return preCfgKey; + } + + /** + * An array representing the pre-configured key to use the next time the target device resets. + * + * @param preCfgKey the PreCfgKey to set as {@link ZigBeeKey} + */ + public void setPreCfgKey(ZigBeeKey preCfgKey) { + this.preCfgKey = preCfgKey; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_UTIL) && (response.getReqCmd1() == 0x05)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_UTIL, 0x05); + + // Serialize the fields + serializer.serializeZigBeeKey(preCfgKey); + return getPayload(); + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(54); + builder.append("ZstackUtilSetPrecfgkeySreq [preCfgKey="); + builder.append(preCfgKey); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilSetPrecfgkeySrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilSetPrecfgkeySrsp.java index 44895fe5e..34ad7650a 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilSetPrecfgkeySrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilSetPrecfgkeySrsp.java @@ -1,69 +1,70 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.util; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; - -/** - * Class to implement the Z-Stack command UTIL_SET_PRECFGKEY. - *

- * This command is used to store a pre-configured key array into Non-Volatile memory to be used the next time the target device - * resets. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackUtilSetPrecfgkeySrsp extends ZstackFrameResponse { - - /** - * Status is either Success (0) or Failure (1). - */ - private ZstackResponseCode status; - - /** - * Response and Handler constructor - */ - public ZstackUtilSetPrecfgkeySrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); - } - - /** - * Status is either Success (0) or Failure (1). - * - * @return the current status as {@link ZstackResponseCode} - */ - public ZstackResponseCode getStatus() { - return status; - } - - /** - * Status is either Success (0) or Failure (1). - * - * @param status the Status to set as {@link ZstackResponseCode} - */ - public void setStatus(ZstackResponseCode status) { - this.status = status; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(54); - builder.append("ZstackUtilSetPrecfgkeySrsp [status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.util; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command UTIL_SET_PRECFGKEY. + *

+ * This command is used to store a pre-configured key array into Non-Volatile memory to be used the next time the target device + * resets. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackUtilSetPrecfgkeySrsp extends ZstackFrameResponse { + + /** + * Status is either Success (0) or Failure (1). + */ + private ZstackResponseCode status; + + /** + * Response and Handler constructor + */ + public ZstackUtilSetPrecfgkeySrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); + } + + /** + * Status is either Success (0) or Failure (1). + * + * @return the current status as {@link ZstackResponseCode} + */ + public ZstackResponseCode getStatus() { + return status; + } + + /** + * Status is either Success (0) or Failure (1). + * + * @param status the Status to set as {@link ZstackResponseCode} + */ + public void setStatus(ZstackResponseCode status) { + this.status = status; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(54); + builder.append("ZstackUtilSetPrecfgkeySrsp [status="); + builder.append(status); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilSetSeclevelSreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilSetSeclevelSreq.java index ac978ace3..f0fa40811 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilSetSeclevelSreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilSetSeclevelSreq.java @@ -1,78 +1,79 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.util; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; - -/** - * Class to implement the Z-Stack command UTIL_SET_SECLEVEL. - *

- * This command is used to store a channel select bit-mask into Non-Volatile memory to be used the next time the target device - * resets. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackUtilSetSeclevelSreq extends ZstackFrameRequest { - - /** - * Security level to use the next time the target device resets. Zero is used to disable security. - */ - private int secLevel; - - /** - * Request constructor - */ - public ZstackUtilSetSeclevelSreq() { - synchronousCommand = true; - } - - /** - * Security level to use the next time the target device resets. Zero is used to disable security. - * - * @return the current secLevel as {@link int} - */ - public int getSecLevel() { - return secLevel; - } - - /** - * Security level to use the next time the target device resets. Zero is used to disable security. - * - * @param secLevel the SecLevel to set as {@link int} - */ - public void setSecLevel(int secLevel) { - this.secLevel = secLevel; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_UTIL) && (response.getReqCmd1() == 0x04)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_UTIL, 0x04); - - // Serialize the fields - serializer.serializeUInt8(secLevel); - return getPayload(); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(53); - builder.append("ZstackUtilSetSeclevelSreq [secLevel="); - builder.append(secLevel); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.util; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command UTIL_SET_SECLEVEL. + *

+ * This command is used to store a channel select bit-mask into Non-Volatile memory to be used the next time the target device + * resets. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackUtilSetSeclevelSreq extends ZstackFrameRequest { + + /** + * Security level to use the next time the target device resets. Zero is used to disable security. + */ + private int secLevel; + + /** + * Request constructor + */ + public ZstackUtilSetSeclevelSreq() { + synchronousCommand = true; + } + + /** + * Security level to use the next time the target device resets. Zero is used to disable security. + * + * @return the current secLevel as {@link int} + */ + public int getSecLevel() { + return secLevel; + } + + /** + * Security level to use the next time the target device resets. Zero is used to disable security. + * + * @param secLevel the SecLevel to set as {@link int} + */ + public void setSecLevel(int secLevel) { + this.secLevel = secLevel; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_UTIL) && (response.getReqCmd1() == 0x04)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_UTIL, 0x04); + + // Serialize the fields + serializer.serializeUInt8(secLevel); + return getPayload(); + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(53); + builder.append("ZstackUtilSetSeclevelSreq [secLevel="); + builder.append(secLevel); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilSetSeclevelSrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilSetSeclevelSrsp.java index 5baec19c2..ca23f2095 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilSetSeclevelSrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/util/ZstackUtilSetSeclevelSrsp.java @@ -1,69 +1,70 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.util; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; - -/** - * Class to implement the Z-Stack command UTIL_SET_SECLEVEL. - *

- * This command is used to store a channel select bit-mask into Non-Volatile memory to be used the next time the target device - * resets. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackUtilSetSeclevelSrsp extends ZstackFrameResponse { - - /** - * Status is either Success (0) or Failure (1). - */ - private ZstackResponseCode status; - - /** - * Response and Handler constructor - */ - public ZstackUtilSetSeclevelSrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); - } - - /** - * Status is either Success (0) or Failure (1). - * - * @return the current status as {@link ZstackResponseCode} - */ - public ZstackResponseCode getStatus() { - return status; - } - - /** - * Status is either Success (0) or Failure (1). - * - * @param status the Status to set as {@link ZstackResponseCode} - */ - public void setStatus(ZstackResponseCode status) { - this.status = status; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(53); - builder.append("ZstackUtilSetSeclevelSrsp [status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.util; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command UTIL_SET_SECLEVEL. + *

+ * This command is used to store a channel select bit-mask into Non-Volatile memory to be used the next time the target device + * resets. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackUtilSetSeclevelSrsp extends ZstackFrameResponse { + + /** + * Status is either Success (0) or Failure (1). + */ + private ZstackResponseCode status; + + /** + * Response and Handler constructor + */ + public ZstackUtilSetSeclevelSrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); + } + + /** + * Status is either Success (0) or Failure (1). + * + * @return the current status as {@link ZstackResponseCode} + */ + public ZstackResponseCode getStatus() { + return status; + } + + /** + * Status is either Success (0) or Failure (1). + * + * @param status the Status to set as {@link ZstackResponseCode} + */ + public void setStatus(ZstackResponseCode status) { + this.status = status; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(53); + builder.append("ZstackUtilSetSeclevelSrsp [status="); + builder.append(status); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoExtNwkInfoSreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoExtNwkInfoSreq.java index 67d3214c2..92875f84f 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoExtNwkInfoSreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoExtNwkInfoSreq.java @@ -1,49 +1,50 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.zdo; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; - -/** - * Class to implement the Z-Stack command ZDO_EXT_NWK_INFO. - *

- * Get the network info from the device - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackZdoExtNwkInfoSreq extends ZstackFrameRequest { - - /** - * Request constructor - */ - public ZstackZdoExtNwkInfoSreq() { - synchronousCommand = true; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_ZDO) && (response.getReqCmd1() == 0x50)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_ZDO, 0x50); - - // Serialize the fields - return getPayload(); - } - - @Override - public String toString() { - return "ZstackZdoExtNwkInfoSreq []"; - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.zdo; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command ZDO_EXT_NWK_INFO. + *

+ * Get the network info from the device + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackZdoExtNwkInfoSreq extends ZstackFrameRequest { + + /** + * Request constructor + */ + public ZstackZdoExtNwkInfoSreq() { + synchronousCommand = true; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_ZDO) && (response.getReqCmd1() == 0x50)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_ZDO, 0x50); + + // Serialize the fields + return getPayload(); + } + + @Override + public String toString() { + return "ZstackZdoExtNwkInfoSreq []"; + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoExtNwkInfoSrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoExtNwkInfoSrsp.java index b7d3cc1e9..e8595f0de 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoExtNwkInfoSrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoExtNwkInfoSrsp.java @@ -1,225 +1,226 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.zdo; - -import com.zsmartsystems.zigbee.ExtendedPanId; -import com.zsmartsystems.zigbee.IeeeAddress; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; - -/** - * Class to implement the Z-Stack command ZDO_EXT_NWK_INFO. - *

- * Get the network info from the device - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackZdoExtNwkInfoSrsp extends ZstackFrameResponse { - - /** - * Short address - */ - private int shortAddress; - - /** - * Unknown field - */ - private int padding; - - /** - * Pan id - */ - private int panId; - - /** - * Parent address - */ - private int parentAddress; - - /** - * Extended pan id - */ - private ExtendedPanId extendedPanId; - - /** - * Extended parent address - */ - private IeeeAddress extendedParentAddress; - - /** - * Channel - */ - private int channel; - - /** - * Response and Handler constructor - */ - public ZstackZdoExtNwkInfoSrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - shortAddress = deserializer.deserializeUInt16(); - padding = deserializer.deserializeUInt8(); - panId = deserializer.deserializeUInt16(); - parentAddress = deserializer.deserializeUInt16(); - extendedPanId = deserializer.deserializeExtendedPanId(); - extendedParentAddress = deserializer.deserializeIeeeAddress(); - channel = deserializer.deserializeUInt8(); - } - - /** - * Short address - * - * @return the current shortAddress as {@link int} - */ - public int getShortAddress() { - return shortAddress; - } - - /** - * Short address - * - * @param shortAddress the ShortAddress to set as {@link int} - */ - public void setShortAddress(int shortAddress) { - this.shortAddress = shortAddress; - } - - /** - * Unknown field - * - * @return the current padding as {@link int} - */ - public int getPadding() { - return padding; - } - - /** - * Unknown field - * - * @param padding the Padding to set as {@link int} - */ - public void setPadding(int padding) { - this.padding = padding; - } - - /** - * Pan id - * - * @return the current panId as {@link int} - */ - public int getPanId() { - return panId; - } - - /** - * Pan id - * - * @param panId the PanId to set as {@link int} - */ - public void setPanId(int panId) { - this.panId = panId; - } - - /** - * Parent address - * - * @return the current parentAddress as {@link int} - */ - public int getParentAddress() { - return parentAddress; - } - - /** - * Parent address - * - * @param parentAddress the ParentAddress to set as {@link int} - */ - public void setParentAddress(int parentAddress) { - this.parentAddress = parentAddress; - } - - /** - * Extended pan id - * - * @return the current extendedPanId as {@link ExtendedPanId} - */ - public ExtendedPanId getExtendedPanId() { - return extendedPanId; - } - - /** - * Extended pan id - * - * @param extendedPanId the ExtendedPanId to set as {@link ExtendedPanId} - */ - public void setExtendedPanId(ExtendedPanId extendedPanId) { - this.extendedPanId = extendedPanId; - } - - /** - * Extended parent address - * - * @return the current extendedParentAddress as {@link IeeeAddress} - */ - public IeeeAddress getExtendedParentAddress() { - return extendedParentAddress; - } - - /** - * Extended parent address - * - * @param extendedParentAddress the ExtendedParentAddress to set as {@link IeeeAddress} - */ - public void setExtendedParentAddress(IeeeAddress extendedParentAddress) { - this.extendedParentAddress = extendedParentAddress; - } - - /** - * Channel - * - * @return the current channel as {@link int} - */ - public int getChannel() { - return channel; - } - - /** - * Channel - * - * @param channel the Channel to set as {@link int} - */ - public void setChannel(int channel) { - this.channel = channel; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(201); - builder.append("ZstackZdoExtNwkInfoSrsp [shortAddress="); - builder.append(String.format("%02X", shortAddress)); - builder.append(", padding="); - builder.append(String.format("%01X", padding)); - builder.append(", panId="); - builder.append(String.format("%02X", panId)); - builder.append(", parentAddress="); - builder.append(String.format("%02X", parentAddress)); - builder.append(", extendedPanId="); - builder.append(extendedPanId); - builder.append(", extendedParentAddress="); - builder.append(extendedParentAddress); - builder.append(", channel="); - builder.append(channel); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.zdo; + +import com.zsmartsystems.zigbee.ExtendedPanId; +import com.zsmartsystems.zigbee.IeeeAddress; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command ZDO_EXT_NWK_INFO. + *

+ * Get the network info from the device + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackZdoExtNwkInfoSrsp extends ZstackFrameResponse { + + /** + * Short address + */ + private int shortAddress; + + /** + * Unknown field + */ + private int padding; + + /** + * Pan id + */ + private int panId; + + /** + * Parent address + */ + private int parentAddress; + + /** + * Extended pan id + */ + private ExtendedPanId extendedPanId; + + /** + * Extended parent address + */ + private IeeeAddress extendedParentAddress; + + /** + * Channel + */ + private int channel; + + /** + * Response and Handler constructor + */ + public ZstackZdoExtNwkInfoSrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + shortAddress = deserializer.deserializeUInt16(); + padding = deserializer.deserializeUInt8(); + panId = deserializer.deserializeUInt16(); + parentAddress = deserializer.deserializeUInt16(); + extendedPanId = deserializer.deserializeExtendedPanId(); + extendedParentAddress = deserializer.deserializeIeeeAddress(); + channel = deserializer.deserializeUInt8(); + } + + /** + * Short address + * + * @return the current shortAddress as {@link int} + */ + public int getShortAddress() { + return shortAddress; + } + + /** + * Short address + * + * @param shortAddress the ShortAddress to set as {@link int} + */ + public void setShortAddress(int shortAddress) { + this.shortAddress = shortAddress; + } + + /** + * Unknown field + * + * @return the current padding as {@link int} + */ + public int getPadding() { + return padding; + } + + /** + * Unknown field + * + * @param padding the Padding to set as {@link int} + */ + public void setPadding(int padding) { + this.padding = padding; + } + + /** + * Pan id + * + * @return the current panId as {@link int} + */ + public int getPanId() { + return panId; + } + + /** + * Pan id + * + * @param panId the PanId to set as {@link int} + */ + public void setPanId(int panId) { + this.panId = panId; + } + + /** + * Parent address + * + * @return the current parentAddress as {@link int} + */ + public int getParentAddress() { + return parentAddress; + } + + /** + * Parent address + * + * @param parentAddress the ParentAddress to set as {@link int} + */ + public void setParentAddress(int parentAddress) { + this.parentAddress = parentAddress; + } + + /** + * Extended pan id + * + * @return the current extendedPanId as {@link ExtendedPanId} + */ + public ExtendedPanId getExtendedPanId() { + return extendedPanId; + } + + /** + * Extended pan id + * + * @param extendedPanId the ExtendedPanId to set as {@link ExtendedPanId} + */ + public void setExtendedPanId(ExtendedPanId extendedPanId) { + this.extendedPanId = extendedPanId; + } + + /** + * Extended parent address + * + * @return the current extendedParentAddress as {@link IeeeAddress} + */ + public IeeeAddress getExtendedParentAddress() { + return extendedParentAddress; + } + + /** + * Extended parent address + * + * @param extendedParentAddress the ExtendedParentAddress to set as {@link IeeeAddress} + */ + public void setExtendedParentAddress(IeeeAddress extendedParentAddress) { + this.extendedParentAddress = extendedParentAddress; + } + + /** + * Channel + * + * @return the current channel as {@link int} + */ + public int getChannel() { + return channel; + } + + /** + * Channel + * + * @param channel the Channel to set as {@link int} + */ + public void setChannel(int channel) { + this.channel = channel; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(201); + builder.append("ZstackZdoExtNwkInfoSrsp [shortAddress="); + builder.append(String.format("%02X", shortAddress)); + builder.append(", padding="); + builder.append(String.format("%01X", padding)); + builder.append(", panId="); + builder.append(String.format("%02X", panId)); + builder.append(", parentAddress="); + builder.append(String.format("%02X", parentAddress)); + builder.append(", extendedPanId="); + builder.append(extendedPanId); + builder.append(", extendedParentAddress="); + builder.append(extendedParentAddress); + builder.append(", channel="); + builder.append(channel); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoGetLinkKeySreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoGetLinkKeySreq.java index c78fdbf52..deb230b45 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoGetLinkKeySreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoGetLinkKeySreq.java @@ -1,78 +1,79 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.zdo; - -import com.zsmartsystems.zigbee.IeeeAddress; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; - -/** - * Class to implement the Z-Stack command ZDO_GET_LINK_KEY. - *

- * This command retrieves the application link key of a given device. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackZdoGetLinkKeySreq extends ZstackFrameRequest { - - /** - * Specifies the IEEE address of the pair device of the link key - */ - private IeeeAddress ieeeAddr; - - /** - * Request constructor - */ - public ZstackZdoGetLinkKeySreq() { - synchronousCommand = true; - } - - /** - * Specifies the IEEE address of the pair device of the link key - * - * @return the current ieeeAddr as {@link IeeeAddress} - */ - public IeeeAddress getIeeeAddr() { - return ieeeAddr; - } - - /** - * Specifies the IEEE address of the pair device of the link key - * - * @param ieeeAddr the IeeeAddr to set as {@link IeeeAddress} - */ - public void setIeeeAddr(IeeeAddress ieeeAddr) { - this.ieeeAddr = ieeeAddr; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_ZDO) && (response.getReqCmd1() == 0x25)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_ZDO, 0x25); - - // Serialize the fields - serializer.serializeIeeeAddress(ieeeAddr); - return getPayload(); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(51); - builder.append("ZstackZdoGetLinkKeySreq [ieeeAddr="); - builder.append(ieeeAddr); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.zdo; + +import com.zsmartsystems.zigbee.IeeeAddress; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command ZDO_GET_LINK_KEY. + *

+ * This command retrieves the application link key of a given device. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackZdoGetLinkKeySreq extends ZstackFrameRequest { + + /** + * Specifies the IEEE address of the pair device of the link key + */ + private IeeeAddress ieeeAddr; + + /** + * Request constructor + */ + public ZstackZdoGetLinkKeySreq() { + synchronousCommand = true; + } + + /** + * Specifies the IEEE address of the pair device of the link key + * + * @return the current ieeeAddr as {@link IeeeAddress} + */ + public IeeeAddress getIeeeAddr() { + return ieeeAddr; + } + + /** + * Specifies the IEEE address of the pair device of the link key + * + * @param ieeeAddr the IeeeAddr to set as {@link IeeeAddress} + */ + public void setIeeeAddr(IeeeAddress ieeeAddr) { + this.ieeeAddr = ieeeAddr; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_ZDO) && (response.getReqCmd1() == 0x25)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_ZDO, 0x25); + + // Serialize the fields + serializer.serializeIeeeAddress(ieeeAddr); + return getPayload(); + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(51); + builder.append("ZstackZdoGetLinkKeySreq [ieeeAddr="); + builder.append(ieeeAddr); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoGetLinkKeySrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoGetLinkKeySrsp.java index 811070606..b80e4736a 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoGetLinkKeySrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoGetLinkKeySrsp.java @@ -1,122 +1,123 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.zdo; - -import com.zsmartsystems.zigbee.IeeeAddress; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; -import com.zsmartsystems.zigbee.security.ZigBeeKey; - -/** - * Class to implement the Z-Stack command ZDO_GET_LINK_KEY. - *

- * This command retrieves the application link key of a given device. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackZdoGetLinkKeySrsp extends ZstackFrameResponse { - - /** - * 0x00 – Success. 0xC8 – Unknown device. - */ - private ZstackResponseCode status; - - /** - * Specifies the IEEE address of the pair device of the link key - */ - private IeeeAddress ieeeAddr; - - /** - * Link key data of the device - */ - private ZigBeeKey linkKeyData; - - /** - * Response and Handler constructor - */ - public ZstackZdoGetLinkKeySrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); - ieeeAddr = deserializer.deserializeIeeeAddress(); - linkKeyData = deserializer.deserializeZigBeeKey(); - } - - /** - * 0x00 – Success. 0xC8 – Unknown device. - * - * @return the current status as {@link ZstackResponseCode} - */ - public ZstackResponseCode getStatus() { - return status; - } - - /** - * 0x00 – Success. 0xC8 – Unknown device. - * - * @param status the Status to set as {@link ZstackResponseCode} - */ - public void setStatus(ZstackResponseCode status) { - this.status = status; - } - - /** - * Specifies the IEEE address of the pair device of the link key - * - * @return the current ieeeAddr as {@link IeeeAddress} - */ - public IeeeAddress getIeeeAddr() { - return ieeeAddr; - } - - /** - * Specifies the IEEE address of the pair device of the link key - * - * @param ieeeAddr the IeeeAddr to set as {@link IeeeAddress} - */ - public void setIeeeAddr(IeeeAddress ieeeAddr) { - this.ieeeAddr = ieeeAddr; - } - - /** - * Link key data of the device - * - * @return the current linkKeyData as {@link ZigBeeKey} - */ - public ZigBeeKey getLinkKeyData() { - return linkKeyData; - } - - /** - * Link key data of the device - * - * @param linkKeyData the LinkKeyData to set as {@link ZigBeeKey} - */ - public void setLinkKeyData(ZigBeeKey linkKeyData) { - this.linkKeyData = linkKeyData; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(101); - builder.append("ZstackZdoGetLinkKeySrsp [status="); - builder.append(status); - builder.append(", ieeeAddr="); - builder.append(ieeeAddr); - builder.append(", linkKeyData="); - builder.append(linkKeyData); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.zdo; + +import com.zsmartsystems.zigbee.IeeeAddress; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; +import com.zsmartsystems.zigbee.security.ZigBeeKey; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command ZDO_GET_LINK_KEY. + *

+ * This command retrieves the application link key of a given device. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackZdoGetLinkKeySrsp extends ZstackFrameResponse { + + /** + * 0x00 – Success. 0xC8 – Unknown device. + */ + private ZstackResponseCode status; + + /** + * Specifies the IEEE address of the pair device of the link key + */ + private IeeeAddress ieeeAddr; + + /** + * Link key data of the device + */ + private ZigBeeKey linkKeyData; + + /** + * Response and Handler constructor + */ + public ZstackZdoGetLinkKeySrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); + ieeeAddr = deserializer.deserializeIeeeAddress(); + linkKeyData = deserializer.deserializeZigBeeKey(); + } + + /** + * 0x00 – Success. 0xC8 – Unknown device. + * + * @return the current status as {@link ZstackResponseCode} + */ + public ZstackResponseCode getStatus() { + return status; + } + + /** + * 0x00 – Success. 0xC8 – Unknown device. + * + * @param status the Status to set as {@link ZstackResponseCode} + */ + public void setStatus(ZstackResponseCode status) { + this.status = status; + } + + /** + * Specifies the IEEE address of the pair device of the link key + * + * @return the current ieeeAddr as {@link IeeeAddress} + */ + public IeeeAddress getIeeeAddr() { + return ieeeAddr; + } + + /** + * Specifies the IEEE address of the pair device of the link key + * + * @param ieeeAddr the IeeeAddr to set as {@link IeeeAddress} + */ + public void setIeeeAddr(IeeeAddress ieeeAddr) { + this.ieeeAddr = ieeeAddr; + } + + /** + * Link key data of the device + * + * @return the current linkKeyData as {@link ZigBeeKey} + */ + public ZigBeeKey getLinkKeyData() { + return linkKeyData; + } + + /** + * Link key data of the device + * + * @param linkKeyData the LinkKeyData to set as {@link ZigBeeKey} + */ + public void setLinkKeyData(ZigBeeKey linkKeyData) { + this.linkKeyData = linkKeyData; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(101); + builder.append("ZstackZdoGetLinkKeySrsp [status="); + builder.append(status); + builder.append(", ieeeAddr="); + builder.append(ieeeAddr); + builder.append(", linkKeyData="); + builder.append(linkKeyData); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoLeaveIndAreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoLeaveIndAreq.java index fb6362c86..7c364a5c1 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoLeaveIndAreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoLeaveIndAreq.java @@ -1,170 +1,171 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.zdo; - -import com.zsmartsystems.zigbee.IeeeAddress; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; - -/** - * Class to implement the Z-Stack command ZDO_LEAVE_IND. - *

- * This message is an indication to inform the host of a device leaving the network. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackZdoLeaveIndAreq extends ZstackFrameResponse { - - /** - * Short address (LSB-MSB) of the source of the leave indication. - */ - private int srcAddr; - - /** - * Extended address (LSB-MSB) of the source of the leave indication. - */ - private IeeeAddress extAddr; - - /** - * Boolean, TRUE = request, FALSE = indication. - */ - private boolean request; - - /** - * Boolean, TRUE = remove children. - */ - private boolean remove; - - /** - * Boolean, TRUE = rejoin. - */ - private boolean rejoin; - - /** - * Response and Handler constructor - */ - public ZstackZdoLeaveIndAreq(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - // Deserialize the fields - srcAddr = deserializer.deserializeUInt16(); - extAddr = deserializer.deserializeIeeeAddress(); - request = deserializer.deserializeBoolean(); - remove = deserializer.deserializeBoolean(); - rejoin = deserializer.deserializeBoolean(); - } - - /** - * Short address (LSB-MSB) of the source of the leave indication. - * - * @return the current srcAddr as {@link int} - */ - public int getSrcAddr() { - return srcAddr; - } - - /** - * Short address (LSB-MSB) of the source of the leave indication. - * - * @param srcAddr the SrcAddr to set as {@link int} - */ - public void setSrcAddr(int srcAddr) { - this.srcAddr = srcAddr; - } - - /** - * Extended address (LSB-MSB) of the source of the leave indication. - * - * @return the current extAddr as {@link IeeeAddress} - */ - public IeeeAddress getExtAddr() { - return extAddr; - } - - /** - * Extended address (LSB-MSB) of the source of the leave indication. - * - * @param extAddr the ExtAddr to set as {@link IeeeAddress} - */ - public void setExtAddr(IeeeAddress extAddr) { - this.extAddr = extAddr; - } - - /** - * Boolean, TRUE = request, FALSE = indication. - * - * @return the current request as {@link boolean} - */ - public boolean getRequest() { - return request; - } - - /** - * Boolean, TRUE = request, FALSE = indication. - * - * @param request the Request to set as {@link boolean} - */ - public void setRequest(boolean request) { - this.request = request; - } - - /** - * Boolean, TRUE = remove children. - * - * @return the current remove as {@link boolean} - */ - public boolean getRemove() { - return remove; - } - - /** - * Boolean, TRUE = remove children. - * - * @param remove the Remove to set as {@link boolean} - */ - public void setRemove(boolean remove) { - this.remove = remove; - } - - /** - * Boolean, TRUE = rejoin. - * - * @return the current rejoin as {@link boolean} - */ - public boolean getRejoin() { - return rejoin; - } - - /** - * Boolean, TRUE = rejoin. - * - * @param rejoin the Rejoin to set as {@link boolean} - */ - public void setRejoin(boolean rejoin) { - this.rejoin = rejoin; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(149); - builder.append("ZstackZdoLeaveIndAreq [srcAddr="); - builder.append(String.format("%04X", srcAddr)); - builder.append(", extAddr="); - builder.append(extAddr); - builder.append(", request="); - builder.append(request); - builder.append(", remove="); - builder.append(remove); - builder.append(", rejoin="); - builder.append(rejoin); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.zdo; + +import com.zsmartsystems.zigbee.IeeeAddress; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command ZDO_LEAVE_IND. + *

+ * This message is an indication to inform the host of a device leaving the network. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackZdoLeaveIndAreq extends ZstackFrameResponse { + + /** + * Short address (LSB-MSB) of the source of the leave indication. + */ + private int srcAddr; + + /** + * Extended address (LSB-MSB) of the source of the leave indication. + */ + private IeeeAddress extAddr; + + /** + * Boolean, TRUE = request, FALSE = indication. + */ + private boolean request; + + /** + * Boolean, TRUE = remove children. + */ + private boolean remove; + + /** + * Boolean, TRUE = rejoin. + */ + private boolean rejoin; + + /** + * Response and Handler constructor + */ + public ZstackZdoLeaveIndAreq(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + // Deserialize the fields + srcAddr = deserializer.deserializeUInt16(); + extAddr = deserializer.deserializeIeeeAddress(); + request = deserializer.deserializeBoolean(); + remove = deserializer.deserializeBoolean(); + rejoin = deserializer.deserializeBoolean(); + } + + /** + * Short address (LSB-MSB) of the source of the leave indication. + * + * @return the current srcAddr as {@link int} + */ + public int getSrcAddr() { + return srcAddr; + } + + /** + * Short address (LSB-MSB) of the source of the leave indication. + * + * @param srcAddr the SrcAddr to set as {@link int} + */ + public void setSrcAddr(int srcAddr) { + this.srcAddr = srcAddr; + } + + /** + * Extended address (LSB-MSB) of the source of the leave indication. + * + * @return the current extAddr as {@link IeeeAddress} + */ + public IeeeAddress getExtAddr() { + return extAddr; + } + + /** + * Extended address (LSB-MSB) of the source of the leave indication. + * + * @param extAddr the ExtAddr to set as {@link IeeeAddress} + */ + public void setExtAddr(IeeeAddress extAddr) { + this.extAddr = extAddr; + } + + /** + * Boolean, TRUE = request, FALSE = indication. + * + * @return the current request as {@link boolean} + */ + public boolean getRequest() { + return request; + } + + /** + * Boolean, TRUE = request, FALSE = indication. + * + * @param request the Request to set as {@link boolean} + */ + public void setRequest(boolean request) { + this.request = request; + } + + /** + * Boolean, TRUE = remove children. + * + * @return the current remove as {@link boolean} + */ + public boolean getRemove() { + return remove; + } + + /** + * Boolean, TRUE = remove children. + * + * @param remove the Remove to set as {@link boolean} + */ + public void setRemove(boolean remove) { + this.remove = remove; + } + + /** + * Boolean, TRUE = rejoin. + * + * @return the current rejoin as {@link boolean} + */ + public boolean getRejoin() { + return rejoin; + } + + /** + * Boolean, TRUE = rejoin. + * + * @param rejoin the Rejoin to set as {@link boolean} + */ + public void setRejoin(boolean rejoin) { + this.rejoin = rejoin; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(149); + builder.append("ZstackZdoLeaveIndAreq [srcAddr="); + builder.append(String.format("%04X", srcAddr)); + builder.append(", extAddr="); + builder.append(extAddr); + builder.append(", request="); + builder.append(request); + builder.append(", remove="); + builder.append(remove); + builder.append(", rejoin="); + builder.append(rejoin); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoMsgCbIncomingAreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoMsgCbIncomingAreq.java index b3363d981..18d73629f 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoMsgCbIncomingAreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoMsgCbIncomingAreq.java @@ -1,226 +1,227 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.zdo; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; - -/** - * Class to implement the Z-Stack command ZDO_MSG_CB_INCOMING. - *

- * This message is a ZDO callback for a Cluster Id that the host requested to receive with a ZDO_ MSG_CB_REGISTER request. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackZdoMsgCbIncomingAreq extends ZstackFrameResponse { - - /** - * Short address (LSB-MSB) of the source of the ZDO message. - */ - private int srcAddr; - - /** - * This field indicates whether or not this ZDO message was broadcast. - */ - private boolean wasBroadcast; - - /** - * The ZDO Cluster Id of this message. - */ - private int clusterId; - - /** - * N/A – not used. - */ - private boolean securityUse; - - /** - * The sequence number of this ZDO message. - */ - private int seqNumber; - - /** - * The MAC destination short address (LSB-MSB) of the ZDO message. - */ - private int dstAddr; - - /** - * The data that corresponds to the Cluster Id of the message - */ - private int[] data; - - /** - * Response and Handler constructor - */ - public ZstackZdoMsgCbIncomingAreq(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - // Deserialize the fields - srcAddr = deserializer.deserializeUInt16(); - wasBroadcast = deserializer.deserializeBoolean(); - clusterId = deserializer.deserializeUInt16(); - securityUse = deserializer.deserializeBoolean(); - seqNumber = deserializer.deserializeUInt8(); - dstAddr = deserializer.deserializeUInt16(); - data = deserializer.deserializeUInt8Array(); - } - - /** - * Short address (LSB-MSB) of the source of the ZDO message. - * - * @return the current srcAddr as {@link int} - */ - public int getSrcAddr() { - return srcAddr; - } - - /** - * Short address (LSB-MSB) of the source of the ZDO message. - * - * @param srcAddr the SrcAddr to set as {@link int} - */ - public void setSrcAddr(int srcAddr) { - this.srcAddr = srcAddr; - } - - /** - * This field indicates whether or not this ZDO message was broadcast. - * - * @return the current wasBroadcast as {@link boolean} - */ - public boolean getWasBroadcast() { - return wasBroadcast; - } - - /** - * This field indicates whether or not this ZDO message was broadcast. - * - * @param wasBroadcast the WasBroadcast to set as {@link boolean} - */ - public void setWasBroadcast(boolean wasBroadcast) { - this.wasBroadcast = wasBroadcast; - } - - /** - * The ZDO Cluster Id of this message. - * - * @return the current clusterId as {@link int} - */ - public int getClusterId() { - return clusterId; - } - - /** - * The ZDO Cluster Id of this message. - * - * @param clusterId the ClusterId to set as {@link int} - */ - public void setClusterId(int clusterId) { - this.clusterId = clusterId; - } - - /** - * N/A – not used. - * - * @return the current securityUse as {@link boolean} - */ - public boolean getSecurityUse() { - return securityUse; - } - - /** - * N/A – not used. - * - * @param securityUse the SecurityUse to set as {@link boolean} - */ - public void setSecurityUse(boolean securityUse) { - this.securityUse = securityUse; - } - - /** - * The sequence number of this ZDO message. - * - * @return the current seqNumber as {@link int} - */ - public int getSeqNumber() { - return seqNumber; - } - - /** - * The sequence number of this ZDO message. - * - * @param seqNumber the SeqNumber to set as {@link int} - */ - public void setSeqNumber(int seqNumber) { - this.seqNumber = seqNumber; - } - - /** - * The MAC destination short address (LSB-MSB) of the ZDO message. - * - * @return the current dstAddr as {@link int} - */ - public int getDstAddr() { - return dstAddr; - } - - /** - * The MAC destination short address (LSB-MSB) of the ZDO message. - * - * @param dstAddr the DstAddr to set as {@link int} - */ - public void setDstAddr(int dstAddr) { - this.dstAddr = dstAddr; - } - - /** - * The data that corresponds to the Cluster Id of the message - * - * @return the current data as {@link int[]} - */ - public int[] getData() { - return data; - } - - /** - * The data that corresponds to the Cluster Id of the message - * - * @param data the Data to set as {@link int[]} - */ - public void setData(int[] data) { - this.data = data; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(204); - builder.append("ZstackZdoMsgCbIncomingAreq [srcAddr="); - builder.append(String.format("%04X", srcAddr)); - builder.append(", wasBroadcast="); - builder.append(wasBroadcast); - builder.append(", clusterId="); - builder.append(String.format("%04X", clusterId)); - builder.append(", securityUse="); - builder.append(securityUse); - builder.append(", seqNumber="); - builder.append(String.format("%02X", seqNumber)); - builder.append(", dstAddr="); - builder.append(String.format("%04X", dstAddr)); - builder.append(", data="); - for (int c = 0; c < data.length; c++) { - if (c > 0) { - builder.append(' '); - } - builder.append(String.format("%02X", data[c])); - } - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.zdo; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command ZDO_MSG_CB_INCOMING. + *

+ * This message is a ZDO callback for a Cluster Id that the host requested to receive with a ZDO_ MSG_CB_REGISTER request. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackZdoMsgCbIncomingAreq extends ZstackFrameResponse { + + /** + * Short address (LSB-MSB) of the source of the ZDO message. + */ + private int srcAddr; + + /** + * This field indicates whether or not this ZDO message was broadcast. + */ + private boolean wasBroadcast; + + /** + * The ZDO Cluster Id of this message. + */ + private int clusterId; + + /** + * N/A – not used. + */ + private boolean securityUse; + + /** + * The sequence number of this ZDO message. + */ + private int seqNumber; + + /** + * The MAC destination short address (LSB-MSB) of the ZDO message. + */ + private int dstAddr; + + /** + * The data that corresponds to the Cluster Id of the message + */ + private int[] data; + + /** + * Response and Handler constructor + */ + public ZstackZdoMsgCbIncomingAreq(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + // Deserialize the fields + srcAddr = deserializer.deserializeUInt16(); + wasBroadcast = deserializer.deserializeBoolean(); + clusterId = deserializer.deserializeUInt16(); + securityUse = deserializer.deserializeBoolean(); + seqNumber = deserializer.deserializeUInt8(); + dstAddr = deserializer.deserializeUInt16(); + data = deserializer.deserializeUInt8Array(); + } + + /** + * Short address (LSB-MSB) of the source of the ZDO message. + * + * @return the current srcAddr as {@link int} + */ + public int getSrcAddr() { + return srcAddr; + } + + /** + * Short address (LSB-MSB) of the source of the ZDO message. + * + * @param srcAddr the SrcAddr to set as {@link int} + */ + public void setSrcAddr(int srcAddr) { + this.srcAddr = srcAddr; + } + + /** + * This field indicates whether or not this ZDO message was broadcast. + * + * @return the current wasBroadcast as {@link boolean} + */ + public boolean getWasBroadcast() { + return wasBroadcast; + } + + /** + * This field indicates whether or not this ZDO message was broadcast. + * + * @param wasBroadcast the WasBroadcast to set as {@link boolean} + */ + public void setWasBroadcast(boolean wasBroadcast) { + this.wasBroadcast = wasBroadcast; + } + + /** + * The ZDO Cluster Id of this message. + * + * @return the current clusterId as {@link int} + */ + public int getClusterId() { + return clusterId; + } + + /** + * The ZDO Cluster Id of this message. + * + * @param clusterId the ClusterId to set as {@link int} + */ + public void setClusterId(int clusterId) { + this.clusterId = clusterId; + } + + /** + * N/A – not used. + * + * @return the current securityUse as {@link boolean} + */ + public boolean getSecurityUse() { + return securityUse; + } + + /** + * N/A – not used. + * + * @param securityUse the SecurityUse to set as {@link boolean} + */ + public void setSecurityUse(boolean securityUse) { + this.securityUse = securityUse; + } + + /** + * The sequence number of this ZDO message. + * + * @return the current seqNumber as {@link int} + */ + public int getSeqNumber() { + return seqNumber; + } + + /** + * The sequence number of this ZDO message. + * + * @param seqNumber the SeqNumber to set as {@link int} + */ + public void setSeqNumber(int seqNumber) { + this.seqNumber = seqNumber; + } + + /** + * The MAC destination short address (LSB-MSB) of the ZDO message. + * + * @return the current dstAddr as {@link int} + */ + public int getDstAddr() { + return dstAddr; + } + + /** + * The MAC destination short address (LSB-MSB) of the ZDO message. + * + * @param dstAddr the DstAddr to set as {@link int} + */ + public void setDstAddr(int dstAddr) { + this.dstAddr = dstAddr; + } + + /** + * The data that corresponds to the Cluster Id of the message + * + * @return the current data as {@link int[]} + */ + public int[] getData() { + return data; + } + + /** + * The data that corresponds to the Cluster Id of the message + * + * @param data the Data to set as {@link int[]} + */ + public void setData(int[] data) { + this.data = data; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(204); + builder.append("ZstackZdoMsgCbIncomingAreq [srcAddr="); + builder.append(String.format("%04X", srcAddr)); + builder.append(", wasBroadcast="); + builder.append(wasBroadcast); + builder.append(", clusterId="); + builder.append(String.format("%04X", clusterId)); + builder.append(", securityUse="); + builder.append(securityUse); + builder.append(", seqNumber="); + builder.append(String.format("%02X", seqNumber)); + builder.append(", dstAddr="); + builder.append(String.format("%04X", dstAddr)); + builder.append(", data="); + for (int c = 0; c < data.length; c++) { + if (c > 0) { + builder.append(' '); + } + builder.append(String.format("%02X", data[c])); + } + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoMsgCbRegisterSreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoMsgCbRegisterSreq.java index 690c87647..a9a6a63b5 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoMsgCbRegisterSreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoMsgCbRegisterSreq.java @@ -1,77 +1,78 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.zdo; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; - -/** - * Class to implement the Z-Stack command ZDO_MSG_CB_REGISTER. - *

- * This command registers for a ZDO callback. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackZdoMsgCbRegisterSreq extends ZstackFrameRequest { - - /** - * Specifies the ZDO Cluster Id for which to receive a ZDO callback. - */ - private int clusterId; - - /** - * Request constructor - */ - public ZstackZdoMsgCbRegisterSreq() { - synchronousCommand = true; - } - - /** - * Specifies the ZDO Cluster Id for which to receive a ZDO callback. - * - * @return the current clusterId as {@link int} - */ - public int getClusterId() { - return clusterId; - } - - /** - * Specifies the ZDO Cluster Id for which to receive a ZDO callback. - * - * @param clusterId the ClusterId to set as {@link int} - */ - public void setClusterId(int clusterId) { - this.clusterId = clusterId; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_ZDO) && (response.getReqCmd1() == 0x3E)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_ZDO, 0x3E); - - // Serialize the fields - serializer.serializeUInt16(clusterId); - return getPayload(); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(54); - builder.append("ZstackZdoMsgCbRegisterSreq [clusterId="); - builder.append(String.format("%04X", clusterId)); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.zdo; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command ZDO_MSG_CB_REGISTER. + *

+ * This command registers for a ZDO callback. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackZdoMsgCbRegisterSreq extends ZstackFrameRequest { + + /** + * Specifies the ZDO Cluster Id for which to receive a ZDO callback. + */ + private int clusterId; + + /** + * Request constructor + */ + public ZstackZdoMsgCbRegisterSreq() { + synchronousCommand = true; + } + + /** + * Specifies the ZDO Cluster Id for which to receive a ZDO callback. + * + * @return the current clusterId as {@link int} + */ + public int getClusterId() { + return clusterId; + } + + /** + * Specifies the ZDO Cluster Id for which to receive a ZDO callback. + * + * @param clusterId the ClusterId to set as {@link int} + */ + public void setClusterId(int clusterId) { + this.clusterId = clusterId; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_ZDO) && (response.getReqCmd1() == 0x3E)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_ZDO, 0x3E); + + // Serialize the fields + serializer.serializeUInt16(clusterId); + return getPayload(); + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(54); + builder.append("ZstackZdoMsgCbRegisterSreq [clusterId="); + builder.append(String.format("%04X", clusterId)); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoMsgCbRegisterSrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoMsgCbRegisterSrsp.java index 33d473fe1..54d486675 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoMsgCbRegisterSrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoMsgCbRegisterSrsp.java @@ -1,68 +1,69 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.zdo; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; - -/** - * Class to implement the Z-Stack command ZDO_MSG_CB_REGISTER. - *

- * This command registers for a ZDO callback. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackZdoMsgCbRegisterSrsp extends ZstackFrameResponse { - - /** - * 0x00 – Success. - */ - private ZstackResponseCode status; - - /** - * Response and Handler constructor - */ - public ZstackZdoMsgCbRegisterSrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); - } - - /** - * 0x00 – Success. - * - * @return the current status as {@link ZstackResponseCode} - */ - public ZstackResponseCode getStatus() { - return status; - } - - /** - * 0x00 – Success. - * - * @param status the Status to set as {@link ZstackResponseCode} - */ - public void setStatus(ZstackResponseCode status) { - this.status = status; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(54); - builder.append("ZstackZdoMsgCbRegisterSrsp [status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.zdo; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command ZDO_MSG_CB_REGISTER. + *

+ * This command registers for a ZDO callback. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackZdoMsgCbRegisterSrsp extends ZstackFrameResponse { + + /** + * 0x00 – Success. + */ + private ZstackResponseCode status; + + /** + * Response and Handler constructor + */ + public ZstackZdoMsgCbRegisterSrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); + } + + /** + * 0x00 – Success. + * + * @return the current status as {@link ZstackResponseCode} + */ + public ZstackResponseCode getStatus() { + return status; + } + + /** + * 0x00 – Success. + * + * @param status the Status to set as {@link ZstackResponseCode} + */ + public void setStatus(ZstackResponseCode status) { + this.status = status; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(54); + builder.append("ZstackZdoMsgCbRegisterSrsp [status="); + builder.append(status); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoNwkDiscoveryReqSreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoNwkDiscoveryReqSreq.java index 3972c6017..47ab5dc7e 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoNwkDiscoveryReqSreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoNwkDiscoveryReqSreq.java @@ -1,103 +1,104 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.zdo; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; - -/** - * Class to implement the Z-Stack command ZDO_NWK_DISCOVERY_REQ. - *

- * This command is used to initiate a network discovery (active scan). - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackZdoNwkDiscoveryReqSreq extends ZstackFrameRequest { - - /** - * Bit mask for channels to scan. - */ - private int scanChannels; - - /** - * A value used to calculate the length of time to spend scanning each channel - */ - private int scanDuration; - - /** - * Request constructor - */ - public ZstackZdoNwkDiscoveryReqSreq() { - synchronousCommand = true; - } - - /** - * Bit mask for channels to scan. - * - * @return the current scanChannels as {@link int} - */ - public int getScanChannels() { - return scanChannels; - } - - /** - * Bit mask for channels to scan. - * - * @param scanChannels the ScanChannels to set as {@link int} - */ - public void setScanChannels(int scanChannels) { - this.scanChannels = scanChannels; - } - - /** - * A value used to calculate the length of time to spend scanning each channel - * - * @return the current scanDuration as {@link int} - */ - public int getScanDuration() { - return scanDuration; - } - - /** - * A value used to calculate the length of time to spend scanning each channel - * - * @param scanDuration the ScanDuration to set as {@link int} - */ - public void setScanDuration(int scanDuration) { - this.scanDuration = scanDuration; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_ZDO) && (response.getReqCmd1() == 0x26)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_ZDO, 0x26); - - // Serialize the fields - serializer.serializeUInt32(scanChannels); - serializer.serializeUInt8(scanDuration); - return getPayload(); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(81); - builder.append("ZstackZdoNwkDiscoveryReqSreq [scanChannels="); - builder.append(scanChannels); - builder.append(", scanDuration="); - builder.append(scanDuration); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.zdo; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command ZDO_NWK_DISCOVERY_REQ. + *

+ * This command is used to initiate a network discovery (active scan). + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackZdoNwkDiscoveryReqSreq extends ZstackFrameRequest { + + /** + * Bit mask for channels to scan. + */ + private int scanChannels; + + /** + * A value used to calculate the length of time to spend scanning each channel + */ + private int scanDuration; + + /** + * Request constructor + */ + public ZstackZdoNwkDiscoveryReqSreq() { + synchronousCommand = true; + } + + /** + * Bit mask for channels to scan. + * + * @return the current scanChannels as {@link int} + */ + public int getScanChannels() { + return scanChannels; + } + + /** + * Bit mask for channels to scan. + * + * @param scanChannels the ScanChannels to set as {@link int} + */ + public void setScanChannels(int scanChannels) { + this.scanChannels = scanChannels; + } + + /** + * A value used to calculate the length of time to spend scanning each channel + * + * @return the current scanDuration as {@link int} + */ + public int getScanDuration() { + return scanDuration; + } + + /** + * A value used to calculate the length of time to spend scanning each channel + * + * @param scanDuration the ScanDuration to set as {@link int} + */ + public void setScanDuration(int scanDuration) { + this.scanDuration = scanDuration; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_ZDO) && (response.getReqCmd1() == 0x26)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_ZDO, 0x26); + + // Serialize the fields + serializer.serializeUInt32(scanChannels); + serializer.serializeUInt8(scanDuration); + return getPayload(); + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(81); + builder.append("ZstackZdoNwkDiscoveryReqSreq [scanChannels="); + builder.append(scanChannels); + builder.append(", scanDuration="); + builder.append(scanDuration); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoNwkDiscoveryReqSrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoNwkDiscoveryReqSrsp.java index 3e40303a4..ddbbac029 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoNwkDiscoveryReqSrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoNwkDiscoveryReqSrsp.java @@ -1,77 +1,78 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.zdo; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; - -/** - * Class to implement the Z-Stack command ZDO_NWK_DISCOVERY_REQ. - *

- * This command is used to initiate a network discovery (active scan). - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackZdoNwkDiscoveryReqSrsp extends ZstackFrameResponse { - - /** - * Success (0) Invalid_Parameter (0x02). ZNwkInvalidRequest (0xC2) if the device is already on a network. User - * ZDO_MGMT_NWK_DISC_REQ instead. Or leave the network first, then initiate the request. MAC_SCAN_IN_PROGRESS (0xFC) if a - * channel change is in progress. MAC_NO_RESOURCE (0x1A) if the operation could not complete because no memory resource were - * available. - */ - private ZstackResponseCode status; - - /** - * Response and Handler constructor - */ - public ZstackZdoNwkDiscoveryReqSrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); - } - - /** - * Success (0) Invalid_Parameter (0x02). ZNwkInvalidRequest (0xC2) if the device is already on a network. User - * ZDO_MGMT_NWK_DISC_REQ instead. Or leave the network first, then initiate the request. MAC_SCAN_IN_PROGRESS (0xFC) if a - * channel change is in progress. MAC_NO_RESOURCE (0x1A) if the operation could not complete because no memory resource were - * available. - * - * @return the current status as {@link ZstackResponseCode} - */ - public ZstackResponseCode getStatus() { - return status; - } - - /** - * Success (0) Invalid_Parameter (0x02). ZNwkInvalidRequest (0xC2) if the device is already on a network. User - * ZDO_MGMT_NWK_DISC_REQ instead. Or leave the network first, then initiate the request. MAC_SCAN_IN_PROGRESS (0xFC) if a - * channel change is in progress. MAC_NO_RESOURCE (0x1A) if the operation could not complete because no memory resource were - * available. - * - * @param status the Status to set as {@link ZstackResponseCode} - */ - public void setStatus(ZstackResponseCode status) { - this.status = status; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(56); - builder.append("ZstackZdoNwkDiscoveryReqSrsp [status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.zdo; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command ZDO_NWK_DISCOVERY_REQ. + *

+ * This command is used to initiate a network discovery (active scan). + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackZdoNwkDiscoveryReqSrsp extends ZstackFrameResponse { + + /** + * Success (0) Invalid_Parameter (0x02). ZNwkInvalidRequest (0xC2) if the device is already on a network. User + * ZDO_MGMT_NWK_DISC_REQ instead. Or leave the network first, then initiate the request. MAC_SCAN_IN_PROGRESS (0xFC) if a + * channel change is in progress. MAC_NO_RESOURCE (0x1A) if the operation could not complete because no memory resource were + * available. + */ + private ZstackResponseCode status; + + /** + * Response and Handler constructor + */ + public ZstackZdoNwkDiscoveryReqSrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); + } + + /** + * Success (0) Invalid_Parameter (0x02). ZNwkInvalidRequest (0xC2) if the device is already on a network. User + * ZDO_MGMT_NWK_DISC_REQ instead. Or leave the network first, then initiate the request. MAC_SCAN_IN_PROGRESS (0xFC) if a + * channel change is in progress. MAC_NO_RESOURCE (0x1A) if the operation could not complete because no memory resource were + * available. + * + * @return the current status as {@link ZstackResponseCode} + */ + public ZstackResponseCode getStatus() { + return status; + } + + /** + * Success (0) Invalid_Parameter (0x02). ZNwkInvalidRequest (0xC2) if the device is already on a network. User + * ZDO_MGMT_NWK_DISC_REQ instead. Or leave the network first, then initiate the request. MAC_SCAN_IN_PROGRESS (0xFC) if a + * channel change is in progress. MAC_NO_RESOURCE (0x1A) if the operation could not complete because no memory resource were + * available. + * + * @param status the Status to set as {@link ZstackResponseCode} + */ + public void setStatus(ZstackResponseCode status) { + this.status = status; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(56); + builder.append("ZstackZdoNwkDiscoveryReqSrsp [status="); + builder.append(status); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoRemoveLinkKeySreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoRemoveLinkKeySreq.java index 9887a6a91..94080ada8 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoRemoveLinkKeySreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoRemoveLinkKeySreq.java @@ -1,78 +1,79 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.zdo; - -import com.zsmartsystems.zigbee.IeeeAddress; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; - -/** - * Class to implement the Z-Stack command ZDO_REMOVE_LINK_KEY. - *

- * This command removes the application link key of a given device. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackZdoRemoveLinkKeySreq extends ZstackFrameRequest { - - /** - * Specifies the IEEE address of the pair device of the link key - */ - private IeeeAddress ieeeAddr; - - /** - * Request constructor - */ - public ZstackZdoRemoveLinkKeySreq() { - synchronousCommand = true; - } - - /** - * Specifies the IEEE address of the pair device of the link key - * - * @return the current ieeeAddr as {@link IeeeAddress} - */ - public IeeeAddress getIeeeAddr() { - return ieeeAddr; - } - - /** - * Specifies the IEEE address of the pair device of the link key - * - * @param ieeeAddr the IeeeAddr to set as {@link IeeeAddress} - */ - public void setIeeeAddr(IeeeAddress ieeeAddr) { - this.ieeeAddr = ieeeAddr; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_ZDO) && (response.getReqCmd1() == 0x24)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_ZDO, 0x24); - - // Serialize the fields - serializer.serializeIeeeAddress(ieeeAddr); - return getPayload(); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(54); - builder.append("ZstackZdoRemoveLinkKeySreq [ieeeAddr="); - builder.append(ieeeAddr); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.zdo; + +import com.zsmartsystems.zigbee.IeeeAddress; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command ZDO_REMOVE_LINK_KEY. + *

+ * This command removes the application link key of a given device. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackZdoRemoveLinkKeySreq extends ZstackFrameRequest { + + /** + * Specifies the IEEE address of the pair device of the link key + */ + private IeeeAddress ieeeAddr; + + /** + * Request constructor + */ + public ZstackZdoRemoveLinkKeySreq() { + synchronousCommand = true; + } + + /** + * Specifies the IEEE address of the pair device of the link key + * + * @return the current ieeeAddr as {@link IeeeAddress} + */ + public IeeeAddress getIeeeAddr() { + return ieeeAddr; + } + + /** + * Specifies the IEEE address of the pair device of the link key + * + * @param ieeeAddr the IeeeAddr to set as {@link IeeeAddress} + */ + public void setIeeeAddr(IeeeAddress ieeeAddr) { + this.ieeeAddr = ieeeAddr; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_ZDO) && (response.getReqCmd1() == 0x24)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_ZDO, 0x24); + + // Serialize the fields + serializer.serializeIeeeAddress(ieeeAddr); + return getPayload(); + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(54); + builder.append("ZstackZdoRemoveLinkKeySreq [ieeeAddr="); + builder.append(ieeeAddr); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoRemoveLinkKeySrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoRemoveLinkKeySrsp.java index dba377b8c..de7b4f087 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoRemoveLinkKeySrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoRemoveLinkKeySrsp.java @@ -1,68 +1,69 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.zdo; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; - -/** - * Class to implement the Z-Stack command ZDO_REMOVE_LINK_KEY. - *

- * This command removes the application link key of a given device. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackZdoRemoveLinkKeySrsp extends ZstackFrameResponse { - - /** - * 0x00 – Success. 0xC8 – Unknown device. - */ - private ZstackResponseCode status; - - /** - * Response and Handler constructor - */ - public ZstackZdoRemoveLinkKeySrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); - } - - /** - * 0x00 – Success. 0xC8 – Unknown device. - * - * @return the current status as {@link ZstackResponseCode} - */ - public ZstackResponseCode getStatus() { - return status; - } - - /** - * 0x00 – Success. 0xC8 – Unknown device. - * - * @param status the Status to set as {@link ZstackResponseCode} - */ - public void setStatus(ZstackResponseCode status) { - this.status = status; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(54); - builder.append("ZstackZdoRemoveLinkKeySrsp [status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.zdo; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command ZDO_REMOVE_LINK_KEY. + *

+ * This command removes the application link key of a given device. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackZdoRemoveLinkKeySrsp extends ZstackFrameResponse { + + /** + * 0x00 – Success. 0xC8 – Unknown device. + */ + private ZstackResponseCode status; + + /** + * Response and Handler constructor + */ + public ZstackZdoRemoveLinkKeySrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); + } + + /** + * 0x00 – Success. 0xC8 – Unknown device. + * + * @return the current status as {@link ZstackResponseCode} + */ + public ZstackResponseCode getStatus() { + return status; + } + + /** + * 0x00 – Success. 0xC8 – Unknown device. + * + * @param status the Status to set as {@link ZstackResponseCode} + */ + public void setStatus(ZstackResponseCode status) { + this.status = status; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(54); + builder.append("ZstackZdoRemoveLinkKeySrsp [status="); + builder.append(status); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoSetLinkKeySreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoSetLinkKeySreq.java index 00a0ede24..50e1cbd52 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoSetLinkKeySreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoSetLinkKeySreq.java @@ -1,131 +1,132 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.zdo; - -import com.zsmartsystems.zigbee.IeeeAddress; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; -import com.zsmartsystems.zigbee.security.ZigBeeKey; - -/** - * Class to implement the Z-Stack command ZDO_SET_LINK_KEY. - *

- * This command sets the application link key for a given device. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackZdoSetLinkKeySreq extends ZstackFrameRequest { - - /** - * Specifies the short address of the pair device of the link key. - */ - private int shortAddr; - - /** - * Specifies the IEEE address of the pair device of the link key - */ - private IeeeAddress ieeeAddr; - - /** - * 128 bit link key data of the device. - */ - private ZigBeeKey linkKeyData; - - /** - * Request constructor - */ - public ZstackZdoSetLinkKeySreq() { - synchronousCommand = true; - } - - /** - * Specifies the short address of the pair device of the link key. - * - * @return the current shortAddr as {@link int} - */ - public int getShortAddr() { - return shortAddr; - } - - /** - * Specifies the short address of the pair device of the link key. - * - * @param shortAddr the ShortAddr to set as {@link int} - */ - public void setShortAddr(int shortAddr) { - this.shortAddr = shortAddr; - } - - /** - * Specifies the IEEE address of the pair device of the link key - * - * @return the current ieeeAddr as {@link IeeeAddress} - */ - public IeeeAddress getIeeeAddr() { - return ieeeAddr; - } - - /** - * Specifies the IEEE address of the pair device of the link key - * - * @param ieeeAddr the IeeeAddr to set as {@link IeeeAddress} - */ - public void setIeeeAddr(IeeeAddress ieeeAddr) { - this.ieeeAddr = ieeeAddr; - } - - /** - * 128 bit link key data of the device. - * - * @return the current linkKeyData as {@link ZigBeeKey} - */ - public ZigBeeKey getLinkKeyData() { - return linkKeyData; - } - - /** - * 128 bit link key data of the device. - * - * @param linkKeyData the LinkKeyData to set as {@link ZigBeeKey} - */ - public void setLinkKeyData(ZigBeeKey linkKeyData) { - this.linkKeyData = linkKeyData; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_ZDO) && (response.getReqCmd1() == 0x23)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_ZDO, 0x23); - - // Serialize the fields - serializer.serializeUInt16(shortAddr); - serializer.serializeIeeeAddress(ieeeAddr); - serializer.serializeZigBeeKey(linkKeyData); - return getPayload(); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(101); - builder.append("ZstackZdoSetLinkKeySreq [shortAddr="); - builder.append(String.format("%04X", shortAddr)); - builder.append(", ieeeAddr="); - builder.append(ieeeAddr); - builder.append(", linkKeyData="); - builder.append(linkKeyData); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.zdo; + +import com.zsmartsystems.zigbee.IeeeAddress; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import com.zsmartsystems.zigbee.security.ZigBeeKey; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command ZDO_SET_LINK_KEY. + *

+ * This command sets the application link key for a given device. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackZdoSetLinkKeySreq extends ZstackFrameRequest { + + /** + * Specifies the short address of the pair device of the link key. + */ + private int shortAddr; + + /** + * Specifies the IEEE address of the pair device of the link key + */ + private IeeeAddress ieeeAddr; + + /** + * 128 bit link key data of the device. + */ + private ZigBeeKey linkKeyData; + + /** + * Request constructor + */ + public ZstackZdoSetLinkKeySreq() { + synchronousCommand = true; + } + + /** + * Specifies the short address of the pair device of the link key. + * + * @return the current shortAddr as {@link int} + */ + public int getShortAddr() { + return shortAddr; + } + + /** + * Specifies the short address of the pair device of the link key. + * + * @param shortAddr the ShortAddr to set as {@link int} + */ + public void setShortAddr(int shortAddr) { + this.shortAddr = shortAddr; + } + + /** + * Specifies the IEEE address of the pair device of the link key + * + * @return the current ieeeAddr as {@link IeeeAddress} + */ + public IeeeAddress getIeeeAddr() { + return ieeeAddr; + } + + /** + * Specifies the IEEE address of the pair device of the link key + * + * @param ieeeAddr the IeeeAddr to set as {@link IeeeAddress} + */ + public void setIeeeAddr(IeeeAddress ieeeAddr) { + this.ieeeAddr = ieeeAddr; + } + + /** + * 128 bit link key data of the device. + * + * @return the current linkKeyData as {@link ZigBeeKey} + */ + public ZigBeeKey getLinkKeyData() { + return linkKeyData; + } + + /** + * 128 bit link key data of the device. + * + * @param linkKeyData the LinkKeyData to set as {@link ZigBeeKey} + */ + public void setLinkKeyData(ZigBeeKey linkKeyData) { + this.linkKeyData = linkKeyData; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_ZDO) && (response.getReqCmd1() == 0x23)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_ZDO, 0x23); + + // Serialize the fields + serializer.serializeUInt16(shortAddr); + serializer.serializeIeeeAddress(ieeeAddr); + serializer.serializeZigBeeKey(linkKeyData); + return getPayload(); + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(101); + builder.append("ZstackZdoSetLinkKeySreq [shortAddr="); + builder.append(String.format("%04X", shortAddr)); + builder.append(", ieeeAddr="); + builder.append(ieeeAddr); + builder.append(", linkKeyData="); + builder.append(linkKeyData); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoSetLinkKeySrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoSetLinkKeySrsp.java index 53f9591fd..73ab3f171 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoSetLinkKeySrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoSetLinkKeySrsp.java @@ -1,68 +1,69 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.zdo; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; - -/** - * Class to implement the Z-Stack command ZDO_SET_LINK_KEY. - *

- * This command sets the application link key for a given device. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackZdoSetLinkKeySrsp extends ZstackFrameResponse { - - /** - * 0x00 – Success. 0x01 – Fail to add to address manager. 0x11 – Security manager key table full - */ - private ZstackResponseCode status; - - /** - * Response and Handler constructor - */ - public ZstackZdoSetLinkKeySrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); - } - - /** - * 0x00 – Success. 0x01 – Fail to add to address manager. 0x11 – Security manager key table full - * - * @return the current status as {@link ZstackResponseCode} - */ - public ZstackResponseCode getStatus() { - return status; - } - - /** - * 0x00 – Success. 0x01 – Fail to add to address manager. 0x11 – Security manager key table full - * - * @param status the Status to set as {@link ZstackResponseCode} - */ - public void setStatus(ZstackResponseCode status) { - this.status = status; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(51); - builder.append("ZstackZdoSetLinkKeySrsp [status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.zdo; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command ZDO_SET_LINK_KEY. + *

+ * This command sets the application link key for a given device. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:47 CEST 2023") +public class ZstackZdoSetLinkKeySrsp extends ZstackFrameResponse { + + /** + * 0x00 – Success. 0x01 – Fail to add to address manager. 0x11 – Security manager key table full + */ + private ZstackResponseCode status; + + /** + * Response and Handler constructor + */ + public ZstackZdoSetLinkKeySrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); + } + + /** + * 0x00 – Success. 0x01 – Fail to add to address manager. 0x11 – Security manager key table full + * + * @return the current status as {@link ZstackResponseCode} + */ + public ZstackResponseCode getStatus() { + return status; + } + + /** + * 0x00 – Success. 0x01 – Fail to add to address manager. 0x11 – Security manager key table full + * + * @param status the Status to set as {@link ZstackResponseCode} + */ + public void setStatus(ZstackResponseCode status) { + this.status = status; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(51); + builder.append("ZstackZdoSetLinkKeySrsp [status="); + builder.append(status); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoStartupFromAppSreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoStartupFromAppSreq.java index ccd5f9665..3a72af0e9 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoStartupFromAppSreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoStartupFromAppSreq.java @@ -1,77 +1,78 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.zdo; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; -import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; - -/** - * Class to implement the Z-Stack command ZDO_STARTUP_FROM_APP. - *

- * This command starts the device in the network. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackZdoStartupFromAppSreq extends ZstackFrameRequest { - - /** - * Specifies the time delay before the device starts in milliseconds. - */ - private int startDelay; - - /** - * Request constructor - */ - public ZstackZdoStartupFromAppSreq() { - synchronousCommand = true; - } - - /** - * Specifies the time delay before the device starts in milliseconds. - * - * @return the current startDelay as {@link int} - */ - public int getStartDelay() { - return startDelay; - } - - /** - * Specifies the time delay before the device starts in milliseconds. - * - * @param startDelay the StartDelay to set as {@link int} - */ - public void setStartDelay(int startDelay) { - this.startDelay = startDelay; - } - - @Override - public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { - return (((response.getReqCmd0() & 0x1F) == ZSTACK_ZDO) && (response.getReqCmd1() == 0x40)); - } - - @Override - public int[] serialize() { - // Serialize the header - serializeHeader(ZSTACK_SREQ, ZSTACK_ZDO, 0x40); - - // Serialize the fields - serializer.serializeUInt16(startDelay); - return getPayload(); - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(55); - builder.append("ZstackZdoStartupFromAppSreq [startDelay="); - builder.append(startDelay); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.zdo; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameRequest; +import com.zsmartsystems.zigbee.dongle.zstack.api.rpc.ZstackRpcSreqErrorSrsp; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command ZDO_STARTUP_FROM_APP. + *

+ * This command starts the device in the network. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackZdoStartupFromAppSreq extends ZstackFrameRequest { + + /** + * Specifies the time delay before the device starts in milliseconds. + */ + private int startDelay; + + /** + * Request constructor + */ + public ZstackZdoStartupFromAppSreq() { + synchronousCommand = true; + } + + /** + * Specifies the time delay before the device starts in milliseconds. + * + * @return the current startDelay as {@link int} + */ + public int getStartDelay() { + return startDelay; + } + + /** + * Specifies the time delay before the device starts in milliseconds. + * + * @param startDelay the StartDelay to set as {@link int} + */ + public void setStartDelay(int startDelay) { + this.startDelay = startDelay; + } + + @Override + public boolean matchSreqError(ZstackRpcSreqErrorSrsp response) { + return (((response.getReqCmd0() & 0x1F) == ZSTACK_ZDO) && (response.getReqCmd1() == 0x40)); + } + + @Override + public int[] serialize() { + // Serialize the header + serializeHeader(ZSTACK_SREQ, ZSTACK_ZDO, 0x40); + + // Serialize the fields + serializer.serializeUInt16(startDelay); + return getPayload(); + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(55); + builder.append("ZstackZdoStartupFromAppSreq [startDelay="); + builder.append(startDelay); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoStartupFromAppSrsp.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoStartupFromAppSrsp.java index a544fe85c..34b390603 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoStartupFromAppSrsp.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoStartupFromAppSrsp.java @@ -1,68 +1,69 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.zdo; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; - -/** - * Class to implement the Z-Stack command ZDO_STARTUP_FROM_APP. - *

- * This command starts the device in the network. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackZdoStartupFromAppSrsp extends ZstackFrameResponse { - - /** - * This field indicates either SUCCESS (0) or FAILURE (1). - */ - private ZstackResponseCode status; - - /** - * Response and Handler constructor - */ - public ZstackZdoStartupFromAppSrsp(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - synchronousCommand = true; - - // Deserialize the fields - status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); - } - - /** - * This field indicates either SUCCESS (0) or FAILURE (1). - * - * @return the current status as {@link ZstackResponseCode} - */ - public ZstackResponseCode getStatus() { - return status; - } - - /** - * This field indicates either SUCCESS (0) or FAILURE (1). - * - * @param status the Status to set as {@link ZstackResponseCode} - */ - public void setStatus(ZstackResponseCode status) { - this.status = status; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(55); - builder.append("ZstackZdoStartupFromAppSrsp [status="); - builder.append(status); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.zdo; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackResponseCode; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command ZDO_STARTUP_FROM_APP. + *

+ * This command starts the device in the network. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackZdoStartupFromAppSrsp extends ZstackFrameResponse { + + /** + * This field indicates either SUCCESS (0) or FAILURE (1). + */ + private ZstackResponseCode status; + + /** + * Response and Handler constructor + */ + public ZstackZdoStartupFromAppSrsp(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + synchronousCommand = true; + + // Deserialize the fields + status = ZstackResponseCode.valueOf(deserializer.deserializeUInt8()); + } + + /** + * This field indicates either SUCCESS (0) or FAILURE (1). + * + * @return the current status as {@link ZstackResponseCode} + */ + public ZstackResponseCode getStatus() { + return status; + } + + /** + * This field indicates either SUCCESS (0) or FAILURE (1). + * + * @param status the Status to set as {@link ZstackResponseCode} + */ + public void setStatus(ZstackResponseCode status) { + this.status = status; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(55); + builder.append("ZstackZdoStartupFromAppSrsp [status="); + builder.append(status); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoStateChangeIndAreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoStateChangeIndAreq.java index 0c7bee990..5a8bc095d 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoStateChangeIndAreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoStateChangeIndAreq.java @@ -1,66 +1,67 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.zdo; - -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; -import com.zsmartsystems.zigbee.dongle.zstack.api.sys.ZstackZdoState; - -/** - * Class to implement the Z-Stack command ZDO_STATE_CHANGE_IND. - *

- * This callback message indicates the ZDO state change. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackZdoStateChangeIndAreq extends ZstackFrameResponse { - - /** - * Specifies the changed ZDO state. An enumerated list starting from 0. - */ - private ZstackZdoState state; - - /** - * Response and Handler constructor - */ - public ZstackZdoStateChangeIndAreq(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - // Deserialize the fields - state = ZstackZdoState.valueOf(deserializer.deserializeUInt8()); - } - - /** - * Specifies the changed ZDO state. An enumerated list starting from 0. - * - * @return the current state as {@link ZstackZdoState} - */ - public ZstackZdoState getState() { - return state; - } - - /** - * Specifies the changed ZDO state. An enumerated list starting from 0. - * - * @param state the State to set as {@link ZstackZdoState} - */ - public void setState(ZstackZdoState state) { - this.state = state; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(55); - builder.append("ZstackZdoStateChangeIndAreq [state="); - builder.append(state); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.zdo; + +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import com.zsmartsystems.zigbee.dongle.zstack.api.sys.ZstackZdoState; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command ZDO_STATE_CHANGE_IND. + *

+ * This callback message indicates the ZDO state change. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackZdoStateChangeIndAreq extends ZstackFrameResponse { + + /** + * Specifies the changed ZDO state. An enumerated list starting from 0. + */ + private ZstackZdoState state; + + /** + * Response and Handler constructor + */ + public ZstackZdoStateChangeIndAreq(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + // Deserialize the fields + state = ZstackZdoState.valueOf(deserializer.deserializeUInt8()); + } + + /** + * Specifies the changed ZDO state. An enumerated list starting from 0. + * + * @return the current state as {@link ZstackZdoState} + */ + public ZstackZdoState getState() { + return state; + } + + /** + * Specifies the changed ZDO state. An enumerated list starting from 0. + * + * @param state the State to set as {@link ZstackZdoState} + */ + public void setState(ZstackZdoState state) { + this.state = state; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(55); + builder.append("ZstackZdoStateChangeIndAreq [state="); + builder.append(state); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoTcDevIndAreq.java b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoTcDevIndAreq.java index 3dd0ed4db..6ae35f7b3 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoTcDevIndAreq.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/main/java/com/zsmartsystems/zigbee/dongle/zstack/api/zdo/ZstackZdoTcDevIndAreq.java @@ -1,119 +1,120 @@ -/** - * Copyright (c) 2016-2022 by the respective copyright holders. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package com.zsmartsystems.zigbee.dongle.zstack.api.zdo; - -import com.zsmartsystems.zigbee.IeeeAddress; -import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; - -/** - * Class to implement the Z-Stack command ZDO_TC_DEV_IND. - *

- * This message is a ZDO callback for TC Device Indication. This is an indication that the TC has delivered the key to a recently - * joined device. - *

- * Note that this code is autogenerated. Manual changes may be overwritten. - * - * @author Chris Jackson - */ -public class ZstackZdoTcDevIndAreq extends ZstackFrameResponse { - - /** - * Source network Address - */ - private int srcAddr; - - /** - * IEEE Address of the source - */ - private IeeeAddress extAddr; - - /** - * Network address of the parent - */ - private int parentAddr; - - /** - * Response and Handler constructor - */ - public ZstackZdoTcDevIndAreq(int[] inputBuffer) { - // Super creates deserializer and reads header fields - super(inputBuffer); - - // Deserialize the fields - srcAddr = deserializer.deserializeUInt16(); - extAddr = deserializer.deserializeIeeeAddress(); - parentAddr = deserializer.deserializeUInt16(); - } - - /** - * Source network Address - * - * @return the current srcAddr as {@link int} - */ - public int getSrcAddr() { - return srcAddr; - } - - /** - * Source network Address - * - * @param srcAddr the SrcAddr to set as {@link int} - */ - public void setSrcAddr(int srcAddr) { - this.srcAddr = srcAddr; - } - - /** - * IEEE Address of the source - * - * @return the current extAddr as {@link IeeeAddress} - */ - public IeeeAddress getExtAddr() { - return extAddr; - } - - /** - * IEEE Address of the source - * - * @param extAddr the ExtAddr to set as {@link IeeeAddress} - */ - public void setExtAddr(IeeeAddress extAddr) { - this.extAddr = extAddr; - } - - /** - * Network address of the parent - * - * @return the current parentAddr as {@link int} - */ - public int getParentAddr() { - return parentAddr; - } - - /** - * Network address of the parent - * - * @param parentAddr the ParentAddr to set as {@link int} - */ - public void setParentAddr(int parentAddr) { - this.parentAddr = parentAddr; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(99); - builder.append("ZstackZdoTcDevIndAreq [srcAddr="); - builder.append(String.format("%04X", srcAddr)); - builder.append(", extAddr="); - builder.append(extAddr); - builder.append(", parentAddr="); - builder.append(String.format("%04X", parentAddr)); - builder.append(']'); - return builder.toString(); - } -} +/** + * Copyright (c) 2016-2022 by the respective copyright holders. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package com.zsmartsystems.zigbee.dongle.zstack.api.zdo; + +import com.zsmartsystems.zigbee.IeeeAddress; +import com.zsmartsystems.zigbee.dongle.zstack.api.ZstackFrameResponse; +import javax.annotation.Generated; + +/** + * Class to implement the Z-Stack command ZDO_TC_DEV_IND. + *

+ * This message is a ZDO callback for TC Device Indication. This is an indication that the TC has delivered the key to a recently + * joined device. + *

+ * Note that this code is autogenerated. Manual changes may be overwritten. + */ + +@Generated(value = "com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator", date = "Sun Mar 26 09:52:48 CEST 2023") +public class ZstackZdoTcDevIndAreq extends ZstackFrameResponse { + + /** + * Source network Address + */ + private int srcAddr; + + /** + * IEEE Address of the source + */ + private IeeeAddress extAddr; + + /** + * Network address of the parent + */ + private int parentAddr; + + /** + * Response and Handler constructor + */ + public ZstackZdoTcDevIndAreq(int[] inputBuffer) { + // Super creates deserializer and reads header fields + super(inputBuffer); + + // Deserialize the fields + srcAddr = deserializer.deserializeUInt16(); + extAddr = deserializer.deserializeIeeeAddress(); + parentAddr = deserializer.deserializeUInt16(); + } + + /** + * Source network Address + * + * @return the current srcAddr as {@link int} + */ + public int getSrcAddr() { + return srcAddr; + } + + /** + * Source network Address + * + * @param srcAddr the SrcAddr to set as {@link int} + */ + public void setSrcAddr(int srcAddr) { + this.srcAddr = srcAddr; + } + + /** + * IEEE Address of the source + * + * @return the current extAddr as {@link IeeeAddress} + */ + public IeeeAddress getExtAddr() { + return extAddr; + } + + /** + * IEEE Address of the source + * + * @param extAddr the ExtAddr to set as {@link IeeeAddress} + */ + public void setExtAddr(IeeeAddress extAddr) { + this.extAddr = extAddr; + } + + /** + * Network address of the parent + * + * @return the current parentAddr as {@link int} + */ + public int getParentAddr() { + return parentAddr; + } + + /** + * Network address of the parent + * + * @param parentAddr the ParentAddr to set as {@link int} + */ + public void setParentAddr(int parentAddr) { + this.parentAddr = parentAddr; + } + + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(99); + builder.append("ZstackZdoTcDevIndAreq [srcAddr="); + builder.append(String.format("%04X", srcAddr)); + builder.append(", extAddr="); + builder.append(extAddr); + builder.append(", parentAddr="); + builder.append(String.format("%04X", parentAddr)); + builder.append(']'); + return builder.toString(); + } +} diff --git a/com.zsmartsystems.zigbee.dongle.zstack/src/test/java/com/zsmartsystems/zigbee/dongle/zstack/internal/ZstackProtocolHandlerTest.java b/com.zsmartsystems.zigbee.dongle.zstack/src/test/java/com/zsmartsystems/zigbee/dongle/zstack/internal/ZstackProtocolHandlerTest.java index 2155235d3..dded8c70b 100644 --- a/com.zsmartsystems.zigbee.dongle.zstack/src/test/java/com/zsmartsystems/zigbee/dongle/zstack/internal/ZstackProtocolHandlerTest.java +++ b/com.zsmartsystems.zigbee.dongle.zstack/src/test/java/com/zsmartsystems/zigbee/dongle/zstack/internal/ZstackProtocolHandlerTest.java @@ -114,13 +114,5 @@ public boolean open(int baudRate, FlowControl flowControl) { @Override public void purgeRxBuffer() { } - - @Override - public void setDtr(boolean state) { - } - - @Override - public void setRts(boolean state) { - } } } diff --git a/com.zsmartsystems.zigbee.serial/src/main/java/com/zsmartsystems/zigbee/serial/ZigBeeSerialPort.java b/com.zsmartsystems.zigbee.serial/src/main/java/com/zsmartsystems/zigbee/serial/ZigBeeSerialPort.java index 43f1f88db..24c5d254e 100644 --- a/com.zsmartsystems.zigbee.serial/src/main/java/com/zsmartsystems/zigbee/serial/ZigBeeSerialPort.java +++ b/com.zsmartsystems.zigbee.serial/src/main/java/com/zsmartsystems/zigbee/serial/ZigBeeSerialPort.java @@ -273,21 +273,19 @@ public void purgeRxBuffer() { } } - @Override - public void setDtr(boolean state) { + public boolean setDtr(boolean state) { try { - serialPort.setDTR(state); + return serialPort.setDTR(state); } catch (SerialPortException e) { - logger.warn("Could not set DTR to {} on {}", state, this.portName, e); + return false; } } - @Override - public void setRts(boolean state) { + public boolean setRts(boolean state) { try { - serialPort.setRTS(state); + return serialPort.setRTS(state); } catch (SerialPortException e) { - logger.warn("Could not set RTS to {} on {}", state, this.portName, e); + return false; } } } \ No newline at end of file diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/transport/ZigBeePort.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/transport/ZigBeePort.java index 1a95a67c8..6b52712c8 100644 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/transport/ZigBeePort.java +++ b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/transport/ZigBeePort.java @@ -85,16 +85,6 @@ public interface ZigBeePort { */ void purgeRxBuffer(); - /** - * Set DTR on Port - */ - void setDtr(boolean state); - - /** - * Set DTS on Port - */ - void setRts(boolean state); - /** * Enumeration of flow control options */