examples: Add Descriptor cluster for Secondary Network Commissoning Endpoint (#27493)
diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter
index 33a2955..015cde4 100644
--- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter
+++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter
@@ -7053,6 +7053,15 @@
endpoint 65534 {
device type anonymousEndpointType = 61442, version 1;
+ server cluster Descriptor {
+ callback attribute deviceTypeList;
+ callback attribute serverList;
+ callback attribute clientList;
+ callback attribute partsList;
+ ram attribute featureMap default = 0;
+ callback attribute clusterRevision default = 1;
+ }
+
server cluster NetworkCommissioning {
callback attribute maxNetworks;
callback attribute networks;
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 494ab74..0f19686 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
@@ -31748,6 +31748,138 @@
"deviceTypeProfileId": 259,
"clusters": [
{
+ "name": "Descriptor",
+ "code": 29,
+ "mfgCode": null,
+ "define": "DESCRIPTOR_CLUSTER",
+ "side": "client",
+ "enabled": 0,
+ "attributes": [
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "client",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Descriptor",
+ "code": 29,
+ "mfgCode": null,
+ "define": "DESCRIPTOR_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "attributes": [
+ {
+ "name": "DeviceTypeList",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ServerList",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClientList",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "PartsList",
+ "code": 3,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
"name": "Network Commissioning",
"code": 49,
"mfgCode": null,
diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter
index ae887a2..1e5a0b4 100644
--- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter
+++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter
@@ -4625,6 +4625,15 @@
endpoint 65534 {
device type anonymousEndpointType = 61442, version 1;
+ server cluster Descriptor {
+ callback attribute deviceTypeList;
+ callback attribute serverList;
+ callback attribute clientList;
+ callback attribute partsList;
+ ram attribute featureMap default = 0;
+ callback attribute clusterRevision default = 1;
+ }
+
server cluster NetworkCommissioning {
callback attribute maxNetworks;
callback attribute networks;
diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap
index 2a1eb98..b1dc9e0 100644
--- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap
+++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap
@@ -24625,6 +24625,138 @@
"deviceTypeProfileId": 259,
"clusters": [
{
+ "name": "Descriptor",
+ "code": 29,
+ "mfgCode": null,
+ "define": "DESCRIPTOR_CLUSTER",
+ "side": "client",
+ "enabled": 0,
+ "attributes": [
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "client",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Descriptor",
+ "code": 29,
+ "mfgCode": null,
+ "define": "DESCRIPTOR_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "attributes": [
+ {
+ "name": "DeviceTypeList",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ServerList",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClientList",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "PartsList",
+ "code": 3,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
"name": "Network Commissioning",
"code": 49,
"mfgCode": null,
diff --git a/scripts/py_matter_idl/matter_idl/tests/inputs/large_all_clusters_app.matter b/scripts/py_matter_idl/matter_idl/tests/inputs/large_all_clusters_app.matter
index def4f76..cc0c601 100644
--- a/scripts/py_matter_idl/matter_idl/tests/inputs/large_all_clusters_app.matter
+++ b/scripts/py_matter_idl/matter_idl/tests/inputs/large_all_clusters_app.matter
@@ -4841,6 +4841,15 @@
endpoint 65534 {
device type anonymousEndpointType = 61442, version 1;
+ server cluster Descriptor {
+ callback attribute deviceTypeList;
+ callback attribute serverList;
+ callback attribute clientList;
+ callback attribute partsList;
+ ram attribute featureMap;
+ callback attribute clusterRevision default = 1;
+ }
+
server cluster NetworkCommissioning {
callback attribute maxNetworks;
callback attribute networks;
diff --git a/scripts/tools/zap/tests/inputs/all-clusters-app.zap b/scripts/tools/zap/tests/inputs/all-clusters-app.zap
index 8796229..eb0821a 100644
--- a/scripts/tools/zap/tests/inputs/all-clusters-app.zap
+++ b/scripts/tools/zap/tests/inputs/all-clusters-app.zap
@@ -24544,6 +24544,138 @@
"deviceTypeProfileId": 259,
"clusters": [
{
+ "name": "Descriptor",
+ "code": 29,
+ "mfgCode": null,
+ "define": "DESCRIPTOR_CLUSTER",
+ "side": "client",
+ "enabled": 0,
+ "attributes": [
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "client",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Descriptor",
+ "code": 29,
+ "mfgCode": null,
+ "define": "DESCRIPTOR_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "attributes": [
+ {
+ "name": "DeviceTypeList",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ServerList",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClientList",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "PartsList",
+ "code": 3,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
"name": "Network Commissioning",
"code": 49,
"mfgCode": null,
diff --git a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h
index ccdcdf1..bb9cc76 100644
--- a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h
+++ b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h
@@ -354,7 +354,7 @@
}
// This is an array of EmberAfAttributeMetadata structures.
-#define GENERATED_ATTRIBUTE_COUNT 718
+#define GENERATED_ATTRIBUTE_COUNT 724
#define GENERATED_ATTRIBUTES \
{ \
\
@@ -1449,6 +1449,14 @@
{ ZAP_SIMPLE_DEFAULT(0), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \
{ ZAP_SIMPLE_DEFAULT(3), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \
\
+ /* Endpoint: 65534, Cluster: Descriptor (server) */ \
+ { ZAP_EMPTY_DEFAULT(), 0x00000000, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* DeviceTypeList */ \
+ { ZAP_EMPTY_DEFAULT(), 0x00000001, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ServerList */ \
+ { ZAP_EMPTY_DEFAULT(), 0x00000002, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ClientList */ \
+ { ZAP_EMPTY_DEFAULT(), 0x00000003, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* PartsList */ \
+ { ZAP_SIMPLE_DEFAULT(0), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \
+ { ZAP_EMPTY_DEFAULT(), 0x0000FFFD, 2, ZAP_TYPE(INT16U), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ClusterRevision */ \
+ \
/* Endpoint: 65534, Cluster: Network Commissioning (server) */ \
{ ZAP_EMPTY_DEFAULT(), 0x00000000, 1, ZAP_TYPE(INT8U), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* MaxNetworks */ \
{ ZAP_EMPTY_DEFAULT(), 0x00000001, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* Networks */ \
@@ -1921,7 +1929,7 @@
// clang-format on
// This is an array of EmberAfCluster structures.
-#define GENERATED_CLUSTER_COUNT 78
+#define GENERATED_CLUSTER_COUNT 79
// clang-format off
#define GENERATED_CLUSTERS { \
{ \
@@ -2926,9 +2934,22 @@
.eventCount = 0, \
},\
{ \
+ /* Endpoint: 65534, Cluster: Descriptor (server) */ \
+ .clusterId = 0x0000001D, \
+ .attributes = ZAP_ATTRIBUTE_INDEX(708), \
+ .attributeCount = 6, \
+ .clusterSize = 4, \
+ .mask = ZAP_CLUSTER_MASK(SERVER), \
+ .functions = NULL, \
+ .acceptedCommandList = nullptr, \
+ .generatedCommandList = nullptr, \
+ .eventList = nullptr, \
+ .eventCount = 0, \
+ },\
+ { \
/* Endpoint: 65534, Cluster: Network Commissioning (server) */ \
.clusterId = 0x00000031, \
- .attributes = ZAP_ATTRIBUTE_INDEX(708), \
+ .attributes = ZAP_ATTRIBUTE_INDEX(714), \
.attributeCount = 10, \
.clusterSize = 0, \
.mask = ZAP_CLUSTER_MASK(SERVER), \
@@ -2942,13 +2963,13 @@
// clang-format on
-#define ZAP_FIXED_ENDPOINT_DATA_VERSION_COUNT 77
+#define ZAP_FIXED_ENDPOINT_DATA_VERSION_COUNT 78
// This is an array of EmberAfEndpointType structures.
#define GENERATED_ENDPOINT_TYPES \
{ \
{ ZAP_CLUSTER_INDEX(0), 28, 361 }, { ZAP_CLUSTER_INDEX(28), 44, 3490 }, { ZAP_CLUSTER_INDEX(72), 5, 105 }, \
- { ZAP_CLUSTER_INDEX(77), 1, 0 }, \
+ { ZAP_CLUSTER_INDEX(77), 2, 4 }, \
}
// Largest attribute size is needed for various buffers
@@ -2960,7 +2981,7 @@
#define ATTRIBUTE_SINGLETONS_SIZE (37)
// Total size of attribute storage
-#define ATTRIBUTE_MAX_SIZE (3956)
+#define ATTRIBUTE_MAX_SIZE (3960)
// Number of fixed endpoints
#define FIXED_ENDPOINT_COUNT (4)
diff --git a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/gen_config.h b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/gen_config.h
index 4209f7b..33877c7 100644
--- a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/gen_config.h
+++ b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/gen_config.h
@@ -28,7 +28,7 @@
#define EMBER_AF_ON_OFF_SWITCH_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1)
#define EMBER_AF_LEVEL_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1)
#define EMBER_AF_BINARY_INPUT_BASIC_CLUSTER_SERVER_ENDPOINT_COUNT (1)
-#define EMBER_AF_DESCRIPTOR_CLUSTER_SERVER_ENDPOINT_COUNT (3)
+#define EMBER_AF_DESCRIPTOR_CLUSTER_SERVER_ENDPOINT_COUNT (4)
#define EMBER_AF_BINDING_CLUSTER_SERVER_ENDPOINT_COUNT (2)
#define EMBER_AF_ACCESS_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1)
#define EMBER_AF_ACTIONS_CLUSTER_SERVER_ENDPOINT_COUNT (1)