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 b736c96d6fbf64..0b0662b149ccf9 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 @@ -1043,17 +1043,6 @@ server cluster UnitLocalization = 45 { readonly attribute int16u clusterRevision = 65533; } -/** This cluster is used to describe the configuration and capabilities of a Device's power system. */ -server cluster PowerSourceConfiguration = 46 { - readonly attribute INT8U sources[] = 0; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ server cluster PowerSource = 47 { enum BatApprovedChemistryEnum : ENUM16 { @@ -1277,6 +1266,7 @@ server cluster PowerSource = 47 { readonly attribute BatChargeLevelEnum batChargeLevel = 14; readonly attribute boolean batReplacementNeeded = 15; readonly attribute BatReplaceabilityEnum batReplaceability = 16; + readonly attribute endpoint_no endpointList[] = 31; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5819,12 +5809,6 @@ endpoint 0 { ram attribute clusterRevision default = 1; } - server cluster PowerSourceConfiguration { - callback attribute sources; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster PowerSource { ram attribute status default = 0; ram attribute order default = 3; @@ -5832,8 +5816,9 @@ endpoint 0 { ram attribute batChargeLevel default = 0; ram attribute batReplacementNeeded; ram attribute batReplaceability; + callback attribute endpointList; ram attribute featureMap default = 2; - ram attribute clusterRevision default = 1; + ram attribute clusterRevision default = 2; } server cluster GeneralCommissioning { @@ -6200,8 +6185,9 @@ endpoint 1 { ram attribute batChargeLevel default = 0; ram attribute batReplacementNeeded; ram attribute batReplaceability; + callback attribute endpointList; ram attribute featureMap default = 2; - ram attribute clusterRevision default = 1; + ram attribute clusterRevision default = 2; } server cluster Switch { @@ -7063,8 +7049,9 @@ endpoint 2 { ram attribute batChargeLevel default = 0; ram attribute batReplacementNeeded; ram attribute batReplaceability; + callback attribute endpointList; ram attribute featureMap default = 2; - ram attribute clusterRevision default = 1; + ram attribute clusterRevision default = 2; } server cluster OccupancySensing { 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 cdf2aad9cb23a8..f3629559472674 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 @@ -2198,7 +2198,7 @@ "mfgCode": null, "define": "POWER_SOURCE_CONFIGURATION_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "Sources", @@ -2762,6 +2762,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "EndpointList", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -2836,7 +2852,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -12341,6 +12357,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "EndpointList", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -12415,7 +12447,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -29321,6 +29353,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "EndpointList", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -29395,7 +29443,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, 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 fd0cb148bdfdfa..2d5f4c10118ed9 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 @@ -901,17 +901,6 @@ server cluster UnitLocalization = 45 { readonly attribute int16u clusterRevision = 65533; } -/** This cluster is used to describe the configuration and capabilities of a Device's power system. */ -server cluster PowerSourceConfiguration = 46 { - readonly attribute INT8U sources[] = 0; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ server cluster PowerSource = 47 { enum BatApprovedChemistryEnum : ENUM16 { @@ -1132,6 +1121,7 @@ server cluster PowerSource = 47 { readonly attribute PowerSourceStatusEnum status = 0; readonly attribute int8u order = 1; readonly attribute char_string<60> description = 2; + readonly attribute endpoint_no endpointList[] = 31; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4051,18 +4041,13 @@ endpoint 0 { ram attribute clusterRevision default = 1; } - server cluster PowerSourceConfiguration { - callback attribute sources; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster PowerSource { ram attribute status default = 0; ram attribute order default = 3; ram attribute description default = "B1"; + callback attribute endpointList; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; + ram attribute clusterRevision default = 2; } server cluster GeneralCommissioning { @@ -4272,8 +4257,9 @@ endpoint 1 { ram attribute status default = 0; ram attribute order default = 2; ram attribute description default = "B2"; + callback attribute endpointList; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; + ram attribute clusterRevision default = 2; } server cluster Switch { @@ -4647,8 +4633,9 @@ endpoint 2 { ram attribute status default = 0; ram attribute order default = 1; ram attribute description default = "B3"; + callback attribute endpointList; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; + ram attribute clusterRevision default = 2; } server cluster OccupancySensing { 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 187c83d552f27a..a878ee8613a494 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 @@ -2161,7 +2161,7 @@ "mfgCode": null, "define": "POWER_SOURCE_CONFIGURATION_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "Sources", @@ -2725,6 +2725,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "EndpointList", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -2799,7 +2815,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -11367,6 +11383,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "EndpointList", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -11441,7 +11473,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -23098,6 +23130,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "EndpointList", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -23172,7 +23220,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/darwin-framework-tool/templates/tests/ciTests.json b/examples/darwin-framework-tool/templates/tests/ciTests.json index 980f8818805ea5..8048ff14301049 100644 --- a/examples/darwin-framework-tool/templates/tests/ciTests.json +++ b/examples/darwin-framework-tool/templates/tests/ciTests.json @@ -122,6 +122,10 @@ "Disabled due to Events verification not supported", "Test_TC_BINFO_2_2", "Test_TC_ACL_2_5", - "Test_TC_ACL_2_6" + "Test_TC_ACL_2_6", + "Disabled because the power source configuration cluster is now deprecated and not present in all-clusters", + "Test_TC_PSCFG_1_1", + "Test_TC_PSCFG_2_1", + "Test_TC_PSCFG_2_2" ] } diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter index de8055dd495f05..7492eb6d3017b2 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter @@ -865,17 +865,6 @@ server cluster TimeFormatLocalization = 44 { readonly attribute int16u clusterRevision = 65533; } -/** This cluster is used to describe the configuration and capabilities of a Device's power system. */ -server cluster PowerSourceConfiguration = 46 { - readonly attribute INT8U sources[] = 0; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ server cluster PowerSource = 47 { enum BatApprovedChemistryEnum : ENUM16 { @@ -1104,6 +1093,7 @@ server cluster PowerSource = 47 { readonly attribute int32u wiredMaximumCurrent = 8; readonly attribute boolean wiredPresent = 9; readonly attribute WiredFaultEnum activeWiredFaults[] = 10; + readonly attribute endpoint_no endpointList[] = 31; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2302,16 +2292,6 @@ endpoint 0 { ram attribute clusterRevision default = 1; } - server cluster PowerSourceConfiguration { - callback attribute sources; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute eventList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster GeneralCommissioning { ram attribute breadcrumb default = 0x0000000000000000; callback attribute basicCommissioningInfo; @@ -2571,12 +2551,13 @@ endpoint 1 { ram attribute wiredMaximumCurrent default = 1000; ram attribute wiredPresent default = 1; callback attribute activeWiredFaults; + callback attribute endpointList; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; + ram attribute clusterRevision default = 2; } server cluster ColorControl { diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap index 545671963b34a1..d29ae36af304de 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap @@ -2090,7 +2090,7 @@ "mfgCode": null, "define": "POWER_SOURCE_CONFIGURATION_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "Sources", @@ -7753,6 +7753,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "EndpointList", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -7843,7 +7859,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter index 0c1c4ef15309db..2294885328b132 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter @@ -844,17 +844,6 @@ server cluster TimeFormatLocalization = 44 { readonly attribute int16u clusterRevision = 65533; } -/** This cluster is used to describe the configuration and capabilities of a Device's power system. */ -server cluster PowerSourceConfiguration = 46 { - readonly attribute INT8U sources[] = 0; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ server cluster PowerSource = 47 { enum BatApprovedChemistryEnum : ENUM16 { @@ -1082,6 +1071,7 @@ server cluster PowerSource = 47 { readonly attribute int32u wiredNominalVoltage = 7; readonly attribute int32u wiredMaximumCurrent = 8; readonly attribute boolean wiredPresent = 9; + readonly attribute endpoint_no endpointList[] = 31; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2144,16 +2134,6 @@ endpoint 0 { ram attribute clusterRevision default = 1; } - server cluster PowerSourceConfiguration { - callback attribute sources; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute eventList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster GeneralCommissioning { ram attribute breadcrumb default = 0x0000000000000000; callback attribute basicCommissioningInfo; @@ -2347,12 +2327,13 @@ endpoint 1 { ram attribute wiredNominalVoltage default = 5000; ram attribute wiredMaximumCurrent default = 1000; ram attribute wiredPresent default = 1; + callback attribute endpointList; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; + ram attribute clusterRevision default = 2; } server cluster ColorControl { diff --git a/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap b/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap index ae67282f0662aa..82c4b264bcc764 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap @@ -2116,7 +2116,7 @@ "mfgCode": null, "define": "POWER_SOURCE_CONFIGURATION_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "Sources", @@ -7847,6 +7847,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "EndpointList", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -7937,7 +7953,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index e7a9741b157322..12ccf99737cca3 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -503,17 +503,6 @@ server cluster TimeFormatLocalization = 44 { readonly attribute int16u clusterRevision = 65533; } -/** This cluster is used to describe the configuration and capabilities of a Device's power system. */ -server cluster PowerSourceConfiguration = 46 { - readonly attribute INT8U sources[] = 0; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ server cluster PowerSource = 47 { enum BatApprovedChemistryEnum : ENUM16 { @@ -739,6 +728,7 @@ server cluster PowerSource = 47 { readonly attribute boolean batReplacementNeeded = 15; readonly attribute BatReplaceabilityEnum batReplaceability = 16; readonly attribute char_string<60> batReplacementDescription = 19; + readonly attribute endpoint_no endpointList[] = 31; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2332,20 +2322,15 @@ endpoint 0 { ram attribute clusterRevision default = 1; } - server cluster PowerSourceConfiguration { - callback attribute sources; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster PowerSource { emits event WiredFaultChange; ram attribute status default = 1; ram attribute order default = 0; ram attribute description default = "USB"; ram attribute wiredAssessedCurrent; + callback attribute endpointList; ram attribute featureMap default = 1; - ram attribute clusterRevision default = 1; + ram attribute clusterRevision default = 2; } server cluster GeneralCommissioning { @@ -2583,8 +2568,9 @@ endpoint 1 { ram attribute batReplacementNeeded; ram attribute batReplaceability; ram attribute batReplacementDescription; + callback attribute endpointList; ram attribute featureMap default = 0x0A; - ram attribute clusterRevision default = 1; + ram attribute clusterRevision default = 2; } server cluster DoorLock { diff --git a/examples/lock-app/lock-common/lock-app.zap b/examples/lock-app/lock-common/lock-app.zap index 8d76ddfd54cdf7..12eaaaa40f4a66 100644 --- a/examples/lock-app/lock-common/lock-app.zap +++ b/examples/lock-app/lock-common/lock-app.zap @@ -1876,7 +1876,7 @@ "mfgCode": null, "define": "POWER_SOURCE_CONFIGURATION_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "Sources", @@ -2008,6 +2008,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "EndpointList", + "code": 31, + "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, @@ -2034,7 +2050,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -6838,6 +6854,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "EndpointList", + "code": 31, + "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, @@ -6864,7 +6896,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -7927,5 +7959,6 @@ "endpointVersion": 1, "deviceIdentifier": 10 } - ] -} + ], + "log": [] +} \ No newline at end of file diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 78d957a4f92368..fbc2d4fc5bf331 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -1056,17 +1056,6 @@ server cluster UnitLocalization = 45 { readonly attribute int16u clusterRevision = 65533; } -/** This cluster is used to describe the configuration and capabilities of a Device's power system. */ -server cluster PowerSourceConfiguration = 46 { - readonly attribute INT8U sources[] = 0; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ server cluster PowerSource = 47 { enum BatApprovedChemistryEnum : ENUM16 { @@ -1315,6 +1304,7 @@ server cluster PowerSource = 47 { readonly attribute boolean batFunctionalWhileCharging = 28; readonly attribute nullable int32u batChargingCurrent = 29; readonly attribute BatChargeFaultEnum activeBatChargeFaults[] = 30; + readonly attribute endpoint_no endpointList[] = 31; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -6530,12 +6520,6 @@ endpoint 0 { ram attribute clusterRevision default = 1; } - server cluster PowerSourceConfiguration { - callback attribute sources; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster PowerSource { ram attribute status; ram attribute order; @@ -6568,8 +6552,9 @@ endpoint 0 { ram attribute batFunctionalWhileCharging; ram attribute batChargingCurrent; callback attribute activeBatChargeFaults; + callback attribute endpointList; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; + ram attribute clusterRevision default = 2; } server cluster GeneralCommissioning { diff --git a/examples/placeholder/linux/apps/app1/config.zap b/examples/placeholder/linux/apps/app1/config.zap index c1de43b678fbd7..6b478ee3bb461c 100644 --- a/examples/placeholder/linux/apps/app1/config.zap +++ b/examples/placeholder/linux/apps/app1/config.zap @@ -1119,7 +1119,7 @@ "mfgCode": null, "define": "POWER_SOURCE_CONFIGURATION_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "Sources", @@ -1701,6 +1701,22 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "EndpointList", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -1727,7 +1743,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -5549,7 +5565,7 @@ "outgoing": 1 }, { - "name": "SetHolidayDaySchedule", + "name": "SetHolidaySchedule", "code": 17, "mfgCode": null, "source": "client", @@ -5557,7 +5573,7 @@ "outgoing": 1 }, { - "name": "GetHolidayDaySchedule", + "name": "GetHolidaySchedule", "code": 18, "mfgCode": null, "source": "client", @@ -5565,7 +5581,7 @@ "outgoing": 1 }, { - "name": "CleartHolidayDaySchedule", + "name": "ClearHolidaySchedule", "code": 19, "mfgCode": null, "source": "client", @@ -5588,14 +5604,6 @@ "incoming": 0, "outgoing": 1 }, - { - "name": "ClearUser", - "code": 28, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, { "name": "SetCredential", "code": 34, @@ -5672,14 +5680,6 @@ "incoming": 1, "outgoing": 0 }, - { - "name": "GetUserResponse", - "code": 27, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, { "name": "SetCredentialResponse", "code": 35, @@ -14570,5 +14570,6 @@ "endpointVersion": 1, "deviceIdentifier": 257 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 6c65ecebe21f14..d993525d57d388 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -1015,17 +1015,6 @@ server cluster UnitLocalization = 45 { readonly attribute int16u clusterRevision = 65533; } -/** This cluster is used to describe the configuration and capabilities of a Device's power system. */ -server cluster PowerSourceConfiguration = 46 { - readonly attribute INT8U sources[] = 0; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ server cluster PowerSource = 47 { enum BatApprovedChemistryEnum : ENUM16 { @@ -1274,6 +1263,7 @@ server cluster PowerSource = 47 { readonly attribute boolean batFunctionalWhileCharging = 28; readonly attribute nullable int32u batChargingCurrent = 29; readonly attribute BatChargeFaultEnum activeBatChargeFaults[] = 30; + readonly attribute endpoint_no endpointList[] = 31; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -6502,12 +6492,6 @@ endpoint 0 { ram attribute clusterRevision default = 1; } - server cluster PowerSourceConfiguration { - callback attribute sources; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster PowerSource { ram attribute status; ram attribute order; @@ -6540,8 +6524,9 @@ endpoint 0 { ram attribute batFunctionalWhileCharging; ram attribute batChargingCurrent; callback attribute activeBatChargeFaults; + callback attribute endpointList; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; + ram attribute clusterRevision default = 2; } server cluster GeneralCommissioning { diff --git a/examples/placeholder/linux/apps/app2/config.zap b/examples/placeholder/linux/apps/app2/config.zap index beebe9f319fade..060de8d5a9ae17 100644 --- a/examples/placeholder/linux/apps/app2/config.zap +++ b/examples/placeholder/linux/apps/app2/config.zap @@ -1319,7 +1319,7 @@ "mfgCode": null, "define": "POWER_SOURCE_CONFIGURATION_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "Sources", @@ -1901,6 +1901,22 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "EndpointList", + "code": 31, + "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, @@ -1927,7 +1943,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -5833,7 +5849,7 @@ "outgoing": 1 }, { - "name": "SetHolidayDaySchedule", + "name": "SetHolidaySchedule", "code": 17, "mfgCode": null, "source": "client", @@ -5841,7 +5857,7 @@ "outgoing": 1 }, { - "name": "GetHolidayDaySchedule", + "name": "GetHolidaySchedule", "code": 18, "mfgCode": null, "source": "client", @@ -5849,7 +5865,7 @@ "outgoing": 1 }, { - "name": "CleartHolidayDaySchedule", + "name": "ClearHolidaySchedule", "code": 19, "mfgCode": null, "source": "client", @@ -5872,14 +5888,6 @@ "incoming": 0, "outgoing": 1 }, - { - "name": "ClearUser", - "code": 28, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, { "name": "SetCredential", "code": 34, @@ -5956,14 +5964,6 @@ "incoming": 1, "outgoing": 0 }, - { - "name": "GetUserResponse", - "code": 27, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, { "name": "SetCredentialResponse", "code": 35, @@ -14596,5 +14596,6 @@ "endpointVersion": 1, "deviceIdentifier": 257 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter index e31b69a6e76c86..25da4e63c69535 100644 --- a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter +++ b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter @@ -752,6 +752,7 @@ server cluster PowerSource = 47 { readonly attribute BatChargeLevelEnum batChargeLevel = 14; readonly attribute boolean batReplacementNeeded = 15; readonly attribute BatReplaceabilityEnum batReplaceability = 16; + readonly attribute endpoint_no endpointList[] = 31; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2204,8 +2205,9 @@ endpoint 1 { ram attribute batChargeLevel default = 0; ram attribute batReplacementNeeded; ram attribute batReplaceability; + callback attribute endpointList; ram attribute featureMap default = 2; - ram attribute clusterRevision default = 1; + ram attribute clusterRevision default = 2; } server cluster SmokeCoAlarm { diff --git a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap index 7aa73cd2a2c6d2..938cb271bacc04 100644 --- a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap +++ b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap @@ -6542,6 +6542,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "EndpointList", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -6632,7 +6648,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index 6626d1a08580dc..afbea2f746a193 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -895,6 +895,7 @@ server cluster PowerSource = 47 { readonly attribute BatChargeLevelEnum batChargeLevel = 14; readonly attribute BatFaultEnum activeBatFaults[] = 18; readonly attribute BatChargeStateEnum batChargeState = 26; + readonly attribute endpoint_no endpointList[] = 31; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2034,8 +2035,9 @@ endpoint 0 { ram attribute batChargeLevel; callback attribute activeBatFaults; ram attribute batChargeState; + callback attribute endpointList; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; + ram attribute clusterRevision default = 2; } server cluster GeneralCommissioning { diff --git a/examples/window-app/common/window-app.zap b/examples/window-app/common/window-app.zap index 54f85ea113cbc5..ca5e685bad2d7e 100644 --- a/examples/window-app/common/window-app.zap +++ b/examples/window-app/common/window-app.zap @@ -2592,6 +2592,22 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "EndpointList", + "code": 31, + "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, @@ -2618,7 +2634,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -9345,5 +9361,6 @@ "endpointVersion": 2, "deviceIdentifier": 514 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/scripts/tests/chiptest/__init__.py b/scripts/tests/chiptest/__init__.py index f5092ff965ec93..e88d246ed74339 100644 --- a/scripts/tests/chiptest/__init__.py +++ b/scripts/tests/chiptest/__init__.py @@ -138,8 +138,11 @@ def _GetInDevelopmentTests() -> Set[str]: "TestAttributesById.yaml", # chip-repl does not support AnyCommands (06/06/2023) "TestCommandsById.yaml", # chip-repl does not support AnyCommands (06/06/2023) "TestEventsById.yaml", # chip-repl does not support AnyCommands (06/06/2023) - "Test_TC_DRLK_2_8.yaml", # Test fails only in chip-repl: Refer--> https://github.com/project-chip/connectedhomeip/pull/27011#issuecomment-1593339855 - "Test_TC_ACE_1_6.yaml", # Test fails only in chip-repl: Refer--> https://github.com/project-chip/connectedhomeip/pull/27910#issuecomment-1632485584 + "Test_TC_DRLK_2_8.yaml", # Test fails only in chip-repl: Refer--> https://github.com/project-chip/connectedhomeip/pull/27011#issuecomment-1593339855 + "Test_TC_ACE_1_6.yaml", # Test fails only in chip-repl: Refer--> https://github.com/project-chip/connectedhomeip/pull/27910#issuecomment-1632485584 + "Test_TC_PSCFG_1_1.yaml", # Power source configuration cluster is deprecated and removed from all-clusters + "Test_TC_PSCFG_2_1.yaml", # Power source configuration cluster is deprecated and removed from all-clusters + "Test_TC_PSCFG_2_2.yaml", # Power source configuration cluster is deprecated and removed from all-clusters } diff --git a/scripts/tools/zap/tests/inputs/all-clusters-app.zap b/scripts/tools/zap/tests/inputs/all-clusters-app.zap index f60def9897093c..df044418b41a33 100644 --- a/scripts/tools/zap/tests/inputs/all-clusters-app.zap +++ b/scripts/tools/zap/tests/inputs/all-clusters-app.zap @@ -2182,7 +2182,7 @@ "mfgCode": null, "define": "POWER_SOURCE_CONFIGURATION_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "Sources", @@ -2746,6 +2746,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "EndpointList", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -2820,7 +2836,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -11552,6 +11568,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "EndpointList", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -11626,7 +11658,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -22763,6 +22795,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "EndpointList", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -22837,7 +22885,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, 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 8f45ebd47ee361..d8f15d8089e0ea 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 @@ -471,11 +471,6 @@ { ZAP_MIN_MAX_DEFAULTS_INDEX(1), 0x00000000, 1, ZAP_TYPE(ENUM8), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* TemperatureUnit */ \ { ZAP_SIMPLE_DEFAULT(0x1), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ - { ZAP_SIMPLE_DEFAULT(1), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ - \ - /* Endpoint: 0, Cluster: Power Source Configuration (server) */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000000, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* Sources */ \ - { ZAP_SIMPLE_DEFAULT(0), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ { ZAP_SIMPLE_DEFAULT(1), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Power Source (server) */ \ @@ -485,8 +480,9 @@ { ZAP_SIMPLE_DEFAULT(0), 0x0000000E, 1, ZAP_TYPE(ENUM8), 0 }, /* BatChargeLevel */ \ { ZAP_EMPTY_DEFAULT(), 0x0000000F, 1, ZAP_TYPE(BOOLEAN), 0 }, /* BatReplacementNeeded */ \ { ZAP_EMPTY_DEFAULT(), 0x00000010, 1, ZAP_TYPE(ENUM8), 0 }, /* BatReplaceability */ \ - { ZAP_SIMPLE_DEFAULT(2), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ - { ZAP_SIMPLE_DEFAULT(1), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000001F, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* EndpointList */ \ + { ZAP_SIMPLE_DEFAULT(2), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ + { ZAP_SIMPLE_DEFAULT(2), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { ZAP_LONG_DEFAULTS_INDEX(9), 0x00000000, 8, ZAP_TYPE(INT64U), ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* Breadcrumb */ \ @@ -848,8 +844,9 @@ { ZAP_SIMPLE_DEFAULT(0), 0x0000000E, 1, ZAP_TYPE(ENUM8), 0 }, /* BatChargeLevel */ \ { ZAP_EMPTY_DEFAULT(), 0x0000000F, 1, ZAP_TYPE(BOOLEAN), 0 }, /* BatReplacementNeeded */ \ { ZAP_EMPTY_DEFAULT(), 0x00000010, 1, ZAP_TYPE(ENUM8), 0 }, /* BatReplaceability */ \ - { ZAP_SIMPLE_DEFAULT(2), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ - { ZAP_SIMPLE_DEFAULT(1), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000001F, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* EndpointList */ \ + { ZAP_SIMPLE_DEFAULT(2), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ + { ZAP_SIMPLE_DEFAULT(2), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Switch (server) */ \ { ZAP_SIMPLE_DEFAULT(2), 0x00000000, 1, ZAP_TYPE(INT8U), 0 }, /* NumberOfPositions */ \ @@ -1439,8 +1436,9 @@ { ZAP_SIMPLE_DEFAULT(0), 0x0000000E, 1, ZAP_TYPE(ENUM8), 0 }, /* BatChargeLevel */ \ { ZAP_EMPTY_DEFAULT(), 0x0000000F, 1, ZAP_TYPE(BOOLEAN), 0 }, /* BatReplacementNeeded */ \ { ZAP_EMPTY_DEFAULT(), 0x00000010, 1, ZAP_TYPE(ENUM8), 0 }, /* BatReplaceability */ \ - { ZAP_SIMPLE_DEFAULT(2), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ - { ZAP_SIMPLE_DEFAULT(1), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000001F, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* EndpointList */ \ + { ZAP_SIMPLE_DEFAULT(2), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ + { ZAP_SIMPLE_DEFAULT(2), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Occupancy Sensing (server) */ \ { ZAP_EMPTY_DEFAULT(), 0x00000000, 1, ZAP_TYPE(BITMAP8), 0 }, /* Occupancy */ \ @@ -1929,7 +1927,7 @@ // clang-format on // This is an array of EmberAfCluster structures. -#define GENERATED_CLUSTER_COUNT 79 +#define GENERATED_CLUSTER_COUNT 78 // clang-format off #define GENERATED_CLUSTERS { \ { \ @@ -2075,24 +2073,11 @@ .eventList = nullptr, \ .eventCount = 0, \ },\ - { \ - /* Endpoint: 0, Cluster: Power Source Configuration (server) */ \ - .clusterId = 0x0000002E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(63), \ - .attributeCount = 3, \ - .clusterSize = 6, \ - .mask = ZAP_CLUSTER_MASK(SERVER), \ - .functions = NULL, \ - .acceptedCommandList = nullptr, \ - .generatedCommandList = nullptr, \ - .eventList = nullptr, \ - .eventCount = 0, \ - },\ { \ /* Endpoint: 0, Cluster: Power Source (server) */ \ .clusterId = 0x0000002F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(66), \ - .attributeCount = 8, \ + .attributes = ZAP_ATTRIBUTE_INDEX(63), \ + .attributeCount = 9, \ .clusterSize = 72, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ @@ -2104,7 +2089,7 @@ { \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ .clusterId = 0x00000030, \ - .attributes = ZAP_ATTRIBUTE_INDEX(74), \ + .attributes = ZAP_ATTRIBUTE_INDEX(72), \ .attributeCount = 7, \ .clusterSize = 14, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2117,7 +2102,7 @@ { \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ .clusterId = 0x00000031, \ - .attributes = ZAP_ATTRIBUTE_INDEX(81), \ + .attributes = ZAP_ATTRIBUTE_INDEX(79), \ .attributeCount = 10, \ .clusterSize = 48, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2130,7 +2115,7 @@ { \ /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ .clusterId = 0x00000032, \ - .attributes = ZAP_ATTRIBUTE_INDEX(91), \ + .attributes = ZAP_ATTRIBUTE_INDEX(89), \ .attributeCount = 2, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2143,7 +2128,7 @@ { \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ .clusterId = 0x00000033, \ - .attributes = ZAP_ATTRIBUTE_INDEX(93), \ + .attributes = ZAP_ATTRIBUTE_INDEX(91), \ .attributeCount = 11, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2156,7 +2141,7 @@ { \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ .clusterId = 0x00000034, \ - .attributes = ZAP_ATTRIBUTE_INDEX(104), \ + .attributes = ZAP_ATTRIBUTE_INDEX(102), \ .attributeCount = 6, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2169,7 +2154,7 @@ { \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ .clusterId = 0x00000035, \ - .attributes = ZAP_ATTRIBUTE_INDEX(110), \ + .attributes = ZAP_ATTRIBUTE_INDEX(108), \ .attributeCount = 65, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2182,7 +2167,7 @@ { \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ .clusterId = 0x00000036, \ - .attributes = ZAP_ATTRIBUTE_INDEX(175), \ + .attributes = ZAP_ATTRIBUTE_INDEX(173), \ .attributeCount = 15, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2195,7 +2180,7 @@ { \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ .clusterId = 0x00000037, \ - .attributes = ZAP_ATTRIBUTE_INDEX(190), \ + .attributes = ZAP_ATTRIBUTE_INDEX(188), \ .attributeCount = 11, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2208,7 +2193,7 @@ { \ /* Endpoint: 0, Cluster: Administrator Commissioning (server) */ \ .clusterId = 0x0000003C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(201), \ + .attributes = ZAP_ATTRIBUTE_INDEX(199), \ .attributeCount = 5, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2221,7 +2206,7 @@ { \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ .clusterId = 0x0000003E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(206), \ + .attributes = ZAP_ATTRIBUTE_INDEX(204), \ .attributeCount = 8, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2234,7 +2219,7 @@ { \ /* Endpoint: 0, Cluster: Group Key Management (server) */ \ .clusterId = 0x0000003F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(214), \ + .attributes = ZAP_ATTRIBUTE_INDEX(212), \ .attributeCount = 6, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2247,7 +2232,7 @@ { \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ .clusterId = 0x00000040, \ - .attributes = ZAP_ATTRIBUTE_INDEX(220), \ + .attributes = ZAP_ATTRIBUTE_INDEX(218), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2260,7 +2245,7 @@ { \ /* Endpoint: 0, Cluster: User Label (server) */ \ .clusterId = 0x00000041, \ - .attributes = ZAP_ATTRIBUTE_INDEX(223), \ + .attributes = ZAP_ATTRIBUTE_INDEX(221), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2273,7 +2258,7 @@ { \ /* Endpoint: 0, Cluster: Relative Humidity Measurement (server) */ \ .clusterId = 0x00000405, \ - .attributes = ZAP_ATTRIBUTE_INDEX(226), \ + .attributes = ZAP_ATTRIBUTE_INDEX(224), \ .attributeCount = 5, \ .clusterSize = 12, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2286,7 +2271,7 @@ { \ /* Endpoint: 0, Cluster: Fault Injection (server) */ \ .clusterId = 0xFFF1FC06, \ - .attributes = ZAP_ATTRIBUTE_INDEX(231), \ + .attributes = ZAP_ATTRIBUTE_INDEX(229), \ .attributeCount = 2, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2299,7 +2284,7 @@ { \ /* Endpoint: 1, Cluster: Identify (server) */ \ .clusterId = 0x00000003, \ - .attributes = ZAP_ATTRIBUTE_INDEX(233), \ + .attributes = ZAP_ATTRIBUTE_INDEX(231), \ .attributeCount = 4, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ @@ -2312,7 +2297,7 @@ { \ /* Endpoint: 1, Cluster: Groups (server) */ \ .clusterId = 0x00000004, \ - .attributes = ZAP_ATTRIBUTE_INDEX(237), \ + .attributes = ZAP_ATTRIBUTE_INDEX(235), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -2325,7 +2310,7 @@ { \ /* Endpoint: 1, Cluster: Scenes (server) */ \ .clusterId = 0x00000005, \ - .attributes = ZAP_ATTRIBUTE_INDEX(240), \ + .attributes = ZAP_ATTRIBUTE_INDEX(238), \ .attributeCount = 7, \ .clusterSize = 11, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2338,7 +2323,7 @@ { \ /* Endpoint: 1, Cluster: On/Off (server) */ \ .clusterId = 0x00000006, \ - .attributes = ZAP_ATTRIBUTE_INDEX(247), \ + .attributes = ZAP_ATTRIBUTE_INDEX(245), \ .attributeCount = 7, \ .clusterSize = 13, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \ @@ -2351,7 +2336,7 @@ { \ /* Endpoint: 1, Cluster: On/off Switch Configuration (server) */ \ .clusterId = 0x00000007, \ - .attributes = ZAP_ATTRIBUTE_INDEX(254), \ + .attributes = ZAP_ATTRIBUTE_INDEX(252), \ .attributeCount = 4, \ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2364,7 +2349,7 @@ { \ /* Endpoint: 1, Cluster: Level Control (server) */ \ .clusterId = 0x00000008, \ - .attributes = ZAP_ATTRIBUTE_INDEX(258), \ + .attributes = ZAP_ATTRIBUTE_INDEX(256), \ .attributeCount = 16, \ .clusterSize = 27, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \ @@ -2377,7 +2362,7 @@ { \ /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ .clusterId = 0x0000000F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(274), \ + .attributes = ZAP_ATTRIBUTE_INDEX(272), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2390,7 +2375,7 @@ { \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(279), \ + .attributes = ZAP_ATTRIBUTE_INDEX(277), \ .attributeCount = 6, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2403,7 +2388,7 @@ { \ /* Endpoint: 1, Cluster: Binding (server) */ \ .clusterId = 0x0000001E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(285), \ + .attributes = ZAP_ATTRIBUTE_INDEX(283), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2416,7 +2401,7 @@ { \ /* Endpoint: 1, Cluster: Actions (server) */ \ .clusterId = 0x00000025, \ - .attributes = ZAP_ATTRIBUTE_INDEX(288), \ + .attributes = ZAP_ATTRIBUTE_INDEX(286), \ .attributeCount = 5, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2429,8 +2414,8 @@ { \ /* Endpoint: 1, Cluster: Power Source (server) */ \ .clusterId = 0x0000002F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(293), \ - .attributeCount = 8, \ + .attributes = ZAP_ATTRIBUTE_INDEX(291), \ + .attributeCount = 9, \ .clusterSize = 72, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ @@ -2442,7 +2427,7 @@ { \ /* Endpoint: 1, Cluster: Switch (server) */ \ .clusterId = 0x0000003B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(301), \ + .attributes = ZAP_ATTRIBUTE_INDEX(300), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2455,7 +2440,7 @@ { \ /* Endpoint: 1, Cluster: Fixed Label (server) */ \ .clusterId = 0x00000040, \ - .attributes = ZAP_ATTRIBUTE_INDEX(306), \ + .attributes = ZAP_ATTRIBUTE_INDEX(305), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2468,7 +2453,7 @@ { \ /* Endpoint: 1, Cluster: User Label (server) */ \ .clusterId = 0x00000041, \ - .attributes = ZAP_ATTRIBUTE_INDEX(309), \ + .attributes = ZAP_ATTRIBUTE_INDEX(308), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2481,7 +2466,7 @@ { \ /* Endpoint: 1, Cluster: Boolean State (server) */ \ .clusterId = 0x00000045, \ - .attributes = ZAP_ATTRIBUTE_INDEX(312), \ + .attributes = ZAP_ATTRIBUTE_INDEX(311), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2494,7 +2479,7 @@ { \ /* Endpoint: 1, Cluster: Mode Select (server) */ \ .clusterId = 0x00000050, \ - .attributes = ZAP_ATTRIBUTE_INDEX(315), \ + .attributes = ZAP_ATTRIBUTE_INDEX(314), \ .attributeCount = 9, \ .clusterSize = 77, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -2507,7 +2492,7 @@ { \ /* Endpoint: 1, Cluster: Door Lock (server) */ \ .clusterId = 0x00000101, \ - .attributes = ZAP_ATTRIBUTE_INDEX(324), \ + .attributes = ZAP_ATTRIBUTE_INDEX(323), \ .attributeCount = 33, \ .clusterSize = 55, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -2520,7 +2505,7 @@ { \ /* Endpoint: 1, Cluster: Window Covering (server) */ \ .clusterId = 0x00000102, \ - .attributes = ZAP_ATTRIBUTE_INDEX(357), \ + .attributes = ZAP_ATTRIBUTE_INDEX(356), \ .attributeCount = 24, \ .clusterSize = 43, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ @@ -2533,7 +2518,7 @@ { \ /* Endpoint: 1, Cluster: Barrier Control (server) */ \ .clusterId = 0x00000103, \ - .attributes = ZAP_ATTRIBUTE_INDEX(381), \ + .attributes = ZAP_ATTRIBUTE_INDEX(380), \ .attributeCount = 6, \ .clusterSize = 11, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \ @@ -2546,7 +2531,7 @@ { \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ .clusterId = 0x00000200, \ - .attributes = ZAP_ATTRIBUTE_INDEX(387), \ + .attributes = ZAP_ATTRIBUTE_INDEX(386), \ .attributeCount = 25, \ .clusterSize = 52, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -2559,7 +2544,7 @@ { \ /* Endpoint: 1, Cluster: Thermostat (server) */ \ .clusterId = 0x00000201, \ - .attributes = ZAP_ATTRIBUTE_INDEX(412), \ + .attributes = ZAP_ATTRIBUTE_INDEX(411), \ .attributeCount = 16, \ .clusterSize = 31, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -2572,7 +2557,7 @@ { \ /* Endpoint: 1, Cluster: Fan Control (server) */ \ .clusterId = 0x00000202, \ - .attributes = ZAP_ATTRIBUTE_INDEX(428), \ + .attributes = ZAP_ATTRIBUTE_INDEX(427), \ .attributeCount = 13, \ .clusterSize = 17, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -2585,7 +2570,7 @@ { \ /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ .clusterId = 0x00000204, \ - .attributes = ZAP_ATTRIBUTE_INDEX(441), \ + .attributes = ZAP_ATTRIBUTE_INDEX(440), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -2598,7 +2583,7 @@ { \ /* Endpoint: 1, Cluster: Color Control (server) */ \ .clusterId = 0x00000300, \ - .attributes = ZAP_ATTRIBUTE_INDEX(446), \ + .attributes = ZAP_ATTRIBUTE_INDEX(445), \ .attributeCount = 54, \ .clusterSize = 345, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \ @@ -2611,7 +2596,7 @@ { \ /* Endpoint: 1, Cluster: Illuminance Measurement (server) */ \ .clusterId = 0x00000400, \ - .attributes = ZAP_ATTRIBUTE_INDEX(500), \ + .attributes = ZAP_ATTRIBUTE_INDEX(499), \ .attributeCount = 7, \ .clusterSize = 15, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2624,7 +2609,7 @@ { \ /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ .clusterId = 0x00000402, \ - .attributes = ZAP_ATTRIBUTE_INDEX(507), \ + .attributes = ZAP_ATTRIBUTE_INDEX(506), \ .attributeCount = 6, \ .clusterSize = 14, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2637,7 +2622,7 @@ { \ /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ .clusterId = 0x00000403, \ - .attributes = ZAP_ATTRIBUTE_INDEX(513), \ + .attributes = ZAP_ATTRIBUTE_INDEX(512), \ .attributeCount = 5, \ .clusterSize = 12, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2650,7 +2635,7 @@ { \ /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ .clusterId = 0x00000404, \ - .attributes = ZAP_ATTRIBUTE_INDEX(518), \ + .attributes = ZAP_ATTRIBUTE_INDEX(517), \ .attributeCount = 6, \ .clusterSize = 14, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2663,7 +2648,7 @@ { \ /* Endpoint: 1, Cluster: Relative Humidity Measurement (server) */ \ .clusterId = 0x00000405, \ - .attributes = ZAP_ATTRIBUTE_INDEX(524), \ + .attributes = ZAP_ATTRIBUTE_INDEX(523), \ .attributeCount = 6, \ .clusterSize = 14, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2676,7 +2661,7 @@ { \ /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ .clusterId = 0x00000406, \ - .attributes = ZAP_ATTRIBUTE_INDEX(530), \ + .attributes = ZAP_ATTRIBUTE_INDEX(529), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -2689,7 +2674,7 @@ { \ /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ .clusterId = 0x00000503, \ - .attributes = ZAP_ATTRIBUTE_INDEX(535), \ + .attributes = ZAP_ATTRIBUTE_INDEX(534), \ .attributeCount = 3, \ .clusterSize = 39, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2702,7 +2687,7 @@ { \ /* Endpoint: 1, Cluster: Channel (server) */ \ .clusterId = 0x00000504, \ - .attributes = ZAP_ATTRIBUTE_INDEX(538), \ + .attributes = ZAP_ATTRIBUTE_INDEX(537), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2715,7 +2700,7 @@ { \ /* Endpoint: 1, Cluster: Target Navigator (server) */ \ .clusterId = 0x00000505, \ - .attributes = ZAP_ATTRIBUTE_INDEX(541), \ + .attributes = ZAP_ATTRIBUTE_INDEX(540), \ .attributeCount = 4, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2728,7 +2713,7 @@ { \ /* Endpoint: 1, Cluster: Media Playback (server) */ \ .clusterId = 0x00000506, \ - .attributes = ZAP_ATTRIBUTE_INDEX(545), \ + .attributes = ZAP_ATTRIBUTE_INDEX(544), \ .attributeCount = 8, \ .clusterSize = 43, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2741,7 +2726,7 @@ { \ /* Endpoint: 1, Cluster: Media Input (server) */ \ .clusterId = 0x00000507, \ - .attributes = ZAP_ATTRIBUTE_INDEX(553), \ + .attributes = ZAP_ATTRIBUTE_INDEX(552), \ .attributeCount = 4, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2754,7 +2739,7 @@ { \ /* Endpoint: 1, Cluster: Low Power (server) */ \ .clusterId = 0x00000508, \ - .attributes = ZAP_ATTRIBUTE_INDEX(557), \ + .attributes = ZAP_ATTRIBUTE_INDEX(556), \ .attributeCount = 2, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2767,7 +2752,7 @@ { \ /* Endpoint: 1, Cluster: Keypad Input (server) */ \ .clusterId = 0x00000509, \ - .attributes = ZAP_ATTRIBUTE_INDEX(559), \ + .attributes = ZAP_ATTRIBUTE_INDEX(558), \ .attributeCount = 2, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2780,7 +2765,7 @@ { \ /* Endpoint: 1, Cluster: Content Launcher (server) */ \ .clusterId = 0x0000050A, \ - .attributes = ZAP_ATTRIBUTE_INDEX(561), \ + .attributes = ZAP_ATTRIBUTE_INDEX(560), \ .attributeCount = 4, \ .clusterSize = 10, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2793,7 +2778,7 @@ { \ /* Endpoint: 1, Cluster: Audio Output (server) */ \ .clusterId = 0x0000050B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(565), \ + .attributes = ZAP_ATTRIBUTE_INDEX(564), \ .attributeCount = 4, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2806,7 +2791,7 @@ { \ /* Endpoint: 1, Cluster: Application Launcher (server) */ \ .clusterId = 0x0000050C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(569), \ + .attributes = ZAP_ATTRIBUTE_INDEX(568), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2819,7 +2804,7 @@ { \ /* Endpoint: 1, Cluster: Application Basic (server) */ \ .clusterId = 0x0000050D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(572), \ + .attributes = ZAP_ATTRIBUTE_INDEX(571), \ .attributeCount = 9, \ .clusterSize = 110, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2832,7 +2817,7 @@ { \ /* Endpoint: 1, Cluster: Account Login (server) */ \ .clusterId = 0x0000050E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(581), \ + .attributes = ZAP_ATTRIBUTE_INDEX(580), \ .attributeCount = 2, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2845,7 +2830,7 @@ { \ /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ .clusterId = 0x00000B04, \ - .attributes = ZAP_ATTRIBUTE_INDEX(583), \ + .attributes = ZAP_ATTRIBUTE_INDEX(582), \ .attributeCount = 13, \ .clusterSize = 32, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2858,7 +2843,7 @@ { \ /* Endpoint: 1, Cluster: Unit Testing (server) */ \ .clusterId = 0xFFF1FC05, \ - .attributes = ZAP_ATTRIBUTE_INDEX(596), \ + .attributes = ZAP_ATTRIBUTE_INDEX(595), \ .attributeCount = 83, \ .clusterSize = 2289, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2871,7 +2856,7 @@ { \ /* Endpoint: 2, Cluster: Groups (server) */ \ .clusterId = 0x00000004, \ - .attributes = ZAP_ATTRIBUTE_INDEX(679), \ + .attributes = ZAP_ATTRIBUTE_INDEX(678), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -2884,7 +2869,7 @@ { \ /* Endpoint: 2, Cluster: On/Off (server) */ \ .clusterId = 0x00000006, \ - .attributes = ZAP_ATTRIBUTE_INDEX(682), \ + .attributes = ZAP_ATTRIBUTE_INDEX(681), \ .attributeCount = 7, \ .clusterSize = 13, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \ @@ -2897,7 +2882,7 @@ { \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(689), \ + .attributes = ZAP_ATTRIBUTE_INDEX(688), \ .attributeCount = 6, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2910,8 +2895,8 @@ { \ /* Endpoint: 2, Cluster: Power Source (server) */ \ .clusterId = 0x0000002F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(695), \ - .attributeCount = 8, \ + .attributes = ZAP_ATTRIBUTE_INDEX(694), \ + .attributeCount = 9, \ .clusterSize = 72, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ @@ -2963,13 +2948,13 @@ // clang-format on -#define ZAP_FIXED_ENDPOINT_DATA_VERSION_COUNT 78 +#define ZAP_FIXED_ENDPOINT_DATA_VERSION_COUNT 77 // 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), 2, 4 }, \ + { ZAP_CLUSTER_INDEX(0), 27, 355 }, { ZAP_CLUSTER_INDEX(27), 44, 3490 }, { ZAP_CLUSTER_INDEX(71), 5, 105 }, \ + { ZAP_CLUSTER_INDEX(76), 2, 4 }, \ } // Largest attribute size is needed for various buffers @@ -2981,7 +2966,7 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, #define ATTRIBUTE_SINGLETONS_SIZE (37) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (3960) +#define ATTRIBUTE_MAX_SIZE (3954) // 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 33877c755a5406..288f62bb5d53f1 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 @@ -38,7 +38,6 @@ #define EMBER_AF_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_TIME_FORMAT_LOCALIZATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_UNIT_LOCALIZATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) -#define EMBER_AF_POWER_SOURCE_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_POWER_SOURCE_CLUSTER_SERVER_ENDPOINT_COUNT (3) #define EMBER_AF_GENERAL_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_NETWORK_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (2) @@ -188,11 +187,6 @@ #define EMBER_AF_PLUGIN_UNIT_LOCALIZATION_SERVER #define EMBER_AF_PLUGIN_UNIT_LOCALIZATION -// Use this macro to check if the server side of the Power Source Configuration cluster is included -#define ZCL_USING_POWER_SOURCE_CONFIGURATION_CLUSTER_SERVER -#define EMBER_AF_PLUGIN_POWER_SOURCE_CONFIGURATION_SERVER -#define EMBER_AF_PLUGIN_POWER_SOURCE_CONFIGURATION - // Use this macro to check if the server side of the Power Source cluster is included #define ZCL_USING_POWER_SOURCE_CLUSTER_SERVER #define EMBER_AF_PLUGIN_POWER_SOURCE_SERVER diff --git a/src/app/clusters/power-source-server/power-source-server.cpp b/src/app/clusters/power-source-server/power-source-server.cpp index 58e21cd9907e69..a5163df93b2895 100644 --- a/src/app/clusters/power-source-server/power-source-server.cpp +++ b/src/app/clusters/power-source-server/power-source-server.cpp @@ -55,6 +55,10 @@ CHIP_ERROR PowerSourceAttrAccess::Read(const ConcreteReadAttributePath & aPath, // TODO: Needs implementation. err = aEncoder.EncodeEmptyList(); break; + case EndpointList::Id: + // TODO: Needs implementation and a way to allow dynamic endpoints to register endpoints + err = aEncoder.EncodeEmptyList(); + break; default: break; } diff --git a/src/app/tests/suites/TestDescriptorCluster.yaml b/src/app/tests/suites/TestDescriptorCluster.yaml index 03d26a73eb5830..236b16a16103eb 100644 --- a/src/app/tests/suites/TestDescriptorCluster.yaml +++ b/src/app/tests/suites/TestDescriptorCluster.yaml @@ -49,7 +49,6 @@ tests: 0x002B, # Localization Configuration 0x002C, # Time Format Localization 0x002D, # Unit Localization - 0x002E, # Power Source Configuration 0x002F, # Power Source 0x0030, # General Commissioning 0x0031, # Network Commissioning diff --git a/src/app/tests/suites/certification/PICS.yaml b/src/app/tests/suites/certification/PICS.yaml index a03094011180d9..4ffb53a23c0af8 100644 --- a/src/app/tests/suites/certification/PICS.yaml +++ b/src/app/tests/suites/certification/PICS.yaml @@ -5329,6 +5329,9 @@ PICS: - label: "Does the device implement the ActiveBatChargeFaults attribute?" id: PS.S.A001e + - label: "Does the device implement the EndpointList attribute?" + id: PS.S.A001f + # # server / Events # diff --git a/src/app/tests/suites/certification/Test_TC_PS_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PS_1_1.yaml index 1abbc9ea0690f5..77149171b3f08b 100644 --- a/src/app/tests/suites/certification/Test_TC_PS_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PS_1_1.yaml @@ -35,7 +35,7 @@ tests: command: "readAttribute" attribute: "ClusterRevision" response: - value: 1 + value: 2 constraints: type: int16u @@ -98,7 +98,8 @@ tests: response: constraints: type: list - contains: [0, 1, 2, 65528, 65529, 65530, 65531, 65532, 65533] + contains: + [0, 1, 2, 0x1f, 65528, 65529, 65530, 65531, 65532, 65533] - label: "Step 4a: Read the Feature dependent(PS.S.F00-WIRED) attribute in diff --git a/src/app/tests/suites/certification/Test_TC_PS_2_1.yaml b/src/app/tests/suites/certification/Test_TC_PS_2_1.yaml index 300ebafb566c39..91d904a6e9ab06 100644 --- a/src/app/tests/suites/certification/Test_TC_PS_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PS_2_1.yaml @@ -61,6 +61,7 @@ tests: response: constraints: type: char_string + maxLength: 60 - label: "Step 5: Test Harness Client reads WiredAssessedInputVoltage attribue @@ -356,6 +357,15 @@ tests: PICS: PS.S.A001e command: "readAttribute" attribute: "ActiveBatChargeFaults" + response: + constraints: + type: list + maxLength: 16 + + - label: "Test Harness Client reads EndpointList from Server DUT" + PICS: PS.S.A001f + command: "readAttribute" + attribute: "EndpointList" response: constraints: type: list diff --git a/src/app/tests/suites/certification/ci-pics-values b/src/app/tests/suites/certification/ci-pics-values index 4673d65346c08f..eab6ef09c0e355 100644 --- a/src/app/tests/suites/certification/ci-pics-values +++ b/src/app/tests/suites/certification/ci-pics-values @@ -994,6 +994,7 @@ PS.S.A001b=0 PS.S.A001c=0 PS.S.A001d=0 PS.S.A001e=0 +PS.S.A001f=1 PS.S.E00=0 PS.S.E01=1 PS.S.E02=0 @@ -1251,8 +1252,8 @@ LCFG.C.A0000=1 LCFG.C.A0001=1 # Power Source Configuration Cluster -PSCFG.S=1 -PSCFG.S.A0000=1 +PSCFG.S=0 +PSCFG.S.A0000=0 PSCFG.C=0 PSCFG.C.AM-READ=0 diff --git a/src/app/zap-templates/zcl/data-model/chip/power-source-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/power-source-cluster.xml index 89d1c42a8c7bf3..dd3edf4875b65e 100644 --- a/src/app/zap-templates/zcl/data-model/chip/power-source-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/power-source-cluster.xml @@ -58,6 +58,7 @@ limitations under the License. BatFunctionalWhileCharging BatChargingCurrent ActiveBatChargeFaults + EndpointList The WiredFaultChange Event SHALL indicate a change in the set of wired faults currently detected by the Node on this wired power source. diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 3edbae9b71ef74..9fb17ee5a9ad25 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -1427,6 +1427,7 @@ client cluster PowerSource = 47 { readonly attribute optional boolean batFunctionalWhileCharging = 28; readonly attribute optional nullable int32u batChargingCurrent = 29; readonly attribute optional BatChargeFaultEnum activeBatChargeFaults[] = 30; + readonly attribute endpoint_no endpointList[] = 31; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index 9e75229ea9d4c2..e4d466eb43c5d7 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -3231,6 +3231,7 @@ public enum Attribute { BatFunctionalWhileCharging(28L), BatChargingCurrent(29L), ActiveBatChargeFaults(30L), + EndpointList(31L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java index 6da03e3e855517..433a33fb7add0e 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java @@ -2621,6 +2621,17 @@ private static Map readPowerSourceInteractionInfo() { readPowerSourceActiveBatChargeFaultsCommandParams ); result.put("readActiveBatChargeFaultsAttribute", readPowerSourceActiveBatChargeFaultsAttributeInteractionInfo); + Map readPowerSourceEndpointListCommandParams = new LinkedHashMap(); + InteractionInfo readPowerSourceEndpointListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.PowerSourceCluster) cluster).readEndpointListAttribute( + (ChipClusters.PowerSourceCluster.EndpointListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedPowerSourceClusterEndpointListAttributeCallback(), + readPowerSourceEndpointListCommandParams + ); + result.put("readEndpointListAttribute", readPowerSourceEndpointListAttributeInteractionInfo); Map readPowerSourceGeneratedCommandListCommandParams = new LinkedHashMap(); InteractionInfo readPowerSourceGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 55912752bb4344..66fbb42486b4bb 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -5043,6 +5043,30 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } + case Attributes::EndpointList::Id: { + using TypeInfo = Attributes::EndpointList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; diff --git a/src/controller/java/zap-generated/CHIPClientCallbacks.h b/src/controller/java/zap-generated/CHIPClientCallbacks.h index bb720087e2f2ad..09113c09abbfa2 100644 --- a/src/controller/java/zap-generated/CHIPClientCallbacks.h +++ b/src/controller/java/zap-generated/CHIPClientCallbacks.h @@ -223,6 +223,8 @@ typedef void (*PowerSourceActiveBatFaultsListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*PowerSourceActiveBatChargeFaultsListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*PowerSourceEndpointListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*PowerSourceGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*PowerSourceAcceptedCommandListListAttributeCallback)( diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index cebbeeb5f631ae..4ea3c26c9b49b0 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -8050,6 +8050,75 @@ void CHIPPowerSourceActiveBatChargeFaultsAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } +CHIPPowerSourceEndpointListAttributeCallback::CHIPPowerSourceEndpointListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPPowerSourceEndpointListAttributeCallback::~CHIPPowerSourceEndpointListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPowerSourceEndpointListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + CHIPPowerSourceGeneratedCommandListAttributeCallback::CHIPPowerSourceGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index fcca0b6dd8f9b9..ca1ebae03cbffa 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -5712,6 +5712,11 @@ public interface ActiveBatChargeFaultsAttributeCallback { void onError(Exception ex); default void onSubscriptionEstablished(long subscriptionId) {} } + public interface EndpointListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } public interface GeneratedCommandListAttributeCallback { void onSuccess( List valueList); void onError(Exception ex); @@ -6105,6 +6110,18 @@ public void subscribeActiveBatChargeFaultsAttribute( subscribeActiveBatChargeFaultsAttribute(chipClusterPtr, callback, minInterval, maxInterval); } + public void readEndpointListAttribute( + EndpointListAttributeCallback callback + ) { + readEndpointListAttribute(chipClusterPtr, callback); + } + public void subscribeEndpointListAttribute( + EndpointListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEndpointListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readGeneratedCommandListAttribute( GeneratedCommandListAttributeCallback callback ) { @@ -6394,6 +6411,13 @@ private native void subscribeActiveBatChargeFaultsAttribute(long chipClusterPtr, ActiveBatChargeFaultsAttributeCallback callback , int minInterval, int maxInterval); + private native void readEndpointListAttribute(long chipClusterPtr, + EndpointListAttributeCallback callback + ); + private native void subscribeEndpointListAttribute(long chipClusterPtr, + EndpointListAttributeCallback callback + , int minInterval, int maxInterval); + private native void readGeneratedCommandListAttribute(long chipClusterPtr, GeneratedCommandListAttributeCallback callback ); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java index 6c95b04dc6569b..11ddc2877e586a 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java @@ -2681,6 +2681,25 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { this.callback = callback; } +@Override + public void onSuccess( List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedPowerSourceClusterEndpointListAttributeCallback implements ChipClusters.PowerSourceCluster.EndpointListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + @Override public void onSuccess( List valueList) { Map responseValues = new LinkedHashMap<>(); diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index cf2e064fd7ae75..39f215f2107578 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -2023,6 +2023,12 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x0000001F: { + "attributeName": "EndpointList", + "attributeId": 0x0000001F, + "type": "int", + "reportable": True, + }, 0x0000FFF8: { "attributeName": "GeneratedCommandList", "attributeId": 0x0000FFF8, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 5ece28924a6f42..2c1daaaf058f97 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -5996,6 +5996,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="batFunctionalWhileCharging", Tag=0x0000001C, Type=typing.Optional[bool]), ClusterObjectFieldDescriptor(Label="batChargingCurrent", Tag=0x0000001D, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="activeBatChargeFaults", Tag=0x0000001E, Type=typing.Optional[typing.List[PowerSource.Enums.BatChargeFaultEnum]]), + ClusterObjectFieldDescriptor(Label="endpointList", Tag=0x0000001F, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -6035,6 +6036,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: batFunctionalWhileCharging: 'typing.Optional[bool]' = None batChargingCurrent: 'typing.Union[None, Nullable, uint]' = None activeBatChargeFaults: 'typing.Optional[typing.List[PowerSource.Enums.BatChargeFaultEnum]]' = None + endpointList: 'typing.List[uint]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -6805,6 +6807,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[typing.List[PowerSource.Enums.BatChargeFaultEnum]]' = None + @dataclass + class EndpointList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x002F + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000001F + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm index ea7f7d1e589d4f..68872967ca2885 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm @@ -804,6 +804,9 @@ static BOOL AttributeIsSpecifiedInPowerSourceCluster(AttributeId aAttributeId) case Attributes::ActiveBatChargeFaults::Id: { return YES; } + case Attributes::EndpointList::Id: { + return YES; + } case Attributes::GeneratedCommandList::Id: { return YES; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index 3957568c1dc375..8b17e6ed4f4820 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -3876,6 +3876,32 @@ static id _Nullable DecodeAttributeValueForPowerSourceCluster( } return value; } + case Attributes::EndpointList::Id: { + using TypeInfo = Attributes::EndpointList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedShort:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 9e8e018760e4e5..4fdefe46af8fd1 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -3631,6 +3631,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEndpointListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)subscribeAttributeEndpointListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; ++ (void)readAttributeEndpointListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; + - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index bb6135a5cc8d2c..6c4515750a0294 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -21148,6 +21148,49 @@ + (void)readAttributeActiveBatChargeFaultsWithClusterStateCache:(MTRClusterState }); } +- (void)readAttributeEndpointListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSource::Attributes::EndpointList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEndpointListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = PowerSource::Attributes::EndpointList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEndpointListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRPowerSourceEndpointListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(PowerSourceEndpointListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::EndpointList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h index 507b408b94963d..1904635e2b8c79 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h @@ -718,6 +718,8 @@ typedef void (*PowerSourceActiveBatFaultsListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*PowerSourceActiveBatChargeFaultsListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*PowerSourceEndpointListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*PowerSourceGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*PowerSourceAcceptedCommandListListAttributeCallback)( @@ -4411,6 +4413,37 @@ class MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRPowerSourceEndpointListListAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRPowerSourceEndpointListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRPowerSourceEndpointListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRPowerSourceEndpointListListAttributeCallbackSubscriptionBridge + : public MTRPowerSourceEndpointListListAttributeCallbackBridge +{ +public: + MTRPowerSourceEndpointListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPowerSourceEndpointListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRPowerSourceEndpointListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceEndpointListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRPowerSourceGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm index 492e5fba81ab5c..a744c88a95dd1b 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm @@ -3605,6 +3605,44 @@ } } +void MTRPowerSourceEndpointListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedShort:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRPowerSourceEndpointListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + void MTRPowerSourceGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index c8b28a24c6cba1..69b27e4eee1e35 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -1728,6 +1728,7 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterPowerSourceAttributeActiveBatChargeFaultsID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000001E, + MTRAttributeIDTypeClusterPowerSourceAttributeEndpointListID MTR_NEWLY_AVAILABLE = 0x0000001F, MTRAttributeIDTypeClusterPowerSourceAttributeGeneratedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index aee780c0c89504..f82eca0611f464 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -1435,6 +1435,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeActiveBatChargeFaultsWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEndpointListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index 66029ffbcbaf17..426734d2ce0f05 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -7200,6 +7200,14 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi params:params]; } +- (NSDictionary *)readAttributeEndpointListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypePowerSourceID) + attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeEndpointListID) + params:params]; +} + - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index d7ade9c76585ec..4ab30d281b0f69 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -5513,6 +5513,9 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre case Attributes::ActiveBatChargeFaults::TypeInfo::GetAttributeId(): ReturnErrorOnFailure(DataModel::Decode(reader, activeBatChargeFaults)); break; + case Attributes::EndpointList::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, endpointList)); + break; case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): ReturnErrorOnFailure(DataModel::Decode(reader, generatedCommandList)); break; diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index 8505e29ef6bc51..6419b11bb01e14 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -6623,6 +6623,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace ActiveBatChargeFaults +namespace EndpointList { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::EndpointList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace EndpointList namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { @@ -6706,6 +6718,7 @@ struct TypeInfo Attributes::BatFunctionalWhileCharging::TypeInfo::DecodableType batFunctionalWhileCharging = static_cast(0); Attributes::BatChargingCurrent::TypeInfo::DecodableType batChargingCurrent; Attributes::ActiveBatChargeFaults::TypeInfo::DecodableType activeBatChargeFaults; + Attributes::EndpointList::TypeInfo::DecodableType endpointList; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h index c4fcf0898f6413..1f4edf7a78c5c5 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h @@ -1096,6 +1096,10 @@ namespace ActiveBatChargeFaults { static constexpr AttributeId Id = 0x0000001E; } // namespace ActiveBatChargeFaults +namespace EndpointList { +static constexpr AttributeId Id = 0x0000001F; +} // namespace EndpointList + namespace GeneratedCommandList { static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; } // namespace GeneratedCommandList diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index d3d37905f09c4e..702592314bbfbd 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -2240,6 +2240,7 @@ class OtaSoftwareUpdateRequestorAnnounceOTAProvider : public ClusterCommand | * BatFunctionalWhileCharging | 0x001C | | * BatChargingCurrent | 0x001D | | * ActiveBatChargeFaults | 0x001E | +| * EndpointList | 0x001F | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -12044,6 +12045,7 @@ void registerClusterPowerSource(Commands & commands, CredentialIssuerCommands * credsIssuerConfig), // make_unique(Id, "bat-charging-current", Attributes::BatChargingCurrent::Id, credsIssuerConfig), // make_unique(Id, "active-bat-charge-faults", Attributes::ActiveBatChargeFaults::Id, credsIssuerConfig), // + make_unique(Id, "endpoint-list", Attributes::EndpointList::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -12128,6 +12130,8 @@ void registerClusterPowerSource(Commands & commands, CredentialIssuerCommands * WriteAttributeAsComplex>>( Id, "active-bat-charge-faults", Attributes::ActiveBatChargeFaults::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "endpoint-list", Attributes::EndpointList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -12178,6 +12182,7 @@ void registerClusterPowerSource(Commands & commands, CredentialIssuerCommands * make_unique(Id, "bat-charging-current", Attributes::BatChargingCurrent::Id, credsIssuerConfig), // make_unique(Id, "active-bat-charge-faults", Attributes::ActiveBatChargeFaults::Id, credsIssuerConfig), // + make_unique(Id, "endpoint-list", Attributes::EndpointList::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index 79bd5fe44b7584..e18fcf9831bbee 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -6323,6 +6323,11 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ActiveBatChargeFaults", 1, value); } + case PowerSource::Attributes::EndpointList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("EndpointList", 1, value); + } case PowerSource::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index f6b45551ee0649..8b7c61ae562fdb 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -54826,7 +54826,7 @@ class Test_TC_PS_1_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckValue("clusterRevision", value, 2U)); VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; @@ -54886,6 +54886,7 @@ class Test_TC_PS_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 31UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); @@ -55142,7 +55143,7 @@ class Test_TC_PS_1_1Suite : public TestCommand class Test_TC_PS_2_1Suite : public TestCommand { public: - Test_TC_PS_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PS_2_1", 32, credsIssuerConfig) + Test_TC_PS_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PS_2_1", 33, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -55205,6 +55206,7 @@ class Test_TC_PS_2_1Suite : public TestCommand chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("value", value, 60)); } break; case 4: @@ -55470,6 +55472,15 @@ class Test_TC_PS_2_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintMaxLength("value", value, 16)); + } + break; + case 32: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; default: @@ -55680,6 +55691,12 @@ class Test_TC_PS_2_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::ActiveBatChargeFaults::Id, true, chip::NullOptional); } + case 32: { + LogStep(32, "Test Harness Client reads EndpointList from Server DUT"); + VerifyOrDo(!ShouldSkip("PS.S.A001f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::EndpointList::Id, true, + chip::NullOptional); + } } return CHIP_NO_ERROR; } @@ -84717,44 +84734,42 @@ class TestDescriptorClusterSuite : public TestCommand VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 9)); VerifyOrReturn(CheckValue("serverList[9]", iter_0.GetValue(), 45UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 10)); - VerifyOrReturn(CheckValue("serverList[10]", iter_0.GetValue(), 46UL)); + VerifyOrReturn(CheckValue("serverList[10]", iter_0.GetValue(), 47UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 11)); - VerifyOrReturn(CheckValue("serverList[11]", iter_0.GetValue(), 47UL)); + VerifyOrReturn(CheckValue("serverList[11]", iter_0.GetValue(), 48UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 12)); - VerifyOrReturn(CheckValue("serverList[12]", iter_0.GetValue(), 48UL)); + VerifyOrReturn(CheckValue("serverList[12]", iter_0.GetValue(), 49UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 13)); - VerifyOrReturn(CheckValue("serverList[13]", iter_0.GetValue(), 49UL)); + VerifyOrReturn(CheckValue("serverList[13]", iter_0.GetValue(), 50UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 14)); - VerifyOrReturn(CheckValue("serverList[14]", iter_0.GetValue(), 50UL)); + VerifyOrReturn(CheckValue("serverList[14]", iter_0.GetValue(), 51UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 15)); - VerifyOrReturn(CheckValue("serverList[15]", iter_0.GetValue(), 51UL)); + VerifyOrReturn(CheckValue("serverList[15]", iter_0.GetValue(), 52UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 16)); - VerifyOrReturn(CheckValue("serverList[16]", iter_0.GetValue(), 52UL)); + VerifyOrReturn(CheckValue("serverList[16]", iter_0.GetValue(), 53UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 17)); - VerifyOrReturn(CheckValue("serverList[17]", iter_0.GetValue(), 53UL)); + VerifyOrReturn(CheckValue("serverList[17]", iter_0.GetValue(), 54UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 18)); - VerifyOrReturn(CheckValue("serverList[18]", iter_0.GetValue(), 54UL)); + VerifyOrReturn(CheckValue("serverList[18]", iter_0.GetValue(), 55UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 19)); - VerifyOrReturn(CheckValue("serverList[19]", iter_0.GetValue(), 55UL)); + VerifyOrReturn(CheckValue("serverList[19]", iter_0.GetValue(), 56UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 20)); - VerifyOrReturn(CheckValue("serverList[20]", iter_0.GetValue(), 56UL)); + VerifyOrReturn(CheckValue("serverList[20]", iter_0.GetValue(), 60UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 21)); - VerifyOrReturn(CheckValue("serverList[21]", iter_0.GetValue(), 60UL)); + VerifyOrReturn(CheckValue("serverList[21]", iter_0.GetValue(), 62UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 22)); - VerifyOrReturn(CheckValue("serverList[22]", iter_0.GetValue(), 62UL)); + VerifyOrReturn(CheckValue("serverList[22]", iter_0.GetValue(), 63UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 23)); - VerifyOrReturn(CheckValue("serverList[23]", iter_0.GetValue(), 63UL)); + VerifyOrReturn(CheckValue("serverList[23]", iter_0.GetValue(), 64UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 24)); - VerifyOrReturn(CheckValue("serverList[24]", iter_0.GetValue(), 64UL)); + VerifyOrReturn(CheckValue("serverList[24]", iter_0.GetValue(), 65UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 25)); - VerifyOrReturn(CheckValue("serverList[25]", iter_0.GetValue(), 65UL)); + VerifyOrReturn(CheckValue("serverList[25]", iter_0.GetValue(), 70UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 26)); - VerifyOrReturn(CheckValue("serverList[26]", iter_0.GetValue(), 70UL)); + VerifyOrReturn(CheckValue("serverList[26]", iter_0.GetValue(), 1029UL)); VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 27)); - VerifyOrReturn(CheckValue("serverList[27]", iter_0.GetValue(), 1029UL)); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 28)); - VerifyOrReturn(CheckValue("serverList[28]", iter_0.GetValue(), 4294048774UL)); - VerifyOrReturn(CheckNoMoreListItems("serverList", iter_0, 29)); + VerifyOrReturn(CheckValue("serverList[27]", iter_0.GetValue(), 4294048774UL)); + VerifyOrReturn(CheckNoMoreListItems("serverList", iter_0, 28)); } } break; diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h index 363f6b9d7c3fd8..c0b2125b5c7bf7 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -16450,6 +16450,7 @@ class SubscribeAttributePowerSourceConfigurationClusterRevision : public Subscri | * BatFunctionalWhileCharging | 0x001C | | * BatChargingCurrent | 0x001D | | * ActiveBatChargeFaults | 0x001E | +| * EndpointList | 0x001F | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -18633,6 +18634,76 @@ class SubscribeAttributePowerSourceActiveBatChargeFaults : public SubscribeAttri } }; +/* + * Attribute EndpointList + */ +class ReadPowerSourceEndpointList : public ReadAttribute { +public: + ReadPowerSourceEndpointList() + : ReadAttribute("endpoint-list") + { + } + + ~ReadPowerSourceEndpointList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x0000001F) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEndpointListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.EndpointList response %@", [value description]); + if (error != nil) { + LogNSError("PowerSource EndpointList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributePowerSourceEndpointList : public SubscribeAttribute { +public: + SubscribeAttributePowerSourceEndpointList() + : SubscribeAttribute("endpoint-list") + { + } + + ~SubscribeAttributePowerSourceEndpointList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x0000001F) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEndpointListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.EndpointList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + /* * Attribute GeneratedCommandList */ @@ -98467,6 +98538,8 @@ void registerClusterPowerSource(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index f8fbb9e388921f..359094ba348242 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -163,8 +163,6 @@ class TestList : public Command { printf("Test_TC_PCC_2_2\n"); printf("Test_TC_PCC_2_3\n"); printf("Test_TC_PCC_2_4\n"); - printf("Test_TC_PSCFG_1_1\n"); - printf("Test_TC_PSCFG_2_1\n"); printf("Test_TC_RH_1_1\n"); printf("Test_TC_RH_2_1\n"); printf("Test_TC_SWTCH_1_1\n"); @@ -62823,7 +62821,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 2U)); } VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); @@ -62949,6 +62947,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 31UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); @@ -63421,6 +63420,14 @@ class Test_TC_PS_2_1 : public TestCommandBridge { } err = TestStep32TestHarnessClientReadsActiveBatChargeFaultsFromServerDut_31(); break; + case 32: + ChipLogProgress(chipTool, " ***** Test Step 32 : Test Harness Client reads EndpointList from Server DUT\n"); + if (ShouldSkip("PS.S.A001f")) { + NextTest(); + return; + } + err = TestTestHarnessClientReadsEndpointListFromServerDut_32(); + break; } if (CHIP_NO_ERROR != err) { @@ -63528,6 +63535,9 @@ class Test_TC_PS_2_1 : public TestCommandBridge { case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 32: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -63541,7 +63551,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 32; + const uint16_t mTestCount = 33; chip::Optional mNodeId; chip::Optional mCluster; @@ -63613,6 +63623,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("description", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("description", value, 60)); NextTest(); }]; @@ -64230,6 +64241,26 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("activeBatChargeFaults", "list", "list")); + VerifyOrReturn(CheckConstraintMaxLength("activeBatChargeFaults", value, 16)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestTestHarnessClientReadsEndpointListFromServerDut_32() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeEndpointListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Test Harness Client reads EndpointList from Server DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("endpointList", "list", "list")); NextTest(); }]; @@ -69172,400 +69203,6 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { } }; -class Test_TC_PSCFG_1_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_PSCFG_1_1() - : TestCommandBridge("Test_TC_PSCFG_1_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_PSCFG_1_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_PSCFG_1_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PSCFG_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1: Commission DUT to TH\n"); - err = TestStep1CommissionDutToTh_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads the ClusterRevision attribute from the DUT\n"); - err = TestStep2ThReadsTheClusterRevisionAttributeFromTheDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TH reads the FeatureMap attribute from the DUT\n"); - err = TestStep3ThReadsTheFeatureMapAttributeFromTheDut_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4: TH reads the AttributeList attribute from the DUT\n"); - err = TestStep4ThReadsTheAttributeListAttributeFromTheDut_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 5: TH reads the AcceptedCommandList attribute from the DUT\n"); - err = TestStep5ThReadsTheAcceptedCommandListAttributeFromTheDut_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 6: TH reads the GeneratedCommandList attribute from the DUT\n"); - err = TestStep6ThReadsTheGeneratedCommandListAttributeFromTheDut_5(); - break; - case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : Step 7: Read EventList attribute from the DUT.For this cluster the list is usually empty but " - "it can contain manufacturer specific event IDs.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestStep7ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_6(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestStep1CommissionDutToTh_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestStep2ThReadsTheClusterRevisionAttributeFromTheDut_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2: TH reads the ClusterRevision attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep3ThReadsTheFeatureMapAttributeFromTheDut_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3: TH reads the FeatureMap attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep4ThReadsTheAttributeListAttributeFromTheDut_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4: TH reads the AttributeList attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep5ThReadsTheAcceptedCommandListAttributeFromTheDut_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 5: TH reads the AcceptedCommandList attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep6ThReadsTheGeneratedCommandListAttributeFromTheDut_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6: TH reads the GeneratedCommandList attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR - TestStep7ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_6() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } -}; - -class Test_TC_PSCFG_2_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_PSCFG_2_1() - : TestCommandBridge("Test_TC_PSCFG_2_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_PSCFG_2_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_PSCFG_2_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PSCFG_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1: Commission DUT to TH\n"); - err = TestStep1CommissionDutToTh_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads the Sources attribute from the DUT\n"); - if (ShouldSkip("PSCFG.S.A0000")) { - NextTest(); - return; - } - err = TestStep2ThReadsTheSourcesAttributeFromTheDut_1(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 2; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestStep1CommissionDutToTh_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestStep2ThReadsTheSourcesAttributeFromTheDut_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeSourcesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2: TH reads the Sources attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("sources", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - class Test_TC_RH_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced @@ -112110,7 +111747,7 @@ class TestDescriptorCluster : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("ServerList", [actualValue count], static_cast(29))); + VerifyOrReturn(CheckValue("ServerList", [actualValue count], static_cast(28))); VerifyOrReturn(CheckValue("", actualValue[0], 3UL)); VerifyOrReturn(CheckValue("", actualValue[1], 4UL)); VerifyOrReturn(CheckValue("", actualValue[2], 29UL)); @@ -112121,25 +111758,24 @@ class TestDescriptorCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("", actualValue[7], 43UL)); VerifyOrReturn(CheckValue("", actualValue[8], 44UL)); VerifyOrReturn(CheckValue("", actualValue[9], 45UL)); - VerifyOrReturn(CheckValue("", actualValue[10], 46UL)); - VerifyOrReturn(CheckValue("", actualValue[11], 47UL)); - VerifyOrReturn(CheckValue("", actualValue[12], 48UL)); - VerifyOrReturn(CheckValue("", actualValue[13], 49UL)); - VerifyOrReturn(CheckValue("", actualValue[14], 50UL)); - VerifyOrReturn(CheckValue("", actualValue[15], 51UL)); - VerifyOrReturn(CheckValue("", actualValue[16], 52UL)); - VerifyOrReturn(CheckValue("", actualValue[17], 53UL)); - VerifyOrReturn(CheckValue("", actualValue[18], 54UL)); - VerifyOrReturn(CheckValue("", actualValue[19], 55UL)); - VerifyOrReturn(CheckValue("", actualValue[20], 56UL)); - VerifyOrReturn(CheckValue("", actualValue[21], 60UL)); - VerifyOrReturn(CheckValue("", actualValue[22], 62UL)); - VerifyOrReturn(CheckValue("", actualValue[23], 63UL)); - VerifyOrReturn(CheckValue("", actualValue[24], 64UL)); - VerifyOrReturn(CheckValue("", actualValue[25], 65UL)); - VerifyOrReturn(CheckValue("", actualValue[26], 70UL)); - VerifyOrReturn(CheckValue("", actualValue[27], 1029UL)); - VerifyOrReturn(CheckValue("", actualValue[28], 4294048774UL)); + VerifyOrReturn(CheckValue("", actualValue[10], 47UL)); + VerifyOrReturn(CheckValue("", actualValue[11], 48UL)); + VerifyOrReturn(CheckValue("", actualValue[12], 49UL)); + VerifyOrReturn(CheckValue("", actualValue[13], 50UL)); + VerifyOrReturn(CheckValue("", actualValue[14], 51UL)); + VerifyOrReturn(CheckValue("", actualValue[15], 52UL)); + VerifyOrReturn(CheckValue("", actualValue[16], 53UL)); + VerifyOrReturn(CheckValue("", actualValue[17], 54UL)); + VerifyOrReturn(CheckValue("", actualValue[18], 55UL)); + VerifyOrReturn(CheckValue("", actualValue[19], 56UL)); + VerifyOrReturn(CheckValue("", actualValue[20], 60UL)); + VerifyOrReturn(CheckValue("", actualValue[21], 62UL)); + VerifyOrReturn(CheckValue("", actualValue[22], 63UL)); + VerifyOrReturn(CheckValue("", actualValue[23], 64UL)); + VerifyOrReturn(CheckValue("", actualValue[24], 65UL)); + VerifyOrReturn(CheckValue("", actualValue[25], 70UL)); + VerifyOrReturn(CheckValue("", actualValue[26], 1029UL)); + VerifyOrReturn(CheckValue("", actualValue[27], 4294048774UL)); } NextTest(); @@ -149507,8 +149143,6 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), - make_unique(), - make_unique(), make_unique(), make_unique(), make_unique(),