From 279761735cd964201f063cc24d52d34adfb4bec7 Mon Sep 17 00:00:00 2001 From: jrhees-cae <61466710+jrhees-cae@users.noreply.github.com> Date: Tue, 25 May 2021 13:00:40 -0600 Subject: [PATCH] Add Bridged Device Basic information and Fixed Label clusters for bridge support (#7042) * Add Bridged Device Basic information cluster Add Fixed Label cluster * Add zap-auto-generated files * Add generated tv files to make CI check happy --- .../all-clusters-common/all-clusters-app.zap | 362 +++++++ .../gen/attribute-size.cpp | 46 + .../gen/call-command-handler.cpp | 10 + .../all-clusters-common/gen/callback-stub.cpp | 16 + .../all-clusters-common/gen/callback.h | 157 +++ .../all-clusters-common/gen/endpoint_config.h | 437 ++++++-- .../all-clusters-common/gen/gen_config.h | 12 + .../chip-tool/commands/clusters/Commands.h | 980 ++++++++++++++++-- src/app/common/gen/af-structs.h | 7 + src/app/common/gen/attribute-id.h | 27 + src/app/common/gen/client-command-macro.h | 36 + src/app/common/gen/cluster-id.h | 6 + src/app/common/gen/command-id.h | 6 + src/app/common/gen/print-cluster.h | 14 + .../zcl/bridged-device-basic.xml | 58 ++ src/app/zap-templates/zcl/custom-types.xml | 4 + .../zap-templates/zcl/fixed-label-cluster.xml | 28 + src/app/zap-templates/zcl/zcl.json | 2 + src/app/zap_cluster_list.py | 4 + .../data_model/controller-clusters.zap | 362 +++++++ .../data_model/gen/CHIPClientCallbacks.cpp | 23 + .../data_model/gen/CHIPClientCallbacks.h | 1 + .../data_model/gen/CHIPClusters.cpp | 163 +++ src/controller/data_model/gen/CHIPClusters.h | 43 + .../data_model/gen/call-command-handler.cpp | 10 + .../data_model/gen/callback-stub.cpp | 16 + src/controller/data_model/gen/callback.h | 157 +++ .../data_model/gen/chip-zcl-zpro-codec-api.h | 175 ++++ src/controller/data_model/gen/encoder.cpp | 244 +++++ .../data_model/gen/endpoint_config.h | 81 +- src/controller/data_model/gen/gen_config.h | 10 + .../python/chip/clusters/CHIPClusters.cpp | 153 +++ .../python/chip/clusters/CHIPClusters.py | 106 ++ .../Framework/CHIP/gen/CHIPClustersObjc.h | 36 + .../Framework/CHIP/gen/CHIPClustersObjc.mm | 750 ++++++++++++-- .../Framework/CHIPTests/CHIPClustersTests.m | 341 ++++++ 36 files changed, 4539 insertions(+), 344 deletions(-) create mode 100644 src/app/zap-templates/zcl/bridged-device-basic.xml create mode 100644 src/app/zap-templates/zcl/fixed-label-cluster.xml diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index 3cffc3016f2d82..fa52cbbcffe260 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -7230,6 +7230,301 @@ } ] }, + { + "name": "Bridged Device Basic", + "code": 57, + "mfgCode": null, + "define": "BRIDGED_DEVICE_BASIC_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Bridged Device Basic", + "code": 57, + "mfgCode": null, + "define": "BRIDGED_DEVICE_BASIC_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "StartUp", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ShutDown", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "Leave", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ReachableChanged", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "VendorName", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorID", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductName", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UserLabel", + "code": 5, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersion", + "code": 7, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersionString", + "code": 8, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersion", + "code": 9, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersionString", + "code": 10, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ManufacturingDate", + "code": 11, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartNumber", + "code": 12, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductURL", + "code": 13, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductLabel", + "code": 14, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SerialNumber", + "code": 15, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Reachable", + "code": 17, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, { "name": "Switch", "code": 59, @@ -7327,6 +7622,73 @@ } ] }, + { + "name": "Fixed Label", + "code": 64, + "mfgCode": null, + "define": "FIXED_LABEL_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": "0x0001", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Fixed Label", + "code": 64, + "mfgCode": null, + "define": "FIXED_LABEL_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "label list", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "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": "Door Lock", "code": 257, diff --git a/examples/all-clusters-app/all-clusters-common/gen/attribute-size.cpp b/examples/all-clusters-app/all-clusters-common/gen/attribute-size.cpp index 7bc14640143b9d..b52773c1f9097e 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/attribute-size.cpp +++ b/examples/all-clusters-app/all-clusters-common/gen/attribute-size.cpp @@ -234,6 +234,43 @@ uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, boo } break; } + case 0x0040: // Fixed Label Cluster + { + uint16_t entryOffset = kSizeLengthInBytes; + switch (am->attributeId) + { + case 0x0000: // label list + { + entryLength = 36; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %l is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + // Struct _LabelStruct + _LabelStruct * entry = reinterpret_cast<_LabelStruct *>(write ? src : dest); + chip::ByteSpan * labelSpan = &entry->label; // OCTET_STRING + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 18, labelSpan) : ReadByteSpan(src + entryOffset, 18, labelSpan))) + { + ChipLogError(Zcl, "Index %l is invalid. Not enough remaining space", index); + return 0; + } + entryOffset = static_cast(entryOffset + 18); + chip::ByteSpan * valueSpan = &entry->value; // OCTET_STRING + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 18, valueSpan) : ReadByteSpan(src + entryOffset, 18, valueSpan))) + { + ChipLogError(Zcl, "Index %l is invalid. Not enough remaining space", index); + return 0; + } + entryOffset = static_cast(entryOffset + 18); + break; + } + } + break; + } case 0x0033: // General Diagnostics Cluster { uint16_t entryOffset = kSizeLengthInBytes; @@ -776,6 +813,15 @@ uint16_t emberAfAttributeValueListSize(ClusterId clusterId, AttributeId attribut break; } break; + case 0x0040: // Fixed Label Cluster + switch (attributeId) + { + case 0x0000: // label list + // Struct _LabelStruct + entryLength = 36; + break; + } + break; case 0x0033: // General Diagnostics Cluster switch (attributeId) { diff --git a/examples/all-clusters-app/all-clusters-common/gen/call-command-handler.cpp b/examples/all-clusters-app/all-clusters-common/gen/call-command-handler.cpp index 4d85673a0d64d4..06fd16ee04c924 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/call-command-handler.cpp +++ b/examples/all-clusters-app/all-clusters-common/gen/call-command-handler.cpp @@ -35,11 +35,13 @@ EmberAfStatus emberAfAudioOutputClusterServerCommandParse(EmberAfClusterCommand EmberAfStatus emberAfBarrierControlClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfBasicClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfBindingClusterServerCommandParse(EmberAfClusterCommand * cmd); +EmberAfStatus emberAfBridgedDeviceBasicClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfColorControlClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfContentLaunchClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfDescriptorClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfDoorLockClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfEthernetNetworkDiagnosticsClusterServerCommandParse(EmberAfClusterCommand * cmd); +EmberAfStatus emberAfFixedLabelClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfGeneralCommissioningClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfGeneralDiagnosticsClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfGroupKeyManagementClusterServerCommandParse(EmberAfClusterCommand * cmd); @@ -136,6 +138,10 @@ EmberAfStatus emberAfClusterSpecificCommandParse(EmberAfClusterCommand * cmd) case ZCL_BINDING_CLUSTER_ID: result = emberAfBindingClusterServerCommandParse(cmd); break; + case ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID: + // No commands are enabled for cluster Bridged Device Basic + result = status(false, true, cmd->mfgSpecific); + break; case ZCL_COLOR_CONTROL_CLUSTER_ID: result = emberAfColorControlClusterServerCommandParse(cmd); break; @@ -154,6 +160,10 @@ EmberAfStatus emberAfClusterSpecificCommandParse(EmberAfClusterCommand * cmd) // No commands are enabled for cluster Ethernet Network Diagnostics result = status(false, true, cmd->mfgSpecific); break; + case ZCL_FIXED_LABEL_CLUSTER_ID: + // No commands are enabled for cluster Fixed Label + result = status(false, true, cmd->mfgSpecific); + break; case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: result = emberAfGeneralCommissioningClusterServerCommandParse(cmd); break; diff --git a/examples/all-clusters-app/all-clusters-common/gen/callback-stub.cpp b/examples/all-clusters-app/all-clusters-common/gen/callback-stub.cpp index cd24a0ccdde7b5..1b669d0870bb3c 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/callback-stub.cpp +++ b/examples/all-clusters-app/all-clusters-common/gen/callback-stub.cpp @@ -50,6 +50,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_BINDING_CLUSTER_ID: emberAfBindingClusterInitCallback(endpoint); break; + case ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID: + emberAfBridgedDeviceBasicClusterInitCallback(endpoint); + break; case ZCL_COLOR_CONTROL_CLUSTER_ID: emberAfColorControlClusterInitCallback(endpoint); break; @@ -65,6 +68,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_ID: emberAfEthernetNetworkDiagnosticsClusterInitCallback(endpoint); break; + case ZCL_FIXED_LABEL_CLUSTER_ID: + emberAfFixedLabelClusterInitCallback(endpoint); + break; case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: emberAfGeneralCommissioningClusterInitCallback(endpoint); break; @@ -199,6 +205,11 @@ void __attribute__((weak)) emberAfBindingClusterInitCallback(EndpointId endpoint // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfBridgedDeviceBasicClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfColorControlClusterInitCallback(EndpointId endpoint) { // To prevent warning @@ -224,6 +235,11 @@ void __attribute__((weak)) emberAfEthernetNetworkDiagnosticsClusterInitCallback( // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfFixedLabelClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfGeneralCommissioningClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/examples/all-clusters-app/all-clusters-common/gen/callback.h b/examples/all-clusters-app/all-clusters-common/gen/callback.h index ed1995bc9fad00..d80660c8745ff1 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/callback.h +++ b/examples/all-clusters-app/all-clusters-common/gen/callback.h @@ -96,6 +96,14 @@ void emberAfBasicClusterInitCallback(chip::EndpointId endpoint); */ void emberAfBindingClusterInitCallback(chip::EndpointId endpoint); +/** @brief Bridged Device Basic Cluster Init + * + * Cluster Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfBridgedDeviceBasicClusterInitCallback(chip::EndpointId endpoint); + /** @brief Color Control Cluster Init * * Cluster Init @@ -136,6 +144,14 @@ void emberAfDoorLockClusterInitCallback(chip::EndpointId endpoint); */ void emberAfEthernetNetworkDiagnosticsClusterInitCallback(chip::EndpointId endpoint); +/** @brief Fixed Label Cluster Init + * + * Cluster Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfFixedLabelClusterInitCallback(chip::EndpointId endpoint); + /** @brief General Commissioning Cluster Init * * Cluster Init @@ -877,6 +893,77 @@ EmberAfStatus emberAfBindingClusterServerPreAttributeChangedCallback(chip::Endpo */ void emberAfBindingClusterServerTickCallback(chip::EndpointId endpoint); +// +// Bridged Device Basic Cluster server +// + +/** @brief Bridged Device Basic Cluster Server Init + * + * Server Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfBridgedDeviceBasicClusterServerInitCallback(chip::EndpointId endpoint); + +/** @brief Bridged Device Basic Cluster Server Attribute Changed + * + * Server Attribute Changed + * + * @param endpoint Endpoint that is being initialized + * @param attributeId Attribute that changed + */ +void emberAfBridgedDeviceBasicClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId); + +/** @brief Bridged Device Basic Cluster Server Manufacturer Specific Attribute Changed + * + * Server Manufacturer Specific Attribute Changed + * + * @param endpoint Endpoint that is being initialized + * @param attributeId Attribute that changed + * @param manufacturerCode Manufacturer Code of the attribute that changed + */ +void emberAfBridgedDeviceBasicClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, + chip::AttributeId attributeId, + uint16_t manufacturerCode); + +/** @brief Bridged Device Basic Cluster Server Message Sent + * + * Server Message Sent + * + * @param type The type of message sent + * @param destination The destination to which the message was sent + * @param apsFrame The APS frame for the message + * @param msgLen The length of the message + * @param message The message that was sent + * @param status The status of the sent message + */ +void emberAfBridgedDeviceBasicClusterServerMessageSentCallback(EmberOutgoingMessageType type, + chip::MessageSendDestination destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); + +/** @brief Bridged Device Basic Cluster Server Pre Attribute Changed + * + * server Pre Attribute Changed + * + * @param endpoint Endpoint that is being initialized + * @param attributeId Attribute to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +EmberAfStatus emberAfBridgedDeviceBasicClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint, + chip::AttributeId attributeId, + EmberAfAttributeType attributeType, uint16_t size, + uint8_t * value); + +/** @brief Bridged Device Basic Cluster Server Tick + * + * server Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfBridgedDeviceBasicClusterServerTickCallback(chip::EndpointId endpoint); + // // Color Control Cluster server // @@ -1230,6 +1317,76 @@ EmberAfStatus emberAfEthernetNetworkDiagnosticsClusterServerPreAttributeChangedC */ void emberAfEthernetNetworkDiagnosticsClusterServerTickCallback(chip::EndpointId endpoint); +// +// Fixed Label Cluster server +// + +/** @brief Fixed Label Cluster Server Init + * + * Server Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfFixedLabelClusterServerInitCallback(chip::EndpointId endpoint); + +/** @brief Fixed Label Cluster Server Attribute Changed + * + * Server Attribute Changed + * + * @param endpoint Endpoint that is being initialized + * @param attributeId Attribute that changed + */ +void emberAfFixedLabelClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId); + +/** @brief Fixed Label Cluster Server Manufacturer Specific Attribute Changed + * + * Server Manufacturer Specific Attribute Changed + * + * @param endpoint Endpoint that is being initialized + * @param attributeId Attribute that changed + * @param manufacturerCode Manufacturer Code of the attribute that changed + */ +void emberAfFixedLabelClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, + chip::AttributeId attributeId, + uint16_t manufacturerCode); + +/** @brief Fixed Label Cluster Server Message Sent + * + * Server Message Sent + * + * @param type The type of message sent + * @param destination The destination to which the message was sent + * @param apsFrame The APS frame for the message + * @param msgLen The length of the message + * @param message The message that was sent + * @param status The status of the sent message + */ +void emberAfFixedLabelClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); + +/** @brief Fixed Label Cluster Server Pre Attribute Changed + * + * server Pre Attribute Changed + * + * @param endpoint Endpoint that is being initialized + * @param attributeId Attribute to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +EmberAfStatus emberAfFixedLabelClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId, + EmberAfAttributeType attributeType, uint16_t size, + uint8_t * value); + +/** @brief Fixed Label Cluster Server Tick + * + * server Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfFixedLabelClusterServerTickCallback(chip::EndpointId endpoint); + // // General Commissioning Cluster server // diff --git a/examples/all-clusters-app/all-clusters-common/gen/endpoint_config.h b/examples/all-clusters-app/all-clusters-common/gen/endpoint_config.h index 9ca9404da060f5..a45d6f2cf1c6cf 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/endpoint_config.h +++ b/examples/all-clusters-app/all-clusters-common/gen/endpoint_config.h @@ -493,11 +493,103 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Bridged Device Basic (server), big-endian */ \ + \ + /* 4683 - VendorName, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 4715 - ProductName, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 4747 - UserLabel, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 4779 - HardwareVersionString, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 4843 - SoftwareVersion, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* 4847 - SoftwareVersionString, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 4911 - ManufacturingDate, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 4927 - PartNumber, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 5181 - ProductURL, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 5435 - ProductLabel, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 5499 - SerialNumber, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Fixed Label (server), big-endian */ \ + \ + /* 5531 - label list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Color Control (server), big-endian */ \ \ - /* 4683 - compensation text, */ \ + /* 5785 - compensation text, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -515,18 +607,18 @@ \ /* Endpoint: 1, Cluster: IAS Zone (server), big-endian */ \ \ - /* 4937 - IAS CIE address, */ \ + /* 6039 - IAS CIE address, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Wake on LAN (server), big-endian */ \ \ - /* 4945 - wake on lan mac address, */ \ + /* 6047 - wake on lan mac address, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: TV Channel (server), big-endian */ \ \ - /* 4977 - tv channel list, */ \ + /* 6079 - tv channel list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -542,17 +634,17 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 5231 - tv channel lineup, */ \ + /* 6333 - tv channel lineup, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 5263 - current tv channel, */ \ + /* 6365 - current tv channel, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Target Navigator (server), big-endian */ \ \ - /* 5295 - target navigator list, */ \ + /* 6397 - target navigator list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -570,7 +662,7 @@ \ /* Endpoint: 1, Cluster: Media Input (server), big-endian */ \ \ - /* 5549 - media input list, */ \ + /* 6651 - media input list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -588,7 +680,7 @@ \ /* Endpoint: 1, Cluster: Content Launch (server), big-endian */ \ \ - /* 5803 - accepts header list, */ \ + /* 6905 - accepts header list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -604,7 +696,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 6057 - supported streaming types, */ \ + /* 7159 - supported streaming types, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -622,7 +714,7 @@ \ /* Endpoint: 1, Cluster: Audio Output (server), big-endian */ \ \ - /* 6311 - audio output list, */ \ + /* 7413 - audio output list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -640,7 +732,7 @@ \ /* Endpoint: 1, Cluster: Application Launcher (server), big-endian */ \ \ - /* 6565 - application launcher list, */ \ + /* 7667 - application launcher list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -658,45 +750,45 @@ \ /* Endpoint: 1, Cluster: Application Basic (server), big-endian */ \ \ - /* 6819 - vendor name, */ \ + /* 7921 - vendor name, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 6851 - application name, */ \ + /* 7953 - application name, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 6883 - application id, */ \ + /* 7985 - application id, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Test Cluster (server), big-endian */ \ \ - /* 6915 - bitmap32, */ \ + /* 8017 - bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 6919 - bitmap64, */ \ + /* 8021 - bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 6927 - int32u, */ \ + /* 8029 - int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 6931 - int64u, */ \ + /* 8033 - int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 6939 - int32s, */ \ + /* 8041 - int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 6943 - int64s, */ \ + /* 8045 - int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 6951 - octet_string, */ \ + /* 8053 - octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 6961 - list_int8u, */ \ + /* 8063 - list_int8u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 6971 - list_octet_string, */ \ + /* 8073 - list_octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -712,7 +804,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 7225 - list_struct_octet_string, */ \ + /* 8327 - list_struct_octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1199,11 +1291,103 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Bridged Device Basic (server), little-endian */ \ + \ + /* 4683 - VendorName, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 4715 - ProductName, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 4747 - UserLabel, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 4779 - HardwareVersionString, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 4843 - SoftwareVersion, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* 4847 - SoftwareVersionString, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 4911 - ManufacturingDate, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 4927 - PartNumber, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 5181 - ProductURL, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 5435 - ProductLabel, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 5499 - SerialNumber, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Fixed Label (server), little-endian */ \ + \ + /* 5531 - label list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Color Control (server), little-endian */ \ \ - /* 4683 - compensation text, */ \ + /* 5785 - compensation text, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1221,18 +1405,18 @@ \ /* Endpoint: 1, Cluster: IAS Zone (server), little-endian */ \ \ - /* 4937 - IAS CIE address, */ \ + /* 6039 - IAS CIE address, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Wake on LAN (server), little-endian */ \ \ - /* 4945 - wake on lan mac address, */ \ + /* 6047 - wake on lan mac address, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: TV Channel (server), little-endian */ \ \ - /* 4977 - tv channel list, */ \ + /* 6079 - tv channel list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1248,17 +1432,17 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 5231 - tv channel lineup, */ \ + /* 6333 - tv channel lineup, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 5263 - current tv channel, */ \ + /* 6365 - current tv channel, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Target Navigator (server), little-endian */ \ \ - /* 5295 - target navigator list, */ \ + /* 6397 - target navigator list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1276,7 +1460,7 @@ \ /* Endpoint: 1, Cluster: Media Input (server), little-endian */ \ \ - /* 5549 - media input list, */ \ + /* 6651 - media input list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1294,7 +1478,7 @@ \ /* Endpoint: 1, Cluster: Content Launch (server), little-endian */ \ \ - /* 5803 - accepts header list, */ \ + /* 6905 - accepts header list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1310,7 +1494,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 6057 - supported streaming types, */ \ + /* 7159 - supported streaming types, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1328,7 +1512,7 @@ \ /* Endpoint: 1, Cluster: Audio Output (server), little-endian */ \ \ - /* 6311 - audio output list, */ \ + /* 7413 - audio output list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1346,7 +1530,7 @@ \ /* Endpoint: 1, Cluster: Application Launcher (server), little-endian */ \ \ - /* 6565 - application launcher list, */ \ + /* 7667 - application launcher list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1364,45 +1548,45 @@ \ /* Endpoint: 1, Cluster: Application Basic (server), little-endian */ \ \ - /* 6819 - vendor name, */ \ + /* 7921 - vendor name, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 6851 - application name, */ \ + /* 7953 - application name, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 6883 - application id, */ \ + /* 7985 - application id, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Test Cluster (server), little-endian */ \ \ - /* 6915 - bitmap32, */ \ + /* 8017 - bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 6919 - bitmap64, */ \ + /* 8021 - bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 6927 - int32u, */ \ + /* 8029 - int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 6931 - int64u, */ \ + /* 8033 - int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 6939 - int32s, */ \ + /* 8041 - int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 6943 - int64s, */ \ + /* 8045 - int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 6951 - octet_string, */ \ + /* 8053 - octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 6961 - list_int8u, */ \ + /* 8063 - list_int8u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 6971 - list_octet_string, */ \ + /* 8073 - list_octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1418,7 +1602,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 7225 - list_struct_octet_string, */ \ + /* 8327 - list_struct_octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1437,7 +1621,7 @@ #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (100) +#define GENERATED_DEFAULTS_COUNT (112) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -1465,7 +1649,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 286 +#define GENERATED_ATTRIBUTE_COUNT 303 #define GENERATED_ATTRIBUTES \ { \ \ @@ -1652,11 +1836,38 @@ /* Endpoint: 1, Cluster: OTA Software Update Client (server) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ + /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ + { 0x0001, ZAP_TYPE(CHAR_STRING), 32, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(4683) }, /* VendorName */ \ + { 0x0002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ + { 0x0003, ZAP_TYPE(CHAR_STRING), 32, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(4715) }, /* ProductName */ \ + { 0x0005, ZAP_TYPE(CHAR_STRING), 32, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_LONG_DEFAULTS_INDEX(4747) }, /* UserLabel */ \ + { 0x0007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0x00) }, /* HardwareVersion */ \ + { 0x0008, ZAP_TYPE(CHAR_STRING), 64, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_LONG_DEFAULTS_INDEX(4779) }, /* HardwareVersionString */ \ + { 0x0009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(4843) }, /* SoftwareVersion */ \ + { 0x000A, ZAP_TYPE(CHAR_STRING), 64, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_LONG_DEFAULTS_INDEX(4847) }, /* SoftwareVersionString */ \ + { 0x000B, ZAP_TYPE(CHAR_STRING), 16, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_LONG_DEFAULTS_INDEX(4911) }, /* ManufacturingDate */ \ + { 0x000C, ZAP_TYPE(CHAR_STRING), 254, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(4927) }, /* PartNumber */ \ + { 0x000D, ZAP_TYPE(CHAR_STRING), 254, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(5181) }, /* ProductURL */ \ + { 0x000E, ZAP_TYPE(CHAR_STRING), 64, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_LONG_DEFAULTS_INDEX(5435) }, /* ProductLabel */ \ + { 0x000F, ZAP_TYPE(CHAR_STRING), 32, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_LONG_DEFAULTS_INDEX(5499) }, /* SerialNumber */ \ + { 0x0011, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0x00) }, /* Reachable */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* cluster revision */ \ + \ /* Endpoint: 1, Cluster: Switch (server) */ \ { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* number of positions */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* current position */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ + /* Endpoint: 1, Cluster: Fixed Label (server) */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(5531) }, /* label list */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ + \ /* Endpoint: 1, Cluster: Door Lock (server) */ \ { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* lock state */ \ { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* lock type */ \ @@ -1710,7 +1921,7 @@ { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x616B) }, /* current x */ \ { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x607D) }, /* current y */ \ { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* drift compensation */ \ - { 0x0006, ZAP_TYPE(CHAR_STRING), 254, 0, ZAP_LONG_DEFAULTS_INDEX(4683) }, /* compensation text */ \ + { 0x0006, ZAP_TYPE(CHAR_STRING), 254, 0, ZAP_LONG_DEFAULTS_INDEX(5785) }, /* compensation text */ \ { 0x0007, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x00FA) }, /* color temperature */ \ { 0x0008, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* color mode */ \ { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* color control options */ \ @@ -1768,29 +1979,29 @@ { 0x0001, ZAP_TYPE(ENUM16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* zone type */ \ { 0x0002, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* zone status */ \ { 0x0010, ZAP_TYPE(IEEE_ADDRESS), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4937) }, /* IAS CIE address */ \ + ZAP_LONG_DEFAULTS_INDEX(6039) }, /* IAS CIE address */ \ { 0x0011, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xff) }, /* Zone ID */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* cluster revision */ \ \ /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ - { 0x0000, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(4945) }, /* wake on lan mac address */ \ + { 0x0000, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(6047) }, /* wake on lan mac address */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 1, Cluster: TV Channel (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(4977) }, /* tv channel list */ \ - { 0x0001, ZAP_TYPE(OCTET_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(5231) }, /* tv channel lineup */ \ - { 0x0002, ZAP_TYPE(OCTET_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(5263) }, /* current tv channel */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(6079) }, /* tv channel list */ \ + { 0x0001, ZAP_TYPE(OCTET_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(6333) }, /* tv channel lineup */ \ + { 0x0002, ZAP_TYPE(OCTET_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(6365) }, /* current tv channel */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 1, Cluster: Target Navigator (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(5295) }, /* target navigator list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(6397) }, /* target navigator list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 1, Cluster: Media Playback (server) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 1, Cluster: Media Input (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(5549) }, /* media input list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(6651) }, /* media input list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 1, Cluster: Low Power (server) */ \ @@ -1800,24 +2011,24 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 1, Cluster: Content Launch (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(5803) }, /* accepts header list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(6057) }, /* supported streaming types */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(6905) }, /* accepts header list */ \ + { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(7159) }, /* supported streaming types */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 1, Cluster: Audio Output (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(6311) }, /* audio output list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(7413) }, /* audio output list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 1, Cluster: Application Launcher (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(6565) }, /* application launcher list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(7667) }, /* application launcher list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 1, Cluster: Application Basic (server) */ \ - { 0x0000, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(6819) }, /* vendor name */ \ + { 0x0000, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(7921) }, /* vendor name */ \ { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* vendor id */ \ - { 0x0002, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(6851) }, /* application name */ \ + { 0x0002, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(7953) }, /* application name */ \ { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* product id */ \ - { 0x0005, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(6883) }, /* application id */ \ + { 0x0005, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(7985) }, /* application id */ \ { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* catalog vendor id */ \ { 0x0007, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* application satus */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ @@ -1829,23 +2040,23 @@ { 0x0000, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(false) }, /* boolean */ \ { 0x0001, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap8 */ \ { 0x0002, ZAP_TYPE(BITMAP16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap16 */ \ - { 0x0003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(6915) }, /* bitmap32 */ \ - { 0x0004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(6919) }, /* bitmap64 */ \ + { 0x0003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(8017) }, /* bitmap32 */ \ + { 0x0004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(8021) }, /* bitmap64 */ \ { 0x0005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8u */ \ { 0x0006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16u */ \ - { 0x0008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(6927) }, /* int32u */ \ - { 0x000C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(6931) }, /* int64u */ \ + { 0x0008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(8029) }, /* int32u */ \ + { 0x000C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(8033) }, /* int64u */ \ { 0x000D, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8s */ \ { 0x000E, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16s */ \ - { 0x0010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(6939) }, /* int32s */ \ - { 0x0014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(6943) }, /* int64s */ \ + { 0x0010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(8041) }, /* int32s */ \ + { 0x0014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(8045) }, /* int64s */ \ { 0x0015, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum8 */ \ { 0x0016, ZAP_TYPE(ENUM16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum16 */ \ { 0x0019, ZAP_TYPE(OCTET_STRING), 10, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(6951) }, /* octet_string */ \ - { 0x001A, ZAP_TYPE(ARRAY), 10, 0, ZAP_LONG_DEFAULTS_INDEX(6961) }, /* list_int8u */ \ - { 0x001B, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(6971) }, /* list_octet_string */ \ - { 0x001C, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(7225) }, /* list_struct_octet_string */ \ + ZAP_LONG_DEFAULTS_INDEX(8053) }, /* octet_string */ \ + { 0x001A, ZAP_TYPE(ARRAY), 10, 0, ZAP_LONG_DEFAULTS_INDEX(8063) }, /* list_int8u */ \ + { 0x001B, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(8073) }, /* list_octet_string */ \ + { 0x001C, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(8327) }, /* list_struct_octet_string */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 1, Cluster: Binding (server) */ \ @@ -1902,7 +2113,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 46 +#define GENERATED_CLUSTER_COUNT 48 #define GENERATED_CLUSTERS \ { \ { \ @@ -1987,92 +2198,98 @@ 0x002A, ZAP_ATTRIBUTE_INDEX(132), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: OTA Software Update Client (server) */ \ { \ - 0x003B, ZAP_ATTRIBUTE_INDEX(133), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0039, ZAP_ATTRIBUTE_INDEX(133), 15, 855, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ + { \ + 0x003B, ZAP_ATTRIBUTE_INDEX(148), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Switch (server) */ \ + { \ + 0x0040, ZAP_ATTRIBUTE_INDEX(151), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 1, Cluster: Fixed Label (server) */ \ { 0x0101, \ - ZAP_ATTRIBUTE_INDEX(136), \ + ZAP_ATTRIBUTE_INDEX(153), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayDoorLockServer }, /* Endpoint: 1, Cluster: Door Lock (server) */ \ { \ - 0x0102, ZAP_ATTRIBUTE_INDEX(140), 10, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0102, ZAP_ATTRIBUTE_INDEX(157), 10, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Window Covering (server) */ \ { \ - 0x0103, ZAP_ATTRIBUTE_INDEX(150), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0103, ZAP_ATTRIBUTE_INDEX(167), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Barrier Control (server) */ \ { \ - 0x0200, ZAP_ATTRIBUTE_INDEX(155), 8, 13, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0200, ZAP_ATTRIBUTE_INDEX(172), 8, 13, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ { \ - 0x0201, ZAP_ATTRIBUTE_INDEX(163), 6, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0201, ZAP_ATTRIBUTE_INDEX(180), 6, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Thermostat (server) */ \ { 0x0300, \ - ZAP_ATTRIBUTE_INDEX(169), \ + ZAP_ATTRIBUTE_INDEX(186), \ 51, \ 336, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayColorControlServer }, /* Endpoint: 1, Cluster: Color Control (server) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(220), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0402, ZAP_ATTRIBUTE_INDEX(237), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ { 0x0500, \ - ZAP_ATTRIBUTE_INDEX(224), \ + ZAP_ATTRIBUTE_INDEX(241), \ 6, \ 16, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION) | \ ZAP_CLUSTER_MASK(MESSAGE_SENT_FUNCTION), \ chipFuncArrayIasZoneServer }, /* Endpoint: 1, Cluster: IAS Zone (server) */ \ { \ - 0x0503, ZAP_ATTRIBUTE_INDEX(230), 2, 34, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0503, ZAP_ATTRIBUTE_INDEX(247), 2, 34, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { \ - 0x0504, ZAP_ATTRIBUTE_INDEX(232), 4, 320, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0504, ZAP_ATTRIBUTE_INDEX(249), 4, 320, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: TV Channel (server) */ \ { \ - 0x0505, ZAP_ATTRIBUTE_INDEX(236), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0505, ZAP_ATTRIBUTE_INDEX(253), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (server) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(238), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0506, ZAP_ATTRIBUTE_INDEX(255), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Playback (server) */ \ { \ - 0x0507, ZAP_ATTRIBUTE_INDEX(239), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0507, ZAP_ATTRIBUTE_INDEX(256), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Input (server) */ \ { \ - 0x0508, ZAP_ATTRIBUTE_INDEX(241), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0508, ZAP_ATTRIBUTE_INDEX(258), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Low Power (server) */ \ { \ - 0x0509, ZAP_ATTRIBUTE_INDEX(242), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0509, ZAP_ATTRIBUTE_INDEX(259), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(243), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(260), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Content Launch (server) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(246), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050B, ZAP_ATTRIBUTE_INDEX(263), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Audio Output (server) */ \ { \ - 0x050C, ZAP_ATTRIBUTE_INDEX(248), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050C, ZAP_ATTRIBUTE_INDEX(265), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(250), 8, 105, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(267), 8, 105, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Basic (server) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(258), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050E, ZAP_ATTRIBUTE_INDEX(275), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Account Login (server) */ \ { \ - 0x050F, ZAP_ATTRIBUTE_INDEX(259), 20, 579, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050F, ZAP_ATTRIBUTE_INDEX(276), 20, 579, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Test Cluster (server) */ \ { \ - 0xF000, ZAP_ATTRIBUTE_INDEX(279), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0xF000, ZAP_ATTRIBUTE_INDEX(296), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binding (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(280), \ + ZAP_ATTRIBUTE_INDEX(297), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/off (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(282), \ + ZAP_ATTRIBUTE_INDEX(299), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -2084,17 +2301,17 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 13, 3736 }, { ZAP_CLUSTER_INDEX(13), 31, 4041 }, { ZAP_CLUSTER_INDEX(44), 2, 8 }, \ + { ZAP_CLUSTER_INDEX(0), 13, 3736 }, { ZAP_CLUSTER_INDEX(13), 33, 5152 }, { ZAP_CLUSTER_INDEX(46), 2, 8 }, \ } // Largest attribute size is needed for various buffers #define ATTRIBUTE_LARGEST (255) // Total size of singleton attributes -#define ATTRIBUTE_SINGLETONS_SIZE (875) +#define ATTRIBUTE_SINGLETONS_SIZE (1730) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (7785) +#define ATTRIBUTE_MAX_SIZE (8896) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (3) @@ -2138,7 +2355,7 @@ // Array of EmberAfCommandMetadata structs. #define ZAP_COMMAND_MASK(mask) COMMAND_MASK_##mask -#define EMBER_AF_GENERATED_COMMAND_COUNT (193) +#define EMBER_AF_GENERATED_COMMAND_COUNT (197) #define GENERATED_COMMANDS \ { \ \ @@ -2258,6 +2475,12 @@ /* Endpoint: 1, Cluster: OTA Software Update Client (server) */ \ { 0x002A, 0x00, ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* AnnounceOtaServer */ \ \ + /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ + { 0x0039, 0x00, ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* StartUp */ \ + { 0x0039, 0x01, ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* ShutDown */ \ + { 0x0039, 0x02, ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* Leave */ \ + { 0x0039, 0x03, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* ReachableChanged */ \ + \ /* Endpoint: 1, Cluster: Door Lock (server) */ \ { 0x0101, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* LockDoor */ \ { 0x0101, 0x00, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* LockDoorResponse */ \ diff --git a/examples/all-clusters-app/all-clusters-common/gen/gen_config.h b/examples/all-clusters-app/all-clusters-common/gen/gen_config.h index 4cc501896cd8b7..bc61d015d9bff1 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/gen_config.h +++ b/examples/all-clusters-app/all-clusters-common/gen/gen_config.h @@ -36,11 +36,13 @@ #define EMBER_AF_BARRIER_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_BASIC_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_BINDING_CLUSTER_SERVER_ENDPOINT_COUNT (2) +#define EMBER_AF_BRIDGED_DEVICE_BASIC_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_COLOR_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_CONTENT_LAUNCH_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_DESCRIPTOR_CLUSTER_SERVER_ENDPOINT_COUNT (2) #define EMBER_AF_DOOR_LOCK_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_FIXED_LABEL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_GENERAL_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_GENERAL_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_GROUP_KEY_MANAGEMENT_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -110,6 +112,11 @@ #define EMBER_AF_PLUGIN_BINDING_SERVER #define EMBER_AF_PLUGIN_BINDING +// Use this macro to check if the server side of the Bridged Device Basic cluster is included +#define ZCL_USING_BRIDGED_DEVICE_BASIC_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_BRIDGED_DEVICE_BASIC_SERVER +#define EMBER_AF_PLUGIN_BRIDGED_DEVICE_BASIC + // Use this macro to check if the server side of the Color Control cluster is included #define ZCL_USING_COLOR_CONTROL_CLUSTER_SERVER #define EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER @@ -139,6 +146,11 @@ #define EMBER_AF_PLUGIN_ETHERNET_NETWORK_DIAGNOSTICS_SERVER #define EMBER_AF_PLUGIN_ETHERNET_NETWORK_DIAGNOSTICS +// Use this macro to check if the server side of the Fixed Label cluster is included +#define ZCL_USING_FIXED_LABEL_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_FIXED_LABEL_SERVER +#define EMBER_AF_PLUGIN_FIXED_LABEL + // Use this macro to check if the server side of the General Commissioning cluster is included #define ZCL_USING_GENERAL_COMMISSIONING_CLUSTER_SERVER #define EMBER_AF_PLUGIN_GENERAL_COMMISSIONING_SERVER diff --git a/examples/chip-tool/commands/clusters/Commands.h b/examples/chip-tool/commands/clusters/Commands.h index c4985971367d22..cbb53ce6cb5419 100644 --- a/examples/chip-tool/commands/clusters/Commands.h +++ b/examples/chip-tool/commands/clusters/Commands.h @@ -783,6 +783,21 @@ static void OnDescriptorPartsListListAttributeResponse(void * context, uint16_t command->SetCommandExitStatus(true); } +static void OnFixedLabelLabelListListAttributeResponse(void * context, uint16_t count, _LabelStruct * entries) +{ + ChipLogProgress(chipTool, "OnFixedLabelLabelListListAttributeResponse: %lu entries", count); + + for (uint16_t i = 0; i < count; i++) + { + ChipLogProgress(chipTool, "LabelStruct[%lu]:", i); + ChipLogProgress(Zcl, " label: %zu", entries[i].label.size()); + ChipLogProgress(Zcl, " value: %zu", entries[i].value.size()); + } + + ModelCommand * command = reinterpret_cast(context); + command->SetCommandExitStatus(true); +} + static void OnGeneralDiagnosticsNetworkInterfacesListAttributeResponse(void * context, uint16_t count, _NetworkInterfaceType * entries) { @@ -955,11 +970,13 @@ static void OnTestClusterListStructOctetStringListAttributeResponse(void * conte | BarrierControl | 0x0103 | | Basic | 0x0028 | | Binding | 0xF000 | +| BridgedDeviceBasic | 0x0039 | | ColorControl | 0x0300 | | ContentLaunch | 0x050A | | Descriptor | 0x001D | | DoorLock | 0x0101 | | EthernetNetworkDiagnostics | 0x0037 | +| FixedLabel | 0x0040 | | GeneralCommissioning | 0x0030 | | GeneralDiagnostics | 0x0033 | | GroupKeyManagement | 0xF004 | @@ -994,11 +1011,13 @@ constexpr chip::ClusterId kAudioOutputClusterId = 0x050B; constexpr chip::ClusterId kBarrierControlClusterId = 0x0103; constexpr chip::ClusterId kBasicClusterId = 0x0028; constexpr chip::ClusterId kBindingClusterId = 0xF000; +constexpr chip::ClusterId kBridgedDeviceBasicClusterId = 0x0039; constexpr chip::ClusterId kColorControlClusterId = 0x0300; constexpr chip::ClusterId kContentLaunchClusterId = 0x050A; constexpr chip::ClusterId kDescriptorClusterId = 0x001D; constexpr chip::ClusterId kDoorLockClusterId = 0x0101; constexpr chip::ClusterId kEthernetNetworkDiagnosticsClusterId = 0x0037; +constexpr chip::ClusterId kFixedLabelClusterId = 0x0040; constexpr chip::ClusterId kGeneralCommissioningClusterId = 0x0030; constexpr chip::ClusterId kGeneralDiagnosticsClusterId = 0x0033; constexpr chip::ClusterId kGroupKeyManagementClusterId = 0xF004; @@ -2711,7 +2730,622 @@ class ReadBasicProductURL : public ModelCommand ModelCommand::AddArguments(); } - ~ReadBasicProductURL() + ~ReadBasicProductURL() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0028) command (0x00) on endpoint %" PRIu16, endpointId); + + chip::Controller::BasicCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeProductURL(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnStringAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +/* + * Attribute ProductLabel + */ +class ReadBasicProductLabel : public ModelCommand +{ +public: + ReadBasicProductLabel() : ModelCommand("read") + { + AddArgument("attr-name", "product-label"); + ModelCommand::AddArguments(); + } + + ~ReadBasicProductLabel() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0028) command (0x00) on endpoint %" PRIu16, endpointId); + + chip::Controller::BasicCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeProductLabel(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnStringAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +/* + * Attribute SerialNumber + */ +class ReadBasicSerialNumber : public ModelCommand +{ +public: + ReadBasicSerialNumber() : ModelCommand("read") + { + AddArgument("attr-name", "serial-number"); + ModelCommand::AddArguments(); + } + + ~ReadBasicSerialNumber() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0028) command (0x00) on endpoint %" PRIu16, endpointId); + + chip::Controller::BasicCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeSerialNumber(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnStringAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +/* + * Attribute LocalConfigDisabled + */ +class ReadBasicLocalConfigDisabled : public ModelCommand +{ +public: + ReadBasicLocalConfigDisabled() : ModelCommand("read") + { + AddArgument("attr-name", "local-config-disabled"); + ModelCommand::AddArguments(); + } + + ~ReadBasicLocalConfigDisabled() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0028) command (0x00) on endpoint %" PRIu16, endpointId); + + chip::Controller::BasicCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeLocalConfigDisabled(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnBooleanAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +class WriteBasicLocalConfigDisabled : public ModelCommand +{ +public: + WriteBasicLocalConfigDisabled() : ModelCommand("write") + { + AddArgument("attr-name", "local-config-disabled"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + ModelCommand::AddArguments(); + } + + ~WriteBasicLocalConfigDisabled() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0028) command (0x01) on endpoint %" PRIu16, endpointId); + + chip::Controller::BasicCluster cluster; + cluster.Associate(device, endpointId); + return cluster.WriteAttributeLocalConfigDisabled(onSuccessCallback->Cancel(), onFailureCallback->Cancel(), mValue); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); + uint8_t mValue; +}; + +/* + * Attribute ClusterRevision + */ +class ReadBasicClusterRevision : public ModelCommand +{ +public: + ReadBasicClusterRevision() : ModelCommand("read") + { + AddArgument("attr-name", "cluster-revision"); + ModelCommand::AddArguments(); + } + + ~ReadBasicClusterRevision() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0028) command (0x00) on endpoint %" PRIu16, endpointId); + + chip::Controller::BasicCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeClusterRevision(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt16uAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +/*----------------------------------------------------------------------------*\ +| Cluster Binding | 0xF000 | +|------------------------------------------------------------------------------| +| Commands: | | +| * Bind | 0x00 | +| * Unbind | 0x01 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * ClusterRevision | 0xFFFD | +\*----------------------------------------------------------------------------*/ + +/* + * Command Bind + */ +class BindingBind : public ModelCommand +{ +public: + BindingBind() : ModelCommand("bind") + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("groupId", 0, UINT16_MAX, &mGroupId); + AddArgument("endpointId", 0, UINT8_MAX, &mEndpointId); + AddArgument("clusterId", 0, UINT16_MAX, &mClusterId); + ModelCommand::AddArguments(); + } + ~BindingBind() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0xF000) command (0x00) on endpoint %" PRIu16, endpointId); + + chip::Controller::BindingCluster cluster; + cluster.Associate(device, endpointId); + return cluster.Bind(onSuccessCallback->Cancel(), onFailureCallback->Cancel(), mNodeId, mGroupId, mEndpointId, mClusterId); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); + chip::NodeId mNodeId; + chip::GroupId mGroupId; + chip::EndpointId mEndpointId; + chip::ClusterId mClusterId; +}; + +/* + * Command Unbind + */ +class BindingUnbind : public ModelCommand +{ +public: + BindingUnbind() : ModelCommand("unbind") + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("groupId", 0, UINT16_MAX, &mGroupId); + AddArgument("endpointId", 0, UINT8_MAX, &mEndpointId); + AddArgument("clusterId", 0, UINT16_MAX, &mClusterId); + ModelCommand::AddArguments(); + } + ~BindingUnbind() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0xF000) command (0x01) on endpoint %" PRIu16, endpointId); + + chip::Controller::BindingCluster cluster; + cluster.Associate(device, endpointId); + return cluster.Unbind(onSuccessCallback->Cancel(), onFailureCallback->Cancel(), mNodeId, mGroupId, mEndpointId, mClusterId); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); + chip::NodeId mNodeId; + chip::GroupId mGroupId; + chip::EndpointId mEndpointId; + chip::ClusterId mClusterId; +}; + +/* + * Discover Attributes + */ +class DiscoverBindingAttributes : public ModelCommand +{ +public: + DiscoverBindingAttributes() : ModelCommand("discover") { ModelCommand::AddArguments(); } + + ~DiscoverBindingAttributes() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000) command (0x0C) on endpoint %" PRIu16, endpointId); + + chip::Controller::BindingCluster cluster; + cluster.Associate(device, endpointId); + return cluster.DiscoverAttributes(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +/* + * Attribute ClusterRevision + */ +class ReadBindingClusterRevision : public ModelCommand +{ +public: + ReadBindingClusterRevision() : ModelCommand("read") + { + AddArgument("attr-name", "cluster-revision"); + ModelCommand::AddArguments(); + } + + ~ReadBindingClusterRevision() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0xF000) command (0x00) on endpoint %" PRIu16, endpointId); + + chip::Controller::BindingCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeClusterRevision(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt16uAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +/*----------------------------------------------------------------------------*\ +| Cluster BridgedDeviceBasic | 0x0039 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * VendorName | 0x0001 | +| * VendorID | 0x0002 | +| * ProductName | 0x0003 | +| * UserLabel | 0x0005 | +| * HardwareVersion | 0x0007 | +| * HardwareVersionString | 0x0008 | +| * SoftwareVersion | 0x0009 | +| * SoftwareVersionString | 0x000A | +| * ManufacturingDate | 0x000B | +| * PartNumber | 0x000C | +| * ProductURL | 0x000D | +| * ProductLabel | 0x000E | +| * SerialNumber | 0x000F | +| * Reachable | 0x0011 | +| * ClusterRevision | 0xFFFD | +\*----------------------------------------------------------------------------*/ + +/* + * Discover Attributes + */ +class DiscoverBridgedDeviceBasicAttributes : public ModelCommand +{ +public: + DiscoverBridgedDeviceBasicAttributes() : ModelCommand("discover") { ModelCommand::AddArguments(); } + + ~DiscoverBridgedDeviceBasicAttributes() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000) command (0x0C) on endpoint %" PRIu16, endpointId); + + chip::Controller::BridgedDeviceBasicCluster cluster; + cluster.Associate(device, endpointId); + return cluster.DiscoverAttributes(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +/* + * Attribute VendorName + */ +class ReadBridgedDeviceBasicVendorName : public ModelCommand +{ +public: + ReadBridgedDeviceBasicVendorName() : ModelCommand("read") + { + AddArgument("attr-name", "vendor-name"); + ModelCommand::AddArguments(); + } + + ~ReadBridgedDeviceBasicVendorName() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x00) on endpoint %" PRIu16, endpointId); + + chip::Controller::BridgedDeviceBasicCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeVendorName(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnStringAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +/* + * Attribute VendorID + */ +class ReadBridgedDeviceBasicVendorID : public ModelCommand +{ +public: + ReadBridgedDeviceBasicVendorID() : ModelCommand("read") + { + AddArgument("attr-name", "vendor-id"); + ModelCommand::AddArguments(); + } + + ~ReadBridgedDeviceBasicVendorID() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x00) on endpoint %" PRIu16, endpointId); + + chip::Controller::BridgedDeviceBasicCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeVendorID(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt16uAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +/* + * Attribute ProductName + */ +class ReadBridgedDeviceBasicProductName : public ModelCommand +{ +public: + ReadBridgedDeviceBasicProductName() : ModelCommand("read") + { + AddArgument("attr-name", "product-name"); + ModelCommand::AddArguments(); + } + + ~ReadBridgedDeviceBasicProductName() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x00) on endpoint %" PRIu16, endpointId); + + chip::Controller::BridgedDeviceBasicCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeProductName(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnStringAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +/* + * Attribute UserLabel + */ +class ReadBridgedDeviceBasicUserLabel : public ModelCommand +{ +public: + ReadBridgedDeviceBasicUserLabel() : ModelCommand("read") + { + AddArgument("attr-name", "user-label"); + ModelCommand::AddArguments(); + } + + ~ReadBridgedDeviceBasicUserLabel() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x00) on endpoint %" PRIu16, endpointId); + + chip::Controller::BridgedDeviceBasicCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeUserLabel(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnStringAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +class WriteBridgedDeviceBasicUserLabel : public ModelCommand +{ +public: + WriteBridgedDeviceBasicUserLabel() : ModelCommand("write") + { + AddArgument("attr-name", "user-label"); + AddArgument("attr-value", &mValue); + ModelCommand::AddArguments(); + } + + ~WriteBridgedDeviceBasicUserLabel() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x01) on endpoint %" PRIu16, endpointId); + + chip::Controller::BridgedDeviceBasicCluster cluster; + cluster.Associate(device, endpointId); + return cluster.WriteAttributeUserLabel(onSuccessCallback->Cancel(), onFailureCallback->Cancel(), + chip::ByteSpan(chip::Uint8::from_char(mValue), strlen(mValue))); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); + char * mValue; +}; + +/* + * Attribute HardwareVersion + */ +class ReadBridgedDeviceBasicHardwareVersion : public ModelCommand +{ +public: + ReadBridgedDeviceBasicHardwareVersion() : ModelCommand("read") + { + AddArgument("attr-name", "hardware-version"); + ModelCommand::AddArguments(); + } + + ~ReadBridgedDeviceBasicHardwareVersion() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x00) on endpoint %" PRIu16, endpointId); + + chip::Controller::BridgedDeviceBasicCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeHardwareVersion(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt16uAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +/* + * Attribute HardwareVersionString + */ +class ReadBridgedDeviceBasicHardwareVersionString : public ModelCommand +{ +public: + ReadBridgedDeviceBasicHardwareVersionString() : ModelCommand("read") + { + AddArgument("attr-name", "hardware-version-string"); + ModelCommand::AddArguments(); + } + + ~ReadBridgedDeviceBasicHardwareVersionString() { delete onSuccessCallback; delete onFailureCallback; @@ -2719,11 +3353,11 @@ class ReadBasicProductURL : public ModelCommand CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0028) command (0x00) on endpoint %" PRIu16, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x00) on endpoint %" PRIu16, endpointId); - chip::Controller::BasicCluster cluster; + chip::Controller::BridgedDeviceBasicCluster cluster; cluster.Associate(device, endpointId); - return cluster.ReadAttributeProductURL(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + return cluster.ReadAttributeHardwareVersionString(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); } private: @@ -2734,18 +3368,18 @@ class ReadBasicProductURL : public ModelCommand }; /* - * Attribute ProductLabel + * Attribute SoftwareVersion */ -class ReadBasicProductLabel : public ModelCommand +class ReadBridgedDeviceBasicSoftwareVersion : public ModelCommand { public: - ReadBasicProductLabel() : ModelCommand("read") + ReadBridgedDeviceBasicSoftwareVersion() : ModelCommand("read") { - AddArgument("attr-name", "product-label"); + AddArgument("attr-name", "software-version"); ModelCommand::AddArguments(); } - ~ReadBasicProductLabel() + ~ReadBridgedDeviceBasicSoftwareVersion() { delete onSuccessCallback; delete onFailureCallback; @@ -2753,33 +3387,33 @@ class ReadBasicProductLabel : public ModelCommand CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0028) command (0x00) on endpoint %" PRIu16, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x00) on endpoint %" PRIu16, endpointId); - chip::Controller::BasicCluster cluster; + chip::Controller::BridgedDeviceBasicCluster cluster; cluster.Associate(device, endpointId); - return cluster.ReadAttributeProductLabel(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + return cluster.ReadAttributeSoftwareVersion(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); } private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnStringAttributeResponse, this); + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt32uAttributeResponse, this); chip::Callback::Callback * onFailureCallback = new chip::Callback::Callback(OnDefaultFailureResponse, this); }; /* - * Attribute SerialNumber + * Attribute SoftwareVersionString */ -class ReadBasicSerialNumber : public ModelCommand +class ReadBridgedDeviceBasicSoftwareVersionString : public ModelCommand { public: - ReadBasicSerialNumber() : ModelCommand("read") + ReadBridgedDeviceBasicSoftwareVersionString() : ModelCommand("read") { - AddArgument("attr-name", "serial-number"); + AddArgument("attr-name", "software-version-string"); ModelCommand::AddArguments(); } - ~ReadBasicSerialNumber() + ~ReadBridgedDeviceBasicSoftwareVersionString() { delete onSuccessCallback; delete onFailureCallback; @@ -2787,11 +3421,11 @@ class ReadBasicSerialNumber : public ModelCommand CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0028) command (0x00) on endpoint %" PRIu16, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x00) on endpoint %" PRIu16, endpointId); - chip::Controller::BasicCluster cluster; + chip::Controller::BridgedDeviceBasicCluster cluster; cluster.Associate(device, endpointId); - return cluster.ReadAttributeSerialNumber(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + return cluster.ReadAttributeSoftwareVersionString(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); } private: @@ -2802,18 +3436,18 @@ class ReadBasicSerialNumber : public ModelCommand }; /* - * Attribute LocalConfigDisabled + * Attribute ManufacturingDate */ -class ReadBasicLocalConfigDisabled : public ModelCommand +class ReadBridgedDeviceBasicManufacturingDate : public ModelCommand { public: - ReadBasicLocalConfigDisabled() : ModelCommand("read") + ReadBridgedDeviceBasicManufacturingDate() : ModelCommand("read") { - AddArgument("attr-name", "local-config-disabled"); + AddArgument("attr-name", "manufacturing-date"); ModelCommand::AddArguments(); } - ~ReadBasicLocalConfigDisabled() + ~ReadBridgedDeviceBasicManufacturingDate() { delete onSuccessCallback; delete onFailureCallback; @@ -2821,31 +3455,33 @@ class ReadBasicLocalConfigDisabled : public ModelCommand CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0028) command (0x00) on endpoint %" PRIu16, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x00) on endpoint %" PRIu16, endpointId); - chip::Controller::BasicCluster cluster; + chip::Controller::BridgedDeviceBasicCluster cluster; cluster.Associate(device, endpointId); - return cluster.ReadAttributeLocalConfigDisabled(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + return cluster.ReadAttributeManufacturingDate(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); } private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnBooleanAttributeResponse, this); + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnStringAttributeResponse, this); chip::Callback::Callback * onFailureCallback = new chip::Callback::Callback(OnDefaultFailureResponse, this); }; -class WriteBasicLocalConfigDisabled : public ModelCommand +/* + * Attribute PartNumber + */ +class ReadBridgedDeviceBasicPartNumber : public ModelCommand { public: - WriteBasicLocalConfigDisabled() : ModelCommand("write") + ReadBridgedDeviceBasicPartNumber() : ModelCommand("read") { - AddArgument("attr-name", "local-config-disabled"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); + AddArgument("attr-name", "part-number"); ModelCommand::AddArguments(); } - ~WriteBasicLocalConfigDisabled() + ~ReadBridgedDeviceBasicPartNumber() { delete onSuccessCallback; delete onFailureCallback; @@ -2853,34 +3489,33 @@ class WriteBasicLocalConfigDisabled : public ModelCommand CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0028) command (0x01) on endpoint %" PRIu16, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x00) on endpoint %" PRIu16, endpointId); - chip::Controller::BasicCluster cluster; + chip::Controller::BridgedDeviceBasicCluster cluster; cluster.Associate(device, endpointId); - return cluster.WriteAttributeLocalConfigDisabled(onSuccessCallback->Cancel(), onFailureCallback->Cancel(), mValue); + return cluster.ReadAttributePartNumber(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); } private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnStringAttributeResponse, this); chip::Callback::Callback * onFailureCallback = new chip::Callback::Callback(OnDefaultFailureResponse, this); - uint8_t mValue; }; /* - * Attribute ClusterRevision + * Attribute ProductURL */ -class ReadBasicClusterRevision : public ModelCommand +class ReadBridgedDeviceBasicProductURL : public ModelCommand { public: - ReadBasicClusterRevision() : ModelCommand("read") + ReadBridgedDeviceBasicProductURL() : ModelCommand("read") { - AddArgument("attr-name", "cluster-revision"); + AddArgument("attr-name", "product-url"); ModelCommand::AddArguments(); } - ~ReadBasicClusterRevision() + ~ReadBridgedDeviceBasicProductURL() { delete onSuccessCallback; delete onFailureCallback; @@ -2888,46 +3523,33 @@ class ReadBasicClusterRevision : public ModelCommand CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0028) command (0x00) on endpoint %" PRIu16, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x00) on endpoint %" PRIu16, endpointId); - chip::Controller::BasicCluster cluster; + chip::Controller::BridgedDeviceBasicCluster cluster; cluster.Associate(device, endpointId); - return cluster.ReadAttributeClusterRevision(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + return cluster.ReadAttributeProductURL(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); } private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnInt16uAttributeResponse, this); + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnStringAttributeResponse, this); chip::Callback::Callback * onFailureCallback = new chip::Callback::Callback(OnDefaultFailureResponse, this); }; -/*----------------------------------------------------------------------------*\ -| Cluster Binding | 0xF000 | -|------------------------------------------------------------------------------| -| Commands: | | -| * Bind | 0x00 | -| * Unbind | 0x01 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * ClusterRevision | 0xFFFD | -\*----------------------------------------------------------------------------*/ - /* - * Command Bind + * Attribute ProductLabel */ -class BindingBind : public ModelCommand +class ReadBridgedDeviceBasicProductLabel : public ModelCommand { public: - BindingBind() : ModelCommand("bind") + ReadBridgedDeviceBasicProductLabel() : ModelCommand("read") { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("groupId", 0, UINT16_MAX, &mGroupId); - AddArgument("endpointId", 0, UINT8_MAX, &mEndpointId); - AddArgument("clusterId", 0, UINT16_MAX, &mClusterId); + AddArgument("attr-name", "product-label"); ModelCommand::AddArguments(); } - ~BindingBind() + + ~ReadBridgedDeviceBasicProductLabel() { delete onSuccessCallback; delete onFailureCallback; @@ -2935,39 +3557,33 @@ class BindingBind : public ModelCommand CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xF000) command (0x00) on endpoint %" PRIu16, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x00) on endpoint %" PRIu16, endpointId); - chip::Controller::BindingCluster cluster; + chip::Controller::BridgedDeviceBasicCluster cluster; cluster.Associate(device, endpointId); - return cluster.Bind(onSuccessCallback->Cancel(), onFailureCallback->Cancel(), mNodeId, mGroupId, mEndpointId, mClusterId); + return cluster.ReadAttributeProductLabel(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); } private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnStringAttributeResponse, this); chip::Callback::Callback * onFailureCallback = new chip::Callback::Callback(OnDefaultFailureResponse, this); - chip::NodeId mNodeId; - chip::GroupId mGroupId; - chip::EndpointId mEndpointId; - chip::ClusterId mClusterId; }; /* - * Command Unbind + * Attribute SerialNumber */ -class BindingUnbind : public ModelCommand +class ReadBridgedDeviceBasicSerialNumber : public ModelCommand { public: - BindingUnbind() : ModelCommand("unbind") + ReadBridgedDeviceBasicSerialNumber() : ModelCommand("read") { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("groupId", 0, UINT16_MAX, &mGroupId); - AddArgument("endpointId", 0, UINT8_MAX, &mEndpointId); - AddArgument("clusterId", 0, UINT16_MAX, &mClusterId); + AddArgument("attr-name", "serial-number"); ModelCommand::AddArguments(); } - ~BindingUnbind() + + ~ReadBridgedDeviceBasicSerialNumber() { delete onSuccessCallback; delete onFailureCallback; @@ -2975,33 +3591,33 @@ class BindingUnbind : public ModelCommand CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xF000) command (0x01) on endpoint %" PRIu16, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x00) on endpoint %" PRIu16, endpointId); - chip::Controller::BindingCluster cluster; + chip::Controller::BridgedDeviceBasicCluster cluster; cluster.Associate(device, endpointId); - return cluster.Unbind(onSuccessCallback->Cancel(), onFailureCallback->Cancel(), mNodeId, mGroupId, mEndpointId, mClusterId); + return cluster.ReadAttributeSerialNumber(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); } private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnStringAttributeResponse, this); chip::Callback::Callback * onFailureCallback = new chip::Callback::Callback(OnDefaultFailureResponse, this); - chip::NodeId mNodeId; - chip::GroupId mGroupId; - chip::EndpointId mEndpointId; - chip::ClusterId mClusterId; }; /* - * Discover Attributes + * Attribute Reachable */ -class DiscoverBindingAttributes : public ModelCommand +class ReadBridgedDeviceBasicReachable : public ModelCommand { public: - DiscoverBindingAttributes() : ModelCommand("discover") { ModelCommand::AddArguments(); } + ReadBridgedDeviceBasicReachable() : ModelCommand("read") + { + AddArgument("attr-name", "reachable"); + ModelCommand::AddArguments(); + } - ~DiscoverBindingAttributes() + ~ReadBridgedDeviceBasicReachable() { delete onSuccessCallback; delete onFailureCallback; @@ -3009,16 +3625,16 @@ class DiscoverBindingAttributes : public ModelCommand CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000) command (0x0C) on endpoint %" PRIu16, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x00) on endpoint %" PRIu16, endpointId); - chip::Controller::BindingCluster cluster; + chip::Controller::BridgedDeviceBasicCluster cluster; cluster.Associate(device, endpointId); - return cluster.DiscoverAttributes(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + return cluster.ReadAttributeReachable(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); } private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnBooleanAttributeResponse, this); chip::Callback::Callback * onFailureCallback = new chip::Callback::Callback(OnDefaultFailureResponse, this); }; @@ -3026,16 +3642,16 @@ class DiscoverBindingAttributes : public ModelCommand /* * Attribute ClusterRevision */ -class ReadBindingClusterRevision : public ModelCommand +class ReadBridgedDeviceBasicClusterRevision : public ModelCommand { public: - ReadBindingClusterRevision() : ModelCommand("read") + ReadBridgedDeviceBasicClusterRevision() : ModelCommand("read") { AddArgument("attr-name", "cluster-revision"); ModelCommand::AddArguments(); } - ~ReadBindingClusterRevision() + ~ReadBridgedDeviceBasicClusterRevision() { delete onSuccessCallback; delete onFailureCallback; @@ -3043,9 +3659,9 @@ class ReadBindingClusterRevision : public ModelCommand CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xF000) command (0x00) on endpoint %" PRIu16, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x00) on endpoint %" PRIu16, endpointId); - chip::Controller::BindingCluster cluster; + chip::Controller::BridgedDeviceBasicCluster cluster; cluster.Associate(device, endpointId); return cluster.ReadAttributeClusterRevision(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); } @@ -7955,6 +8571,114 @@ class ReadEthernetNetworkDiagnosticsClusterRevision : public ModelCommand new chip::Callback::Callback(OnDefaultFailureResponse, this); }; +/*----------------------------------------------------------------------------*\ +| Cluster FixedLabel | 0x0040 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * LabelList | 0x0000 | +| * ClusterRevision | 0xFFFD | +\*----------------------------------------------------------------------------*/ + +/* + * Discover Attributes + */ +class DiscoverFixedLabelAttributes : public ModelCommand +{ +public: + DiscoverFixedLabelAttributes() : ModelCommand("discover") { ModelCommand::AddArguments(); } + + ~DiscoverFixedLabelAttributes() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000) command (0x0C) on endpoint %" PRIu16, endpointId); + + chip::Controller::FixedLabelCluster cluster; + cluster.Associate(device, endpointId); + return cluster.DiscoverAttributes(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +/* + * Attribute LabelList + */ +class ReadFixedLabelLabelList : public ModelCommand +{ +public: + ReadFixedLabelLabelList() : ModelCommand("read") + { + AddArgument("attr-name", "label-list"); + ModelCommand::AddArguments(); + } + + ~ReadFixedLabelLabelList() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0040) command (0x00) on endpoint %" PRIu16, endpointId); + + chip::Controller::FixedLabelCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeLabelList(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnFixedLabelLabelListListAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +/* + * Attribute ClusterRevision + */ +class ReadFixedLabelClusterRevision : public ModelCommand +{ +public: + ReadFixedLabelClusterRevision() : ModelCommand("read") + { + AddArgument("attr-name", "cluster-revision"); + ModelCommand::AddArguments(); + } + + ~ReadFixedLabelClusterRevision() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0040) command (0x00) on endpoint %" PRIu16, endpointId); + + chip::Controller::FixedLabelCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeClusterRevision(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt16uAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + /*----------------------------------------------------------------------------*\ | Cluster GeneralCommissioning | 0x0030 | |------------------------------------------------------------------------------| @@ -16515,6 +17239,24 @@ void registerClusterBinding(Commands & commands) commands.Register(clusterName, clusterCommands); } +void registerClusterBridgedDeviceBasic(Commands & commands) +{ + const char * clusterName = "BridgedDeviceBasic"; + + commands_list clusterCommands = { + make_unique(), make_unique(), + make_unique(), make_unique(), + make_unique(), make_unique(), + make_unique(), make_unique(), + make_unique(), make_unique(), + make_unique(), make_unique(), + make_unique(), make_unique(), + make_unique(), make_unique(), + make_unique(), + }; + + commands.Register(clusterName, clusterCommands); +} void registerClusterColorControl(Commands & commands) { const char * clusterName = "ColorControl"; @@ -16686,6 +17428,18 @@ void registerClusterEthernetNetworkDiagnostics(Commands & commands) commands.Register(clusterName, clusterCommands); } +void registerClusterFixedLabel(Commands & commands) +{ + const char * clusterName = "FixedLabel"; + + commands_list clusterCommands = { + make_unique(), + make_unique(), + make_unique(), + }; + + commands.Register(clusterName, clusterCommands); +} void registerClusterGeneralCommissioning(Commands & commands) { const char * clusterName = "GeneralCommissioning"; @@ -17118,11 +17872,13 @@ void registerClusters(Commands & commands) registerClusterBarrierControl(commands); registerClusterBasic(commands); registerClusterBinding(commands); + registerClusterBridgedDeviceBasic(commands); registerClusterColorControl(commands); registerClusterContentLaunch(commands); registerClusterDescriptor(commands); registerClusterDoorLock(commands); registerClusterEthernetNetworkDiagnostics(commands); + registerClusterFixedLabel(commands); registerClusterGeneralCommissioning(commands); registerClusterGeneralDiagnostics(commands); registerClusterGroupKeyManagement(commands); diff --git a/src/app/common/gen/af-structs.h b/src/app/common/gen/af-structs.h index 19bc01064b65c8..e25afe9c37a96d 100644 --- a/src/app/common/gen/af-structs.h +++ b/src/app/common/gen/af-structs.h @@ -277,6 +277,13 @@ typedef struct _IasAceZoneStatusResult // this will result in all the references to the data being as uint8_t* typedef uint8_t EmberAfIdentity; +// Struct for LabelStruct +typedef struct _LabelStruct +{ + chip::ByteSpan label; + chip::ByteSpan value; +} EmberAfLabelStruct; + // Struct for MediaInputInfo typedef struct _MediaInputInfo { diff --git a/src/app/common/gen/attribute-id.h b/src/app/common/gen/attribute-id.h index 9ba2ccfb85516c..72a50016e6cade 100644 --- a/src/app/common/gen/attribute-id.h +++ b/src/app/common/gen/attribute-id.h @@ -548,6 +548,26 @@ #define ZCL_CARRIER_DETECT_ATTRIBUTE_ID (0x0007) #define ZCL_TIME_SINCE_RESET_ATTRIBUTE_ID (0x0008) +// Attribute ids for cluster: Bridged Device Basic + +// Client attributes + +// Server attributes +#define ZCL_VENDOR_NAME_ATTRIBUTE_ID (0x0001) +#define ZCL_VENDOR_ID_ATTRIBUTE_ID (0x0002) +#define ZCL_PRODUCT_NAME_ATTRIBUTE_ID (0x0003) +#define ZCL_USER_LABEL_ATTRIBUTE_ID (0x0005) +#define ZCL_HARDWARE_VERSION_ATTRIBUTE_ID (0x0007) +#define ZCL_HARDWARE_VERSION_STRING_ATTRIBUTE_ID (0x0008) +#define ZCL_SOFTWARE_VERSION_ATTRIBUTE_ID (0x0009) +#define ZCL_SOFTWARE_VERSION_STRING_ATTRIBUTE_ID (0x000A) +#define ZCL_MANUFACTURING_DATE_ATTRIBUTE_ID (0x000B) +#define ZCL_PART_NUMBER_ATTRIBUTE_ID (0x000C) +#define ZCL_PRODUCT_URL_ATTRIBUTE_ID (0x000D) +#define ZCL_PRODUCT_LABEL_ATTRIBUTE_ID (0x000E) +#define ZCL_SERIAL_NUMBER_ATTRIBUTE_ID (0x000F) +#define ZCL_REACHABLE_ATTRIBUTE_ID (0x0011) + // Attribute ids for cluster: Switch // Client attributes @@ -570,6 +590,13 @@ // Server attributes +// Attribute ids for cluster: Fixed Label + +// Client attributes + +// Server attributes +#define ZCL_LABEL_LIST_ATTRIBUTE_ID (0x0000) + // Attribute ids for cluster: Shade Configuration // Client attributes diff --git a/src/app/common/gen/client-command-macro.h b/src/app/common/gen/client-command-macro.h index 30e3b2f3abf2e2..14a0af6d943244 100644 --- a/src/app/common/gen/client-command-macro.h +++ b/src/app/common/gen/client-command-macro.h @@ -2233,6 +2233,42 @@ \ ZCL_RESET_COUNTS_COMMAND_ID, "", ); +/** @brief Command description for StartUp + * + * Command: StartUp + */ +#define emberAfFillCommandBridged \ + Device BasicClusterStartUp() emberAfFillExternalBuffer(mask, \ + \ + ZCL_START_UP_COMMAND_ID, "", ); + +/** @brief Command description for ShutDown + * + * Command: ShutDown + */ +#define emberAfFillCommandBridged \ + Device BasicClusterShutDown() emberAfFillExternalBuffer(mask, \ + \ + ZCL_SHUT_DOWN_COMMAND_ID, "", ); + +/** @brief Command description for Leave + * + * Command: Leave + */ +#define emberAfFillCommandBridged \ + Device BasicClusterLeave() emberAfFillExternalBuffer(mask, \ + \ + ZCL_LEAVE_COMMAND_ID, "", ); + +/** @brief Command description for ReachableChanged + * + * Command: ReachableChanged + */ +#define emberAfFillCommandBridged \ + Device BasicClusterReachableChanged() emberAfFillExternalBuffer(mask, \ + \ + ZCL_REACHABLE_CHANGED_COMMAND_ID, "", ); + /** @brief Command description for SetFabric * * Command: SetFabric diff --git a/src/app/common/gen/cluster-id.h b/src/app/common/gen/cluster-id.h index c0b9792e4dcc6c..15097b69737e87 100644 --- a/src/app/common/gen/cluster-id.h +++ b/src/app/common/gen/cluster-id.h @@ -113,6 +113,9 @@ // Definitions for cluster: Ethernet Network Diagnostics #define ZCL_ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_ID (0x0037) +// Definitions for cluster: Bridged Device Basic +#define ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID (0x0039) + // Definitions for cluster: Switch #define ZCL_SWITCH_CLUSTER_ID (0x003B) @@ -122,6 +125,9 @@ // Definitions for cluster: Trusted Root Certificates #define ZCL_TRUSTED_ROOT_CERTIFICATES_CLUSTER_ID (0x003F) +// Definitions for cluster: Fixed Label +#define ZCL_FIXED_LABEL_CLUSTER_ID (0x0040) + // Definitions for cluster: Shade Configuration #define ZCL_SHADE_CONFIG_CLUSTER_ID (0x0100) diff --git a/src/app/common/gen/command-id.h b/src/app/common/gen/command-id.h index c7fb515824e8ce..ca68b3024d0e1f 100644 --- a/src/app/common/gen/command-id.h +++ b/src/app/common/gen/command-id.h @@ -277,6 +277,12 @@ // Commands for cluster: Ethernet Network Diagnostics #define ZCL_RESET_COUNTS_COMMAND_ID (0x00) +// Commands for cluster: Bridged Device Basic +#define ZCL_START_UP_COMMAND_ID (0x00) +#define ZCL_SHUT_DOWN_COMMAND_ID (0x01) +#define ZCL_LEAVE_COMMAND_ID (0x02) +#define ZCL_REACHABLE_CHANGED_COMMAND_ID (0x03) + // Commands for cluster: Operational Credentials #define ZCL_SET_FABRIC_COMMAND_ID (0x00) #define ZCL_SET_FABRIC_RESPONSE_COMMAND_ID (0x01) diff --git a/src/app/common/gen/print-cluster.h b/src/app/common/gen/print-cluster.h index 216d521231f3ac..8a4b85a79e52ae 100644 --- a/src/app/common/gen/print-cluster.h +++ b/src/app/common/gen/print-cluster.h @@ -213,6 +213,12 @@ #define CHIP_PRINTCLUSTER_ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER #endif +#if defined(ZCL_USING_BRIDGED_DEVICE_BASIC_CLUSTER_SERVER) || defined(ZCL_USING_BRIDGED_DEVICE_BASIC_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_BRIDGED_DEVICE_BASIC_CLUSTER { ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID, 57, "Bridged Device Basic" }, +#else +#define CHIP_PRINTCLUSTER_BRIDGED_DEVICE_BASIC_CLUSTER +#endif + #if defined(ZCL_USING_SWITCH_CLUSTER_SERVER) || defined(ZCL_USING_SWITCH_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_SWITCH_CLUSTER { ZCL_SWITCH_CLUSTER_ID, 59, "Switch" }, #else @@ -232,6 +238,12 @@ #define CHIP_PRINTCLUSTER_TRUSTED_ROOT_CERTIFICATES_CLUSTER #endif +#if defined(ZCL_USING_FIXED_LABEL_CLUSTER_SERVER) || defined(ZCL_USING_FIXED_LABEL_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_FIXED_LABEL_CLUSTER { ZCL_FIXED_LABEL_CLUSTER_ID, 64, "Fixed Label" }, +#else +#define CHIP_PRINTCLUSTER_FIXED_LABEL_CLUSTER +#endif + #if defined(ZCL_USING_SHADE_CONFIG_CLUSTER_SERVER) || defined(ZCL_USING_SHADE_CONFIG_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_SHADE_CONFIG_CLUSTER { ZCL_SHADE_CONFIG_CLUSTER_ID, 256, "Shade Configuration" }, #else @@ -951,9 +963,11 @@ CHIP_PRINTCLUSTER_THREAD_NETWORK_DIAGNOSTICS_CLUSTER \ CHIP_PRINTCLUSTER_WIFI_NETWORK_DIAGNOSTICS_CLUSTER \ CHIP_PRINTCLUSTER_ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER \ + CHIP_PRINTCLUSTER_BRIDGED_DEVICE_BASIC_CLUSTER \ CHIP_PRINTCLUSTER_SWITCH_CLUSTER \ CHIP_PRINTCLUSTER_OPERATIONAL_CREDENTIALS_CLUSTER \ CHIP_PRINTCLUSTER_TRUSTED_ROOT_CERTIFICATES_CLUSTER \ + CHIP_PRINTCLUSTER_FIXED_LABEL_CLUSTER \ CHIP_PRINTCLUSTER_SHADE_CONFIG_CLUSTER \ CHIP_PRINTCLUSTER_DOOR_LOCK_CLUSTER \ CHIP_PRINTCLUSTER_WINDOW_COVERING_CLUSTER \ diff --git a/src/app/zap-templates/zcl/bridged-device-basic.xml b/src/app/zap-templates/zcl/bridged-device-basic.xml new file mode 100644 index 00000000000000..89b4dfd79758bd --- /dev/null +++ b/src/app/zap-templates/zcl/bridged-device-basic.xml @@ -0,0 +1,58 @@ + + + + + + Bridged Device Basic + CHIP + Attributes for determining basic information about a bridged device, and setting user device information such as location. + 0x0039 + BRIDGED_DEVICE_BASIC_CLUSTER + true + true + + + VendorName + VendorID + ProductName + UserLabel + HardwareVersion + HardwareVersionString + SoftwareVersion + SoftwareVersionString + ManufacturingDate + + PartNumber + + ProductURL + ProductLabel + SerialNumber + Reachable + + The StartUp event SHALL be emitted by a Node as soon as reasonable after completing a boot or reboot process. + + + The ShutDown event SHOULD be emitted by a Node prior to any orderly shutdown sequence on a best-effort basis. + + + The Leave event SHOULD be emitted by a Node prior to permanently leaving the Fabric. + + + The Leave event SHOULD be emitted by a Node when the Reachable attribute changes. + + + diff --git a/src/app/zap-templates/zcl/custom-types.xml b/src/app/zap-templates/zcl/custom-types.xml index c5a31406c36ebc..70ccce8b97c672 100644 --- a/src/app/zap-templates/zcl/custom-types.xml +++ b/src/app/zap-templates/zcl/custom-types.xml @@ -50,6 +50,10 @@ limitations under the License. + + // TODO: Change this to CHAR_STRING once it is supported #6112 + // TODO: Change this to CHAR_STRING once it is supported #6112 + // Change INT16U to new type VendorID #2395 diff --git a/src/app/zap-templates/zcl/fixed-label-cluster.xml b/src/app/zap-templates/zcl/fixed-label-cluster.xml new file mode 100644 index 00000000000000..237a1220521d23 --- /dev/null +++ b/src/app/zap-templates/zcl/fixed-label-cluster.xml @@ -0,0 +1,28 @@ + + + + + + General + Fixed Label + 0x0040 + FIXED_LABEL_CLUSTER + The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only +labels. + label list + + diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index bc97bf2e96bf15..617f0587e80e60 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -57,6 +57,8 @@ "wwah-silabs-devices.xml", "sample-extensions.xml", "commissioning.xml", + "bridged-device-basic.xml", + "fixed-label-cluster.xml", "chip-ota.xml" ], "manufacturersXml": "../../../../third_party/zap/repo/zcl-builtin/shared/manufacturers.xml", diff --git a/src/app/zap_cluster_list.py b/src/app/zap_cluster_list.py index bee9487d1da107..50a081305661e4 100755 --- a/src/app/zap_cluster_list.py +++ b/src/app/zap_cluster_list.py @@ -17,6 +17,7 @@ 'BARRIER_CONTROL_CLUSTER': ['barrier-control-server'], 'BASIC_CLUSTER': ['basic'], 'BINDING_CLUSTER': ['bindings'], + 'BRIDGED_DEVICE_BASIC_CLUSTER': [], 'COLOR_CONTROL_CLUSTER': ['color-control-server'], 'COMMISSIONING_CLUSTER': [], 'CONTENT_LAUNCH_CLUSTER': ['content-launch-server'], @@ -24,6 +25,7 @@ 'DEVICE_TEMP_CLUSTER': [], 'DOOR_LOCK_CLUSTER': ['door-lock-server'], 'ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER': [], + 'FIXED_LABEL_CLUSTER': [], 'GENERAL_COMMISSIONING_CLUSTER': ['general-commissioning-server'], 'GENERAL_DIAGNOSTICS_CLUSTER': [], 'GROUPS_CLUSTER': ['groups-server'], @@ -70,6 +72,7 @@ 'BARRIER_CONTROL_CLUSTER': [], 'BASIC_CLUSTER': [], 'BINDING_CLUSTER': [], + 'BRIDGED_DEVICE_BASIC_CLUSTER': [], 'COLOR_CONTROL_CLUSTER': [], 'COMMISSIONING_CLUSTER': [], 'CONTENT_LAUNCH_CLUSTER': [], @@ -77,6 +80,7 @@ 'DESCRIPTOR_CLUSTER': [], 'DOOR_LOCK_CLUSTER': [], 'ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER': [], + 'FIXED_LABEL_CLUSTER': [], 'GENERAL_COMMISSIONING_CLUSTER': [], 'GENERAL_DIAGNOSTICS_CLUSTER': [], 'GROUPS_CLUSTER': [], diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 37d68782062e43..ff0bf81a248349 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -1804,6 +1804,301 @@ } ] }, + { + "name": "Bridged Device Basic", + "code": 57, + "mfgCode": null, + "define": "BRIDGED_DEVICE_BASIC_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Bridged Device Basic", + "code": 57, + "mfgCode": null, + "define": "BRIDGED_DEVICE_BASIC_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "StartUp", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 0 + }, + { + "name": "ShutDown", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 0 + }, + { + "name": "Leave", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 0 + }, + { + "name": "ReachableChanged", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "VendorName", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorID", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductName", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UserLabel", + "code": 5, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersion", + "code": 7, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersionString", + "code": 8, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersion", + "code": 9, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersionString", + "code": 10, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ManufacturingDate", + "code": 11, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartNumber", + "code": 12, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductURL", + "code": 13, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductLabel", + "code": 14, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SerialNumber", + "code": 15, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Reachable", + "code": 17, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, { "name": "Switch", "code": 59, @@ -2111,6 +2406,73 @@ } ] }, + { + "name": "Fixed Label", + "code": 64, + "mfgCode": null, + "define": "FIXED_LABEL_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [], + "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": "Fixed Label", + "code": 64, + "mfgCode": null, + "define": "FIXED_LABEL_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [], + "attributes": [ + { + "name": "label list", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "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": "Door Lock", "code": 257, diff --git a/src/controller/data_model/gen/CHIPClientCallbacks.cpp b/src/controller/data_model/gen/CHIPClientCallbacks.cpp index ec120db6194a50..f585fd84cfc44c 100644 --- a/src/controller/data_model/gen/CHIPClientCallbacks.cpp +++ b/src/controller/data_model/gen/CHIPClientCallbacks.cpp @@ -572,6 +572,29 @@ bool emberAfReadAttributesResponseCallback(ClusterId clusterId, uint8_t * messag } } break; + case 0x0040: + switch (attributeId) + { + case 0x0000: // LabelStruct + { + _LabelStruct data[count]; + for (size_t i = 0; i < count; i++) + { + CHECK_STATUS(ReadByteSpan(message, 18, &data[i].label)); + messageLen -= 18; + message += 18; + CHECK_STATUS(ReadByteSpan(message, 18, &data[i].value)); + messageLen -= 18; + message += 18; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, count, data); + break; + } + } + break; case 0x0033: switch (attributeId) { diff --git a/src/controller/data_model/gen/CHIPClientCallbacks.h b/src/controller/data_model/gen/CHIPClientCallbacks.h index dcec40bfb0e9d3..84c5275ccafbea 100644 --- a/src/controller/data_model/gen/CHIPClientCallbacks.h +++ b/src/controller/data_model/gen/CHIPClientCallbacks.h @@ -148,6 +148,7 @@ typedef void (*DescriptorDeviceListListAttributeCallback)(void * context, uint16 typedef void (*DescriptorServerListListAttributeCallback)(void * context, uint16_t count, chip::ClusterId * entries); typedef void (*DescriptorClientListListAttributeCallback)(void * context, uint16_t count, chip::ClusterId * entries); typedef void (*DescriptorPartsListListAttributeCallback)(void * context, uint16_t count, chip::EndpointId * entries); +typedef void (*FixedLabelLabelListListAttributeCallback)(void * context, uint16_t count, _LabelStruct * entries); typedef void (*GeneralDiagnosticsNetworkInterfacesListAttributeCallback)(void * context, uint16_t count, _NetworkInterfaceType * entries); typedef void (*GroupKeyManagementGroupsListAttributeCallback)(void * context, uint16_t count, _GroupState * entries); diff --git a/src/controller/data_model/gen/CHIPClusters.cpp b/src/controller/data_model/gen/CHIPClusters.cpp index 894991e3c38507..e4ae7d3ef434dd 100644 --- a/src/controller/data_model/gen/CHIPClusters.cpp +++ b/src/controller/data_model/gen/CHIPClusters.cpp @@ -689,6 +689,145 @@ CHIP_ERROR BindingCluster::ReadAttributeClusterRevision(Callback::Cancelable * o return SendCommand(seqNum, std::move(encodedCommand), onSuccessCallback, onFailureCallback); } +// BridgedDeviceBasic Cluster Commands +// BridgedDeviceBasic Cluster Attributes +CHIP_ERROR BridgedDeviceBasicCluster::DiscoverAttributes(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + uint8_t seqNum = mDevice->GetNextSequenceNumber(); + System::PacketBufferHandle encodedCommand = encodeBridgedDeviceBasicClusterDiscoverAttributes(seqNum, mEndpoint); + return SendCommand(seqNum, std::move(encodedCommand), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeVendorName(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + uint8_t seqNum = mDevice->GetNextSequenceNumber(); + System::PacketBufferHandle encodedCommand = encodeBridgedDeviceBasicClusterReadVendorNameAttribute(seqNum, mEndpoint); + return SendCommand(seqNum, std::move(encodedCommand), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeVendorID(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + uint8_t seqNum = mDevice->GetNextSequenceNumber(); + System::PacketBufferHandle encodedCommand = encodeBridgedDeviceBasicClusterReadVendorIDAttribute(seqNum, mEndpoint); + return SendCommand(seqNum, std::move(encodedCommand), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeProductName(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + uint8_t seqNum = mDevice->GetNextSequenceNumber(); + System::PacketBufferHandle encodedCommand = encodeBridgedDeviceBasicClusterReadProductNameAttribute(seqNum, mEndpoint); + return SendCommand(seqNum, std::move(encodedCommand), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeUserLabel(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + uint8_t seqNum = mDevice->GetNextSequenceNumber(); + System::PacketBufferHandle encodedCommand = encodeBridgedDeviceBasicClusterReadUserLabelAttribute(seqNum, mEndpoint); + return SendCommand(seqNum, std::move(encodedCommand), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BridgedDeviceBasicCluster::WriteAttributeUserLabel(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::ByteSpan value) +{ + uint8_t seqNum = mDevice->GetNextSequenceNumber(); + System::PacketBufferHandle encodedCommand = encodeBridgedDeviceBasicClusterWriteUserLabelAttribute(seqNum, mEndpoint, value); + return SendCommand(seqNum, std::move(encodedCommand), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeHardwareVersion(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + uint8_t seqNum = mDevice->GetNextSequenceNumber(); + System::PacketBufferHandle encodedCommand = encodeBridgedDeviceBasicClusterReadHardwareVersionAttribute(seqNum, mEndpoint); + return SendCommand(seqNum, std::move(encodedCommand), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeHardwareVersionString(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + uint8_t seqNum = mDevice->GetNextSequenceNumber(); + System::PacketBufferHandle encodedCommand = + encodeBridgedDeviceBasicClusterReadHardwareVersionStringAttribute(seqNum, mEndpoint); + return SendCommand(seqNum, std::move(encodedCommand), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeSoftwareVersion(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + uint8_t seqNum = mDevice->GetNextSequenceNumber(); + System::PacketBufferHandle encodedCommand = encodeBridgedDeviceBasicClusterReadSoftwareVersionAttribute(seqNum, mEndpoint); + return SendCommand(seqNum, std::move(encodedCommand), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeSoftwareVersionString(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + uint8_t seqNum = mDevice->GetNextSequenceNumber(); + System::PacketBufferHandle encodedCommand = + encodeBridgedDeviceBasicClusterReadSoftwareVersionStringAttribute(seqNum, mEndpoint); + return SendCommand(seqNum, std::move(encodedCommand), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeManufacturingDate(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + uint8_t seqNum = mDevice->GetNextSequenceNumber(); + System::PacketBufferHandle encodedCommand = encodeBridgedDeviceBasicClusterReadManufacturingDateAttribute(seqNum, mEndpoint); + return SendCommand(seqNum, std::move(encodedCommand), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributePartNumber(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + uint8_t seqNum = mDevice->GetNextSequenceNumber(); + System::PacketBufferHandle encodedCommand = encodeBridgedDeviceBasicClusterReadPartNumberAttribute(seqNum, mEndpoint); + return SendCommand(seqNum, std::move(encodedCommand), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeProductURL(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + uint8_t seqNum = mDevice->GetNextSequenceNumber(); + System::PacketBufferHandle encodedCommand = encodeBridgedDeviceBasicClusterReadProductURLAttribute(seqNum, mEndpoint); + return SendCommand(seqNum, std::move(encodedCommand), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeProductLabel(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + uint8_t seqNum = mDevice->GetNextSequenceNumber(); + System::PacketBufferHandle encodedCommand = encodeBridgedDeviceBasicClusterReadProductLabelAttribute(seqNum, mEndpoint); + return SendCommand(seqNum, std::move(encodedCommand), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeSerialNumber(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + uint8_t seqNum = mDevice->GetNextSequenceNumber(); + System::PacketBufferHandle encodedCommand = encodeBridgedDeviceBasicClusterReadSerialNumberAttribute(seqNum, mEndpoint); + return SendCommand(seqNum, std::move(encodedCommand), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeReachable(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + uint8_t seqNum = mDevice->GetNextSequenceNumber(); + System::PacketBufferHandle encodedCommand = encodeBridgedDeviceBasicClusterReadReachableAttribute(seqNum, mEndpoint); + return SendCommand(seqNum, std::move(encodedCommand), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + uint8_t seqNum = mDevice->GetNextSequenceNumber(); + System::PacketBufferHandle encodedCommand = encodeBridgedDeviceBasicClusterReadClusterRevisionAttribute(seqNum, mEndpoint); + return SendCommand(seqNum, std::move(encodedCommand), onSuccessCallback, onFailureCallback); +} + // ColorControl Cluster Commands CHIP_ERROR ColorControlCluster::MoveColor(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, int16_t rateX, int16_t rateY, uint8_t optionsMask, uint8_t optionsOverride) @@ -2727,6 +2866,30 @@ CHIP_ERROR EthernetNetworkDiagnosticsCluster::ReadAttributeClusterRevision(Callb return SendCommand(seqNum, std::move(encodedCommand), onSuccessCallback, onFailureCallback); } +// FixedLabel Cluster Commands +// FixedLabel Cluster Attributes +CHIP_ERROR FixedLabelCluster::DiscoverAttributes(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) +{ + uint8_t seqNum = mDevice->GetNextSequenceNumber(); + System::PacketBufferHandle encodedCommand = encodeFixedLabelClusterDiscoverAttributes(seqNum, mEndpoint); + return SendCommand(seqNum, std::move(encodedCommand), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR FixedLabelCluster::ReadAttributeLabelList(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + uint8_t seqNum = mDevice->GetNextSequenceNumber(); + System::PacketBufferHandle encodedCommand = encodeFixedLabelClusterReadLabelListAttribute(seqNum, mEndpoint); + return SendCommand(seqNum, std::move(encodedCommand), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR FixedLabelCluster::ReadAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + uint8_t seqNum = mDevice->GetNextSequenceNumber(); + System::PacketBufferHandle encodedCommand = encodeFixedLabelClusterReadClusterRevisionAttribute(seqNum, mEndpoint); + return SendCommand(seqNum, std::move(encodedCommand), onSuccessCallback, onFailureCallback); +} + // GeneralCommissioning Cluster Commands CHIP_ERROR GeneralCommissioningCluster::ArmFailSafe(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t expiryLengthSeconds, diff --git a/src/controller/data_model/gen/CHIPClusters.h b/src/controller/data_model/gen/CHIPClusters.h index a3b15360d9d8e0..ada2620ded7b2c 100644 --- a/src/controller/data_model/gen/CHIPClusters.h +++ b/src/controller/data_model/gen/CHIPClusters.h @@ -34,11 +34,13 @@ constexpr ClusterId kAudioOutputClusterId = 0x050B; constexpr ClusterId kBarrierControlClusterId = 0x0103; constexpr ClusterId kBasicClusterId = 0x0028; constexpr ClusterId kBindingClusterId = 0xF000; +constexpr ClusterId kBridgedDeviceBasicClusterId = 0x0039; constexpr ClusterId kColorControlClusterId = 0x0300; constexpr ClusterId kContentLaunchClusterId = 0x050A; constexpr ClusterId kDescriptorClusterId = 0x001D; constexpr ClusterId kDoorLockClusterId = 0x0101; constexpr ClusterId kEthernetNetworkDiagnosticsClusterId = 0x0037; +constexpr ClusterId kFixedLabelClusterId = 0x0040; constexpr ClusterId kGeneralCommissioningClusterId = 0x0030; constexpr ClusterId kGeneralDiagnosticsClusterId = 0x0033; constexpr ClusterId kGroupKeyManagementClusterId = 0xF004; @@ -233,6 +235,35 @@ class DLL_EXPORT BindingCluster : public ClusterBase static constexpr CommandId kUnbindCommandId = 0x01; }; +class DLL_EXPORT BridgedDeviceBasicCluster : public ClusterBase +{ +public: + BridgedDeviceBasicCluster() : ClusterBase(kBridgedDeviceBasicClusterId) {} + ~BridgedDeviceBasicCluster() {} + + // Cluster Attributes + CHIP_ERROR DiscoverAttributes(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeVendorName(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeVendorID(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeProductName(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeUserLabel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeHardwareVersion(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeHardwareVersionString(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeSoftwareVersion(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeSoftwareVersionString(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeManufacturingDate(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributePartNumber(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeProductURL(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeProductLabel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeSerialNumber(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeReachable(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR WriteAttributeUserLabel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::ByteSpan value); +}; + class DLL_EXPORT ColorControlCluster : public ClusterBase { public: @@ -537,6 +568,18 @@ class DLL_EXPORT EthernetNetworkDiagnosticsCluster : public ClusterBase static constexpr CommandId kResetCountsCommandId = 0x00; }; +class DLL_EXPORT FixedLabelCluster : public ClusterBase +{ +public: + FixedLabelCluster() : ClusterBase(kFixedLabelClusterId) {} + ~FixedLabelCluster() {} + + // Cluster Attributes + CHIP_ERROR DiscoverAttributes(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeLabelList(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); +}; + class DLL_EXPORT GeneralCommissioningCluster : public ClusterBase { public: diff --git a/src/controller/data_model/gen/call-command-handler.cpp b/src/controller/data_model/gen/call-command-handler.cpp index c2fb3e094ff153..adbb2685e8ab19 100644 --- a/src/controller/data_model/gen/call-command-handler.cpp +++ b/src/controller/data_model/gen/call-command-handler.cpp @@ -35,11 +35,13 @@ EmberAfStatus emberAfAudioOutputClusterClientCommandParse(EmberAfClusterCommand EmberAfStatus emberAfBarrierControlClusterClientCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfBasicClusterClientCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfBindingClusterClientCommandParse(EmberAfClusterCommand * cmd); +EmberAfStatus emberAfBridgedDeviceBasicClusterClientCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfColorControlClusterClientCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfContentLaunchClusterClientCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfDescriptorClusterClientCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfDoorLockClusterClientCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfEthernetNetworkDiagnosticsClusterClientCommandParse(EmberAfClusterCommand * cmd); +EmberAfStatus emberAfFixedLabelClusterClientCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfGeneralCommissioningClusterClientCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfGeneralDiagnosticsClusterClientCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfGroupKeyManagementClusterClientCommandParse(EmberAfClusterCommand * cmd); @@ -121,6 +123,10 @@ EmberAfStatus emberAfClusterSpecificCommandParse(EmberAfClusterCommand * cmd) // No commands are enabled for cluster Binding result = status(false, true, cmd->mfgSpecific); break; + case ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID: + // No commands are enabled for cluster Bridged Device Basic + result = status(false, true, cmd->mfgSpecific); + break; case ZCL_COLOR_CONTROL_CLUSTER_ID: // No commands are enabled for cluster Color Control result = status(false, true, cmd->mfgSpecific); @@ -139,6 +145,10 @@ EmberAfStatus emberAfClusterSpecificCommandParse(EmberAfClusterCommand * cmd) // No commands are enabled for cluster Ethernet Network Diagnostics result = status(false, true, cmd->mfgSpecific); break; + case ZCL_FIXED_LABEL_CLUSTER_ID: + // No commands are enabled for cluster Fixed Label + result = status(false, true, cmd->mfgSpecific); + break; case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: result = emberAfGeneralCommissioningClusterClientCommandParse(cmd); break; diff --git a/src/controller/data_model/gen/callback-stub.cpp b/src/controller/data_model/gen/callback-stub.cpp index 4a5456111ece97..58d58c62d107d3 100644 --- a/src/controller/data_model/gen/callback-stub.cpp +++ b/src/controller/data_model/gen/callback-stub.cpp @@ -50,6 +50,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_BINDING_CLUSTER_ID: emberAfBindingClusterInitCallback(endpoint); break; + case ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID: + emberAfBridgedDeviceBasicClusterInitCallback(endpoint); + break; case ZCL_COLOR_CONTROL_CLUSTER_ID: emberAfColorControlClusterInitCallback(endpoint); break; @@ -65,6 +68,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_ID: emberAfEthernetNetworkDiagnosticsClusterInitCallback(endpoint); break; + case ZCL_FIXED_LABEL_CLUSTER_ID: + emberAfFixedLabelClusterInitCallback(endpoint); + break; case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: emberAfGeneralCommissioningClusterInitCallback(endpoint); break; @@ -181,6 +187,11 @@ void __attribute__((weak)) emberAfBindingClusterInitCallback(EndpointId endpoint // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfBridgedDeviceBasicClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfColorControlClusterInitCallback(EndpointId endpoint) { // To prevent warning @@ -206,6 +217,11 @@ void __attribute__((weak)) emberAfEthernetNetworkDiagnosticsClusterInitCallback( // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfFixedLabelClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfGeneralCommissioningClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/src/controller/data_model/gen/callback.h b/src/controller/data_model/gen/callback.h index 72cf9e37509ac2..bf6b91512cdd0e 100644 --- a/src/controller/data_model/gen/callback.h +++ b/src/controller/data_model/gen/callback.h @@ -96,6 +96,14 @@ void emberAfBasicClusterInitCallback(chip::EndpointId endpoint); */ void emberAfBindingClusterInitCallback(chip::EndpointId endpoint); +/** @brief Bridged Device Basic Cluster Init + * + * Cluster Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfBridgedDeviceBasicClusterInitCallback(chip::EndpointId endpoint); + /** @brief Color Control Cluster Init * * Cluster Init @@ -136,6 +144,14 @@ void emberAfDoorLockClusterInitCallback(chip::EndpointId endpoint); */ void emberAfEthernetNetworkDiagnosticsClusterInitCallback(chip::EndpointId endpoint); +/** @brief Fixed Label Cluster Init + * + * Cluster Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfFixedLabelClusterInitCallback(chip::EndpointId endpoint); + /** @brief General Commissioning Cluster Init * * Cluster Init @@ -829,6 +845,77 @@ EmberAfStatus emberAfBindingClusterClientPreAttributeChangedCallback(chip::Endpo */ void emberAfBindingClusterClientTickCallback(chip::EndpointId endpoint); +// +// Bridged Device Basic Cluster client +// + +/** @brief Bridged Device Basic Cluster Client Init + * + * Client Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfBridgedDeviceBasicClusterClientInitCallback(chip::EndpointId endpoint); + +/** @brief Bridged Device Basic Cluster Client Attribute Changed + * + * Client Attribute Changed + * + * @param endpoint Endpoint that is being initialized + * @param attributeId Attribute that changed + */ +void emberAfBridgedDeviceBasicClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId); + +/** @brief Bridged Device Basic Cluster Client Manufacturer Specific Attribute Changed + * + * Client Manufacturer Specific Attribute Changed + * + * @param endpoint Endpoint that is being initialized + * @param attributeId Attribute that changed + * @param manufacturerCode Manufacturer Code of the attribute that changed + */ +void emberAfBridgedDeviceBasicClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, + chip::AttributeId attributeId, + uint16_t manufacturerCode); + +/** @brief Bridged Device Basic Cluster Client Message Sent + * + * Client Message Sent + * + * @param type The type of message sent + * @param destination The destination to which the message was sent + * @param apsFrame The APS frame for the message + * @param msgLen The length of the message + * @param message The message that was sent + * @param status The status of the sent message + */ +void emberAfBridgedDeviceBasicClusterClientMessageSentCallback(EmberOutgoingMessageType type, + chip::MessageSendDestination destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); + +/** @brief Bridged Device Basic Cluster Client Pre Attribute Changed + * + * client Pre Attribute Changed + * + * @param endpoint Endpoint that is being initialized + * @param attributeId Attribute to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +EmberAfStatus emberAfBridgedDeviceBasicClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint, + chip::AttributeId attributeId, + EmberAfAttributeType attributeType, uint16_t size, + uint8_t * value); + +/** @brief Bridged Device Basic Cluster Client Tick + * + * client Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfBridgedDeviceBasicClusterClientTickCallback(chip::EndpointId endpoint); + // // Color Control Cluster client // @@ -1182,6 +1269,76 @@ EmberAfStatus emberAfEthernetNetworkDiagnosticsClusterClientPreAttributeChangedC */ void emberAfEthernetNetworkDiagnosticsClusterClientTickCallback(chip::EndpointId endpoint); +// +// Fixed Label Cluster client +// + +/** @brief Fixed Label Cluster Client Init + * + * Client Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfFixedLabelClusterClientInitCallback(chip::EndpointId endpoint); + +/** @brief Fixed Label Cluster Client Attribute Changed + * + * Client Attribute Changed + * + * @param endpoint Endpoint that is being initialized + * @param attributeId Attribute that changed + */ +void emberAfFixedLabelClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId); + +/** @brief Fixed Label Cluster Client Manufacturer Specific Attribute Changed + * + * Client Manufacturer Specific Attribute Changed + * + * @param endpoint Endpoint that is being initialized + * @param attributeId Attribute that changed + * @param manufacturerCode Manufacturer Code of the attribute that changed + */ +void emberAfFixedLabelClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, + chip::AttributeId attributeId, + uint16_t manufacturerCode); + +/** @brief Fixed Label Cluster Client Message Sent + * + * Client Message Sent + * + * @param type The type of message sent + * @param destination The destination to which the message was sent + * @param apsFrame The APS frame for the message + * @param msgLen The length of the message + * @param message The message that was sent + * @param status The status of the sent message + */ +void emberAfFixedLabelClusterClientMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); + +/** @brief Fixed Label Cluster Client Pre Attribute Changed + * + * client Pre Attribute Changed + * + * @param endpoint Endpoint that is being initialized + * @param attributeId Attribute to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +EmberAfStatus emberAfFixedLabelClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId, + EmberAfAttributeType attributeType, uint16_t size, + uint8_t * value); + +/** @brief Fixed Label Cluster Client Tick + * + * client Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfFixedLabelClusterClientTickCallback(chip::EndpointId endpoint); + // // General Commissioning Cluster client // diff --git a/src/controller/data_model/gen/chip-zcl-zpro-codec-api.h b/src/controller/data_model/gen/chip-zcl-zpro-codec-api.h index 445d8aa385a6b0..536ed8e712e9ca 100644 --- a/src/controller/data_model/gen/chip-zcl-zpro-codec-api.h +++ b/src/controller/data_model/gen/chip-zcl-zpro-codec-api.h @@ -35,11 +35,13 @@ | BarrierControl | 0x0103 | | Basic | 0x0028 | | Binding | 0xF000 | +| BridgedDeviceBasic | 0x0039 | | ColorControl | 0x0300 | | ContentLaunch | 0x050A | | Descriptor | 0x001D | | DoorLock | 0x0101 | | EthernetNetworkDiagnostics | 0x0037 | +| FixedLabel | 0x0040 | | GeneralCommissioning | 0x0030 | | GeneralDiagnostics | 0x0033 | | GroupKeyManagement | 0xF004 | @@ -487,6 +489,149 @@ chip::System::PacketBufferHandle encodeBindingClusterDiscoverAttributes(uint8_t chip::System::PacketBufferHandle encodeBindingClusterReadClusterRevisionAttribute(uint8_t seqNum, chip::EndpointId destinationEndpoint); +/*----------------------------------------------------------------------------*\ +| Cluster BridgedDeviceBasic | 0x0039 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * VendorName | 0x0001 | +| * VendorID | 0x0002 | +| * ProductName | 0x0003 | +| * UserLabel | 0x0005 | +| * HardwareVersion | 0x0007 | +| * HardwareVersionString | 0x0008 | +| * SoftwareVersion | 0x0009 | +| * SoftwareVersionString | 0x000A | +| * ManufacturingDate | 0x000B | +| * PartNumber | 0x000C | +| * ProductURL | 0x000D | +| * ProductLabel | 0x000E | +| * SerialNumber | 0x000F | +| * Reachable | 0x0011 | +| * ClusterRevision | 0xFFFD | +\*----------------------------------------------------------------------------*/ + +/** + * @brief + * Encode a Bridged Device Basic server discover command into buffer including the APS frame + */ +chip::System::PacketBufferHandle encodeBridgedDeviceBasicClusterDiscoverAttributes(uint8_t seqNum, + chip::EndpointId destinationEndpoint); + +/** + * @brief + * Encode a Bridged Device Basic server read command for the VendorName attribute into buffer including the APS frame + */ +chip::System::PacketBufferHandle encodeBridgedDeviceBasicClusterReadVendorNameAttribute(uint8_t seqNum, + chip::EndpointId destinationEndpoint); + +/** + * @brief + * Encode a Bridged Device Basic server read command for the VendorID attribute into buffer including the APS frame + */ +chip::System::PacketBufferHandle encodeBridgedDeviceBasicClusterReadVendorIDAttribute(uint8_t seqNum, + chip::EndpointId destinationEndpoint); + +/** + * @brief + * Encode a Bridged Device Basic server read command for the ProductName attribute into buffer including the APS frame + */ +chip::System::PacketBufferHandle encodeBridgedDeviceBasicClusterReadProductNameAttribute(uint8_t seqNum, + chip::EndpointId destinationEndpoint); + +/** + * @brief + * Encode a Bridged Device Basic server read command for the UserLabel attribute into buffer including the APS frame + */ +chip::System::PacketBufferHandle encodeBridgedDeviceBasicClusterReadUserLabelAttribute(uint8_t seqNum, + chip::EndpointId destinationEndpoint); + +/** + * @brief + * Encode a Bridged Device Basic server write command for the UserLabel attribute into buffer including the APS frame + */ +chip::System::PacketBufferHandle encodeBridgedDeviceBasicClusterWriteUserLabelAttribute(uint8_t seqNum, + chip::EndpointId destinationEndpoint, + chip::ByteSpan userLabel); + +/** + * @brief + * Encode a Bridged Device Basic server read command for the HardwareVersion attribute into buffer including the APS frame + */ +chip::System::PacketBufferHandle encodeBridgedDeviceBasicClusterReadHardwareVersionAttribute(uint8_t seqNum, + chip::EndpointId destinationEndpoint); + +/** + * @brief + * Encode a Bridged Device Basic server read command for the HardwareVersionString attribute into buffer including the APS frame + */ +chip::System::PacketBufferHandle +encodeBridgedDeviceBasicClusterReadHardwareVersionStringAttribute(uint8_t seqNum, chip::EndpointId destinationEndpoint); + +/** + * @brief + * Encode a Bridged Device Basic server read command for the SoftwareVersion attribute into buffer including the APS frame + */ +chip::System::PacketBufferHandle encodeBridgedDeviceBasicClusterReadSoftwareVersionAttribute(uint8_t seqNum, + chip::EndpointId destinationEndpoint); + +/** + * @brief + * Encode a Bridged Device Basic server read command for the SoftwareVersionString attribute into buffer including the APS frame + */ +chip::System::PacketBufferHandle +encodeBridgedDeviceBasicClusterReadSoftwareVersionStringAttribute(uint8_t seqNum, chip::EndpointId destinationEndpoint); + +/** + * @brief + * Encode a Bridged Device Basic server read command for the ManufacturingDate attribute into buffer including the APS frame + */ +chip::System::PacketBufferHandle +encodeBridgedDeviceBasicClusterReadManufacturingDateAttribute(uint8_t seqNum, chip::EndpointId destinationEndpoint); + +/** + * @brief + * Encode a Bridged Device Basic server read command for the PartNumber attribute into buffer including the APS frame + */ +chip::System::PacketBufferHandle encodeBridgedDeviceBasicClusterReadPartNumberAttribute(uint8_t seqNum, + chip::EndpointId destinationEndpoint); + +/** + * @brief + * Encode a Bridged Device Basic server read command for the ProductURL attribute into buffer including the APS frame + */ +chip::System::PacketBufferHandle encodeBridgedDeviceBasicClusterReadProductURLAttribute(uint8_t seqNum, + chip::EndpointId destinationEndpoint); + +/** + * @brief + * Encode a Bridged Device Basic server read command for the ProductLabel attribute into buffer including the APS frame + */ +chip::System::PacketBufferHandle encodeBridgedDeviceBasicClusterReadProductLabelAttribute(uint8_t seqNum, + chip::EndpointId destinationEndpoint); + +/** + * @brief + * Encode a Bridged Device Basic server read command for the SerialNumber attribute into buffer including the APS frame + */ +chip::System::PacketBufferHandle encodeBridgedDeviceBasicClusterReadSerialNumberAttribute(uint8_t seqNum, + chip::EndpointId destinationEndpoint); + +/** + * @brief + * Encode a Bridged Device Basic server read command for the Reachable attribute into buffer including the APS frame + */ +chip::System::PacketBufferHandle encodeBridgedDeviceBasicClusterReadReachableAttribute(uint8_t seqNum, + chip::EndpointId destinationEndpoint); + +/** + * @brief + * Encode a Bridged Device Basic server read command for the cluster revision attribute into buffer including the APS frame + */ +chip::System::PacketBufferHandle encodeBridgedDeviceBasicClusterReadClusterRevisionAttribute(uint8_t seqNum, + chip::EndpointId destinationEndpoint); + /*----------------------------------------------------------------------------*\ | Cluster ColorControl | 0x0300 | |------------------------------------------------------------------------------| @@ -1302,6 +1447,36 @@ encodeEthernetNetworkDiagnosticsClusterReadOverrunCountAttribute(uint8_t seqNum, chip::System::PacketBufferHandle encodeEthernetNetworkDiagnosticsClusterReadClusterRevisionAttribute(uint8_t seqNum, chip::EndpointId destinationEndpoint); +/*----------------------------------------------------------------------------*\ +| Cluster FixedLabel | 0x0040 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * LabelList | 0x0000 | +| * ClusterRevision | 0xFFFD | +\*----------------------------------------------------------------------------*/ + +/** + * @brief + * Encode a Fixed Label server discover command into buffer including the APS frame + */ +chip::System::PacketBufferHandle encodeFixedLabelClusterDiscoverAttributes(uint8_t seqNum, chip::EndpointId destinationEndpoint); + +/** + * @brief + * Encode a Fixed Label server read command for the label list attribute into buffer including the APS frame + */ +chip::System::PacketBufferHandle encodeFixedLabelClusterReadLabelListAttribute(uint8_t seqNum, + chip::EndpointId destinationEndpoint); + +/** + * @brief + * Encode a Fixed Label server read command for the cluster revision attribute into buffer including the APS frame + */ +chip::System::PacketBufferHandle encodeFixedLabelClusterReadClusterRevisionAttribute(uint8_t seqNum, + chip::EndpointId destinationEndpoint); + /*----------------------------------------------------------------------------*\ | Cluster GeneralCommissioning | 0x0030 | |------------------------------------------------------------------------------| diff --git a/src/controller/data_model/gen/encoder.cpp b/src/controller/data_model/gen/encoder.cpp index 32665c09bd18b1..f53e5e506ab982 100644 --- a/src/controller/data_model/gen/encoder.cpp +++ b/src/controller/data_model/gen/encoder.cpp @@ -61,11 +61,13 @@ using namespace chip::Encoding::LittleEndian; | BarrierControl | 0x0103 | | Basic | 0x0028 | | Binding | 0xF000 | +| BridgedDeviceBasic | 0x0039 | | ColorControl | 0x0300 | | ContentLaunch | 0x050A | | Descriptor | 0x001D | | DoorLock | 0x0101 | | EthernetNetworkDiagnostics | 0x0037 | +| FixedLabel | 0x0040 | | GeneralCommissioning | 0x0030 | | GeneralDiagnostics | 0x0033 | | GroupKeyManagement | 0xF004 | @@ -143,6 +145,8 @@ using namespace chip::Encoding::LittleEndian; #define ZCL_BIND_COMMAND_ID (0x00) #define ZCL_UNBIND_COMMAND_ID (0x01) +#define BRIDGED_DEVICE_BASIC_CLUSTER_ID 0x0039 + #define COLOR_CONTROL_CLUSTER_ID 0x0300 #define ZCL_MOVE_COLOR_COMMAND_ID (0x08) #define ZCL_MOVE_COLOR_TEMPERATURE_COMMAND_ID (0x4B) @@ -193,6 +197,8 @@ using namespace chip::Encoding::LittleEndian; #define ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_ID 0x0037 #define ZCL_RESET_COUNTS_COMMAND_ID (0x00) +#define FIXED_LABEL_CLUSTER_ID 0x0040 + #define GENERAL_COMMISSIONING_CLUSTER_ID 0x0030 #define ZCL_ARM_FAIL_SAFE_COMMAND_ID (0x00) #define ZCL_COMMISSIONING_COMPLETE_COMMAND_ID (0x04) @@ -915,6 +921,207 @@ PacketBufferHandle encodeBindingClusterReadClusterRevisionAttribute(uint8_t seqN COMMAND_FOOTER(); } +/*----------------------------------------------------------------------------*\ +| Cluster BridgedDeviceBasic | 0x0039 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * VendorName | 0x0001 | +| * VendorID | 0x0002 | +| * ProductName | 0x0003 | +| * UserLabel | 0x0005 | +| * HardwareVersion | 0x0007 | +| * HardwareVersionString | 0x0008 | +| * SoftwareVersion | 0x0009 | +| * SoftwareVersionString | 0x000A | +| * ManufacturingDate | 0x000B | +| * PartNumber | 0x000C | +| * ProductURL | 0x000D | +| * ProductLabel | 0x000E | +| * SerialNumber | 0x000F | +| * Reachable | 0x0011 | +| * ClusterRevision | 0xFFFD | +\*----------------------------------------------------------------------------*/ + +PacketBufferHandle encodeBridgedDeviceBasicClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) +{ + COMMAND_HEADER("DiscoverBridgedDeviceBasicAttributes", BRIDGED_DEVICE_BASIC_CLUSTER_ID); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_FOOTER(); +} + +/* + * Attribute VendorName + */ +PacketBufferHandle encodeBridgedDeviceBasicClusterReadVendorNameAttribute(uint8_t seqNum, EndpointId destinationEndpoint) +{ + COMMAND_HEADER("ReadBridgedDeviceBasicVendorName", BRIDGED_DEVICE_BASIC_CLUSTER_ID); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0001); + COMMAND_FOOTER(); +} + +/* + * Attribute VendorID + */ +PacketBufferHandle encodeBridgedDeviceBasicClusterReadVendorIDAttribute(uint8_t seqNum, EndpointId destinationEndpoint) +{ + COMMAND_HEADER("ReadBridgedDeviceBasicVendorID", BRIDGED_DEVICE_BASIC_CLUSTER_ID); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0002); + COMMAND_FOOTER(); +} + +/* + * Attribute ProductName + */ +PacketBufferHandle encodeBridgedDeviceBasicClusterReadProductNameAttribute(uint8_t seqNum, EndpointId destinationEndpoint) +{ + COMMAND_HEADER("ReadBridgedDeviceBasicProductName", BRIDGED_DEVICE_BASIC_CLUSTER_ID); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0003); + COMMAND_FOOTER(); +} + +/* + * Attribute UserLabel + */ +PacketBufferHandle encodeBridgedDeviceBasicClusterReadUserLabelAttribute(uint8_t seqNum, EndpointId destinationEndpoint) +{ + COMMAND_HEADER("ReadBridgedDeviceBasicUserLabel", BRIDGED_DEVICE_BASIC_CLUSTER_ID); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0005); + COMMAND_FOOTER(); +} + +PacketBufferHandle encodeBridgedDeviceBasicClusterWriteUserLabelAttribute(uint8_t seqNum, EndpointId destinationEndpoint, + chip::ByteSpan userLabel) +{ + COMMAND_HEADER("WriteBridgedDeviceBasicUserLabel", BRIDGED_DEVICE_BASIC_CLUSTER_ID); + size_t userLabelStrLen = userLabel.size(); + if (!CanCastTo(userLabelStrLen)) + { + ChipLogError(Zcl, "Error encoding %s command. String too long: %d", kName, userLabelStrLen); + return PacketBufferHandle(); + } + + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) + .Put16(0x0005) + .Put8(66) + .Put(static_cast(userLabelStrLen)) + .Put(userLabel.data(), userLabelStrLen); + COMMAND_FOOTER(); +} + +/* + * Attribute HardwareVersion + */ +PacketBufferHandle encodeBridgedDeviceBasicClusterReadHardwareVersionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) +{ + COMMAND_HEADER("ReadBridgedDeviceBasicHardwareVersion", BRIDGED_DEVICE_BASIC_CLUSTER_ID); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0007); + COMMAND_FOOTER(); +} + +/* + * Attribute HardwareVersionString + */ +PacketBufferHandle encodeBridgedDeviceBasicClusterReadHardwareVersionStringAttribute(uint8_t seqNum, EndpointId destinationEndpoint) +{ + COMMAND_HEADER("ReadBridgedDeviceBasicHardwareVersionString", BRIDGED_DEVICE_BASIC_CLUSTER_ID); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0008); + COMMAND_FOOTER(); +} + +/* + * Attribute SoftwareVersion + */ +PacketBufferHandle encodeBridgedDeviceBasicClusterReadSoftwareVersionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) +{ + COMMAND_HEADER("ReadBridgedDeviceBasicSoftwareVersion", BRIDGED_DEVICE_BASIC_CLUSTER_ID); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0009); + COMMAND_FOOTER(); +} + +/* + * Attribute SoftwareVersionString + */ +PacketBufferHandle encodeBridgedDeviceBasicClusterReadSoftwareVersionStringAttribute(uint8_t seqNum, EndpointId destinationEndpoint) +{ + COMMAND_HEADER("ReadBridgedDeviceBasicSoftwareVersionString", BRIDGED_DEVICE_BASIC_CLUSTER_ID); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x000A); + COMMAND_FOOTER(); +} + +/* + * Attribute ManufacturingDate + */ +PacketBufferHandle encodeBridgedDeviceBasicClusterReadManufacturingDateAttribute(uint8_t seqNum, EndpointId destinationEndpoint) +{ + COMMAND_HEADER("ReadBridgedDeviceBasicManufacturingDate", BRIDGED_DEVICE_BASIC_CLUSTER_ID); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x000B); + COMMAND_FOOTER(); +} + +/* + * Attribute PartNumber + */ +PacketBufferHandle encodeBridgedDeviceBasicClusterReadPartNumberAttribute(uint8_t seqNum, EndpointId destinationEndpoint) +{ + COMMAND_HEADER("ReadBridgedDeviceBasicPartNumber", BRIDGED_DEVICE_BASIC_CLUSTER_ID); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x000C); + COMMAND_FOOTER(); +} + +/* + * Attribute ProductURL + */ +PacketBufferHandle encodeBridgedDeviceBasicClusterReadProductURLAttribute(uint8_t seqNum, EndpointId destinationEndpoint) +{ + COMMAND_HEADER("ReadBridgedDeviceBasicProductURL", BRIDGED_DEVICE_BASIC_CLUSTER_ID); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x000D); + COMMAND_FOOTER(); +} + +/* + * Attribute ProductLabel + */ +PacketBufferHandle encodeBridgedDeviceBasicClusterReadProductLabelAttribute(uint8_t seqNum, EndpointId destinationEndpoint) +{ + COMMAND_HEADER("ReadBridgedDeviceBasicProductLabel", BRIDGED_DEVICE_BASIC_CLUSTER_ID); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x000E); + COMMAND_FOOTER(); +} + +/* + * Attribute SerialNumber + */ +PacketBufferHandle encodeBridgedDeviceBasicClusterReadSerialNumberAttribute(uint8_t seqNum, EndpointId destinationEndpoint) +{ + COMMAND_HEADER("ReadBridgedDeviceBasicSerialNumber", BRIDGED_DEVICE_BASIC_CLUSTER_ID); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x000F); + COMMAND_FOOTER(); +} + +/* + * Attribute Reachable + */ +PacketBufferHandle encodeBridgedDeviceBasicClusterReadReachableAttribute(uint8_t seqNum, EndpointId destinationEndpoint) +{ + COMMAND_HEADER("ReadBridgedDeviceBasicReachable", BRIDGED_DEVICE_BASIC_CLUSTER_ID); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0011); + COMMAND_FOOTER(); +} + +/* + * Attribute ClusterRevision + */ +PacketBufferHandle encodeBridgedDeviceBasicClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) +{ + COMMAND_HEADER("ReadBridgedDeviceBasicClusterRevision", BRIDGED_DEVICE_BASIC_CLUSTER_ID); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_FOOTER(); +} + /*----------------------------------------------------------------------------*\ | Cluster ColorControl | 0x0300 | |------------------------------------------------------------------------------| @@ -2060,6 +2267,43 @@ PacketBufferHandle encodeEthernetNetworkDiagnosticsClusterReadClusterRevisionAtt COMMAND_FOOTER(); } +/*----------------------------------------------------------------------------*\ +| Cluster FixedLabel | 0x0040 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * LabelList | 0x0000 | +| * ClusterRevision | 0xFFFD | +\*----------------------------------------------------------------------------*/ + +PacketBufferHandle encodeFixedLabelClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) +{ + COMMAND_HEADER("DiscoverFixedLabelAttributes", FIXED_LABEL_CLUSTER_ID); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_FOOTER(); +} + +/* + * Attribute LabelList + */ +PacketBufferHandle encodeFixedLabelClusterReadLabelListAttribute(uint8_t seqNum, EndpointId destinationEndpoint) +{ + COMMAND_HEADER("ReadFixedLabelLabelList", FIXED_LABEL_CLUSTER_ID); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_FOOTER(); +} + +/* + * Attribute ClusterRevision + */ +PacketBufferHandle encodeFixedLabelClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) +{ + COMMAND_HEADER("ReadFixedLabelClusterRevision", FIXED_LABEL_CLUSTER_ID); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_FOOTER(); +} + /*----------------------------------------------------------------------------*\ | Cluster GeneralCommissioning | 0x0030 | |------------------------------------------------------------------------------| diff --git a/src/controller/data_model/gen/endpoint_config.h b/src/controller/data_model/gen/endpoint_config.h index 6f2544572a7635..3efe5c306d5116 100644 --- a/src/controller/data_model/gen/endpoint_config.h +++ b/src/controller/data_model/gen/endpoint_config.h @@ -63,7 +63,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 37 +#define GENERATED_ATTRIBUTE_COUNT 39 #define GENERATED_ATTRIBUTES \ { \ \ @@ -104,6 +104,10 @@ /* Endpoint: 1, Cluster: Ethernet Network Diagnostics (client) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ + /* Endpoint: 1, Cluster: Bridged Device Basic (client) */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT) | ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_SIMPLE_DEFAULT(1) }, /* cluster revision */ \ + \ /* Endpoint: 1, Cluster: Switch (client) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ @@ -111,6 +115,9 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 1, Cluster: Trusted Root Certificates (client) */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ + \ + /* Endpoint: 1, Cluster: Fixed Label (client) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 1, Cluster: Door Lock (client) */ \ @@ -187,7 +194,7 @@ #define GENERATED_FUNCTION_ARRAYS #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 37 +#define GENERATED_CLUSTER_COUNT 39 #define GENERATED_CLUSTERS \ { \ { 0x0003, ZAP_ATTRIBUTE_INDEX(0), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 1, Cluster: Identify (client) */ \ @@ -216,78 +223,84 @@ { \ 0x0037, ZAP_ATTRIBUTE_INDEX(11), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Ethernet Network Diagnostics (client) */ \ - { 0x003B, ZAP_ATTRIBUTE_INDEX(12), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 1, Cluster: Switch (client) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(13), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0039, ZAP_ATTRIBUTE_INDEX(12), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + }, /* Endpoint: 1, Cluster: Bridged Device Basic (client) */ \ + { 0x003B, ZAP_ATTRIBUTE_INDEX(13), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 1, Cluster: Switch (client) */ \ + { \ + 0x003E, ZAP_ATTRIBUTE_INDEX(14), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Operational Credentials (client) */ \ { \ - 0x003F, ZAP_ATTRIBUTE_INDEX(14), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x003F, ZAP_ATTRIBUTE_INDEX(15), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Trusted Root Certificates (client) */ \ { \ - 0x0101, ZAP_ATTRIBUTE_INDEX(15), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(16), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + }, /* Endpoint: 1, Cluster: Fixed Label (client) */ \ + { \ + 0x0101, ZAP_ATTRIBUTE_INDEX(17), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Door Lock (client) */ \ { \ - 0x0102, ZAP_ATTRIBUTE_INDEX(16), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0102, ZAP_ATTRIBUTE_INDEX(18), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Window Covering (client) */ \ { \ - 0x0103, ZAP_ATTRIBUTE_INDEX(17), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0103, ZAP_ATTRIBUTE_INDEX(19), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Barrier Control (client) */ \ { \ - 0x0200, ZAP_ATTRIBUTE_INDEX(18), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0200, ZAP_ATTRIBUTE_INDEX(20), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Pump Configuration and Control (client) */ \ { \ - 0x0201, ZAP_ATTRIBUTE_INDEX(19), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0201, ZAP_ATTRIBUTE_INDEX(21), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Thermostat (client) */ \ { \ - 0x0300, ZAP_ATTRIBUTE_INDEX(20), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0300, ZAP_ATTRIBUTE_INDEX(22), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Color Control (client) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(21), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0402, ZAP_ATTRIBUTE_INDEX(23), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (client) */ \ { \ - 0x0503, ZAP_ATTRIBUTE_INDEX(22), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0503, ZAP_ATTRIBUTE_INDEX(24), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (client) */ \ { \ - 0x0504, ZAP_ATTRIBUTE_INDEX(23), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0504, ZAP_ATTRIBUTE_INDEX(25), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: TV Channel (client) */ \ { \ - 0x0505, ZAP_ATTRIBUTE_INDEX(24), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0505, ZAP_ATTRIBUTE_INDEX(26), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (client) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(25), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0506, ZAP_ATTRIBUTE_INDEX(27), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Media Playback (client) */ \ { \ - 0x0507, ZAP_ATTRIBUTE_INDEX(26), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0507, ZAP_ATTRIBUTE_INDEX(28), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Media Input (client) */ \ { \ - 0x0508, ZAP_ATTRIBUTE_INDEX(27), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0508, ZAP_ATTRIBUTE_INDEX(29), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Low Power (client) */ \ { \ - 0x0509, ZAP_ATTRIBUTE_INDEX(28), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0509, ZAP_ATTRIBUTE_INDEX(30), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (client) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(29), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(31), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Content Launch (client) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(30), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050B, ZAP_ATTRIBUTE_INDEX(32), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Audio Output (client) */ \ { \ - 0x050C, ZAP_ATTRIBUTE_INDEX(31), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050C, ZAP_ATTRIBUTE_INDEX(33), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (client) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(32), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(34), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Application Basic (client) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(33), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050E, ZAP_ATTRIBUTE_INDEX(35), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Account Login (client) */ \ { \ - 0x050F, ZAP_ATTRIBUTE_INDEX(34), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050F, ZAP_ATTRIBUTE_INDEX(36), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Test Cluster (client) */ \ { \ - 0xF000, ZAP_ATTRIBUTE_INDEX(35), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0xF000, ZAP_ATTRIBUTE_INDEX(37), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Binding (client) */ \ { \ - 0xF004, ZAP_ATTRIBUTE_INDEX(36), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0xF004, ZAP_ATTRIBUTE_INDEX(38), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Group Key Management (client) */ \ } @@ -296,17 +309,17 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 37, 74 }, \ + { ZAP_CLUSTER_INDEX(0), 39, 78 }, \ } // Largest attribute size is needed for various buffers #define ATTRIBUTE_LARGEST (3) // Total size of singleton attributes -#define ATTRIBUTE_SINGLETONS_SIZE (2) +#define ATTRIBUTE_SINGLETONS_SIZE (4) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (74) +#define ATTRIBUTE_MAX_SIZE (78) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (1) @@ -350,7 +363,7 @@ // Array of EmberAfCommandMetadata structs. #define ZAP_COMMAND_MASK(mask) COMMAND_MASK_##mask -#define EMBER_AF_GENERATED_COMMAND_COUNT (207) +#define EMBER_AF_GENERATED_COMMAND_COUNT (211) #define GENERATED_COMMANDS \ { \ \ @@ -441,6 +454,12 @@ /* Endpoint: 1, Cluster: Ethernet Network Diagnostics (client) */ \ { 0x0037, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* ResetCounts */ \ \ + /* Endpoint: 1, Cluster: Bridged Device Basic (client) */ \ + { 0x0039, 0x00, 0 }, /* StartUp */ \ + { 0x0039, 0x01, 0 }, /* ShutDown */ \ + { 0x0039, 0x02, 0 }, /* Leave */ \ + { 0x0039, 0x03, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* ReachableChanged */ \ + \ /* Endpoint: 1, Cluster: Operational Credentials (client) */ \ { 0x003E, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* SetFabric */ \ { 0x003E, 0x01, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* SetFabricResponse */ \ diff --git a/src/controller/data_model/gen/gen_config.h b/src/controller/data_model/gen/gen_config.h index 24bc9af4058007..774b838af597e5 100644 --- a/src/controller/data_model/gen/gen_config.h +++ b/src/controller/data_model/gen/gen_config.h @@ -36,11 +36,13 @@ #define EMBER_AF_BARRIER_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_BASIC_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_BINDING_CLUSTER_CLIENT_ENDPOINT_COUNT (1) +#define EMBER_AF_BRIDGED_DEVICE_BASIC_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_COLOR_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_CONTENT_LAUNCH_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_DESCRIPTOR_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_DOOR_LOCK_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_CLIENT_ENDPOINT_COUNT (1) +#define EMBER_AF_FIXED_LABEL_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_GENERAL_COMMISSIONING_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_GENERAL_DIAGNOSTICS_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_GROUP_KEY_MANAGEMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (1) @@ -97,6 +99,10 @@ #define ZCL_USING_BINDING_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_BINDING_CLIENT +// Use this macro to check if the client side of the Bridged Device Basic cluster is included +#define ZCL_USING_BRIDGED_DEVICE_BASIC_CLUSTER_CLIENT +#define EMBER_AF_PLUGIN_BRIDGED_DEVICE_BASIC_CLIENT + // Use this macro to check if the client side of the Color Control cluster is included #define ZCL_USING_COLOR_CONTROL_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_COLOR_CONTROL_CLIENT @@ -117,6 +123,10 @@ #define ZCL_USING_ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_ETHERNET_NETWORK_DIAGNOSTICS_CLIENT +// Use this macro to check if the client side of the Fixed Label cluster is included +#define ZCL_USING_FIXED_LABEL_CLUSTER_CLIENT +#define EMBER_AF_PLUGIN_FIXED_LABEL_CLIENT + // Use this macro to check if the client side of the General Commissioning cluster is included #define ZCL_USING_GENERAL_COMMISSIONING_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_GENERAL_COMMISSIONING_CLIENT diff --git a/src/controller/python/chip/clusters/CHIPClusters.cpp b/src/controller/python/chip/clusters/CHIPClusters.cpp index 1f61e3d22c9158..b5bde227aa4a43 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.cpp +++ b/src/controller/python/chip/clusters/CHIPClusters.cpp @@ -533,6 +533,147 @@ CHIP_ERROR chip_ime_ReadAttribute_Binding_ClusterRevision(chip::Controller::Devi } // End of Cluster Binding +// Cluster BridgedDeviceBasic + +CHIP_ERROR chip_ime_ReadAttribute_BridgedDeviceBasic_VendorName(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + chip::Controller::BridgedDeviceBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeVendorName(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()); +} + +CHIP_ERROR chip_ime_ReadAttribute_BridgedDeviceBasic_VendorID(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + chip::Controller::BridgedDeviceBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeVendorID(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()); +} + +CHIP_ERROR chip_ime_ReadAttribute_BridgedDeviceBasic_ProductName(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + chip::Controller::BridgedDeviceBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeProductName(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()); +} + +CHIP_ERROR chip_ime_ReadAttribute_BridgedDeviceBasic_UserLabel(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + chip::Controller::BridgedDeviceBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeUserLabel(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()); +} + +CHIP_ERROR chip_ime_ReadAttribute_BridgedDeviceBasic_HardwareVersion(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + chip::Controller::BridgedDeviceBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeHardwareVersion(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()); +} + +CHIP_ERROR chip_ime_ReadAttribute_BridgedDeviceBasic_HardwareVersionString(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + chip::Controller::BridgedDeviceBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeHardwareVersionString(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()); +} + +CHIP_ERROR chip_ime_ReadAttribute_BridgedDeviceBasic_SoftwareVersion(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + chip::Controller::BridgedDeviceBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeSoftwareVersion(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()); +} + +CHIP_ERROR chip_ime_ReadAttribute_BridgedDeviceBasic_SoftwareVersionString(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + chip::Controller::BridgedDeviceBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeSoftwareVersionString(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()); +} + +CHIP_ERROR chip_ime_ReadAttribute_BridgedDeviceBasic_ManufacturingDate(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + chip::Controller::BridgedDeviceBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeManufacturingDate(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()); +} + +CHIP_ERROR chip_ime_ReadAttribute_BridgedDeviceBasic_PartNumber(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + chip::Controller::BridgedDeviceBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributePartNumber(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()); +} + +CHIP_ERROR chip_ime_ReadAttribute_BridgedDeviceBasic_ProductURL(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + chip::Controller::BridgedDeviceBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeProductURL(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()); +} + +CHIP_ERROR chip_ime_ReadAttribute_BridgedDeviceBasic_ProductLabel(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + chip::Controller::BridgedDeviceBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeProductLabel(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()); +} + +CHIP_ERROR chip_ime_ReadAttribute_BridgedDeviceBasic_SerialNumber(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + chip::Controller::BridgedDeviceBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeSerialNumber(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()); +} + +CHIP_ERROR chip_ime_ReadAttribute_BridgedDeviceBasic_Reachable(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + chip::Controller::BridgedDeviceBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeReachable(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()); +} + +CHIP_ERROR chip_ime_ReadAttribute_BridgedDeviceBasic_ClusterRevision(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + chip::Controller::BridgedDeviceBasicCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()); +} + +// End of Cluster BridgedDeviceBasic // Cluster ColorControl CHIP_ERROR chip_ime_AppendCommand_ColorControl_MoveColor(chip::Controller::Device * device, uint64_t command, @@ -1592,6 +1733,18 @@ CHIP_ERROR chip_ime_ReadAttribute_EthernetNetworkDiagnostics_ClusterRevision(chi } // End of Cluster EthernetNetworkDiagnostics +// Cluster FixedLabel + +CHIP_ERROR chip_ime_ReadAttribute_FixedLabel_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + chip::Controller::FixedLabelCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()); +} + +// End of Cluster FixedLabel // Cluster GeneralCommissioning CHIP_ERROR chip_ime_AppendCommand_GeneralCommissioning_ArmFailSafe(chip::Controller::Device * device, uint64_t command, diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index a558e6828b9c68..9955e42df64b52 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -90,6 +90,8 @@ def ListClusterCommands(self): "clusterId": "int", }, }, + "BridgedDeviceBasic": { + }, "ColorControl": { "MoveColor": { "rateX": "int", @@ -294,6 +296,8 @@ def ListClusterCommands(self): "ResetCounts": { }, }, + "FixedLabel": { + }, "GeneralCommissioning": { "ArmFailSafe": { "expiryLengthSeconds": "int", @@ -684,6 +688,23 @@ def ListClusterAttributes(self): "Binding": [ "ClusterRevision", ], + "BridgedDeviceBasic": [ + "VendorName", + "VendorID", + "ProductName", + "UserLabel", + "HardwareVersion", + "HardwareVersionString", + "SoftwareVersion", + "SoftwareVersionString", + "ManufacturingDate", + "PartNumber", + "ProductURL", + "ProductLabel", + "SerialNumber", + "Reachable", + "ClusterRevision", + ], "ColorControl": [ "CurrentHue", "CurrentSaturation", @@ -757,6 +778,9 @@ def ListClusterAttributes(self): "OverrunCount", "ClusterRevision", ], + "FixedLabel": [ + "ClusterRevision", + ], "GeneralCommissioning": [ "FabricId", "Breadcrumb", @@ -1542,6 +1566,36 @@ def ClusterBasic_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCL return self._chipLib.chip_ime_ReadAttribute_Basic_ClusterRevision(device, ZCLendpoint, ZCLgroupid) def ClusterBinding_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): return self._chipLib.chip_ime_ReadAttribute_Binding_ClusterRevision(device, ZCLendpoint, ZCLgroupid) + def ClusterBridgedDeviceBasic_ReadAttributeVendorName(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_VendorName(device, ZCLendpoint, ZCLgroupid) + def ClusterBridgedDeviceBasic_ReadAttributeVendorID(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_VendorID(device, ZCLendpoint, ZCLgroupid) + def ClusterBridgedDeviceBasic_ReadAttributeProductName(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ProductName(device, ZCLendpoint, ZCLgroupid) + def ClusterBridgedDeviceBasic_ReadAttributeUserLabel(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_UserLabel(device, ZCLendpoint, ZCLgroupid) + def ClusterBridgedDeviceBasic_ReadAttributeHardwareVersion(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_HardwareVersion(device, ZCLendpoint, ZCLgroupid) + def ClusterBridgedDeviceBasic_ReadAttributeHardwareVersionString(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_HardwareVersionString(device, ZCLendpoint, ZCLgroupid) + def ClusterBridgedDeviceBasic_ReadAttributeSoftwareVersion(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_SoftwareVersion(device, ZCLendpoint, ZCLgroupid) + def ClusterBridgedDeviceBasic_ReadAttributeSoftwareVersionString(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_SoftwareVersionString(device, ZCLendpoint, ZCLgroupid) + def ClusterBridgedDeviceBasic_ReadAttributeManufacturingDate(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ManufacturingDate(device, ZCLendpoint, ZCLgroupid) + def ClusterBridgedDeviceBasic_ReadAttributePartNumber(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_PartNumber(device, ZCLendpoint, ZCLgroupid) + def ClusterBridgedDeviceBasic_ReadAttributeProductURL(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ProductURL(device, ZCLendpoint, ZCLgroupid) + def ClusterBridgedDeviceBasic_ReadAttributeProductLabel(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ProductLabel(device, ZCLendpoint, ZCLgroupid) + def ClusterBridgedDeviceBasic_ReadAttributeSerialNumber(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_SerialNumber(device, ZCLendpoint, ZCLgroupid) + def ClusterBridgedDeviceBasic_ReadAttributeReachable(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_Reachable(device, ZCLendpoint, ZCLgroupid) + def ClusterBridgedDeviceBasic_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ClusterRevision(device, ZCLendpoint, ZCLgroupid) def ClusterColorControl_ReadAttributeCurrentHue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): return self._chipLib.chip_ime_ReadAttribute_ColorControl_CurrentHue(device, ZCLendpoint, ZCLgroupid) def ClusterColorControl_ConfigureAttributeCurrentHue(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int, change: int): @@ -1680,6 +1734,8 @@ def ClusterEthernetNetworkDiagnostics_ReadAttributeOverrunCount(self, device: ct return self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_OverrunCount(device, ZCLendpoint, ZCLgroupid) def ClusterEthernetNetworkDiagnostics_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): return self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_ClusterRevision(device, ZCLendpoint, ZCLgroupid) + def ClusterFixedLabel_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_FixedLabel_ClusterRevision(device, ZCLendpoint, ZCLgroupid) def ClusterGeneralCommissioning_ReadAttributeFabricId(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): return self._chipLib.chip_ime_ReadAttribute_GeneralCommissioning_FabricId(device, ZCLendpoint, ZCLgroupid) def ClusterGeneralCommissioning_ReadAttributeBreadcrumb(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): @@ -2018,6 +2074,52 @@ def InitLib(self, chipLib): # Cluster Binding ReadAttribute ClusterRevision self._chipLib.chip_ime_ReadAttribute_Binding_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] self._chipLib.chip_ime_ReadAttribute_Binding_ClusterRevision.restype = ctypes.c_uint32 + # Cluster BridgedDeviceBasic + # Cluster BridgedDeviceBasic ReadAttribute VendorName + self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_VendorName.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_VendorName.restype = ctypes.c_uint32 + # Cluster BridgedDeviceBasic ReadAttribute VendorID + self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_VendorID.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_VendorID.restype = ctypes.c_uint32 + # Cluster BridgedDeviceBasic ReadAttribute ProductName + self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ProductName.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ProductName.restype = ctypes.c_uint32 + # Cluster BridgedDeviceBasic ReadAttribute UserLabel + self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_UserLabel.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_UserLabel.restype = ctypes.c_uint32 + # Cluster BridgedDeviceBasic ReadAttribute HardwareVersion + self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_HardwareVersion.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_HardwareVersion.restype = ctypes.c_uint32 + # Cluster BridgedDeviceBasic ReadAttribute HardwareVersionString + self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_HardwareVersionString.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_HardwareVersionString.restype = ctypes.c_uint32 + # Cluster BridgedDeviceBasic ReadAttribute SoftwareVersion + self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_SoftwareVersion.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_SoftwareVersion.restype = ctypes.c_uint32 + # Cluster BridgedDeviceBasic ReadAttribute SoftwareVersionString + self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_SoftwareVersionString.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_SoftwareVersionString.restype = ctypes.c_uint32 + # Cluster BridgedDeviceBasic ReadAttribute ManufacturingDate + self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ManufacturingDate.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ManufacturingDate.restype = ctypes.c_uint32 + # Cluster BridgedDeviceBasic ReadAttribute PartNumber + self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_PartNumber.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_PartNumber.restype = ctypes.c_uint32 + # Cluster BridgedDeviceBasic ReadAttribute ProductURL + self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ProductURL.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ProductURL.restype = ctypes.c_uint32 + # Cluster BridgedDeviceBasic ReadAttribute ProductLabel + self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ProductLabel.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ProductLabel.restype = ctypes.c_uint32 + # Cluster BridgedDeviceBasic ReadAttribute SerialNumber + self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_SerialNumber.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_SerialNumber.restype = ctypes.c_uint32 + # Cluster BridgedDeviceBasic ReadAttribute Reachable + self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_Reachable.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_Reachable.restype = ctypes.c_uint32 + # Cluster BridgedDeviceBasic ReadAttribute ClusterRevision + self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ClusterRevision.restype = ctypes.c_uint32 # Cluster ColorControl # Cluster ColorControl Command MoveColor self._chipLib.chip_ime_AppendCommand_ColorControl_MoveColor.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_int16, ctypes.c_int16, ctypes.c_uint8, ctypes.c_uint8] @@ -2350,6 +2452,10 @@ def InitLib(self, chipLib): # Cluster EthernetNetworkDiagnostics ReadAttribute ClusterRevision self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_ClusterRevision.restype = ctypes.c_uint32 + # Cluster FixedLabel + # Cluster FixedLabel ReadAttribute ClusterRevision + self._chipLib.chip_ime_ReadAttribute_FixedLabel_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_FixedLabel_ClusterRevision.restype = ctypes.c_uint32 # Cluster GeneralCommissioning # Cluster GeneralCommissioning Command ArmFailSafe self._chipLib.chip_ime_AppendCommand_GeneralCommissioning_ArmFailSafe.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint64, ctypes.c_uint32] diff --git a/src/darwin/Framework/CHIP/gen/CHIPClustersObjc.h b/src/darwin/Framework/CHIP/gen/CHIPClustersObjc.h index 56dfe1d99d87c0..1c10e99c8189fa 100644 --- a/src/darwin/Framework/CHIP/gen/CHIPClustersObjc.h +++ b/src/darwin/Framework/CHIP/gen/CHIPClustersObjc.h @@ -172,6 +172,31 @@ NS_ASSUME_NONNULL_BEGIN @end +/** + * Cluster Bridged Device Basic + * + */ +@interface CHIPBridgedDeviceBasic : CHIPCluster + +- (void)readAttributeVendorNameWithResponseHandler:(ResponseHandler)responseHandler; +- (void)readAttributeVendorIDWithResponseHandler:(ResponseHandler)responseHandler; +- (void)readAttributeProductNameWithResponseHandler:(ResponseHandler)responseHandler; +- (void)readAttributeUserLabelWithResponseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeUserLabelWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler; +- (void)readAttributeHardwareVersionWithResponseHandler:(ResponseHandler)responseHandler; +- (void)readAttributeHardwareVersionStringWithResponseHandler:(ResponseHandler)responseHandler; +- (void)readAttributeSoftwareVersionWithResponseHandler:(ResponseHandler)responseHandler; +- (void)readAttributeSoftwareVersionStringWithResponseHandler:(ResponseHandler)responseHandler; +- (void)readAttributeManufacturingDateWithResponseHandler:(ResponseHandler)responseHandler; +- (void)readAttributePartNumberWithResponseHandler:(ResponseHandler)responseHandler; +- (void)readAttributeProductURLWithResponseHandler:(ResponseHandler)responseHandler; +- (void)readAttributeProductLabelWithResponseHandler:(ResponseHandler)responseHandler; +- (void)readAttributeSerialNumberWithResponseHandler:(ResponseHandler)responseHandler; +- (void)readAttributeReachableWithResponseHandler:(ResponseHandler)responseHandler; +- (void)readAttributeClusterRevisionWithResponseHandler:(ResponseHandler)responseHandler; + +@end + /** * Cluster Color Control * @@ -458,6 +483,17 @@ NS_ASSUME_NONNULL_BEGIN @end +/** + * Cluster Fixed Label + * + */ +@interface CHIPFixedLabel : CHIPCluster + +- (void)readAttributeLabelListWithResponseHandler:(ResponseHandler)responseHandler; +- (void)readAttributeClusterRevisionWithResponseHandler:(ResponseHandler)responseHandler; + +@end + /** * Cluster General Commissioning * diff --git a/src/darwin/Framework/CHIP/gen/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/gen/CHIPClustersObjc.mm index 79af237503f62f..97dc5d3a2737b5 100644 --- a/src/darwin/Framework/CHIP/gen/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/gen/CHIPClustersObjc.mm @@ -2875,6 +2875,43 @@ static void CallbackFn(void * context, uint16_t count, chip::EndpointId * entrie dispatch_queue_t mQueue; }; +class CHIPFixedLabelLabelListAttributeCallbackBridge : public Callback::Callback { +public: + CHIPFixedLabelLabelListAttributeCallbackBridge(ResponseHandler handler, dispatch_queue_t queue) + : Callback::Callback(CallbackFn, this) + , mHandler(handler) + , mQueue(queue) + { + } + + ~CHIPFixedLabelLabelListAttributeCallbackBridge() {}; + + static void CallbackFn(void * context, uint16_t count, _LabelStruct * entries) + { + CHIPFixedLabelLabelListAttributeCallbackBridge * callback + = reinterpret_cast(context); + if (callback && callback->mQueue) { + id values[count]; + for (uint16_t i = 0; i < count; i++) { + values[i] = [[NSDictionary alloc] + initWithObjectsAndKeys:[NSData dataWithBytes:entries[i].label.data() length:entries[i].label.size()], @"label", + [NSData dataWithBytes:entries[i].value.data() length:entries[i].value.size()], @"value", nil]; + } + + id array = [NSArray arrayWithObjects:values count:count]; + dispatch_async(callback->mQueue, ^{ + callback->mHandler(nil, @ { @"value" : array }); + callback->Cancel(); + delete callback; + }); + } + } + +private: + ResponseHandler mHandler; + dispatch_queue_t mQueue; +}; + class CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallbackBridge : public Callback::Callback { public: @@ -4093,7 +4130,452 @@ - (void)mfgSpecificPing:(ResponseHandler)responseHandler __block CHIP_ERROR err; dispatch_sync([self chipWorkQueue], ^{ - err = self.cppCluster.MfgSpecificPing(onSuccess->Cancel(), onFailure->Cancel()); + err = self.cppCluster.MfgSpecificPing(onSuccess->Cancel(), onFailure->Cancel()); + }); + + if (err != CHIP_NO_ERROR) { + delete onSuccess; + delete onFailure; + responseHandler([CHIPError errorForCHIPErrorCode:err], nil); + } +} + +- (void)readAttributeInteractionModelVersionWithResponseHandler:(ResponseHandler)responseHandler +{ + CHIPInt16uAttributeCallbackBridge * onSuccess = new CHIPInt16uAttributeCallbackBridge(responseHandler, [self callbackQueue]); + if (!onSuccess) { + responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); + return; + } + + CHIPDefaultFailureCallbackBridge * onFailure = new CHIPDefaultFailureCallbackBridge(responseHandler, [self callbackQueue]); + if (!onFailure) { + delete onSuccess; + responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); + return; + } + + __block CHIP_ERROR err; + dispatch_sync([self chipWorkQueue], ^{ + err = self.cppCluster.ReadAttributeInteractionModelVersion(onSuccess->Cancel(), onFailure->Cancel()); + }); + + if (err != CHIP_NO_ERROR) { + delete onSuccess; + delete onFailure; + responseHandler([CHIPError errorForCHIPErrorCode:err], nil); + } +} + +- (void)readAttributeVendorNameWithResponseHandler:(ResponseHandler)responseHandler +{ + CHIPStringAttributeCallbackBridge * onSuccess + = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], false); + if (!onSuccess) { + responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); + return; + } + + CHIPDefaultFailureCallbackBridge * onFailure = new CHIPDefaultFailureCallbackBridge(responseHandler, [self callbackQueue]); + if (!onFailure) { + delete onSuccess; + responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); + return; + } + + __block CHIP_ERROR err; + dispatch_sync([self chipWorkQueue], ^{ + err = self.cppCluster.ReadAttributeVendorName(onSuccess->Cancel(), onFailure->Cancel()); + }); + + if (err != CHIP_NO_ERROR) { + delete onSuccess; + delete onFailure; + responseHandler([CHIPError errorForCHIPErrorCode:err], nil); + } +} + +- (void)readAttributeVendorIDWithResponseHandler:(ResponseHandler)responseHandler +{ + CHIPInt16uAttributeCallbackBridge * onSuccess = new CHIPInt16uAttributeCallbackBridge(responseHandler, [self callbackQueue]); + if (!onSuccess) { + responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); + return; + } + + CHIPDefaultFailureCallbackBridge * onFailure = new CHIPDefaultFailureCallbackBridge(responseHandler, [self callbackQueue]); + if (!onFailure) { + delete onSuccess; + responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); + return; + } + + __block CHIP_ERROR err; + dispatch_sync([self chipWorkQueue], ^{ + err = self.cppCluster.ReadAttributeVendorID(onSuccess->Cancel(), onFailure->Cancel()); + }); + + if (err != CHIP_NO_ERROR) { + delete onSuccess; + delete onFailure; + responseHandler([CHIPError errorForCHIPErrorCode:err], nil); + } +} + +- (void)readAttributeProductNameWithResponseHandler:(ResponseHandler)responseHandler +{ + CHIPStringAttributeCallbackBridge * onSuccess + = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], false); + if (!onSuccess) { + responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); + return; + } + + CHIPDefaultFailureCallbackBridge * onFailure = new CHIPDefaultFailureCallbackBridge(responseHandler, [self callbackQueue]); + if (!onFailure) { + delete onSuccess; + responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); + return; + } + + __block CHIP_ERROR err; + dispatch_sync([self chipWorkQueue], ^{ + err = self.cppCluster.ReadAttributeProductName(onSuccess->Cancel(), onFailure->Cancel()); + }); + + if (err != CHIP_NO_ERROR) { + delete onSuccess; + delete onFailure; + responseHandler([CHIPError errorForCHIPErrorCode:err], nil); + } +} + +- (void)readAttributeProductIDWithResponseHandler:(ResponseHandler)responseHandler +{ + CHIPInt16uAttributeCallbackBridge * onSuccess = new CHIPInt16uAttributeCallbackBridge(responseHandler, [self callbackQueue]); + if (!onSuccess) { + responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); + return; + } + + CHIPDefaultFailureCallbackBridge * onFailure = new CHIPDefaultFailureCallbackBridge(responseHandler, [self callbackQueue]); + if (!onFailure) { + delete onSuccess; + responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); + return; + } + + __block CHIP_ERROR err; + dispatch_sync([self chipWorkQueue], ^{ + err = self.cppCluster.ReadAttributeProductID(onSuccess->Cancel(), onFailure->Cancel()); + }); + + if (err != CHIP_NO_ERROR) { + delete onSuccess; + delete onFailure; + responseHandler([CHIPError errorForCHIPErrorCode:err], nil); + } +} + +- (void)readAttributeUserLabelWithResponseHandler:(ResponseHandler)responseHandler +{ + CHIPStringAttributeCallbackBridge * onSuccess + = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], false); + if (!onSuccess) { + responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); + return; + } + + CHIPDefaultFailureCallbackBridge * onFailure = new CHIPDefaultFailureCallbackBridge(responseHandler, [self callbackQueue]); + if (!onFailure) { + delete onSuccess; + responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); + return; + } + + __block CHIP_ERROR err; + dispatch_sync([self chipWorkQueue], ^{ + err = self.cppCluster.ReadAttributeUserLabel(onSuccess->Cancel(), onFailure->Cancel()); + }); + + if (err != CHIP_NO_ERROR) { + delete onSuccess; + delete onFailure; + responseHandler([CHIPError errorForCHIPErrorCode:err], nil); + } +} + +- (void)writeAttributeUserLabelWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler +{ + CHIPDefaultSuccessCallbackBridge * onSuccess = new CHIPDefaultSuccessCallbackBridge(responseHandler, [self callbackQueue]); + if (!onSuccess) { + responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); + return; + } + + CHIPDefaultFailureCallbackBridge * onFailure = new CHIPDefaultFailureCallbackBridge(responseHandler, [self callbackQueue]); + if (!onFailure) { + delete onSuccess; + responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); + return; + } + + __block CHIP_ERROR err; + dispatch_sync([self chipWorkQueue], ^{ + NSData * data = [value dataUsingEncoding:NSUTF8StringEncoding]; + err = self.cppCluster.WriteAttributeUserLabel( + onSuccess->Cancel(), onFailure->Cancel(), chip::ByteSpan((const uint8_t *) data.bytes, data.length)); + }); + + if (err != CHIP_NO_ERROR) { + delete onSuccess; + delete onFailure; + responseHandler([CHIPError errorForCHIPErrorCode:err], nil); + } +} + +- (void)readAttributeLocationWithResponseHandler:(ResponseHandler)responseHandler +{ + CHIPStringAttributeCallbackBridge * onSuccess + = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], false); + if (!onSuccess) { + responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); + return; + } + + CHIPDefaultFailureCallbackBridge * onFailure = new CHIPDefaultFailureCallbackBridge(responseHandler, [self callbackQueue]); + if (!onFailure) { + delete onSuccess; + responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); + return; + } + + __block CHIP_ERROR err; + dispatch_sync([self chipWorkQueue], ^{ + err = self.cppCluster.ReadAttributeLocation(onSuccess->Cancel(), onFailure->Cancel()); + }); + + if (err != CHIP_NO_ERROR) { + delete onSuccess; + delete onFailure; + responseHandler([CHIPError errorForCHIPErrorCode:err], nil); + } +} + +- (void)writeAttributeLocationWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler +{ + CHIPDefaultSuccessCallbackBridge * onSuccess = new CHIPDefaultSuccessCallbackBridge(responseHandler, [self callbackQueue]); + if (!onSuccess) { + responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); + return; + } + + CHIPDefaultFailureCallbackBridge * onFailure = new CHIPDefaultFailureCallbackBridge(responseHandler, [self callbackQueue]); + if (!onFailure) { + delete onSuccess; + responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); + return; + } + + __block CHIP_ERROR err; + dispatch_sync([self chipWorkQueue], ^{ + NSData * data = [value dataUsingEncoding:NSUTF8StringEncoding]; + err = self.cppCluster.WriteAttributeLocation( + onSuccess->Cancel(), onFailure->Cancel(), chip::ByteSpan((const uint8_t *) data.bytes, data.length)); + }); + + if (err != CHIP_NO_ERROR) { + delete onSuccess; + delete onFailure; + responseHandler([CHIPError errorForCHIPErrorCode:err], nil); + } +} + +- (void)readAttributeHardwareVersionWithResponseHandler:(ResponseHandler)responseHandler +{ + CHIPInt16uAttributeCallbackBridge * onSuccess = new CHIPInt16uAttributeCallbackBridge(responseHandler, [self callbackQueue]); + if (!onSuccess) { + responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); + return; + } + + CHIPDefaultFailureCallbackBridge * onFailure = new CHIPDefaultFailureCallbackBridge(responseHandler, [self callbackQueue]); + if (!onFailure) { + delete onSuccess; + responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); + return; + } + + __block CHIP_ERROR err; + dispatch_sync([self chipWorkQueue], ^{ + err = self.cppCluster.ReadAttributeHardwareVersion(onSuccess->Cancel(), onFailure->Cancel()); + }); + + if (err != CHIP_NO_ERROR) { + delete onSuccess; + delete onFailure; + responseHandler([CHIPError errorForCHIPErrorCode:err], nil); + } +} + +- (void)readAttributeHardwareVersionStringWithResponseHandler:(ResponseHandler)responseHandler +{ + CHIPStringAttributeCallbackBridge * onSuccess + = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], false); + if (!onSuccess) { + responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); + return; + } + + CHIPDefaultFailureCallbackBridge * onFailure = new CHIPDefaultFailureCallbackBridge(responseHandler, [self callbackQueue]); + if (!onFailure) { + delete onSuccess; + responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); + return; + } + + __block CHIP_ERROR err; + dispatch_sync([self chipWorkQueue], ^{ + err = self.cppCluster.ReadAttributeHardwareVersionString(onSuccess->Cancel(), onFailure->Cancel()); + }); + + if (err != CHIP_NO_ERROR) { + delete onSuccess; + delete onFailure; + responseHandler([CHIPError errorForCHIPErrorCode:err], nil); + } +} + +- (void)readAttributeSoftwareVersionWithResponseHandler:(ResponseHandler)responseHandler +{ + CHIPInt32uAttributeCallbackBridge * onSuccess = new CHIPInt32uAttributeCallbackBridge(responseHandler, [self callbackQueue]); + if (!onSuccess) { + responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); + return; + } + + CHIPDefaultFailureCallbackBridge * onFailure = new CHIPDefaultFailureCallbackBridge(responseHandler, [self callbackQueue]); + if (!onFailure) { + delete onSuccess; + responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); + return; + } + + __block CHIP_ERROR err; + dispatch_sync([self chipWorkQueue], ^{ + err = self.cppCluster.ReadAttributeSoftwareVersion(onSuccess->Cancel(), onFailure->Cancel()); + }); + + if (err != CHIP_NO_ERROR) { + delete onSuccess; + delete onFailure; + responseHandler([CHIPError errorForCHIPErrorCode:err], nil); + } +} + +- (void)readAttributeSoftwareVersionStringWithResponseHandler:(ResponseHandler)responseHandler +{ + CHIPStringAttributeCallbackBridge * onSuccess + = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], false); + if (!onSuccess) { + responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); + return; + } + + CHIPDefaultFailureCallbackBridge * onFailure = new CHIPDefaultFailureCallbackBridge(responseHandler, [self callbackQueue]); + if (!onFailure) { + delete onSuccess; + responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); + return; + } + + __block CHIP_ERROR err; + dispatch_sync([self chipWorkQueue], ^{ + err = self.cppCluster.ReadAttributeSoftwareVersionString(onSuccess->Cancel(), onFailure->Cancel()); + }); + + if (err != CHIP_NO_ERROR) { + delete onSuccess; + delete onFailure; + responseHandler([CHIPError errorForCHIPErrorCode:err], nil); + } +} + +- (void)readAttributeManufacturingDateWithResponseHandler:(ResponseHandler)responseHandler +{ + CHIPStringAttributeCallbackBridge * onSuccess + = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], false); + if (!onSuccess) { + responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); + return; + } + + CHIPDefaultFailureCallbackBridge * onFailure = new CHIPDefaultFailureCallbackBridge(responseHandler, [self callbackQueue]); + if (!onFailure) { + delete onSuccess; + responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); + return; + } + + __block CHIP_ERROR err; + dispatch_sync([self chipWorkQueue], ^{ + err = self.cppCluster.ReadAttributeManufacturingDate(onSuccess->Cancel(), onFailure->Cancel()); + }); + + if (err != CHIP_NO_ERROR) { + delete onSuccess; + delete onFailure; + responseHandler([CHIPError errorForCHIPErrorCode:err], nil); + } +} + +- (void)readAttributePartNumberWithResponseHandler:(ResponseHandler)responseHandler +{ + CHIPStringAttributeCallbackBridge * onSuccess + = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], false); + if (!onSuccess) { + responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); + return; + } + + CHIPDefaultFailureCallbackBridge * onFailure = new CHIPDefaultFailureCallbackBridge(responseHandler, [self callbackQueue]); + if (!onFailure) { + delete onSuccess; + responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); + return; + } + + __block CHIP_ERROR err; + dispatch_sync([self chipWorkQueue], ^{ + err = self.cppCluster.ReadAttributePartNumber(onSuccess->Cancel(), onFailure->Cancel()); + }); + + if (err != CHIP_NO_ERROR) { + delete onSuccess; + delete onFailure; + responseHandler([CHIPError errorForCHIPErrorCode:err], nil); + } +} + +- (void)readAttributeProductURLWithResponseHandler:(ResponseHandler)responseHandler +{ + CHIPStringAttributeCallbackBridge * onSuccess + = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], false); + if (!onSuccess) { + responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); + return; + } + + CHIPDefaultFailureCallbackBridge * onFailure = new CHIPDefaultFailureCallbackBridge(responseHandler, [self callbackQueue]); + if (!onFailure) { + delete onSuccess; + responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); + return; + } + + __block CHIP_ERROR err; + dispatch_sync([self chipWorkQueue], ^{ + err = self.cppCluster.ReadAttributeProductURL(onSuccess->Cancel(), onFailure->Cancel()); }); if (err != CHIP_NO_ERROR) { @@ -4103,9 +4585,10 @@ - (void)mfgSpecificPing:(ResponseHandler)responseHandler } } -- (void)readAttributeInteractionModelVersionWithResponseHandler:(ResponseHandler)responseHandler +- (void)readAttributeProductLabelWithResponseHandler:(ResponseHandler)responseHandler { - CHIPInt16uAttributeCallbackBridge * onSuccess = new CHIPInt16uAttributeCallbackBridge(responseHandler, [self callbackQueue]); + CHIPStringAttributeCallbackBridge * onSuccess + = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], false); if (!onSuccess) { responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); return; @@ -4120,7 +4603,7 @@ - (void)readAttributeInteractionModelVersionWithResponseHandler:(ResponseHandler __block CHIP_ERROR err; dispatch_sync([self chipWorkQueue], ^{ - err = self.cppCluster.ReadAttributeInteractionModelVersion(onSuccess->Cancel(), onFailure->Cancel()); + err = self.cppCluster.ReadAttributeProductLabel(onSuccess->Cancel(), onFailure->Cancel()); }); if (err != CHIP_NO_ERROR) { @@ -4130,7 +4613,7 @@ - (void)readAttributeInteractionModelVersionWithResponseHandler:(ResponseHandler } } -- (void)readAttributeVendorNameWithResponseHandler:(ResponseHandler)responseHandler +- (void)readAttributeSerialNumberWithResponseHandler:(ResponseHandler)responseHandler { CHIPStringAttributeCallbackBridge * onSuccess = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], false); @@ -4148,7 +4631,7 @@ - (void)readAttributeVendorNameWithResponseHandler:(ResponseHandler)responseHand __block CHIP_ERROR err; dispatch_sync([self chipWorkQueue], ^{ - err = self.cppCluster.ReadAttributeVendorName(onSuccess->Cancel(), onFailure->Cancel()); + err = self.cppCluster.ReadAttributeSerialNumber(onSuccess->Cancel(), onFailure->Cancel()); }); if (err != CHIP_NO_ERROR) { @@ -4158,9 +4641,9 @@ - (void)readAttributeVendorNameWithResponseHandler:(ResponseHandler)responseHand } } -- (void)readAttributeVendorIDWithResponseHandler:(ResponseHandler)responseHandler +- (void)readAttributeLocalConfigDisabledWithResponseHandler:(ResponseHandler)responseHandler { - CHIPInt16uAttributeCallbackBridge * onSuccess = new CHIPInt16uAttributeCallbackBridge(responseHandler, [self callbackQueue]); + CHIPBooleanAttributeCallbackBridge * onSuccess = new CHIPBooleanAttributeCallbackBridge(responseHandler, [self callbackQueue]); if (!onSuccess) { responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); return; @@ -4175,7 +4658,7 @@ - (void)readAttributeVendorIDWithResponseHandler:(ResponseHandler)responseHandle __block CHIP_ERROR err; dispatch_sync([self chipWorkQueue], ^{ - err = self.cppCluster.ReadAttributeVendorID(onSuccess->Cancel(), onFailure->Cancel()); + err = self.cppCluster.ReadAttributeLocalConfigDisabled(onSuccess->Cancel(), onFailure->Cancel()); }); if (err != CHIP_NO_ERROR) { @@ -4185,10 +4668,9 @@ - (void)readAttributeVendorIDWithResponseHandler:(ResponseHandler)responseHandle } } -- (void)readAttributeProductNameWithResponseHandler:(ResponseHandler)responseHandler +- (void)writeAttributeLocalConfigDisabledWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler { - CHIPStringAttributeCallbackBridge * onSuccess - = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], false); + CHIPDefaultSuccessCallbackBridge * onSuccess = new CHIPDefaultSuccessCallbackBridge(responseHandler, [self callbackQueue]); if (!onSuccess) { responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); return; @@ -4203,7 +4685,7 @@ - (void)readAttributeProductNameWithResponseHandler:(ResponseHandler)responseHan __block CHIP_ERROR err; dispatch_sync([self chipWorkQueue], ^{ - err = self.cppCluster.ReadAttributeProductName(onSuccess->Cancel(), onFailure->Cancel()); + err = self.cppCluster.WriteAttributeLocalConfigDisabled(onSuccess->Cancel(), onFailure->Cancel(), value); }); if (err != CHIP_NO_ERROR) { @@ -4213,7 +4695,7 @@ - (void)readAttributeProductNameWithResponseHandler:(ResponseHandler)responseHan } } -- (void)readAttributeProductIDWithResponseHandler:(ResponseHandler)responseHandler +- (void)readAttributeClusterRevisionWithResponseHandler:(ResponseHandler)responseHandler { CHIPInt16uAttributeCallbackBridge * onSuccess = new CHIPInt16uAttributeCallbackBridge(responseHandler, [self callbackQueue]); if (!onSuccess) { @@ -4230,7 +4712,7 @@ - (void)readAttributeProductIDWithResponseHandler:(ResponseHandler)responseHandl __block CHIP_ERROR err; dispatch_sync([self chipWorkQueue], ^{ - err = self.cppCluster.ReadAttributeProductID(onSuccess->Cancel(), onFailure->Cancel()); + err = self.cppCluster.ReadAttributeClusterRevision(onSuccess->Cancel(), onFailure->Cancel()); }); if (err != CHIP_NO_ERROR) { @@ -4240,10 +4722,26 @@ - (void)readAttributeProductIDWithResponseHandler:(ResponseHandler)responseHandl } } -- (void)readAttributeUserLabelWithResponseHandler:(ResponseHandler)responseHandler +@end + +@interface CHIPBinding () +@property (readonly) Controller::BindingCluster cppCluster; +@end + +@implementation CHIPBinding + +- (Controller::ClusterBase *)getCluster { - CHIPStringAttributeCallbackBridge * onSuccess - = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], false); + return &_cppCluster; +} + +- (void)bind:(uint64_t)nodeId + groupId:(uint16_t)groupId + endpointId:(uint8_t)endpointId + clusterId:(uint16_t)clusterId + responseHandler:(ResponseHandler)responseHandler +{ + CHIPDefaultSuccessCallbackBridge * onSuccess = new CHIPDefaultSuccessCallbackBridge(responseHandler, [self callbackQueue]); if (!onSuccess) { responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); return; @@ -4258,7 +4756,7 @@ - (void)readAttributeUserLabelWithResponseHandler:(ResponseHandler)responseHandl __block CHIP_ERROR err; dispatch_sync([self chipWorkQueue], ^{ - err = self.cppCluster.ReadAttributeUserLabel(onSuccess->Cancel(), onFailure->Cancel()); + err = self.cppCluster.Bind(onSuccess->Cancel(), onFailure->Cancel(), nodeId, groupId, endpointId, clusterId); }); if (err != CHIP_NO_ERROR) { @@ -4267,8 +4765,11 @@ - (void)readAttributeUserLabelWithResponseHandler:(ResponseHandler)responseHandl responseHandler([CHIPError errorForCHIPErrorCode:err], nil); } } - -- (void)writeAttributeUserLabelWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler +- (void)unbind:(uint64_t)nodeId + groupId:(uint16_t)groupId + endpointId:(uint8_t)endpointId + clusterId:(uint16_t)clusterId + responseHandler:(ResponseHandler)responseHandler { CHIPDefaultSuccessCallbackBridge * onSuccess = new CHIPDefaultSuccessCallbackBridge(responseHandler, [self callbackQueue]); if (!onSuccess) { @@ -4285,9 +4786,7 @@ - (void)writeAttributeUserLabelWithValue:(NSString *)value responseHandler:(Resp __block CHIP_ERROR err; dispatch_sync([self chipWorkQueue], ^{ - NSData * data = [value dataUsingEncoding:NSUTF8StringEncoding]; - err = self.cppCluster.WriteAttributeUserLabel( - onSuccess->Cancel(), onFailure->Cancel(), chip::ByteSpan((const uint8_t *) data.bytes, data.length)); + err = self.cppCluster.Unbind(onSuccess->Cancel(), onFailure->Cancel(), nodeId, groupId, endpointId, clusterId); }); if (err != CHIP_NO_ERROR) { @@ -4297,10 +4796,9 @@ - (void)writeAttributeUserLabelWithValue:(NSString *)value responseHandler:(Resp } } -- (void)readAttributeLocationWithResponseHandler:(ResponseHandler)responseHandler +- (void)readAttributeClusterRevisionWithResponseHandler:(ResponseHandler)responseHandler { - CHIPStringAttributeCallbackBridge * onSuccess - = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], false); + CHIPInt16uAttributeCallbackBridge * onSuccess = new CHIPInt16uAttributeCallbackBridge(responseHandler, [self callbackQueue]); if (!onSuccess) { responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); return; @@ -4315,7 +4813,7 @@ - (void)readAttributeLocationWithResponseHandler:(ResponseHandler)responseHandle __block CHIP_ERROR err; dispatch_sync([self chipWorkQueue], ^{ - err = self.cppCluster.ReadAttributeLocation(onSuccess->Cancel(), onFailure->Cancel()); + err = self.cppCluster.ReadAttributeClusterRevision(onSuccess->Cancel(), onFailure->Cancel()); }); if (err != CHIP_NO_ERROR) { @@ -4325,9 +4823,23 @@ - (void)readAttributeLocationWithResponseHandler:(ResponseHandler)responseHandle } } -- (void)writeAttributeLocationWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler +@end + +@interface CHIPBridgedDeviceBasic () +@property (readonly) Controller::BridgedDeviceBasicCluster cppCluster; +@end + +@implementation CHIPBridgedDeviceBasic + +- (Controller::ClusterBase *)getCluster { - CHIPDefaultSuccessCallbackBridge * onSuccess = new CHIPDefaultSuccessCallbackBridge(responseHandler, [self callbackQueue]); + return &_cppCluster; +} + +- (void)readAttributeVendorNameWithResponseHandler:(ResponseHandler)responseHandler +{ + CHIPStringAttributeCallbackBridge * onSuccess + = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], false); if (!onSuccess) { responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); return; @@ -4342,9 +4854,7 @@ - (void)writeAttributeLocationWithValue:(NSString *)value responseHandler:(Respo __block CHIP_ERROR err; dispatch_sync([self chipWorkQueue], ^{ - NSData * data = [value dataUsingEncoding:NSUTF8StringEncoding]; - err = self.cppCluster.WriteAttributeLocation( - onSuccess->Cancel(), onFailure->Cancel(), chip::ByteSpan((const uint8_t *) data.bytes, data.length)); + err = self.cppCluster.ReadAttributeVendorName(onSuccess->Cancel(), onFailure->Cancel()); }); if (err != CHIP_NO_ERROR) { @@ -4354,7 +4864,7 @@ - (void)writeAttributeLocationWithValue:(NSString *)value responseHandler:(Respo } } -- (void)readAttributeHardwareVersionWithResponseHandler:(ResponseHandler)responseHandler +- (void)readAttributeVendorIDWithResponseHandler:(ResponseHandler)responseHandler { CHIPInt16uAttributeCallbackBridge * onSuccess = new CHIPInt16uAttributeCallbackBridge(responseHandler, [self callbackQueue]); if (!onSuccess) { @@ -4371,7 +4881,7 @@ - (void)readAttributeHardwareVersionWithResponseHandler:(ResponseHandler)respons __block CHIP_ERROR err; dispatch_sync([self chipWorkQueue], ^{ - err = self.cppCluster.ReadAttributeHardwareVersion(onSuccess->Cancel(), onFailure->Cancel()); + err = self.cppCluster.ReadAttributeVendorID(onSuccess->Cancel(), onFailure->Cancel()); }); if (err != CHIP_NO_ERROR) { @@ -4381,7 +4891,7 @@ - (void)readAttributeHardwareVersionWithResponseHandler:(ResponseHandler)respons } } -- (void)readAttributeHardwareVersionStringWithResponseHandler:(ResponseHandler)responseHandler +- (void)readAttributeProductNameWithResponseHandler:(ResponseHandler)responseHandler { CHIPStringAttributeCallbackBridge * onSuccess = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], false); @@ -4399,7 +4909,7 @@ - (void)readAttributeHardwareVersionStringWithResponseHandler:(ResponseHandler)r __block CHIP_ERROR err; dispatch_sync([self chipWorkQueue], ^{ - err = self.cppCluster.ReadAttributeHardwareVersionString(onSuccess->Cancel(), onFailure->Cancel()); + err = self.cppCluster.ReadAttributeProductName(onSuccess->Cancel(), onFailure->Cancel()); }); if (err != CHIP_NO_ERROR) { @@ -4409,9 +4919,10 @@ - (void)readAttributeHardwareVersionStringWithResponseHandler:(ResponseHandler)r } } -- (void)readAttributeSoftwareVersionWithResponseHandler:(ResponseHandler)responseHandler +- (void)readAttributeUserLabelWithResponseHandler:(ResponseHandler)responseHandler { - CHIPInt32uAttributeCallbackBridge * onSuccess = new CHIPInt32uAttributeCallbackBridge(responseHandler, [self callbackQueue]); + CHIPStringAttributeCallbackBridge * onSuccess + = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], false); if (!onSuccess) { responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); return; @@ -4426,7 +4937,7 @@ - (void)readAttributeSoftwareVersionWithResponseHandler:(ResponseHandler)respons __block CHIP_ERROR err; dispatch_sync([self chipWorkQueue], ^{ - err = self.cppCluster.ReadAttributeSoftwareVersion(onSuccess->Cancel(), onFailure->Cancel()); + err = self.cppCluster.ReadAttributeUserLabel(onSuccess->Cancel(), onFailure->Cancel()); }); if (err != CHIP_NO_ERROR) { @@ -4436,10 +4947,9 @@ - (void)readAttributeSoftwareVersionWithResponseHandler:(ResponseHandler)respons } } -- (void)readAttributeSoftwareVersionStringWithResponseHandler:(ResponseHandler)responseHandler +- (void)writeAttributeUserLabelWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler { - CHIPStringAttributeCallbackBridge * onSuccess - = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], false); + CHIPDefaultSuccessCallbackBridge * onSuccess = new CHIPDefaultSuccessCallbackBridge(responseHandler, [self callbackQueue]); if (!onSuccess) { responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); return; @@ -4454,7 +4964,9 @@ - (void)readAttributeSoftwareVersionStringWithResponseHandler:(ResponseHandler)r __block CHIP_ERROR err; dispatch_sync([self chipWorkQueue], ^{ - err = self.cppCluster.ReadAttributeSoftwareVersionString(onSuccess->Cancel(), onFailure->Cancel()); + NSData * data = [value dataUsingEncoding:NSUTF8StringEncoding]; + err = self.cppCluster.WriteAttributeUserLabel( + onSuccess->Cancel(), onFailure->Cancel(), chip::ByteSpan((const uint8_t *) data.bytes, data.length)); }); if (err != CHIP_NO_ERROR) { @@ -4464,10 +4976,9 @@ - (void)readAttributeSoftwareVersionStringWithResponseHandler:(ResponseHandler)r } } -- (void)readAttributeManufacturingDateWithResponseHandler:(ResponseHandler)responseHandler +- (void)readAttributeHardwareVersionWithResponseHandler:(ResponseHandler)responseHandler { - CHIPStringAttributeCallbackBridge * onSuccess - = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], false); + CHIPInt16uAttributeCallbackBridge * onSuccess = new CHIPInt16uAttributeCallbackBridge(responseHandler, [self callbackQueue]); if (!onSuccess) { responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); return; @@ -4482,7 +4993,7 @@ - (void)readAttributeManufacturingDateWithResponseHandler:(ResponseHandler)respo __block CHIP_ERROR err; dispatch_sync([self chipWorkQueue], ^{ - err = self.cppCluster.ReadAttributeManufacturingDate(onSuccess->Cancel(), onFailure->Cancel()); + err = self.cppCluster.ReadAttributeHardwareVersion(onSuccess->Cancel(), onFailure->Cancel()); }); if (err != CHIP_NO_ERROR) { @@ -4492,7 +5003,7 @@ - (void)readAttributeManufacturingDateWithResponseHandler:(ResponseHandler)respo } } -- (void)readAttributePartNumberWithResponseHandler:(ResponseHandler)responseHandler +- (void)readAttributeHardwareVersionStringWithResponseHandler:(ResponseHandler)responseHandler { CHIPStringAttributeCallbackBridge * onSuccess = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], false); @@ -4510,7 +5021,7 @@ - (void)readAttributePartNumberWithResponseHandler:(ResponseHandler)responseHand __block CHIP_ERROR err; dispatch_sync([self chipWorkQueue], ^{ - err = self.cppCluster.ReadAttributePartNumber(onSuccess->Cancel(), onFailure->Cancel()); + err = self.cppCluster.ReadAttributeHardwareVersionString(onSuccess->Cancel(), onFailure->Cancel()); }); if (err != CHIP_NO_ERROR) { @@ -4520,10 +5031,9 @@ - (void)readAttributePartNumberWithResponseHandler:(ResponseHandler)responseHand } } -- (void)readAttributeProductURLWithResponseHandler:(ResponseHandler)responseHandler +- (void)readAttributeSoftwareVersionWithResponseHandler:(ResponseHandler)responseHandler { - CHIPStringAttributeCallbackBridge * onSuccess - = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], false); + CHIPInt32uAttributeCallbackBridge * onSuccess = new CHIPInt32uAttributeCallbackBridge(responseHandler, [self callbackQueue]); if (!onSuccess) { responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); return; @@ -4538,7 +5048,7 @@ - (void)readAttributeProductURLWithResponseHandler:(ResponseHandler)responseHand __block CHIP_ERROR err; dispatch_sync([self chipWorkQueue], ^{ - err = self.cppCluster.ReadAttributeProductURL(onSuccess->Cancel(), onFailure->Cancel()); + err = self.cppCluster.ReadAttributeSoftwareVersion(onSuccess->Cancel(), onFailure->Cancel()); }); if (err != CHIP_NO_ERROR) { @@ -4548,7 +5058,7 @@ - (void)readAttributeProductURLWithResponseHandler:(ResponseHandler)responseHand } } -- (void)readAttributeProductLabelWithResponseHandler:(ResponseHandler)responseHandler +- (void)readAttributeSoftwareVersionStringWithResponseHandler:(ResponseHandler)responseHandler { CHIPStringAttributeCallbackBridge * onSuccess = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], false); @@ -4566,7 +5076,7 @@ - (void)readAttributeProductLabelWithResponseHandler:(ResponseHandler)responseHa __block CHIP_ERROR err; dispatch_sync([self chipWorkQueue], ^{ - err = self.cppCluster.ReadAttributeProductLabel(onSuccess->Cancel(), onFailure->Cancel()); + err = self.cppCluster.ReadAttributeSoftwareVersionString(onSuccess->Cancel(), onFailure->Cancel()); }); if (err != CHIP_NO_ERROR) { @@ -4576,7 +5086,7 @@ - (void)readAttributeProductLabelWithResponseHandler:(ResponseHandler)responseHa } } -- (void)readAttributeSerialNumberWithResponseHandler:(ResponseHandler)responseHandler +- (void)readAttributeManufacturingDateWithResponseHandler:(ResponseHandler)responseHandler { CHIPStringAttributeCallbackBridge * onSuccess = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], false); @@ -4594,7 +5104,7 @@ - (void)readAttributeSerialNumberWithResponseHandler:(ResponseHandler)responseHa __block CHIP_ERROR err; dispatch_sync([self chipWorkQueue], ^{ - err = self.cppCluster.ReadAttributeSerialNumber(onSuccess->Cancel(), onFailure->Cancel()); + err = self.cppCluster.ReadAttributeManufacturingDate(onSuccess->Cancel(), onFailure->Cancel()); }); if (err != CHIP_NO_ERROR) { @@ -4604,9 +5114,10 @@ - (void)readAttributeSerialNumberWithResponseHandler:(ResponseHandler)responseHa } } -- (void)readAttributeLocalConfigDisabledWithResponseHandler:(ResponseHandler)responseHandler +- (void)readAttributePartNumberWithResponseHandler:(ResponseHandler)responseHandler { - CHIPBooleanAttributeCallbackBridge * onSuccess = new CHIPBooleanAttributeCallbackBridge(responseHandler, [self callbackQueue]); + CHIPStringAttributeCallbackBridge * onSuccess + = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], false); if (!onSuccess) { responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); return; @@ -4621,7 +5132,7 @@ - (void)readAttributeLocalConfigDisabledWithResponseHandler:(ResponseHandler)res __block CHIP_ERROR err; dispatch_sync([self chipWorkQueue], ^{ - err = self.cppCluster.ReadAttributeLocalConfigDisabled(onSuccess->Cancel(), onFailure->Cancel()); + err = self.cppCluster.ReadAttributePartNumber(onSuccess->Cancel(), onFailure->Cancel()); }); if (err != CHIP_NO_ERROR) { @@ -4631,9 +5142,10 @@ - (void)readAttributeLocalConfigDisabledWithResponseHandler:(ResponseHandler)res } } -- (void)writeAttributeLocalConfigDisabledWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +- (void)readAttributeProductURLWithResponseHandler:(ResponseHandler)responseHandler { - CHIPDefaultSuccessCallbackBridge * onSuccess = new CHIPDefaultSuccessCallbackBridge(responseHandler, [self callbackQueue]); + CHIPStringAttributeCallbackBridge * onSuccess + = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], false); if (!onSuccess) { responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); return; @@ -4648,7 +5160,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(uint8_t)value responseHandle __block CHIP_ERROR err; dispatch_sync([self chipWorkQueue], ^{ - err = self.cppCluster.WriteAttributeLocalConfigDisabled(onSuccess->Cancel(), onFailure->Cancel(), value); + err = self.cppCluster.ReadAttributeProductURL(onSuccess->Cancel(), onFailure->Cancel()); }); if (err != CHIP_NO_ERROR) { @@ -4658,9 +5170,10 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(uint8_t)value responseHandle } } -- (void)readAttributeClusterRevisionWithResponseHandler:(ResponseHandler)responseHandler +- (void)readAttributeProductLabelWithResponseHandler:(ResponseHandler)responseHandler { - CHIPInt16uAttributeCallbackBridge * onSuccess = new CHIPInt16uAttributeCallbackBridge(responseHandler, [self callbackQueue]); + CHIPStringAttributeCallbackBridge * onSuccess + = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], false); if (!onSuccess) { responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); return; @@ -4675,7 +5188,7 @@ - (void)readAttributeClusterRevisionWithResponseHandler:(ResponseHandler)respons __block CHIP_ERROR err; dispatch_sync([self chipWorkQueue], ^{ - err = self.cppCluster.ReadAttributeClusterRevision(onSuccess->Cancel(), onFailure->Cancel()); + err = self.cppCluster.ReadAttributeProductLabel(onSuccess->Cancel(), onFailure->Cancel()); }); if (err != CHIP_NO_ERROR) { @@ -4685,26 +5198,10 @@ - (void)readAttributeClusterRevisionWithResponseHandler:(ResponseHandler)respons } } -@end - -@interface CHIPBinding () -@property (readonly) Controller::BindingCluster cppCluster; -@end - -@implementation CHIPBinding - -- (Controller::ClusterBase *)getCluster -{ - return &_cppCluster; -} - -- (void)bind:(uint64_t)nodeId - groupId:(uint16_t)groupId - endpointId:(uint8_t)endpointId - clusterId:(uint16_t)clusterId - responseHandler:(ResponseHandler)responseHandler +- (void)readAttributeSerialNumberWithResponseHandler:(ResponseHandler)responseHandler { - CHIPDefaultSuccessCallbackBridge * onSuccess = new CHIPDefaultSuccessCallbackBridge(responseHandler, [self callbackQueue]); + CHIPStringAttributeCallbackBridge * onSuccess + = new CHIPStringAttributeCallbackBridge(responseHandler, [self callbackQueue], false); if (!onSuccess) { responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); return; @@ -4719,7 +5216,7 @@ - (void)bind:(uint64_t)nodeId __block CHIP_ERROR err; dispatch_sync([self chipWorkQueue], ^{ - err = self.cppCluster.Bind(onSuccess->Cancel(), onFailure->Cancel(), nodeId, groupId, endpointId, clusterId); + err = self.cppCluster.ReadAttributeSerialNumber(onSuccess->Cancel(), onFailure->Cancel()); }); if (err != CHIP_NO_ERROR) { @@ -4728,13 +5225,10 @@ - (void)bind:(uint64_t)nodeId responseHandler([CHIPError errorForCHIPErrorCode:err], nil); } } -- (void)unbind:(uint64_t)nodeId - groupId:(uint16_t)groupId - endpointId:(uint8_t)endpointId - clusterId:(uint16_t)clusterId - responseHandler:(ResponseHandler)responseHandler + +- (void)readAttributeReachableWithResponseHandler:(ResponseHandler)responseHandler { - CHIPDefaultSuccessCallbackBridge * onSuccess = new CHIPDefaultSuccessCallbackBridge(responseHandler, [self callbackQueue]); + CHIPBooleanAttributeCallbackBridge * onSuccess = new CHIPBooleanAttributeCallbackBridge(responseHandler, [self callbackQueue]); if (!onSuccess) { responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); return; @@ -4749,7 +5243,7 @@ - (void)unbind:(uint64_t)nodeId __block CHIP_ERROR err; dispatch_sync([self chipWorkQueue], ^{ - err = self.cppCluster.Unbind(onSuccess->Cancel(), onFailure->Cancel(), nodeId, groupId, endpointId, clusterId); + err = self.cppCluster.ReadAttributeReachable(onSuccess->Cancel(), onFailure->Cancel()); }); if (err != CHIP_NO_ERROR) { @@ -8557,6 +9051,74 @@ - (void)readAttributeClusterRevisionWithResponseHandler:(ResponseHandler)respons @end +@interface CHIPFixedLabel () +@property (readonly) Controller::FixedLabelCluster cppCluster; +@end + +@implementation CHIPFixedLabel + +- (Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)readAttributeLabelListWithResponseHandler:(ResponseHandler)responseHandler +{ + CHIPFixedLabelLabelListAttributeCallbackBridge * onSuccess + = new CHIPFixedLabelLabelListAttributeCallbackBridge(responseHandler, [self callbackQueue]); + if (!onSuccess) { + responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); + return; + } + + CHIPDefaultFailureCallbackBridge * onFailure = new CHIPDefaultFailureCallbackBridge(responseHandler, [self callbackQueue]); + if (!onFailure) { + delete onSuccess; + responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); + return; + } + + __block CHIP_ERROR err; + dispatch_sync([self chipWorkQueue], ^{ + err = self.cppCluster.ReadAttributeLabelList(onSuccess->Cancel(), onFailure->Cancel()); + }); + + if (err != CHIP_NO_ERROR) { + delete onSuccess; + delete onFailure; + responseHandler([CHIPError errorForCHIPErrorCode:err], nil); + } +} + +- (void)readAttributeClusterRevisionWithResponseHandler:(ResponseHandler)responseHandler +{ + CHIPInt16uAttributeCallbackBridge * onSuccess = new CHIPInt16uAttributeCallbackBridge(responseHandler, [self callbackQueue]); + if (!onSuccess) { + responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); + return; + } + + CHIPDefaultFailureCallbackBridge * onFailure = new CHIPDefaultFailureCallbackBridge(responseHandler, [self callbackQueue]); + if (!onFailure) { + delete onSuccess; + responseHandler([CHIPError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); + return; + } + + __block CHIP_ERROR err; + dispatch_sync([self chipWorkQueue], ^{ + err = self.cppCluster.ReadAttributeClusterRevision(onSuccess->Cancel(), onFailure->Cancel()); + }); + + if (err != CHIP_NO_ERROR) { + delete onSuccess; + delete onFailure; + responseHandler([CHIPError errorForCHIPErrorCode:err], nil); + } +} + +@end + @interface CHIPGeneralCommissioning () @property (readonly) Controller::GeneralCommissioningCluster cppCluster; @end diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index 1ff9bf573a1c05..f57237022d264b 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -921,6 +921,310 @@ - (void)testSendClusterBindingReadAttributeClusterRevisionWithResponseHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterBridgedDeviceBasicReadAttributeVendorNameWithResponseHandler +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeVendorNameWithResponseHandler"]; + + CHIPDevice * device = GetPairedDevice(kDeviceId); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeVendorNameWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BridgedDeviceBasic VendorName Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterBridgedDeviceBasicReadAttributeVendorIDWithResponseHandler +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeVendorIDWithResponseHandler"]; + + CHIPDevice * device = GetPairedDevice(kDeviceId); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeVendorIDWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BridgedDeviceBasic VendorID Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterBridgedDeviceBasicReadAttributeProductNameWithResponseHandler +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeProductNameWithResponseHandler"]; + + CHIPDevice * device = GetPairedDevice(kDeviceId); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeProductNameWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BridgedDeviceBasic ProductName Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterBridgedDeviceBasicReadAttributeUserLabelWithResponseHandler +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeUserLabelWithResponseHandler"]; + + CHIPDevice * device = GetPairedDevice(kDeviceId); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeUserLabelWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BridgedDeviceBasic UserLabel Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterBridgedDeviceBasicWriteAttributeUserLabelWithValue +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"BridgedDeviceBasicWriteAttributeUserLabelWithValue"]; + + CHIPDevice * device = GetPairedDevice(kDeviceId); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + NSString * value = @"Test"; + [cluster writeAttributeUserLabelWithValue:value + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BridgedDeviceBasic UserLabel Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterBridgedDeviceBasicReadAttributeHardwareVersionWithResponseHandler +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeHardwareVersionWithResponseHandler"]; + + CHIPDevice * device = GetPairedDevice(kDeviceId); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeHardwareVersionWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BridgedDeviceBasic HardwareVersion Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterBridgedDeviceBasicReadAttributeHardwareVersionStringWithResponseHandler +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeHardwareVersionStringWithResponseHandler"]; + + CHIPDevice * device = GetPairedDevice(kDeviceId); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeHardwareVersionStringWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BridgedDeviceBasic HardwareVersionString Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterBridgedDeviceBasicReadAttributeSoftwareVersionWithResponseHandler +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeSoftwareVersionWithResponseHandler"]; + + CHIPDevice * device = GetPairedDevice(kDeviceId); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeSoftwareVersionWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BridgedDeviceBasic SoftwareVersion Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterBridgedDeviceBasicReadAttributeSoftwareVersionStringWithResponseHandler +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeSoftwareVersionStringWithResponseHandler"]; + + CHIPDevice * device = GetPairedDevice(kDeviceId); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeSoftwareVersionStringWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BridgedDeviceBasic SoftwareVersionString Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterBridgedDeviceBasicReadAttributeManufacturingDateWithResponseHandler +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeManufacturingDateWithResponseHandler"]; + + CHIPDevice * device = GetPairedDevice(kDeviceId); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeManufacturingDateWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BridgedDeviceBasic ManufacturingDate Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterBridgedDeviceBasicReadAttributePartNumberWithResponseHandler +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"BridgedDeviceBasicReadAttributePartNumberWithResponseHandler"]; + + CHIPDevice * device = GetPairedDevice(kDeviceId); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributePartNumberWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BridgedDeviceBasic PartNumber Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterBridgedDeviceBasicReadAttributeProductURLWithResponseHandler +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeProductURLWithResponseHandler"]; + + CHIPDevice * device = GetPairedDevice(kDeviceId); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeProductURLWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BridgedDeviceBasic ProductURL Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterBridgedDeviceBasicReadAttributeProductLabelWithResponseHandler +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeProductLabelWithResponseHandler"]; + + CHIPDevice * device = GetPairedDevice(kDeviceId); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeProductLabelWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BridgedDeviceBasic ProductLabel Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterBridgedDeviceBasicReadAttributeSerialNumberWithResponseHandler +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeSerialNumberWithResponseHandler"]; + + CHIPDevice * device = GetPairedDevice(kDeviceId); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeSerialNumberWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BridgedDeviceBasic SerialNumber Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterBridgedDeviceBasicReadAttributeReachableWithResponseHandler +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeReachableWithResponseHandler"]; + + CHIPDevice * device = GetPairedDevice(kDeviceId); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeReachableWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BridgedDeviceBasic Reachable Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterBridgedDeviceBasicReadAttributeClusterRevisionWithResponseHandler +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeClusterRevisionWithResponseHandler"]; + + CHIPDevice * device = GetPairedDevice(kDeviceId); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BridgedDeviceBasic ClusterRevision Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterColorControlReadAttributeCurrentHueWithResponseHandler { XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributeCurrentHueWithResponseHandler"]; @@ -2460,6 +2764,43 @@ - (void)testSendClusterEthernetNetworkDiagnosticsReadAttributeClusterRevisionWit [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterFixedLabelReadAttributeLabelListWithResponseHandler +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"FixedLabelReadAttributeLabelListWithResponseHandler"]; + + CHIPDevice * device = GetPairedDevice(kDeviceId); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPFixedLabel * cluster = [[CHIPFixedLabel alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeLabelListWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"FixedLabel LabelList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterFixedLabelReadAttributeClusterRevisionWithResponseHandler +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"FixedLabelReadAttributeClusterRevisionWithResponseHandler"]; + + CHIPDevice * device = GetPairedDevice(kDeviceId); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPFixedLabel * cluster = [[CHIPFixedLabel alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"FixedLabel ClusterRevision Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterGeneralCommissioningReadAttributeFabricIdWithResponseHandler { XCTestExpectation * expectation =