From a6d660745ff10043aa31324bd88de1ec12cf3522 Mon Sep 17 00:00:00 2001 From: Song Guo Date: Tue, 23 Feb 2021 04:23:52 +0800 Subject: [PATCH] [controller] Network commissioning support on Controller (#4622) * Add network provisioning cluster xml * Update cluster according to spec * Add Network Provisioning Support in Controller * Fix type * Restyled by prettier-json * Fix python type * Update generated files * Update xml * Fix * run gen * Restyled by clang-format * Restyled by prettier-json * Provisioning -> Commissioning * Update zap * Regenerate files * Create controller-clusters.zap * Restyled by prettier-json * fix Co-authored-by: Restyled.io --- .../all-clusters-common/gen/af-structs.h | 16 + .../all-clusters-common/gen/attribute-id.h | 6 + .../gen/client-command-macro.h | 219 + .../all-clusters-common/gen/cluster-id.h | 3 + .../all-clusters-common/gen/command-id.h | 19 + .../all-clusters-common/gen/enums.h | 35 + .../all-clusters-common/gen/print-cluster.h | 7 + .../bridge-app/bridge-common/gen/af-structs.h | 16 + .../bridge-common/gen/attribute-id.h | 13 + .../gen/call-command-handler.cpp | 51 + .../bridge-app/bridge-common/gen/callback.h | 23 + .../bridge-common/gen/client-command-macro.h | 309 + .../bridge-app/bridge-common/gen/cluster-id.h | 6 + .../bridge-app/bridge-common/gen/command-id.h | 32 + examples/bridge-app/bridge-common/gen/enums.h | 35 + .../bridge-common/gen/print-cluster.h | 14 + examples/chip-tool/gen/af-structs.h | 16 + examples/chip-tool/gen/attribute-id.h | 6 + examples/chip-tool/gen/client-command-macro.h | 219 + examples/chip-tool/gen/cluster-id.h | 3 + examples/chip-tool/gen/command-id.h | 19 + examples/chip-tool/gen/enums.h | 35 + examples/chip-tool/gen/print-cluster.h | 7 + examples/chip-tool/templates/commands.zapt | 2 +- examples/chip-tool/templates/helper.js | 6 + .../lighting-common/gen/af-structs.h | 16 + .../lighting-common/gen/attribute-id.h | 13 + .../gen/client-command-macro.h | 309 + .../lighting-common/gen/cluster-id.h | 6 + .../lighting-common/gen/command-id.h | 32 + .../lighting-app/lighting-common/gen/enums.h | 35 + .../lighting-common/gen/print-cluster.h | 14 + .../lock-app/lock-common/gen/af-structs.h | 16 + .../lock-app/lock-common/gen/attribute-id.h | 13 + .../lock-common/gen/client-command-macro.h | 309 + .../lock-app/lock-common/gen/cluster-id.h | 6 + .../lock-app/lock-common/gen/command-id.h | 32 + examples/lock-app/lock-common/gen/enums.h | 35 + .../lock-app/lock-common/gen/print-cluster.h | 14 + .../esp32/main/gen/af-structs.h | 16 + .../esp32/main/gen/attribute-id.h | 13 + .../esp32/main/gen/client-command-macro.h | 309 + .../esp32/main/gen/cluster-id.h | 6 + .../esp32/main/gen/command-id.h | 32 + .../esp32/main/gen/enums.h | 35 + .../esp32/main/gen/print-cluster.h | 14 + examples/tv-app/tv-common/gen/af-structs.h | 16 + examples/tv-app/tv-common/gen/attribute-id.h | 6 + .../tv-common/gen/client-command-macro.h | 219 + examples/tv-app/tv-common/gen/cluster-id.h | 3 + examples/tv-app/tv-common/gen/command-id.h | 19 + examples/tv-app/tv-common/gen/enums.h | 35 + examples/tv-app/tv-common/gen/print-cluster.h | 7 + scripts/tools/zap_generate_chip.sh | 3 +- src/app/chip-zcl-zpro-codec-api.h | 1 + src/app/encoder.cpp | 1 + src/app/zap-templates/zcl/commissioning.xml | 163 + src/app/zap-templates/zcl/zcl.json | 3 +- src/controller/controller-clusters.zap | 6031 +++++++++++++++++ src/darwin/Framework/CHIP/CHIPClustersObjc.h | 591 ++ src/darwin/Framework/CHIP/CHIPClustersObjc.mm | 3593 ++++++++++ src/darwin/Framework/CHIP/chip-tool.zap | 276 +- src/darwin/Framework/CHIP/gen/af-structs.h | 16 + src/darwin/Framework/CHIP/gen/attribute-id.h | 6 + .../Framework/CHIP/gen/client-command-macro.h | 219 + src/darwin/Framework/CHIP/gen/cluster-id.h | 3 + src/darwin/Framework/CHIP/gen/command-id.h | 19 + src/darwin/Framework/CHIP/gen/enums.h | 35 + src/darwin/Framework/CHIP/gen/print-cluster.h | 7 + 69 files changed, 13614 insertions(+), 50 deletions(-) create mode 100644 src/app/zap-templates/zcl/commissioning.xml create mode 100644 src/controller/controller-clusters.zap create mode 100644 src/darwin/Framework/CHIP/CHIPClustersObjc.h create mode 100644 src/darwin/Framework/CHIP/CHIPClustersObjc.mm diff --git a/examples/all-clusters-app/all-clusters-common/gen/af-structs.h b/examples/all-clusters-app/all-clusters-common/gen/af-structs.h index c5cd195f38d882..f62d10bb3b39a6 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/af-structs.h +++ b/examples/all-clusters-app/all-clusters-common/gen/af-structs.h @@ -364,6 +364,12 @@ typedef struct _SpecialDay uint8_t dayIdRef; } EmberAfSpecialDay; +// Struct for ThreadInterfaceScanResult +typedef struct _ThreadInterfaceScanResult +{ + uint8_t * DiscoveryResponse; +} EmberAfThreadInterfaceScanResult; + // Struct for TierLabelsPayload typedef struct _TierLabelsPayload { @@ -390,6 +396,16 @@ typedef struct _TransferredPhase uint16_t maxActivationDelay; } EmberAfTransferredPhase; +// Struct for WiFiInterfaceScanResult +typedef struct _WiFiInterfaceScanResult +{ + uint8_t Security; + uint8_t * SSID; + uint8_t * BSSID; + uint8_t Channel; + uint32_t FrequencyBand; +} EmberAfWiFiInterfaceScanResult; + // Struct for WriteAttributeRecord typedef struct _WriteAttributeRecord { diff --git a/examples/all-clusters-app/all-clusters-common/gen/attribute-id.h b/examples/all-clusters-app/all-clusters-common/gen/attribute-id.h index 53d77d58e4943e..41b22f4ec79886 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/attribute-id.h +++ b/examples/all-clusters-app/all-clusters-common/gen/attribute-id.h @@ -4058,6 +4058,12 @@ // Server attributes +// Attribute ids for cluster: Network Commissioning + +// Client attributes + +// Server attributes + // Attribute ids for cluster: Binding // Client attributes diff --git a/examples/all-clusters-app/all-clusters-common/gen/client-command-macro.h b/examples/all-clusters-app/all-clusters-common/gen/client-command-macro.h index 03759c6fe2424c..8f735d04e66b9e 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/client-command-macro.h +++ b/examples/all-clusters-app/all-clusters-common/gen/client-command-macro.h @@ -5658,6 +5658,225 @@ ZCL_GET_ENDPOINT_LIST_REQUEST_COMMAND_ID, "uuuub", startIndex, total, startIndex, count, \ endpointInformationRecordList, endpointInformationRecordListLen); +/** @brief Command description for ScanNetworks + * + * Command: ScanNetworks + * @param ssid OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterScanNetworks(ssid, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_SCAN_NETWORKS_COMMAND_ID, "uuu", ssid, breadcrumb, timeoutMs); + +/** @brief Command description for ScanNetworksResponse + * + * Command: ScanNetworksResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + * @param wifiScanResults WiFiInterfaceScanResult [] + * @param wifiScanResultsLen int + * @param threadScanResults ThreadInterfaceScanResult [] + * @param threadScanResultsLen int + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterScanNetworksResponse(errorCode, debugText, wifiScanResults, wifiScanResultsLen, threadScanResults, \ + threadScanResultsLen) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_SCAN_NETWORKS_RESPONSE_COMMAND_ID, "uubb", errorCode, debugText, wifiScanResults, \ + wifiScanResultsLen, threadScanResults, threadScanResultsLen); + +/** @brief Command description for AddWiFiNetwork + * + * Command: AddWiFiNetwork + * @param ssid OCTET_STRING + * @param credentials OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterAddWiFiNetwork(ssid, credentials, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ADD_WI_FI_NETWORK_COMMAND_ID, "uuuu", ssid, credentials, breadcrumb, timeoutMs); + +/** @brief Command description for AddWiFiNetworkResponse + * + * Command: AddWiFiNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterAddWiFiNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ADD_WI_FI_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for UpdateWiFiNetwork + * + * Command: UpdateWiFiNetwork + * @param ssid OCTET_STRING + * @param credentials OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterUpdateWiFiNetwork(ssid, credentials, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_UPDATE_WI_FI_NETWORK_COMMAND_ID, "uuuu", ssid, credentials, breadcrumb, timeoutMs); + +/** @brief Command description for UpdateWiFiNetworkResponse + * + * Command: UpdateWiFiNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterUpdateWiFiNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_UPDATE_WI_FI_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for AddThreadNetwork + * + * Command: AddThreadNetwork + * @param operationalDataset OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterAddThreadNetwork(operationalDataset, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ADD_THREAD_NETWORK_COMMAND_ID, "uuu", operationalDataset, breadcrumb, timeoutMs); + +/** @brief Command description for AddThreadNetworkResponse + * + * Command: AddThreadNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterAddThreadNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ADD_THREAD_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for UpdateThreadNetwork + * + * Command: UpdateThreadNetwork + * @param operationalDataset OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterUpdateThreadNetwork(operationalDataset, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_UPDATE_THREAD_NETWORK_COMMAND_ID, "uuu", operationalDataset, breadcrumb, timeoutMs); + +/** @brief Command description for UpdateThreadNetworkResponse + * + * Command: UpdateThreadNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterUpdateThreadNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_UPDATE_THREAD_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for RemoveNetwork + * + * Command: RemoveNetwork + * @param NetworkID OCTET_STRING + * @param Breadcrumb INT64U + * @param TimeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterRemoveNetwork(NetworkID, Breadcrumb, TimeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_REMOVE_NETWORK_COMMAND_ID, "uuu", NetworkID, Breadcrumb, TimeoutMs); + +/** @brief Command description for RemoveNetworkResponse + * + * Command: RemoveNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterRemoveNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_REMOVE_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for EnableNetwork + * + * Command: EnableNetwork + * @param networkID OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterEnableNetwork(networkID, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ENABLE_NETWORK_COMMAND_ID, "uuu", networkID, breadcrumb, timeoutMs); + +/** @brief Command description for EnableNetworkResponse + * + * Command: EnableNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterEnableNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ENABLE_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for DisableNetwork + * + * Command: DisableNetwork + * @param networkID OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterDisableNetwork(networkID, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_DISABLE_NETWORK_COMMAND_ID, "uuu", networkID, breadcrumb, timeoutMs); + +/** @brief Command description for DisableNetworkResponse + * + * Command: DisableNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterDisableNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_DISABLE_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for GetLastNetworkCommissioningResult + * + * Command: GetLastNetworkCommissioningResult + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterGetLastNetworkCommissioningResult(timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_GET_LAST_NETWORK_COMMISSIONING_RESULT_COMMAND_ID, "u", timeoutMs); + /** @brief Command description for Bind * * Command: Bind diff --git a/examples/all-clusters-app/all-clusters-common/gen/cluster-id.h b/examples/all-clusters-app/all-clusters-common/gen/cluster-id.h index 8ceb0901c053f6..852a0659d203e0 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/cluster-id.h +++ b/examples/all-clusters-app/all-clusters-common/gen/cluster-id.h @@ -332,6 +332,9 @@ // Definitions for cluster: ZLL Commissioning #define ZCL_ZLL_COMMISSIONING_CLUSTER_ID (0x1000) +// Definitions for cluster: Network Commissioning +#define ZCL_NETWORK_COMMISSIONING_CLUSTER_ID (0xAAAA) + // Definitions for cluster: Binding #define ZCL_BINDING_CLUSTER_ID (0xF000) diff --git a/examples/all-clusters-app/all-clusters-common/gen/command-id.h b/examples/all-clusters-app/all-clusters-common/gen/command-id.h index 572446cf490a4a..db416f663435a6 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/command-id.h +++ b/examples/all-clusters-app/all-clusters-common/gen/command-id.h @@ -685,6 +685,25 @@ #define ZCL_GET_ENDPOINT_LIST_REQUEST_COMMAND_ID (0x42) #define ZCL_GET_ENDPOINT_LIST_RESPONSE_COMMAND_ID (0x42) +// Commands for cluster: Network Commissioning +#define ZCL_SCAN_NETWORKS_COMMAND_ID (0x00) +#define ZCL_SCAN_NETWORKS_RESPONSE_COMMAND_ID (0x01) +#define ZCL_ADD_WI_FI_NETWORK_COMMAND_ID (0x02) +#define ZCL_ADD_WI_FI_NETWORK_RESPONSE_COMMAND_ID (0x03) +#define ZCL_UPDATE_WI_FI_NETWORK_COMMAND_ID (0x04) +#define ZCL_UPDATE_WI_FI_NETWORK_RESPONSE_COMMAND_ID (0x05) +#define ZCL_ADD_THREAD_NETWORK_COMMAND_ID (0x06) +#define ZCL_ADD_THREAD_NETWORK_RESPONSE_COMMAND_ID (0x07) +#define ZCL_UPDATE_THREAD_NETWORK_COMMAND_ID (0x08) +#define ZCL_UPDATE_THREAD_NETWORK_RESPONSE_COMMAND_ID (0x09) +#define ZCL_REMOVE_NETWORK_COMMAND_ID (0x0A) +#define ZCL_REMOVE_NETWORK_RESPONSE_COMMAND_ID (0x0B) +#define ZCL_ENABLE_NETWORK_COMMAND_ID (0x0C) +#define ZCL_ENABLE_NETWORK_RESPONSE_COMMAND_ID (0x0D) +#define ZCL_DISABLE_NETWORK_COMMAND_ID (0x0E) +#define ZCL_DISABLE_NETWORK_RESPONSE_COMMAND_ID (0x0F) +#define ZCL_GET_LAST_NETWORK_COMMISSIONING_RESULT_COMMAND_ID (0x10) + // Commands for cluster: Binding #define ZCL_BIND_COMMAND_ID (0x00) #define ZCL_UNBIND_COMMAND_ID (0x01) diff --git a/examples/all-clusters-app/all-clusters-common/gen/enums.h b/examples/all-clusters-app/all-clusters-common/gen/enums.h index 7cf4c5c578e788..1f0a326946cc80 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/enums.h +++ b/examples/all-clusters-app/all-clusters-common/gen/enums.h @@ -1873,6 +1873,31 @@ typedef enum EMBER_ZCL_MOVE_MODE_DOWN = 1, } EmberAfMoveMode; +// Enum for NetworkCommissioningError +typedef enum +{ + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_SUCCESS = 0, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_OUT_OF_RANGE = 1, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_BOUNDS_EXCEEDED = 2, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_NETWORK_ID_NOT_FOUND = 3, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_DUPLICATE_NETWORK_ID = 4, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_NETWORK_NOT_FOUND = 5, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_REGULATORY_ERROR = 6, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_AUTH_FAILURE = 7, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_UNSUPPORTED_SECURITY = 8, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_OTHER_CONNECTION_FAILURE = 9, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_IPV6_FAILED = 10, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_IP_BIND_FAILED = 11, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL9 = 12, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL10 = 13, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL11 = 14, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL12 = 15, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL13 = 16, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL14 = 17, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL15 = 18, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_UNKNOWN_ERROR = 19, +} EmberAfNetworkCommissioningError; + // Enum for NotificationScheme typedef enum { @@ -3887,6 +3912,16 @@ typedef enum #define EMBER_AF_RESTART_OPTIONS_IMMEDIATE_OFFSET (3) #define EMBER_AF_SCENES_COPY_MODE_COPY_ALL_SCENES (1) #define EMBER_AF_SCENES_COPY_MODE_COPY_ALL_SCENES_OFFSET (0) +#define EMBER_AF_SECURITY_TYPE_UNENCRYPTED (1) +#define EMBER_AF_SECURITY_TYPE_UNENCRYPTED_OFFSET (0) +#define EMBER_AF_SECURITY_TYPE_WEP_PERSONAL (2) +#define EMBER_AF_SECURITY_TYPE_WEP_PERSONAL_OFFSET (1) +#define EMBER_AF_SECURITY_TYPE_WPA_PERSONAL (4) +#define EMBER_AF_SECURITY_TYPE_WPA_PERSONAL_OFFSET (2) +#define EMBER_AF_SECURITY_TYPE_WPA2_PERSONAL (8) +#define EMBER_AF_SECURITY_TYPE_WPA2_PERSONAL_OFFSET (3) +#define EMBER_AF_SECURITY_TYPE_WPA3_PERSONAL (16) +#define EMBER_AF_SECURITY_TYPE_WPA3_PERSONAL_OFFSET (4) #define EMBER_AF_SHADE_CLOSURE_STATUS_OPERATIONAL (1) #define EMBER_AF_SHADE_CLOSURE_STATUS_OPERATIONAL_OFFSET (0) #define EMBER_AF_SHADE_CLOSURE_STATUS_ADJUSTING (2) diff --git a/examples/all-clusters-app/all-clusters-common/gen/print-cluster.h b/examples/all-clusters-app/all-clusters-common/gen/print-cluster.h index 5a37b559c5d0c5..b91198407ac3a8 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/print-cluster.h +++ b/examples/all-clusters-app/all-clusters-common/gen/print-cluster.h @@ -716,6 +716,12 @@ #define CHIP_PRINTCLUSTER_ZLL_COMMISSIONING_CLUSTER #endif +#if defined(ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_SERVER) || defined(ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER { ZCL_NETWORK_COMMISSIONING_CLUSTER_ID, 43690, "Network Commissioning" }, +#else +#define CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER +#endif + #if defined(ZCL_USING_BINDING_CLUSTER_SERVER) || defined(ZCL_USING_BINDING_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_BINDING_CLUSTER { ZCL_BINDING_CLUSTER_ID, 61440, "Binding" }, #else @@ -864,6 +870,7 @@ CHIP_PRINTCLUSTER_ELECTRICAL_MEASUREMENT_CLUSTER \ CHIP_PRINTCLUSTER_DIAGNOSTICS_CLUSTER \ CHIP_PRINTCLUSTER_ZLL_COMMISSIONING_CLUSTER \ + CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER \ CHIP_PRINTCLUSTER_BINDING_CLUSTER \ CHIP_PRINTCLUSTER_MEDIA_PLAYBACK_CLUSTER \ CHIP_PRINTCLUSTER_SAMPLE_MFG_SPECIFIC_CLUSTER \ diff --git a/examples/bridge-app/bridge-common/gen/af-structs.h b/examples/bridge-app/bridge-common/gen/af-structs.h index c5cd195f38d882..f62d10bb3b39a6 100644 --- a/examples/bridge-app/bridge-common/gen/af-structs.h +++ b/examples/bridge-app/bridge-common/gen/af-structs.h @@ -364,6 +364,12 @@ typedef struct _SpecialDay uint8_t dayIdRef; } EmberAfSpecialDay; +// Struct for ThreadInterfaceScanResult +typedef struct _ThreadInterfaceScanResult +{ + uint8_t * DiscoveryResponse; +} EmberAfThreadInterfaceScanResult; + // Struct for TierLabelsPayload typedef struct _TierLabelsPayload { @@ -390,6 +396,16 @@ typedef struct _TransferredPhase uint16_t maxActivationDelay; } EmberAfTransferredPhase; +// Struct for WiFiInterfaceScanResult +typedef struct _WiFiInterfaceScanResult +{ + uint8_t Security; + uint8_t * SSID; + uint8_t * BSSID; + uint8_t Channel; + uint32_t FrequencyBand; +} EmberAfWiFiInterfaceScanResult; + // Struct for WriteAttributeRecord typedef struct _WriteAttributeRecord { diff --git a/examples/bridge-app/bridge-common/gen/attribute-id.h b/examples/bridge-app/bridge-common/gen/attribute-id.h index 0fd456c36a20f6..41b22f4ec79886 100644 --- a/examples/bridge-app/bridge-common/gen/attribute-id.h +++ b/examples/bridge-app/bridge-common/gen/attribute-id.h @@ -4058,12 +4058,25 @@ // Server attributes +// Attribute ids for cluster: Network Commissioning + +// Client attributes + +// Server attributes + // Attribute ids for cluster: Binding // Client attributes // Server attributes +// Attribute ids for cluster: Media Playback + +// Client attributes + +// Server attributes +#define ZCL_CURRENT_STATE_ATTRIBUTE_ID (0x0000) + // Attribute ids for cluster: Sample Mfg Specific Cluster // Client attributes diff --git a/examples/bridge-app/bridge-common/gen/call-command-handler.cpp b/examples/bridge-app/bridge-common/gen/call-command-handler.cpp index d1a86ac8a37a67..290ea176ba8b04 100644 --- a/examples/bridge-app/bridge-common/gen/call-command-handler.cpp +++ b/examples/bridge-app/bridge-common/gen/call-command-handler.cpp @@ -338,10 +338,61 @@ EmberAfStatus emberAfOnOffClusterServerCommandParse(EmberAfClusterCommand * cmd) wasHandled = emberAfOnOffClusterOffCallback(); break; } + case ZCL_OFF_WITH_EFFECT_COMMAND_ID: { + uint16_t payloadOffset = cmd->payloadStartIndex; + uint8_t effectId; + uint8_t effectVariant; + + if (cmd->bufLen < payloadOffset + 1) + { + return EMBER_ZCL_STATUS_MALFORMED_COMMAND; + } + effectId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); + if (cmd->bufLen < payloadOffset + 1) + { + return EMBER_ZCL_STATUS_MALFORMED_COMMAND; + } + effectVariant = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + + wasHandled = emberAfOnOffClusterOffWithEffectCallback(effectId, effectVariant); + break; + } case ZCL_ON_COMMAND_ID: { wasHandled = emberAfOnOffClusterOnCallback(); break; } + case ZCL_ON_WITH_RECALL_GLOBAL_SCENE_COMMAND_ID: { + wasHandled = emberAfOnOffClusterOnWithRecallGlobalSceneCallback(); + break; + } + case ZCL_ON_WITH_TIMED_OFF_COMMAND_ID: { + uint16_t payloadOffset = cmd->payloadStartIndex; + uint8_t onOffControl; + uint16_t onTime; + uint16_t offWaitTime; + + if (cmd->bufLen < payloadOffset + 1) + { + return EMBER_ZCL_STATUS_MALFORMED_COMMAND; + } + onOffControl = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); + if (cmd->bufLen < payloadOffset + 2) + { + return EMBER_ZCL_STATUS_MALFORMED_COMMAND; + } + onTime = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 2); + if (cmd->bufLen < payloadOffset + 2) + { + return EMBER_ZCL_STATUS_MALFORMED_COMMAND; + } + offWaitTime = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); + + wasHandled = emberAfOnOffClusterOnWithTimedOffCallback(onOffControl, onTime, offWaitTime); + break; + } case ZCL_TOGGLE_COMMAND_ID: { wasHandled = emberAfOnOffClusterToggleCallback(); break; diff --git a/examples/bridge-app/bridge-common/gen/callback.h b/examples/bridge-app/bridge-common/gen/callback.h index 6b284ee368dc37..d8c5333ac8a2dd 100644 --- a/examples/bridge-app/bridge-common/gen/callback.h +++ b/examples/bridge-app/bridge-common/gen/callback.h @@ -355,12 +355,35 @@ bool emberAfLevelControlClusterStopWithOnOffCallback(); bool emberAfOnOffClusterOffCallback(); +/** + * @brief On/off Cluster OffWithEffect Command callback + * @param effectId + * @param effectVariant + */ + +bool emberAfOnOffClusterOffWithEffectCallback(uint8_t effectId, uint8_t effectVariant); + /** * @brief On/off Cluster On Command callback */ bool emberAfOnOffClusterOnCallback(); +/** + * @brief On/off Cluster OnWithRecallGlobalScene Command callback + */ + +bool emberAfOnOffClusterOnWithRecallGlobalSceneCallback(); + +/** + * @brief On/off Cluster OnWithTimedOff Command callback + * @param onOffControl + * @param onTime + * @param offWaitTime + */ + +bool emberAfOnOffClusterOnWithTimedOffCallback(uint8_t onOffControl, uint16_t onTime, uint16_t offWaitTime); + /** * @brief On/off Cluster Toggle Command callback */ diff --git a/examples/bridge-app/bridge-common/gen/client-command-macro.h b/examples/bridge-app/bridge-common/gen/client-command-macro.h index 0778dd6cec105d..8f735d04e66b9e 100644 --- a/examples/bridge-app/bridge-common/gen/client-command-macro.h +++ b/examples/bridge-app/bridge-common/gen/client-command-macro.h @@ -5658,6 +5658,225 @@ ZCL_GET_ENDPOINT_LIST_REQUEST_COMMAND_ID, "uuuub", startIndex, total, startIndex, count, \ endpointInformationRecordList, endpointInformationRecordListLen); +/** @brief Command description for ScanNetworks + * + * Command: ScanNetworks + * @param ssid OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterScanNetworks(ssid, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_SCAN_NETWORKS_COMMAND_ID, "uuu", ssid, breadcrumb, timeoutMs); + +/** @brief Command description for ScanNetworksResponse + * + * Command: ScanNetworksResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + * @param wifiScanResults WiFiInterfaceScanResult [] + * @param wifiScanResultsLen int + * @param threadScanResults ThreadInterfaceScanResult [] + * @param threadScanResultsLen int + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterScanNetworksResponse(errorCode, debugText, wifiScanResults, wifiScanResultsLen, threadScanResults, \ + threadScanResultsLen) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_SCAN_NETWORKS_RESPONSE_COMMAND_ID, "uubb", errorCode, debugText, wifiScanResults, \ + wifiScanResultsLen, threadScanResults, threadScanResultsLen); + +/** @brief Command description for AddWiFiNetwork + * + * Command: AddWiFiNetwork + * @param ssid OCTET_STRING + * @param credentials OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterAddWiFiNetwork(ssid, credentials, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ADD_WI_FI_NETWORK_COMMAND_ID, "uuuu", ssid, credentials, breadcrumb, timeoutMs); + +/** @brief Command description for AddWiFiNetworkResponse + * + * Command: AddWiFiNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterAddWiFiNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ADD_WI_FI_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for UpdateWiFiNetwork + * + * Command: UpdateWiFiNetwork + * @param ssid OCTET_STRING + * @param credentials OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterUpdateWiFiNetwork(ssid, credentials, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_UPDATE_WI_FI_NETWORK_COMMAND_ID, "uuuu", ssid, credentials, breadcrumb, timeoutMs); + +/** @brief Command description for UpdateWiFiNetworkResponse + * + * Command: UpdateWiFiNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterUpdateWiFiNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_UPDATE_WI_FI_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for AddThreadNetwork + * + * Command: AddThreadNetwork + * @param operationalDataset OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterAddThreadNetwork(operationalDataset, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ADD_THREAD_NETWORK_COMMAND_ID, "uuu", operationalDataset, breadcrumb, timeoutMs); + +/** @brief Command description for AddThreadNetworkResponse + * + * Command: AddThreadNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterAddThreadNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ADD_THREAD_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for UpdateThreadNetwork + * + * Command: UpdateThreadNetwork + * @param operationalDataset OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterUpdateThreadNetwork(operationalDataset, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_UPDATE_THREAD_NETWORK_COMMAND_ID, "uuu", operationalDataset, breadcrumb, timeoutMs); + +/** @brief Command description for UpdateThreadNetworkResponse + * + * Command: UpdateThreadNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterUpdateThreadNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_UPDATE_THREAD_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for RemoveNetwork + * + * Command: RemoveNetwork + * @param NetworkID OCTET_STRING + * @param Breadcrumb INT64U + * @param TimeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterRemoveNetwork(NetworkID, Breadcrumb, TimeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_REMOVE_NETWORK_COMMAND_ID, "uuu", NetworkID, Breadcrumb, TimeoutMs); + +/** @brief Command description for RemoveNetworkResponse + * + * Command: RemoveNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterRemoveNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_REMOVE_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for EnableNetwork + * + * Command: EnableNetwork + * @param networkID OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterEnableNetwork(networkID, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ENABLE_NETWORK_COMMAND_ID, "uuu", networkID, breadcrumb, timeoutMs); + +/** @brief Command description for EnableNetworkResponse + * + * Command: EnableNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterEnableNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ENABLE_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for DisableNetwork + * + * Command: DisableNetwork + * @param networkID OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterDisableNetwork(networkID, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_DISABLE_NETWORK_COMMAND_ID, "uuu", networkID, breadcrumb, timeoutMs); + +/** @brief Command description for DisableNetworkResponse + * + * Command: DisableNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterDisableNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_DISABLE_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for GetLastNetworkCommissioningResult + * + * Command: GetLastNetworkCommissioningResult + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterGetLastNetworkCommissioningResult(timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_GET_LAST_NETWORK_COMMISSIONING_RESULT_COMMAND_ID, "u", timeoutMs); + /** @brief Command description for Bind * * Command: Bind @@ -5684,6 +5903,96 @@ \ ZCL_UNBIND_COMMAND_ID, "uuuu", nodeId, groupId, endpointId, clusterId); +/** @brief Command description for PlayRequest + * + * Command: PlayRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterPlayRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_PLAY_REQUEST_COMMAND_ID, "", ); + +/** @brief Command description for PauseRequest + * + * Command: PauseRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterPauseRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_PAUSE_REQUEST_COMMAND_ID, "", ); + +/** @brief Command description for StopRequest + * + * Command: StopRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterStopRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_STOP_REQUEST_COMMAND_ID, "", ); + +/** @brief Command description for StartOverRequest + * + * Command: StartOverRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterStartOverRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_START_OVER_REQUEST_COMMAND_ID, "", ); + +/** @brief Command description for PreviousRequest + * + * Command: PreviousRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterPreviousRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_PREVIOUS_REQUEST_COMMAND_ID, "", ); + +/** @brief Command description for NextRequest + * + * Command: NextRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterNextRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_NEXT_REQUEST_COMMAND_ID, "", ); + +/** @brief Command description for RewindRequest + * + * Command: RewindRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterRewindRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_REWIND_REQUEST_COMMAND_ID, "", ); + +/** @brief Command description for FastForwardRequest + * + * Command: FastForwardRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterFastForwardRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_FAST_FORWARD_REQUEST_COMMAND_ID, "", ); + +/** @brief Command description for SkipForwardRequest + * + * Command: SkipForwardRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterSkipForwardRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_SKIP_FORWARD_REQUEST_COMMAND_ID, "", ); + +/** @brief Command description for SkipBackwardRequest + * + * Command: SkipBackwardRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterSkipBackwardRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_SKIP_BACKWARD_REQUEST_COMMAND_ID, "", ); + /** @brief Command description for CommandOne * * Command: CommandOne diff --git a/examples/bridge-app/bridge-common/gen/cluster-id.h b/examples/bridge-app/bridge-common/gen/cluster-id.h index 262de53f3b3378..852a0659d203e0 100644 --- a/examples/bridge-app/bridge-common/gen/cluster-id.h +++ b/examples/bridge-app/bridge-common/gen/cluster-id.h @@ -332,9 +332,15 @@ // Definitions for cluster: ZLL Commissioning #define ZCL_ZLL_COMMISSIONING_CLUSTER_ID (0x1000) +// Definitions for cluster: Network Commissioning +#define ZCL_NETWORK_COMMISSIONING_CLUSTER_ID (0xAAAA) + // Definitions for cluster: Binding #define ZCL_BINDING_CLUSTER_ID (0xF000) +// Definitions for cluster: Media Playback +#define ZCL_MEDIA_PLAYBACK_CLUSTER_ID (0xF001) + // Definitions for cluster: Sample Mfg Specific Cluster #define ZCL_SAMPLE_MFG_SPECIFIC_CLUSTER_ID (0xFC00) diff --git a/examples/bridge-app/bridge-common/gen/command-id.h b/examples/bridge-app/bridge-common/gen/command-id.h index 9e608623150c7c..db416f663435a6 100644 --- a/examples/bridge-app/bridge-common/gen/command-id.h +++ b/examples/bridge-app/bridge-common/gen/command-id.h @@ -685,10 +685,42 @@ #define ZCL_GET_ENDPOINT_LIST_REQUEST_COMMAND_ID (0x42) #define ZCL_GET_ENDPOINT_LIST_RESPONSE_COMMAND_ID (0x42) +// Commands for cluster: Network Commissioning +#define ZCL_SCAN_NETWORKS_COMMAND_ID (0x00) +#define ZCL_SCAN_NETWORKS_RESPONSE_COMMAND_ID (0x01) +#define ZCL_ADD_WI_FI_NETWORK_COMMAND_ID (0x02) +#define ZCL_ADD_WI_FI_NETWORK_RESPONSE_COMMAND_ID (0x03) +#define ZCL_UPDATE_WI_FI_NETWORK_COMMAND_ID (0x04) +#define ZCL_UPDATE_WI_FI_NETWORK_RESPONSE_COMMAND_ID (0x05) +#define ZCL_ADD_THREAD_NETWORK_COMMAND_ID (0x06) +#define ZCL_ADD_THREAD_NETWORK_RESPONSE_COMMAND_ID (0x07) +#define ZCL_UPDATE_THREAD_NETWORK_COMMAND_ID (0x08) +#define ZCL_UPDATE_THREAD_NETWORK_RESPONSE_COMMAND_ID (0x09) +#define ZCL_REMOVE_NETWORK_COMMAND_ID (0x0A) +#define ZCL_REMOVE_NETWORK_RESPONSE_COMMAND_ID (0x0B) +#define ZCL_ENABLE_NETWORK_COMMAND_ID (0x0C) +#define ZCL_ENABLE_NETWORK_RESPONSE_COMMAND_ID (0x0D) +#define ZCL_DISABLE_NETWORK_COMMAND_ID (0x0E) +#define ZCL_DISABLE_NETWORK_RESPONSE_COMMAND_ID (0x0F) +#define ZCL_GET_LAST_NETWORK_COMMISSIONING_RESULT_COMMAND_ID (0x10) + // Commands for cluster: Binding #define ZCL_BIND_COMMAND_ID (0x00) #define ZCL_UNBIND_COMMAND_ID (0x01) +// Commands for cluster: Media Playback +#define ZCL_PLAY_REQUEST_COMMAND_ID (0x00) +#define ZCL_PLAYBACK_COMMAND_ID (0x00) +#define ZCL_PAUSE_REQUEST_COMMAND_ID (0x01) +#define ZCL_STOP_REQUEST_COMMAND_ID (0x02) +#define ZCL_START_OVER_REQUEST_COMMAND_ID (0x03) +#define ZCL_PREVIOUS_REQUEST_COMMAND_ID (0x04) +#define ZCL_NEXT_REQUEST_COMMAND_ID (0x05) +#define ZCL_REWIND_REQUEST_COMMAND_ID (0x06) +#define ZCL_FAST_FORWARD_REQUEST_COMMAND_ID (0x07) +#define ZCL_SKIP_FORWARD_REQUEST_COMMAND_ID (0x08) +#define ZCL_SKIP_BACKWARD_REQUEST_COMMAND_ID (0x09) + // Commands for cluster: Sample Mfg Specific Cluster #define ZCL_COMMAND_ONE_COMMAND_ID (0x00) diff --git a/examples/bridge-app/bridge-common/gen/enums.h b/examples/bridge-app/bridge-common/gen/enums.h index 7cf4c5c578e788..1f0a326946cc80 100644 --- a/examples/bridge-app/bridge-common/gen/enums.h +++ b/examples/bridge-app/bridge-common/gen/enums.h @@ -1873,6 +1873,31 @@ typedef enum EMBER_ZCL_MOVE_MODE_DOWN = 1, } EmberAfMoveMode; +// Enum for NetworkCommissioningError +typedef enum +{ + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_SUCCESS = 0, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_OUT_OF_RANGE = 1, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_BOUNDS_EXCEEDED = 2, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_NETWORK_ID_NOT_FOUND = 3, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_DUPLICATE_NETWORK_ID = 4, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_NETWORK_NOT_FOUND = 5, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_REGULATORY_ERROR = 6, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_AUTH_FAILURE = 7, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_UNSUPPORTED_SECURITY = 8, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_OTHER_CONNECTION_FAILURE = 9, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_IPV6_FAILED = 10, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_IP_BIND_FAILED = 11, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL9 = 12, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL10 = 13, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL11 = 14, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL12 = 15, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL13 = 16, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL14 = 17, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL15 = 18, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_UNKNOWN_ERROR = 19, +} EmberAfNetworkCommissioningError; + // Enum for NotificationScheme typedef enum { @@ -3887,6 +3912,16 @@ typedef enum #define EMBER_AF_RESTART_OPTIONS_IMMEDIATE_OFFSET (3) #define EMBER_AF_SCENES_COPY_MODE_COPY_ALL_SCENES (1) #define EMBER_AF_SCENES_COPY_MODE_COPY_ALL_SCENES_OFFSET (0) +#define EMBER_AF_SECURITY_TYPE_UNENCRYPTED (1) +#define EMBER_AF_SECURITY_TYPE_UNENCRYPTED_OFFSET (0) +#define EMBER_AF_SECURITY_TYPE_WEP_PERSONAL (2) +#define EMBER_AF_SECURITY_TYPE_WEP_PERSONAL_OFFSET (1) +#define EMBER_AF_SECURITY_TYPE_WPA_PERSONAL (4) +#define EMBER_AF_SECURITY_TYPE_WPA_PERSONAL_OFFSET (2) +#define EMBER_AF_SECURITY_TYPE_WPA2_PERSONAL (8) +#define EMBER_AF_SECURITY_TYPE_WPA2_PERSONAL_OFFSET (3) +#define EMBER_AF_SECURITY_TYPE_WPA3_PERSONAL (16) +#define EMBER_AF_SECURITY_TYPE_WPA3_PERSONAL_OFFSET (4) #define EMBER_AF_SHADE_CLOSURE_STATUS_OPERATIONAL (1) #define EMBER_AF_SHADE_CLOSURE_STATUS_OPERATIONAL_OFFSET (0) #define EMBER_AF_SHADE_CLOSURE_STATUS_ADJUSTING (2) diff --git a/examples/bridge-app/bridge-common/gen/print-cluster.h b/examples/bridge-app/bridge-common/gen/print-cluster.h index 4348de1953fb86..b91198407ac3a8 100644 --- a/examples/bridge-app/bridge-common/gen/print-cluster.h +++ b/examples/bridge-app/bridge-common/gen/print-cluster.h @@ -716,12 +716,24 @@ #define CHIP_PRINTCLUSTER_ZLL_COMMISSIONING_CLUSTER #endif +#if defined(ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_SERVER) || defined(ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER { ZCL_NETWORK_COMMISSIONING_CLUSTER_ID, 43690, "Network Commissioning" }, +#else +#define CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER +#endif + #if defined(ZCL_USING_BINDING_CLUSTER_SERVER) || defined(ZCL_USING_BINDING_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_BINDING_CLUSTER { ZCL_BINDING_CLUSTER_ID, 61440, "Binding" }, #else #define CHIP_PRINTCLUSTER_BINDING_CLUSTER #endif +#if defined(ZCL_USING_MEDIA_PLAYBACK_CLUSTER_SERVER) || defined(ZCL_USING_MEDIA_PLAYBACK_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_MEDIA_PLAYBACK_CLUSTER { ZCL_MEDIA_PLAYBACK_CLUSTER_ID, 61441, "Media Playback" }, +#else +#define CHIP_PRINTCLUSTER_MEDIA_PLAYBACK_CLUSTER +#endif + #if defined(ZCL_USING_SAMPLE_MFG_SPECIFIC_CLUSTER_SERVER) || defined(ZCL_USING_SAMPLE_MFG_SPECIFIC_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_SAMPLE_MFG_SPECIFIC_CLUSTER { ZCL_SAMPLE_MFG_SPECIFIC_CLUSTER_ID, 64512, "Sample Mfg Specific Cluster" }, #else @@ -858,7 +870,9 @@ CHIP_PRINTCLUSTER_ELECTRICAL_MEASUREMENT_CLUSTER \ CHIP_PRINTCLUSTER_DIAGNOSTICS_CLUSTER \ CHIP_PRINTCLUSTER_ZLL_COMMISSIONING_CLUSTER \ + CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER \ CHIP_PRINTCLUSTER_BINDING_CLUSTER \ + CHIP_PRINTCLUSTER_MEDIA_PLAYBACK_CLUSTER \ CHIP_PRINTCLUSTER_SAMPLE_MFG_SPECIFIC_CLUSTER \ CHIP_PRINTCLUSTER_SAMPLE_MFG_SPECIFIC_CLUSTER_2 \ CHIP_PRINTCLUSTER_OTA_CONFIGURATION_CLUSTER \ diff --git a/examples/chip-tool/gen/af-structs.h b/examples/chip-tool/gen/af-structs.h index c5cd195f38d882..f62d10bb3b39a6 100644 --- a/examples/chip-tool/gen/af-structs.h +++ b/examples/chip-tool/gen/af-structs.h @@ -364,6 +364,12 @@ typedef struct _SpecialDay uint8_t dayIdRef; } EmberAfSpecialDay; +// Struct for ThreadInterfaceScanResult +typedef struct _ThreadInterfaceScanResult +{ + uint8_t * DiscoveryResponse; +} EmberAfThreadInterfaceScanResult; + // Struct for TierLabelsPayload typedef struct _TierLabelsPayload { @@ -390,6 +396,16 @@ typedef struct _TransferredPhase uint16_t maxActivationDelay; } EmberAfTransferredPhase; +// Struct for WiFiInterfaceScanResult +typedef struct _WiFiInterfaceScanResult +{ + uint8_t Security; + uint8_t * SSID; + uint8_t * BSSID; + uint8_t Channel; + uint32_t FrequencyBand; +} EmberAfWiFiInterfaceScanResult; + // Struct for WriteAttributeRecord typedef struct _WriteAttributeRecord { diff --git a/examples/chip-tool/gen/attribute-id.h b/examples/chip-tool/gen/attribute-id.h index 53d77d58e4943e..41b22f4ec79886 100644 --- a/examples/chip-tool/gen/attribute-id.h +++ b/examples/chip-tool/gen/attribute-id.h @@ -4058,6 +4058,12 @@ // Server attributes +// Attribute ids for cluster: Network Commissioning + +// Client attributes + +// Server attributes + // Attribute ids for cluster: Binding // Client attributes diff --git a/examples/chip-tool/gen/client-command-macro.h b/examples/chip-tool/gen/client-command-macro.h index 03759c6fe2424c..8f735d04e66b9e 100644 --- a/examples/chip-tool/gen/client-command-macro.h +++ b/examples/chip-tool/gen/client-command-macro.h @@ -5658,6 +5658,225 @@ ZCL_GET_ENDPOINT_LIST_REQUEST_COMMAND_ID, "uuuub", startIndex, total, startIndex, count, \ endpointInformationRecordList, endpointInformationRecordListLen); +/** @brief Command description for ScanNetworks + * + * Command: ScanNetworks + * @param ssid OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterScanNetworks(ssid, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_SCAN_NETWORKS_COMMAND_ID, "uuu", ssid, breadcrumb, timeoutMs); + +/** @brief Command description for ScanNetworksResponse + * + * Command: ScanNetworksResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + * @param wifiScanResults WiFiInterfaceScanResult [] + * @param wifiScanResultsLen int + * @param threadScanResults ThreadInterfaceScanResult [] + * @param threadScanResultsLen int + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterScanNetworksResponse(errorCode, debugText, wifiScanResults, wifiScanResultsLen, threadScanResults, \ + threadScanResultsLen) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_SCAN_NETWORKS_RESPONSE_COMMAND_ID, "uubb", errorCode, debugText, wifiScanResults, \ + wifiScanResultsLen, threadScanResults, threadScanResultsLen); + +/** @brief Command description for AddWiFiNetwork + * + * Command: AddWiFiNetwork + * @param ssid OCTET_STRING + * @param credentials OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterAddWiFiNetwork(ssid, credentials, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ADD_WI_FI_NETWORK_COMMAND_ID, "uuuu", ssid, credentials, breadcrumb, timeoutMs); + +/** @brief Command description for AddWiFiNetworkResponse + * + * Command: AddWiFiNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterAddWiFiNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ADD_WI_FI_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for UpdateWiFiNetwork + * + * Command: UpdateWiFiNetwork + * @param ssid OCTET_STRING + * @param credentials OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterUpdateWiFiNetwork(ssid, credentials, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_UPDATE_WI_FI_NETWORK_COMMAND_ID, "uuuu", ssid, credentials, breadcrumb, timeoutMs); + +/** @brief Command description for UpdateWiFiNetworkResponse + * + * Command: UpdateWiFiNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterUpdateWiFiNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_UPDATE_WI_FI_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for AddThreadNetwork + * + * Command: AddThreadNetwork + * @param operationalDataset OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterAddThreadNetwork(operationalDataset, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ADD_THREAD_NETWORK_COMMAND_ID, "uuu", operationalDataset, breadcrumb, timeoutMs); + +/** @brief Command description for AddThreadNetworkResponse + * + * Command: AddThreadNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterAddThreadNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ADD_THREAD_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for UpdateThreadNetwork + * + * Command: UpdateThreadNetwork + * @param operationalDataset OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterUpdateThreadNetwork(operationalDataset, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_UPDATE_THREAD_NETWORK_COMMAND_ID, "uuu", operationalDataset, breadcrumb, timeoutMs); + +/** @brief Command description for UpdateThreadNetworkResponse + * + * Command: UpdateThreadNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterUpdateThreadNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_UPDATE_THREAD_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for RemoveNetwork + * + * Command: RemoveNetwork + * @param NetworkID OCTET_STRING + * @param Breadcrumb INT64U + * @param TimeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterRemoveNetwork(NetworkID, Breadcrumb, TimeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_REMOVE_NETWORK_COMMAND_ID, "uuu", NetworkID, Breadcrumb, TimeoutMs); + +/** @brief Command description for RemoveNetworkResponse + * + * Command: RemoveNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterRemoveNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_REMOVE_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for EnableNetwork + * + * Command: EnableNetwork + * @param networkID OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterEnableNetwork(networkID, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ENABLE_NETWORK_COMMAND_ID, "uuu", networkID, breadcrumb, timeoutMs); + +/** @brief Command description for EnableNetworkResponse + * + * Command: EnableNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterEnableNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ENABLE_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for DisableNetwork + * + * Command: DisableNetwork + * @param networkID OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterDisableNetwork(networkID, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_DISABLE_NETWORK_COMMAND_ID, "uuu", networkID, breadcrumb, timeoutMs); + +/** @brief Command description for DisableNetworkResponse + * + * Command: DisableNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterDisableNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_DISABLE_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for GetLastNetworkCommissioningResult + * + * Command: GetLastNetworkCommissioningResult + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterGetLastNetworkCommissioningResult(timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_GET_LAST_NETWORK_COMMISSIONING_RESULT_COMMAND_ID, "u", timeoutMs); + /** @brief Command description for Bind * * Command: Bind diff --git a/examples/chip-tool/gen/cluster-id.h b/examples/chip-tool/gen/cluster-id.h index 8ceb0901c053f6..852a0659d203e0 100644 --- a/examples/chip-tool/gen/cluster-id.h +++ b/examples/chip-tool/gen/cluster-id.h @@ -332,6 +332,9 @@ // Definitions for cluster: ZLL Commissioning #define ZCL_ZLL_COMMISSIONING_CLUSTER_ID (0x1000) +// Definitions for cluster: Network Commissioning +#define ZCL_NETWORK_COMMISSIONING_CLUSTER_ID (0xAAAA) + // Definitions for cluster: Binding #define ZCL_BINDING_CLUSTER_ID (0xF000) diff --git a/examples/chip-tool/gen/command-id.h b/examples/chip-tool/gen/command-id.h index 572446cf490a4a..db416f663435a6 100644 --- a/examples/chip-tool/gen/command-id.h +++ b/examples/chip-tool/gen/command-id.h @@ -685,6 +685,25 @@ #define ZCL_GET_ENDPOINT_LIST_REQUEST_COMMAND_ID (0x42) #define ZCL_GET_ENDPOINT_LIST_RESPONSE_COMMAND_ID (0x42) +// Commands for cluster: Network Commissioning +#define ZCL_SCAN_NETWORKS_COMMAND_ID (0x00) +#define ZCL_SCAN_NETWORKS_RESPONSE_COMMAND_ID (0x01) +#define ZCL_ADD_WI_FI_NETWORK_COMMAND_ID (0x02) +#define ZCL_ADD_WI_FI_NETWORK_RESPONSE_COMMAND_ID (0x03) +#define ZCL_UPDATE_WI_FI_NETWORK_COMMAND_ID (0x04) +#define ZCL_UPDATE_WI_FI_NETWORK_RESPONSE_COMMAND_ID (0x05) +#define ZCL_ADD_THREAD_NETWORK_COMMAND_ID (0x06) +#define ZCL_ADD_THREAD_NETWORK_RESPONSE_COMMAND_ID (0x07) +#define ZCL_UPDATE_THREAD_NETWORK_COMMAND_ID (0x08) +#define ZCL_UPDATE_THREAD_NETWORK_RESPONSE_COMMAND_ID (0x09) +#define ZCL_REMOVE_NETWORK_COMMAND_ID (0x0A) +#define ZCL_REMOVE_NETWORK_RESPONSE_COMMAND_ID (0x0B) +#define ZCL_ENABLE_NETWORK_COMMAND_ID (0x0C) +#define ZCL_ENABLE_NETWORK_RESPONSE_COMMAND_ID (0x0D) +#define ZCL_DISABLE_NETWORK_COMMAND_ID (0x0E) +#define ZCL_DISABLE_NETWORK_RESPONSE_COMMAND_ID (0x0F) +#define ZCL_GET_LAST_NETWORK_COMMISSIONING_RESULT_COMMAND_ID (0x10) + // Commands for cluster: Binding #define ZCL_BIND_COMMAND_ID (0x00) #define ZCL_UNBIND_COMMAND_ID (0x01) diff --git a/examples/chip-tool/gen/enums.h b/examples/chip-tool/gen/enums.h index 7cf4c5c578e788..1f0a326946cc80 100644 --- a/examples/chip-tool/gen/enums.h +++ b/examples/chip-tool/gen/enums.h @@ -1873,6 +1873,31 @@ typedef enum EMBER_ZCL_MOVE_MODE_DOWN = 1, } EmberAfMoveMode; +// Enum for NetworkCommissioningError +typedef enum +{ + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_SUCCESS = 0, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_OUT_OF_RANGE = 1, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_BOUNDS_EXCEEDED = 2, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_NETWORK_ID_NOT_FOUND = 3, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_DUPLICATE_NETWORK_ID = 4, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_NETWORK_NOT_FOUND = 5, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_REGULATORY_ERROR = 6, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_AUTH_FAILURE = 7, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_UNSUPPORTED_SECURITY = 8, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_OTHER_CONNECTION_FAILURE = 9, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_IPV6_FAILED = 10, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_IP_BIND_FAILED = 11, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL9 = 12, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL10 = 13, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL11 = 14, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL12 = 15, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL13 = 16, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL14 = 17, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL15 = 18, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_UNKNOWN_ERROR = 19, +} EmberAfNetworkCommissioningError; + // Enum for NotificationScheme typedef enum { @@ -3887,6 +3912,16 @@ typedef enum #define EMBER_AF_RESTART_OPTIONS_IMMEDIATE_OFFSET (3) #define EMBER_AF_SCENES_COPY_MODE_COPY_ALL_SCENES (1) #define EMBER_AF_SCENES_COPY_MODE_COPY_ALL_SCENES_OFFSET (0) +#define EMBER_AF_SECURITY_TYPE_UNENCRYPTED (1) +#define EMBER_AF_SECURITY_TYPE_UNENCRYPTED_OFFSET (0) +#define EMBER_AF_SECURITY_TYPE_WEP_PERSONAL (2) +#define EMBER_AF_SECURITY_TYPE_WEP_PERSONAL_OFFSET (1) +#define EMBER_AF_SECURITY_TYPE_WPA_PERSONAL (4) +#define EMBER_AF_SECURITY_TYPE_WPA_PERSONAL_OFFSET (2) +#define EMBER_AF_SECURITY_TYPE_WPA2_PERSONAL (8) +#define EMBER_AF_SECURITY_TYPE_WPA2_PERSONAL_OFFSET (3) +#define EMBER_AF_SECURITY_TYPE_WPA3_PERSONAL (16) +#define EMBER_AF_SECURITY_TYPE_WPA3_PERSONAL_OFFSET (4) #define EMBER_AF_SHADE_CLOSURE_STATUS_OPERATIONAL (1) #define EMBER_AF_SHADE_CLOSURE_STATUS_OPERATIONAL_OFFSET (0) #define EMBER_AF_SHADE_CLOSURE_STATUS_ADJUSTING (2) diff --git a/examples/chip-tool/gen/print-cluster.h b/examples/chip-tool/gen/print-cluster.h index 5a37b559c5d0c5..b91198407ac3a8 100644 --- a/examples/chip-tool/gen/print-cluster.h +++ b/examples/chip-tool/gen/print-cluster.h @@ -716,6 +716,12 @@ #define CHIP_PRINTCLUSTER_ZLL_COMMISSIONING_CLUSTER #endif +#if defined(ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_SERVER) || defined(ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER { ZCL_NETWORK_COMMISSIONING_CLUSTER_ID, 43690, "Network Commissioning" }, +#else +#define CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER +#endif + #if defined(ZCL_USING_BINDING_CLUSTER_SERVER) || defined(ZCL_USING_BINDING_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_BINDING_CLUSTER { ZCL_BINDING_CLUSTER_ID, 61440, "Binding" }, #else @@ -864,6 +870,7 @@ CHIP_PRINTCLUSTER_ELECTRICAL_MEASUREMENT_CLUSTER \ CHIP_PRINTCLUSTER_DIAGNOSTICS_CLUSTER \ CHIP_PRINTCLUSTER_ZLL_COMMISSIONING_CLUSTER \ + CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER \ CHIP_PRINTCLUSTER_BINDING_CLUSTER \ CHIP_PRINTCLUSTER_MEDIA_PLAYBACK_CLUSTER \ CHIP_PRINTCLUSTER_SAMPLE_MFG_SPECIFIC_CLUSTER \ diff --git a/examples/chip-tool/templates/commands.zapt b/examples/chip-tool/templates/commands.zapt index 455e8eb093c5c1..f812ce06b085c6 100644 --- a/examples/chip-tool/templates/commands.zapt +++ b/examples/chip-tool/templates/commands.zapt @@ -117,7 +117,7 @@ public: chip::Controller::{{asCamelCased parent.name false}}Cluster cluster; cluster.Associate(device, endpointId); - return cluster.{{asCamelCased name false}}(onSuccessCallback->Cancel(), onFailureCallback->Cancel(){{#chip_server_cluster_command_arguments}}, m{{asCamelCased label false}}{{/chip_server_cluster_command_arguments}}); + return cluster.{{asCamelCased name false}}(onSuccessCallback->Cancel(), onFailureCallback->Cancel(){{#chip_server_cluster_command_arguments}}, {{#if (isByteString type)}} reinterpret_cast(m{{asCamelCased label false}}), static_cast(strlen(m{{asCamelCased label false}})){{else}}m{{asCamelCased label false}}{{/if}}{{/chip_server_cluster_command_arguments}}); } private: diff --git a/examples/chip-tool/templates/helper.js b/examples/chip-tool/templates/helper.js index 752a54a8fd52c3..71a2c7ef73ec9b 100644 --- a/examples/chip-tool/templates/helper.js +++ b/examples/chip-tool/templates/helper.js @@ -195,6 +195,11 @@ function asTypeMaxValue(type) return templateUtil.templatePromise(this.global, promise); } +function isStrEndsWith(str, substr) +{ + return str.endsWith(substr); +} + // // Module exports // @@ -203,3 +208,4 @@ exports.asCallbackAttributeType = asCallbackAttributeType; exports.asDelimitedCommand = asDelimitedCommand; exports.asTypeMinValue = asTypeMinValue; exports.asTypeMaxValue = asTypeMaxValue; +exports.isStrEndsWith = isStrEndsWith; diff --git a/examples/lighting-app/lighting-common/gen/af-structs.h b/examples/lighting-app/lighting-common/gen/af-structs.h index c5cd195f38d882..f62d10bb3b39a6 100644 --- a/examples/lighting-app/lighting-common/gen/af-structs.h +++ b/examples/lighting-app/lighting-common/gen/af-structs.h @@ -364,6 +364,12 @@ typedef struct _SpecialDay uint8_t dayIdRef; } EmberAfSpecialDay; +// Struct for ThreadInterfaceScanResult +typedef struct _ThreadInterfaceScanResult +{ + uint8_t * DiscoveryResponse; +} EmberAfThreadInterfaceScanResult; + // Struct for TierLabelsPayload typedef struct _TierLabelsPayload { @@ -390,6 +396,16 @@ typedef struct _TransferredPhase uint16_t maxActivationDelay; } EmberAfTransferredPhase; +// Struct for WiFiInterfaceScanResult +typedef struct _WiFiInterfaceScanResult +{ + uint8_t Security; + uint8_t * SSID; + uint8_t * BSSID; + uint8_t Channel; + uint32_t FrequencyBand; +} EmberAfWiFiInterfaceScanResult; + // Struct for WriteAttributeRecord typedef struct _WriteAttributeRecord { diff --git a/examples/lighting-app/lighting-common/gen/attribute-id.h b/examples/lighting-app/lighting-common/gen/attribute-id.h index 0fd456c36a20f6..41b22f4ec79886 100644 --- a/examples/lighting-app/lighting-common/gen/attribute-id.h +++ b/examples/lighting-app/lighting-common/gen/attribute-id.h @@ -4058,12 +4058,25 @@ // Server attributes +// Attribute ids for cluster: Network Commissioning + +// Client attributes + +// Server attributes + // Attribute ids for cluster: Binding // Client attributes // Server attributes +// Attribute ids for cluster: Media Playback + +// Client attributes + +// Server attributes +#define ZCL_CURRENT_STATE_ATTRIBUTE_ID (0x0000) + // Attribute ids for cluster: Sample Mfg Specific Cluster // Client attributes diff --git a/examples/lighting-app/lighting-common/gen/client-command-macro.h b/examples/lighting-app/lighting-common/gen/client-command-macro.h index 0778dd6cec105d..8f735d04e66b9e 100644 --- a/examples/lighting-app/lighting-common/gen/client-command-macro.h +++ b/examples/lighting-app/lighting-common/gen/client-command-macro.h @@ -5658,6 +5658,225 @@ ZCL_GET_ENDPOINT_LIST_REQUEST_COMMAND_ID, "uuuub", startIndex, total, startIndex, count, \ endpointInformationRecordList, endpointInformationRecordListLen); +/** @brief Command description for ScanNetworks + * + * Command: ScanNetworks + * @param ssid OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterScanNetworks(ssid, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_SCAN_NETWORKS_COMMAND_ID, "uuu", ssid, breadcrumb, timeoutMs); + +/** @brief Command description for ScanNetworksResponse + * + * Command: ScanNetworksResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + * @param wifiScanResults WiFiInterfaceScanResult [] + * @param wifiScanResultsLen int + * @param threadScanResults ThreadInterfaceScanResult [] + * @param threadScanResultsLen int + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterScanNetworksResponse(errorCode, debugText, wifiScanResults, wifiScanResultsLen, threadScanResults, \ + threadScanResultsLen) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_SCAN_NETWORKS_RESPONSE_COMMAND_ID, "uubb", errorCode, debugText, wifiScanResults, \ + wifiScanResultsLen, threadScanResults, threadScanResultsLen); + +/** @brief Command description for AddWiFiNetwork + * + * Command: AddWiFiNetwork + * @param ssid OCTET_STRING + * @param credentials OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterAddWiFiNetwork(ssid, credentials, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ADD_WI_FI_NETWORK_COMMAND_ID, "uuuu", ssid, credentials, breadcrumb, timeoutMs); + +/** @brief Command description for AddWiFiNetworkResponse + * + * Command: AddWiFiNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterAddWiFiNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ADD_WI_FI_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for UpdateWiFiNetwork + * + * Command: UpdateWiFiNetwork + * @param ssid OCTET_STRING + * @param credentials OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterUpdateWiFiNetwork(ssid, credentials, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_UPDATE_WI_FI_NETWORK_COMMAND_ID, "uuuu", ssid, credentials, breadcrumb, timeoutMs); + +/** @brief Command description for UpdateWiFiNetworkResponse + * + * Command: UpdateWiFiNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterUpdateWiFiNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_UPDATE_WI_FI_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for AddThreadNetwork + * + * Command: AddThreadNetwork + * @param operationalDataset OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterAddThreadNetwork(operationalDataset, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ADD_THREAD_NETWORK_COMMAND_ID, "uuu", operationalDataset, breadcrumb, timeoutMs); + +/** @brief Command description for AddThreadNetworkResponse + * + * Command: AddThreadNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterAddThreadNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ADD_THREAD_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for UpdateThreadNetwork + * + * Command: UpdateThreadNetwork + * @param operationalDataset OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterUpdateThreadNetwork(operationalDataset, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_UPDATE_THREAD_NETWORK_COMMAND_ID, "uuu", operationalDataset, breadcrumb, timeoutMs); + +/** @brief Command description for UpdateThreadNetworkResponse + * + * Command: UpdateThreadNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterUpdateThreadNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_UPDATE_THREAD_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for RemoveNetwork + * + * Command: RemoveNetwork + * @param NetworkID OCTET_STRING + * @param Breadcrumb INT64U + * @param TimeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterRemoveNetwork(NetworkID, Breadcrumb, TimeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_REMOVE_NETWORK_COMMAND_ID, "uuu", NetworkID, Breadcrumb, TimeoutMs); + +/** @brief Command description for RemoveNetworkResponse + * + * Command: RemoveNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterRemoveNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_REMOVE_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for EnableNetwork + * + * Command: EnableNetwork + * @param networkID OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterEnableNetwork(networkID, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ENABLE_NETWORK_COMMAND_ID, "uuu", networkID, breadcrumb, timeoutMs); + +/** @brief Command description for EnableNetworkResponse + * + * Command: EnableNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterEnableNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ENABLE_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for DisableNetwork + * + * Command: DisableNetwork + * @param networkID OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterDisableNetwork(networkID, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_DISABLE_NETWORK_COMMAND_ID, "uuu", networkID, breadcrumb, timeoutMs); + +/** @brief Command description for DisableNetworkResponse + * + * Command: DisableNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterDisableNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_DISABLE_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for GetLastNetworkCommissioningResult + * + * Command: GetLastNetworkCommissioningResult + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterGetLastNetworkCommissioningResult(timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_GET_LAST_NETWORK_COMMISSIONING_RESULT_COMMAND_ID, "u", timeoutMs); + /** @brief Command description for Bind * * Command: Bind @@ -5684,6 +5903,96 @@ \ ZCL_UNBIND_COMMAND_ID, "uuuu", nodeId, groupId, endpointId, clusterId); +/** @brief Command description for PlayRequest + * + * Command: PlayRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterPlayRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_PLAY_REQUEST_COMMAND_ID, "", ); + +/** @brief Command description for PauseRequest + * + * Command: PauseRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterPauseRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_PAUSE_REQUEST_COMMAND_ID, "", ); + +/** @brief Command description for StopRequest + * + * Command: StopRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterStopRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_STOP_REQUEST_COMMAND_ID, "", ); + +/** @brief Command description for StartOverRequest + * + * Command: StartOverRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterStartOverRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_START_OVER_REQUEST_COMMAND_ID, "", ); + +/** @brief Command description for PreviousRequest + * + * Command: PreviousRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterPreviousRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_PREVIOUS_REQUEST_COMMAND_ID, "", ); + +/** @brief Command description for NextRequest + * + * Command: NextRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterNextRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_NEXT_REQUEST_COMMAND_ID, "", ); + +/** @brief Command description for RewindRequest + * + * Command: RewindRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterRewindRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_REWIND_REQUEST_COMMAND_ID, "", ); + +/** @brief Command description for FastForwardRequest + * + * Command: FastForwardRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterFastForwardRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_FAST_FORWARD_REQUEST_COMMAND_ID, "", ); + +/** @brief Command description for SkipForwardRequest + * + * Command: SkipForwardRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterSkipForwardRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_SKIP_FORWARD_REQUEST_COMMAND_ID, "", ); + +/** @brief Command description for SkipBackwardRequest + * + * Command: SkipBackwardRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterSkipBackwardRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_SKIP_BACKWARD_REQUEST_COMMAND_ID, "", ); + /** @brief Command description for CommandOne * * Command: CommandOne diff --git a/examples/lighting-app/lighting-common/gen/cluster-id.h b/examples/lighting-app/lighting-common/gen/cluster-id.h index 262de53f3b3378..852a0659d203e0 100644 --- a/examples/lighting-app/lighting-common/gen/cluster-id.h +++ b/examples/lighting-app/lighting-common/gen/cluster-id.h @@ -332,9 +332,15 @@ // Definitions for cluster: ZLL Commissioning #define ZCL_ZLL_COMMISSIONING_CLUSTER_ID (0x1000) +// Definitions for cluster: Network Commissioning +#define ZCL_NETWORK_COMMISSIONING_CLUSTER_ID (0xAAAA) + // Definitions for cluster: Binding #define ZCL_BINDING_CLUSTER_ID (0xF000) +// Definitions for cluster: Media Playback +#define ZCL_MEDIA_PLAYBACK_CLUSTER_ID (0xF001) + // Definitions for cluster: Sample Mfg Specific Cluster #define ZCL_SAMPLE_MFG_SPECIFIC_CLUSTER_ID (0xFC00) diff --git a/examples/lighting-app/lighting-common/gen/command-id.h b/examples/lighting-app/lighting-common/gen/command-id.h index 9e608623150c7c..db416f663435a6 100644 --- a/examples/lighting-app/lighting-common/gen/command-id.h +++ b/examples/lighting-app/lighting-common/gen/command-id.h @@ -685,10 +685,42 @@ #define ZCL_GET_ENDPOINT_LIST_REQUEST_COMMAND_ID (0x42) #define ZCL_GET_ENDPOINT_LIST_RESPONSE_COMMAND_ID (0x42) +// Commands for cluster: Network Commissioning +#define ZCL_SCAN_NETWORKS_COMMAND_ID (0x00) +#define ZCL_SCAN_NETWORKS_RESPONSE_COMMAND_ID (0x01) +#define ZCL_ADD_WI_FI_NETWORK_COMMAND_ID (0x02) +#define ZCL_ADD_WI_FI_NETWORK_RESPONSE_COMMAND_ID (0x03) +#define ZCL_UPDATE_WI_FI_NETWORK_COMMAND_ID (0x04) +#define ZCL_UPDATE_WI_FI_NETWORK_RESPONSE_COMMAND_ID (0x05) +#define ZCL_ADD_THREAD_NETWORK_COMMAND_ID (0x06) +#define ZCL_ADD_THREAD_NETWORK_RESPONSE_COMMAND_ID (0x07) +#define ZCL_UPDATE_THREAD_NETWORK_COMMAND_ID (0x08) +#define ZCL_UPDATE_THREAD_NETWORK_RESPONSE_COMMAND_ID (0x09) +#define ZCL_REMOVE_NETWORK_COMMAND_ID (0x0A) +#define ZCL_REMOVE_NETWORK_RESPONSE_COMMAND_ID (0x0B) +#define ZCL_ENABLE_NETWORK_COMMAND_ID (0x0C) +#define ZCL_ENABLE_NETWORK_RESPONSE_COMMAND_ID (0x0D) +#define ZCL_DISABLE_NETWORK_COMMAND_ID (0x0E) +#define ZCL_DISABLE_NETWORK_RESPONSE_COMMAND_ID (0x0F) +#define ZCL_GET_LAST_NETWORK_COMMISSIONING_RESULT_COMMAND_ID (0x10) + // Commands for cluster: Binding #define ZCL_BIND_COMMAND_ID (0x00) #define ZCL_UNBIND_COMMAND_ID (0x01) +// Commands for cluster: Media Playback +#define ZCL_PLAY_REQUEST_COMMAND_ID (0x00) +#define ZCL_PLAYBACK_COMMAND_ID (0x00) +#define ZCL_PAUSE_REQUEST_COMMAND_ID (0x01) +#define ZCL_STOP_REQUEST_COMMAND_ID (0x02) +#define ZCL_START_OVER_REQUEST_COMMAND_ID (0x03) +#define ZCL_PREVIOUS_REQUEST_COMMAND_ID (0x04) +#define ZCL_NEXT_REQUEST_COMMAND_ID (0x05) +#define ZCL_REWIND_REQUEST_COMMAND_ID (0x06) +#define ZCL_FAST_FORWARD_REQUEST_COMMAND_ID (0x07) +#define ZCL_SKIP_FORWARD_REQUEST_COMMAND_ID (0x08) +#define ZCL_SKIP_BACKWARD_REQUEST_COMMAND_ID (0x09) + // Commands for cluster: Sample Mfg Specific Cluster #define ZCL_COMMAND_ONE_COMMAND_ID (0x00) diff --git a/examples/lighting-app/lighting-common/gen/enums.h b/examples/lighting-app/lighting-common/gen/enums.h index 7cf4c5c578e788..1f0a326946cc80 100644 --- a/examples/lighting-app/lighting-common/gen/enums.h +++ b/examples/lighting-app/lighting-common/gen/enums.h @@ -1873,6 +1873,31 @@ typedef enum EMBER_ZCL_MOVE_MODE_DOWN = 1, } EmberAfMoveMode; +// Enum for NetworkCommissioningError +typedef enum +{ + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_SUCCESS = 0, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_OUT_OF_RANGE = 1, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_BOUNDS_EXCEEDED = 2, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_NETWORK_ID_NOT_FOUND = 3, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_DUPLICATE_NETWORK_ID = 4, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_NETWORK_NOT_FOUND = 5, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_REGULATORY_ERROR = 6, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_AUTH_FAILURE = 7, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_UNSUPPORTED_SECURITY = 8, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_OTHER_CONNECTION_FAILURE = 9, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_IPV6_FAILED = 10, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_IP_BIND_FAILED = 11, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL9 = 12, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL10 = 13, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL11 = 14, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL12 = 15, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL13 = 16, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL14 = 17, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL15 = 18, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_UNKNOWN_ERROR = 19, +} EmberAfNetworkCommissioningError; + // Enum for NotificationScheme typedef enum { @@ -3887,6 +3912,16 @@ typedef enum #define EMBER_AF_RESTART_OPTIONS_IMMEDIATE_OFFSET (3) #define EMBER_AF_SCENES_COPY_MODE_COPY_ALL_SCENES (1) #define EMBER_AF_SCENES_COPY_MODE_COPY_ALL_SCENES_OFFSET (0) +#define EMBER_AF_SECURITY_TYPE_UNENCRYPTED (1) +#define EMBER_AF_SECURITY_TYPE_UNENCRYPTED_OFFSET (0) +#define EMBER_AF_SECURITY_TYPE_WEP_PERSONAL (2) +#define EMBER_AF_SECURITY_TYPE_WEP_PERSONAL_OFFSET (1) +#define EMBER_AF_SECURITY_TYPE_WPA_PERSONAL (4) +#define EMBER_AF_SECURITY_TYPE_WPA_PERSONAL_OFFSET (2) +#define EMBER_AF_SECURITY_TYPE_WPA2_PERSONAL (8) +#define EMBER_AF_SECURITY_TYPE_WPA2_PERSONAL_OFFSET (3) +#define EMBER_AF_SECURITY_TYPE_WPA3_PERSONAL (16) +#define EMBER_AF_SECURITY_TYPE_WPA3_PERSONAL_OFFSET (4) #define EMBER_AF_SHADE_CLOSURE_STATUS_OPERATIONAL (1) #define EMBER_AF_SHADE_CLOSURE_STATUS_OPERATIONAL_OFFSET (0) #define EMBER_AF_SHADE_CLOSURE_STATUS_ADJUSTING (2) diff --git a/examples/lighting-app/lighting-common/gen/print-cluster.h b/examples/lighting-app/lighting-common/gen/print-cluster.h index 4348de1953fb86..b91198407ac3a8 100644 --- a/examples/lighting-app/lighting-common/gen/print-cluster.h +++ b/examples/lighting-app/lighting-common/gen/print-cluster.h @@ -716,12 +716,24 @@ #define CHIP_PRINTCLUSTER_ZLL_COMMISSIONING_CLUSTER #endif +#if defined(ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_SERVER) || defined(ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER { ZCL_NETWORK_COMMISSIONING_CLUSTER_ID, 43690, "Network Commissioning" }, +#else +#define CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER +#endif + #if defined(ZCL_USING_BINDING_CLUSTER_SERVER) || defined(ZCL_USING_BINDING_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_BINDING_CLUSTER { ZCL_BINDING_CLUSTER_ID, 61440, "Binding" }, #else #define CHIP_PRINTCLUSTER_BINDING_CLUSTER #endif +#if defined(ZCL_USING_MEDIA_PLAYBACK_CLUSTER_SERVER) || defined(ZCL_USING_MEDIA_PLAYBACK_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_MEDIA_PLAYBACK_CLUSTER { ZCL_MEDIA_PLAYBACK_CLUSTER_ID, 61441, "Media Playback" }, +#else +#define CHIP_PRINTCLUSTER_MEDIA_PLAYBACK_CLUSTER +#endif + #if defined(ZCL_USING_SAMPLE_MFG_SPECIFIC_CLUSTER_SERVER) || defined(ZCL_USING_SAMPLE_MFG_SPECIFIC_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_SAMPLE_MFG_SPECIFIC_CLUSTER { ZCL_SAMPLE_MFG_SPECIFIC_CLUSTER_ID, 64512, "Sample Mfg Specific Cluster" }, #else @@ -858,7 +870,9 @@ CHIP_PRINTCLUSTER_ELECTRICAL_MEASUREMENT_CLUSTER \ CHIP_PRINTCLUSTER_DIAGNOSTICS_CLUSTER \ CHIP_PRINTCLUSTER_ZLL_COMMISSIONING_CLUSTER \ + CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER \ CHIP_PRINTCLUSTER_BINDING_CLUSTER \ + CHIP_PRINTCLUSTER_MEDIA_PLAYBACK_CLUSTER \ CHIP_PRINTCLUSTER_SAMPLE_MFG_SPECIFIC_CLUSTER \ CHIP_PRINTCLUSTER_SAMPLE_MFG_SPECIFIC_CLUSTER_2 \ CHIP_PRINTCLUSTER_OTA_CONFIGURATION_CLUSTER \ diff --git a/examples/lock-app/lock-common/gen/af-structs.h b/examples/lock-app/lock-common/gen/af-structs.h index c5cd195f38d882..f62d10bb3b39a6 100644 --- a/examples/lock-app/lock-common/gen/af-structs.h +++ b/examples/lock-app/lock-common/gen/af-structs.h @@ -364,6 +364,12 @@ typedef struct _SpecialDay uint8_t dayIdRef; } EmberAfSpecialDay; +// Struct for ThreadInterfaceScanResult +typedef struct _ThreadInterfaceScanResult +{ + uint8_t * DiscoveryResponse; +} EmberAfThreadInterfaceScanResult; + // Struct for TierLabelsPayload typedef struct _TierLabelsPayload { @@ -390,6 +396,16 @@ typedef struct _TransferredPhase uint16_t maxActivationDelay; } EmberAfTransferredPhase; +// Struct for WiFiInterfaceScanResult +typedef struct _WiFiInterfaceScanResult +{ + uint8_t Security; + uint8_t * SSID; + uint8_t * BSSID; + uint8_t Channel; + uint32_t FrequencyBand; +} EmberAfWiFiInterfaceScanResult; + // Struct for WriteAttributeRecord typedef struct _WriteAttributeRecord { diff --git a/examples/lock-app/lock-common/gen/attribute-id.h b/examples/lock-app/lock-common/gen/attribute-id.h index 0fd456c36a20f6..41b22f4ec79886 100644 --- a/examples/lock-app/lock-common/gen/attribute-id.h +++ b/examples/lock-app/lock-common/gen/attribute-id.h @@ -4058,12 +4058,25 @@ // Server attributes +// Attribute ids for cluster: Network Commissioning + +// Client attributes + +// Server attributes + // Attribute ids for cluster: Binding // Client attributes // Server attributes +// Attribute ids for cluster: Media Playback + +// Client attributes + +// Server attributes +#define ZCL_CURRENT_STATE_ATTRIBUTE_ID (0x0000) + // Attribute ids for cluster: Sample Mfg Specific Cluster // Client attributes diff --git a/examples/lock-app/lock-common/gen/client-command-macro.h b/examples/lock-app/lock-common/gen/client-command-macro.h index 0778dd6cec105d..8f735d04e66b9e 100644 --- a/examples/lock-app/lock-common/gen/client-command-macro.h +++ b/examples/lock-app/lock-common/gen/client-command-macro.h @@ -5658,6 +5658,225 @@ ZCL_GET_ENDPOINT_LIST_REQUEST_COMMAND_ID, "uuuub", startIndex, total, startIndex, count, \ endpointInformationRecordList, endpointInformationRecordListLen); +/** @brief Command description for ScanNetworks + * + * Command: ScanNetworks + * @param ssid OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterScanNetworks(ssid, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_SCAN_NETWORKS_COMMAND_ID, "uuu", ssid, breadcrumb, timeoutMs); + +/** @brief Command description for ScanNetworksResponse + * + * Command: ScanNetworksResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + * @param wifiScanResults WiFiInterfaceScanResult [] + * @param wifiScanResultsLen int + * @param threadScanResults ThreadInterfaceScanResult [] + * @param threadScanResultsLen int + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterScanNetworksResponse(errorCode, debugText, wifiScanResults, wifiScanResultsLen, threadScanResults, \ + threadScanResultsLen) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_SCAN_NETWORKS_RESPONSE_COMMAND_ID, "uubb", errorCode, debugText, wifiScanResults, \ + wifiScanResultsLen, threadScanResults, threadScanResultsLen); + +/** @brief Command description for AddWiFiNetwork + * + * Command: AddWiFiNetwork + * @param ssid OCTET_STRING + * @param credentials OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterAddWiFiNetwork(ssid, credentials, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ADD_WI_FI_NETWORK_COMMAND_ID, "uuuu", ssid, credentials, breadcrumb, timeoutMs); + +/** @brief Command description for AddWiFiNetworkResponse + * + * Command: AddWiFiNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterAddWiFiNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ADD_WI_FI_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for UpdateWiFiNetwork + * + * Command: UpdateWiFiNetwork + * @param ssid OCTET_STRING + * @param credentials OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterUpdateWiFiNetwork(ssid, credentials, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_UPDATE_WI_FI_NETWORK_COMMAND_ID, "uuuu", ssid, credentials, breadcrumb, timeoutMs); + +/** @brief Command description for UpdateWiFiNetworkResponse + * + * Command: UpdateWiFiNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterUpdateWiFiNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_UPDATE_WI_FI_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for AddThreadNetwork + * + * Command: AddThreadNetwork + * @param operationalDataset OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterAddThreadNetwork(operationalDataset, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ADD_THREAD_NETWORK_COMMAND_ID, "uuu", operationalDataset, breadcrumb, timeoutMs); + +/** @brief Command description for AddThreadNetworkResponse + * + * Command: AddThreadNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterAddThreadNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ADD_THREAD_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for UpdateThreadNetwork + * + * Command: UpdateThreadNetwork + * @param operationalDataset OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterUpdateThreadNetwork(operationalDataset, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_UPDATE_THREAD_NETWORK_COMMAND_ID, "uuu", operationalDataset, breadcrumb, timeoutMs); + +/** @brief Command description for UpdateThreadNetworkResponse + * + * Command: UpdateThreadNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterUpdateThreadNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_UPDATE_THREAD_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for RemoveNetwork + * + * Command: RemoveNetwork + * @param NetworkID OCTET_STRING + * @param Breadcrumb INT64U + * @param TimeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterRemoveNetwork(NetworkID, Breadcrumb, TimeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_REMOVE_NETWORK_COMMAND_ID, "uuu", NetworkID, Breadcrumb, TimeoutMs); + +/** @brief Command description for RemoveNetworkResponse + * + * Command: RemoveNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterRemoveNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_REMOVE_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for EnableNetwork + * + * Command: EnableNetwork + * @param networkID OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterEnableNetwork(networkID, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ENABLE_NETWORK_COMMAND_ID, "uuu", networkID, breadcrumb, timeoutMs); + +/** @brief Command description for EnableNetworkResponse + * + * Command: EnableNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterEnableNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ENABLE_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for DisableNetwork + * + * Command: DisableNetwork + * @param networkID OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterDisableNetwork(networkID, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_DISABLE_NETWORK_COMMAND_ID, "uuu", networkID, breadcrumb, timeoutMs); + +/** @brief Command description for DisableNetworkResponse + * + * Command: DisableNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterDisableNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_DISABLE_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for GetLastNetworkCommissioningResult + * + * Command: GetLastNetworkCommissioningResult + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterGetLastNetworkCommissioningResult(timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_GET_LAST_NETWORK_COMMISSIONING_RESULT_COMMAND_ID, "u", timeoutMs); + /** @brief Command description for Bind * * Command: Bind @@ -5684,6 +5903,96 @@ \ ZCL_UNBIND_COMMAND_ID, "uuuu", nodeId, groupId, endpointId, clusterId); +/** @brief Command description for PlayRequest + * + * Command: PlayRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterPlayRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_PLAY_REQUEST_COMMAND_ID, "", ); + +/** @brief Command description for PauseRequest + * + * Command: PauseRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterPauseRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_PAUSE_REQUEST_COMMAND_ID, "", ); + +/** @brief Command description for StopRequest + * + * Command: StopRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterStopRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_STOP_REQUEST_COMMAND_ID, "", ); + +/** @brief Command description for StartOverRequest + * + * Command: StartOverRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterStartOverRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_START_OVER_REQUEST_COMMAND_ID, "", ); + +/** @brief Command description for PreviousRequest + * + * Command: PreviousRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterPreviousRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_PREVIOUS_REQUEST_COMMAND_ID, "", ); + +/** @brief Command description for NextRequest + * + * Command: NextRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterNextRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_NEXT_REQUEST_COMMAND_ID, "", ); + +/** @brief Command description for RewindRequest + * + * Command: RewindRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterRewindRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_REWIND_REQUEST_COMMAND_ID, "", ); + +/** @brief Command description for FastForwardRequest + * + * Command: FastForwardRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterFastForwardRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_FAST_FORWARD_REQUEST_COMMAND_ID, "", ); + +/** @brief Command description for SkipForwardRequest + * + * Command: SkipForwardRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterSkipForwardRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_SKIP_FORWARD_REQUEST_COMMAND_ID, "", ); + +/** @brief Command description for SkipBackwardRequest + * + * Command: SkipBackwardRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterSkipBackwardRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_SKIP_BACKWARD_REQUEST_COMMAND_ID, "", ); + /** @brief Command description for CommandOne * * Command: CommandOne diff --git a/examples/lock-app/lock-common/gen/cluster-id.h b/examples/lock-app/lock-common/gen/cluster-id.h index 262de53f3b3378..852a0659d203e0 100644 --- a/examples/lock-app/lock-common/gen/cluster-id.h +++ b/examples/lock-app/lock-common/gen/cluster-id.h @@ -332,9 +332,15 @@ // Definitions for cluster: ZLL Commissioning #define ZCL_ZLL_COMMISSIONING_CLUSTER_ID (0x1000) +// Definitions for cluster: Network Commissioning +#define ZCL_NETWORK_COMMISSIONING_CLUSTER_ID (0xAAAA) + // Definitions for cluster: Binding #define ZCL_BINDING_CLUSTER_ID (0xF000) +// Definitions for cluster: Media Playback +#define ZCL_MEDIA_PLAYBACK_CLUSTER_ID (0xF001) + // Definitions for cluster: Sample Mfg Specific Cluster #define ZCL_SAMPLE_MFG_SPECIFIC_CLUSTER_ID (0xFC00) diff --git a/examples/lock-app/lock-common/gen/command-id.h b/examples/lock-app/lock-common/gen/command-id.h index 9e608623150c7c..db416f663435a6 100644 --- a/examples/lock-app/lock-common/gen/command-id.h +++ b/examples/lock-app/lock-common/gen/command-id.h @@ -685,10 +685,42 @@ #define ZCL_GET_ENDPOINT_LIST_REQUEST_COMMAND_ID (0x42) #define ZCL_GET_ENDPOINT_LIST_RESPONSE_COMMAND_ID (0x42) +// Commands for cluster: Network Commissioning +#define ZCL_SCAN_NETWORKS_COMMAND_ID (0x00) +#define ZCL_SCAN_NETWORKS_RESPONSE_COMMAND_ID (0x01) +#define ZCL_ADD_WI_FI_NETWORK_COMMAND_ID (0x02) +#define ZCL_ADD_WI_FI_NETWORK_RESPONSE_COMMAND_ID (0x03) +#define ZCL_UPDATE_WI_FI_NETWORK_COMMAND_ID (0x04) +#define ZCL_UPDATE_WI_FI_NETWORK_RESPONSE_COMMAND_ID (0x05) +#define ZCL_ADD_THREAD_NETWORK_COMMAND_ID (0x06) +#define ZCL_ADD_THREAD_NETWORK_RESPONSE_COMMAND_ID (0x07) +#define ZCL_UPDATE_THREAD_NETWORK_COMMAND_ID (0x08) +#define ZCL_UPDATE_THREAD_NETWORK_RESPONSE_COMMAND_ID (0x09) +#define ZCL_REMOVE_NETWORK_COMMAND_ID (0x0A) +#define ZCL_REMOVE_NETWORK_RESPONSE_COMMAND_ID (0x0B) +#define ZCL_ENABLE_NETWORK_COMMAND_ID (0x0C) +#define ZCL_ENABLE_NETWORK_RESPONSE_COMMAND_ID (0x0D) +#define ZCL_DISABLE_NETWORK_COMMAND_ID (0x0E) +#define ZCL_DISABLE_NETWORK_RESPONSE_COMMAND_ID (0x0F) +#define ZCL_GET_LAST_NETWORK_COMMISSIONING_RESULT_COMMAND_ID (0x10) + // Commands for cluster: Binding #define ZCL_BIND_COMMAND_ID (0x00) #define ZCL_UNBIND_COMMAND_ID (0x01) +// Commands for cluster: Media Playback +#define ZCL_PLAY_REQUEST_COMMAND_ID (0x00) +#define ZCL_PLAYBACK_COMMAND_ID (0x00) +#define ZCL_PAUSE_REQUEST_COMMAND_ID (0x01) +#define ZCL_STOP_REQUEST_COMMAND_ID (0x02) +#define ZCL_START_OVER_REQUEST_COMMAND_ID (0x03) +#define ZCL_PREVIOUS_REQUEST_COMMAND_ID (0x04) +#define ZCL_NEXT_REQUEST_COMMAND_ID (0x05) +#define ZCL_REWIND_REQUEST_COMMAND_ID (0x06) +#define ZCL_FAST_FORWARD_REQUEST_COMMAND_ID (0x07) +#define ZCL_SKIP_FORWARD_REQUEST_COMMAND_ID (0x08) +#define ZCL_SKIP_BACKWARD_REQUEST_COMMAND_ID (0x09) + // Commands for cluster: Sample Mfg Specific Cluster #define ZCL_COMMAND_ONE_COMMAND_ID (0x00) diff --git a/examples/lock-app/lock-common/gen/enums.h b/examples/lock-app/lock-common/gen/enums.h index 7cf4c5c578e788..1f0a326946cc80 100644 --- a/examples/lock-app/lock-common/gen/enums.h +++ b/examples/lock-app/lock-common/gen/enums.h @@ -1873,6 +1873,31 @@ typedef enum EMBER_ZCL_MOVE_MODE_DOWN = 1, } EmberAfMoveMode; +// Enum for NetworkCommissioningError +typedef enum +{ + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_SUCCESS = 0, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_OUT_OF_RANGE = 1, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_BOUNDS_EXCEEDED = 2, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_NETWORK_ID_NOT_FOUND = 3, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_DUPLICATE_NETWORK_ID = 4, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_NETWORK_NOT_FOUND = 5, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_REGULATORY_ERROR = 6, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_AUTH_FAILURE = 7, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_UNSUPPORTED_SECURITY = 8, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_OTHER_CONNECTION_FAILURE = 9, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_IPV6_FAILED = 10, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_IP_BIND_FAILED = 11, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL9 = 12, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL10 = 13, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL11 = 14, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL12 = 15, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL13 = 16, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL14 = 17, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL15 = 18, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_UNKNOWN_ERROR = 19, +} EmberAfNetworkCommissioningError; + // Enum for NotificationScheme typedef enum { @@ -3887,6 +3912,16 @@ typedef enum #define EMBER_AF_RESTART_OPTIONS_IMMEDIATE_OFFSET (3) #define EMBER_AF_SCENES_COPY_MODE_COPY_ALL_SCENES (1) #define EMBER_AF_SCENES_COPY_MODE_COPY_ALL_SCENES_OFFSET (0) +#define EMBER_AF_SECURITY_TYPE_UNENCRYPTED (1) +#define EMBER_AF_SECURITY_TYPE_UNENCRYPTED_OFFSET (0) +#define EMBER_AF_SECURITY_TYPE_WEP_PERSONAL (2) +#define EMBER_AF_SECURITY_TYPE_WEP_PERSONAL_OFFSET (1) +#define EMBER_AF_SECURITY_TYPE_WPA_PERSONAL (4) +#define EMBER_AF_SECURITY_TYPE_WPA_PERSONAL_OFFSET (2) +#define EMBER_AF_SECURITY_TYPE_WPA2_PERSONAL (8) +#define EMBER_AF_SECURITY_TYPE_WPA2_PERSONAL_OFFSET (3) +#define EMBER_AF_SECURITY_TYPE_WPA3_PERSONAL (16) +#define EMBER_AF_SECURITY_TYPE_WPA3_PERSONAL_OFFSET (4) #define EMBER_AF_SHADE_CLOSURE_STATUS_OPERATIONAL (1) #define EMBER_AF_SHADE_CLOSURE_STATUS_OPERATIONAL_OFFSET (0) #define EMBER_AF_SHADE_CLOSURE_STATUS_ADJUSTING (2) diff --git a/examples/lock-app/lock-common/gen/print-cluster.h b/examples/lock-app/lock-common/gen/print-cluster.h index 4348de1953fb86..b91198407ac3a8 100644 --- a/examples/lock-app/lock-common/gen/print-cluster.h +++ b/examples/lock-app/lock-common/gen/print-cluster.h @@ -716,12 +716,24 @@ #define CHIP_PRINTCLUSTER_ZLL_COMMISSIONING_CLUSTER #endif +#if defined(ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_SERVER) || defined(ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER { ZCL_NETWORK_COMMISSIONING_CLUSTER_ID, 43690, "Network Commissioning" }, +#else +#define CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER +#endif + #if defined(ZCL_USING_BINDING_CLUSTER_SERVER) || defined(ZCL_USING_BINDING_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_BINDING_CLUSTER { ZCL_BINDING_CLUSTER_ID, 61440, "Binding" }, #else #define CHIP_PRINTCLUSTER_BINDING_CLUSTER #endif +#if defined(ZCL_USING_MEDIA_PLAYBACK_CLUSTER_SERVER) || defined(ZCL_USING_MEDIA_PLAYBACK_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_MEDIA_PLAYBACK_CLUSTER { ZCL_MEDIA_PLAYBACK_CLUSTER_ID, 61441, "Media Playback" }, +#else +#define CHIP_PRINTCLUSTER_MEDIA_PLAYBACK_CLUSTER +#endif + #if defined(ZCL_USING_SAMPLE_MFG_SPECIFIC_CLUSTER_SERVER) || defined(ZCL_USING_SAMPLE_MFG_SPECIFIC_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_SAMPLE_MFG_SPECIFIC_CLUSTER { ZCL_SAMPLE_MFG_SPECIFIC_CLUSTER_ID, 64512, "Sample Mfg Specific Cluster" }, #else @@ -858,7 +870,9 @@ CHIP_PRINTCLUSTER_ELECTRICAL_MEASUREMENT_CLUSTER \ CHIP_PRINTCLUSTER_DIAGNOSTICS_CLUSTER \ CHIP_PRINTCLUSTER_ZLL_COMMISSIONING_CLUSTER \ + CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER \ CHIP_PRINTCLUSTER_BINDING_CLUSTER \ + CHIP_PRINTCLUSTER_MEDIA_PLAYBACK_CLUSTER \ CHIP_PRINTCLUSTER_SAMPLE_MFG_SPECIFIC_CLUSTER \ CHIP_PRINTCLUSTER_SAMPLE_MFG_SPECIFIC_CLUSTER_2 \ CHIP_PRINTCLUSTER_OTA_CONFIGURATION_CLUSTER \ diff --git a/examples/temperature-measurement-app/esp32/main/gen/af-structs.h b/examples/temperature-measurement-app/esp32/main/gen/af-structs.h index c5cd195f38d882..f62d10bb3b39a6 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/af-structs.h +++ b/examples/temperature-measurement-app/esp32/main/gen/af-structs.h @@ -364,6 +364,12 @@ typedef struct _SpecialDay uint8_t dayIdRef; } EmberAfSpecialDay; +// Struct for ThreadInterfaceScanResult +typedef struct _ThreadInterfaceScanResult +{ + uint8_t * DiscoveryResponse; +} EmberAfThreadInterfaceScanResult; + // Struct for TierLabelsPayload typedef struct _TierLabelsPayload { @@ -390,6 +396,16 @@ typedef struct _TransferredPhase uint16_t maxActivationDelay; } EmberAfTransferredPhase; +// Struct for WiFiInterfaceScanResult +typedef struct _WiFiInterfaceScanResult +{ + uint8_t Security; + uint8_t * SSID; + uint8_t * BSSID; + uint8_t Channel; + uint32_t FrequencyBand; +} EmberAfWiFiInterfaceScanResult; + // Struct for WriteAttributeRecord typedef struct _WriteAttributeRecord { diff --git a/examples/temperature-measurement-app/esp32/main/gen/attribute-id.h b/examples/temperature-measurement-app/esp32/main/gen/attribute-id.h index 0fd456c36a20f6..41b22f4ec79886 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/attribute-id.h +++ b/examples/temperature-measurement-app/esp32/main/gen/attribute-id.h @@ -4058,12 +4058,25 @@ // Server attributes +// Attribute ids for cluster: Network Commissioning + +// Client attributes + +// Server attributes + // Attribute ids for cluster: Binding // Client attributes // Server attributes +// Attribute ids for cluster: Media Playback + +// Client attributes + +// Server attributes +#define ZCL_CURRENT_STATE_ATTRIBUTE_ID (0x0000) + // Attribute ids for cluster: Sample Mfg Specific Cluster // Client attributes diff --git a/examples/temperature-measurement-app/esp32/main/gen/client-command-macro.h b/examples/temperature-measurement-app/esp32/main/gen/client-command-macro.h index 0778dd6cec105d..8f735d04e66b9e 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/client-command-macro.h +++ b/examples/temperature-measurement-app/esp32/main/gen/client-command-macro.h @@ -5658,6 +5658,225 @@ ZCL_GET_ENDPOINT_LIST_REQUEST_COMMAND_ID, "uuuub", startIndex, total, startIndex, count, \ endpointInformationRecordList, endpointInformationRecordListLen); +/** @brief Command description for ScanNetworks + * + * Command: ScanNetworks + * @param ssid OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterScanNetworks(ssid, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_SCAN_NETWORKS_COMMAND_ID, "uuu", ssid, breadcrumb, timeoutMs); + +/** @brief Command description for ScanNetworksResponse + * + * Command: ScanNetworksResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + * @param wifiScanResults WiFiInterfaceScanResult [] + * @param wifiScanResultsLen int + * @param threadScanResults ThreadInterfaceScanResult [] + * @param threadScanResultsLen int + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterScanNetworksResponse(errorCode, debugText, wifiScanResults, wifiScanResultsLen, threadScanResults, \ + threadScanResultsLen) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_SCAN_NETWORKS_RESPONSE_COMMAND_ID, "uubb", errorCode, debugText, wifiScanResults, \ + wifiScanResultsLen, threadScanResults, threadScanResultsLen); + +/** @brief Command description for AddWiFiNetwork + * + * Command: AddWiFiNetwork + * @param ssid OCTET_STRING + * @param credentials OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterAddWiFiNetwork(ssid, credentials, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ADD_WI_FI_NETWORK_COMMAND_ID, "uuuu", ssid, credentials, breadcrumb, timeoutMs); + +/** @brief Command description for AddWiFiNetworkResponse + * + * Command: AddWiFiNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterAddWiFiNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ADD_WI_FI_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for UpdateWiFiNetwork + * + * Command: UpdateWiFiNetwork + * @param ssid OCTET_STRING + * @param credentials OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterUpdateWiFiNetwork(ssid, credentials, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_UPDATE_WI_FI_NETWORK_COMMAND_ID, "uuuu", ssid, credentials, breadcrumb, timeoutMs); + +/** @brief Command description for UpdateWiFiNetworkResponse + * + * Command: UpdateWiFiNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterUpdateWiFiNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_UPDATE_WI_FI_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for AddThreadNetwork + * + * Command: AddThreadNetwork + * @param operationalDataset OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterAddThreadNetwork(operationalDataset, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ADD_THREAD_NETWORK_COMMAND_ID, "uuu", operationalDataset, breadcrumb, timeoutMs); + +/** @brief Command description for AddThreadNetworkResponse + * + * Command: AddThreadNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterAddThreadNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ADD_THREAD_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for UpdateThreadNetwork + * + * Command: UpdateThreadNetwork + * @param operationalDataset OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterUpdateThreadNetwork(operationalDataset, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_UPDATE_THREAD_NETWORK_COMMAND_ID, "uuu", operationalDataset, breadcrumb, timeoutMs); + +/** @brief Command description for UpdateThreadNetworkResponse + * + * Command: UpdateThreadNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterUpdateThreadNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_UPDATE_THREAD_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for RemoveNetwork + * + * Command: RemoveNetwork + * @param NetworkID OCTET_STRING + * @param Breadcrumb INT64U + * @param TimeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterRemoveNetwork(NetworkID, Breadcrumb, TimeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_REMOVE_NETWORK_COMMAND_ID, "uuu", NetworkID, Breadcrumb, TimeoutMs); + +/** @brief Command description for RemoveNetworkResponse + * + * Command: RemoveNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterRemoveNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_REMOVE_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for EnableNetwork + * + * Command: EnableNetwork + * @param networkID OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterEnableNetwork(networkID, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ENABLE_NETWORK_COMMAND_ID, "uuu", networkID, breadcrumb, timeoutMs); + +/** @brief Command description for EnableNetworkResponse + * + * Command: EnableNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterEnableNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ENABLE_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for DisableNetwork + * + * Command: DisableNetwork + * @param networkID OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterDisableNetwork(networkID, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_DISABLE_NETWORK_COMMAND_ID, "uuu", networkID, breadcrumb, timeoutMs); + +/** @brief Command description for DisableNetworkResponse + * + * Command: DisableNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterDisableNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_DISABLE_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for GetLastNetworkCommissioningResult + * + * Command: GetLastNetworkCommissioningResult + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterGetLastNetworkCommissioningResult(timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_GET_LAST_NETWORK_COMMISSIONING_RESULT_COMMAND_ID, "u", timeoutMs); + /** @brief Command description for Bind * * Command: Bind @@ -5684,6 +5903,96 @@ \ ZCL_UNBIND_COMMAND_ID, "uuuu", nodeId, groupId, endpointId, clusterId); +/** @brief Command description for PlayRequest + * + * Command: PlayRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterPlayRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_PLAY_REQUEST_COMMAND_ID, "", ); + +/** @brief Command description for PauseRequest + * + * Command: PauseRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterPauseRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_PAUSE_REQUEST_COMMAND_ID, "", ); + +/** @brief Command description for StopRequest + * + * Command: StopRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterStopRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_STOP_REQUEST_COMMAND_ID, "", ); + +/** @brief Command description for StartOverRequest + * + * Command: StartOverRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterStartOverRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_START_OVER_REQUEST_COMMAND_ID, "", ); + +/** @brief Command description for PreviousRequest + * + * Command: PreviousRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterPreviousRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_PREVIOUS_REQUEST_COMMAND_ID, "", ); + +/** @brief Command description for NextRequest + * + * Command: NextRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterNextRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_NEXT_REQUEST_COMMAND_ID, "", ); + +/** @brief Command description for RewindRequest + * + * Command: RewindRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterRewindRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_REWIND_REQUEST_COMMAND_ID, "", ); + +/** @brief Command description for FastForwardRequest + * + * Command: FastForwardRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterFastForwardRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_FAST_FORWARD_REQUEST_COMMAND_ID, "", ); + +/** @brief Command description for SkipForwardRequest + * + * Command: SkipForwardRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterSkipForwardRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_SKIP_FORWARD_REQUEST_COMMAND_ID, "", ); + +/** @brief Command description for SkipBackwardRequest + * + * Command: SkipBackwardRequest + */ +#define emberAfFillCommandMedia \ + PlaybackClusterSkipBackwardRequest() emberAfFillExternalBuffer(mask, \ + \ + ZCL_SKIP_BACKWARD_REQUEST_COMMAND_ID, "", ); + /** @brief Command description for CommandOne * * Command: CommandOne diff --git a/examples/temperature-measurement-app/esp32/main/gen/cluster-id.h b/examples/temperature-measurement-app/esp32/main/gen/cluster-id.h index 262de53f3b3378..852a0659d203e0 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/cluster-id.h +++ b/examples/temperature-measurement-app/esp32/main/gen/cluster-id.h @@ -332,9 +332,15 @@ // Definitions for cluster: ZLL Commissioning #define ZCL_ZLL_COMMISSIONING_CLUSTER_ID (0x1000) +// Definitions for cluster: Network Commissioning +#define ZCL_NETWORK_COMMISSIONING_CLUSTER_ID (0xAAAA) + // Definitions for cluster: Binding #define ZCL_BINDING_CLUSTER_ID (0xF000) +// Definitions for cluster: Media Playback +#define ZCL_MEDIA_PLAYBACK_CLUSTER_ID (0xF001) + // Definitions for cluster: Sample Mfg Specific Cluster #define ZCL_SAMPLE_MFG_SPECIFIC_CLUSTER_ID (0xFC00) diff --git a/examples/temperature-measurement-app/esp32/main/gen/command-id.h b/examples/temperature-measurement-app/esp32/main/gen/command-id.h index 9e608623150c7c..db416f663435a6 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/command-id.h +++ b/examples/temperature-measurement-app/esp32/main/gen/command-id.h @@ -685,10 +685,42 @@ #define ZCL_GET_ENDPOINT_LIST_REQUEST_COMMAND_ID (0x42) #define ZCL_GET_ENDPOINT_LIST_RESPONSE_COMMAND_ID (0x42) +// Commands for cluster: Network Commissioning +#define ZCL_SCAN_NETWORKS_COMMAND_ID (0x00) +#define ZCL_SCAN_NETWORKS_RESPONSE_COMMAND_ID (0x01) +#define ZCL_ADD_WI_FI_NETWORK_COMMAND_ID (0x02) +#define ZCL_ADD_WI_FI_NETWORK_RESPONSE_COMMAND_ID (0x03) +#define ZCL_UPDATE_WI_FI_NETWORK_COMMAND_ID (0x04) +#define ZCL_UPDATE_WI_FI_NETWORK_RESPONSE_COMMAND_ID (0x05) +#define ZCL_ADD_THREAD_NETWORK_COMMAND_ID (0x06) +#define ZCL_ADD_THREAD_NETWORK_RESPONSE_COMMAND_ID (0x07) +#define ZCL_UPDATE_THREAD_NETWORK_COMMAND_ID (0x08) +#define ZCL_UPDATE_THREAD_NETWORK_RESPONSE_COMMAND_ID (0x09) +#define ZCL_REMOVE_NETWORK_COMMAND_ID (0x0A) +#define ZCL_REMOVE_NETWORK_RESPONSE_COMMAND_ID (0x0B) +#define ZCL_ENABLE_NETWORK_COMMAND_ID (0x0C) +#define ZCL_ENABLE_NETWORK_RESPONSE_COMMAND_ID (0x0D) +#define ZCL_DISABLE_NETWORK_COMMAND_ID (0x0E) +#define ZCL_DISABLE_NETWORK_RESPONSE_COMMAND_ID (0x0F) +#define ZCL_GET_LAST_NETWORK_COMMISSIONING_RESULT_COMMAND_ID (0x10) + // Commands for cluster: Binding #define ZCL_BIND_COMMAND_ID (0x00) #define ZCL_UNBIND_COMMAND_ID (0x01) +// Commands for cluster: Media Playback +#define ZCL_PLAY_REQUEST_COMMAND_ID (0x00) +#define ZCL_PLAYBACK_COMMAND_ID (0x00) +#define ZCL_PAUSE_REQUEST_COMMAND_ID (0x01) +#define ZCL_STOP_REQUEST_COMMAND_ID (0x02) +#define ZCL_START_OVER_REQUEST_COMMAND_ID (0x03) +#define ZCL_PREVIOUS_REQUEST_COMMAND_ID (0x04) +#define ZCL_NEXT_REQUEST_COMMAND_ID (0x05) +#define ZCL_REWIND_REQUEST_COMMAND_ID (0x06) +#define ZCL_FAST_FORWARD_REQUEST_COMMAND_ID (0x07) +#define ZCL_SKIP_FORWARD_REQUEST_COMMAND_ID (0x08) +#define ZCL_SKIP_BACKWARD_REQUEST_COMMAND_ID (0x09) + // Commands for cluster: Sample Mfg Specific Cluster #define ZCL_COMMAND_ONE_COMMAND_ID (0x00) diff --git a/examples/temperature-measurement-app/esp32/main/gen/enums.h b/examples/temperature-measurement-app/esp32/main/gen/enums.h index 7cf4c5c578e788..1f0a326946cc80 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/enums.h +++ b/examples/temperature-measurement-app/esp32/main/gen/enums.h @@ -1873,6 +1873,31 @@ typedef enum EMBER_ZCL_MOVE_MODE_DOWN = 1, } EmberAfMoveMode; +// Enum for NetworkCommissioningError +typedef enum +{ + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_SUCCESS = 0, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_OUT_OF_RANGE = 1, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_BOUNDS_EXCEEDED = 2, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_NETWORK_ID_NOT_FOUND = 3, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_DUPLICATE_NETWORK_ID = 4, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_NETWORK_NOT_FOUND = 5, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_REGULATORY_ERROR = 6, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_AUTH_FAILURE = 7, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_UNSUPPORTED_SECURITY = 8, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_OTHER_CONNECTION_FAILURE = 9, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_IPV6_FAILED = 10, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_IP_BIND_FAILED = 11, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL9 = 12, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL10 = 13, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL11 = 14, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL12 = 15, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL13 = 16, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL14 = 17, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL15 = 18, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_UNKNOWN_ERROR = 19, +} EmberAfNetworkCommissioningError; + // Enum for NotificationScheme typedef enum { @@ -3887,6 +3912,16 @@ typedef enum #define EMBER_AF_RESTART_OPTIONS_IMMEDIATE_OFFSET (3) #define EMBER_AF_SCENES_COPY_MODE_COPY_ALL_SCENES (1) #define EMBER_AF_SCENES_COPY_MODE_COPY_ALL_SCENES_OFFSET (0) +#define EMBER_AF_SECURITY_TYPE_UNENCRYPTED (1) +#define EMBER_AF_SECURITY_TYPE_UNENCRYPTED_OFFSET (0) +#define EMBER_AF_SECURITY_TYPE_WEP_PERSONAL (2) +#define EMBER_AF_SECURITY_TYPE_WEP_PERSONAL_OFFSET (1) +#define EMBER_AF_SECURITY_TYPE_WPA_PERSONAL (4) +#define EMBER_AF_SECURITY_TYPE_WPA_PERSONAL_OFFSET (2) +#define EMBER_AF_SECURITY_TYPE_WPA2_PERSONAL (8) +#define EMBER_AF_SECURITY_TYPE_WPA2_PERSONAL_OFFSET (3) +#define EMBER_AF_SECURITY_TYPE_WPA3_PERSONAL (16) +#define EMBER_AF_SECURITY_TYPE_WPA3_PERSONAL_OFFSET (4) #define EMBER_AF_SHADE_CLOSURE_STATUS_OPERATIONAL (1) #define EMBER_AF_SHADE_CLOSURE_STATUS_OPERATIONAL_OFFSET (0) #define EMBER_AF_SHADE_CLOSURE_STATUS_ADJUSTING (2) diff --git a/examples/temperature-measurement-app/esp32/main/gen/print-cluster.h b/examples/temperature-measurement-app/esp32/main/gen/print-cluster.h index 4348de1953fb86..b91198407ac3a8 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/print-cluster.h +++ b/examples/temperature-measurement-app/esp32/main/gen/print-cluster.h @@ -716,12 +716,24 @@ #define CHIP_PRINTCLUSTER_ZLL_COMMISSIONING_CLUSTER #endif +#if defined(ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_SERVER) || defined(ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER { ZCL_NETWORK_COMMISSIONING_CLUSTER_ID, 43690, "Network Commissioning" }, +#else +#define CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER +#endif + #if defined(ZCL_USING_BINDING_CLUSTER_SERVER) || defined(ZCL_USING_BINDING_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_BINDING_CLUSTER { ZCL_BINDING_CLUSTER_ID, 61440, "Binding" }, #else #define CHIP_PRINTCLUSTER_BINDING_CLUSTER #endif +#if defined(ZCL_USING_MEDIA_PLAYBACK_CLUSTER_SERVER) || defined(ZCL_USING_MEDIA_PLAYBACK_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_MEDIA_PLAYBACK_CLUSTER { ZCL_MEDIA_PLAYBACK_CLUSTER_ID, 61441, "Media Playback" }, +#else +#define CHIP_PRINTCLUSTER_MEDIA_PLAYBACK_CLUSTER +#endif + #if defined(ZCL_USING_SAMPLE_MFG_SPECIFIC_CLUSTER_SERVER) || defined(ZCL_USING_SAMPLE_MFG_SPECIFIC_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_SAMPLE_MFG_SPECIFIC_CLUSTER { ZCL_SAMPLE_MFG_SPECIFIC_CLUSTER_ID, 64512, "Sample Mfg Specific Cluster" }, #else @@ -858,7 +870,9 @@ CHIP_PRINTCLUSTER_ELECTRICAL_MEASUREMENT_CLUSTER \ CHIP_PRINTCLUSTER_DIAGNOSTICS_CLUSTER \ CHIP_PRINTCLUSTER_ZLL_COMMISSIONING_CLUSTER \ + CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER \ CHIP_PRINTCLUSTER_BINDING_CLUSTER \ + CHIP_PRINTCLUSTER_MEDIA_PLAYBACK_CLUSTER \ CHIP_PRINTCLUSTER_SAMPLE_MFG_SPECIFIC_CLUSTER \ CHIP_PRINTCLUSTER_SAMPLE_MFG_SPECIFIC_CLUSTER_2 \ CHIP_PRINTCLUSTER_OTA_CONFIGURATION_CLUSTER \ diff --git a/examples/tv-app/tv-common/gen/af-structs.h b/examples/tv-app/tv-common/gen/af-structs.h index c5cd195f38d882..f62d10bb3b39a6 100644 --- a/examples/tv-app/tv-common/gen/af-structs.h +++ b/examples/tv-app/tv-common/gen/af-structs.h @@ -364,6 +364,12 @@ typedef struct _SpecialDay uint8_t dayIdRef; } EmberAfSpecialDay; +// Struct for ThreadInterfaceScanResult +typedef struct _ThreadInterfaceScanResult +{ + uint8_t * DiscoveryResponse; +} EmberAfThreadInterfaceScanResult; + // Struct for TierLabelsPayload typedef struct _TierLabelsPayload { @@ -390,6 +396,16 @@ typedef struct _TransferredPhase uint16_t maxActivationDelay; } EmberAfTransferredPhase; +// Struct for WiFiInterfaceScanResult +typedef struct _WiFiInterfaceScanResult +{ + uint8_t Security; + uint8_t * SSID; + uint8_t * BSSID; + uint8_t Channel; + uint32_t FrequencyBand; +} EmberAfWiFiInterfaceScanResult; + // Struct for WriteAttributeRecord typedef struct _WriteAttributeRecord { diff --git a/examples/tv-app/tv-common/gen/attribute-id.h b/examples/tv-app/tv-common/gen/attribute-id.h index 53d77d58e4943e..41b22f4ec79886 100644 --- a/examples/tv-app/tv-common/gen/attribute-id.h +++ b/examples/tv-app/tv-common/gen/attribute-id.h @@ -4058,6 +4058,12 @@ // Server attributes +// Attribute ids for cluster: Network Commissioning + +// Client attributes + +// Server attributes + // Attribute ids for cluster: Binding // Client attributes diff --git a/examples/tv-app/tv-common/gen/client-command-macro.h b/examples/tv-app/tv-common/gen/client-command-macro.h index 03759c6fe2424c..8f735d04e66b9e 100644 --- a/examples/tv-app/tv-common/gen/client-command-macro.h +++ b/examples/tv-app/tv-common/gen/client-command-macro.h @@ -5658,6 +5658,225 @@ ZCL_GET_ENDPOINT_LIST_REQUEST_COMMAND_ID, "uuuub", startIndex, total, startIndex, count, \ endpointInformationRecordList, endpointInformationRecordListLen); +/** @brief Command description for ScanNetworks + * + * Command: ScanNetworks + * @param ssid OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterScanNetworks(ssid, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_SCAN_NETWORKS_COMMAND_ID, "uuu", ssid, breadcrumb, timeoutMs); + +/** @brief Command description for ScanNetworksResponse + * + * Command: ScanNetworksResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + * @param wifiScanResults WiFiInterfaceScanResult [] + * @param wifiScanResultsLen int + * @param threadScanResults ThreadInterfaceScanResult [] + * @param threadScanResultsLen int + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterScanNetworksResponse(errorCode, debugText, wifiScanResults, wifiScanResultsLen, threadScanResults, \ + threadScanResultsLen) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_SCAN_NETWORKS_RESPONSE_COMMAND_ID, "uubb", errorCode, debugText, wifiScanResults, \ + wifiScanResultsLen, threadScanResults, threadScanResultsLen); + +/** @brief Command description for AddWiFiNetwork + * + * Command: AddWiFiNetwork + * @param ssid OCTET_STRING + * @param credentials OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterAddWiFiNetwork(ssid, credentials, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ADD_WI_FI_NETWORK_COMMAND_ID, "uuuu", ssid, credentials, breadcrumb, timeoutMs); + +/** @brief Command description for AddWiFiNetworkResponse + * + * Command: AddWiFiNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterAddWiFiNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ADD_WI_FI_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for UpdateWiFiNetwork + * + * Command: UpdateWiFiNetwork + * @param ssid OCTET_STRING + * @param credentials OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterUpdateWiFiNetwork(ssid, credentials, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_UPDATE_WI_FI_NETWORK_COMMAND_ID, "uuuu", ssid, credentials, breadcrumb, timeoutMs); + +/** @brief Command description for UpdateWiFiNetworkResponse + * + * Command: UpdateWiFiNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterUpdateWiFiNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_UPDATE_WI_FI_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for AddThreadNetwork + * + * Command: AddThreadNetwork + * @param operationalDataset OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterAddThreadNetwork(operationalDataset, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ADD_THREAD_NETWORK_COMMAND_ID, "uuu", operationalDataset, breadcrumb, timeoutMs); + +/** @brief Command description for AddThreadNetworkResponse + * + * Command: AddThreadNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterAddThreadNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ADD_THREAD_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for UpdateThreadNetwork + * + * Command: UpdateThreadNetwork + * @param operationalDataset OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterUpdateThreadNetwork(operationalDataset, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_UPDATE_THREAD_NETWORK_COMMAND_ID, "uuu", operationalDataset, breadcrumb, timeoutMs); + +/** @brief Command description for UpdateThreadNetworkResponse + * + * Command: UpdateThreadNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterUpdateThreadNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_UPDATE_THREAD_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for RemoveNetwork + * + * Command: RemoveNetwork + * @param NetworkID OCTET_STRING + * @param Breadcrumb INT64U + * @param TimeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterRemoveNetwork(NetworkID, Breadcrumb, TimeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_REMOVE_NETWORK_COMMAND_ID, "uuu", NetworkID, Breadcrumb, TimeoutMs); + +/** @brief Command description for RemoveNetworkResponse + * + * Command: RemoveNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterRemoveNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_REMOVE_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for EnableNetwork + * + * Command: EnableNetwork + * @param networkID OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterEnableNetwork(networkID, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ENABLE_NETWORK_COMMAND_ID, "uuu", networkID, breadcrumb, timeoutMs); + +/** @brief Command description for EnableNetworkResponse + * + * Command: EnableNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterEnableNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ENABLE_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for DisableNetwork + * + * Command: DisableNetwork + * @param networkID OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterDisableNetwork(networkID, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_DISABLE_NETWORK_COMMAND_ID, "uuu", networkID, breadcrumb, timeoutMs); + +/** @brief Command description for DisableNetworkResponse + * + * Command: DisableNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterDisableNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_DISABLE_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for GetLastNetworkCommissioningResult + * + * Command: GetLastNetworkCommissioningResult + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterGetLastNetworkCommissioningResult(timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_GET_LAST_NETWORK_COMMISSIONING_RESULT_COMMAND_ID, "u", timeoutMs); + /** @brief Command description for Bind * * Command: Bind diff --git a/examples/tv-app/tv-common/gen/cluster-id.h b/examples/tv-app/tv-common/gen/cluster-id.h index 8ceb0901c053f6..852a0659d203e0 100644 --- a/examples/tv-app/tv-common/gen/cluster-id.h +++ b/examples/tv-app/tv-common/gen/cluster-id.h @@ -332,6 +332,9 @@ // Definitions for cluster: ZLL Commissioning #define ZCL_ZLL_COMMISSIONING_CLUSTER_ID (0x1000) +// Definitions for cluster: Network Commissioning +#define ZCL_NETWORK_COMMISSIONING_CLUSTER_ID (0xAAAA) + // Definitions for cluster: Binding #define ZCL_BINDING_CLUSTER_ID (0xF000) diff --git a/examples/tv-app/tv-common/gen/command-id.h b/examples/tv-app/tv-common/gen/command-id.h index 572446cf490a4a..db416f663435a6 100644 --- a/examples/tv-app/tv-common/gen/command-id.h +++ b/examples/tv-app/tv-common/gen/command-id.h @@ -685,6 +685,25 @@ #define ZCL_GET_ENDPOINT_LIST_REQUEST_COMMAND_ID (0x42) #define ZCL_GET_ENDPOINT_LIST_RESPONSE_COMMAND_ID (0x42) +// Commands for cluster: Network Commissioning +#define ZCL_SCAN_NETWORKS_COMMAND_ID (0x00) +#define ZCL_SCAN_NETWORKS_RESPONSE_COMMAND_ID (0x01) +#define ZCL_ADD_WI_FI_NETWORK_COMMAND_ID (0x02) +#define ZCL_ADD_WI_FI_NETWORK_RESPONSE_COMMAND_ID (0x03) +#define ZCL_UPDATE_WI_FI_NETWORK_COMMAND_ID (0x04) +#define ZCL_UPDATE_WI_FI_NETWORK_RESPONSE_COMMAND_ID (0x05) +#define ZCL_ADD_THREAD_NETWORK_COMMAND_ID (0x06) +#define ZCL_ADD_THREAD_NETWORK_RESPONSE_COMMAND_ID (0x07) +#define ZCL_UPDATE_THREAD_NETWORK_COMMAND_ID (0x08) +#define ZCL_UPDATE_THREAD_NETWORK_RESPONSE_COMMAND_ID (0x09) +#define ZCL_REMOVE_NETWORK_COMMAND_ID (0x0A) +#define ZCL_REMOVE_NETWORK_RESPONSE_COMMAND_ID (0x0B) +#define ZCL_ENABLE_NETWORK_COMMAND_ID (0x0C) +#define ZCL_ENABLE_NETWORK_RESPONSE_COMMAND_ID (0x0D) +#define ZCL_DISABLE_NETWORK_COMMAND_ID (0x0E) +#define ZCL_DISABLE_NETWORK_RESPONSE_COMMAND_ID (0x0F) +#define ZCL_GET_LAST_NETWORK_COMMISSIONING_RESULT_COMMAND_ID (0x10) + // Commands for cluster: Binding #define ZCL_BIND_COMMAND_ID (0x00) #define ZCL_UNBIND_COMMAND_ID (0x01) diff --git a/examples/tv-app/tv-common/gen/enums.h b/examples/tv-app/tv-common/gen/enums.h index 7cf4c5c578e788..1f0a326946cc80 100644 --- a/examples/tv-app/tv-common/gen/enums.h +++ b/examples/tv-app/tv-common/gen/enums.h @@ -1873,6 +1873,31 @@ typedef enum EMBER_ZCL_MOVE_MODE_DOWN = 1, } EmberAfMoveMode; +// Enum for NetworkCommissioningError +typedef enum +{ + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_SUCCESS = 0, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_OUT_OF_RANGE = 1, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_BOUNDS_EXCEEDED = 2, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_NETWORK_ID_NOT_FOUND = 3, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_DUPLICATE_NETWORK_ID = 4, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_NETWORK_NOT_FOUND = 5, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_REGULATORY_ERROR = 6, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_AUTH_FAILURE = 7, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_UNSUPPORTED_SECURITY = 8, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_OTHER_CONNECTION_FAILURE = 9, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_IPV6_FAILED = 10, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_IP_BIND_FAILED = 11, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL9 = 12, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL10 = 13, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL11 = 14, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL12 = 15, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL13 = 16, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL14 = 17, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL15 = 18, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_UNKNOWN_ERROR = 19, +} EmberAfNetworkCommissioningError; + // Enum for NotificationScheme typedef enum { @@ -3887,6 +3912,16 @@ typedef enum #define EMBER_AF_RESTART_OPTIONS_IMMEDIATE_OFFSET (3) #define EMBER_AF_SCENES_COPY_MODE_COPY_ALL_SCENES (1) #define EMBER_AF_SCENES_COPY_MODE_COPY_ALL_SCENES_OFFSET (0) +#define EMBER_AF_SECURITY_TYPE_UNENCRYPTED (1) +#define EMBER_AF_SECURITY_TYPE_UNENCRYPTED_OFFSET (0) +#define EMBER_AF_SECURITY_TYPE_WEP_PERSONAL (2) +#define EMBER_AF_SECURITY_TYPE_WEP_PERSONAL_OFFSET (1) +#define EMBER_AF_SECURITY_TYPE_WPA_PERSONAL (4) +#define EMBER_AF_SECURITY_TYPE_WPA_PERSONAL_OFFSET (2) +#define EMBER_AF_SECURITY_TYPE_WPA2_PERSONAL (8) +#define EMBER_AF_SECURITY_TYPE_WPA2_PERSONAL_OFFSET (3) +#define EMBER_AF_SECURITY_TYPE_WPA3_PERSONAL (16) +#define EMBER_AF_SECURITY_TYPE_WPA3_PERSONAL_OFFSET (4) #define EMBER_AF_SHADE_CLOSURE_STATUS_OPERATIONAL (1) #define EMBER_AF_SHADE_CLOSURE_STATUS_OPERATIONAL_OFFSET (0) #define EMBER_AF_SHADE_CLOSURE_STATUS_ADJUSTING (2) diff --git a/examples/tv-app/tv-common/gen/print-cluster.h b/examples/tv-app/tv-common/gen/print-cluster.h index 5a37b559c5d0c5..b91198407ac3a8 100644 --- a/examples/tv-app/tv-common/gen/print-cluster.h +++ b/examples/tv-app/tv-common/gen/print-cluster.h @@ -716,6 +716,12 @@ #define CHIP_PRINTCLUSTER_ZLL_COMMISSIONING_CLUSTER #endif +#if defined(ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_SERVER) || defined(ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER { ZCL_NETWORK_COMMISSIONING_CLUSTER_ID, 43690, "Network Commissioning" }, +#else +#define CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER +#endif + #if defined(ZCL_USING_BINDING_CLUSTER_SERVER) || defined(ZCL_USING_BINDING_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_BINDING_CLUSTER { ZCL_BINDING_CLUSTER_ID, 61440, "Binding" }, #else @@ -864,6 +870,7 @@ CHIP_PRINTCLUSTER_ELECTRICAL_MEASUREMENT_CLUSTER \ CHIP_PRINTCLUSTER_DIAGNOSTICS_CLUSTER \ CHIP_PRINTCLUSTER_ZLL_COMMISSIONING_CLUSTER \ + CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER \ CHIP_PRINTCLUSTER_BINDING_CLUSTER \ CHIP_PRINTCLUSTER_MEDIA_PLAYBACK_CLUSTER \ CHIP_PRINTCLUSTER_SAMPLE_MFG_SPECIFIC_CLUSTER \ diff --git a/scripts/tools/zap_generate_chip.sh b/scripts/tools/zap_generate_chip.sh index af9334fa43afe0..0aaacd91574b26 100755 --- a/scripts/tools/zap_generate_chip.sh +++ b/scripts/tools/zap_generate_chip.sh @@ -17,5 +17,4 @@ # ZAP_TEMPLATES=$PWD/src/app/zap-templates -cd ./third_party/zap/repo/ -node ./src-script/zap-generate.js -z "$ZAP_TEMPLATES"/zcl/zcl.json -g "$ZAP_TEMPLATES"/chip-templates.json -i ../../../examples/all-clusters-app/all-clusters-common/all-clusters-app.zap -o ../../../ +cd ./third_party/zap/repo/ node ./src-script/zap-generate.js -z "$ZAP_TEMPLATES"/zcl/zcl.json -g "$ZAP_TEMPLATES"/chip-templates.json -i ../../../src/controller/controller-clusters.zap -o ../../../ diff --git a/src/app/chip-zcl-zpro-codec-api.h b/src/app/chip-zcl-zpro-codec-api.h index 3a21c97446defc..ad2896d24b8aab 100644 --- a/src/app/chip-zcl-zpro-codec-api.h +++ b/src/app/chip-zcl-zpro-codec-api.h @@ -37,6 +37,7 @@ | Identify | 0x0003 | | LevelControl | 0x0008 | | MediaPlayback | 0xF001 | +| NetworkCommissioning | 0xAAAA | | OnOff | 0x0006 | | Scenes | 0x0005 | | TemperatureMeasurement | 0x0402 | diff --git a/src/app/encoder.cpp b/src/app/encoder.cpp index e5ebc8720a300a..9ae5a5d06a51a9 100644 --- a/src/app/encoder.cpp +++ b/src/app/encoder.cpp @@ -108,6 +108,7 @@ uint16_t encodeApsFrame(uint8_t * buffer, uint16_t buf_length, EmberApsFrame * a | Identify | 0x0003 | | LevelControl | 0x0008 | | MediaPlayback | 0xF001 | +| NetworkCommissioning | 0xAAAA | | OnOff | 0x0006 | | Scenes | 0x0005 | | TemperatureMeasurement | 0x0402 | diff --git a/src/app/zap-templates/zcl/commissioning.xml b/src/app/zap-templates/zcl/commissioning.xml new file mode 100644 index 00000000000000..8e8a35ba8314ba --- /dev/null +++ b/src/app/zap-templates/zcl/commissioning.xml @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Network Commissioning + CHIP + TODO + 0xaaaa + NETWORK_COMMISSIONING_CLUSTER + true + true + + TODO + + + + + + TODO + + + + + + + TODO + + + + + + + TODO + + + + + TODO + + + + + + + TODO + + + + + TODO + + + + + + TODO + + + + + TODO + + + + + + TODO + + + + + TODO + + + + + + TODO + + + + + TODO + + + + + + TODO + + + + + TODO + + + + + + TODO + + + + + TODO + + + + diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index b1a48bd6e2742a..258d40ae2b180f 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -28,7 +28,8 @@ "lo-devices.xml", "wwah-silabs.xml", "wwah-silabs-devices.xml", - "sample-extensions.xml" + "sample-extensions.xml", + "commissioning.xml" ], "manufacturersXml": "../../../../third_party/zap/repo/zcl-builtin/shared/manufacturers.xml", "options": { diff --git a/src/controller/controller-clusters.zap b/src/controller/controller-clusters.zap new file mode 100644 index 00000000000000..48f0ea4ebef655 --- /dev/null +++ b/src/controller/controller-clusters.zap @@ -0,0 +1,6031 @@ +{ + "writeTime": "Thu Feb 18 2021 20:59:45 GMT+0800 (China Standard Time)", + "featureLevel": 11, + "creator": "zap", + "keyValuePairs": [ + { + "key": "commandDiscovery", + "value": "1" + }, + { + "key": "defaultResponsePolicy", + "value": "always" + }, + { + "key": "manufacturerCodes", + "value": "0x1002" + } + ], + "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../../src/app/zap-templates/zcl/zcl.json", + "version": "ZCL Test Data", + "type": "zcl-properties" + } + ], + "endpointTypes": [ + { + "name": "Anonymous Endpoint Type", + "deviceTypeName": null, + "deviceTypeCode": null, + "deviceTypeProfileId": null, + "clusters": [ + { + "name": "Basic", + "code": 0, + "mfgCode": null, + "define": "BASIC_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "commands": [ + { + "name": "ResetToFactoryDefaults", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ] + }, + { + "name": "Basic", + "code": 0, + "mfgCode": null, + "define": "BASIC_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ZCL version", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x08", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "power source", + "code": 7, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "commands": [] + }, + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "IdentifyQuery", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "IdentifyQueryResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "identify time", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddGroup", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ViewGroup", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetGroupMembership", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveGroup", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveAllGroups", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddGroupIfIdentifying", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "AddGroupResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ViewGroupResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetGroupMembershipResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveGroupResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "name support", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "scene count", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "current scene", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "current group", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "scene valid", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "name support", + "code": 4, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Off", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "On", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Toggle", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "on/off", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "MoveToLevel", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Move", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Step", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Stop", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToLevelWithOnOff", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveWithOnOff", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepWithOnOff", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StopWithOnOff", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "current level", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Door Lock", + "code": 257, + "mfgCode": null, + "define": "DOOR_LOCK_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "LockDoor", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UnlockDoor", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UnlockWithTimeout", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetLogRecord", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetPin", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetPin", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ClearPin", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ClearAllPins", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetWeekdaySchedule", + "code": 11, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetWeekdaySchedule", + "code": 12, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ClearWeekdaySchedule", + "code": 13, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetYeardaySchedule", + "code": 14, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetYeardaySchedule", + "code": 15, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ClearYeardaySchedule", + "code": 16, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetHolidaySchedule", + "code": 17, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetHolidaySchedule", + "code": 18, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ClearHolidaySchedule", + "code": 19, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetUserType", + "code": 20, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetUserType", + "code": 21, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetRfid", + "code": 22, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetRfid", + "code": 23, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ClearRfid", + "code": 24, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ClearAllRfids", + "code": 25, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Door Lock", + "code": 257, + "mfgCode": null, + "define": "DOOR_LOCK_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "LockDoorResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UnlockDoorResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "lock state", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "lock type", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "actuator enabled", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "door state", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "enable logging", + "code": 32, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "language", + "code": 33, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "led settings", + "code": 34, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "auto relock time", + "code": 35, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "sound volume", + "code": 36, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "operating mode", + "code": 37, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "default configuration register", + "code": 39, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "enable local programming", + "code": 40, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "enable one touch locking", + "code": 41, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "enable inside status led", + "code": 42, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "enable privacy mode button", + "code": 43, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "wrong code entry limit", + "code": 48, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "user code temporary disable time", + "code": 49, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "send pin over the air", + "code": 50, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "require pin for rf operation", + "code": 51, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "zigbee security level", + "code": 52, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "alarm mask", + "code": 64, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "keypad operation event mask", + "code": 65, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RF operation event mask", + "code": 66, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "manual operation event mask", + "code": 67, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "rfid operation event mask", + "code": 68, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "keypad programming event mask", + "code": 69, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "rf programming event mask", + "code": 70, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "rfid programming event mask", + "code": 71, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Barrier Control", + "code": 259, + "mfgCode": null, + "define": "BARRIER_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "BarrierControlGoToPercent", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "BarrierControlStop", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Barrier Control", + "code": 259, + "mfgCode": null, + "define": "BARRIER_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "barrier moving state", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "barrier safety status", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "barrier capabilities", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "barrier position", + "code": 10, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Color Control", + "code": 768, + "mfgCode": null, + "define": "COLOR_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "MoveToHue", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveHue", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepHue", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToSaturation", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveSaturation", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepSaturation", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToHueAndSaturation", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToColor", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveColor", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepColor", + "code": 9, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToColorTemperature", + "code": 10, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StopMoveStep", + "code": 71, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveColorTemperature", + "code": 75, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepColorTemperature", + "code": 76, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Color Control", + "code": 768, + "mfgCode": null, + "define": "COLOR_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "current hue", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "current saturation", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "remaining time", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "current x", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x616B", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "current y", + "code": 4, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x607D", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "drift compensation", + "code": 5, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "compensation text", + "code": 6, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "color temperature", + "code": 7, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00FA", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "color mode", + "code": 8, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "color control options", + "code": 15, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "number of primaries", + "code": 16, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "primary 1 x", + "code": 17, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "primary 1 y", + "code": 18, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "primary 1 intensity", + "code": 19, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "primary 2 x", + "code": 21, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "primary 2 y", + "code": 22, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "primary 2 intensity", + "code": 23, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "primary 3 x", + "code": 25, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "primary 3 y", + "code": 26, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "primary 3 intensity", + "code": 27, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "primary 4 x", + "code": 32, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "primary 4 y", + "code": 33, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "primary 4 intensity", + "code": 34, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "primary 5 x", + "code": 36, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "primary 5 y", + "code": 37, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "primary 5 intensity", + "code": 38, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "primary 6 x", + "code": 40, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "primary 6 y", + "code": 41, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "primary 6 intensity", + "code": 42, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "white point x", + "code": 48, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "white point y", + "code": 49, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "color point r x", + "code": 50, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "color point r y", + "code": 51, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "color point r intensity", + "code": 52, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "color point g x", + "code": 54, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "color point g y", + "code": 55, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "color point g intensity", + "code": 56, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "color point b x", + "code": 58, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "color point b y", + "code": 59, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "color point b intensity", + "code": 60, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "couple color temp to level min-mireds", + "code": 16397, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "start up color temperature mireds", + "code": 16400, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "enhanced current hue", + "code": 16384, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "enhanced color mode", + "code": 16385, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "color loop active", + "code": 16386, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "color loop direction", + "code": 16387, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "color loop time", + "code": 16388, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0019", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "color capabilities", + "code": 16394, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "color temp physical min", + "code": 16395, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "color temp physical max", + "code": 16396, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFEFF", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Measurement", + "code": 1026, + "mfgCode": null, + "define": "TEMP_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Measurement", + "code": 1026, + "mfgCode": null, + "define": "TEMP_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "measured value", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "min measured value", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "max measured value", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "tolerance", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "IAS Zone", + "code": 1280, + "mfgCode": null, + "define": "IAS_ZONE_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ZoneEnrollResponse", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "IAS Zone", + "code": 1280, + "mfgCode": null, + "define": "IAS_ZONE_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "ZoneStatusChangeNotification", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ZoneEnrollRequest", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "zone state", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "zone type", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "zone status", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "IAS CIE address", + "code": 16, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Zone ID", + "code": 17, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xff", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + } + ] + }, + { + "name": "Anonymous Endpoint Type", + "deviceTypeName": "CHIP-All-Clusters-Server", + "deviceTypeCode": 0, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Basic", + "code": 0, + "mfgCode": null, + "define": "BASIC_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "commands": [ + { + "name": "ResetToFactoryDefaults", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MfgSpecificPing", + "code": 0, + "mfgCode": "4098", + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ] + }, + { + "name": "Basic", + "code": 0, + "mfgCode": null, + "define": "BASIC_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ZCL version", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x08", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "power source", + "code": 7, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "commands": [] + }, + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "IdentifyQuery", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ] + }, + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "IdentifyQueryResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "identify time", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddGroup", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ViewGroup", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetGroupMembership", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveGroup", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveAllGroups", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddGroupIfIdentifying", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AddGroupResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ViewGroupResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetGroupMembershipResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveGroupResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "name support", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "scene count", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "current scene", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "current group", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "scene valid", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "name support", + "code": 4, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Off", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "On", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Toggle", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "on/off", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "MoveToLevel", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Move", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Step", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Stop", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToLevelWithOnOff", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveWithOnOff", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepWithOnOff", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StopWithOnOff", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "current level", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Door Lock", + "code": 257, + "mfgCode": null, + "define": "DOOR_LOCK_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "LockDoor", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UnlockDoor", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UnlockWithTimeout", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetLogRecord", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetPin", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetPin", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ClearPin", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ClearAllPins", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetWeekdaySchedule", + "code": 11, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetWeekdaySchedule", + "code": 12, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ClearWeekdaySchedule", + "code": 13, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetYeardaySchedule", + "code": 14, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetYeardaySchedule", + "code": 15, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ClearYeardaySchedule", + "code": 16, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetHolidaySchedule", + "code": 17, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetHolidaySchedule", + "code": 18, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ClearHolidaySchedule", + "code": 19, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetUserType", + "code": 20, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetUserType", + "code": 21, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetRfid", + "code": 22, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetRfid", + "code": 23, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ClearRfid", + "code": 24, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ClearAllRfids", + "code": 25, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Door Lock", + "code": 257, + "mfgCode": null, + "define": "DOOR_LOCK_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "lock state", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "lock type", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "actuator enabled", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "door state", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "enable logging", + "code": 32, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "language", + "code": 33, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "led settings", + "code": 34, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "auto relock time", + "code": 35, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "sound volume", + "code": 36, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "operating mode", + "code": 37, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "default configuration register", + "code": 39, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "enable local programming", + "code": 40, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "enable one touch locking", + "code": 41, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "enable inside status led", + "code": 42, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "enable privacy mode button", + "code": 43, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "wrong code entry limit", + "code": 48, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "user code temporary disable time", + "code": 49, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "send pin over the air", + "code": 50, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "require pin for rf operation", + "code": 51, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "zigbee security level", + "code": 52, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "alarm mask", + "code": 64, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "keypad operation event mask", + "code": 65, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RF operation event mask", + "code": 66, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "manual operation event mask", + "code": 67, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "rfid operation event mask", + "code": 68, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "keypad programming event mask", + "code": 69, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "rf programming event mask", + "code": 70, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "rfid programming event mask", + "code": 71, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "commands": [ + { + "name": "LockDoorResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UnlockDoorResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ] + }, + { + "name": "Barrier Control", + "code": 259, + "mfgCode": null, + "define": "BARRIER_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "commands": [ + { + "name": "BarrierControlGoToPercent", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "BarrierControlStop", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ] + }, + { + "name": "Barrier Control", + "code": 259, + "mfgCode": null, + "define": "BARRIER_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "barrier moving state", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "barrier safety status", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "barrier capabilities", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "barrier position", + "code": 10, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Color Control", + "code": 768, + "mfgCode": null, + "define": "COLOR_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "commands": [ + { + "name": "MoveToHue", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveHue", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepHue", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToSaturation", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveSaturation", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepSaturation", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToHueAndSaturation", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToColor", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveColor", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepColor", + "code": 9, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToColorTemperature", + "code": 10, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StopMoveStep", + "code": 71, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveColorTemperature", + "code": 75, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepColorTemperature", + "code": 76, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ] + }, + { + "name": "Color Control", + "code": 768, + "mfgCode": null, + "define": "COLOR_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "current hue", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "current saturation", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "remaining time", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "current x", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x616B", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "current y", + "code": 4, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x607D", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "drift compensation", + "code": 5, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "compensation text", + "code": 6, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "color temperature", + "code": 7, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00FA", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "color mode", + "code": 8, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "color control options", + "code": 15, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "number of primaries", + "code": 16, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "primary 1 x", + "code": 17, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "primary 1 y", + "code": 18, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "primary 1 intensity", + "code": 19, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "primary 2 x", + "code": 21, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "primary 2 y", + "code": 22, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "primary 2 intensity", + "code": 23, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "primary 3 x", + "code": 25, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "primary 3 y", + "code": 26, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "primary 3 intensity", + "code": 27, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "primary 4 x", + "code": 32, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "primary 4 y", + "code": 33, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "primary 4 intensity", + "code": 34, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "primary 5 x", + "code": 36, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "primary 5 y", + "code": 37, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "primary 5 intensity", + "code": 38, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "primary 6 x", + "code": 40, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "primary 6 y", + "code": 41, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "primary 6 intensity", + "code": 42, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "white point x", + "code": 48, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "white point y", + "code": 49, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "color point r x", + "code": 50, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "color point r y", + "code": 51, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "color point r intensity", + "code": 52, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "color point g x", + "code": 54, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "color point g y", + "code": 55, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "color point g intensity", + "code": 56, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "color point b x", + "code": 58, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "color point b y", + "code": 59, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "color point b intensity", + "code": 60, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "couple color temp to level min-mireds", + "code": 16397, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "start up color temperature mireds", + "code": 16400, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "enhanced current hue", + "code": 16384, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "enhanced color mode", + "code": 16385, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "color loop active", + "code": 16386, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "color loop direction", + "code": 16387, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "color loop time", + "code": 16388, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0019", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "color capabilities", + "code": 16394, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "color temp physical min", + "code": 16395, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "color temp physical max", + "code": 16396, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFEFF", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "commands": [] + }, + { + "name": "Temperature Measurement", + "code": 1026, + "mfgCode": null, + "define": "TEMP_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Measurement", + "code": 1026, + "mfgCode": null, + "define": "TEMP_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "measured value", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "min measured value", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "max measured value", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "tolerance", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "commands": [] + }, + { + "name": "IAS Zone", + "code": 1280, + "mfgCode": null, + "define": "IAS_ZONE_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ZoneEnrollResponse", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "IAS Zone", + "code": 1280, + "mfgCode": null, + "define": "IAS_ZONE_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "zone state", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "zone type", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "zone status", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "IAS CIE address", + "code": 16, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Zone ID", + "code": 17, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xff", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "commands": [ + { + "name": "ZoneStatusChangeNotification", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ZoneEnrollRequest", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ] + }, + { + "name": "Network Commissioning", + "code": 43690, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 1, + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "commands": [ + { + "name": "ScanNetworks", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddWiFiNetwork", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UpdateWiFiNetwork", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddThreadNetwork", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UpdateThreadNetwork", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveNetwork", + "code": 10, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "EnableNetwork", + "code": 12, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "DisableNetwork", + "code": 14, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetLastNetworkCommissioningResult", + "code": 16, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ] + }, + { + "name": "Network Commissioning", + "code": 43690, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "ScanNetworksResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddWiFiNetworkResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UpdateWiFiNetworkResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddThreadNetworkResponse", + "code": 7, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UpdateThreadNetworkResponse", + "code": 9, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveNetworkResponse", + "code": 11, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "EnableNetworkResponse", + "code": 13, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "DisableNetworkResponse", + "code": 15, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Binding", + "code": 61440, + "mfgCode": null, + "define": "BINDING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Bind", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Unbind", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Binding", + "code": 61440, + "mfgCode": null, + "define": "BINDING_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "commands": [] + }, + { + "name": "Media Playback", + "code": 61441, + "mfgCode": null, + "define": "MEDIA_PLAYBACK_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "commands": [ + { + "name": "PlayRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "PauseRequest", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StopRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StartOverRequest", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "PreviousRequest", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "NextRequest", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RewindRequest", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "FastForwardRequest", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SkipForwardRequest", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SkipBackwardRequest", + "code": 9, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ] + }, + { + "name": "Media Playback", + "code": 61441, + "mfgCode": null, + "define": "MEDIA_PLAYBACK_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "Playback", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "current state", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + } + ] + } + ], + "endpoints": [ + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 1, + "profileId": "0x0103", + "endpointId": 1, + "networkId": 0 + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 0, + "profileId": "0x0103", + "endpointId": 2, + "networkId": 0 + } + ] +} \ No newline at end of file diff --git a/src/darwin/Framework/CHIP/CHIPClustersObjc.h b/src/darwin/Framework/CHIP/CHIPClustersObjc.h new file mode 100644 index 00000000000000..5ede947e903ea0 --- /dev/null +++ b/src/darwin/Framework/CHIP/CHIPClustersObjc.h @@ -0,0 +1,591 @@ +/* + * + * Copyright (c) 2020-2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// THIS FILE IS GENERATED BY ZAP + +#ifndef CHIP_CLUSTERS_H +#define CHIP_CLUSTERS_H + +#import +#import + +@class CHIPDevice; + +NS_ASSUME_NONNULL_BEGIN + +@interface CHIPBarrierControl : NSObject + +- (nullable instancetype)initWithDevice:(CHIPDevice *)device endpoint:(uint8_t)endpoint queue:(dispatch_queue_t)queue; +- (BOOL)barrierControlGoToPercent:(CHIPDeviceCallback)onCompletion percentOpen:(uint8_t)percentOpen; +- (BOOL)barrierControlStop:(CHIPDeviceCallback)onCompletion; + +- (BOOL)readAttributeBarrierMovingState:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributeBarrierSafetyStatus:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributeBarrierCapabilities:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributeBarrierPosition:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributeClusterRevision:(CHIPDeviceCallback)onCompletion; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END + +NS_ASSUME_NONNULL_BEGIN + +@interface CHIPBasic : NSObject + +- (nullable instancetype)initWithDevice:(CHIPDevice *)device endpoint:(uint8_t)endpoint queue:(dispatch_queue_t)queue; +- (BOOL)mfgSpecificPing:(CHIPDeviceCallback)onCompletion; +- (BOOL)resetToFactoryDefaults:(CHIPDeviceCallback)onCompletion; + +- (BOOL)readAttributeZclVersion:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributePowerSource:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributeClusterRevision:(CHIPDeviceCallback)onCompletion; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END + +NS_ASSUME_NONNULL_BEGIN + +@interface CHIPBinding : NSObject + +- (nullable instancetype)initWithDevice:(CHIPDevice *)device endpoint:(uint8_t)endpoint queue:(dispatch_queue_t)queue; +- (BOOL)bind:(CHIPDeviceCallback)onCompletion + nodeId:(uint64_t)nodeId + groupId:(uint16_t)groupId + endpointId:(uint8_t)endpointId + clusterId:(uint16_t)clusterId; +- (BOOL)unbind:(CHIPDeviceCallback)onCompletion + nodeId:(uint64_t)nodeId + groupId:(uint16_t)groupId + endpointId:(uint8_t)endpointId + clusterId:(uint16_t)clusterId; + +- (BOOL)readAttributeClusterRevision:(CHIPDeviceCallback)onCompletion; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END + +NS_ASSUME_NONNULL_BEGIN + +@interface CHIPColorControl : NSObject + +- (nullable instancetype)initWithDevice:(CHIPDevice *)device endpoint:(uint8_t)endpoint queue:(dispatch_queue_t)queue; +- (BOOL)moveColor:(CHIPDeviceCallback)onCompletion + rateX:(int16_t)rateX + rateY:(int16_t)rateY + optionsMask:(uint8_t)optionsMask + optionsOverride:(uint8_t)optionsOverride; +- (BOOL)moveColorTemperature:(CHIPDeviceCallback)onCompletion + moveMode:(uint8_t)moveMode + rate:(uint16_t)rate + colorTemperatureMinimum:(uint16_t)colorTemperatureMinimum + colorTemperatureMaximum:(uint16_t)colorTemperatureMaximum + optionsMask:(uint8_t)optionsMask + optionsOverride:(uint8_t)optionsOverride; +- (BOOL)moveHue:(CHIPDeviceCallback)onCompletion + moveMode:(uint8_t)moveMode + rate:(uint8_t)rate + optionsMask:(uint8_t)optionsMask + optionsOverride:(uint8_t)optionsOverride; +- (BOOL)moveSaturation:(CHIPDeviceCallback)onCompletion + moveMode:(uint8_t)moveMode + rate:(uint8_t)rate + optionsMask:(uint8_t)optionsMask + optionsOverride:(uint8_t)optionsOverride; +- (BOOL)moveToColor:(CHIPDeviceCallback)onCompletion + colorX:(uint16_t)colorX + colorY:(uint16_t)colorY + transitionTime:(uint16_t)transitionTime + optionsMask:(uint8_t)optionsMask + optionsOverride:(uint8_t)optionsOverride; +- (BOOL)moveToColorTemperature:(CHIPDeviceCallback)onCompletion + colorTemperature:(uint16_t)colorTemperature + transitionTime:(uint16_t)transitionTime + optionsMask:(uint8_t)optionsMask + optionsOverride:(uint8_t)optionsOverride; +- (BOOL)moveToHue:(CHIPDeviceCallback)onCompletion + hue:(uint8_t)hue + direction:(uint8_t)direction + transitionTime:(uint16_t)transitionTime + optionsMask:(uint8_t)optionsMask + optionsOverride:(uint8_t)optionsOverride; +- (BOOL)moveToHueAndSaturation:(CHIPDeviceCallback)onCompletion + hue:(uint8_t)hue + saturation:(uint8_t)saturation + transitionTime:(uint16_t)transitionTime + optionsMask:(uint8_t)optionsMask + optionsOverride:(uint8_t)optionsOverride; +- (BOOL)moveToSaturation:(CHIPDeviceCallback)onCompletion + saturation:(uint8_t)saturation + transitionTime:(uint16_t)transitionTime + optionsMask:(uint8_t)optionsMask + optionsOverride:(uint8_t)optionsOverride; +- (BOOL)stepColor:(CHIPDeviceCallback)onCompletion + stepX:(int16_t)stepX + stepY:(int16_t)stepY + transitionTime:(uint16_t)transitionTime + optionsMask:(uint8_t)optionsMask + optionsOverride:(uint8_t)optionsOverride; +- (BOOL)stepColorTemperature:(CHIPDeviceCallback)onCompletion + stepMode:(uint8_t)stepMode + stepSize:(uint16_t)stepSize + transitionTime:(uint16_t)transitionTime + colorTemperatureMinimum:(uint16_t)colorTemperatureMinimum + colorTemperatureMaximum:(uint16_t)colorTemperatureMaximum + optionsMask:(uint8_t)optionsMask + optionsOverride:(uint8_t)optionsOverride; +- (BOOL)stepHue:(CHIPDeviceCallback)onCompletion + stepMode:(uint8_t)stepMode + stepSize:(uint8_t)stepSize + transitionTime:(uint8_t)transitionTime + optionsMask:(uint8_t)optionsMask + optionsOverride:(uint8_t)optionsOverride; +- (BOOL)stepSaturation:(CHIPDeviceCallback)onCompletion + stepMode:(uint8_t)stepMode + stepSize:(uint8_t)stepSize + transitionTime:(uint8_t)transitionTime + optionsMask:(uint8_t)optionsMask + optionsOverride:(uint8_t)optionsOverride; +- (BOOL)stopMoveStep:(CHIPDeviceCallback)onCompletion optionsMask:(uint8_t)optionsMask optionsOverride:(uint8_t)optionsOverride; + +- (BOOL)readAttributeCurrentHue:(CHIPDeviceCallback)onCompletion; +- (BOOL)reportAttributeCurrentHue:(CHIPDeviceCallback)onCompletion + onChange:(CHIPDeviceCallback)onChange + minInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + change:(uint8_t)change; +- (BOOL)readAttributeCurrentSaturation:(CHIPDeviceCallback)onCompletion; +- (BOOL)reportAttributeCurrentSaturation:(CHIPDeviceCallback)onCompletion + onChange:(CHIPDeviceCallback)onChange + minInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + change:(uint8_t)change; +- (BOOL)readAttributeRemainingTime:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributeCurrentX:(CHIPDeviceCallback)onCompletion; +- (BOOL)reportAttributeCurrentX:(CHIPDeviceCallback)onCompletion + onChange:(CHIPDeviceCallback)onChange + minInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + change:(uint16_t)change; +- (BOOL)readAttributeCurrentY:(CHIPDeviceCallback)onCompletion; +- (BOOL)reportAttributeCurrentY:(CHIPDeviceCallback)onCompletion + onChange:(CHIPDeviceCallback)onChange + minInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + change:(uint16_t)change; +- (BOOL)readAttributeDriftCompensation:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributeCompensationText:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributeColorTemperature:(CHIPDeviceCallback)onCompletion; +- (BOOL)reportAttributeColorTemperature:(CHIPDeviceCallback)onCompletion + onChange:(CHIPDeviceCallback)onChange + minInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + change:(uint16_t)change; +- (BOOL)readAttributeColorMode:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributeColorControlOptions:(CHIPDeviceCallback)onCompletion; +- (BOOL)writeAttributeColorControlOptions:(CHIPDeviceCallback)onCompletion value:(uint8_t)value; +- (BOOL)readAttributeNumberOfPrimaries:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributePrimary1X:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributePrimary1Y:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributePrimary1Intensity:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributePrimary2X:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributePrimary2Y:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributePrimary2Intensity:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributePrimary3X:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributePrimary3Y:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributePrimary3Intensity:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributePrimary4X:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributePrimary4Y:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributePrimary4Intensity:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributePrimary5X:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributePrimary5Y:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributePrimary5Intensity:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributePrimary6X:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributePrimary6Y:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributePrimary6Intensity:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributeWhitePointX:(CHIPDeviceCallback)onCompletion; +- (BOOL)writeAttributeWhitePointX:(CHIPDeviceCallback)onCompletion value:(uint16_t)value; +- (BOOL)readAttributeWhitePointY:(CHIPDeviceCallback)onCompletion; +- (BOOL)writeAttributeWhitePointY:(CHIPDeviceCallback)onCompletion value:(uint16_t)value; +- (BOOL)readAttributeColorPointRX:(CHIPDeviceCallback)onCompletion; +- (BOOL)writeAttributeColorPointRX:(CHIPDeviceCallback)onCompletion value:(uint16_t)value; +- (BOOL)readAttributeColorPointRY:(CHIPDeviceCallback)onCompletion; +- (BOOL)writeAttributeColorPointRY:(CHIPDeviceCallback)onCompletion value:(uint16_t)value; +- (BOOL)readAttributeColorPointRIntensity:(CHIPDeviceCallback)onCompletion; +- (BOOL)writeAttributeColorPointRIntensity:(CHIPDeviceCallback)onCompletion value:(uint8_t)value; +- (BOOL)readAttributeColorPointGX:(CHIPDeviceCallback)onCompletion; +- (BOOL)writeAttributeColorPointGX:(CHIPDeviceCallback)onCompletion value:(uint16_t)value; +- (BOOL)readAttributeColorPointGY:(CHIPDeviceCallback)onCompletion; +- (BOOL)writeAttributeColorPointGY:(CHIPDeviceCallback)onCompletion value:(uint16_t)value; +- (BOOL)readAttributeColorPointGIntensity:(CHIPDeviceCallback)onCompletion; +- (BOOL)writeAttributeColorPointGIntensity:(CHIPDeviceCallback)onCompletion value:(uint8_t)value; +- (BOOL)readAttributeColorPointBX:(CHIPDeviceCallback)onCompletion; +- (BOOL)writeAttributeColorPointBX:(CHIPDeviceCallback)onCompletion value:(uint16_t)value; +- (BOOL)readAttributeColorPointBY:(CHIPDeviceCallback)onCompletion; +- (BOOL)writeAttributeColorPointBY:(CHIPDeviceCallback)onCompletion value:(uint16_t)value; +- (BOOL)readAttributeColorPointBIntensity:(CHIPDeviceCallback)onCompletion; +- (BOOL)writeAttributeColorPointBIntensity:(CHIPDeviceCallback)onCompletion value:(uint8_t)value; +- (BOOL)readAttributeEnhancedCurrentHue:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributeEnhancedColorMode:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributeColorLoopActive:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributeColorLoopDirection:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributeColorLoopTime:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributeColorCapabilities:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributeColorTempPhysicalMin:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributeColorTempPhysicalMax:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributeCoupleColorTempToLevelMinMireds:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributeStartUpColorTemperatureMireds:(CHIPDeviceCallback)onCompletion; +- (BOOL)writeAttributeStartUpColorTemperatureMireds:(CHIPDeviceCallback)onCompletion value:(uint16_t)value; +- (BOOL)readAttributeClusterRevision:(CHIPDeviceCallback)onCompletion; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END + +NS_ASSUME_NONNULL_BEGIN + +@interface CHIPDoorLock : NSObject + +- (nullable instancetype)initWithDevice:(CHIPDevice *)device endpoint:(uint8_t)endpoint queue:(dispatch_queue_t)queue; +- (BOOL)clearAllPins:(CHIPDeviceCallback)onCompletion; +- (BOOL)clearAllRfids:(CHIPDeviceCallback)onCompletion; +- (BOOL)clearHolidaySchedule:(CHIPDeviceCallback)onCompletion scheduleId:(uint8_t)scheduleId; +- (BOOL)clearPin:(CHIPDeviceCallback)onCompletion userId:(uint16_t)userId; +- (BOOL)clearRfid:(CHIPDeviceCallback)onCompletion userId:(uint16_t)userId; +- (BOOL)clearWeekdaySchedule:(CHIPDeviceCallback)onCompletion scheduleId:(uint8_t)scheduleId userId:(uint16_t)userId; +- (BOOL)clearYeardaySchedule:(CHIPDeviceCallback)onCompletion scheduleId:(uint8_t)scheduleId userId:(uint16_t)userId; +- (BOOL)getHolidaySchedule:(CHIPDeviceCallback)onCompletion scheduleId:(uint8_t)scheduleId; +- (BOOL)getLogRecord:(CHIPDeviceCallback)onCompletion logIndex:(uint16_t)logIndex; +- (BOOL)getPin:(CHIPDeviceCallback)onCompletion userId:(uint16_t)userId; +- (BOOL)getRfid:(CHIPDeviceCallback)onCompletion userId:(uint16_t)userId; +- (BOOL)getUserType:(CHIPDeviceCallback)onCompletion userId:(uint16_t)userId; +- (BOOL)getWeekdaySchedule:(CHIPDeviceCallback)onCompletion scheduleId:(uint8_t)scheduleId userId:(uint16_t)userId; +- (BOOL)getYeardaySchedule:(CHIPDeviceCallback)onCompletion scheduleId:(uint8_t)scheduleId userId:(uint16_t)userId; +- (BOOL)lockDoor:(CHIPDeviceCallback)onCompletion pin:(char *)pin; +- (BOOL)setHolidaySchedule:(CHIPDeviceCallback)onCompletion + scheduleId:(uint8_t)scheduleId + localStartTime:(uint32_t)localStartTime + localEndTime:(uint32_t)localEndTime + operatingModeDuringHoliday:(uint8_t)operatingModeDuringHoliday; +- (BOOL)setPin:(CHIPDeviceCallback)onCompletion + userId:(uint16_t)userId + userStatus:(uint8_t)userStatus + userType:(uint8_t)userType + pin:(char *)pin; +- (BOOL)setRfid:(CHIPDeviceCallback)onCompletion + userId:(uint16_t)userId + userStatus:(uint8_t)userStatus + userType:(uint8_t)userType + id:(char *)id; +- (BOOL)setUserType:(CHIPDeviceCallback)onCompletion userId:(uint16_t)userId userType:(uint8_t)userType; +- (BOOL)setWeekdaySchedule:(CHIPDeviceCallback)onCompletion + scheduleId:(uint8_t)scheduleId + userId:(uint16_t)userId + daysMask:(uint8_t)daysMask + startHour:(uint8_t)startHour + startMinute:(uint8_t)startMinute + endHour:(uint8_t)endHour + endMinute:(uint8_t)endMinute; +- (BOOL)setYeardaySchedule:(CHIPDeviceCallback)onCompletion + scheduleId:(uint8_t)scheduleId + userId:(uint16_t)userId + localStartTime:(uint32_t)localStartTime + localEndTime:(uint32_t)localEndTime; +- (BOOL)unlockDoor:(CHIPDeviceCallback)onCompletion pin:(char *)pin; +- (BOOL)unlockWithTimeout:(CHIPDeviceCallback)onCompletion timeoutInSeconds:(uint16_t)timeoutInSeconds pin:(char *)pin; + +- (BOOL)readAttributeLockState:(CHIPDeviceCallback)onCompletion; +- (BOOL)reportAttributeLockState:(CHIPDeviceCallback)onCompletion + onChange:(CHIPDeviceCallback)onChange + minInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval; +- (BOOL)readAttributeLockType:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributeActuatorEnabled:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributeClusterRevision:(CHIPDeviceCallback)onCompletion; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END + +NS_ASSUME_NONNULL_BEGIN + +@interface CHIPGroups : NSObject + +- (nullable instancetype)initWithDevice:(CHIPDevice *)device endpoint:(uint8_t)endpoint queue:(dispatch_queue_t)queue; +- (BOOL)addGroup:(CHIPDeviceCallback)onCompletion groupId:(uint16_t)groupId groupName:(char *)groupName; +- (BOOL)addGroupIfIdentifying:(CHIPDeviceCallback)onCompletion groupId:(uint16_t)groupId groupName:(char *)groupName; +- (BOOL)getGroupMembership:(CHIPDeviceCallback)onCompletion groupCount:(uint8_t)groupCount groupList:(uint16_t)groupList; +- (BOOL)removeAllGroups:(CHIPDeviceCallback)onCompletion; +- (BOOL)removeGroup:(CHIPDeviceCallback)onCompletion groupId:(uint16_t)groupId; +- (BOOL)viewGroup:(CHIPDeviceCallback)onCompletion groupId:(uint16_t)groupId; + +- (BOOL)readAttributeNameSupport:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributeClusterRevision:(CHIPDeviceCallback)onCompletion; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END + +NS_ASSUME_NONNULL_BEGIN + +@interface CHIPIasZone : NSObject + +- (nullable instancetype)initWithDevice:(CHIPDevice *)device endpoint:(uint8_t)endpoint queue:(dispatch_queue_t)queue; + +- (BOOL)readAttributeZoneState:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributeZoneType:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributeZoneStatus:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributeIasCieAddress:(CHIPDeviceCallback)onCompletion; +- (BOOL)writeAttributeIasCieAddress:(CHIPDeviceCallback)onCompletion value:(uint64_t)value; +- (BOOL)readAttributeZoneId:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributeClusterRevision:(CHIPDeviceCallback)onCompletion; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END + +NS_ASSUME_NONNULL_BEGIN + +@interface CHIPIdentify : NSObject + +- (nullable instancetype)initWithDevice:(CHIPDevice *)device endpoint:(uint8_t)endpoint queue:(dispatch_queue_t)queue; +- (BOOL)identify:(CHIPDeviceCallback)onCompletion identifyTime:(uint16_t)identifyTime; +- (BOOL)identifyQuery:(CHIPDeviceCallback)onCompletion; + +- (BOOL)readAttributeIdentifyTime:(CHIPDeviceCallback)onCompletion; +- (BOOL)writeAttributeIdentifyTime:(CHIPDeviceCallback)onCompletion value:(uint16_t)value; +- (BOOL)readAttributeClusterRevision:(CHIPDeviceCallback)onCompletion; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END + +NS_ASSUME_NONNULL_BEGIN + +@interface CHIPLevelControl : NSObject + +- (nullable instancetype)initWithDevice:(CHIPDevice *)device endpoint:(uint8_t)endpoint queue:(dispatch_queue_t)queue; +- (BOOL)move:(CHIPDeviceCallback)onCompletion + moveMode:(uint8_t)moveMode + rate:(uint8_t)rate + optionMask:(uint8_t)optionMask + optionOverride:(uint8_t)optionOverride; +- (BOOL)moveToLevel:(CHIPDeviceCallback)onCompletion + level:(uint8_t)level + transitionTime:(uint16_t)transitionTime + optionMask:(uint8_t)optionMask + optionOverride:(uint8_t)optionOverride; +- (BOOL)moveToLevelWithOnOff:(CHIPDeviceCallback)onCompletion level:(uint8_t)level transitionTime:(uint16_t)transitionTime; +- (BOOL)moveWithOnOff:(CHIPDeviceCallback)onCompletion moveMode:(uint8_t)moveMode rate:(uint8_t)rate; +- (BOOL)step:(CHIPDeviceCallback)onCompletion + stepMode:(uint8_t)stepMode + stepSize:(uint8_t)stepSize + transitionTime:(uint16_t)transitionTime + optionMask:(uint8_t)optionMask + optionOverride:(uint8_t)optionOverride; +- (BOOL)stepWithOnOff:(CHIPDeviceCallback)onCompletion + stepMode:(uint8_t)stepMode + stepSize:(uint8_t)stepSize + transitionTime:(uint16_t)transitionTime; +- (BOOL)stop:(CHIPDeviceCallback)onCompletion optionMask:(uint8_t)optionMask optionOverride:(uint8_t)optionOverride; +- (BOOL)stopWithOnOff:(CHIPDeviceCallback)onCompletion; + +- (BOOL)readAttributeCurrentLevel:(CHIPDeviceCallback)onCompletion; +- (BOOL)reportAttributeCurrentLevel:(CHIPDeviceCallback)onCompletion + onChange:(CHIPDeviceCallback)onChange + minInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + change:(uint8_t)change; +- (BOOL)readAttributeClusterRevision:(CHIPDeviceCallback)onCompletion; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END + +NS_ASSUME_NONNULL_BEGIN + +@interface CHIPNetworkProvisioning : NSObject + +- (nullable instancetype)initWithDevice:(CHIPDevice *)device endpoint:(uint8_t)endpoint queue:(dispatch_queue_t)queue; +- (BOOL)addThreadNetwork:(CHIPDeviceCallback)onCompletion + operationalDataset:(uint8_t *)operationalDataset + operationalDatasetLen:(uint32_t)operationalDatasetLen + breadcrumb:(uint64_t)breadcrumb + timeoutMs:(uint32_t)timeoutMs; +- (BOOL)addWiFiNetwork:(CHIPDeviceCallback)onCompletion + ssid:(uint8_t *)ssid + ssidLen:(uint32_t)ssidLen + credentials:(uint8_t *)credentials + credentialsLen:(uint32_t)credentialsLen + breadcrumb:(uint64_t)breadcrumb + timeoutMs:(uint32_t)timeoutMs; +- (BOOL)disableNetwork:(CHIPDeviceCallback)onCompletion + networkID:(uint8_t *)networkID + networkIDLen:(uint32_t)networkIDLen + breadcrumb:(uint64_t)breadcrumb + timeoutMs:(uint32_t)timeoutMs; +- (BOOL)enableNetwork:(CHIPDeviceCallback)onCompletion + networkID:(uint8_t *)networkID + networkIDLen:(uint32_t)networkIDLen + breadcrumb:(uint64_t)breadcrumb + timeoutMs:(uint32_t)timeoutMs; +- (BOOL)getLastNetworkProvisioningResult:(CHIPDeviceCallback)onCompletion timeoutMs:(uint32_t)timeoutMs; +- (BOOL)removeNetwork:(CHIPDeviceCallback)onCompletion + networkID:(uint8_t *)networkID + networkIDLen:(uint32_t)networkIDLen + breadcrumb:(uint64_t)breadcrumb + timeoutMs:(uint32_t)timeoutMs; +- (BOOL)scanNetworks:(CHIPDeviceCallback)onCompletion + ssid:(uint8_t *)ssid + ssidLen:(uint32_t)ssidLen + breadcrumb:(uint64_t)breadcrumb + timeoutMs:(uint32_t)timeoutMs; +- (BOOL)updateThreadNetwork:(CHIPDeviceCallback)onCompletion + operationalDataset:(uint8_t *)operationalDataset + operationalDatasetLen:(uint32_t)operationalDatasetLen + breadcrumb:(uint64_t)breadcrumb + timeoutMs:(uint32_t)timeoutMs; +- (BOOL)updateWiFiNetwork:(CHIPDeviceCallback)onCompletion + ssid:(uint8_t *)ssid + ssidLen:(uint32_t)ssidLen + credentials:(uint8_t *)credentials + credentialsLen:(uint32_t)credentialsLen + breadcrumb:(uint64_t)breadcrumb + timeoutMs:(uint32_t)timeoutMs; + +- (BOOL)readAttributeClusterRevision:(CHIPDeviceCallback)onCompletion; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END + +NS_ASSUME_NONNULL_BEGIN + +@interface CHIPOnOff : NSObject + +- (nullable instancetype)initWithDevice:(CHIPDevice *)device endpoint:(uint8_t)endpoint queue:(dispatch_queue_t)queue; +- (BOOL)off:(CHIPDeviceCallback)onCompletion; +- (BOOL)on:(CHIPDeviceCallback)onCompletion; +- (BOOL)toggle:(CHIPDeviceCallback)onCompletion; + +- (BOOL)readAttributeOnOff:(CHIPDeviceCallback)onCompletion; +- (BOOL)reportAttributeOnOff:(CHIPDeviceCallback)onCompletion + onChange:(CHIPDeviceCallback)onChange + minInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval; +- (BOOL)readAttributeClusterRevision:(CHIPDeviceCallback)onCompletion; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END + +NS_ASSUME_NONNULL_BEGIN + +@interface CHIPScenes : NSObject + +- (nullable instancetype)initWithDevice:(CHIPDevice *)device endpoint:(uint8_t)endpoint queue:(dispatch_queue_t)queue; +- (BOOL)addScene:(CHIPDeviceCallback)onCompletion + groupId:(uint16_t)groupId + sceneId:(uint8_t)sceneId + transitionTime:(uint16_t)transitionTime + sceneName:(char *)sceneName + clusterId:(uint16_t)clusterId + length:(uint8_t)length + value:(uint8_t)value; +- (BOOL)getSceneMembership:(CHIPDeviceCallback)onCompletion groupId:(uint16_t)groupId; +- (BOOL)recallScene:(CHIPDeviceCallback)onCompletion + groupId:(uint16_t)groupId + sceneId:(uint8_t)sceneId + transitionTime:(uint16_t)transitionTime; +- (BOOL)removeAllScenes:(CHIPDeviceCallback)onCompletion groupId:(uint16_t)groupId; +- (BOOL)removeScene:(CHIPDeviceCallback)onCompletion groupId:(uint16_t)groupId sceneId:(uint8_t)sceneId; +- (BOOL)storeScene:(CHIPDeviceCallback)onCompletion groupId:(uint16_t)groupId sceneId:(uint8_t)sceneId; +- (BOOL)viewScene:(CHIPDeviceCallback)onCompletion groupId:(uint16_t)groupId sceneId:(uint8_t)sceneId; + +- (BOOL)readAttributeSceneCount:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributeCurrentScene:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributeCurrentGroup:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributeSceneValid:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributeNameSupport:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributeClusterRevision:(CHIPDeviceCallback)onCompletion; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END + +NS_ASSUME_NONNULL_BEGIN + +@interface CHIPTemperatureMeasurement : NSObject + +- (nullable instancetype)initWithDevice:(CHIPDevice *)device endpoint:(uint8_t)endpoint queue:(dispatch_queue_t)queue; + +- (BOOL)readAttributeMeasuredValue:(CHIPDeviceCallback)onCompletion; +- (BOOL)reportAttributeMeasuredValue:(CHIPDeviceCallback)onCompletion + onChange:(CHIPDeviceCallback)onChange + minInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + change:(int16_t)change; +- (BOOL)readAttributeMinMeasuredValue:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributeMaxMeasuredValue:(CHIPDeviceCallback)onCompletion; +- (BOOL)readAttributeClusterRevision:(CHIPDeviceCallback)onCompletion; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END + +#endif /* CHIP_CLUSTERS_H */ diff --git a/src/darwin/Framework/CHIP/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/CHIPClustersObjc.mm new file mode 100644 index 00000000000000..9a04dd46c64771 --- /dev/null +++ b/src/darwin/Framework/CHIP/CHIPClustersObjc.mm @@ -0,0 +1,3593 @@ +/* + * + * Copyright (c) 2020-2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// THIS FILE IS GENERATED BY ZAP + +#import + +#import "CHIPCallbackBridge.h" +#import "CHIPClustersObjc.h" +#import "CHIPDevice.h" +#import "CHIPDevice_Internal.h" + +#include + +@interface CHIPBarrierControl () + +@property (readonly) chip::Controller::BarrierControlCluster cppCluster; +@property (readonly, nonatomic) dispatch_queue_t callbackQueue; +@end + +@implementation CHIPBarrierControl + +- (instancetype)initWithDevice:(CHIPDevice *)device endpoint:(chip::EndpointId)endpoint queue:(dispatch_queue_t)queue +{ + CHIP_ERROR err = _cppCluster.Associate([device internalDevice], endpoint); + + if (err != CHIP_NO_ERROR) { + return nil; + } + + if (self = [super init]) { + _callbackQueue = queue; + } + return self; +} + +- (BOOL)barrierControlGoToPercent:(CHIPDeviceCallback)onCompletion percentOpen:(uint8_t)percentOpen +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.BarrierControlGoToPercent(callback, percentOpen); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)barrierControlStop:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.BarrierControlStop(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeBarrierMovingState:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeBarrierMovingState(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeBarrierSafetyStatus:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeBarrierSafetyStatus(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeBarrierCapabilities:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeBarrierCapabilities(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeBarrierPosition:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeBarrierPosition(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeClusterRevision:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeClusterRevision(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +@end + +@interface CHIPBasic () + +@property (readonly) chip::Controller::BasicCluster cppCluster; +@property (readonly, nonatomic) dispatch_queue_t callbackQueue; +@end + +@implementation CHIPBasic + +- (instancetype)initWithDevice:(CHIPDevice *)device endpoint:(chip::EndpointId)endpoint queue:(dispatch_queue_t)queue +{ + CHIP_ERROR err = _cppCluster.Associate([device internalDevice], endpoint); + + if (err != CHIP_NO_ERROR) { + return nil; + } + + if (self = [super init]) { + _callbackQueue = queue; + } + return self; +} + +- (BOOL)mfgSpecificPing:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.MfgSpecificPing(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)resetToFactoryDefaults:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ResetToFactoryDefaults(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeZclVersion:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeZclVersion(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributePowerSource:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributePowerSource(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeClusterRevision:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeClusterRevision(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +@end + +@interface CHIPBinding () + +@property (readonly) chip::Controller::BindingCluster cppCluster; +@property (readonly, nonatomic) dispatch_queue_t callbackQueue; +@end + +@implementation CHIPBinding + +- (instancetype)initWithDevice:(CHIPDevice *)device endpoint:(chip::EndpointId)endpoint queue:(dispatch_queue_t)queue +{ + CHIP_ERROR err = _cppCluster.Associate([device internalDevice], endpoint); + + if (err != CHIP_NO_ERROR) { + return nil; + } + + if (self = [super init]) { + _callbackQueue = queue; + } + return self; +} + +- (BOOL)bind:(CHIPDeviceCallback)onCompletion + nodeId:(chip::NodeId)nodeId + groupId:(chip::GroupId)groupId + endpointId:(chip::EndpointId)endpointId + clusterId:(chip::ClusterId)clusterId +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.Bind(callback, nodeId, groupId, endpointId, clusterId); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)unbind:(CHIPDeviceCallback)onCompletion + nodeId:(chip::NodeId)nodeId + groupId:(chip::GroupId)groupId + endpointId:(chip::EndpointId)endpointId + clusterId:(chip::ClusterId)clusterId +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.Unbind(callback, nodeId, groupId, endpointId, clusterId); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeClusterRevision:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeClusterRevision(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +@end + +@interface CHIPColorControl () + +@property (readonly) chip::Controller::ColorControlCluster cppCluster; +@property (readonly, nonatomic) dispatch_queue_t callbackQueue; +@end + +@implementation CHIPColorControl + +- (instancetype)initWithDevice:(CHIPDevice *)device endpoint:(chip::EndpointId)endpoint queue:(dispatch_queue_t)queue +{ + CHIP_ERROR err = _cppCluster.Associate([device internalDevice], endpoint); + + if (err != CHIP_NO_ERROR) { + return nil; + } + + if (self = [super init]) { + _callbackQueue = queue; + } + return self; +} + +- (BOOL)moveColor:(CHIPDeviceCallback)onCompletion + rateX:(int16_t)rateX + rateY:(int16_t)rateY + optionsMask:(uint8_t)optionsMask + optionsOverride:(uint8_t)optionsOverride +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.MoveColor(callback, rateX, rateY, optionsMask, optionsOverride); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)moveColorTemperature:(CHIPDeviceCallback)onCompletion + moveMode:(uint8_t)moveMode + rate:(uint16_t)rate + colorTemperatureMinimum:(uint16_t)colorTemperatureMinimum + colorTemperatureMaximum:(uint16_t)colorTemperatureMaximum + optionsMask:(uint8_t)optionsMask + optionsOverride:(uint8_t)optionsOverride +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.MoveColorTemperature( + callback, moveMode, rate, colorTemperatureMinimum, colorTemperatureMaximum, optionsMask, optionsOverride); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)moveHue:(CHIPDeviceCallback)onCompletion + moveMode:(uint8_t)moveMode + rate:(uint8_t)rate + optionsMask:(uint8_t)optionsMask + optionsOverride:(uint8_t)optionsOverride +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.MoveHue(callback, moveMode, rate, optionsMask, optionsOverride); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)moveSaturation:(CHIPDeviceCallback)onCompletion + moveMode:(uint8_t)moveMode + rate:(uint8_t)rate + optionsMask:(uint8_t)optionsMask + optionsOverride:(uint8_t)optionsOverride +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.MoveSaturation(callback, moveMode, rate, optionsMask, optionsOverride); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)moveToColor:(CHIPDeviceCallback)onCompletion + colorX:(uint16_t)colorX + colorY:(uint16_t)colorY + transitionTime:(uint16_t)transitionTime + optionsMask:(uint8_t)optionsMask + optionsOverride:(uint8_t)optionsOverride +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.MoveToColor(callback, colorX, colorY, transitionTime, optionsMask, optionsOverride); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)moveToColorTemperature:(CHIPDeviceCallback)onCompletion + colorTemperature:(uint16_t)colorTemperature + transitionTime:(uint16_t)transitionTime + optionsMask:(uint8_t)optionsMask + optionsOverride:(uint8_t)optionsOverride +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err + = self.cppCluster.MoveToColorTemperature(callback, colorTemperature, transitionTime, optionsMask, optionsOverride); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)moveToHue:(CHIPDeviceCallback)onCompletion + hue:(uint8_t)hue + direction:(uint8_t)direction + transitionTime:(uint16_t)transitionTime + optionsMask:(uint8_t)optionsMask + optionsOverride:(uint8_t)optionsOverride +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.MoveToHue(callback, hue, direction, transitionTime, optionsMask, optionsOverride); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)moveToHueAndSaturation:(CHIPDeviceCallback)onCompletion + hue:(uint8_t)hue + saturation:(uint8_t)saturation + transitionTime:(uint16_t)transitionTime + optionsMask:(uint8_t)optionsMask + optionsOverride:(uint8_t)optionsOverride +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err + = self.cppCluster.MoveToHueAndSaturation(callback, hue, saturation, transitionTime, optionsMask, optionsOverride); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)moveToSaturation:(CHIPDeviceCallback)onCompletion + saturation:(uint8_t)saturation + transitionTime:(uint16_t)transitionTime + optionsMask:(uint8_t)optionsMask + optionsOverride:(uint8_t)optionsOverride +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.MoveToSaturation(callback, saturation, transitionTime, optionsMask, optionsOverride); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)stepColor:(CHIPDeviceCallback)onCompletion + stepX:(int16_t)stepX + stepY:(int16_t)stepY + transitionTime:(uint16_t)transitionTime + optionsMask:(uint8_t)optionsMask + optionsOverride:(uint8_t)optionsOverride +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.StepColor(callback, stepX, stepY, transitionTime, optionsMask, optionsOverride); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)stepColorTemperature:(CHIPDeviceCallback)onCompletion + stepMode:(uint8_t)stepMode + stepSize:(uint16_t)stepSize + transitionTime:(uint16_t)transitionTime + colorTemperatureMinimum:(uint16_t)colorTemperatureMinimum + colorTemperatureMaximum:(uint16_t)colorTemperatureMaximum + optionsMask:(uint8_t)optionsMask + optionsOverride:(uint8_t)optionsOverride +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.StepColorTemperature(callback, stepMode, stepSize, transitionTime, colorTemperatureMinimum, + colorTemperatureMaximum, optionsMask, optionsOverride); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)stepHue:(CHIPDeviceCallback)onCompletion + stepMode:(uint8_t)stepMode + stepSize:(uint8_t)stepSize + transitionTime:(uint8_t)transitionTime + optionsMask:(uint8_t)optionsMask + optionsOverride:(uint8_t)optionsOverride +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.StepHue(callback, stepMode, stepSize, transitionTime, optionsMask, optionsOverride); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)stepSaturation:(CHIPDeviceCallback)onCompletion + stepMode:(uint8_t)stepMode + stepSize:(uint8_t)stepSize + transitionTime:(uint8_t)transitionTime + optionsMask:(uint8_t)optionsMask + optionsOverride:(uint8_t)optionsOverride +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.StepSaturation(callback, stepMode, stepSize, transitionTime, optionsMask, optionsOverride); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)stopMoveStep:(CHIPDeviceCallback)onCompletion optionsMask:(uint8_t)optionsMask optionsOverride:(uint8_t)optionsOverride +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.StopMoveStep(callback, optionsMask, optionsOverride); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeCurrentHue:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeCurrentHue(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)reportAttributeCurrentHue:(CHIPDeviceCallback)onCompletion + onChange:(CHIPDeviceCallback)onChange + minInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + change:(uint8_t)change +{ + CHIPCallbackBridge * completionCallback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!completionCallback) { + return NO; + } + + CHIPCallbackBridge * changeCallback = new CHIPCallbackBridge(onChange, _callbackQueue); + if (!changeCallback) { + return NO; + } + + CHIP_ERROR err + = self.cppCluster.ReportAttributeCurrentHue(completionCallback, changeCallback, minInterval, maxInterval, change); + if (err != CHIP_NO_ERROR) { + completionCallback->Cancel(); + changeCallback->Cancel(); + delete completionCallback; + delete changeCallback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeCurrentSaturation:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeCurrentSaturation(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)reportAttributeCurrentSaturation:(CHIPDeviceCallback)onCompletion + onChange:(CHIPDeviceCallback)onChange + minInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + change:(uint8_t)change +{ + CHIPCallbackBridge * completionCallback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!completionCallback) { + return NO; + } + + CHIPCallbackBridge * changeCallback = new CHIPCallbackBridge(onChange, _callbackQueue); + if (!changeCallback) { + return NO; + } + + CHIP_ERROR err + = self.cppCluster.ReportAttributeCurrentSaturation(completionCallback, changeCallback, minInterval, maxInterval, change); + if (err != CHIP_NO_ERROR) { + completionCallback->Cancel(); + changeCallback->Cancel(); + delete completionCallback; + delete changeCallback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeRemainingTime:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeRemainingTime(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeCurrentX:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeCurrentX(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)reportAttributeCurrentX:(CHIPDeviceCallback)onCompletion + onChange:(CHIPDeviceCallback)onChange + minInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + change:(uint16_t)change +{ + CHIPCallbackBridge * completionCallback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!completionCallback) { + return NO; + } + + CHIPCallbackBridge * changeCallback = new CHIPCallbackBridge(onChange, _callbackQueue); + if (!changeCallback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReportAttributeCurrentX(completionCallback, changeCallback, minInterval, maxInterval, change); + if (err != CHIP_NO_ERROR) { + completionCallback->Cancel(); + changeCallback->Cancel(); + delete completionCallback; + delete changeCallback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeCurrentY:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeCurrentY(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)reportAttributeCurrentY:(CHIPDeviceCallback)onCompletion + onChange:(CHIPDeviceCallback)onChange + minInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + change:(uint16_t)change +{ + CHIPCallbackBridge * completionCallback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!completionCallback) { + return NO; + } + + CHIPCallbackBridge * changeCallback = new CHIPCallbackBridge(onChange, _callbackQueue); + if (!changeCallback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReportAttributeCurrentY(completionCallback, changeCallback, minInterval, maxInterval, change); + if (err != CHIP_NO_ERROR) { + completionCallback->Cancel(); + changeCallback->Cancel(); + delete completionCallback; + delete changeCallback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeDriftCompensation:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeDriftCompensation(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeCompensationText:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeCompensationText(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeColorTemperature:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeColorTemperature(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)reportAttributeColorTemperature:(CHIPDeviceCallback)onCompletion + onChange:(CHIPDeviceCallback)onChange + minInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + change:(uint16_t)change +{ + CHIPCallbackBridge * completionCallback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!completionCallback) { + return NO; + } + + CHIPCallbackBridge * changeCallback = new CHIPCallbackBridge(onChange, _callbackQueue); + if (!changeCallback) { + return NO; + } + + CHIP_ERROR err + = self.cppCluster.ReportAttributeColorTemperature(completionCallback, changeCallback, minInterval, maxInterval, change); + if (err != CHIP_NO_ERROR) { + completionCallback->Cancel(); + changeCallback->Cancel(); + delete completionCallback; + delete changeCallback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeColorMode:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeColorMode(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeColorControlOptions:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeColorControlOptions(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)writeAttributeColorControlOptions:(CHIPDeviceCallback)onCompletion value:(uint8_t)value +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.WriteAttributeColorControlOptions(callback, value); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeNumberOfPrimaries:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeNumberOfPrimaries(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributePrimary1X:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributePrimary1X(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributePrimary1Y:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributePrimary1Y(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributePrimary1Intensity:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributePrimary1Intensity(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributePrimary2X:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributePrimary2X(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributePrimary2Y:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributePrimary2Y(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributePrimary2Intensity:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributePrimary2Intensity(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributePrimary3X:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributePrimary3X(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributePrimary3Y:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributePrimary3Y(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributePrimary3Intensity:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributePrimary3Intensity(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributePrimary4X:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributePrimary4X(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributePrimary4Y:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributePrimary4Y(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributePrimary4Intensity:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributePrimary4Intensity(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributePrimary5X:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributePrimary5X(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributePrimary5Y:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributePrimary5Y(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributePrimary5Intensity:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributePrimary5Intensity(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributePrimary6X:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributePrimary6X(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributePrimary6Y:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributePrimary6Y(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributePrimary6Intensity:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributePrimary6Intensity(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeWhitePointX:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeWhitePointX(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)writeAttributeWhitePointX:(CHIPDeviceCallback)onCompletion value:(uint16_t)value +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.WriteAttributeWhitePointX(callback, value); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeWhitePointY:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeWhitePointY(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)writeAttributeWhitePointY:(CHIPDeviceCallback)onCompletion value:(uint16_t)value +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.WriteAttributeWhitePointY(callback, value); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeColorPointRX:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeColorPointRX(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)writeAttributeColorPointRX:(CHIPDeviceCallback)onCompletion value:(uint16_t)value +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.WriteAttributeColorPointRX(callback, value); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeColorPointRY:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeColorPointRY(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)writeAttributeColorPointRY:(CHIPDeviceCallback)onCompletion value:(uint16_t)value +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.WriteAttributeColorPointRY(callback, value); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeColorPointRIntensity:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeColorPointRIntensity(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)writeAttributeColorPointRIntensity:(CHIPDeviceCallback)onCompletion value:(uint8_t)value +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.WriteAttributeColorPointRIntensity(callback, value); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeColorPointGX:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeColorPointGX(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)writeAttributeColorPointGX:(CHIPDeviceCallback)onCompletion value:(uint16_t)value +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.WriteAttributeColorPointGX(callback, value); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeColorPointGY:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeColorPointGY(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)writeAttributeColorPointGY:(CHIPDeviceCallback)onCompletion value:(uint16_t)value +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.WriteAttributeColorPointGY(callback, value); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeColorPointGIntensity:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeColorPointGIntensity(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)writeAttributeColorPointGIntensity:(CHIPDeviceCallback)onCompletion value:(uint8_t)value +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.WriteAttributeColorPointGIntensity(callback, value); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeColorPointBX:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeColorPointBX(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)writeAttributeColorPointBX:(CHIPDeviceCallback)onCompletion value:(uint16_t)value +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.WriteAttributeColorPointBX(callback, value); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeColorPointBY:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeColorPointBY(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)writeAttributeColorPointBY:(CHIPDeviceCallback)onCompletion value:(uint16_t)value +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.WriteAttributeColorPointBY(callback, value); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeColorPointBIntensity:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeColorPointBIntensity(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)writeAttributeColorPointBIntensity:(CHIPDeviceCallback)onCompletion value:(uint8_t)value +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.WriteAttributeColorPointBIntensity(callback, value); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeEnhancedCurrentHue:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeEnhancedCurrentHue(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeEnhancedColorMode:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeEnhancedColorMode(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeColorLoopActive:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeColorLoopActive(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeColorLoopDirection:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeColorLoopDirection(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeColorLoopTime:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeColorLoopTime(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeColorCapabilities:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeColorCapabilities(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeColorTempPhysicalMin:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeColorTempPhysicalMin(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeColorTempPhysicalMax:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeColorTempPhysicalMax(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeCoupleColorTempToLevelMinMireds:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeCoupleColorTempToLevelMinMireds(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeStartUpColorTemperatureMireds:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeStartUpColorTemperatureMireds(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)writeAttributeStartUpColorTemperatureMireds:(CHIPDeviceCallback)onCompletion value:(uint16_t)value +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.WriteAttributeStartUpColorTemperatureMireds(callback, value); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeClusterRevision:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeClusterRevision(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +@end + +@interface CHIPDoorLock () + +@property (readonly) chip::Controller::DoorLockCluster cppCluster; +@property (readonly, nonatomic) dispatch_queue_t callbackQueue; +@end + +@implementation CHIPDoorLock + +- (instancetype)initWithDevice:(CHIPDevice *)device endpoint:(chip::EndpointId)endpoint queue:(dispatch_queue_t)queue +{ + CHIP_ERROR err = _cppCluster.Associate([device internalDevice], endpoint); + + if (err != CHIP_NO_ERROR) { + return nil; + } + + if (self = [super init]) { + _callbackQueue = queue; + } + return self; +} + +- (BOOL)clearAllPins:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ClearAllPins(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)clearAllRfids:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ClearAllRfids(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)clearHolidaySchedule:(CHIPDeviceCallback)onCompletion scheduleId:(uint8_t)scheduleId +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ClearHolidaySchedule(callback, scheduleId); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)clearPin:(CHIPDeviceCallback)onCompletion userId:(uint16_t)userId +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ClearPin(callback, userId); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)clearRfid:(CHIPDeviceCallback)onCompletion userId:(uint16_t)userId +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ClearRfid(callback, userId); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)clearWeekdaySchedule:(CHIPDeviceCallback)onCompletion scheduleId:(uint8_t)scheduleId userId:(uint16_t)userId +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ClearWeekdaySchedule(callback, scheduleId, userId); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)clearYeardaySchedule:(CHIPDeviceCallback)onCompletion scheduleId:(uint8_t)scheduleId userId:(uint16_t)userId +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ClearYeardaySchedule(callback, scheduleId, userId); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)getHolidaySchedule:(CHIPDeviceCallback)onCompletion scheduleId:(uint8_t)scheduleId +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.GetHolidaySchedule(callback, scheduleId); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)getLogRecord:(CHIPDeviceCallback)onCompletion logIndex:(uint16_t)logIndex +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.GetLogRecord(callback, logIndex); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)getPin:(CHIPDeviceCallback)onCompletion userId:(uint16_t)userId +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.GetPin(callback, userId); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)getRfid:(CHIPDeviceCallback)onCompletion userId:(uint16_t)userId +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.GetRfid(callback, userId); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)getUserType:(CHIPDeviceCallback)onCompletion userId:(uint16_t)userId +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.GetUserType(callback, userId); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)getWeekdaySchedule:(CHIPDeviceCallback)onCompletion scheduleId:(uint8_t)scheduleId userId:(uint16_t)userId +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.GetWeekdaySchedule(callback, scheduleId, userId); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)getYeardaySchedule:(CHIPDeviceCallback)onCompletion scheduleId:(uint8_t)scheduleId userId:(uint16_t)userId +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.GetYeardaySchedule(callback, scheduleId, userId); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)lockDoor:(CHIPDeviceCallback)onCompletion pin:(char *)pin +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.LockDoor(callback, pin); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)setHolidaySchedule:(CHIPDeviceCallback)onCompletion + scheduleId:(uint8_t)scheduleId + localStartTime:(uint32_t)localStartTime + localEndTime:(uint32_t)localEndTime + operatingModeDuringHoliday:(uint8_t)operatingModeDuringHoliday +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err + = self.cppCluster.SetHolidaySchedule(callback, scheduleId, localStartTime, localEndTime, operatingModeDuringHoliday); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)setPin:(CHIPDeviceCallback)onCompletion + userId:(uint16_t)userId + userStatus:(uint8_t)userStatus + userType:(uint8_t)userType + pin:(char *)pin +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.SetPin(callback, userId, userStatus, userType, pin); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)setRfid:(CHIPDeviceCallback)onCompletion + userId:(uint16_t)userId + userStatus:(uint8_t)userStatus + userType:(uint8_t)userType + id:(char *)id +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.SetRfid(callback, userId, userStatus, userType, id); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)setUserType:(CHIPDeviceCallback)onCompletion userId:(uint16_t)userId userType:(uint8_t)userType +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.SetUserType(callback, userId, userType); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)setWeekdaySchedule:(CHIPDeviceCallback)onCompletion + scheduleId:(uint8_t)scheduleId + userId:(uint16_t)userId + daysMask:(uint8_t)daysMask + startHour:(uint8_t)startHour + startMinute:(uint8_t)startMinute + endHour:(uint8_t)endHour + endMinute:(uint8_t)endMinute +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err + = self.cppCluster.SetWeekdaySchedule(callback, scheduleId, userId, daysMask, startHour, startMinute, endHour, endMinute); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)setYeardaySchedule:(CHIPDeviceCallback)onCompletion + scheduleId:(uint8_t)scheduleId + userId:(uint16_t)userId + localStartTime:(uint32_t)localStartTime + localEndTime:(uint32_t)localEndTime +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.SetYeardaySchedule(callback, scheduleId, userId, localStartTime, localEndTime); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)unlockDoor:(CHIPDeviceCallback)onCompletion pin:(char *)pin +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.UnlockDoor(callback, pin); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)unlockWithTimeout:(CHIPDeviceCallback)onCompletion timeoutInSeconds:(uint16_t)timeoutInSeconds pin:(char *)pin +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.UnlockWithTimeout(callback, timeoutInSeconds, pin); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeLockState:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeLockState(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)reportAttributeLockState:(CHIPDeviceCallback)onCompletion + onChange:(CHIPDeviceCallback)onChange + minInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval +{ + CHIPCallbackBridge * completionCallback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!completionCallback) { + return NO; + } + + CHIPCallbackBridge * changeCallback = new CHIPCallbackBridge(onChange, _callbackQueue); + if (!changeCallback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReportAttributeLockState(completionCallback, changeCallback, minInterval, maxInterval); + if (err != CHIP_NO_ERROR) { + completionCallback->Cancel(); + changeCallback->Cancel(); + delete completionCallback; + delete changeCallback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeLockType:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeLockType(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeActuatorEnabled:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeActuatorEnabled(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeClusterRevision:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeClusterRevision(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +@end + +@interface CHIPGroups () + +@property (readonly) chip::Controller::GroupsCluster cppCluster; +@property (readonly, nonatomic) dispatch_queue_t callbackQueue; +@end + +@implementation CHIPGroups + +- (instancetype)initWithDevice:(CHIPDevice *)device endpoint:(chip::EndpointId)endpoint queue:(dispatch_queue_t)queue +{ + CHIP_ERROR err = _cppCluster.Associate([device internalDevice], endpoint); + + if (err != CHIP_NO_ERROR) { + return nil; + } + + if (self = [super init]) { + _callbackQueue = queue; + } + return self; +} + +- (BOOL)addGroup:(CHIPDeviceCallback)onCompletion groupId:(uint16_t)groupId groupName:(char *)groupName +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.AddGroup(callback, groupId, groupName); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)addGroupIfIdentifying:(CHIPDeviceCallback)onCompletion groupId:(uint16_t)groupId groupName:(char *)groupName +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.AddGroupIfIdentifying(callback, groupId, groupName); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)getGroupMembership:(CHIPDeviceCallback)onCompletion groupCount:(uint8_t)groupCount groupList:(uint16_t)groupList +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.GetGroupMembership(callback, groupCount, groupList); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)removeAllGroups:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.RemoveAllGroups(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)removeGroup:(CHIPDeviceCallback)onCompletion groupId:(uint16_t)groupId +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.RemoveGroup(callback, groupId); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)viewGroup:(CHIPDeviceCallback)onCompletion groupId:(uint16_t)groupId +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ViewGroup(callback, groupId); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeNameSupport:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeNameSupport(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeClusterRevision:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeClusterRevision(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +@end + +@interface CHIPIasZone () + +@property (readonly) chip::Controller::IasZoneCluster cppCluster; +@property (readonly, nonatomic) dispatch_queue_t callbackQueue; +@end + +@implementation CHIPIasZone + +- (instancetype)initWithDevice:(CHIPDevice *)device endpoint:(chip::EndpointId)endpoint queue:(dispatch_queue_t)queue +{ + CHIP_ERROR err = _cppCluster.Associate([device internalDevice], endpoint); + + if (err != CHIP_NO_ERROR) { + return nil; + } + + if (self = [super init]) { + _callbackQueue = queue; + } + return self; +} + +- (BOOL)readAttributeZoneState:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeZoneState(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeZoneType:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeZoneType(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeZoneStatus:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeZoneStatus(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeIasCieAddress:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeIasCieAddress(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)writeAttributeIasCieAddress:(CHIPDeviceCallback)onCompletion value:(uint64_t)value +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.WriteAttributeIasCieAddress(callback, value); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeZoneId:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeZoneId(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeClusterRevision:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeClusterRevision(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +@end + +@interface CHIPIdentify () + +@property (readonly) chip::Controller::IdentifyCluster cppCluster; +@property (readonly, nonatomic) dispatch_queue_t callbackQueue; +@end + +@implementation CHIPIdentify + +- (instancetype)initWithDevice:(CHIPDevice *)device endpoint:(chip::EndpointId)endpoint queue:(dispatch_queue_t)queue +{ + CHIP_ERROR err = _cppCluster.Associate([device internalDevice], endpoint); + + if (err != CHIP_NO_ERROR) { + return nil; + } + + if (self = [super init]) { + _callbackQueue = queue; + } + return self; +} + +- (BOOL)identify:(CHIPDeviceCallback)onCompletion identifyTime:(uint16_t)identifyTime +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.Identify(callback, identifyTime); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)identifyQuery:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.IdentifyQuery(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeIdentifyTime:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeIdentifyTime(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)writeAttributeIdentifyTime:(CHIPDeviceCallback)onCompletion value:(uint16_t)value +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.WriteAttributeIdentifyTime(callback, value); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeClusterRevision:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeClusterRevision(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +@end + +@interface CHIPLevelControl () + +@property (readonly) chip::Controller::LevelControlCluster cppCluster; +@property (readonly, nonatomic) dispatch_queue_t callbackQueue; +@end + +@implementation CHIPLevelControl + +- (instancetype)initWithDevice:(CHIPDevice *)device endpoint:(chip::EndpointId)endpoint queue:(dispatch_queue_t)queue +{ + CHIP_ERROR err = _cppCluster.Associate([device internalDevice], endpoint); + + if (err != CHIP_NO_ERROR) { + return nil; + } + + if (self = [super init]) { + _callbackQueue = queue; + } + return self; +} + +- (BOOL)move:(CHIPDeviceCallback)onCompletion + moveMode:(uint8_t)moveMode + rate:(uint8_t)rate + optionMask:(uint8_t)optionMask + optionOverride:(uint8_t)optionOverride +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.Move(callback, moveMode, rate, optionMask, optionOverride); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)moveToLevel:(CHIPDeviceCallback)onCompletion + level:(uint8_t)level + transitionTime:(uint16_t)transitionTime + optionMask:(uint8_t)optionMask + optionOverride:(uint8_t)optionOverride +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.MoveToLevel(callback, level, transitionTime, optionMask, optionOverride); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)moveToLevelWithOnOff:(CHIPDeviceCallback)onCompletion level:(uint8_t)level transitionTime:(uint16_t)transitionTime +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.MoveToLevelWithOnOff(callback, level, transitionTime); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)moveWithOnOff:(CHIPDeviceCallback)onCompletion moveMode:(uint8_t)moveMode rate:(uint8_t)rate +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.MoveWithOnOff(callback, moveMode, rate); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)step:(CHIPDeviceCallback)onCompletion + stepMode:(uint8_t)stepMode + stepSize:(uint8_t)stepSize + transitionTime:(uint16_t)transitionTime + optionMask:(uint8_t)optionMask + optionOverride:(uint8_t)optionOverride +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.Step(callback, stepMode, stepSize, transitionTime, optionMask, optionOverride); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)stepWithOnOff:(CHIPDeviceCallback)onCompletion + stepMode:(uint8_t)stepMode + stepSize:(uint8_t)stepSize + transitionTime:(uint16_t)transitionTime +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.StepWithOnOff(callback, stepMode, stepSize, transitionTime); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)stop:(CHIPDeviceCallback)onCompletion optionMask:(uint8_t)optionMask optionOverride:(uint8_t)optionOverride +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.Stop(callback, optionMask, optionOverride); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)stopWithOnOff:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.StopWithOnOff(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeCurrentLevel:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeCurrentLevel(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)reportAttributeCurrentLevel:(CHIPDeviceCallback)onCompletion + onChange:(CHIPDeviceCallback)onChange + minInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + change:(uint8_t)change +{ + CHIPCallbackBridge * completionCallback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!completionCallback) { + return NO; + } + + CHIPCallbackBridge * changeCallback = new CHIPCallbackBridge(onChange, _callbackQueue); + if (!changeCallback) { + return NO; + } + + CHIP_ERROR err + = self.cppCluster.ReportAttributeCurrentLevel(completionCallback, changeCallback, minInterval, maxInterval, change); + if (err != CHIP_NO_ERROR) { + completionCallback->Cancel(); + changeCallback->Cancel(); + delete completionCallback; + delete changeCallback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeClusterRevision:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeClusterRevision(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +@end + +@interface CHIPNetworkProvisioning () + +@property (readonly) chip::Controller::NetworkProvisioningCluster cppCluster; +@property (readonly, nonatomic) dispatch_queue_t callbackQueue; +@end + +@implementation CHIPNetworkProvisioning + +- (instancetype)initWithDevice:(CHIPDevice *)device endpoint:(chip::EndpointId)endpoint queue:(dispatch_queue_t)queue +{ + CHIP_ERROR err = _cppCluster.Associate([device internalDevice], endpoint); + + if (err != CHIP_NO_ERROR) { + return nil; + } + + if (self = [super init]) { + _callbackQueue = queue; + } + return self; +} + +- (BOOL)addThreadNetwork:(CHIPDeviceCallback)onCompletion + operationalDataset:(uint8_t *)operationalDataset + operationalDatasetLen:(uint32_t)operationalDatasetLen + breadcrumb:(uint64_t)breadcrumb + timeoutMs:(uint32_t)timeoutMs +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.AddThreadNetwork(callback, operationalDataset, operationalDatasetLen, breadcrumb, timeoutMs); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)addWiFiNetwork:(CHIPDeviceCallback)onCompletion + ssid:(uint8_t *)ssid + ssidLen:(uint32_t)ssidLen + credentials:(uint8_t *)credentials + credentialsLen:(uint32_t)credentialsLen + breadcrumb:(uint64_t)breadcrumb + timeoutMs:(uint32_t)timeoutMs +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.AddWiFiNetwork(callback, ssid, ssidLen, credentials, credentialsLen, breadcrumb, timeoutMs); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)disableNetwork:(CHIPDeviceCallback)onCompletion + networkID:(uint8_t *)networkID + networkIDLen:(uint32_t)networkIDLen + breadcrumb:(uint64_t)breadcrumb + timeoutMs:(uint32_t)timeoutMs +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.DisableNetwork(callback, networkID, networkIDLen, breadcrumb, timeoutMs); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)enableNetwork:(CHIPDeviceCallback)onCompletion + networkID:(uint8_t *)networkID + networkIDLen:(uint32_t)networkIDLen + breadcrumb:(uint64_t)breadcrumb + timeoutMs:(uint32_t)timeoutMs +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.EnableNetwork(callback, networkID, networkIDLen, breadcrumb, timeoutMs); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)getLastNetworkProvisioningResult:(CHIPDeviceCallback)onCompletion timeoutMs:(uint32_t)timeoutMs +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.GetLastNetworkProvisioningResult(callback, timeoutMs); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)removeNetwork:(CHIPDeviceCallback)onCompletion + networkID:(uint8_t *)networkID + networkIDLen:(uint32_t)networkIDLen + breadcrumb:(uint64_t)breadcrumb + timeoutMs:(uint32_t)timeoutMs +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.RemoveNetwork(callback, networkID, networkIDLen, breadcrumb, timeoutMs); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)scanNetworks:(CHIPDeviceCallback)onCompletion + ssid:(uint8_t *)ssid + ssidLen:(uint32_t)ssidLen + breadcrumb:(uint64_t)breadcrumb + timeoutMs:(uint32_t)timeoutMs +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ScanNetworks(callback, ssid, ssidLen, breadcrumb, timeoutMs); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)updateThreadNetwork:(CHIPDeviceCallback)onCompletion + operationalDataset:(uint8_t *)operationalDataset + operationalDatasetLen:(uint32_t)operationalDatasetLen + breadcrumb:(uint64_t)breadcrumb + timeoutMs:(uint32_t)timeoutMs +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err + = self.cppCluster.UpdateThreadNetwork(callback, operationalDataset, operationalDatasetLen, breadcrumb, timeoutMs); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)updateWiFiNetwork:(CHIPDeviceCallback)onCompletion + ssid:(uint8_t *)ssid + ssidLen:(uint32_t)ssidLen + credentials:(uint8_t *)credentials + credentialsLen:(uint32_t)credentialsLen + breadcrumb:(uint64_t)breadcrumb + timeoutMs:(uint32_t)timeoutMs +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.UpdateWiFiNetwork(callback, ssid, ssidLen, credentials, credentialsLen, breadcrumb, timeoutMs); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeClusterRevision:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeClusterRevision(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +@end + +@interface CHIPOnOff () + +@property (readonly) chip::Controller::OnOffCluster cppCluster; +@property (readonly, nonatomic) dispatch_queue_t callbackQueue; +@end + +@implementation CHIPOnOff + +- (instancetype)initWithDevice:(CHIPDevice *)device endpoint:(chip::EndpointId)endpoint queue:(dispatch_queue_t)queue +{ + CHIP_ERROR err = _cppCluster.Associate([device internalDevice], endpoint); + + if (err != CHIP_NO_ERROR) { + return nil; + } + + if (self = [super init]) { + _callbackQueue = queue; + } + return self; +} + +- (BOOL)off:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.Off(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)on:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.On(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)toggle:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.Toggle(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeOnOff:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeOnOff(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)reportAttributeOnOff:(CHIPDeviceCallback)onCompletion + onChange:(CHIPDeviceCallback)onChange + minInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval +{ + CHIPCallbackBridge * completionCallback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!completionCallback) { + return NO; + } + + CHIPCallbackBridge * changeCallback = new CHIPCallbackBridge(onChange, _callbackQueue); + if (!changeCallback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReportAttributeOnOff(completionCallback, changeCallback, minInterval, maxInterval); + if (err != CHIP_NO_ERROR) { + completionCallback->Cancel(); + changeCallback->Cancel(); + delete completionCallback; + delete changeCallback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeClusterRevision:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeClusterRevision(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +@end + +@interface CHIPScenes () + +@property (readonly) chip::Controller::ScenesCluster cppCluster; +@property (readonly, nonatomic) dispatch_queue_t callbackQueue; +@end + +@implementation CHIPScenes + +- (instancetype)initWithDevice:(CHIPDevice *)device endpoint:(chip::EndpointId)endpoint queue:(dispatch_queue_t)queue +{ + CHIP_ERROR err = _cppCluster.Associate([device internalDevice], endpoint); + + if (err != CHIP_NO_ERROR) { + return nil; + } + + if (self = [super init]) { + _callbackQueue = queue; + } + return self; +} + +- (BOOL)addScene:(CHIPDeviceCallback)onCompletion + groupId:(uint16_t)groupId + sceneId:(uint8_t)sceneId + transitionTime:(uint16_t)transitionTime + sceneName:(char *)sceneName + clusterId:(chip::ClusterId)clusterId + length:(uint8_t)length + value:(uint8_t)value +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.AddScene(callback, groupId, sceneId, transitionTime, sceneName, clusterId, length, value); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)getSceneMembership:(CHIPDeviceCallback)onCompletion groupId:(uint16_t)groupId +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.GetSceneMembership(callback, groupId); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)recallScene:(CHIPDeviceCallback)onCompletion + groupId:(uint16_t)groupId + sceneId:(uint8_t)sceneId + transitionTime:(uint16_t)transitionTime +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.RecallScene(callback, groupId, sceneId, transitionTime); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)removeAllScenes:(CHIPDeviceCallback)onCompletion groupId:(uint16_t)groupId +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.RemoveAllScenes(callback, groupId); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)removeScene:(CHIPDeviceCallback)onCompletion groupId:(uint16_t)groupId sceneId:(uint8_t)sceneId +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.RemoveScene(callback, groupId, sceneId); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)storeScene:(CHIPDeviceCallback)onCompletion groupId:(uint16_t)groupId sceneId:(uint8_t)sceneId +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.StoreScene(callback, groupId, sceneId); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} +- (BOOL)viewScene:(CHIPDeviceCallback)onCompletion groupId:(uint16_t)groupId sceneId:(uint8_t)sceneId +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ViewScene(callback, groupId, sceneId); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeSceneCount:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeSceneCount(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeCurrentScene:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeCurrentScene(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeCurrentGroup:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeCurrentGroup(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeSceneValid:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeSceneValid(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeNameSupport:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeNameSupport(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeClusterRevision:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeClusterRevision(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +@end + +@interface CHIPTemperatureMeasurement () + +@property (readonly) chip::Controller::TemperatureMeasurementCluster cppCluster; +@property (readonly, nonatomic) dispatch_queue_t callbackQueue; +@end + +@implementation CHIPTemperatureMeasurement + +- (instancetype)initWithDevice:(CHIPDevice *)device endpoint:(chip::EndpointId)endpoint queue:(dispatch_queue_t)queue +{ + CHIP_ERROR err = _cppCluster.Associate([device internalDevice], endpoint); + + if (err != CHIP_NO_ERROR) { + return nil; + } + + if (self = [super init]) { + _callbackQueue = queue; + } + return self; +} + +- (BOOL)readAttributeMeasuredValue:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeMeasuredValue(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)reportAttributeMeasuredValue:(CHIPDeviceCallback)onCompletion + onChange:(CHIPDeviceCallback)onChange + minInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + change:(int16_t)change +{ + CHIPCallbackBridge * completionCallback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!completionCallback) { + return NO; + } + + CHIPCallbackBridge * changeCallback = new CHIPCallbackBridge(onChange, _callbackQueue); + if (!changeCallback) { + return NO; + } + + CHIP_ERROR err + = self.cppCluster.ReportAttributeMeasuredValue(completionCallback, changeCallback, minInterval, maxInterval, change); + if (err != CHIP_NO_ERROR) { + completionCallback->Cancel(); + changeCallback->Cancel(); + delete completionCallback; + delete changeCallback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeMinMeasuredValue:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeMinMeasuredValue(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeMaxMeasuredValue:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeMaxMeasuredValue(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +- (BOOL)readAttributeClusterRevision:(CHIPDeviceCallback)onCompletion +{ + CHIPCallbackBridge * callback = new CHIPCallbackBridge(onCompletion, _callbackQueue); + if (!callback) { + return NO; + } + + CHIP_ERROR err = self.cppCluster.ReadAttributeClusterRevision(callback); + if (err != CHIP_NO_ERROR) { + callback->Cancel(); + delete callback; + return NO; + } + return YES; +} + +@end diff --git a/src/darwin/Framework/CHIP/chip-tool.zap b/src/darwin/Framework/CHIP/chip-tool.zap index 26f10fb0105134..0bba747ba84333 100644 --- a/src/darwin/Framework/CHIP/chip-tool.zap +++ b/src/darwin/Framework/CHIP/chip-tool.zap @@ -1,5 +1,5 @@ { - "writeTime": "Mon Feb 15 2021 16:35:24 GMT+0100 (Central European Standard Time)", + "writeTime": "Sat Feb 20 2021 16:22:34 GMT+0800 (China Standard Time)", "featureLevel": 11, "creator": "zap", "keyValuePairs": [ @@ -22,12 +22,6 @@ "path": "../../../../app/zap-templates/zcl/zcl.json", "version": "ZCL Test Data", "type": "zcl-properties" - }, - { - "pathRelativity": "relativeToZap", - "path": "../../../../app/zap-templates/app-templates.json", - "version": "chip-v1", - "type": "gen-templates-json" } ], "endpointTypes": [ @@ -87,7 +81,6 @@ "define": "BASIC_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "cluster revision", @@ -134,7 +127,8 @@ "maxInterval": 65344, "reportableChange": 0 } - ] + ], + "commands": [] }, { "name": "Identify", @@ -143,6 +137,23 @@ "define": "IDENTIFY_CLUSTER", "side": "client", "enabled": 1, + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], "commands": [ { "name": "Identify", @@ -160,23 +171,6 @@ "incoming": 1, "outgoing": 1 } - ], - "attributes": [ - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -2891,24 +2885,6 @@ "define": "IAS_ZONE_CLUSTER", "side": "server", "enabled": 0, - "commands": [ - { - "name": "ZoneStatusChangeNotification", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "ZoneEnrollRequest", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - } - ], "attributes": [ { "name": "cluster revision", @@ -3000,6 +2976,214 @@ "maxInterval": 65344, "reportableChange": 0 } + ], + "commands": [ + { + "name": "ZoneStatusChangeNotification", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ZoneEnrollRequest", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ] + }, + { + "name": "Network Commissioning", + "code": 43690, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "commands": [ + { + "name": "ScanNetworks", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddWiFiNetwork", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UpdateWiFiNetwork", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddThreadNetwork", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UpdateThreadNetwork", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveNetwork", + "code": 10, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "EnableNetwork", + "code": 12, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "DisableNetwork", + "code": 14, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetLastNetworkCommissioningResult", + "code": 16, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ] + }, + { + "name": "Network Commissioning", + "code": 43690, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "ScanNetworksResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddWiFiNetworkResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UpdateWiFiNetworkResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddThreadNetworkResponse", + "code": 7, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UpdateThreadNetworkResponse", + "code": 9, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveNetworkResponse", + "code": 11, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "EnableNetworkResponse", + "code": 13, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "DisableNetworkResponse", + "code": 15, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } ] }, { @@ -3052,7 +3236,6 @@ "define": "BINDING_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "cluster revision", @@ -3069,7 +3252,8 @@ "maxInterval": 65344, "reportableChange": 0 } - ] + ], + "commands": [] } ] } diff --git a/src/darwin/Framework/CHIP/gen/af-structs.h b/src/darwin/Framework/CHIP/gen/af-structs.h index c5cd195f38d882..f62d10bb3b39a6 100644 --- a/src/darwin/Framework/CHIP/gen/af-structs.h +++ b/src/darwin/Framework/CHIP/gen/af-structs.h @@ -364,6 +364,12 @@ typedef struct _SpecialDay uint8_t dayIdRef; } EmberAfSpecialDay; +// Struct for ThreadInterfaceScanResult +typedef struct _ThreadInterfaceScanResult +{ + uint8_t * DiscoveryResponse; +} EmberAfThreadInterfaceScanResult; + // Struct for TierLabelsPayload typedef struct _TierLabelsPayload { @@ -390,6 +396,16 @@ typedef struct _TransferredPhase uint16_t maxActivationDelay; } EmberAfTransferredPhase; +// Struct for WiFiInterfaceScanResult +typedef struct _WiFiInterfaceScanResult +{ + uint8_t Security; + uint8_t * SSID; + uint8_t * BSSID; + uint8_t Channel; + uint32_t FrequencyBand; +} EmberAfWiFiInterfaceScanResult; + // Struct for WriteAttributeRecord typedef struct _WriteAttributeRecord { diff --git a/src/darwin/Framework/CHIP/gen/attribute-id.h b/src/darwin/Framework/CHIP/gen/attribute-id.h index 53d77d58e4943e..41b22f4ec79886 100644 --- a/src/darwin/Framework/CHIP/gen/attribute-id.h +++ b/src/darwin/Framework/CHIP/gen/attribute-id.h @@ -4058,6 +4058,12 @@ // Server attributes +// Attribute ids for cluster: Network Commissioning + +// Client attributes + +// Server attributes + // Attribute ids for cluster: Binding // Client attributes diff --git a/src/darwin/Framework/CHIP/gen/client-command-macro.h b/src/darwin/Framework/CHIP/gen/client-command-macro.h index 03759c6fe2424c..8f735d04e66b9e 100644 --- a/src/darwin/Framework/CHIP/gen/client-command-macro.h +++ b/src/darwin/Framework/CHIP/gen/client-command-macro.h @@ -5658,6 +5658,225 @@ ZCL_GET_ENDPOINT_LIST_REQUEST_COMMAND_ID, "uuuub", startIndex, total, startIndex, count, \ endpointInformationRecordList, endpointInformationRecordListLen); +/** @brief Command description for ScanNetworks + * + * Command: ScanNetworks + * @param ssid OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterScanNetworks(ssid, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_SCAN_NETWORKS_COMMAND_ID, "uuu", ssid, breadcrumb, timeoutMs); + +/** @brief Command description for ScanNetworksResponse + * + * Command: ScanNetworksResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + * @param wifiScanResults WiFiInterfaceScanResult [] + * @param wifiScanResultsLen int + * @param threadScanResults ThreadInterfaceScanResult [] + * @param threadScanResultsLen int + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterScanNetworksResponse(errorCode, debugText, wifiScanResults, wifiScanResultsLen, threadScanResults, \ + threadScanResultsLen) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_SCAN_NETWORKS_RESPONSE_COMMAND_ID, "uubb", errorCode, debugText, wifiScanResults, \ + wifiScanResultsLen, threadScanResults, threadScanResultsLen); + +/** @brief Command description for AddWiFiNetwork + * + * Command: AddWiFiNetwork + * @param ssid OCTET_STRING + * @param credentials OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterAddWiFiNetwork(ssid, credentials, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ADD_WI_FI_NETWORK_COMMAND_ID, "uuuu", ssid, credentials, breadcrumb, timeoutMs); + +/** @brief Command description for AddWiFiNetworkResponse + * + * Command: AddWiFiNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterAddWiFiNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ADD_WI_FI_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for UpdateWiFiNetwork + * + * Command: UpdateWiFiNetwork + * @param ssid OCTET_STRING + * @param credentials OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterUpdateWiFiNetwork(ssid, credentials, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_UPDATE_WI_FI_NETWORK_COMMAND_ID, "uuuu", ssid, credentials, breadcrumb, timeoutMs); + +/** @brief Command description for UpdateWiFiNetworkResponse + * + * Command: UpdateWiFiNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterUpdateWiFiNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_UPDATE_WI_FI_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for AddThreadNetwork + * + * Command: AddThreadNetwork + * @param operationalDataset OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterAddThreadNetwork(operationalDataset, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ADD_THREAD_NETWORK_COMMAND_ID, "uuu", operationalDataset, breadcrumb, timeoutMs); + +/** @brief Command description for AddThreadNetworkResponse + * + * Command: AddThreadNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterAddThreadNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ADD_THREAD_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for UpdateThreadNetwork + * + * Command: UpdateThreadNetwork + * @param operationalDataset OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterUpdateThreadNetwork(operationalDataset, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_UPDATE_THREAD_NETWORK_COMMAND_ID, "uuu", operationalDataset, breadcrumb, timeoutMs); + +/** @brief Command description for UpdateThreadNetworkResponse + * + * Command: UpdateThreadNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterUpdateThreadNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_UPDATE_THREAD_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for RemoveNetwork + * + * Command: RemoveNetwork + * @param NetworkID OCTET_STRING + * @param Breadcrumb INT64U + * @param TimeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterRemoveNetwork(NetworkID, Breadcrumb, TimeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_REMOVE_NETWORK_COMMAND_ID, "uuu", NetworkID, Breadcrumb, TimeoutMs); + +/** @brief Command description for RemoveNetworkResponse + * + * Command: RemoveNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterRemoveNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_REMOVE_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for EnableNetwork + * + * Command: EnableNetwork + * @param networkID OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterEnableNetwork(networkID, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ENABLE_NETWORK_COMMAND_ID, "uuu", networkID, breadcrumb, timeoutMs); + +/** @brief Command description for EnableNetworkResponse + * + * Command: EnableNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterEnableNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_ENABLE_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for DisableNetwork + * + * Command: DisableNetwork + * @param networkID OCTET_STRING + * @param breadcrumb INT64U + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterDisableNetwork(networkID, breadcrumb, timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_DISABLE_NETWORK_COMMAND_ID, "uuu", networkID, breadcrumb, timeoutMs); + +/** @brief Command description for DisableNetworkResponse + * + * Command: DisableNetworkResponse + * @param errorCode INT8U + * @param debugText CHAR_STRING + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterDisableNetworkResponse(errorCode, debugText) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_DISABLE_NETWORK_RESPONSE_COMMAND_ID, "uu", errorCode, debugText); + +/** @brief Command description for GetLastNetworkCommissioningResult + * + * Command: GetLastNetworkCommissioningResult + * @param timeoutMs INT32U + */ +#define emberAfFillCommandNetwork \ + CommissioningClusterGetLastNetworkCommissioningResult(timeoutMs) \ + emberAfFillExternalBuffer(mask, \ + \ + ZCL_GET_LAST_NETWORK_COMMISSIONING_RESULT_COMMAND_ID, "u", timeoutMs); + /** @brief Command description for Bind * * Command: Bind diff --git a/src/darwin/Framework/CHIP/gen/cluster-id.h b/src/darwin/Framework/CHIP/gen/cluster-id.h index 8ceb0901c053f6..852a0659d203e0 100644 --- a/src/darwin/Framework/CHIP/gen/cluster-id.h +++ b/src/darwin/Framework/CHIP/gen/cluster-id.h @@ -332,6 +332,9 @@ // Definitions for cluster: ZLL Commissioning #define ZCL_ZLL_COMMISSIONING_CLUSTER_ID (0x1000) +// Definitions for cluster: Network Commissioning +#define ZCL_NETWORK_COMMISSIONING_CLUSTER_ID (0xAAAA) + // Definitions for cluster: Binding #define ZCL_BINDING_CLUSTER_ID (0xF000) diff --git a/src/darwin/Framework/CHIP/gen/command-id.h b/src/darwin/Framework/CHIP/gen/command-id.h index 572446cf490a4a..db416f663435a6 100644 --- a/src/darwin/Framework/CHIP/gen/command-id.h +++ b/src/darwin/Framework/CHIP/gen/command-id.h @@ -685,6 +685,25 @@ #define ZCL_GET_ENDPOINT_LIST_REQUEST_COMMAND_ID (0x42) #define ZCL_GET_ENDPOINT_LIST_RESPONSE_COMMAND_ID (0x42) +// Commands for cluster: Network Commissioning +#define ZCL_SCAN_NETWORKS_COMMAND_ID (0x00) +#define ZCL_SCAN_NETWORKS_RESPONSE_COMMAND_ID (0x01) +#define ZCL_ADD_WI_FI_NETWORK_COMMAND_ID (0x02) +#define ZCL_ADD_WI_FI_NETWORK_RESPONSE_COMMAND_ID (0x03) +#define ZCL_UPDATE_WI_FI_NETWORK_COMMAND_ID (0x04) +#define ZCL_UPDATE_WI_FI_NETWORK_RESPONSE_COMMAND_ID (0x05) +#define ZCL_ADD_THREAD_NETWORK_COMMAND_ID (0x06) +#define ZCL_ADD_THREAD_NETWORK_RESPONSE_COMMAND_ID (0x07) +#define ZCL_UPDATE_THREAD_NETWORK_COMMAND_ID (0x08) +#define ZCL_UPDATE_THREAD_NETWORK_RESPONSE_COMMAND_ID (0x09) +#define ZCL_REMOVE_NETWORK_COMMAND_ID (0x0A) +#define ZCL_REMOVE_NETWORK_RESPONSE_COMMAND_ID (0x0B) +#define ZCL_ENABLE_NETWORK_COMMAND_ID (0x0C) +#define ZCL_ENABLE_NETWORK_RESPONSE_COMMAND_ID (0x0D) +#define ZCL_DISABLE_NETWORK_COMMAND_ID (0x0E) +#define ZCL_DISABLE_NETWORK_RESPONSE_COMMAND_ID (0x0F) +#define ZCL_GET_LAST_NETWORK_COMMISSIONING_RESULT_COMMAND_ID (0x10) + // Commands for cluster: Binding #define ZCL_BIND_COMMAND_ID (0x00) #define ZCL_UNBIND_COMMAND_ID (0x01) diff --git a/src/darwin/Framework/CHIP/gen/enums.h b/src/darwin/Framework/CHIP/gen/enums.h index 7cf4c5c578e788..1f0a326946cc80 100644 --- a/src/darwin/Framework/CHIP/gen/enums.h +++ b/src/darwin/Framework/CHIP/gen/enums.h @@ -1873,6 +1873,31 @@ typedef enum EMBER_ZCL_MOVE_MODE_DOWN = 1, } EmberAfMoveMode; +// Enum for NetworkCommissioningError +typedef enum +{ + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_SUCCESS = 0, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_OUT_OF_RANGE = 1, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_BOUNDS_EXCEEDED = 2, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_NETWORK_ID_NOT_FOUND = 3, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_DUPLICATE_NETWORK_ID = 4, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_NETWORK_NOT_FOUND = 5, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_REGULATORY_ERROR = 6, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_AUTH_FAILURE = 7, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_UNSUPPORTED_SECURITY = 8, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_OTHER_CONNECTION_FAILURE = 9, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_IPV6_FAILED = 10, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_IP_BIND_FAILED = 11, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL9 = 12, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL10 = 13, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL11 = 14, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL12 = 15, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL13 = 16, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL14 = 17, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_LABEL15 = 18, + EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_UNKNOWN_ERROR = 19, +} EmberAfNetworkCommissioningError; + // Enum for NotificationScheme typedef enum { @@ -3887,6 +3912,16 @@ typedef enum #define EMBER_AF_RESTART_OPTIONS_IMMEDIATE_OFFSET (3) #define EMBER_AF_SCENES_COPY_MODE_COPY_ALL_SCENES (1) #define EMBER_AF_SCENES_COPY_MODE_COPY_ALL_SCENES_OFFSET (0) +#define EMBER_AF_SECURITY_TYPE_UNENCRYPTED (1) +#define EMBER_AF_SECURITY_TYPE_UNENCRYPTED_OFFSET (0) +#define EMBER_AF_SECURITY_TYPE_WEP_PERSONAL (2) +#define EMBER_AF_SECURITY_TYPE_WEP_PERSONAL_OFFSET (1) +#define EMBER_AF_SECURITY_TYPE_WPA_PERSONAL (4) +#define EMBER_AF_SECURITY_TYPE_WPA_PERSONAL_OFFSET (2) +#define EMBER_AF_SECURITY_TYPE_WPA2_PERSONAL (8) +#define EMBER_AF_SECURITY_TYPE_WPA2_PERSONAL_OFFSET (3) +#define EMBER_AF_SECURITY_TYPE_WPA3_PERSONAL (16) +#define EMBER_AF_SECURITY_TYPE_WPA3_PERSONAL_OFFSET (4) #define EMBER_AF_SHADE_CLOSURE_STATUS_OPERATIONAL (1) #define EMBER_AF_SHADE_CLOSURE_STATUS_OPERATIONAL_OFFSET (0) #define EMBER_AF_SHADE_CLOSURE_STATUS_ADJUSTING (2) diff --git a/src/darwin/Framework/CHIP/gen/print-cluster.h b/src/darwin/Framework/CHIP/gen/print-cluster.h index 5a37b559c5d0c5..b91198407ac3a8 100644 --- a/src/darwin/Framework/CHIP/gen/print-cluster.h +++ b/src/darwin/Framework/CHIP/gen/print-cluster.h @@ -716,6 +716,12 @@ #define CHIP_PRINTCLUSTER_ZLL_COMMISSIONING_CLUSTER #endif +#if defined(ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_SERVER) || defined(ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER { ZCL_NETWORK_COMMISSIONING_CLUSTER_ID, 43690, "Network Commissioning" }, +#else +#define CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER +#endif + #if defined(ZCL_USING_BINDING_CLUSTER_SERVER) || defined(ZCL_USING_BINDING_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_BINDING_CLUSTER { ZCL_BINDING_CLUSTER_ID, 61440, "Binding" }, #else @@ -864,6 +870,7 @@ CHIP_PRINTCLUSTER_ELECTRICAL_MEASUREMENT_CLUSTER \ CHIP_PRINTCLUSTER_DIAGNOSTICS_CLUSTER \ CHIP_PRINTCLUSTER_ZLL_COMMISSIONING_CLUSTER \ + CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER \ CHIP_PRINTCLUSTER_BINDING_CLUSTER \ CHIP_PRINTCLUSTER_MEDIA_PLAYBACK_CLUSTER \ CHIP_PRINTCLUSTER_SAMPLE_MFG_SPECIFIC_CLUSTER \