diff --git a/examples/darwin-framework-tool/templates/tests/ciTests.json b/examples/darwin-framework-tool/templates/tests/ciTests.json index fa2baf9081e469..bc93afef772ff6 100644 --- a/examples/darwin-framework-tool/templates/tests/ciTests.json +++ b/examples/darwin-framework-tool/templates/tests/ciTests.json @@ -23,6 +23,9 @@ "Test_TC_G_2_1", "Test_TC_FLABEL_2_1", "Test_TC_TSTAT_2_1", - "Test_TC_TSTAT_2_2" + "Test_TC_TSTAT_2_2", + "Test_TC_ACL_2_4", + "Test_TC_ACL_2_7", + "Test_TC_ACL_2_9" ] } diff --git a/examples/placeholder/linux/apps/app1/ciTests.json b/examples/placeholder/linux/apps/app1/ciTests.json index 1b4508da3227a7..368eb2c968d052 100644 --- a/examples/placeholder/linux/apps/app1/ciTests.json +++ b/examples/placeholder/linux/apps/app1/ciTests.json @@ -18,7 +18,13 @@ "Test_TC_PSCFG_3_1_Simulated", "Test_TC_RH_3_1_Simulated", "Test_TC_SWTCH_3_1_Simulated", - "Test_TC_WNCV_5_1_Simulated" + "Test_TC_WNCV_5_1_Simulated", + "Test_TC_LCFG_3_1_Simulated", + "Test_TC_LUNIT_1_1_Simulated", + "Test_TC_LUNIT_2_1_Simulated", + "Test_TC_OCC_2_2_Simulated", + "Test_TC_OCC_2_4_Simulated", + "Test_TC_ULABEL_3_1_Simulated" ], "collection": ["Test"] } diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index e2f2144245cdd3..731e4719127078 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -1,6 +1,11 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct LabelStruct { + char_string<16> label = 0; + char_string<16> value = 1; +} + server cluster Identify = 3 { enum IdentifyEffectIdentifier : ENUM8 { kBlink = 0; @@ -555,6 +560,52 @@ server cluster BasicInformation = 40 { readonly attribute int16u clusterRevision = 65533; } +client cluster LocalizationConfiguration = 43 { + attribute char_string<35> activeLocale = 0; + readonly attribute CHAR_STRING supportedLocales[] = 1; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +server cluster LocalizationConfiguration = 43 { + attribute char_string<35> activeLocale = 0; + readonly attribute CHAR_STRING supportedLocales[] = 1; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +client cluster UnitLocalization = 45 { + enum TempUnit : ENUM8 { + kFahrenheit = 0; + kCelsius = 1; + kKelvin = 2; + } + + bitmap UnitLocalizationFeature : BITMAP32 { + kTemperatureUnit = 0x1; + } + + attribute TempUnit temperatureUnit = 0; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +server cluster UnitLocalization = 45 { + enum TempUnit : ENUM8 { + kFahrenheit = 0; + kCelsius = 1; + kKelvin = 2; + } + + bitmap UnitLocalizationFeature : BITMAP32 { + kTemperatureUnit = 0x1; + } + + attribute TempUnit temperatureUnit = 0; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + server cluster PowerSourceConfiguration = 46 { readonly attribute INT8U sources[] = 0; readonly attribute bitmap32 featureMap = 65532; @@ -1454,25 +1505,21 @@ server cluster OperationalCredentials = 62 { } client cluster FixedLabel = 64 { - struct LabelStruct { - char_string<16> label = 0; - char_string<16> value = 1; - } - readonly attribute LabelStruct labelList[] = 0; readonly attribute int16u clusterRevision = 65533; } server cluster FixedLabel = 64 { - struct LabelStruct { - char_string<16> label = 0; - char_string<16> value = 1; - } - readonly attribute LabelStruct labelList[] = 0; readonly attribute int16u clusterRevision = 65533; } +server cluster UserLabel = 65 { + attribute access(write: manage) LabelStruct labelList[] = 0; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + server cluster BooleanState = 69 { info event StateChange = 0 { boolean stateValue = 0; @@ -2088,6 +2135,23 @@ server cluster RelativeHumidityMeasurement = 1029 { readonly attribute int16u clusterRevision = 65533; } +server cluster OccupancySensing = 1030 { + readonly attribute bitmap8 occupancy = 0; + readonly attribute enum8 occupancySensorType = 1; + readonly attribute bitmap8 occupancySensorTypeBitmap = 2; + attribute access(write: manage) int16u pirOccupiedToUnoccupiedDelay = 16; + attribute access(write: manage) int16u pirUnoccupiedToOccupiedDelay = 17; + attribute access(write: manage) int8u pirUnoccupiedToOccupiedThreshold = 18; + attribute access(write: manage) int16u ultrasonicOccupiedToUnoccupiedDelay = 32; + attribute access(write: manage) int16u ultrasonicUnoccupiedToOccupiedDelay = 33; + attribute access(write: manage) int8u ultrasonicUnoccupiedToOccupiedThreshold = 34; + attribute access(write: manage) int16u physicalContactOccupiedToUnoccupiedDelay = 48; + attribute access(write: manage) int16u physicalContactUnoccupiedToOccupiedDelay = 49; + attribute access(write: manage) int8u physicalContactUnoccupiedToOccupiedThreshold = 50; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + client cluster TargetNavigator = 1285 { enum TargetNavigatorStatusEnum : ENUM8 { kSuccess = 0; @@ -3076,6 +3140,8 @@ endpoint 0 { endpoint 1 { device type anonymousEndpointType = 258, version 1; binding cluster OnOff; + binding cluster LocalizationConfiguration; + binding cluster UnitLocalization; binding cluster FixedLabel; server cluster Identify { @@ -3138,11 +3204,30 @@ endpoint 1 { ram attribute clusterRevision default = 1; } + server cluster LocalizationConfiguration { + ram attribute activeLocale; + callback attribute supportedLocales; + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } + + server cluster UnitLocalization { + ram attribute temperatureUnit; + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } + server cluster FixedLabel { callback attribute labelList; ram attribute clusterRevision default = 1; } + server cluster UserLabel { + callback attribute labelList; + ram attribute featureMap; + callback attribute clusterRevision default = 1; + } + server cluster ColorControl { ram attribute currentX default = 0x616B; ram attribute currentY default = 0x607D; @@ -3152,6 +3237,23 @@ endpoint 1 { ram attribute featureMap; ram attribute clusterRevision default = 5; } + + server cluster OccupancySensing { + ram attribute occupancy; + ram attribute occupancySensorType; + ram attribute occupancySensorTypeBitmap; + ram attribute pirOccupiedToUnoccupiedDelay; + ram attribute pirUnoccupiedToOccupiedDelay; + ram attribute pirUnoccupiedToOccupiedThreshold default = 1; + ram attribute ultrasonicOccupiedToUnoccupiedDelay; + ram attribute ultrasonicUnoccupiedToOccupiedDelay; + ram attribute ultrasonicUnoccupiedToOccupiedThreshold default = 1; + ram attribute physicalContactOccupiedToUnoccupiedDelay; + ram attribute physicalContactUnoccupiedToOccupiedDelay; + ram attribute physicalContactUnoccupiedToOccupiedThreshold default = 1; + ram attribute featureMap; + callback attribute clusterRevision default = 3; + } } diff --git a/examples/placeholder/linux/apps/app1/config.zap b/examples/placeholder/linux/apps/app1/config.zap index a116fddd7c1234..38e76b10033723 100644 --- a/examples/placeholder/linux/apps/app1/config.zap +++ b/examples/placeholder/linux/apps/app1/config.zap @@ -8303,6 +8303,598 @@ "reportableChange": 0 } ] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 1, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "client", + "enabled": 1, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "temperature unit", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "TempUnit", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Occupancy Sensor", + "code": 1030, + "mfgCode": null, + "define": "OCCUPANCY_SENSING_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Occupancy Sensor", + "code": 1030, + "mfgCode": null, + "define": "OCCUPANCY_SENSING_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Occupancy", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OccupancySensorType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OccupancySensorTypeBitmap", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PIROccupiedToUnoccupiedDelay", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PIRUnoccupiedToOccupiedDelay", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PIRUnoccupiedToOccupiedThreshold", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UltrasonicOccupiedToUnoccupiedDelay", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UltrasonicUnoccupiedToOccupiedDelay", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UltrasonicUnoccupiedToOccupiedThreshold", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PhysicalContactOccupiedToUnoccupiedDelay", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PhysicalContactUnoccupiedToOccupiedDelay", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PhysicalContactUnoccupiedToOccupiedThreshold", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "User Label", + "code": 65, + "mfgCode": null, + "define": "USER_LABEL_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "User Label", + "code": 65, + "mfgCode": null, + "define": "USER_LABEL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "LabelList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] } ] } diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index e2f2144245cdd3..e6655ba610485f 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -1,6 +1,11 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct LabelStruct { + char_string<16> label = 0; + char_string<16> value = 1; +} + server cluster Identify = 3 { enum IdentifyEffectIdentifier : ENUM8 { kBlink = 0; @@ -555,6 +560,29 @@ server cluster BasicInformation = 40 { readonly attribute int16u clusterRevision = 65533; } +server cluster LocalizationConfiguration = 43 { + attribute char_string<35> activeLocale = 0; + readonly attribute CHAR_STRING supportedLocales[] = 1; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +server cluster UnitLocalization = 45 { + enum TempUnit : ENUM8 { + kFahrenheit = 0; + kCelsius = 1; + kKelvin = 2; + } + + bitmap UnitLocalizationFeature : BITMAP32 { + kTemperatureUnit = 0x1; + } + + attribute TempUnit temperatureUnit = 0; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + server cluster PowerSourceConfiguration = 46 { readonly attribute INT8U sources[] = 0; readonly attribute bitmap32 featureMap = 65532; @@ -1454,25 +1482,21 @@ server cluster OperationalCredentials = 62 { } client cluster FixedLabel = 64 { - struct LabelStruct { - char_string<16> label = 0; - char_string<16> value = 1; - } - readonly attribute LabelStruct labelList[] = 0; readonly attribute int16u clusterRevision = 65533; } server cluster FixedLabel = 64 { - struct LabelStruct { - char_string<16> label = 0; - char_string<16> value = 1; - } - readonly attribute LabelStruct labelList[] = 0; readonly attribute int16u clusterRevision = 65533; } +server cluster UserLabel = 65 { + attribute access(write: manage) LabelStruct labelList[] = 0; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + server cluster BooleanState = 69 { info event StateChange = 0 { boolean stateValue = 0; @@ -2088,6 +2112,23 @@ server cluster RelativeHumidityMeasurement = 1029 { readonly attribute int16u clusterRevision = 65533; } +server cluster OccupancySensing = 1030 { + readonly attribute bitmap8 occupancy = 0; + readonly attribute enum8 occupancySensorType = 1; + readonly attribute bitmap8 occupancySensorTypeBitmap = 2; + attribute access(write: manage) int16u pirOccupiedToUnoccupiedDelay = 16; + attribute access(write: manage) int16u pirUnoccupiedToOccupiedDelay = 17; + attribute access(write: manage) int8u pirUnoccupiedToOccupiedThreshold = 18; + attribute access(write: manage) int16u ultrasonicOccupiedToUnoccupiedDelay = 32; + attribute access(write: manage) int16u ultrasonicUnoccupiedToOccupiedDelay = 33; + attribute access(write: manage) int8u ultrasonicUnoccupiedToOccupiedThreshold = 34; + attribute access(write: manage) int16u physicalContactOccupiedToUnoccupiedDelay = 48; + attribute access(write: manage) int16u physicalContactUnoccupiedToOccupiedDelay = 49; + attribute access(write: manage) int8u physicalContactUnoccupiedToOccupiedThreshold = 50; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + client cluster TargetNavigator = 1285 { enum TargetNavigatorStatusEnum : ENUM8 { kSuccess = 0; @@ -2721,6 +2762,19 @@ endpoint 0 { ram attribute clusterRevision default = 1; } + server cluster LocalizationConfiguration { + ram attribute activeLocale; + callback attribute supportedLocales; + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } + + server cluster UnitLocalization { + ram attribute temperatureUnit; + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } + server cluster PowerSourceConfiguration { callback attribute sources; ram attribute featureMap; @@ -2873,6 +2927,12 @@ endpoint 0 { ram attribute clusterRevision default = 1; } + server cluster UserLabel { + callback attribute labelList; + ram attribute featureMap; + callback attribute clusterRevision default = 1; + } + server cluster BooleanState { ram attribute stateValue; ram attribute featureMap; @@ -3152,6 +3212,23 @@ endpoint 1 { ram attribute featureMap; ram attribute clusterRevision default = 5; } + + server cluster OccupancySensing { + ram attribute occupancy; + ram attribute occupancySensorType; + ram attribute occupancySensorTypeBitmap; + ram attribute pirOccupiedToUnoccupiedDelay; + ram attribute pirUnoccupiedToOccupiedDelay; + ram attribute pirUnoccupiedToOccupiedThreshold default = 1; + ram attribute ultrasonicOccupiedToUnoccupiedDelay; + ram attribute ultrasonicUnoccupiedToOccupiedDelay; + ram attribute ultrasonicUnoccupiedToOccupiedThreshold default = 1; + ram attribute physicalContactOccupiedToUnoccupiedDelay; + ram attribute physicalContactUnoccupiedToOccupiedDelay; + ram attribute physicalContactUnoccupiedToOccupiedThreshold default = 1; + ram attribute featureMap; + callback attribute clusterRevision default = 3; + } } diff --git a/examples/placeholder/linux/apps/app2/config.zap b/examples/placeholder/linux/apps/app2/config.zap index 5e18f830933d37..48198e2be34d21 100644 --- a/examples/placeholder/linux/apps/app2/config.zap +++ b/examples/placeholder/linux/apps/app2/config.zap @@ -2450,6 +2450,206 @@ } ] }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "temperature unit", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "TempUnit", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "WiFi Network Diagnostics", "code": 54, @@ -3529,10 +3729,10 @@ ] }, { - "name": "Boolean State", - "code": 69, + "name": "User Label", + "code": 65, "mfgCode": null, - "define": "BOOLEAN_STATE_CLUSTER", + "define": "USER_LABEL_CLUSTER", "side": "client", "enabled": 0, "attributes": [ @@ -3555,24 +3755,24 @@ ] }, { - "name": "Boolean State", - "code": 69, + "name": "User Label", + "code": 65, "mfgCode": null, - "define": "BOOLEAN_STATE_CLUSTER", + "define": "USER_LABEL_CLUSTER", "side": "server", "enabled": 1, "attributes": [ { - "name": "StateValue", + "name": "LabelList", "code": 0, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3601,7 +3801,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -3613,39 +3813,13 @@ ] }, { - "name": "Mode Select", - "code": 80, + "name": "Boolean State", + "code": 69, "mfgCode": null, - "define": "MODE_SELECT_CLUSTER", + "define": "BOOLEAN_STATE_CLUSTER", "side": "client", - "enabled": 1, - "commands": [ - { - "name": "ChangeToMode", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - } - ], + "enabled": 0, "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "ClusterRevision", "code": 65533, @@ -3665,47 +3839,157 @@ ] }, { - "name": "Mode Select", - "code": 80, + "name": "Boolean State", + "code": 69, "mfgCode": null, - "define": "MODE_SELECT_CLUSTER", + "define": "BOOLEAN_STATE_CLUSTER", "side": "server", "enabled": 1, "attributes": [ { - "name": "Description", + "name": "StateValue", "code": 0, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "boolean", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "StandardNamespace", - "code": 1, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "enum16", + "type": "bitmap32", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "SupportedModes", + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Mode Select", + "code": 80, + "mfgCode": null, + "define": "MODE_SELECT_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "ChangeToMode", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Mode Select", + "code": 80, + "mfgCode": null, + "define": "MODE_SELECT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Description", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StandardNamespace", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "enum16", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedModes", "code": 2, "mfgCode": null, "side": "server", @@ -8303,6 +8587,314 @@ "reportableChange": 0 } ] + }, + { + "name": "Occupancy Sensor", + "code": 1030, + "mfgCode": null, + "define": "OCCUPANCY_SENSING_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Occupancy Sensor", + "code": 1030, + "mfgCode": null, + "define": "OCCUPANCY_SENSING_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Occupancy", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OccupancySensorType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OccupancySensorTypeBitmap", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PIROccupiedToUnoccupiedDelay", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PIRUnoccupiedToOccupiedDelay", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PIRUnoccupiedToOccupiedThreshold", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UltrasonicOccupiedToUnoccupiedDelay", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UltrasonicUnoccupiedToOccupiedDelay", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UltrasonicUnoccupiedToOccupiedThreshold", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PhysicalContactOccupiedToUnoccupiedDelay", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PhysicalContactUnoccupiedToOccupiedDelay", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PhysicalContactUnoccupiedToOccupiedThreshold", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] } ] } diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml index 7867035b8710f9..f1c4bfa496ab2f 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml @@ -13,1057 +13,572 @@ # limitations under the License. # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 131.2.4. [TC-ACL-2.4] ACL attribute +name: 133.2.3. [TC-ACL-2.4] Extension attribute PICS: - ACL.S config: nodeId: 0x12344321 - cluster: "Basic Information" + cluster: "Access Control" endpoint: 0 + CommissionerNodeId: + type: node_id + defaultValue: 112233 + CAT1: + type: int64u + defaultValue: 65520 + CAT2: + type: int64u + defaultValue: 65521 + CAT3: + type: int64u + defaultValue: 65522 + CAT4: + type: int64u + defaultValue: 65523 tests: - - label: "Pre-conditions" - verification: | - 1.N1 is the node ID of TH1 - - 2 .CAT1 is a valid CAT with arbitrary ID and arbitrary version - - 3.CAT2 is a valid CAT with arbitrary ID and arbitrary version - - 4.CAT3 is a valid CAT with arbitrary ID and arbitrary version - - 5.CAT4 is a valid CAT with arbitrary ID and arbitrary version - disabled: true - - - label: "TH1 commissions DUT using admin node ID N1" - verification: | - DUT - sudo ./chip-all-clusters-app --wifi - - TH1 - ./chip-tool pairing ble-wifi 1 zigbee-thread matter123 20202021 3841 - disabled: true + - label: "Step 1:Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - label: - "TH1 reads DUT Endpoint 0 OperationalCredentials cluster + "Step 2:TH1 reads DUT Endpoint 0 OperationalCredentials cluster CurrentFabricIndex attribute" - verification: | - ./chip-tool operationalcredentials read current-fabric-index 1 0 - - - On TH1(Chiptool), verify the CurrentFabricIndex as 1 + command: "readAttribute" + cluster: "Operational Credentials" + attribute: "CurrentFabricIndex" + response: + saveAs: CurrentFabricIndex - [1656652012.060584][2763:2768] CHIP:DMG: - [1656652012.060609][2763:2768] CHIP:DMG: SuppressResponse = true, - [1656652012.060634][2763:2768] CHIP:DMG: InteractionModelRevision = 1 - [1656652012.060659][2763:2768] CHIP:DMG: } - [1656652012.060820][2763:2768] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0005 DataVersion: 4209633606 - [1656652012.063135][2763:2768] CHIP:TOO: CurrentFabricIndex: 1 - [1656652012.063267][2763:2768] CHIP:EM: Sending Standalone Ack for MessageCounter:205308569 on exchange 52625i - [1656652012.063360][2763:2768] CHIP:IN: Prepared secure message 0xffff7b7ed958 to 0x0000000000000001 (1) - of type 0x10 and protocolId (0, 0) on exchange 52625i with MessageCounter:187919921. - disabled: true - - - label: "TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute" + - label: + "Step 3:TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol read acl 1 0 - - On TH1(Chiptool) , Verify that the AccessControlEntryStruct containing 1 element - - [1656652338.381499][2784:2789] CHIP:DMG: }, - [1656652338.381552][2784:2789] CHIP:DMG: - [1656652338.381590][2784:2789] CHIP:DMG: ], - [1656652338.381650][2784:2789] CHIP:DMG: - [1656652338.381690][2784:2789] CHIP:DMG: SuppressResponse = true, - [1656652338.381732][2784:2789] CHIP:DMG: InteractionModelRevision = 1 - [1656652338.381769][2784:2789] CHIP:DMG: } - [1656652338.382142][2784:2789] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 3780432410 - [1656652338.382228][2784:2789] CHIP:TOO: ACL: 1 entries - [1656652338.382315][2784:2789] CHIP:TOO: [1]: { - [1656652338.382378][2784:2789] CHIP:TOO: Privilege: 5 - [1656652338.382418][2784:2789] CHIP:TOO: AuthMode: 2 - [1656652338.382458][2784:2789] CHIP:TOO: Subjects: 1 entries - [1656652338.382504][2784:2789] CHIP:TOO: [1]: 112233 - [1656652338.382547][2784:2789] CHIP:TOO: Targets: null - [1656652338.382586][2784:2789] CHIP:TOO: FabricIndex: 1 - [1656652338.382617][2784:2789] CHIP:TOO: } - [1656652338.382736][2784:2789] CHIP:EM: Sending Standalone Ack for MessageCounter:224641043 on exchange 12328i - [1656652338.382835][2784:2789] CHIP:IN: Prepared secure message 0xffffa27cd958 to 0x0000000000000001 (1) of type 0x10 and protocolId - disabled: true + command: "readAttribute" + attribute: "ACL" + response: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [CommissionerNodeId], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + ] - label: - "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 3 elements 1.struct - Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null 2 . struct Privilege field: View (1) - AuthMode field: CASE (3) Subjects field: [111, 222, 333, 444] Targets - field: [{Cluster: 11}, {Endpoint: 22}] 3..struct Privilege field: - Operate (3) AuthMode field: Group (3) Subjects field: [555, 666, 777, - 888] Targets field: [{Cluster: 55}, {Endpoint: 66}]" + "Step 4:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, + value is list of AccessControlEntryStruct containing 3 elements + 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) + Subjects field: [N1] Targets field: null 2 . struct Privilege field: + View (1) AuthMode field: CASE (3) Subjects field: [111, 222, 333, 444] + Targets field: [{Cluster: 11}, {Endpoint: 22}] 3..struct Privilege + field: Operate (3) AuthMode field: Group (3) Subjects field: [555, + 666, 777, 888] Targets field: [{Cluster: 55}, {Endpoint: 66}]" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 1, "authMode": 3, "subjects": [111,222,333,444], "targets": [{"cluster":11 , "endpoint":22, "deviceType": null}]},{ "privilege": 3, "authMode": 3, "subjects": [555,666,777,888], "targets": [{"cluster": 55, "endpoint": 66, "deviceType":null }]}]' 1 0 - On TH1(Chiptool), Verify that the status is success when writing the AccessControl cluster ACL attribute with 3 elements - [1658323877.660699][2502:2507] CHIP:DMG: WriteClient moving to [ResponseRe] - [1658323877.660829][2502:2507] CHIP:DMG: WriteResponseMessage = - [1658323877.660890][2502:2507] CHIP:DMG: { - [1658323877.660943][2502:2507] CHIP:DMG: AttributeStatusIBs = - [1658323877.661019][2502:2507] CHIP:DMG: [ - [1658323877.661079][2502:2507] CHIP:DMG: AttributeStatusIB = - [1658323877.661251][2502:2507] CHIP:DMG: { - [1658323877.661321][2502:2507] CHIP:DMG: AttributePathIB = - [1658323877.661397][2502:2507] CHIP:DMG: { - [1658323877.661477][2502:2507] CHIP:DMG: Endpoint = 0x0, - [1658323877.661568][2502:2507] CHIP:DMG: Cluster = 0x1f, - [1658323877.661657][2502:2507] CHIP:DMG: Attribute = 0x0000_0000, - [1658323877.661744][2502:2507] CHIP:DMG: } - [1658323877.661838][2502:2507] CHIP:DMG: - [1658323877.661920][2502:2507] CHIP:DMG: StatusIB = - [1658323877.662004][2502:2507] CHIP:DMG: { - [1658323877.662084][2502:2507] CHIP:DMG: status = 0x00 (SUCCESS), - [1658323877.662167][2502:2507] CHIP:DMG: }, - [1658323877.662243][2502:2507] CHIP:DMG: - [1658323877.662309][2502:2507] CHIP:DMG: }, - [1658323877.662398][2502:2507] CHIP:DMG: - [1658323877.662458][2502:2507] CHIP:DMG: AttributeStatusIB = - [1658323877.662527][2502:2507] CHIP:DMG: { - [1658323877.662590][2502:2507] CHIP:DMG: AttributePathIB = - [1658323877.662706][2502:2507] CHIP:DMG: { - [1658323877.662784][2502:2507] CHIP:DMG: Endpoint = 0x0, - [1658323877.662872][2502:2507] CHIP:DMG: Cluster = 0x1f, - [1658323877.662939][2502:2507] CHIP:DMG: Attribute = 0x0000_0000, - [1658323877.663079][2502:2507] CHIP:DMG: ListIndex = Null, - [1658323877.663151][2502:2507] CHIP:DMG: } - [1658323877.663228][2502:2507] CHIP:DMG: - [1658323877.663298][2502:2507] CHIP:DMG: StatusIB = - [1658323877.663364][2502:2507] CHIP:DMG: { - [1658323877.663428][2502:2507] CHIP:DMG: status = 0x00 (SUCCESS), - [1658323877.663500][2502:2507] CHIP:DMG: }, - [1658323877.663566][2502:2507] CHIP:DMG: - [1658323877.663624][2502:2507] CHIP:DMG: }, - [1658323877.663703][2502:2507] CHIP:DMG: - [1658323877.663754][2502:2507] CHIP:DMG: AttributeStatusIB = - [1658323877.663814][2502:2507] CHIP:DMG: { - [1658323877.663871][2502:2507] CHIP:DMG: AttributePathIB = - [1658323877.663941][2502:2507] CHIP:DMG: { - [1658323877.664007][2502:2507] CHIP:DMG: Endpoint = 0x0, - [1658323877.664077][2502:2507] CHIP:DMG: Cluster = 0x1f, - [1658323877.664147][2502:2507] CHIP:DMG: Attribute = 0x0000_0000, - [1658323877.664214][2502:2507] CHIP:DMG: ListIndex = Null, - [1658323877.664278][2502:2507] CHIP:DMG: } - [1658323877.664350][2502:2507] CHIP:DMG: - [1658323877.664414][2502:2507] CHIP:DMG: StatusIB = - [1658323877.664477][2502:2507] CHIP:DMG: { - [1658323877.664541][2502:2507] CHIP:DMG: status = 0x00 (SUCCESS), - [1658323877.664606][2502:2507] CHIP:DMG: }, - [1658323877.664670][2502:2507] CHIP:DMG: - [1658323877.664727][2502:2507] CHIP:DMG: }, - [1658323877.664800][2502:2507] CHIP:DMG: - [1658323877.664850][2502:2507] CHIP:DMG: AttributeStatusIB = - [1658323877.664910][2502:2507] CHIP:DMG: { - [1658323877.664967][2502:2507] CHIP:DMG: AttributePathIB = - [1658323877.665031][2502:2507] CHIP:DMG: { - [1658323877.665096][2502:2507] CHIP:DMG: Endpoint = 0x0, - [1658323877.665170][2502:2507] CHIP:DMG: Cluster = 0x1f, - [1658323877.665240][2502:2507] CHIP:DMG: Attribute = 0x0000_0000, - [1658323877.665313][2502:2507] CHIP:DMG: ListIndex = Null, - [1658323877.665384][2502:2507] CHIP:DMG: } - [1658323877.665453][2502:2507] CHIP:DMG: - [1658323877.665515][2502:2507] CHIP:DMG: StatusIB = - [1658323877.665577][2502:2507] CHIP:DMG: { - [1658323877.665643][2502:2507] CHIP:DMG: status = 0x00 (SUCCESS), - [1658323877.665708][2502:2507] CHIP:DMG: }, - [1658323877.665771][2502:2507] CHIP:DMG: - [1658323877.665828][2502:2507] CHIP:DMG: }, - [1658323877.665889][2502:2507] CHIP:DMG: - [1658323877.665938][2502:2507] CHIP:DMG: ], - [1658323877.666020][2502:2507] CHIP:DMG: - [1658323877.666070][2502:2507] CHIP:DMG: InteractionModelRevision = 1 - [1658323877.666119][2502:2507] CHIP:DMG: } - [1658323877.666433][2502:2507] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1658323877.666532][2502:2507] CHIP:EM: Sending Standalone Ack for MessageCounter:122439856 on exchange 57514i - disabled: true + command: "writeAttribute" + attribute: "ACL" + arguments: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [CommissionerNodeId], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "1", + AuthMode: "3", + Subjects: [111, 222, 333, 444], + Targets: + [{ Cluster: 11, Endpoint: 22, DeviceType: null }], + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "3", + AuthMode: "3", + Subjects: [555, 666, 777, 888], + Targets: + [{ Cluster: 55, Endpoint: 66, DeviceType: null }], + FabricIndex: CurrentFabricIndex, + }, + ] - - label: "TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute" + - label: + "Step 5:TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol read acl 1 0 - On TH1(Chiptool) , Verify that the AccessControlEntryStruct contains 3 elements - InteractionModelRevision = 1 - [1658229676.712083][4872:4878] CHIP:DMG: } - [1658229676.712624][4872:4878] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 1307037423 - [1658229676.712736][4872:4878] CHIP:TOO: ACL: 3 entries - [1658229676.712809][4872:4878] CHIP:TOO: [1]: { - [1658229676.712839][4872:4878] CHIP:TOO: Privilege: 5 - [1658229676.712864][4872:4878] CHIP:TOO: AuthMode: 2 - [1658229676.712893][4872:4878] CHIP:TOO: Subjects: 1 entries - [1658229676.712923][4872:4878] CHIP:TOO: [1]: 112233 - [1658229676.712949][4872:4878] CHIP:TOO: Targets: null - [1658229676.712972][4872:4878] CHIP:TOO: FabricIndex: 1 - [1658229676.712995][4872:4878] CHIP:TOO: } - [1658229676.713033][4872:4878] CHIP:TOO: [2]: { - [1658229676.713058][4872:4878] CHIP:TOO: Privilege: 1 - [1658229676.713082][4872:4878] CHIP:TOO: AuthMode: 3 - [1658229676.713109][4872:4878] CHIP:TOO: Subjects: 4 entries - [1658229676.713136][4872:4878] CHIP:TOO: [1]: 111 - [1658229676.713161][4872:4878] CHIP:TOO: [2]: 222 - [1658229676.713187][4872:4878] CHIP:TOO: [3]: 333 - [1658229676.713212][4872:4878] CHIP:TOO: [4]: 444 - [1658229676.713241][4872:4878] CHIP:TOO: Targets: 1 entries - [1658229676.713295][4872:4878] CHIP:TOO: [1]: { - [1658229676.713322][4872:4878] CHIP:TOO: Cluster: 11 - [1658229676.713347][4872:4878] CHIP:TOO: Endpoint: 22 - [1658229676.713371][4872:4878] CHIP:TOO: DeviceType: null - [1658229676.713429][4872:4878] CHIP:TOO: } - [1658229676.713457][4872:4878] CHIP:TOO: FabricIndex: 1 - [1658229676.713480][4872:4878] CHIP:TOO: } - [1658229676.713517][4872:4878] CHIP:TOO: [3]: { - [1658229676.713543][4872:4878] CHIP:TOO: Privilege: 3 - [1658229676.713566][4872:4878] CHIP:TOO: AuthMode: 3 - [1658229676.713593][4872:4878] CHIP:TOO: Subjects: 4 entries - [1658229676.713620][4872:4878] CHIP:TOO: [1]: 555 - [1658229676.713645][4872:4878] CHIP:TOO: [2]: 666 - [1658229676.713670][4872:4878] CHIP:TOO: [3]: 777 - [1658229676.713695][4872:4878] CHIP:TOO: [4]: 888 - [1658229676.713724][4872:4878] CHIP:TOO: Targets: 1 entries - [1658229676.713756][4872:4878] CHIP:TOO: [1]: { - [1658229676.713780][4872:4878] CHIP:TOO: Cluster: 55 - [1658229676.713804][4872:4878] CHIP:TOO: Endpoint: 66 - [1658229676.713826][4872:4878] CHIP:TOO: DeviceType: null - [1658229676.713849][4872:4878] CHIP:TOO: } - [1658229676.713873][4872:4878] CHIP:TOO: FabricIndex: 1 - [1658229676.713896][4872:4878] CHIP:TOO: } - [1658229676.714004][4872:4878] CHIP:EM: Sending Standalone Ack for MessageCounter:20458493 on exchange 31143i - disabled: true + command: "readAttribute" + attribute: "ACL" + response: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [CommissionerNodeId], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "1", + AuthMode: "3", + Subjects: [111, 222, 333, 444], + Targets: + [{ Cluster: 11, Endpoint: 22, DeviceType: null }], + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "3", + AuthMode: "3", + Subjects: [555, 666, 777, 888], + Targets: + [{ Cluster: 55, Endpoint: 66, DeviceType: null }], + FabricIndex: CurrentFabricIndex, + }, + ] - label: - "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 3 elements 1.struct - Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null 2.struct Privilege field: Manage (4) - AuthMode field: Group (3) Subjects field: [444, 333, 222, 111] Targets - field: [{Cluster: 44}, {Endpoint: 33}] 3.struct Privilege field: - Administer (5) AuthMode field: CASE (2) Subjects field: [888, 777, - 666, 555] Targets field: [{Cluster: 88}, {Endpoint: 77}]" + "Step 6:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, + value is list of AccessControlEntryStruct containing 3 elements + 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) + Subjects field: [N1] Targets field: null 2.struct Privilege field: + Manage (4) AuthMode field: Group (3) Subjects field: [444, 333, 222, + 111] Targets field: [{Cluster: 44}, {Endpoint: 33}] 3.struct Privilege + field: Administer (5) AuthMode field: CASE (2) Subjects field: [888, + 777, 666, 555] Targets field: [{Cluster: 88}, {Endpoint: 77}]" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 4, "authMode": 3, "subjects": [444,333,222,111], "targets": [{"cluster":44 , "endpoint":33, "deviceType":null}]},{ "privilege":5, "authMode":2, "subjects": [888,777,666,555], "targets": [{"cluster": 88, "endpoint": 77, "deviceType":null}]}]' 1 0 - - On TH1(Chiptool) , Verify that the status is success when writing the AccessControl cluster ACL attribute with 3 elements - 1658226959.554674][4736:4741] CHIP:DMG: AttributeStatusIBs = - [1658226959.554706][4736:4741] CHIP:DMG: [ - [1658226959.554732][4736:4741] CHIP:DMG: AttributeStatusIB = - [1658226959.554761][4736:4741] CHIP:DMG: { - [1658226959.554787][4736:4741] CHIP:DMG: AttributePathIB = - [1658226959.554822][4736:4741] CHIP:DMG: { - [1658226959.554855][4736:4741] CHIP:DMG: Endpoint = 0x0, - [1658226959.554887][4736:4741] CHIP:DMG: Cluster = 0x1f, - [1658226959.554916][4736:4741] CHIP:DMG: Attribute = 0x0000_0000, - [1658226959.554941][4736:4741] CHIP:DMG: } - [1658226959.554982][4736:4741] CHIP:DMG: - [1658226959.555013][4736:4741] CHIP:DMG: StatusIB = - [1658226959.555049][4736:4741] CHIP:DMG: { - [1658226959.555085][4736:4741] CHIP:DMG: status = 0x00 (SUCCESS), - [1658226959.555121][4736:4741] CHIP:DMG: }, - [1658226959.555152][4736:4741] CHIP:DMG: - [1658226959.555181][4736:4741] CHIP:DMG: }, - [1658226959.555216][4736:4741] CHIP:DMG: - [1658226959.555241][4736:4741] CHIP:DMG: AttributeStatusIB = - [1658226959.555269][4736:4741] CHIP:DMG: { - [1658226959.555296][4736:4741] CHIP:DMG: AttributePathIB = - [1658226959.555329][4736:4741] CHIP:DMG: { - [1658226959.555360][4736:4741] CHIP:DMG: Endpoint = 0x0, - [1658226959.555392][4736:4741] CHIP:DMG: Cluster = 0x1f, - [1658226959.555424][4736:4741] CHIP:DMG: Attribute = 0x0000_0000, - [1658226959.555455][4736:4741] CHIP:DMG: ListIndex = Null, - [1658226959.555487][4736:4741] CHIP:DMG: } - [1658226959.555521][4736:4741] CHIP:DMG: - [1658226959.555552][4736:4741] CHIP:DMG: StatusIB = - [1658226959.555582][4736:4741] CHIP:DMG: { - [1658226959.555614][4736:4741] CHIP:DMG: status = 0x00 (SUCCESS), - [1658226959.555646][4736:4741] CHIP:DMG: }, - [1658226959.555678][4736:4741] CHIP:DMG: - [1658226959.555704][4736:4741] CHIP:DMG: }, - [1658226959.555740][4736:4741] CHIP:DMG: - [1658226959.555765][4736:4741] CHIP:DMG: AttributeStatusIB = - [1658226959.555793][4736:4741] CHIP:DMG: { - [1658226959.555819][4736:4741] CHIP:DMG: AttributePathIB = - [1658226959.555850][4736:4741] CHIP:DMG: { - [1658226959.555881][4736:4741] CHIP:DMG: Endpoint = 0x0, - [1658226959.555912][4736:4741] CHIP:DMG: Cluster = 0x1f, - [1658226959.555947][4736:4741] CHIP:DMG: Attribute = 0x0000_0000, - [1658226959.555983][4736:4741] CHIP:DMG: ListIndex = Null, - [1658226959.556017][4736:4741] CHIP:DMG: } - [1658226959.556053][4736:4741] CHIP:DMG: - [1658226959.556083][4736:4741] CHIP:DMG: StatusIB = - [1658226959.556114][4736:4741] CHIP:DMG: { - [1658226959.556146][4736:4741] CHIP:DMG: status = 0x00 (SUCCESS), - [1658226959.556177][4736:4741] CHIP:DMG: }, - [1658226959.556209][4736:4741] CHIP:DMG: - [1658226959.556235][4736:4741] CHIP:DMG: }, - [1658226959.556271][4736:4741] CHIP:DMG: - [1658226959.556296][4736:4741] CHIP:DMG: AttributeStatusIB = - [1658226959.556323][4736:4741] CHIP:DMG: { - [1658226959.556350][4736:4741] CHIP:DMG: AttributePathIB = - [1658226959.556380][4736:4741] CHIP:DMG: { - [1658226959.556412][4736:4741] CHIP:DMG: Endpoint = 0x0, - [1658226959.556445][4736:4741] CHIP:DMG: Cluster = 0x1f, - [1658226959.556479][4736:4741] CHIP:DMG: Attribute = 0x0000_0000, - [1658226959.556547][4736:4741] CHIP:DMG: ListIndex = Null, - [1658226959.556583][4736:4741] CHIP:DMG: } - [1658226959.556620][4736:4741] CHIP:DMG: - [1658226959.556651][4736:4741] CHIP:DMG: StatusIB = - [1658226959.556679][4736:4741] CHIP:DMG: { - [1658226959.556711][4736:4741] CHIP:DMG: status = 0x00 (SUCCESS), - [1658226959.556743][4736:4741] CHIP:DMG: }, - [1658226959.556774][4736:4741] CHIP:DMG: - [1658226959.556800][4736:4741] CHIP:DMG: }, - [1658226959.556830][4736:4741] CHIP:DMG: - disabled: true + command: "writeAttribute" + attribute: "ACL" + arguments: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [CommissionerNodeId], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "4", + AuthMode: "3", + Subjects: [444, 333, 222, 111], + Targets: + [{ Cluster: 44, Endpoint: 33, DeviceType: null }], + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "5", + AuthMode: "2", + Subjects: [888, 777, 666, 555], + Targets: + [{ Cluster: 88, Endpoint: 77, DeviceType: null }], + FabricIndex: CurrentFabricIndex, + }, + ] - - label: "TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute" + - label: + "Step 7:TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol read acl 1 0 - On TH1(Chiptool), Verify that the AccessControlEntryStruct contains 3 elements - 9800.959293][4892:4897] CHIP:DMG: - [1658229800.959325][4892:4897] CHIP:DMG: ], - [1658229800.959399][4892:4897] CHIP:DMG: - [1658229800.959433][4892:4897] CHIP:DMG: SuppressResponse = true, - [1658229800.959466][4892:4897] CHIP:DMG: InteractionModelRevision = 1 - [1658229800.959497][4892:4897] CHIP:DMG: } - [1658229800.960148][4892:4897] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 1307037427 - [1658229800.960272][4892:4897] CHIP:TOO: ACL: 3 entries - [1658229800.960360][4892:4897] CHIP:TOO: [1]: { - [1658229800.960397][4892:4897] CHIP:TOO: Privilege: 5 - [1658229800.960429][4892:4897] CHIP:TOO: AuthMode: 2 - [1658229800.960465][4892:4897] CHIP:TOO: Subjects: 1 entries - [1658229800.960526][4892:4897] CHIP:TOO: [1]: 112233 - [1658229800.960564][4892:4897] CHIP:TOO: Targets: null - [1658229800.960595][4892:4897] CHIP:TOO: FabricIndex: 1 - [1658229800.960625][4892:4897] CHIP:TOO: } - [1658229800.960673][4892:4897] CHIP:TOO: [2]: { - [1658229800.960706][4892:4897] CHIP:TOO: Privilege: 4 - [1658229800.960736][4892:4897] CHIP:TOO: AuthMode: 3 - [1658229800.960771][4892:4897] CHIP:TOO: Subjects: 4 entries - [1658229800.960806][4892:4897] CHIP:TOO: [1]: 444 - [1658229800.960840][4892:4897] CHIP:TOO: [2]: 333 - [1658229800.960874][4892:4897] CHIP:TOO: [3]: 222 - [1658229800.960907][4892:4897] CHIP:TOO: [4]: 111 - [1658229800.960944][4892:4897] CHIP:TOO: Targets: 1 entries - [1658229800.961008][4892:4897] CHIP:TOO: [1]: { - [1658229800.961042][4892:4897] CHIP:TOO: Cluster: 44 - [1658229800.961074][4892:4897] CHIP:TOO: Endpoint: 33 - [1658229800.961105][4892:4897] CHIP:TOO: DeviceType: null - [1658229800.961135][4892:4897] CHIP:TOO: } - [1658229800.961167][4892:4897] CHIP:TOO: FabricIndex: 1 - [1658229800.961197][4892:4897] CHIP:TOO: } - [1658229800.961245][4892:4897] CHIP:TOO: [3]: { - [1658229800.961277][4892:4897] CHIP:TOO: Privilege: 5 - [1658229800.961308][4892:4897] CHIP:TOO: AuthMode: 2 - [1658229800.961343][4892:4897] CHIP:TOO: Subjects: 4 entries - [1658229800.961378][4892:4897] CHIP:TOO: [1]: 888 - [1658229800.961411][4892:4897] CHIP:TOO: [2]: 777 - [1658229800.961445][4892:4897] CHIP:TOO: [3]: 666 - [1658229800.961479][4892:4897] CHIP:TOO: [4]: 555 - [1658229800.961516][4892:4897] CHIP:TOO: Targets: 1 entries - [1658229800.961556][4892:4897] CHIP:TOO: [1]: { - [1658229800.961589][4892:4897] CHIP:TOO: Cluster: 88 - [1658229800.961620][4892:4897] CHIP:TOO: Endpoint: 77 - [1658229800.961650][4892:4897] CHIP:TOO: DeviceType: null - [1658229800.961679][4892:4897] CHIP:TOO: } - [1658229800.961711][4892:4897] CHIP:TOO: FabricIndex: 1 - [1658229800.961741][4892:4897] CHIP:TOO: } - [1658229800.961850][4892:4897] CHIP:EM: Sending Standalone Ack for MessageCounter:261677764 on exchange 51705i - disabled: true + command: "readAttribute" + attribute: "ACL" + response: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [CommissionerNodeId], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "4", + AuthMode: "3", + Subjects: [444, 333, 222, 111], + Targets: + [{ Cluster: 44, Endpoint: 33, DeviceType: null }], + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "5", + AuthMode: "2", + Subjects: [888, 777, 666, 555], + Targets: + [{ Cluster: 88, Endpoint: 77, DeviceType: null }], + FabricIndex: CurrentFabricIndex, + }, + ] - label: - "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 3 elements 1.struct - Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null 2.struct Privilege field: View (1) - AuthMode field: CASE (2) Subjects field: [111, 222, 333, 444] Targets - field: [{Cluster: 11, Endpoint: 22}, {Cluster: 33, DeviceType: 44}] - 3.struct Privilege field: Operate (3) AuthMode field: Group (3) + "Step 8:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, + value is list of AccessControlEntryStruct containing 3 elements + 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) + Subjects field: [N1] Targets field: null 2.struct Privilege field: + View (1) AuthMode field: CASE (2) Subjects field: [111, 222, 333, 444] + Targets field: [{Cluster: 11, Endpoint: 22}, {Cluster: 33, DeviceType: + 44}] 3.struct Privilege field: Operate (3) AuthMode field: Group (3) Subjects field: [555, 666, 777, 888] Targets field: [{Cluster: 55, Endpoint: 66}, {Cluster: 77, DeviceType: 88}]" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 1, "authMode": 2, "subjects": [111,222,333,444], "targets":[{ "cluster": 11, "endpoint": 22, "deviceType": null },{ "cluster": 33, "endpoint": null, "deviceType": 44 }]}, { "privilege": 3, "authMode": 3, "subjects": [555,666,777,888], "targets":[{ "cluster": 55, "endpoint": 66, "deviceType": null },{ "cluster": 77, "endpoint": null, "deviceType": 88 }]}]' 1 0 - On TH1(Chiptool), Verify that the status is success when writing the AccessControl cluster ACL attribute with 3 elements - 1657276276.708941][2297:2302] CHIP:DMG: WriteClient moving to [ResponseRe] - [1657276276.709021][2297:2302] CHIP:DMG: WriteResponseMessage = - [1657276276.709058][2297:2302] CHIP:DMG: { - [1657276276.709090][2297:2302] CHIP:DMG: AttributeStatusIBs = - [1657276276.709135][2297:2302] CHIP:DMG: [ - [1657276276.709171][2297:2302] CHIP:DMG: AttributeStatusIB = - [1657276276.709216][2297:2302] CHIP:DMG: { - [1657276276.709257][2297:2302] CHIP:DMG: AttributePathIB = - [1657276276.709309][2297:2302] CHIP:DMG: { - [1657276276.709356][2297:2302] CHIP:DMG: Endpoint = 0x0, - [1657276276.709405][2297:2302] CHIP:DMG: Cluster = 0x1f, - [1657276276.709455][2297:2302] CHIP:DMG: Attribute = 0x0000_0000, - [1657276276.709505][2297:2302] CHIP:DMG: } - [1657276276.709555][2297:2302] CHIP:DMG: - [1657276276.709599][2297:2302] CHIP:DMG: StatusIB = - [1657276276.709645][2297:2302] CHIP:DMG: { - [1657276276.709691][2297:2302] CHIP:DMG: status = 0x00 (SUCCESS), - [1657276276.709740][2297:2302] CHIP:DMG: }, - [1657276276.709786][2297:2302] CHIP:DMG: - [1657276276.709826][2297:2302] CHIP:DMG: }, - [1657276276.709880][2297:2302] CHIP:DMG: - [1657276276.709916][2297:2302] CHIP:DMG: AttributeStatusIB = - [1657276276.709954][2297:2302] CHIP:DMG: { - [1657276276.709991][2297:2302] CHIP:DMG: AttributePathIB = - [1657276276.710035][2297:2302] CHIP:DMG: { - [1657276276.710151][2297:2302] CHIP:DMG: Endpoint = 0x0, - [1657276276.710232][2297:2302] CHIP:DMG: Cluster = 0x1f, - [1657276276.710316][2297:2302] CHIP:DMG: Attribute = 0x0000_0000, - [1657276276.710401][2297:2302] CHIP:DMG: ListIndex = Null, - [1657276276.710559][2297:2302] CHIP:DMG: } - [1657276276.710648][2297:2302] CHIP:DMG: - [1657276276.710723][2297:2302] CHIP:DMG: StatusIB = - [1657276276.710798][2297:2302] CHIP:DMG: { - [1657276276.710873][2297:2302] CHIP:DMG: status = 0x00 (SUCCESS), - [1657276276.710948][2297:2302] CHIP:DMG: }, - [1657276276.711025][2297:2302] CHIP:DMG: - [1657276276.711091][2297:2302] CHIP:DMG: }, - [1657276276.711180][2297:2302] CHIP:DMG: - [1657276276.711239][2297:2302] CHIP:DMG: AttributeStatusIB = - [1657276276.711303][2297:2302] CHIP:DMG: { - [1657276276.711365][2297:2302] CHIP:DMG: AttributePathIB = - [1657276276.711439][2297:2302] CHIP:DMG: { - [1657276276.711513][2297:2302] CHIP:DMG: Endpoint = 0x0, - [1657276276.711595][2297:2302] CHIP:DMG: Cluster = 0x1f, - [1657276276.711676][2297:2302] CHIP:DMG: Attribute = 0x0000_0000, - [1657276276.711763][2297:2302] CHIP:DMG: ListIndex = Null, - [1657276276.711837][2297:2302] CHIP:DMG: } - [1657276276.711919][2297:2302] CHIP:DMG: - [1657276276.711992][2297:2302] CHIP:DMG: StatusIB = - [1657276276.712064][2297:2302] CHIP:DMG: { - [1657276276.712141][2297:2302] CHIP:DMG: status = 0x00 (SUCCESS), - [1657276276.712218][2297:2302] CHIP:DMG: }, - [1657276276.712292][2297:2302] CHIP:DMG: - [1657276276.712359][2297:2302] CHIP:DMG: }, - [1657276276.712448][2297:2302] CHIP:DMG: - [1657276276.712512][2297:2302] CHIP:DMG: AttributeStatusIB = - [1657276276.712580][2297:2302] CHIP:DMG: { - [1657276276.712646][2297:2302] CHIP:DMG: AttributePathIB = - [1657276276.712720][2297:2302] CHIP:DMG: { - [1657276276.712794][2297:2302] CHIP:DMG: Endpoint = 0x0, - [1657276276.712881][2297:2302] CHIP:DMG: Cluster = 0x1f, - [1657276276.712963][2297:2302] CHIP:DMG: Attribute = 0x0000_0000, - [1657276276.713043][2297:2302] CHIP:DMG: ListIndex = Null, - [1657276276.713119][2297:2302] CHIP:DMG: } - [1657276276.713203][2297:2302] CHIP:DMG: - [1657276276.713275][2297:2302] CHIP:DMG: StatusIB = - [1657276276.713348][2297:2302] CHIP:DMG: { - [1657276276.713423][2297:2302] CHIP:DMG: status = 0x00 (SUCCESS), - [1657276276.713504][2297:2302] CHIP:DMG: }, - [1657276276.713578][2297:2302] CHIP:DMG: - [1657276276.713644][2297:2302] CHIP:DMG: }, - [1657276276.713716][2297:2302] CHIP:DMG: - [1657276276.713773][2297:2302] CHIP:DMG: ], - [1657276276.713869][2297:2302] CHIP:DMG: - [1657276276.713927][2297:2302] CHIP:DMG: InteractionModelRevision = 1 - [1657276276.713983][2297:2302] CHIP:DMG: } - disabled: true - - - label: "TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute" + command: "writeAttribute" + attribute: "ACL" + arguments: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [CommissionerNodeId], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "1", + AuthMode: "2", + Subjects: [111, 222, 333, 444], + Targets: + [ + { Cluster: 11, Endpoint: 22, DeviceType: null }, + { Cluster: 33, Endpoint: null, DeviceType: 44 }, + ], + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "3", + AuthMode: "3", + Subjects: [555, 666, 777, 888], + Targets: + [ + { Cluster: 55, Endpoint: 66, DeviceType: null }, + { Cluster: 77, Endpoint: null, DeviceType: 88 }, + ], + FabricIndex: CurrentFabricIndex, + }, + ] + + - label: "Step 9:TH1 reads AccessControl cluster ACL attribute" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol read acl 1 0 - On TH1(Chiptool), Verify that the AccessControlEntryStruct contains 3 elements - - - [1657278053.764924][2231:2236] CHIP:DMG: SuppressResponse = true, - [1657278053.764958][2231:2236] CHIP:DMG: InteractionModelRevision = 1 - [1657278053.764989][2231:2236] CHIP:DMG: } - [1657278053.765924][2231:2236] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 48629793 - [1657278053.766111][2231:2236] CHIP:TOO: ACL: 3 entries - [1657278053.766188][2231:2236] CHIP:TOO: [1]: { - [1657278053.766239][2231:2236] CHIP:TOO: Privilege: 5 - [1657278053.766301][2231:2236] CHIP:TOO: AuthMode: 2 - [1657278053.766339][2231:2236] CHIP:TOO: Subjects: 1 entries - [1657278053.766378][2231:2236] CHIP:TOO: [1]: 112233 - [1657278053.766413][2231:2236] CHIP:TOO: Targets: null - [1657278053.766444][2231:2236] CHIP:TOO: FabricIndex: 1 - [1657278053.766473][2231:2236] CHIP:TOO: } - [1657278053.766525][2231:2236] CHIP:TOO: [2]: { - [1657278053.766557][2231:2236] CHIP:TOO: Privilege: 1 - [1657278053.766587][2231:2236] CHIP:TOO: AuthMode: 2 - [1657278053.766622][2231:2236] CHIP:TOO: Subjects: 4 entries - [1657278053.766657][2231:2236] CHIP:TOO: [1]: 111 - [1657278053.766690][2231:2236] CHIP:TOO: [2]: 222 - [1657278053.766723][2231:2236] CHIP:TOO: [3]: 333 - [1657278053.766756][2231:2236] CHIP:TOO: [4]: 444 - [1657278053.766797][2231:2236] CHIP:TOO: Targets: 2 entries - [1657278053.766894][2231:2236] CHIP:TOO: [1]: { - [1657278053.766929][2231:2236] CHIP:TOO: Cluster: 11 - [1657278053.766960][2231:2236] CHIP:TOO: Endpoint: 22 - [1657278053.766991][2231:2236] CHIP:TOO: DeviceType: null - [1657278053.767020][2231:2236] CHIP:TOO: } - [1657278053.767058][2231:2236] CHIP:TOO: [2]: { - [1657278053.767090][2231:2236] CHIP:TOO: Cluster: 33 - [1657278053.767120][2231:2236] CHIP:TOO: Endpoint: null - [1657278053.767150][2231:2236] CHIP:TOO: DeviceType: 44 - [1657278053.767180][2231:2236] CHIP:TOO: } - [1657278053.767212][2231:2236] CHIP:TOO: FabricIndex: 1 - [1657278053.767242][2231:2236] CHIP:TOO: } - [1657278053.767291][2231:2236] CHIP:TOO: [3]: { - [1657278053.767342][2231:2236] CHIP:TOO: Privilege: 3 - [1657278053.767405][2231:2236] CHIP:TOO: AuthMode: 3 - [1657278053.767441][2231:2236] CHIP:TOO: Subjects: 4 entries - [1657278053.767476][2231:2236] CHIP:TOO: [1]: 555 - [1657278053.767510][2231:2236] CHIP:TOO: [2]: 666 - [1657278053.767542][2231:2236] CHIP:TOO: [3]: 777 - [1657278053.767575][2231:2236] CHIP:TOO: [4]: 888 - [1657278053.767616][2231:2236] CHIP:TOO: Targets: 2 entries - [1657278053.767657][2231:2236] CHIP:TOO: [1]: { - [1657278053.767689][2231:2236] CHIP:TOO: Cluster: 55 - [1657278053.767718][2231:2236] CHIP:TOO: Endpoint: 66 - [1657278053.767747][2231:2236] CHIP:TOO: DeviceType: null - [1657278053.767776][2231:2236] CHIP:TOO: } - [1657278053.767815][2231:2236] CHIP:TOO: [2]: { - [1657278053.767847][2231:2236] CHIP:TOO: Cluster: 77 - [1657278053.767877][2231:2236] CHIP:TOO: Endpoint: null - [1657278053.767907][2231:2236] CHIP:TOO: DeviceType: 88 - [1657278053.767937][2231:2236] CHIP:TOO: } - [1657278053.767976][2231:2236] CHIP:TOO: FabricIndex: 1 - [1657278053.768006][2231:2236] CHIP:TOO: } - [1657278053.768136][2231:2236] CHIP:EM: Sending Standalone Ack for MessageCounter:257683535 on exchange 36353i - [1657278053.768226][2231:2236] CHIP:IN: Prepared secure message 0xffffb14f6958 to 0x0000000000000001 (1) of type 0x10 and protocolId (0, 0) on exchange 36353i with MessageCounter:185472810. - [1657278053.768279][2231:2236] CHIP:IN: Sending encryp - disabled: true + command: "readAttribute" + attribute: "ACL" + response: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [CommissionerNodeId], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "1", + AuthMode: "2", + Subjects: [111, 222, 333, 444], + Targets: + [ + { Cluster: 11, Endpoint: 22, DeviceType: null }, + { Cluster: 33, Endpoint: null, DeviceType: 44 }, + ], + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "3", + AuthMode: "3", + Subjects: [555, 666, 777, 888], + Targets: + [ + { Cluster: 55, Endpoint: 66, DeviceType: null }, + { Cluster: 77, Endpoint: null, DeviceType: 88 }, + ], + FabricIndex: CurrentFabricIndex, + }, + ] - label: - "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 3 elements 1.struct - Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null 2.struct Privilege field: View (1) - AuthMode field: CASE (2) Subjects field: null Targets field: + "Step 10:TH1 writes DUT Endpoint 0 AccessControl cluster ACL + attribute, value is list of AccessControlEntryStruct containing 3 + elements 1.struct Privilege field: Administer (5) AuthMode field: CASE + (2) Subjects field: [N1] Targets field: null 2.struct Privilege field: + View (1) AuthMode field: CASE (2) Subjects field: null Targets field: [{Cluster: 11, Endpoint: 22}, {Cluster: 33, DeviceType: 44}] 3.struct Privilege field: Operate (3) AuthMode field: Group (3) Subjects field: null Targets field: [{Cluster: 55, Endpoint: 66}, {Cluster: 77, DeviceType: 88}]" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 1, "authMode": 2, "subjects": null, "targets":[{ "cluster": 11, "endpoint": 22, "deviceType": null },{ "cluster": 33, "endpoint": null, "deviceType": 44 }]}, { "privilege": 3, "authMode": 3, "subjects": null, "targets":[{ "cluster": 55, "endpoint": 66, "deviceType": null },{ "cluster": 77, "endpoint": null, "deviceType": 88 }]}]' 1 0 - On TH1(Chiptool) , Verify that the status is success when writing the AccessControl cluster ACL attribute with 3 elements - - [1657541707.114348][3004:3009] CHIP:DMG: { - [1657541707.114393][3004:3009] CHIP:DMG: AttributeStatusIBs = - [1657541707.114467][3004:3009] CHIP:DMG: [ - [1657541707.114526][3004:3009] CHIP:DMG: AttributeStatusIB = - [1657541707.114591][3004:3009] CHIP:DMG: { - [1657541707.114653][3004:3009] CHIP:DMG: AttributePathIB = - [1657541707.114729][3004:3009] CHIP:DMG: { - [1657541707.114821][3004:3009] CHIP:DMG: Endpoint = 0x0, - [1657541707.114911][3004:3009] CHIP:DMG: Cluster = 0x1f, - [1657541707.114989][3004:3009] CHIP:DMG: Attribute = 0x0000_0000, - [1657541707.115066][3004:3009] CHIP:DMG: } - [1657541707.115150][3004:3009] CHIP:DMG: - [1657541707.115221][3004:3009] CHIP:DMG: StatusIB = - [1657541707.115297][3004:3009] CHIP:DMG: { - [1657541707.115371][3004:3009] CHIP:DMG: status = 0x00 (SUCCESS), - [1657541707.115447][3004:3009] CHIP:DMG: }, - [1657541707.115521][3004:3009] CHIP:DMG: - [1657541707.115587][3004:3009] CHIP:DMG: }, - [1657541707.115680][3004:3009] CHIP:DMG: - [1657541707.115739][3004:3009] CHIP:DMG: AttributeStatusIB = - [1657541707.115807][3004:3009] CHIP:DMG: { - [1657541707.115868][3004:3009] CHIP:DMG: AttributePathIB = - [1657541707.115939][3004:3009] CHIP:DMG: { - [1657541707.116024][3004:3009] CHIP:DMG: Endpoint = 0x0, - [1657541707.116104][3004:3009] CHIP:DMG: Cluster = 0x1f, - [1657541707.116192][3004:3009] CHIP:DMG: Attribute = 0x0000_0000, - [1657541707.116270][3004:3009] CHIP:DMG: ListIndex = Null, - [1657541707.116352][3004:3009] CHIP:DMG: } - [1657541707.116433][3004:3009] CHIP:DMG: - [1657541707.116513][3004:3009] CHIP:DMG: StatusIB = - [1657541707.116585][3004:3009] CHIP:DMG: { - [1657541707.116662][3004:3009] CHIP:DMG: status = 0x00 (SUCCESS), - [1657541707.116737][3004:3009] CHIP:DMG: }, - [1657541707.116809][3004:3009] CHIP:DMG: - [1657541707.116869][3004:3009] CHIP:DMG: }, - [1657541707.116998][3004:3009] CHIP:DMG: - [1657541707.117058][3004:3009] CHIP:DMG: AttributeStatusIB = - [1657541707.117123][3004:3009] CHIP:DMG: { - [1657541707.117184][3004:3009] CHIP:DMG: AttributePathIB = - [1657541707.117256][3004:3009] CHIP:DMG: { - [1657541707.117330][3004:3009] CHIP:DMG: Endpoint = 0x0, - [1657541707.117409][3004:3009] CHIP:DMG: Cluster = 0x1f, - [1657541707.117489][3004:3009] CHIP:DMG: Attribute = 0x0000_0000, - [1657541707.117566][3004:3009] CHIP:DMG: ListIndex = Null, - [1657541707.117648][3004:3009] CHIP:DMG: } - [1657541707.117729][3004:3009] CHIP:DMG: - [1657541707.117799][3004:3009] CHIP:DMG: StatusIB = - [1657541707.117873][3004:3009] CHIP:DMG: { - [1657541707.117946][3004:3009] CHIP:DMG: status = 0x00 (SUCCESS), - [1657541707.118019][3004:3009] CHIP:DMG: }, - [1657541707.118092][3004:3009] CHIP:DMG: - [1657541707.118157][3004:3009] CHIP:DMG: }, - [1657541707.118240][3004:3009] CHIP:DMG: - [1657541707.118298][3004:3009] CHIP:DMG: AttributeStatusIB = - [1657541707.118362][3004:3009] CHIP:DMG: { - [1657541707.118423][3004:3009] CHIP:DMG: AttributePathIB = - [1657541707.118494][3004:3009] CHIP:DMG: { - [1657541707.118567][3004:3009] CHIP:DMG: Endpoint = 0x0, - [1657541707.118646][3004:3009] CHIP:DMG: Cluster = 0x1f, - [1657541707.118723][3004:3009] CHIP:DMG: Attribute = 0x0000_0000, - [1657541707.118807][3004:3009] CHIP:DMG: ListIndex = Null, - [1657541707.118882][3004:3009] CHIP:DMG: } - [1657541707.118963][3004:3009] CHIP:DMG: - [1657541707.119033][3004:3009] CHIP:DMG: StatusIB = - [1657541707.119108][3004:3009] CHIP:DMG: { - [1657541707.119182][3004:3009] CHIP:DMG: status = 0x00 (SUCCESS), - [1657541707.119255][3004:3009] CHIP:DMG: }, - [1657541707.119330][3004:3009] CHIP:DMG: - [1657541707.119391][3004:3009] CHIP:DMG: }, - [1657541707.119462][3004:3009] CHIP:DMG: - [1657541707.119518][3004:3009] CHIP:DMG: ], - [1657541707.119614][3004:3009] CHIP:DMG: - [1657541707.119672][3004:3009] CHIP:DMG: InteractionModelRevision = 1 - [1657541707.119729][3004:3009] CHIP:DMG: } - disabled: true - - - label: "TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute" + command: "writeAttribute" + attribute: "ACL" + arguments: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [CommissionerNodeId], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "1", + AuthMode: "2", + Subjects: null, + Targets: + [ + { Cluster: 11, Endpoint: 22, DeviceType: null }, + { Cluster: 33, Endpoint: null, DeviceType: 44 }, + ], + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "3", + AuthMode: "3", + Subjects: null, + Targets: + [ + { Cluster: 55, Endpoint: 66, DeviceType: null }, + { Cluster: 77, Endpoint: null, DeviceType: 88 }, + ], + FabricIndex: CurrentFabricIndex, + }, + ] + + - label: "Step 11:TH1 reads AccessControl cluster ACL attribute" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol read acl 1 0 - On TH1(Chiptool) , Verify that the AccessControlEntryStruct contains 3 elements - - [1657278352.938811][2258:2263] CHIP:DMG: - [1657278352.938840][2258:2263] CHIP:DMG: }, - [1657278352.938877][2258:2263] CHIP:DMG: - [1657278352.938902][2258:2263] CHIP:DMG: ], - [1657278352.938961][2258:2263] CHIP:DMG: - [1657278352.938987][2258:2263] CHIP:DMG: SuppressResponse = true, - [1657278352.939013][2258:2263] CHIP:DMG: InteractionModelRevision = 1 - [1657278352.939038][2258:2263] CHIP:DMG: } - [1657278352.939574][2258:2263] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 48629797 - [1657278352.939666][2258:2263] CHIP:TOO: ACL: 3 entries - [1657278352.939725][2258:2263] CHIP:TOO: [1]: { - [1657278352.939765][2258:2263] CHIP:TOO: Privilege: 5 - [1657278352.939790][2258:2263] CHIP:TOO: AuthMode: 2 - [1657278352.939818][2258:2263] CHIP:TOO: Subjects: 1 entries - [1657278352.939849][2258:2263] CHIP:TOO: [1]: 112233 - [1657278352.939876][2258:2263] CHIP:TOO: Targets: null - [1657278352.939900][2258:2263] CHIP:TOO: FabricIndex: 1 - [1657278352.939924][2258:2263] CHIP:TOO: } - [1657278352.939961][2258:2263] CHIP:TOO: [2]: { - [1657278352.939986][2258:2263] CHIP:TOO: Privilege: 1 - [1657278352.940009][2258:2263] CHIP:TOO: AuthMode: 2 - [1657278352.940033][2258:2263] CHIP:TOO: Subjects: null - [1657278352.940063][2258:2263] CHIP:TOO: Targets: 2 entries - [1657278352.940115][2258:2263] CHIP:TOO: [1]: { - [1657278352.940142][2258:2263] CHIP:TOO: Cluster: 11 - [1657278352.940166][2258:2263] CHIP:TOO: Endpoint: 22 - [1657278352.940190][2258:2263] CHIP:TOO: DeviceType: null - [1657278352.940213][2258:2263] CHIP:TOO: } - [1657278352.940243][2258:2263] CHIP:TOO: [2]: { - [1657278352.940268][2258:2263] CHIP:TOO: Cluster: 33 - [1657278352.940292][2258:2263] CHIP:TOO: Endpoint: null - [1657278352.940315][2258:2263] CHIP:TOO: DeviceType: 44 - [1657278352.940338][2258:2263] CHIP:TOO: } - [1657278352.940364][2258:2263] CHIP:TOO: FabricIndex: 1 - [1657278352.940387][2258:2263] CHIP:TOO: } - [1657278352.940423][2258:2263] CHIP:TOO: [3]: { - [1657278352.940447][2258:2263] CHIP:TOO: Privilege: 3 - [1657278352.940471][2258:2263] CHIP:TOO: AuthMode: 3 - [1657278352.940495][2258:2263] CHIP:TOO: Subjects: null - [1657278352.940524][2258:2263] CHIP:TOO: Targets: 2 entries - [1657278352.940557][2258:2263] CHIP:TOO: [1]: { - [1657278352.940582][2258:2263] CHIP:TOO: Cluster: 55 - [1657278352.940605][2258:2263] CHIP:TOO: Endpoint: 66 - [1657278352.940629][2258:2263] CHIP:TOO: DeviceType: null - [1657278352.940652][2258:2263] CHIP:TOO: } - [1657278352.940682][2258:2263] CHIP:TOO: [2]: { - [1657278352.940707][2258:2263] CHIP:TOO: Cluster: 77 - [1657278352.940730][2258:2263] CHIP:TOO: Endpoint: null - [1657278352.940754][2258:2263] CHIP:TOO: DeviceType: 88 - [1657278352.940778][2258:2263] CHIP:TOO: } - [1657278352.940803][2258:2263] CHIP:TOO: FabricIndex: 1 - [1657278352.940827][2258:2263] CHIP:TOO: } - [1657278352.940927][2258:2263] CHIP:EM: Sending Standalone Ack for MessageCounter:24324095 on exchange 31403i - [1657278352.941010][2258:2263] CHIP:IN: Prepared secure message 0xffff8 - disabled: true + command: "readAttribute" + attribute: "ACL" + response: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [CommissionerNodeId], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "1", + AuthMode: "2", + Subjects: null, + Targets: + [ + { Cluster: 11, Endpoint: 22, DeviceType: null }, + { Cluster: 33, Endpoint: null, DeviceType: 44 }, + ], + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "3", + AuthMode: "3", + Subjects: null, + Targets: + [ + { Cluster: 55, Endpoint: 66, DeviceType: null }, + { Cluster: 77, Endpoint: null, DeviceType: 88 }, + ], + FabricIndex: CurrentFabricIndex, + }, + ] - label: - "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 3 elements 1.struct - Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null 2.struct Privilege field: View (1) - AuthMode field: CASE (2) Subjects field: [111, 222, 333, 444] Targets - field: null 3.struct Privilege field: Operate (3) AuthMode field: - Group (3) Subjects field: [555, 666, 777, 888] Targets field: null" + "Step 12:TH1 writes DUT Endpoint 0 AccessControl cluster ACL + attribute, value is list of AccessControlEntryStruct containing 3 + elements 1.struct Privilege field: Administer (5) AuthMode field: CASE + (2) Subjects field: [N1] Targets field: null 2.struct Privilege field: + View (1) AuthMode field: CASE (2) Subjects field: [111, 222, 333, 444] + Targets field: null 3.struct Privilege field: Operate (3) AuthMode + field: Group (3) Subjects field: [555, 666, 777, 888] Targets field: + null" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - { "privilege": 1, "authMode": 2, "subjects": [111, 222, 333, 444], "targets": null}, - { "privilege": 3, "authMode": 3, "subjects": [555, 666, 777, 888], "targets": null}]' 1 0 - On TH1(Chiptool) , Verify that the status is success when writing the AccessControl cluster ACL attribute with 3 elements with Target as Null. - - [1657542060.230268][3398:3403] CHIP:DMG: { - [1657542060.230322][3398:3403] CHIP:DMG: AttributeStatusIBs = - [1657542060.230396][3398:3403] CHIP:DMG: [ - [1657542060.230456][3398:3403] CHIP:DMG: AttributeStatusIB = - [1657542060.230522][3398:3403] CHIP:DMG: { - [1657542060.230585][3398:3403] CHIP:DMG: AttributePathIB = - [1657542060.230662][3398:3403] CHIP:DMG: { - [1657542060.230740][3398:3403] CHIP:DMG: Endpoint = 0x0, - [1657542060.230830][3398:3403] CHIP:DMG: Cluster = 0x1f, - [1657542060.230911][3398:3403] CHIP:DMG: Attribute = 0x0000_0000, - [1657542060.230985][3398:3403] CHIP:DMG: } - [1657542060.231068][3398:3403] CHIP:DMG: - [1657542060.231139][3398:3403] CHIP:DMG: StatusIB = - [1657542060.231216][3398:3403] CHIP:DMG: { - [1657542060.231291][3398:3403] CHIP:DMG: status = 0x00 (SUCCESS), - [1657542060.231367][3398:3403] CHIP:DMG: }, - [1657542060.231437][3398:3403] CHIP:DMG: - [1657542060.231498][3398:3403] CHIP:DMG: }, - [1657542060.231583][3398:3403] CHIP:DMG: - [1657542060.231642][3398:3403] CHIP:DMG: AttributeStatusIB = - [1657542060.231706][3398:3403] CHIP:DMG: { - [1657542060.231767][3398:3403] CHIP:DMG: AttributePathIB = - [1657542060.231839][3398:3403] CHIP:DMG: { - [1657542060.231914][3398:3403] CHIP:DMG: Endpoint = 0x0, - [1657542060.232002][3398:3403] CHIP:DMG: Cluster = 0x1f, - [1657542060.232081][3398:3403] CHIP:DMG: Attribute = 0x0000_0000, - [1657542060.232160][3398:3403] CHIP:DMG: ListIndex = Null, - [1657542060.232243][3398:3403] CHIP:DMG: } - [1657542060.232325][3398:3403] CHIP:DMG: - [1657542060.232395][3398:3403] CHIP:DMG: StatusIB = - [1657542060.232468][3398:3403] CHIP:DMG: { - [1657542060.232543][3398:3403] CHIP:DMG: status = 0x00 (SUCCESS), - [1657542060.232624][3398:3403] CHIP:DMG: }, - [1657542060.232695][3398:3403] CHIP:DMG: - [1657542060.232757][3398:3403] CHIP:DMG: }, - [1657542060.232843][3398:3403] CHIP:DMG: - [1657542060.232987][3398:3403] CHIP:DMG: AttributeStatusIB = - [1657542060.233057][3398:3403] CHIP:DMG: { - [1657542060.233120][3398:3403] CHIP:DMG: AttributePathIB = - [1657542060.233192][3398:3403] CHIP:DMG: { - [1657542060.233270][3398:3403] CHIP:DMG: Endpoint = 0x0, - [1657542060.233353][3398:3403] CHIP:DMG: Cluster = 0x1f, - [1657542060.233437][3398:3403] CHIP:DMG: Attribute = 0x0000_0000, - [1657542060.233515][3398:3403] CHIP:DMG: ListIndex = Null, - [1657542060.233590][3398:3403] CHIP:DMG: } - [1657542060.233673][3398:3403] CHIP:DMG: - [1657542060.233744][3398:3403] CHIP:DMG: StatusIB = - [1657542060.233818][3398:3403] CHIP:DMG: { - [1657542060.233892][3398:3403] CHIP:DMG: status = 0x00 (SUCCESS), - [1657542060.233967][3398:3403] CHIP:DMG: }, - [1657542060.234041][3398:3403] CHIP:DMG: - [1657542060.234102][3398:3403] CHIP:DMG: }, - [1657542060.234188][3398:3403] CHIP:DMG: - [1657542060.234248][3398:3403] CHIP:DMG: AttributeStatusIB = - [1657542060.234313][3398:3403] CHIP:DMG: { - [1657542060.234375][3398:3403] CHIP:DMG: AttributePathIB = - [1657542060.234448][3398:3403] CHIP:DMG: { - [1657542060.234520][3398:3403] CHIP:DMG: Endpoint = 0x0, - [1657542060.234594][3398:3403] CHIP:DMG: Cluster = 0x1f, - [1657542060.234680][3398:3403] CHIP:DMG: Attribute = 0x0000_0000, - [1657542060.234758][3398:3403] CHIP:DMG: ListIndex = Null, - [1657542060.234831][3398:3403] CHIP:DMG: } - [1657542060.234912][3398:3403] CHIP:DMG: - [1657542060.234982][3398:3403] CHIP:DMG: StatusIB = - [1657542060.235054][3398:3403] CHIP:DMG: { - [1657542060.235124][3398:3403] CHIP:DMG: status = 0x00 (SUCCESS), - [1657542060.235197][3398:3403] CHIP:DMG: }, - [1657542060.235269][3398:3403] CHIP:DMG: - [1657542060.235330][3398:3403] CHIP:DMG: }, - [1657542060.235402][3398:3403] CHIP:DMG: - [1657542060.235574][3398:3403] CHIP:DMG: ], - [1657542060.235679][3398:3403] CHIP:DMG: - [1657542060.235739][3398:3403] CHIP:DMG: InteractionModelRevision = 1 - [1657542060.235796][3398:3403] CHIP:DMG: } - disabled: true - - - label: "TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute" + command: "writeAttribute" + attribute: "ACL" + arguments: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [CommissionerNodeId], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "1", + AuthMode: "2", + Subjects: [111, 222, 333, 444], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "3", + AuthMode: "3", + Subjects: [555, 666, 777, 888], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + ] + + - label: "Step 13:TH1 reads AccessControl cluster ACL attribute" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol read acl 1 0 - On TH1(Chiptool) , Verify that the AccessControlEntryStruct contains 3 elements with Target as null - [1656656511.643560][2994:2999] CHIP:DMG: - [1656656511.643593][2994:2999] CHIP:DMG: SuppressResponse = true, - [1656656511.643626][2994:2999] CHIP:DMG: InteractionModelRevision = 1 - [1656656511.643660][2994:2999] CHIP:DMG: } - [1656656511.644242][2994:2999] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 3780432418 - [1656656511.644370][2994:2999] CHIP:TOO: ACL: 3 entries - [1656656511.644443][2994:2999] CHIP:TOO: [1]: { - [1656656511.644494][2994:2999] CHIP:TOO: Privilege: 5 - [1656656511.644527][2994:2999] CHIP:TOO: AuthMode: 2 - [1656656511.644562][2994:2999] CHIP:TOO: Subjects: 1 entries - [1656656511.644601][2994:2999] CHIP:TOO: [1]: 112233 - [1656656511.644636][2994:2999] CHIP:TOO: Targets: null - [1656656511.644667][2994:2999] CHIP:TOO: FabricIndex: 1 - [1656656511.644697][2994:2999] CHIP:TOO: } - [1656656511.644741][2994:2999] CHIP:TOO: [2]: { - [1656656511.644773][2994:2999] CHIP:TOO: Privilege: 1 - [1656656511.644804][2994:2999] CHIP:TOO: AuthMode: 2 - [1656656511.644841][2994:2999] CHIP:TOO: Subjects: 4 entries - [1656656511.644875][2994:2999] CHIP:TOO: [1]: 111 - [1656656511.644909][2994:2999] CHIP:TOO: [2]: 222 - [1656656511.644943][2994:2999] CHIP:TOO: [3]: 333 - [1656656511.644976][2994:2999] CHIP:TOO: [4]: 444 - [1656656511.645008][2994:2999] CHIP:TOO: Targets: null - [1656656511.645039][2994:2999] CHIP:TOO: FabricIndex: 1 - [1656656511.645068][2994:2999] CHIP:TOO: } - [1656656511.645110][2994:2999] CHIP:TOO: [3]: { - [1656656511.645142][2994:2999] CHIP:TOO: Privilege: 3 - [1656656511.645172][2994:2999] CHIP:TOO: AuthMode: 3 - [1656656511.645208][2994:2999] CHIP:TOO: Subjects: 4 entries - [1656656511.645243][2994:2999] CHIP:TOO: [1]: 555 - [1656656511.645277][2994:2999] CHIP:TOO: [2]: 666 - [1656656511.645310][2994:2999] CHIP:TOO: [3]: 777 - [1656656511.645343][2994:2999] CHIP:TOO: [4]: 888 - [1656656511.645410][2994:2999] CHIP:TOO: Targets: null - [1656656511.645444][2994:2999] CHIP:TOO: FabricIndex: 1 - [1656656511.645473][2994:2999] CHIP:TOO: } - [1656656511.645588][2994:2999] CHIP:EM: Sending Standalone Ack for MessageCounter:40566460 on exchange 2764i - disabled: true + command: "readAttribute" + attribute: "ACL" + response: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [CommissionerNodeId], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "1", + AuthMode: "2", + Subjects: [111, 222, 333, 444], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "3", + AuthMode: "3", + Subjects: [555, 666, 777, 888], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + ] - label: - "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 2 elements 1.struct - Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null 2.struct Privilege field: Operate (3) - AuthMode field: Group (3) Subjects field: null Targets field: null" + "Step 14:TH1 writes DUT Endpoint 0 AccessControl cluster ACL + attribute, value is list of AccessControlEntryStruct containing 2 + elements 1.struct Privilege field: Administer (5) AuthMode field: CASE + (2) Subjects field: [N1] Targets field: null 2.struct Privilege field: + Operate (3) AuthMode field: Group (3) Subjects field: null Targets + field: null" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - { "privilege": 3, "authMode": 3, "subjects": null, "targets": null}]' 1 0 - On TH1(Chiptool) , Verify that the status is success when writing the AccessControl cluster ACL attribute with 2 elements - - [1656507141.628453][3224:3229] CHIP:DMG: WriteResponseMessage = - [1656507141.628515][3224:3229] CHIP:DMG: { - [1656507141.628569][3224:3229] CHIP:DMG: AttributeStatusIBs = - [1656507141.628644][3224:3229] CHIP:DMG: [ - [1656507141.628705][3224:3229] CHIP:DMG: AttributeStatusIB = - [1656507141.628772][3224:3229] CHIP:DMG: { - [1656507141.628835][3224:3229] CHIP:DMG: AttributePathIB = - [1656507141.628912][3224:3229] CHIP:DMG: { - [1656507141.628990][3224:3229] CHIP:DMG: Endpoint = 0x0, - [1656507141.629075][3224:3229] CHIP:DMG: Cluster = 0x1f, - [1656507141.629156][3224:3229] CHIP:DMG: Attribute = 0x0000_0000, - [1656507141.629239][3224:3229] CHIP:DMG: } - [1656507141.629323][3224:3229] CHIP:DMG: - [1656507141.629395][3224:3229] CHIP:DMG: StatusIB = - [1656507141.629469][3224:3229] CHIP:DMG: { - [1656507141.629546][3224:3229] CHIP:DMG: status = 0x00 (SUCCESS), - [1656507141.629620][3224:3229] CHIP:DMG: }, - [1656507141.629741][3224:3229] CHIP:DMG: - [1656507141.629807][3224:3229] CHIP:DMG: }, - [1656507141.629893][3224:3229] CHIP:DMG: - [1656507141.629953][3224:3229] CHIP:DMG: AttributeStatusIB = - [1656507141.630023][3224:3229] CHIP:DMG: { - [1656507141.630085][3224:3229] CHIP:DMG: AttributePathIB = - [1656507141.630159][3224:3229] CHIP:DMG: { - [1656507141.630235][3224:3229] CHIP:DMG: Endpoint = 0x0, - [1656507141.630322][3224:3229] CHIP:DMG: Cluster = 0x1f, - [1656507141.630405][3224:3229] CHIP:DMG: Attribute = 0x0000_0000, - [1656507141.630485][3224:3229] CHIP:DMG: ListIndex = Null, - [1656507141.630560][3224:3229] CHIP:DMG: } - [1656507141.630643][3224:3229] CHIP:DMG: - [1656507141.630717][3224:3229] CHIP:DMG: StatusIB = - [1656507141.630790][3224:3229] CHIP:DMG: { - [1656507141.630863][3224:3229] CHIP:DMG: status = 0x00 (SUCCESS), - [1656507141.630939][3224:3229] CHIP:DMG: }, - [1656507141.631014][3224:3229] CHIP:DMG: - [1656507141.631080][3224:3229] CHIP:DMG: }, - [1656507141.631167][3224:3229] CHIP:DMG: - [1656507141.631227][3224:3229] CHIP:DMG: AttributeStatusIB = - [1656507141.631291][3224:3229] CHIP:DMG: { - [1656507141.631353][3224:3229] CHIP:DMG: AttributePathIB = - [1656507141.631426][3224:3229] CHIP:DMG: { - [1656507141.631501][3224:3229] CHIP:DMG: Endpoint = 0x0, - [1656507141.631584][3224:3229] CHIP:DMG: Cluster = 0x1f, - [1656507141.631664][3224:3229] CHIP:DMG: Attribute = 0x0000_0000, - [1656507141.631742][3224:3229] CHIP:DMG: ListIndex = Null, - [1656507141.631824][3224:3229] CHIP:DMG: } - [1656507141.631906][3224:3229] CHIP:DMG: - [1656507141.631978][3224:3229] CHIP:DMG: StatusIB = - [1656507141.632050][3224:3229] CHIP:DMG: { - [1656507141.632125][3224:3229] CHIP:DMG: status = 0x00 (SUCCESS), - [1656507141.632201][3224:3229] CHIP:DMG: }, - [1656507141.632275][3224:3229] CHIP:DMG: - [1656507141.632342][3224:3229] CHIP:DMG: }, - [1656507141.632413][3224:3229] CHIP:DMG: - [1656507141.632472][3224:3229] CHIP:DMG: ], - [1656507141.632560][3224:3229] CHIP:DMG: - [1656507141.632619][3224:3229] CHIP:DMG: InteractionModelRevision = 1 - [1656507141.632677][3224:3229] CHIP:DMG: } - [1656507141.632967][3224:3229] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1656507141.633086][3224:3229] CHIP:EM: Sending Standalone Ack for MessageCounter:55155306 on exchange 54804i - disabled: true - - - label: "TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute" + command: "writeAttribute" + attribute: "ACL" + arguments: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [CommissionerNodeId], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "3", + AuthMode: "3", + Subjects: null, + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + ] + + - label: "Step 15:TH1 reads AccessControl cluster ACL attribute" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol read acl 1 0 - On TH1(Chiptool) , Verify that the AccessControlEntryStruct contains 2 elements with Subject and Target as null - - [1656507318.740283][3241:3246] CHIP:DMG: ], - [1656507318.740346][3241:3246] CHIP:DMG: - [1656507318.740383][3241:3246] CHIP:DMG: SuppressResponse = true, - [1656507318.740420][3241:3246] CHIP:DMG: InteractionModelRevision = 1 - [1656507318.740454][3241:3246] CHIP:DMG: } - [1656507318.740920][3241:3246] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 3101344021 - [1656507318.741009][3241:3246] CHIP:TOO: ACL: 2 entries - [1656507318.741086][3241:3246] CHIP:TOO: [1]: { - [1656507318.741142][3241:3246] CHIP:TOO: Privilege: 5 - [1656507318.741177][3241:3246] CHIP:TOO: AuthMode: 2 - [1656507318.741216][3241:3246] CHIP:TOO: Subjects: 1 entries - [1656507318.741258][3241:3246] CHIP:TOO: [1]: 112233 - [1656507318.741296][3241:3246] CHIP:TOO: Targets: null - [1656507318.741331][3241:3246] CHIP:TOO: FabricIndex: 1 - [1656507318.741363][3241:3246] CHIP:TOO: } - [1656507318.741408][3241:3246] CHIP:TOO: [2]: { - [1656507318.741442][3241:3246] CHIP:TOO: Privilege: 3 - [1656507318.741475][3241:3246] CHIP:TOO: AuthMode: 3 - [1656507318.741508][3241:3246] CHIP:TOO: Subjects: null - [1656507318.741540][3241:3246] CHIP:TOO: Targets: null - [1656507318.741573][3241:3246] CHIP:TOO: FabricIndex: 1 - [1656507318.741605][3241:3246] CHIP:TOO: } - [1656507318.741742][3241:3246] CHIP:EM: Sending Standalone Ack for MessageCounter:173222401 on exchange 19903i - disabled: true + command: "readAttribute" + attribute: "ACL" + response: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [CommissionerNodeId], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "3", + AuthMode: "3", + Subjects: null, + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + ] - label: - "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 2 elements 1.struct - Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null 2.struct Privilege field: ProxyView - (2) AuthMode field: CASE (2) Subjects field: null Targets field: null" + "Step 16:TH1 writes DUT Endpoint 0 AccessControl cluster ACL + attribute, value is list of AccessControlEntryStruct containing 2 + elements 1.struct Privilege field: Administer (5) AuthMode field: CASE + (2) Subjects field: [N1] Targets field: null 2.struct Privilege field: + ProxyView (2) AuthMode field: CASE (2) Subjects field: null Targets + field: null" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - { "privilege": 2, "authMode": 2, "subjects": null, "targets": null}]' 1 0 - On TH1(Chiptool), Verify that the status is Success when writing the AccessControl cluster ACL attribute with a value is list of AccessControlEntryStruct containing 2 elements as Subject and Target as null - [1656507439.868495][3249:3254] CHIP:DMG: WriteClient moving to [ResponseRe] - [1656507439.868612][3249:3254] CHIP:DMG: WriteResponseMessage = - [1656507439.868671][3249:3254] CHIP:DMG: { - [1656507439.868725][3249:3254] CHIP:DMG: AttributeStatusIBs = - [1656507439.868800][3249:3254] CHIP:DMG: [ - [1656507439.868860][3249:3254] CHIP:DMG: AttributeStatusIB = - [1656507439.868926][3249:3254] CHIP:DMG: { - [1656507439.868988][3249:3254] CHIP:DMG: AttributePathIB = - [1656507439.869069][3249:3254] CHIP:DMG: { - [1656507439.869147][3249:3254] CHIP:DMG: Endpoint = 0x0, - [1656507439.869230][3249:3254] CHIP:DMG: Cluster = 0x1f, - [1656507439.869311][3249:3254] CHIP:DMG: Attribute = 0x0000_0000, - [1656507439.869387][3249:3254] CHIP:DMG: } - [1656507439.869470][3249:3254] CHIP:DMG: - [1656507439.869546][3249:3254] CHIP:DMG: StatusIB = - [1656507439.869620][3249:3254] CHIP:DMG: { - [1656507439.869765][3249:3254] CHIP:DMG: status = 0x00 (SUCCESS), - [1656507439.869846][3249:3254] CHIP:DMG: }, - [1656507439.869924][3249:3254] CHIP:DMG: - [1656507439.869992][3249:3254] CHIP:DMG: }, - [1656507439.870082][3249:3254] CHIP:DMG: - [1656507439.870141][3249:3254] CHIP:DMG: AttributeStatusIB = - [1656507439.870211][3249:3254] CHIP:DMG: { - [1656507439.870277][3249:3254] CHIP:DMG: AttributePathIB = - [1656507439.870352][3249:3254] CHIP:DMG: { - [1656507439.870427][3249:3254] CHIP:DMG: Endpoint = 0x0, - [1656507439.870507][3249:3254] CHIP:DMG: Cluster = 0x1f, - [1656507439.870588][3249:3254] CHIP:DMG: Attribute = 0x0000_0000, - [1656507439.870667][3249:3254] CHIP:DMG: ListIndex = Null, - [1656507439.870742][3249:3254] CHIP:DMG: } - [1656507439.870827][3249:3254] CHIP:DMG: - [1656507439.870902][3249:3254] CHIP:DMG: StatusIB = - [1656507439.870975][3249:3254] CHIP:DMG: { - [1656507439.871048][3249:3254] CHIP:DMG: status = 0x00 (SUCCESS), - [1656507439.871131][3249:3254] CHIP:DMG: }, - [1656507439.871204][3249:3254] CHIP:DMG: - [1656507439.871269][3249:3254] CHIP:DMG: }, - [1656507439.871354][3249:3254] CHIP:DMG: - [1656507439.871413][3249:3254] CHIP:DMG: AttributeStatusIB = - [1656507439.871477][3249:3254] CHIP:DMG: { - [1656507439.871538][3249:3254] CHIP:DMG: AttributePathIB = - [1656507439.871610][3249:3254] CHIP:DMG: { - [1656507439.871693][3249:3254] CHIP:DMG: Endpoint = 0x0, - [1656507439.871780][3249:3254] CHIP:DMG: Cluster = 0x1f, - [1656507439.871956][3249:3254] CHIP:DMG: Attribute = 0x0000_0000, - [1656507439.872045][3249:3254] CHIP:DMG: ListIndex = Null, - [1656507439.872125][3249:3254] CHIP:DMG: } - [1656507439.872208][3249:3254] CHIP:DMG: - [1656507439.872278][3249:3254] CHIP:DMG: StatusIB = - [1656507439.872359][3249:3254] CHIP:DMG: { - [1656507439.872441][3249:3254] CHIP:DMG: status = 0x00 (SUCCESS), - [1656507439.872523][3249:3254] CHIP:DMG: }, - [1656507439.872598][3249:3254] CHIP:DMG: - [1656507439.872664][3249:3254] CHIP:DMG: }, - [1656507439.872739][3249:3254] CHIP:DMG: - [1656507439.872798][3249:3254] CHIP:DMG: ], - [1656507439.872886][3249:3254] CHIP:DMG: - [1656507439.872945][3249:3254] CHIP:DMG: InteractionModelRevision = 1 - [1656507439.873001][3249:3254] CHIP:DMG: } - [1656507439.873288][3249:3254] CHIP:DMG: WriteClient moving to [AwaitingDe] - disabled: true - - - label: "TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute" + command: "writeAttribute" + attribute: "ACL" + arguments: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [CommissionerNodeId], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "2", + AuthMode: "2", + Subjects: null, + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + ] + + - label: "Step 17:TH1 reads AccessControl cluster ACL attribute" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol read acl 1 0 - - On TH1(Chiptool) , Verify that the AccessControlEntryStruct contains 2 elements with Subject and Target as null - [1656507517.730614][3261:3266] CHIP:DMG: - [1656507517.730654][3261:3266] CHIP:DMG: SuppressResponse = true, - [1656507517.730695][3261:3266] CHIP:DMG: InteractionModelRevision = 1 - [1656507517.730733][3261:3266] CHIP:DMG: } - [1656507517.731236][3261:3266] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 3101344024 - [1656507517.731328][3261:3266] CHIP:TOO: ACL: 2 entries - [1656507517.731414][3261:3266] CHIP:TOO: [1]: { - [1656507517.731474][3261:3266] CHIP:TOO: Privilege: 5 - [1656507517.731513][3261:3266] CHIP:TOO: AuthMode: 2 - [1656507517.731555][3261:3266] CHIP:TOO: Subjects: 1 entries - [1656507517.731601][3261:3266] CHIP:TOO: [1]: 112233 - [1656507517.731643][3261:3266] CHIP:TOO: Targets: null - [1656507517.731680][3261:3266] CHIP:TOO: FabricIndex: 1 - [1656507517.731715][3261:3266] CHIP:TOO: } - [1656507517.731764][3261:3266] CHIP:TOO: [2]: { - [1656507517.731802][3261:3266] CHIP:TOO: Privilege: 2 - [1656507517.731838][3261:3266] CHIP:TOO: AuthMode: 2 - [1656507517.731874][3261:3266] CHIP:TOO: Subjects: null - [1656507517.731909][3261:3266] CHIP:TOO: Targets: null - [1656507517.731945][3261:3266] CHIP:TOO: FabricIndex: 1 - [1656507517.731980][3261:3266] CHIP:TOO: } - [1656507517.732099][3261:3266] CHIP:EM: Sending Standalone Ack for MessageCounter:72796495 on exchange 36236i - disabled: true + command: "readAttribute" + attribute: "ACL" + response: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [CommissionerNodeId], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "2", + AuthMode: "2", + Subjects: null, + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + ] - label: - "TH1 reads DUT Endpoint 0 AccessControl cluster + "Step 18:TH1 reads DUT AccessControl cluster SubjectsPerAccessControlEntry attribute" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol read subjects-per-access-control-entry 1 0 - - On TH1(Chiptool), verify with value 4 or greater as subjects-per-access-control-entry , value is stored as MAXSUBJECTS - - [1656657490.002372][3078:3083] CHIP:DMG: - [1656657490.002408][3078:3083] CHIP:DMG: ], - [1656657490.002452][3078:3083] CHIP:DMG: - [1656657490.002489][3078:3083] CHIP:DMG: SuppressResponse = true, - [1656657490.002527][3078:3083] CHIP:DMG: InteractionModelRevision = 1 - [1656657490.002562][3078:3083] CHIP:DMG: } - [1656657490.002742][3078:3083] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0002 DataVersion: 3780432421 - [1656657490.002820][3078:3083] CHIP:TOO: SubjectsPerAccessControlEntry: 4 - [1656657490.002920][3078:3083] CHIP:EM: Sending Standalone Ack for MessageCounter:9586938 on exchange 51487i - [1656657490.003004][3078:3083] CHIP:IN: Prepared secure message 0xffff8e7cd958 to 0x0000000000000001 (1) of type 0x10 and protocolId (0, 0) on exchange 51487i with MessageCounter:235451132. - disabled: true + command: "readAttribute" + attribute: "SubjectsPerAccessControlEntry" + response: + saveAs: MAXSUBJECTS + #Issue https://github.com/project-chip/connectedhomeip/issues/16719 - label: - "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 2 elements 1.struct - Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null 2.struct Privilege field: Operate (3) - AuthMode field: CASE (2) Subjects field: list of MAXSUBJECTS random - node IDs (stored as SUBJECTS) Targets field: null" - PICS: ACL.S.A0000 + "Step 19:TH1 writes DUT Endpoint 0 AccessControl cluster ACL + attribute, value is list of AccessControlEntryStruct containing 2 + elements 1.struct Privilege field: Administer (5) AuthMode field: CASE + (2) Subjects field: [N1] Targets field: null 2.struct Privilege field: + Operate (3) AuthMode field: CASE (2) Subjects field: list of + MAXSUBJECTS random node IDs (stored as SUBJECTS) Targets field: null" + PICS: ACL.S.A0000 && PICS_SKIP_SAMPLE_APP verification: | ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects":[33,44,55,66] , "targets": null}]' 1 0 On TH1(Chiptool), Verify that the status is success when writing the AccessControl cluster ACL attribute with a value is list of AccessControlEntryStruct containing 2 elements as Subject as SUBJECTS and Target as null @@ -1128,10 +643,18 @@ tests: [1657542321.147625][3461:3466] CHIP:DMG: InteractionModelRevision = 1 [1657542321.147663][3461:3466] CHIP:DMG: } [1657542321.147865][3461:3466] CHIP:DMG: WriteClient moving to [AwaitingDe] - disabled: true - - - label: "TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute" - PICS: ACL.S.A0000 + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" + + #Issue https://github.com/project-chip/connectedhomeip/issues/16719 + - label: "Step 20:TH1 reads AccessControl cluster ACL attribute" + PICS: ACL.S.A0000 && PICS_SKIP_SAMPLE_APP verification: | ./chip-tool accesscontrol read acl 1 0 @@ -1164,144 +687,86 @@ tests: [1656928460.993113][4255:4260] CHIP:TOO: } [1656928460.993204][4255:4260] CHIP:EM: Sending Standalone Ack for MessageCounter:154962728 on exchange 64378i [1656928460.993291][4255:4260] CHIP:IN: Prepared secure message 0xffffad69f958 to 0x0000000000000001 (1) o - disabled: true + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: - "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 2 elements 1.struct - Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null 2.struct Privilege field: Operate (3) - AuthMode field: CASE (2) Subjects field: [CAT1, CAT1, CAT3, CAT4] - Targets field: null" + "Step 21:TH1 writes DUT Endpoint 0 AccessControl cluster ACL + attribute, value is list of AccessControlEntryStruct containing 2 + elements 1.struct Privilege field: Administer (5) AuthMode field: CASE + (2) Subjects field: [N1] Targets field: null 2.struct Privilege field: + Operate (3) AuthMode field: CASE (2) Subjects field: [CAT1, CAT2, + CAT3, CAT4] Targets field: null" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - { "privilege": 3, "authMode": 2, "subjects":[65520,65521,65522,65523] , "targets": null}]' 1 0 - On TH1(Chiptool), Verify that the status is success when writing the AccessControl cluster ACL attribute with a value is list of AccessControlEntryStruct containing 2 elements with Subjects as CAT Values and Target as null - [1656509348.174135][3403:3408] CHIP:DMG: WriteClient moving to [ResponseRe] - [1656509348.174227][3403:3408] CHIP:DMG: WriteResponseMessage = - [1656509348.174272][3403:3408] CHIP:DMG: { - [1656509348.174312][3403:3408] CHIP:DMG: AttributeStatusIBs = - [1656509348.174367][3403:3408] CHIP:DMG: [ - [1656509348.174412][3403:3408] CHIP:DMG: AttributeStatusIB = - [1656509348.174462][3403:3408] CHIP:DMG: { - [1656509348.174509][3403:3408] CHIP:DMG: AttributePathIB = - [1656509348.174566][3403:3408] CHIP:DMG: { - [1656509348.174623][3403:3408] CHIP:DMG: Endpoint = 0x0, - [1656509348.174685][3403:3408] CHIP:DMG: Cluster = 0x1f, - [1656509348.174746][3403:3408] CHIP:DMG: Attribute = 0x0000_0000, - [1656509348.174808][3403:3408] CHIP:DMG: } - [1656509348.174870][3403:3408] CHIP:DMG: - [1656509348.174924][3403:3408] CHIP:DMG: StatusIB = - [1656509348.174979][3403:3408] CHIP:DMG: { - [1656509348.175037][3403:3408] CHIP:DMG: status = 0x00 (SUCCESS), - [1656509348.175093][3403:3408] CHIP:DMG: }, - [1656509348.175150][3403:3408] CHIP:DMG: - [1656509348.175200][3403:3408] CHIP:DMG: }, - [1656509348.175265][3403:3408] CHIP:DMG: - [1656509348.175309][3403:3408] CHIP:DMG: AttributeStatusIB = - [1656509348.175357][3403:3408] CHIP:DMG: { - [1656509348.175403][3403:3408] CHIP:DMG: AttributePathIB = - [1656509348.175457][3403:3408] CHIP:DMG: { - [1656509348.175514][3403:3408] CHIP:DMG: Endpoint = 0x0, - [1656509348.175580][3403:3408] CHIP:DMG: Cluster = 0x1f, - [1656509348.175642][3403:3408] CHIP:DMG: Attribute = 0x0000_0000, - [1656509348.175701][3403:3408] CHIP:DMG: ListIndex = Null, - [1656509348.175758][3403:3408] CHIP:DMG: } - [1656509348.175818][3403:3408] CHIP:DMG: - [1656509348.175871][3403:3408] CHIP:DMG: StatusIB = - [1656509348.175925][3403:3408] CHIP:DMG: { - [1656509348.175981][3403:3408] CHIP:DMG: status = 0x00 (SUCCESS), - [1656509348.176038][3403:3408] CHIP:DMG: }, - [1656509348.176093][3403:3408] CHIP:DMG: - [1656509348.176143][3403:3408] CHIP:DMG: }, - [1656509348.176252][3403:3408] CHIP:DMG: - [1656509348.176299][3403:3408] CHIP:DMG: AttributeStatusIB = - [1656509348.176353][3403:3408] CHIP:DMG: { - [1656509348.176399][3403:3408] CHIP:DMG: AttributePathIB = - [1656509348.176454][3403:3408] CHIP:DMG: { - [1656509348.176511][3403:3408] CHIP:DMG: Endpoint = 0x0, - [1656509348.176568][3403:3408] CHIP:DMG: Cluster = 0x1f, - [1656509348.176628][3403:3408] CHIP:DMG: Attribute = 0x0000_0000, - [1656509348.176692][3403:3408] CHIP:DMG: ListIndex = Null, - [1656509348.176749][3403:3408] CHIP:DMG: } - [1656509348.176810][3403:3408] CHIP:DMG: - [1656509348.176863][3403:3408] CHIP:DMG: StatusIB = - [1656509348.176917][3403:3408] CHIP:DMG: { - [1656509348.176973][3403:3408] CHIP:DMG: status = 0x00 (SUCCESS), - [1656509348.177033][3403:3408] CHIP:DMG: }, - [1656509348.177088][3403:3408] CHIP:DMG: - [1656509348.177138][3403:3408] CHIP:DMG: }, - [1656509348.177191][3403:3408] CHIP:DMG: - [1656509348.177235][3403:3408] CHIP:DMG: ], - [1656509348.177299][3403:3408] CHIP:DMG: - [1656509348.177344][3403:3408] CHIP:DMG: InteractionModelRevision = 1 - [1656509348.177387][3403:3408] CHIP:DMG: } - [1656509348.177603][3403:3408] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1656509348.177721][3403:3408] CHIP:EM: Sending Standalone Ack for MessageCounter:77826894 on exchange 45755i - disabled: true - - - label: "TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute" + command: "writeAttribute" + attribute: "ACL" + arguments: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [CommissionerNodeId], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "3", + AuthMode: "2", + Subjects: [CAT1, CAT2, CAT3, CAT4], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + ] + + - label: "Step 22:TH1 reads AccessControl cluster ACL attribute" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol read acl 1 0 - - On TH1(Chiptool) , Verify that the AccessControlEntryStruct contains 2 elements with Subjects as CAT Values and Target as null - [1656509471.738046][3416:3421] CHIP:DMG: - [1656509471.738082][3416:3421] CHIP:DMG: SuppressResponse = true, - [1656509471.738120][3416:3421] CHIP:DMG: InteractionModelRevision = 1 - [1656509471.738154][3416:3421] CHIP:DMG: } - [1656509471.738644][3416:3421] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 3101344046 - [1656509471.738735][3416:3421] CHIP:TOO: ACL: 2 entries - [1656509471.738812][3416:3421] CHIP:TOO: [1]: { - [1656509471.738867][3416:3421] CHIP:TOO: Privilege: 5 - [1656509471.738901][3416:3421] CHIP:TOO: AuthMode: 2 - [1656509471.738940][3416:3421] CHIP:TOO: Subjects: 1 entries - [1656509471.738980][3416:3421] CHIP:TOO: [1]: 112233 - [1656509471.739018][3416:3421] CHIP:TOO: Targets: null - [1656509471.739051][3416:3421] CHIP:TOO: FabricIndex: 1 - [1656509471.739083][3416:3421] CHIP:TOO: } - [1656509471.739130][3416:3421] CHIP:TOO: [2]: { - [1656509471.739164][3416:3421] CHIP:TOO: Privilege: 3 - [1656509471.739197][3416:3421] CHIP:TOO: AuthMode: 2 - [1656509471.739235][3416:3421] CHIP:TOO: Subjects: 4 entries - [1656509471.739273][3416:3421] CHIP:TOO: [1]: 65520 - [1656509471.739310][3416:3421] CHIP:TOO: [2]: 65521 - [1656509471.739346][3416:3421] CHIP:TOO: [3]: 65522 - [1656509471.739382][3416:3421] CHIP:TOO: [4]: 65523 - [1656509471.739417][3416:3421] CHIP:TOO: Targets: null - [1656509471.739450][3416:3421] CHIP:TOO: FabricIndex: 1 - [1656509471.739482][3416:3421] CHIP:TOO: } - [1656509471.739596][3416:3421] CHIP:EM: Sending Standalone Ack for MessageCounter:158465651 on exchange 5515i - disabled: true + command: "readAttribute" + attribute: "ACL" + response: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [CommissionerNodeId], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "3", + AuthMode: "2", + Subjects: [CAT1, CAT2, CAT3, CAT4], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + ] - label: - "TH1 reads DUT Endpoint 0 AccessControl cluster - TargetsPerAccessControlEntry attribute" + "Step 23:TH1 reads AccessControl cluster TargetsPerAccessControlEntry + attribute" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol read targets-per-access-control-entry 1 0 - On TH1(Chiptool), verify with value 3 or greater as Targets-per-access-control-entry ,value is stored as MAXTARGETS - [1656509737.166763][3434:3439] CHIP:DMG: - [1656509737.166786][3434:3439] CHIP:DMG: ], - [1656509737.166816][3434:3439] CHIP:DMG: - [1656509737.166842][3434:3439] CHIP:DMG: SuppressResponse = true, - [1656509737.166867][3434:3439] CHIP:DMG: InteractionModelRevision = 1 - [1656509737.166890][3434:3439] CHIP:DMG: } - [1656509737.167026][3434:3439] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0003 DataVersion: 3101344046 - [1656509737.167092][3434:3439] CHIP:TOO: TargetsPerAccessControlEntry: 3 - [1656509737.167174][3434:3439] CHIP:EM: Sending Standalone Ack for MessageCounter:259106833 on exchange 24633i - [1656509737.167253][3434:3439] CHIP:IN: Prepared secure message 0xffffb8c9c958 to 0x0000000000000001 (1) of type 0x - disabled: true + command: "readAttribute" + attribute: "TargetsPerAccessControlEntry" + response: + saveAs: TargetsPerAccessControlEntry + #Need if support : https://github.com/project-chip/connectedhomeip/issues/16719 - label: - "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 2 elements 1.struct - Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null 2.struct Privilege field: Operate (3) - AuthMode field: CASE (2) Subjects field:null Targets field: list of - MAXTARGETS targets {Cluster: random} (stored as TARGETS)" - PICS: ACL.S.A0000 + "Step 24:TH1 writes DUT Endpoint 0 AccessControl cluster ACL + attribute, value is list of AccessControlEntryStruct containing 2 + elements 1.struct Privilege field: Administer (5) AuthMode field: CASE + (2) Subjects field: [N1] Targets field: null 2.struct Privilege field: + Operate (3) AuthMode field: CASE (2) Subjects field:null Targets + field: list of MAXTARGETS targets {Cluster: random} (stored as + TARGETS)" + PICS: ACL.S.A0000 && PICS_SKIP_SAMPLE_APP verification: | ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": 40, "endpoint": null, "deviceType": null },{ "cluster": 28, "endpoint": null, "deviceType": null }]}]' 1 0 @@ -1379,10 +844,18 @@ tests: [1662015973.914183][3126:3132] CHIP:DMG: Cluster = 0x1f, [1662015973.914228][3126:3132] CHIP:DMG: Attribute = 0x0000_0000, [1662015973.914270][3126:3132] CHIP:DMG: ListIndex = Null, - disabled: true - - - label: "TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute" - PICS: ACL.S.A0000 + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" + + #Issue : https://github.com/project-chip/connectedhomeip/issues/16719 + - label: "Step 25:TH1 reads AccessControl cluster ACL attribute" + PICS: ACL.S.A0000 && PICS_SKIP_SAMPLE_APP verification: | ./chip-tool accesscontrol read acl 1 0 On TH1(Chiptool) , Verify that the AccessControlEntryStruct contains 2 elements with Subjects as null and and Target as TARGETS @@ -1412,1324 +885,560 @@ tests: [1662016086.502223][3138:3143] CHIP:TOO: DeviceType: null [1662016086.502247][3138:3143] CHIP:TOO: } [1662016086.502273][3138:3143] CHIP:TOO: FabricIndex: 1 - disabled: true + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: - "TH1 reads DUT Endpoint 0 AccessControl cluster - AccessControlEntriesPerFabric attribute" + "Step 26:TH1 reads AccessControl cluster AccessControlEntriesPerFabric + attribute" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol read access-control-entries-per-fabric 1 0 - On TH1(Chiptool), verify with value 3 or greater as AccessControlEntriesPerFabric,value is stored as MAXENTRIES - - [1656594850.964909][4043:4048] CHIP:DMG: AttributeReportIBs = - [1656594850.964954][4043:4048] CHIP:DMG: [ - [1656594850.964991][4043:4048] CHIP:DMG: AttributeReportIB = - [1656594850.965038][4043:4048] CHIP:DMG: { - [1656594850.965076][4043:4048] CHIP:DMG: AttributeDataIB = - [1656594850.965129][4043:4048] CHIP:DMG: { - [1656594850.965177][4043:4048] CHIP:DMG: DataVersion = 0x182902e1, - [1656594850.965223][4043:4048] CHIP:DMG: AttributePathIB = - [1656594850.965273][4043:4048] CHIP:DMG: { - [1656594850.965321][4043:4048] CHIP:DMG: Endpoint = 0x0, - [1656594850.965373][4043:4048] CHIP:DMG: Cluster = 0x1f, - [1656594850.965420][4043:4048] CHIP:DMG: Attribute = 0x0000_0004, - [1656594850.965474][4043:4048] CHIP:DMG: } - [1656594850.965529][4043:4048] CHIP:DMG: - [1656594850.965581][4043:4048] CHIP:DMG: Data = 3, - [1656594850.965631][4043:4048] CHIP:DMG: }, - [1656594850.965677][4043:4048] CHIP:DMG: - [1656594850.965714][4043:4048] CHIP:DMG: }, - [1656594850.965759][4043:4048] CHIP:DMG: - [1656594850.965794][4043:4048] CHIP:DMG: ], - [1656594850.965838][4043:4048] CHIP:DMG: - [1656594850.965875][4043:4048] CHIP:DMG: SuppressResponse = true, - [1656594850.965913][4043:4048] CHIP:DMG: InteractionModelRevision = 1 - [1656594850.965947][4043:4048] CHIP:DMG: } - [1656594850.966125][4043:4048] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0004 DataVersion: 405340897 - [1656594850.966204][4043:4048] CHIP:TOO: AccessControlEntriesPerFabric: 3 - [1656594850.966302][4043:4048] CHIP:EM: Sending Standalone Ack for MessageCounter:202038954 on exchange 11588i - [1656594850.966383][4043:4048] CHIP:IN: Prepared secure message 0xffffaa7cd958 to 0x0000000000000001 (1) of type 0x10 - disabled: true + command: "readAttribute" + attribute: "AccessControlEntriesPerFabric" + response: + saveAs: MAXENTRIES - label: - "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing MAXENTRIES elements - 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) - Subjects field: [N1] Targets field: null 2.struct Privilege field: - Operate (3) AuthMode field: CASE (2) Subjects field: null Targets - field: null subsequent elements same as second element" + "Step 27:TH1 writes DUT Endpoint 0 AccessControl cluster ACL + attribute, value is list of AccessControlEntryStruct containing + MAXENTRIES elements 1.struct Privilege field: Administer (5) AuthMode + field: CASE (2) Subjects field: [N1] Targets field: null 2.struct + Privilege field: Operate (3) AuthMode field: CASE (2) Subjects field: + null Targets field: null subsequent elements same as second element" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - { "privilege": 3, "authMode": 2, "subjects": null, "targets":null}, - { "privilege": 3, "authMode": 2, "subjects": null, "targets":null}]' 1 0 - On TH1(Chiptool), Verify that the status is success when writing the AccessControl cluster ACL attribute with a value is list of AccessControlEntryStruct containing MAXENTRIES elements - - [1657617362.022161][8840:8845] CHIP:DMG: WriteResponseMessage = - [1657617362.022190][8840:8845] CHIP:DMG: { - [1657617362.022216][8840:8845] CHIP:DMG: AttributeStatusIBs = - [1657617362.022249][8840:8845] CHIP:DMG: [ - [1657617362.022275][8840:8845] CHIP:DMG: AttributeStatusIB = - [1657617362.022308][8840:8845] CHIP:DMG: { - [1657617362.022352][8840:8845] CHIP:DMG: AttributePathIB = - [1657617362.022413][8840:8845] CHIP:DMG: { - [1657617362.022442][8840:8845] CHIP:DMG: Endpoint = 0x0, - [1657617362.022479][8840:8845] CHIP:DMG: Cluster = 0x1f, - [1657617362.022514][8840:8845] CHIP:DMG: Attribute = 0x0000_0000, - [1657617362.022550][8840:8845] CHIP:DMG: } - [1657617362.022587][8840:8845] CHIP:DMG: - [1657617362.022618][8840:8845] CHIP:DMG: StatusIB = - [1657617362.022655][8840:8845] CHIP:DMG: { - [1657617362.022687][8840:8845] CHIP:DMG: status = 0x00 (SUCCESS), - [1657617362.022722][8840:8845] CHIP:DMG: }, - [1657617362.022754][8840:8845] CHIP:DMG: - [1657617362.022784][8840:8845] CHIP:DMG: }, - [1657617362.022821][8840:8845] CHIP:DMG: - [1657617362.022846][8840:8845] CHIP:DMG: AttributeStatusIB = - [1657617362.022874][8840:8845] CHIP:DMG: { - [1657617362.022900][8840:8845] CHIP:DMG: AttributePathIB = - [1657617362.022931][8840:8845] CHIP:DMG: { - [1657617362.022967][8840:8845] CHIP:DMG: Endpoint = 0x0, - [1657617362.023003][8840:8845] CHIP:DMG: Cluster = 0x1f, - [1657617362.023041][8840:8845] CHIP:DMG: Attribute = 0x0000_0000, - [1657617362.023075][8840:8845] CHIP:DMG: ListIndex = Null, - [1657617362.023106][8840:8845] CHIP:DMG: } - [1657617362.023141][8840:8845] CHIP:DMG: - [1657617362.023173][8840:8845] CHIP:DMG: StatusIB = - [1657617362.023203][8840:8845] CHIP:DMG: { - [1657617362.023239][8840:8845] CHIP:DMG: status = 0x00 (SUCCESS), - [1657617362.023271][8840:8845] CHIP:DMG: }, - [1657617362.023302][8840:8845] CHIP:DMG: - [1657617362.023328][8840:8845] CHIP:DMG: }, - [1657617362.023364][8840:8845] CHIP:DMG: - [1657617362.023389][8840:8845] CHIP:DMG: AttributeStatusIB = - [1657617362.023416][8840:8845] CHIP:DMG: { - [1657617362.023443][8840:8845] CHIP:DMG: AttributePathIB = - [1657617362.023473][8840:8845] CHIP:DMG: { - [1657617362.023506][8840:8845] CHIP:DMG: Endpoint = 0x0, - [1657617362.023539][8840:8845] CHIP:DMG: Cluster = 0x1f, - [1657617362.023574][8840:8845] CHIP:DMG: Attribute = 0x0000_0000, - [1657617362.023606][8840:8845] CHIP:DMG: ListIndex = Null, - [1657617362.023641][8840:8845] CHIP:DMG: } - [1657617362.023677][8840:8845] CHIP:DMG: - [1657617362.023707][8840:8845] CHIP:DMG: StatusIB = - [1657617362.023738][8840:8845] CHIP:DMG: { - [1657617362.023769][8840:8845] CHIP:DMG: status = 0x00 (SUCCESS), - [1657617362.023801][8840:8845] CHIP:DMG: }, - [1657617362.023833][8840:8845] CHIP:DMG: - [1657617362.023859][8840:8845] CHIP:DMG: }, - [1657617362.023896][8840:8845] CHIP:DMG: - [1657617362.023920][8840:8845] CHIP:DMG: AttributeStatusIB = - [1657617362.023948][8840:8845] CHIP:DMG: { - [1657617362.023974][8840:8845] CHIP:DMG: AttributePathIB = - [1657617362.024004][8840:8845] CHIP:DMG: { - [1657617362.024037][8840:8845] CHIP:DMG: Endpoint = 0x0, - [1657617362.024071][8840:8845] CHIP:DMG: Cluster = 0x1f, - [1657617362.024108][8840:8845] CHIP:DMG: Attribute = 0x0000_0000, - [1657617362.024141][8840:8845] CHIP:DMG: ListIndex = Null, - [1657617362.024175][8840:8845] CHIP:DMG: } - [1657617362.024211][8840:8845] CHIP:DMG: - [1657617362.024241][8840:8845] CHIP:DMG: StatusIB = - [1657617362.024272][8840:8845] CHIP:DMG: { - [1657617362.024304][8840:8845] CHIP:DMG: status = 0x00 (SUCCESS), - [1657617362.024336][8840:8845] CHIP:DMG: }, - [1657617362.024367][8840:8845] CHIP:DMG: - [1657617362.024393][8840:8845] CHIP:DMG: }, - [1657617362.024423][8840:8845] CHIP:DMG: - [1657617362.024447][8840:8845] CHIP:DMG: ], - [1657617362.024489][8840:8845] CHIP:DMG: - [1657617362.024514][8840:8845] CHIP:DMG: InteractionModelRevision = 1 - [1657617362.024538][8840:8845] CHIP:DMG: } - [1657617362.024703][8840:8845] CHIP:DMG: WriteClient moving to [AwaitingDe] - disabled: true - - - label: "TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute" + command: "writeAttribute" + attribute: "ACL" + arguments: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [CommissionerNodeId], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "3", + AuthMode: "2", + Subjects: null, + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "3", + AuthMode: "2", + Subjects: null, + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + ] + + - label: "Step 28:TH1 reads AccessControl cluster ACL attribute" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol read acl 1 0 - On TH1(Chiptool) , Verify that the AccessControlEntryStruct containing MAXENTRIES elements - [1657543165.385093][3592:3597] CHIP:DMG: } - [1657543165.385508][3592:3597] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 3549245812 - [1657543165.385586][3592:3597] CHIP:TOO: ACL: 3 entries - [1662014580.521093][2979:2984] CHIP:TOO: ACL: 3 entries - [1662014580.521143][2979:2984] CHIP:TOO: [1]: { - [1662014580.523697][2979:2984] CHIP:TOO: Privilege: 5 - [1662014580.523728][2979:2984] CHIP:TOO: AuthMode: 2 - [1662014580.523754][2979:2984] CHIP:TOO: Subjects: 1 entries - [1662014580.523781][2979:2984] CHIP:TOO: [1]: 112233 - [1662014580.523803][2979:2984] CHIP:TOO: Targets: null - [1662014580.523823][2979:2984] CHIP:TOO: FabricIndex: 1 - [1662014580.523842][2979:2984] CHIP:TOO: } - [1662014580.523870][2979:2984] CHIP:TOO: [2]: { - [1662014580.523891][2979:2984] CHIP:TOO: Privilege: 3 - [1662014580.523910][2979:2984] CHIP:TOO: AuthMode: 2 - [1662014580.523930][2979:2984] CHIP:TOO: Subjects: null - [1662014580.523948][2979:2984] CHIP:TOO: Targets: null - [1662014580.523967][2979:2984] CHIP:TOO: FabricIndex: 1 - [1662014580.523985][2979:2984] CHIP:TOO: } - [1662014580.524010][2979:2984] CHIP:TOO: [3]: { - [1662014580.524030][2979:2984] CHIP:TOO: Privilege: 3 - [1662014580.524049][2979:2984] CHIP:TOO: AuthMode: 2 - [1662014580.524068][2979:2984] CHIP:TOO: Subjects: null - [1662014580.524086][2979:2984] CHIP:TOO: Targets: null - [1662014580.524105][2979:2984] CHIP:TOO: FabricIndex: 1 - [1662014580.524124][2979:2984] CHIP:TOO: } - disabled: true + command: "readAttribute" + attribute: "ACL" + response: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [CommissionerNodeId], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "3", + AuthMode: "2", + Subjects: null, + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "3", + AuthMode: "2", + Subjects: null, + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + ] - label: - "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 2 elements 1.struct - Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null 2.struct Privilege field: Operate (3) - AuthMode field: PASE (1) Subjects field: null Targets field: null" + "Step 29:TH1 writes DUT Endpoint 0 AccessControl cluster ACL + attribute, value is list of AccessControlEntryStruct containing 2 + elements 1.struct Privilege field: Administer (5) AuthMode field: CASE + (2) Subjects field: [N1] Targets field: null 2.struct Privilege field: + Operate (3) AuthMode field: PASE (1) Subjects field: null Targets + field: null" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol write acl '[{"privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - { "privilege": 3, "authMode": 1, "subjects": null, "targets":null}]' 1 0 - On TH1(Chiptool), Verify that the status is success when writing the AccessControl cluster ACL attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path with PASE Authmode - [1658475475.310438][3113:3119] CHIP:DMG: { - [1658475475.310466][3113:3119] CHIP:DMG: AttributeStatusIBs = - [1658475475.310500][3113:3119] CHIP:DMG: [ - [1658475475.310530][3113:3119] CHIP:DMG: AttributeStatusIB = - [1658475475.310564][3113:3119] CHIP:DMG: { - [1658475475.310634][3113:3119] CHIP:DMG: AttributePathIB = - [1658475475.310677][3113:3119] CHIP:DMG: { - [1658475475.310718][3113:3119] CHIP:DMG: Endpoint = 0x0, - [1658475475.310764][3113:3119] CHIP:DMG: Cluster = 0x1f, - [1658475475.310811][3113:3119] CHIP:DMG: Attribute = 0x0000_0000, - [1658475475.310855][3113:3119] CHIP:DMG: } - [1658475475.310898][3113:3119] CHIP:DMG: - [1658475475.310934][3113:3119] CHIP:DMG: StatusIB = - [1658475475.310973][3113:3119] CHIP:DMG: { - [1658475475.311012][3113:3119] CHIP:DMG: status = 0x00 (SUCCESS), - [1658475475.311054][3113:3119] CHIP:DMG: }, - [1658475475.311091][3113:3119] CHIP:DMG: - [1658475475.311125][3113:3119] CHIP:DMG: }, - [1658475475.311167][3113:3119] CHIP:DMG: - [1658475475.311197][3113:3119] CHIP:DMG: AttributeStatusIB = - [1658475475.311229][3113:3119] CHIP:DMG: { - [1658475475.311260][3113:3119] CHIP:DMG: AttributePathIB = - [1658475475.311297][3113:3119] CHIP:DMG: { - [1658475475.311335][3113:3119] CHIP:DMG: Endpoint = 0x0, - [1658475475.311375][3113:3119] CHIP:DMG: Cluster = 0x1f, - [1658475475.311416][3113:3119] CHIP:DMG: Attribute = 0x0000_0000, - [1658475475.311456][3113:3119] CHIP:DMG: ListIndex = Null, - [1658475475.311494][3113:3119] CHIP:DMG: } - [1658475475.311535][3113:3119] CHIP:DMG: - [1658475475.311571][3113:3119] CHIP:DMG: StatusIB = - [1658475475.311608][3113:3119] CHIP:DMG: { - [1658475475.311645][3113:3119] CHIP:DMG: status = 0x00 (SUCCESS), - [1658475475.311687][3113:3119] CHIP:DMG: }, - [1658475475.311724][3113:3119] CHIP:DMG: - [1658475475.311755][3113:3119] CHIP:DMG: }, - [1658475475.311798][3113:3119] CHIP:DMG: - [1658475475.311828][3113:3119] CHIP:DMG: AttributeStatusIB = - [1658475475.311860][3113:3119] CHIP:DMG: { - [1658475475.311891][3113:3119] CHIP:DMG: AttributePathIB = - [1658475475.311927][3113:3119] CHIP:DMG: { - [1658475475.311966][3113:3119] CHIP:DMG: Endpoint = 0x0, - [1658475475.312006][3113:3119] CHIP:DMG: Cluster = 0x1f, - [1658475475.312046][3113:3119] CHIP:DMG: Attribute = 0x0000_0000, - [1658475475.312089][3113:3119] CHIP:DMG: ListIndex = Null, - [1658475475.312127][3113:3119] CHIP:DMG: } - [1658475475.312168][3113:3119] CHIP:DMG: - [1658475475.312205][3113:3119] CHIP:DMG: StatusIB = - [1658475475.312246][3113:3119] CHIP:DMG: { - [1658475475.312285][3113:3119] CHIP:DMG: status = 0x87 (CONSTRAINT_ERROR), - [1658475475.312326][3113:3119] CHIP:DMG: }, - [1658475475.312363][3113:3119] CHIP:DMG: - [1658475475.312397][3113:3119] CHIP:DMG: }, - [1658475475.312432][3113:3119] CHIP:DMG: - [1658475475.312461][3113:3119] CHIP:DMG: ], - [1658475475.312506][3113:3119] CHIP:DMG: - [1658475475.312535][3113:3119] CHIP:DMG: InteractionModelRevision = 1 - [1658475475.312563][3113:3119] CHIP:DMG: } - [1658475475.312720][3113:3119] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1658475475.312759][3113:3119] CHIP:TOO: Response Failure: IM Error 0x00000587: General error: 0x87 (CONSTRAINT_ERROR) - [1658475475.312828][3113:3119] CHIP:EM: Sending Standalone Ack for MessageCounter:57486291 on exchange 52295i - [1658475475.312917][3113:3119] CHIP:IN: Prepared secure message 0xffffa3ffd9e8 to 0x0000000000000001 (1) of type 0x10 and protocolId (0, 0) on exchange 52295i with MessageCounter:34853551. - [1658475475.312965][3113:3119] CHIP:IN: Sending encrypted msg 0xffffa3ffd9e8 with MessageCounter:34853551 to 0x0000000000000001 (1) at monotonic time: 00000000004484A6 msec - [1658475475.313213][3113:3119] CHIP:EM: Flushed pending ack for MessageCounter:57486291 on exchange 52295i - [1658475475.313471][3113:3113] CHIP:CTL: Shutting down the commissioner - [1658475475.313509][3113:3113] CHIP:CTL: Stopping commissioning discovery over DNS-SD - [1658475475.313539][3113:3113] CHIP:CTL: Shutting down the controller - [1658475475.313577][3113:3113] CHIP:IN: Expiring all sessions for fabric 0x1!! - [1658475475.313606][3113:3113] CHIP:IN: SecureSession[0xffff9c001930]: MarkForEviction Type:2 LSID:22794 - [1658475475.313634][3113:3113] CHIP:SC: SecureSession[0xffff9c001930]: Moving from state "kActive" --> "kPendingEviction" - [1658475475.313662][3113:3113] CHIP:IN: SecureSession[0xffff9c001930]: Released - Type:2 LSID:22794 - [1658475475.313694][3113:3113] CHIP:FP: Forgetting fabric 0x1 - [1658475475.313734][3113:3113] CHIP:TS: Pending Last Known Good Time: 2022-07-21T06:51:50 - [1658475475.313959][3113:3113] CHIP:TS: Previous Last Known Good Time: 2022-07-21T06:51:50 - [1658475475.313992][3113:3113] CHIP:TS: Reverted Last Known Good Time to previous value - [1658475475.314043][3113:3113] CHIP:CTL: Shutting down the commissioner - [1658475475.314071][3113:3113] CHIP:CTL: Stopping commissioning discovery over DNS-SD - [1658475475.314098][3113:3113] CHIP:CTL: Shutting down the controller - [1658475475.314122][3113:3113] CHIP:IN: Expiring all sessions for fabric 0x2!! - [1658475475.314148][3113:3113] CHIP:FP: Forgetting fabric 0x2 - [1658475475.314177][3113:3113] CHIP:TS: Pending Last Known Good Time: 2022-07-21T06:51:50 - [1658475475.314323][3113:3113] CHIP:TS: Previous Last Known Good Time: 2022-07-21T06:51:50 - [1658475475.314352][3113:3113] CHIP:TS: Reverted Last Known Good Time to previous value - [1658475475.314390][3113:3113] CHIP:CTL: Shutting down the commissioner - [1658475475.314417][3113:3113] CHIP:CTL: Stopping commissioning discovery over DNS-SD - [1658475475.314442][3113:3113] CHIP:CTL: Shutting down the controller - [1658475475.314467][3113:3113] CHIP:IN: Expiring all sessions for fabric 0x3!! - [1658475475.314491][3113:3113] CHIP:FP: Forgetting fabric 0x3 - [1658475475.314520][3113:3113] CHIP:TS: Pending Last Known Good Time: 2022-07-21T06:51:50 - [1658475475.314694][3113:3113] CHIP:TS: Previous Last Known Good Time: 2022-07-21T06:51:50 - [1658475475.314722][3113:3113] CHIP:TS: Reverted Last Known Good Time to previous value - [1658475475.314760][3113:3113] CHIP:CTL: Shutting down the commissioner - [1658475475.314785][3113:3113] CHIP:CTL: Stopping commissioning discovery over DNS-SD - [1658475475.314809][3113:3113] CHIP:CTL: Shutting down the controller - [1658475475.314832][3113:3113] CHIP:CTL: Shutting down the System State, this will teardown the CHIP Stack - [1658475475.315885][3113:3113] CHIP:DMG: IM WH moving to [Uninitialized] - [1658475475.315927][3113:3113] CHIP:DMG: IM WH moving to [Uninitialized] - [1658475475.315951][3113:3113] CHIP:DMG: IM WH moving to [Uninitialized] - [1658475475.315973][3113:3113] CHIP:DMG: IM WH moving to [Uninitialized] - [1658475475.315998][3113:3113] CHIP:DMG: All ReadHandler-s are clean, clear GlobalDirtySet - [1658475475.316077][3113:3113] CHIP:BLE: BleConnectionDelegate::CancelConnection is not implemented. - [1658475475.316389][3113:3113] CHIP:DL: writing settings to file (/tmp/chip_counters.ini-TP5HmB) - [1658475475.317146][3113:3113] CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini) - [1658475475.317216][3113:3113] CHIP:DL: NVS set: chip-counters/total-operational-hours = 0 (0x0) - [1658475475.317246][3113:3113] CHIP:DL: Inet Layer shutdown - [1658475475.317271][3113:3113] CHIP:DL: BLE shutdown - [1658475475.317295][3113:3113] CHIP:DL: System Layer shutdown - [1658475475.317425][3113:3113] CHIP:TOO: Run command failure: IM Error 0x00000587: General error: 0x87 (CONSTRAINT_ERROR) - disabled: true - - - label: "TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute" + command: "writeAttribute" + attribute: "ACL" + arguments: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [CommissionerNodeId], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "3", + AuthMode: "1", + Subjects: null, + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + ] + response: + error: CONSTRAINT_ERROR + + - label: "Step 30:TH1 reads AccessControl cluster ACL attribute" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol read acl 1 0 - On TH1(Chiptool) , Verify Successfully that acl attribute with value is list of AccessControlEntryStruct containing 1 element - [1656914601.250655][3267:3272] CHIP:DMG: ], - [1656914601.250709][3267:3272] CHIP:DMG: - [1656914601.250746][3267:3272] CHIP:DMG: SuppressResponse = true, - [1656914601.250783][3267:3272] CHIP:DMG: InteractionModelRevision = 1 - [1656914601.250817][3267:3272] CHIP:DMG: } - [1656914601.251160][3267:3272] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 2291440622 - [1656914601.251237][3267:3272] CHIP:TOO: ACL: 1 entries - [1656914601.251316][3267:3272] CHIP:TOO: [1]: { - [1656914601.251373][3267:3272] CHIP:TOO: Privilege: 5 - [1656914601.251409][3267:3272] CHIP:TOO: AuthMode: 2 - [1656914601.251450][3267:3272] CHIP:TOO: Subjects: 1 entries - [1656914601.251493][3267:3272] CHIP:TOO: [1]: 112233 - [1656914601.251530][3267:3272] CHIP:TOO: Targets: null - [1656914601.251566][3267:3272] CHIP:TOO: FabricIndex: 1 - [1656914601.251600][3267:3272] CHIP:TOO: } - [1656914601.251781][3267:3272] CHIP:EM: Sending Standalone Ack for MessageCounter:251291751 on exchange 59687i - [1656914601.251874][3267:3272] CHIP:IN: Prepared secure message 0xffffb5b3d958 to 0x0000000000000001 (1) of type - disabled: true + command: "readAttribute" + attribute: "ACL" + response: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [CommissionerNodeId], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + ] - label: - "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 2 elements 1.struct - Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null 2.struct Privilege field: Administer - (5) AuthMode field: Group (3) Subjects field: null Targets field: null" + "Step 31:TH1 writes DUT Endpoint 0 AccessControl cluster ACL + attribute, value is list of AccessControlEntryStruct containing 2 + elements 1.struct Privilege field: Administer (5) AuthMode field: CASE + (2) Subjects field: [N1] Targets field: null 2.struct Privilege field: + Administer (5) AuthMode field: Group (3) Subjects field: null Targets + field: null" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - { "privilege": 5, "authMode": 3, "subjects": null, "targets":null}]' 1 0 - - On TH1(Chiptool), Verify that the status is success when writing the AccessControl cluster ACL attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path due to Administer Privilege with Group AuthMode - [1658475916.602576][3151:3156] CHIP:DMG: WriteResponseMessage = - [1658475916.602649][3151:3156] CHIP:DMG: { - [1658475916.602684][3151:3156] CHIP:DMG: AttributeStatusIBs = - [1658475916.602747][3151:3156] CHIP:DMG: [ - [1658475916.602783][3151:3156] CHIP:DMG: AttributeStatusIB = - [1658475916.602841][3151:3156] CHIP:DMG: { - [1658475916.602881][3151:3156] CHIP:DMG: AttributePathIB = - [1658475916.602942][3151:3156] CHIP:DMG: { - [1658475916.603005][3151:3156] CHIP:DMG: Endpoint = 0x0, - [1658475916.603055][3151:3156] CHIP:DMG: Cluster = 0x1f, - [1658475916.603117][3151:3156] CHIP:DMG: Attribute = 0x0000_0000, - [1658475916.603176][3151:3156] CHIP:DMG: } - [1658475916.603232][3151:3156] CHIP:DMG: - [1658475916.603290][3151:3156] CHIP:DMG: StatusIB = - [1658475916.603352][3151:3156] CHIP:DMG: { - [1658475916.603399][3151:3156] CHIP:DMG: status = 0x00 (SUCCESS), - [1658475916.603460][3151:3156] CHIP:DMG: }, - [1658475916.603511][3151:3156] CHIP:DMG: - [1658475916.603563][3151:3156] CHIP:DMG: }, - [1658475916.603626][3151:3156] CHIP:DMG: - [1658475916.603664][3151:3156] CHIP:DMG: AttributeStatusIB = - [1658475916.603716][3151:3156] CHIP:DMG: { - [1658475916.603754][3151:3156] CHIP:DMG: AttributePathIB = - [1658475916.603812][3151:3156] CHIP:DMG: { - [1658475916.603859][3151:3156] CHIP:DMG: Endpoint = 0x0, - [1658475916.603925][3151:3156] CHIP:DMG: Cluster = 0x1f, - [1658475916.603974][3151:3156] CHIP:DMG: Attribute = 0x0000_0000, - [1658475916.604021][3151:3156] CHIP:DMG: ListIndex = Null, - [1658475916.604066][3151:3156] CHIP:DMG: } - [1658475916.604115][3151:3156] CHIP:DMG: - [1658475916.604163][3151:3156] CHIP:DMG: StatusIB = - [1658475916.604211][3151:3156] CHIP:DMG: { - [1658475916.604257][3151:3156] CHIP:DMG: status = 0x00 (SUCCESS), - [1658475916.604303][3151:3156] CHIP:DMG: }, - [1658475916.604346][3151:3156] CHIP:DMG: - [1658475916.604386][3151:3156] CHIP:DMG: }, - [1658475916.604437][3151:3156] CHIP:DMG: - [1658475916.604472][3151:3156] CHIP:DMG: AttributeStatusIB = - [1658475916.604511][3151:3156] CHIP:DMG: { - [1658475916.604548][3151:3156] CHIP:DMG: AttributePathIB = - [1658475916.604591][3151:3156] CHIP:DMG: { - [1658475916.604637][3151:3156] CHIP:DMG: Endpoint = 0x0, - [1658475916.604685][3151:3156] CHIP:DMG: Cluster = 0x1f, - [1658475916.604733][3151:3156] CHIP:DMG: Attribute = 0x0000_0000, - [1658475916.604780][3151:3156] CHIP:DMG: ListIndex = Null, - [1658475916.604825][3151:3156] CHIP:DMG: } - [1658475916.604873][3151:3156] CHIP:DMG: - [1658475916.604916][3151:3156] CHIP:DMG: StatusIB = - [1658475916.604960][3151:3156] CHIP:DMG: { - [1658475916.605009][3151:3156] CHIP:DMG: status = 0x87 (CONSTRAINT_ERROR), - [1658475916.605056][3151:3156] CHIP:DMG: }, - [1658475916.605101][3151:3156] CHIP:DMG: - [1658475916.605138][3151:3156] CHIP:DMG: }, - [1658475916.605180][3151:3156] CHIP:DMG: - [1658475916.605215][3151:3156] CHIP:DMG: ], - [1658475916.605267][3151:3156] CHIP:DMG: - [1658475916.605301][3151:3156] CHIP:DMG: InteractionModelRevision = 1 - [1658475916.605336][3151:3156] CHIP:DMG: } - [1658475916.605522][3151:3156] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1658475916.605569][3151:3156] CHIP:TOO: Response Failure: IM Error 0x00000587: General error: 0x87 (CONSTRAINT_ERROR) - [1658475916.605802][3151:3156] CHIP:EM: Sending Sta - disabled: true + command: "writeAttribute" + attribute: "ACL" + arguments: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [CommissionerNodeId], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "5", + AuthMode: "3", + Subjects: null, + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + ] + response: + error: CONSTRAINT_ERROR - label: - "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 2 elements 1.struct - Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null 2.struct Privilege field: invalid - value (not 1-5) AuthMode field: CASE (2) Subjects field: null Targets - field: null" + "Step 32:TH1 writes DUT Endpoint 0 AccessControl cluster ACL + attribute, value is list of AccessControlEntryStruct containing 2 + elements 1.struct Privilege field: Administer (5) AuthMode field: CASE + (2) Subjects field: [N1] Targets field: null 2.struct Privilege field: + invalid value (not 1-5) AuthMode field: CASE (2) Subjects field: null + Targets field: null" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - { "privilege": 6, "authMode": 2, "subjects": null, "targets":null}]' 1 0 - - - On TH1(Chiptool), Verify that the status is success when writing the AccessControl cluster ACL attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path due to invalid privilege . - - [1658476127.774933][3171:3176] CHIP:EM: Removed CHIP MessageCounter:240294498 from RetransTable on exchange 6954i - [1658476127.775074][3171:3176] CHIP:DMG: WriteClient moving to [ResponseRe] - [1658476127.775143][3171:3176] CHIP:DMG: WriteResponseMessage = - [1658476127.775178][3171:3176] CHIP:DMG: { - [1658476127.775205][3171:3176] CHIP:DMG: AttributeStatusIBs = - [1658476127.775249][3171:3176] CHIP:DMG: [ - [1658476127.775279][3171:3176] CHIP:DMG: AttributeStatusIB = - [1658476127.775313][3171:3176] CHIP:DMG: { - [1658476127.775345][3171:3176] CHIP:DMG: AttributePathIB = - [1658476127.775384][3171:3176] CHIP:DMG: { - [1658476127.775425][3171:3176] CHIP:DMG: Endpoint = 0x0, - [1658476127.775466][3171:3176] CHIP:DMG: Cluster = 0x1f, - [1658476127.775507][3171:3176] CHIP:DMG: Attribute = 0x0000_0000, - [1658476127.775549][3171:3176] CHIP:DMG: } - [1658476127.775591][3171:3176] CHIP:DMG: - [1658476127.775627][3171:3176] CHIP:DMG: StatusIB = - [1658476127.775666][3171:3176] CHIP:DMG: { - [1658476127.775704][3171:3176] CHIP:DMG: status = 0x00 (SUCCESS), - [1658476127.775745][3171:3176] CHIP:DMG: }, - [1658476127.775782][3171:3176] CHIP:DMG: - [1658476127.775816][3171:3176] CHIP:DMG: }, - [1658476127.775858][3171:3176] CHIP:DMG: - [1658476127.775887][3171:3176] CHIP:DMG: AttributeStatusIB = - [1658476127.775919][3171:3176] CHIP:DMG: { - [1658476127.775950][3171:3176] CHIP:DMG: AttributePathIB = - [1658476127.775986][3171:3176] CHIP:DMG: { - [1658476127.776025][3171:3176] CHIP:DMG: Endpoint = 0x0, - [1658476127.776069][3171:3176] CHIP:DMG: Cluster = 0x1f, - [1658476127.776113][3171:3176] CHIP:DMG: Attribute = 0x0000_0000, - [1658476127.776156][3171:3176] CHIP:DMG: ListIndex = Null, - [1658476127.776193][3171:3176] CHIP:DMG: } - [1658476127.776234][3171:3176] CHIP:DMG: - [1658476127.776270][3171:3176] CHIP:DMG: StatusIB = - [1658476127.776306][3171:3176] CHIP:DMG: { - [1658476127.776345][3171:3176] CHIP:DMG: status = 0x00 (SUCCESS), - [1658476127.776383][3171:3176] CHIP:DMG: }, - [1658476127.776420][3171:3176] CHIP:DMG: - [1658476127.776451][3171:3176] CHIP:DMG: }, - [1658476127.776494][3171:3176] CHIP:DMG: - [1658476127.776523][3171:3176] CHIP:DMG: AttributeStatusIB = - [1658476127.776558][3171:3176] CHIP:DMG: { - [1658476127.776589][3171:3176] CHIP:DMG: AttributePathIB = - [1658476127.776625][3171:3176] CHIP:DMG: { - [1658476127.776664][3171:3176] CHIP:DMG: Endpoint = 0x0, - [1658476127.776705][3171:3176] CHIP:DMG: Cluster = 0x1f, - [1658476127.776746][3171:3176] CHIP:DMG: Attribute = 0x0000_0000, - [1658476127.776785][3171:3176] CHIP:DMG: ListIndex = Null, - [1658476127.776823][3171:3176] CHIP:DMG: } - [1658476127.776864][3171:3176] CHIP:DMG: - [1658476127.776900][3171:3176] CHIP:DMG: StatusIB = - [1658476127.776937][3171:3176] CHIP:DMG: { - [1658476127.776974][3171:3176] CHIP:DMG: status = 0x87 (CONSTRAINT_ERROR), - [1658476127.777013][3171:3176] CHIP:DMG: }, - [1658476127.777054][3171:3176] CHIP:DMG: - [1658476127.777088][3171:3176] CHIP:DMG: }, - [1658476127.777123][3171:3176] CHIP:DMG: - [1658476127.777152][3171:3176] CHIP:DMG: ], - [1658476127.777197][3171:3176] CHIP:DMG: - [1658476127.777226][3171:3176] CHIP:DMG: InteractionModelRevision = 1 - [1658476127.777255][3171:3176] CHIP:DMG: } - [1658476127.777405][3171:3176] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1658476127.777446][3171:3176] CHIP:TOO: Response Failu - disabled: true + command: "writeAttribute" + attribute: "ACL" + arguments: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [CommissionerNodeId], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "6", + AuthMode: "3", + Subjects: null, + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + ] + response: + error: CONSTRAINT_ERROR - label: - "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 2 elements 1.struct - Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null 2.struct Privilege field: Operate (3) - AuthMode field: invalid value (not 1-3) Subjects field: null Targets - field: null" + "Step 33:TH1 writes AccessControl cluster ACL attribute, value is list + of AccessControlEntryStruct containing 2 elements" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - { "privilege": 3, "authMode": 4, "subjects": null, "targets":null}]' 1 0 - - On TH1(Chiptool), Verify that the status is success when writing the AccessControl cluster ACL attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path due to invalid Authmode . - [1658476412.664216][3192:3197] CHIP:DMG: WriteResponseMessage = - [1658476412.664247][3192:3197] CHIP:DMG: { - [1658476412.664275][3192:3197] CHIP:DMG: AttributeStatusIBs = - [1658476412.664313][3192:3197] CHIP:DMG: [ - [1658476412.664342][3192:3197] CHIP:DMG: AttributeStatusIB = - [1658476412.664376][3192:3197] CHIP:DMG: { - [1658476412.664408][3192:3197] CHIP:DMG: AttributePathIB = - [1658476412.664448][3192:3197] CHIP:DMG: { - [1658476412.664487][3192:3197] CHIP:DMG: Endpoint = 0x0, - [1658476412.664529][3192:3197] CHIP:DMG: Cluster = 0x1f, - [1658476412.664570][3192:3197] CHIP:DMG: Attribute = 0x0000_0000, - [1658476412.664608][3192:3197] CHIP:DMG: } - [1658476412.664651][3192:3197] CHIP:DMG: - [1658476412.664690][3192:3197] CHIP:DMG: StatusIB = - [1658476412.664728][3192:3197] CHIP:DMG: { - [1658476412.664765][3192:3197] CHIP:DMG: status = 0x00 (SUCCESS), - [1658476412.664804][3192:3197] CHIP:DMG: }, - [1658476412.664841][3192:3197] CHIP:DMG: - [1658476412.664872][3192:3197] CHIP:DMG: }, - [1658476412.664914][3192:3197] CHIP:DMG: - [1658476412.664943][3192:3197] CHIP:DMG: AttributeStatusIB = - [1658476412.664975][3192:3197] CHIP:DMG: { - [1658476412.665005][3192:3197] CHIP:DMG: AttributePathIB = - [1658476412.665041][3192:3197] CHIP:DMG: { - [1658476412.665079][3192:3197] CHIP:DMG: Endpoint = 0x0, - [1658476412.665118][3192:3197] CHIP:DMG: Cluster = 0x1f, - [1658476412.665159][3192:3197] CHIP:DMG: Attribute = 0x0000_0000, - [1658476412.665198][3192:3197] CHIP:DMG: ListIndex = Null, - [1658476412.665236][3192:3197] CHIP:DMG: } - [1658476412.665276][3192:3197] CHIP:DMG: - [1658476412.665311][3192:3197] CHIP:DMG: StatusIB = - [1658476412.665347][3192:3197] CHIP:DMG: { - [1658476412.665384][3192:3197] CHIP:DMG: status = 0x00 (SUCCESS), - [1658476412.665421][3192:3197] CHIP:DMG: }, - [1658476412.665458][3192:3197] CHIP:DMG: - [1658476412.665491][3192:3197] CHIP:DMG: }, - [1658476412.665532][3192:3197] CHIP:DMG: - [1658476412.665561][3192:3197] CHIP:DMG: AttributeStatusIB = - [1658476412.665593][3192:3197] CHIP:DMG: { - [1658476412.665624][3192:3197] CHIP:DMG: AttributePathIB = - [1658476412.665659][3192:3197] CHIP:DMG: { - [1658476412.665776][3192:3197] CHIP:DMG: Endpoint = 0x0, - [1658476412.665819][3192:3197] CHIP:DMG: Cluster = 0x1f, - [1658476412.665860][3192:3197] CHIP:DMG: Attribute = 0x0000_0000, - [1658476412.665899][3192:3197] CHIP:DMG: ListIndex = Null, - [1658476412.665938][3192:3197] CHIP:DMG: } - [1658476412.665980][3192:3197] CHIP:DMG: - [1658476412.666015][3192:3197] CHIP:DMG: StatusIB = - [1658476412.666051][3192:3197] CHIP:DMG: { - [1658476412.666088][3192:3197] CHIP:DMG: status = 0x87 (CONSTRAINT_ERROR), - [1658476412.666130][3192:3197] CHIP:DMG: }, - [1658476412.666167][3192:3197] CHIP:DMG: - [1658476412.666197][3192:3197] CHIP:DMG: }, - [1658476412.666232][3192:3197] CHIP:DMG: - [1658476412.666260][3192:3197] CHIP:DMG: ], - [1658476412.666304][3192:3197] CHIP:DMG: - [1658476412.666332][3192:3197] CHIP:DMG: InteractionModelRevision = 1 - [1658476412.666361][3192:3197] CHIP:DMG: } - [1658476412.666509][3192:3197] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1658476412.666548][3192:3197] CHIP:TOO: Response Failure: IM Error 0x00000587: General error: 0x87 (CONSTRAINT_ERROR) - [1658476412.666640][3192:3197] CHIP:EM: Sending Standalone Ack for MessageCounter:222498029 on exchange 30870i - disabled: true + command: "writeAttribute" + attribute: "ACL" + arguments: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [CommissionerNodeId], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "6", + AuthMode: "4", + Subjects: null, + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + ] + response: + error: CONSTRAINT_ERROR - label: - "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 2 elements 1.struct - Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null 2.struct Privilege field: Operate (3) - AuthMode field: CASE (2) Subjects field: [0] Targets field: null" + "Step 34:TH1 writes AccessControl cluster ACL attribute, value is list + of AccessControlEntryStruct containing 2 elements" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - { "privilege": 3, "authMode": 2, "subjects": [0], "targets":null}]' 1 0 - - On TH1(Chiptool), Verify that the status is success when writing the AccessControl cluster ACL attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path due to invalid Subject field . - [1658476622.665126][3229:3234] CHIP:DMG: WriteClient moving to [ResponseRe] - [1658476622.665195][3229:3234] CHIP:DMG: WriteResponseMessage = - [1658476622.665225][3229:3234] CHIP:DMG: { - [1658476622.665254][3229:3234] CHIP:DMG: AttributeStatusIBs = - [1658476622.665291][3229:3234] CHIP:DMG: [ - [1658476622.665318][3229:3234] CHIP:DMG: AttributeStatusIB = - [1658476622.665353][3229:3234] CHIP:DMG: { - [1658476622.665390][3229:3234] CHIP:DMG: AttributePathIB = - [1658476622.665428][3229:3234] CHIP:DMG: { - [1658476622.665472][3229:3234] CHIP:DMG: Endpoint = 0x0, - [1658476622.665517][3229:3234] CHIP:DMG: Cluster = 0x1f, - [1658476622.665562][3229:3234] CHIP:DMG: Attribute = 0x0000_0000, - [1658476622.665604][3229:3234] CHIP:DMG: } - [1658476622.665652][3229:3234] CHIP:DMG: - [1658476622.665692][3229:3234] CHIP:DMG: StatusIB = - [1658476622.665734][3229:3234] CHIP:DMG: { - [1658476622.665776][3229:3234] CHIP:DMG: status = 0x00 (SUCCESS), - [1658476622.665821][3229:3234] CHIP:DMG: }, - [1658476622.665863][3229:3234] CHIP:DMG: - [1658476622.665902][3229:3234] CHIP:DMG: }, - [1658476622.665953][3229:3234] CHIP:DMG: - [1658476622.665985][3229:3234] CHIP:DMG: AttributeStatusIB = - [1658476622.666023][3229:3234] CHIP:DMG: { - [1658476622.666060][3229:3234] CHIP:DMG: AttributePathIB = - [1658476622.666100][3229:3234] CHIP:DMG: { - [1658476622.666144][3229:3234] CHIP:DMG: Endpoint = 0x0, - [1658476622.666192][3229:3234] CHIP:DMG: Cluster = 0x1f, - [1658476622.666236][3229:3234] CHIP:DMG: Attribute = 0x0000_0000, - [1658476622.666280][3229:3234] CHIP:DMG: ListIndex = Null, - [1658476622.666321][3229:3234] CHIP:DMG: } - [1658476622.666366][3229:3234] CHIP:DMG: - [1658476622.666410][3229:3234] CHIP:DMG: StatusIB = - [1658476622.666450][3229:3234] CHIP:DMG: { - [1658476622.666491][3229:3234] CHIP:DMG: status = 0x00 (SUCCESS), - [1658476622.666533][3229:3234] CHIP:DMG: }, - [1658476622.666574][3229:3234] CHIP:DMG: - [1658476622.666631][3229:3234] CHIP:DMG: }, - [1658476622.666686][3229:3234] CHIP:DMG: - [1658476622.666717][3229:3234] CHIP:DMG: AttributeStatusIB = - [1658476622.666755][3229:3234] CHIP:DMG: { - [1658476622.666787][3229:3234] CHIP:DMG: AttributePathIB = - [1658476622.666816][3229:3234] CHIP:DMG: { - [1658476622.666847][3229:3234] CHIP:DMG: Endpoint = 0x0, - [1658476622.666932][3229:3234] CHIP:DMG: Cluster = 0x1f, - [1658476622.666970][3229:3234] CHIP:DMG: Attribute = 0x0000_0000, - [1658476622.667004][3229:3234] CHIP:DMG: ListIndex = Null, - [1658476622.667035][3229:3234] CHIP:DMG: } - [1658476622.667068][3229:3234] CHIP:DMG: - [1658476622.667097][3229:3234] CHIP:DMG: StatusIB = - [1658476622.667127][3229:3234] CHIP:DMG: { - [1658476622.667157][3229:3234] CHIP:DMG: status = 0x87 (CONSTRAINT_ERROR), - [1658476622.667188][3229:3234] CHIP:DMG: }, - [1658476622.667220][3229:3234] CHIP:DMG: - [1658476622.667246][3229:3234] CHIP:DMG: }, - [1658476622.667276][3229:3234] CHIP:DMG: - [1658476622.667301][3229:3234] CHIP:DMG: ], - [1658476622.667338][3229:3234] CHIP:DMG: - [1658476622.667361][3229:3234] CHIP:DMG: InteractionModelRevision = 1 - [1658476622.667384][3229:3234] CHIP:DMG: } - [1658476622.667510][3229:3234] CHIP:DMG: WriteClient moving to [AwaitingDe] - disabled: true + command: "writeAttribute" + attribute: "ACL" + arguments: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [CommissionerNodeId], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "3", + AuthMode: "2", + Subjects: [0], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + ] + response: + error: CONSTRAINT_ERROR - label: - "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value - is list of AccessControlEntryStruct containing 2 elements 1.struct - Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null 2.struct Privilege field: Operate (3) - AuthMode field: CASE (2) Subjects field: [0xFFFFFFFFFFFFFFFF] Targets - field: null" + "Step 35:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute + value is list of AccessControlEntryStruct containing 2 elements + 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) + Subjects field: [N1] Targets field: null 2.struct Privilege field: + Operate (3) AuthMode field: CASE (2) Subjects field: + [0xFFFFFFFFFFFFFFFF] Targets field: null" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - { "privilege": 3, "authMode": 2, "subjects": [18446744073709551615], "targets":null}]' 1 0 - - - On TH1(Chiptool), Verify that the status is success when writing the AccessControl cluster ACL attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path due to invalid Subject field . - 1658476861.356730][3250:3255] CHIP:DMG: { - [1658476861.356767][3250:3255] CHIP:DMG: AttributeStatusIBs = - [1658476861.356813][3250:3255] CHIP:DMG: [ - [1658476861.356839][3250:3255] CHIP:DMG: AttributeStatusIB = - [1658476861.356870][3250:3255] CHIP:DMG: { - [1658476861.356898][3250:3255] CHIP:DMG: AttributePathIB = - [1658476861.356985][3250:3255] CHIP:DMG: { - [1658476861.357021][3250:3255] CHIP:DMG: Endpoint = 0x0, - [1658476861.357056][3250:3255] CHIP:DMG: Cluster = 0x1f, - [1658476861.357091][3250:3255] CHIP:DMG: Attribute = 0x0000_0000, - [1658476861.357123][3250:3255] CHIP:DMG: } - [1658476861.357159][3250:3255] CHIP:DMG: - [1658476861.357191][3250:3255] CHIP:DMG: StatusIB = - [1658476861.357225][3250:3255] CHIP:DMG: { - [1658476861.357257][3250:3255] CHIP:DMG: status = 0x00 (SUCCESS), - [1658476861.357290][3250:3255] CHIP:DMG: }, - [1658476861.357326][3250:3255] CHIP:DMG: - [1658476861.357354][3250:3255] CHIP:DMG: }, - [1658476861.357391][3250:3255] CHIP:DMG: - [1658476861.357417][3250:3255] CHIP:DMG: AttributeStatusIB = - [1658476861.357444][3250:3255] CHIP:DMG: { - [1658476861.357470][3250:3255] CHIP:DMG: AttributePathIB = - [1658476861.357501][3250:3255] CHIP:DMG: { - [1658476861.357534][3250:3255] CHIP:DMG: Endpoint = 0x0, - [1658476861.357569][3250:3255] CHIP:DMG: Cluster = 0x1f, - [1658476861.357604][3250:3255] CHIP:DMG: Attribute = 0x0000_0000, - [1658476861.357640][3250:3255] CHIP:DMG: ListIndex = Null, - [1658476861.357672][3250:3255] CHIP:DMG: } - [1658476861.357708][3250:3255] CHIP:DMG: - [1658476861.357738][3250:3255] CHIP:DMG: StatusIB = - [1658476861.357769][3250:3255] CHIP:DMG: { - [1658476861.357801][3250:3255] CHIP:DMG: status = 0x00 (SUCCESS), - [1658476861.357833][3250:3255] CHIP:DMG: }, - [1658476861.357866][3250:3255] CHIP:DMG: - [1658476861.357894][3250:3255] CHIP:DMG: }, - [1658476861.357932][3250:3255] CHIP:DMG: - [1658476861.357957][3250:3255] CHIP:DMG: AttributeStatusIB = - [1658476861.357984][3250:3255] CHIP:DMG: { - [1658476861.358011][3250:3255] CHIP:DMG: AttributePathIB = - [1658476861.358041][3250:3255] CHIP:DMG: { - [1658476861.358073][3250:3255] CHIP:DMG: Endpoint = 0x0, - [1658476861.358108][3250:3255] CHIP:DMG: Cluster = 0x1f, - [1658476861.358142][3250:3255] CHIP:DMG: Attribute = 0x0000_0000, - [1658476861.358175][3250:3255] CHIP:DMG: ListIndex = Null, - [1658476861.358207][3250:3255] CHIP:DMG: } - [1658476861.358241][3250:3255] CHIP:DMG: - [1658476861.358272][3250:3255] CHIP:DMG: StatusIB = - [1658476861.358303][3250:3255] CHIP:DMG: { - [1658476861.358336][3250:3255] CHIP:DMG: status = 0x87 (CONSTRAINT_ERROR), - [1658476861.358368][3250:3255] CHIP:DMG: }, - [1658476861.358399][3250:3255] CHIP:DMG: - [1658476861.358427][3250:3255] CHIP:DMG: }, - [1658476861.358457][3250:3255] CHIP:DMG: - [1658476861.358482][3250:3255] CHIP:DMG: ], - [1658476861.358519][3250:3255] CHIP:DMG: - [1658476861.358544][3250:3255] CHIP:DMG: InteractionModelRevision = 1 - [1658476861.358568][3250:3255] CHIP:DMG: } - [1658476861.358726][3250:3255] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1658476861.358763][3250:3255] CHIP:TOO: Response Failure: IM Error 0x00000587: General error: 0x87 (CONSTRAINT_ERROR) - disabled: true + command: "writeAttribute" + attribute: "ACL" + arguments: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [CommissionerNodeId], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "3", + AuthMode: "2", + Subjects: ["18446744073709551615"], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + ] + response: + error: CONSTRAINT_ERROR - label: - "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value - is list of AccessControlEntryStruct containing 2 elements 1.struct - Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null 2.struct Privilege field: Operate (3) - AuthMode field: CASE (2) Subjects field: [0xFFFFFFFD00000000] Targets - field: null" + "Step 36:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute + value is list of AccessControlEntryStruct containing 2 elements + 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) + Subjects field: [N1] Targets field: null 2.struct Privilege field: + Operate (3) AuthMode field: CASE (2) Subjects field: + [0xFFFFFFFD00000000] Targets field: null" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": [18446744060824649728], "targets": null}]' 1 0 - - On TH1(Chiptool), Verify that the status is success when writing the AccessControl cluster ACL attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path due to invalid Subject field . - 8477037.056167][3264:3269] CHIP:DMG: { - [1658477037.056200][3264:3269] CHIP:DMG: AttributePathIB = - [1658477037.056238][3264:3269] CHIP:DMG: { - [1658477037.056282][3264:3269] CHIP:DMG: Endpoint = 0x0, - [1658477037.056324][3264:3269] CHIP:DMG: Cluster = 0x1f, - [1658477037.056368][3264:3269] CHIP:DMG: Attribute = 0x0000_0000, - [1658477037.056405][3264:3269] CHIP:DMG: } - [1658477037.056448][3264:3269] CHIP:DMG: - [1658477037.056486][3264:3269] CHIP:DMG: StatusIB = - [1658477037.056529][3264:3269] CHIP:DMG: { - [1658477037.056568][3264:3269] CHIP:DMG: status = 0x00 (SUCCESS), - [1658477037.056609][3264:3269] CHIP:DMG: }, - [1658477037.056646][3264:3269] CHIP:DMG: - [1658477037.056680][3264:3269] CHIP:DMG: }, - [1658477037.056723][3264:3269] CHIP:DMG: - [1658477037.056753][3264:3269] CHIP:DMG: AttributeStatusIB = - [1658477037.056787][3264:3269] CHIP:DMG: { - [1658477037.056823][3264:3269] CHIP:DMG: AttributePathIB = - [1658477037.056860][3264:3269] CHIP:DMG: { - [1658477037.056898][3264:3269] CHIP:DMG: Endpoint = 0x0, - [1658477037.056940][3264:3269] CHIP:DMG: Cluster = 0x1f, - [1658477037.056985][3264:3269] CHIP:DMG: Attribute = 0x0000_0000, - [1658477037.057024][3264:3269] CHIP:DMG: ListIndex = Null, - [1658477037.057062][3264:3269] CHIP:DMG: } - [1658477037.057102][3264:3269] CHIP:DMG: - [1658477037.057143][3264:3269] CHIP:DMG: StatusIB = - [1658477037.057183][3264:3269] CHIP:DMG: { - [1658477037.057225][3264:3269] CHIP:DMG: status = 0x00 (SUCCESS), - [1658477037.057264][3264:3269] CHIP:DMG: }, - [1658477037.057303][3264:3269] CHIP:DMG: - [1658477037.057336][3264:3269] CHIP:DMG: }, - [1658477037.057381][3264:3269] CHIP:DMG: - [1658477037.057411][3264:3269] CHIP:DMG: AttributeStatusIB = - [1658477037.057443][3264:3269] CHIP:DMG: { - [1658477037.057474][3264:3269] CHIP:DMG: AttributePathIB = - [1658477037.057511][3264:3269] CHIP:DMG: { - [1658477037.057549][3264:3269] CHIP:DMG: Endpoint = 0x0, - [1658477037.057589][3264:3269] CHIP:DMG: Cluster = 0x1f, - [1658477037.057629][3264:3269] CHIP:DMG: Attribute = 0x0000_0000, - [1658477037.057668][3264:3269] CHIP:DMG: ListIndex = Null, - [1658477037.057706][3264:3269] CHIP:DMG: } - [1658477037.057746][3264:3269] CHIP:DMG: - [1658477037.057782][3264:3269] CHIP:DMG: StatusIB = - [1658477037.057819][3264:3269] CHIP:DMG: { - [1658477037.057857][3264:3269] CHIP:DMG: status = 0x87 (CONSTRAINT_ERROR), - [1658477037.057899][3264:3269] CHIP:DMG: }, - [1658477037.057936][3264:3269] CHIP:DMG: - [1658477037.057969][3264:3269] CHIP:DMG: }, - [1658477037.058005][3264:3269] CHIP:DMG: - [1658477037.058033][3264:3269] CHIP:DMG: ], - [1658477037.058078][3264:3269] CHIP:DMG: - [1658477037.058107][3264:3269] CHIP:DMG: InteractionModelRevision = 1 - [1658477037.058135][3264:3269] CHIP:DMG: } - [1658477037.058295][3264:3269] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1658477037.058334][3264:3269] CHIP:TOO: Response Failure: IM Error 0x00000587: General error: 0x87 (CONSTRAINT_ERROR) - [1658477037.058400][3264:3269] CHIP:EM: Sending Standalone Ack for MessageCounter:171679528 on exchange 41642i - disabled: true + command: "writeAttribute" + attribute: "ACL" + arguments: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [CommissionerNodeId], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "3", + AuthMode: "2", + Subjects: ["18446744060824649728"], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + ] + response: + error: CONSTRAINT_ERROR - label: - "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value - is list of AccessControlEntryStruct containing 2 elements struct + "Step 37:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute + value is list of AccessControlEntryStruct containing 2 elements struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects field: [N1] Targets field: null struct Privilege field: Operate (3) AuthMode field: CASE (2) Subjects field: [0xFFFFFFFFFFFF0000] Targets field: null" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - { "privilege": 3, "authMode": 2, "subjects": [18446744073709486080], "targets":null}]' 1 0 - - On TH1(Chiptool), Verify that the status is success when writing the AccessControl cluster ACL attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path due to invalid Subject field . - 658477229.869987][3634:3640] CHIP:EM: Removed CHIP MessageCounter:189477251 from RetransTable on exchange 22058i - [1658477229.870031][3634:3640] CHIP:DMG: WriteClient moving to [ResponseRe] - [1658477229.870093][3634:3640] CHIP:DMG: WriteResponseMessage = - [1658477229.870124][3634:3640] CHIP:DMG: { - [1658477229.870146][3634:3640] CHIP:DMG: AttributeStatusIBs = - [1658477229.870177][3634:3640] CHIP:DMG: [ - [1658477229.870201][3634:3640] CHIP:DMG: AttributeStatusIB = - [1658477229.870232][3634:3640] CHIP:DMG: { - [1658477229.870262][3634:3640] CHIP:DMG: AttributePathIB = - [1658477229.870299][3634:3640] CHIP:DMG: { - [1658477229.870336][3634:3640] CHIP:DMG: Endpoint = 0x0, - [1658477229.870373][3634:3640] CHIP:DMG: Cluster = 0x1f, - [1658477229.870407][3634:3640] CHIP:DMG: Attribute = 0x0000_0000, - [1658477229.870442][3634:3640] CHIP:DMG: } - [1658477229.870481][3634:3640] CHIP:DMG: - [1658477229.870517][3634:3640] CHIP:DMG: StatusIB = - [1658477229.870552][3634:3640] CHIP:DMG: { - [1658477229.870623][3634:3640] CHIP:DMG: status = 0x00 (SUCCESS), - [1658477229.870658][3634:3640] CHIP:DMG: }, - [1658477229.870689][3634:3640] CHIP:DMG: - [1658477229.870716][3634:3640] CHIP:DMG: }, - [1658477229.870756][3634:3640] CHIP:DMG: - [1658477229.870780][3634:3640] CHIP:DMG: AttributeStatusIB = - [1658477229.870809][3634:3640] CHIP:DMG: { - [1658477229.870836][3634:3640] CHIP:DMG: AttributePathIB = - [1658477229.870871][3634:3640] CHIP:DMG: { - [1658477229.870906][3634:3640] CHIP:DMG: Endpoint = 0x0, - [1658477229.870943][3634:3640] CHIP:DMG: Cluster = 0x1f, - [1658477229.870979][3634:3640] CHIP:DMG: Attribute = 0x0000_0000, - [1658477229.871014][3634:3640] CHIP:DMG: ListIndex = Null, - [1658477229.871048][3634:3640] CHIP:DMG: } - [1658477229.871086][3634:3640] CHIP:DMG: - [1658477229.871121][3634:3640] CHIP:DMG: StatusIB = - [1658477229.871156][3634:3640] CHIP:DMG: { - [1658477229.871191][3634:3640] CHIP:DMG: status = 0x00 (SUCCESS), - [1658477229.871226][3634:3640] CHIP:DMG: }, - [1658477229.871260][3634:3640] CHIP:DMG: - [1658477229.871287][3634:3640] CHIP:DMG: }, - [1658477229.871324][3634:3640] CHIP:DMG: - [1658477229.871348][3634:3640] CHIP:DMG: AttributeStatusIB = - [1658477229.871376][3634:3640] CHIP:DMG: { - [1658477229.871404][3634:3640] CHIP:DMG: AttributePathIB = - [1658477229.871436][3634:3640] CHIP:DMG: { - [1658477229.871471][3634:3640] CHIP:DMG: Endpoint = 0x0, - [1658477229.871507][3634:3640] CHIP:DMG: Cluster = 0x1f, - [1658477229.871543][3634:3640] CHIP:DMG: Attribute = 0x0000_0000, - [1658477229.871578][3634:3640] CHIP:DMG: ListIndex = Null, - [1658477229.871611][3634:3640] CHIP:DMG: } - [1658477229.871648][3634:3640] CHIP:DMG: - [1658477229.871681][3634:3640] CHIP:DMG: StatusIB = - [1658477229.871711][3634:3640] CHIP:DMG: { - [1658477229.871746][3634:3640] CHIP:DMG: status = 0x87 (CONSTRAINT_ERROR), - [1658477229.871778][3634:3640] CHIP:DMG: }, - [1658477229.871809][3634:3640] CHIP:DMG: - [1658477229.871836][3634:3640] CHIP:DMG: }, - [1658477229.871866][3634:3640] CHIP:DMG: - [1658477229.871889][3634:3640] CHIP:DMG: ], - [1658477229.871925][3634:3640] CHIP:DMG: - [1658477229.871949][3634:3640] CHIP:DMG: InteractionModelRevision = 1 - disabled: true + command: "writeAttribute" + attribute: "ACL" + arguments: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [CommissionerNodeId], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "3", + AuthMode: "2", + Subjects: ["18446744073709486080"], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + ] + response: + error: CONSTRAINT_ERROR - label: - "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value - is list of AccessControlEntryStruct containing 2 elements 1.struct - Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null 2.struct Privilege field: Operate (3) - AuthMode field: CASE (2) Subjects field: null Targets field: [{}]" + "Step 38:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute + value is list of AccessControlEntryStruct containing 2 elements + 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) + Subjects field: [N1] Targets field: null 2.struct Privilege field: + Operate (3) AuthMode field: CASE (2) Subjects field: null Targets + field: [{}]" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": null, "endpoint": null, "deviceType": null }]}]' 1 0 - - - On TH1(Chiptool), Verify that the status is success when writing the AccessControl cluster ACL attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path due to invalid Target field . - 1658477371.966712][3679:3684] CHIP:EM: Removed CHIP MessageCounter:138419251 from RetransTable on exchange 40076i - [1658477371.966756][3679:3684] CHIP:DMG: WriteClient moving to [ResponseRe] - [1658477371.966830][3679:3684] CHIP:DMG: WriteResponseMessage = - [1658477371.966860][3679:3684] CHIP:DMG: { - [1658477371.966885][3679:3684] CHIP:DMG: AttributeStatusIBs = - [1658477371.966923][3679:3684] CHIP:DMG: [ - [1658477371.966959][3679:3684] CHIP:DMG: AttributeStatusIB = - [1658477371.967002][3679:3684] CHIP:DMG: { - [1658477371.967043][3679:3684] CHIP:DMG: AttributePathIB = - [1658477371.967092][3679:3684] CHIP:DMG: { - [1658477371.967135][3679:3684] CHIP:DMG: Endpoint = 0x0, - [1658477371.967185][3679:3684] CHIP:DMG: Cluster = 0x1f, - [1658477371.967230][3679:3684] CHIP:DMG: Attribute = 0x0000_0000, - [1658477371.967271][3679:3684] CHIP:DMG: } - [1658477371.967317][3679:3684] CHIP:DMG: - [1658477371.967358][3679:3684] CHIP:DMG: StatusIB = - [1658477371.967400][3679:3684] CHIP:DMG: { - [1658477371.967443][3679:3684] CHIP:DMG: status = 0x00 (SUCCESS), - [1658477371.967484][3679:3684] CHIP:DMG: }, - [1658477371.967525][3679:3684] CHIP:DMG: - [1658477371.967560][3679:3684] CHIP:DMG: }, - [1658477371.967607][3679:3684] CHIP:DMG: - [1658477371.967639][3679:3684] CHIP:DMG: AttributeStatusIB = - [1658477371.967676][3679:3684] CHIP:DMG: { - [1658477371.967709][3679:3684] CHIP:DMG: AttributePathIB = - [1658477371.967741][3679:3684] CHIP:DMG: { - [1658477371.967774][3679:3684] CHIP:DMG: Endpoint = 0x0, - [1658477371.967818][3679:3684] CHIP:DMG: Cluster = 0x1f, - [1658477371.967862][3679:3684] CHIP:DMG: Attribute = 0x0000_0000, - [1658477371.967898][3679:3684] CHIP:DMG: ListIndex = Null, - [1658477371.967930][3679:3684] CHIP:DMG: } - [1658477371.967966][3679:3684] CHIP:DMG: - [1658477371.968000][3679:3684] CHIP:DMG: StatusIB = - [1658477371.968035][3679:3684] CHIP:DMG: { - [1658477371.968069][3679:3684] CHIP:DMG: status = 0x00 (SUCCESS), - [1658477371.968101][3679:3684] CHIP:DMG: }, - [1658477371.968133][3679:3684] CHIP:DMG: - [1658477371.968159][3679:3684] CHIP:DMG: }, - [1658477371.968195][3679:3684] CHIP:DMG: - [1658477371.968220][3679:3684] CHIP:DMG: AttributeStatusIB = - [1658477371.968247][3679:3684] CHIP:DMG: { - [1658477371.968274][3679:3684] CHIP:DMG: AttributePathIB = - [1658477371.968305][3679:3684] CHIP:DMG: { - [1658477371.968338][3679:3684] CHIP:DMG: Endpoint = 0x0, - [1658477371.968372][3679:3684] CHIP:DMG: Cluster = 0x1f, - [1658477371.968406][3679:3684] CHIP:DMG: Attribute = 0x0000_0000, - [1658477371.968440][3679:3684] CHIP:DMG: ListIndex = Null, - [1658477371.968472][3679:3684] CHIP:DMG: } - [1658477371.968506][3679:3684] CHIP:DMG: - [1658477371.968541][3679:3684] CHIP:DMG: StatusIB = - [1658477371.968573][3679:3684] CHIP:DMG: { - [1658477371.968604][3679:3684] CHIP:DMG: status = 0x87 (CONSTRAINT_ERROR), - [1658477371.968637][3679:3684] CHIP:DMG: }, - [1658477371.968668][3679:3684] CHIP:DMG: - [1658477371.968696][3679:3684] CHIP:DMG: }, - [1658477371.968726][3679:3684] CHIP:DMG: - [1658477371.968751][3679:3684] CHIP:DMG: ], - [1658477371.968789][3679:3684] CHIP:DMG: - [1658477371.968814][3679:3684] CHIP:DMG: InteractionModelRevision = 1 - [1658477371.968838][3679:3684] CHIP:DMG: } - [1658477371.968974][3679:3684] CHIP:DMG: WriteClient moving to [AwaitingDe] - disabled: true + command: "writeAttribute" + attribute: "ACL" + arguments: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [CommissionerNodeId], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "3", + AuthMode: "2", + Subjects: null, + Targets: + [{ Cluster: null, Endpoint: null, DeviceType: null }], + FabricIndex: CurrentFabricIndex, + }, + ] + response: + error: CONSTRAINT_ERROR - label: - "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value - is list of AccessControlEntryStruct containing 2 elements 1.struct - Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null 2.struct Privilege field: Operate (3) - AuthMode field: CASE (2) Subjects field: null Targets field: - [{Cluster: 0xFFFFFFFF}]" + "Step 39:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute + value is list of AccessControlEntryStruct containing 2 elements + 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) + Subjects field: [N1] Targets field: null 2.struct Privilege field: + Operate (3) AuthMode field: CASE (2) Subjects field: null Targets + field: [{Cluster: 0xFFFFFFFF}]" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": 4294967295, "endpoint": null, "deviceType": null }]}]' 1 0 - - On TH1(Chiptool), Verify that the status is success when writing the AccessControl cluster ACL attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path due to invalid Target field . - [1657617852.177018][8933:8938] CHIP:DMG: WriteResponseMessage = - [1657617852.177055][8933:8938] CHIP:DMG: { - [1657617852.177086][8933:8938] CHIP:DMG: AttributeStatusIBs = - [1657617852.177130][8933:8938] CHIP:DMG: [ - [1657617852.177163][8933:8938] CHIP:DMG: AttributeStatusIB = - [1657617852.177204][8933:8938] CHIP:DMG: { - [1657617852.177243][8933:8938] CHIP:DMG: AttributePathIB = - [1657617852.177284][8933:8938] CHIP:DMG: { - [1657617852.177329][8933:8938] CHIP:DMG: Endpoint = 0x0, - [1657617852.177375][8933:8938] CHIP:DMG: Cluster = 0x1f, - [1657617852.177418][8933:8938] CHIP:DMG: Attribute = 0x0000_0000, - [1657617852.177464][8933:8938] CHIP:DMG: } - [1657617852.177514][8933:8938] CHIP:DMG: - [1657617852.177558][8933:8938] CHIP:DMG: StatusIB = - [1657617852.177604][8933:8938] CHIP:DMG: { - [1657617852.177649][8933:8938] CHIP:DMG: status = 0x00 (SUCCESS), - [1657617852.177692][8933:8938] CHIP:DMG: }, - [1657617852.177732][8933:8938] CHIP:DMG: - [1657617852.177765][8933:8938] CHIP:DMG: }, - [1657617852.177811][8933:8938] CHIP:DMG: - [1657617852.177843][8933:8938] CHIP:DMG: AttributeStatusIB = - [1657617852.177877][8933:8938] CHIP:DMG: { - [1657617852.177911][8933:8938] CHIP:DMG: AttributePathIB = - [1657617852.177950][8933:8938] CHIP:DMG: { - [1657617852.177996][8933:8938] CHIP:DMG: Endpoint = 0x0, - [1657617852.178042][8933:8938] CHIP:DMG: Cluster = 0x1f, - [1657617852.178090][8933:8938] CHIP:DMG: Attribute = 0x0000_0000, - [1657617852.178133][8933:8938] CHIP:DMG: ListIndex = Null, - [1657617852.178173][8933:8938] CHIP:DMG: } - [1657617852.178217][8933:8938] CHIP:DMG: - [1657617852.178261][8933:8938] CHIP:DMG: StatusIB = - [1657617852.178301][8933:8938] CHIP:DMG: { - [1657617852.178340][8933:8938] CHIP:DMG: status = 0x00 (SUCCESS), - [1657617852.178414][8933:8938] CHIP:DMG: }, - [1657617852.178457][8933:8938] CHIP:DMG: - [1657617852.178489][8933:8938] CHIP:DMG: }, - [1657617852.178535][8933:8938] CHIP:DMG: - [1657617852.178566][8933:8938] CHIP:DMG: AttributeStatusIB = - [1657617852.178601][8933:8938] CHIP:DMG: { - [1657617852.178634][8933:8938] CHIP:DMG: AttributePathIB = - [1657617852.178673][8933:8938] CHIP:DMG: { - [1657617852.178715][8933:8938] CHIP:DMG: Endpoint = 0x0, - [1657617852.178758][8933:8938] CHIP:DMG: Cluster = 0x1f, - [1657617852.178801][8933:8938] CHIP:DMG: Attribute = 0x0000_0000, - [1657617852.178847][8933:8938] CHIP:DMG: ListIndex = Null, - [1657617852.178888][8933:8938] CHIP:DMG: } - [1657617852.178932][8933:8938] CHIP:DMG: - [1657617852.178971][8933:8938] CHIP:DMG: StatusIB = - [1657617852.179010][8933:8938] CHIP:DMG: { - [1657617852.179053][8933:8938] CHIP:DMG: status = 0x87 (CONSTRAINT_ERROR), - [1657617852.179094][8933:8938] CHIP:DMG: }, - [1657617852.179135][8933:8938] CHIP:DMG: - [1657617852.179168][8933:8938] CHIP:DMG: }, - [1657617852.179206][8933:8938] CHIP:DMG: - [1657617852.179237][8933:8938] CHIP:DMG: ], - [1657617852.179284][8933:8938] CHIP:DMG: - [1657617852.179315][8933:8938] CHIP:DMG: InteractionModelRevision = 1 - [1657617852.179346][8933:8938] CHIP:DMG: } - [1657617852.179509][8933:8938] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1657617852.179550][8933:8938] CHIP:TOO: Response Failure: IM Error 0x00000587: General error: 0x87 (CONSTRAINT_ERROR) - disabled: true + command: "writeAttribute" + attribute: "ACL" + arguments: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [CommissionerNodeId], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "3", + AuthMode: "2", + Subjects: null, + Targets: + [ + { + Cluster: 4294967295, + Endpoint: null, + DeviceType: null, + }, + ], + FabricIndex: CurrentFabricIndex, + }, + ] + response: + error: CONSTRAINT_ERROR - label: - "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value - is list of AccessControlEntryStruct containing 2 elements 1. + "Step 40:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute + value is list of AccessControlEntryStruct containing 2 elements 1. struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects field: [N1] Targets field: null 2. struct Privilege field: Operate (3) AuthMode field: CASE (2) Subjects field: null Targets field: [{Endpoint: 65535}]" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": null, "endpoint": 65535, "deviceType": null }]}]' 1 0 - - On TH1(Chiptool), Verify that the status is success when writing the AccessControl cluster ACL attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path due to invalid Target field . - [1657617920.044059][8948:8953] CHIP:DMG: { - [1657617920.044085][8948:8953] CHIP:DMG: AttributeStatusIBs = - [1657617920.044120][8948:8953] CHIP:DMG: [ - [1657617920.044148][8948:8953] CHIP:DMG: AttributeStatusIB = - [1657617920.044181][8948:8953] CHIP:DMG: { - [1657617920.044211][8948:8953] CHIP:DMG: AttributePathIB = - [1657617920.044251][8948:8953] CHIP:DMG: { - [1657617920.044288][8948:8953] CHIP:DMG: Endpoint = 0x0, - [1657617920.044327][8948:8953] CHIP:DMG: Cluster = 0x1f, - [1657617920.044365][8948:8953] CHIP:DMG: Attribute = 0x0000_0000, - [1657617920.044401][8948:8953] CHIP:DMG: } - [1657617920.044440][8948:8953] CHIP:DMG: - [1657617920.044475][8948:8953] CHIP:DMG: StatusIB = - [1657617920.044512][8948:8953] CHIP:DMG: { - [1657617920.044548][8948:8953] CHIP:DMG: status = 0x00 (SUCCESS), - [1657617920.044585][8948:8953] CHIP:DMG: }, - [1657617920.044625][8948:8953] CHIP:DMG: - [1657617920.044656][8948:8953] CHIP:DMG: }, - [1657617920.044697][8948:8953] CHIP:DMG: - [1657617920.044725][8948:8953] CHIP:DMG: AttributeStatusIB = - [1657617920.044755][8948:8953] CHIP:DMG: { - [1657617920.044784][8948:8953] CHIP:DMG: AttributePathIB = - [1657617920.044818][8948:8953] CHIP:DMG: { - [1657617920.044857][8948:8953] CHIP:DMG: Endpoint = 0x0, - [1657617920.044895][8948:8953] CHIP:DMG: Cluster = 0x1f, - [1657617920.044934][8948:8953] CHIP:DMG: Attribute = 0x0000_0000, - [1657617920.044975][8948:8953] CHIP:DMG: ListIndex = Null, - [1657617920.045010][8948:8953] CHIP:DMG: } - [1657617920.045049][8948:8953] CHIP:DMG: - [1657617920.045084][8948:8953] CHIP:DMG: StatusIB = - [1657617920.045118][8948:8953] CHIP:DMG: { - [1657617920.045158][8948:8953] CHIP:DMG: status = 0x00 (SUCCESS), - [1657617920.045193][8948:8953] CHIP:DMG: }, - [1657617920.045229][8948:8953] CHIP:DMG: - [1657617920.045258][8948:8953] CHIP:DMG: }, - [1657617920.045298][8948:8953] CHIP:DMG: - [1657617920.045326][8948:8953] CHIP:DMG: AttributeStatusIB = - [1657617920.045356][8948:8953] CHIP:DMG: { - [1657617920.045385][8948:8953] CHIP:DMG: AttributePathIB = - [1657617920.045419][8948:8953] CHIP:DMG: { - [1657617920.045455][8948:8953] CHIP:DMG: Endpoint = 0x0, - [1657617920.045493][8948:8953] CHIP:DMG: Cluster = 0x1f, - [1657617920.045531][8948:8953] CHIP:DMG: Attribute = 0x0000_0000, - [1657617920.045567][8948:8953] CHIP:DMG: ListIndex = Null, - [1657617920.045602][8948:8953] CHIP:DMG: } - [1657617920.045642][8948:8953] CHIP:DMG: - [1657617920.045675][8948:8953] CHIP:DMG: StatusIB = - [1657617920.045711][8948:8953] CHIP:DMG: { - [1657617920.045745][8948:8953] CHIP:DMG: status = 0x87 (CONSTRAINT_ERROR), - [1657617920.045781][8948:8953] CHIP:DMG: }, - [1657617920.045815][8948:8953] CHIP:DMG: - [1657617920.045846][8948:8953] CHIP:DMG: }, - [1657617920.045880][8948:8953] CHIP:DMG: - [1657617920.045907][8948:8953] CHIP:DMG: ], - [1657617920.045948][8948:8953] CHIP:DMG: - [1657617920.045976][8948:8953] CHIP:DMG: InteractionModelRevision = 1 - [1657617920.046002][8948:8953] CHIP:DMG: } - [1657617920.046147][8948:8953] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1657617920.046184][8948:8953] CHIP:TOO: Response Failure: IM Error 0x00000587: General error: 0x87 (CONSTRAINT_ERROR) - disabled: true + command: "writeAttribute" + attribute: "ACL" + arguments: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [CommissionerNodeId], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "3", + AuthMode: "2", + Subjects: null, + Targets: + [ + { + Cluster: null, + Endpoint: 65535, + DeviceType: null, + }, + ], + FabricIndex: CurrentFabricIndex, + }, + ] + response: + error: CONSTRAINT_ERROR - label: - "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value - is list of AccessControlEntryStruct containing 2 elements 1.struct - Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null 2.struct Privilege field: Operate (3) - AuthMode field: CASE (2) Subjects field: null Targets field: - [{DeviceType: 0xFFFFFFFF}]" + "Step 41:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute + value is list of AccessControlEntryStruct containing 2 elements + 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) + Subjects field: [N1] Targets field: null 2.struct Privilege field: + Operate (3) AuthMode field: CASE (2) Subjects field: null Targets + field: [{DeviceType: 0xFFFFFFFF}]" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": null, "endpoint": null, "deviceType": 4294967295 }]}]' 1 0 - - On TH1(Chiptool), Verify that the status is success when writing the AccessControl cluster ACL attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path due to invalid Target field . - - - - [1657617920.044059][8948:8953] CHIP:DMG: { - [1657617920.044085][8948:8953] CHIP:DMG: AttributeStatusIBs = - [1657617920.044120][8948:8953] CHIP:DMG: [ - [1657617920.044148][8948:8953] CHIP:DMG: AttributeStatusIB = - [1657617920.044181][8948:8953] CHIP:DMG: { - [1657617920.044211][8948:8953] CHIP:DMG: AttributePathIB = - [1657617920.044251][8948:8953] CHIP:DMG: { - [1657617920.044288][8948:8953] CHIP:DMG: Endpoint = 0x0, - [1657617920.044327][8948:8953] CHIP:DMG: Cluster = 0x1f, - [1657617920.044365][8948:8953] CHIP:DMG: Attribute = 0x0000_0000, - [1657617920.044401][8948:8953] CHIP:DMG: } - [1657617920.044440][8948:8953] CHIP:DMG: - [1657617920.044475][8948:8953] CHIP:DMG: StatusIB = - [1657617920.044512][8948:8953] CHIP:DMG: { - [1657617920.044548][8948:8953] CHIP:DMG: status = 0x00 (SUCCESS), - [1657617920.044585][8948:8953] CHIP:DMG: }, - [1657617920.044625][8948:8953] CHIP:DMG: - [1657617920.044656][8948:8953] CHIP:DMG: }, - [1657617920.044697][8948:8953] CHIP:DMG: - [1657617920.044725][8948:8953] CHIP:DMG: AttributeStatusIB = - [1657617920.044755][8948:8953] CHIP:DMG: { - [1657617920.044784][8948:8953] CHIP:DMG: AttributePathIB = - [1657617920.044818][8948:8953] CHIP:DMG: { - [1657617920.044857][8948:8953] CHIP:DMG: Endpoint = 0x0, - [1657617920.044895][8948:8953] CHIP:DMG: Cluster = 0x1f, - [1657617920.044934][8948:8953] CHIP:DMG: Attribute = 0x0000_0000, - [1657617920.044975][8948:8953] CHIP:DMG: ListIndex = Null, - [1657617920.045010][8948:8953] CHIP:DMG: } - [1657617920.045049][8948:8953] CHIP:DMG: - [1657617920.045084][8948:8953] CHIP:DMG: StatusIB = - [1657617920.045118][8948:8953] CHIP:DMG: { - [1657617920.045158][8948:8953] CHIP:DMG: status = 0x00 (SUCCESS), - [1657617920.045193][8948:8953] CHIP:DMG: }, - [1657617920.045229][8948:8953] CHIP:DMG: - [1657617920.045258][8948:8953] CHIP:DMG: }, - [1657617920.045298][8948:8953] CHIP:DMG: - [1657617920.045326][8948:8953] CHIP:DMG: AttributeStatusIB = - [1657617920.045356][8948:8953] CHIP:DMG: { - [1657617920.045385][8948:8953] CHIP:DMG: AttributePathIB = - [1657617920.045419][8948:8953] CHIP:DMG: { - [1657617920.045455][8948:8953] CHIP:DMG: Endpoint = 0x0, - [1657617920.045493][8948:8953] CHIP:DMG: Cluster = 0x1f, - [1657617920.045531][8948:8953] CHIP:DMG: Attribute = 0x0000_0000, - [1657617920.045567][8948:8953] CHIP:DMG: ListIndex = Null, - [1657617920.045602][8948:8953] CHIP:DMG: } - [1657617920.045642][8948:8953] CHIP:DMG: - [1657617920.045675][8948:8953] CHIP:DMG: StatusIB = - [1657617920.045711][8948:8953] CHIP:DMG: { - [1657617920.045745][8948:8953] CHIP:DMG: status = 0x87 (CONSTRAINT_ERROR), - [1657617920.045781][8948:8953] CHIP:DMG: }, - [1657617920.045815][8948:8953] CHIP:DMG: - [1657617920.045846][8948:8953] CHIP:DMG: }, - [1657617920.045880][8948:8953] CHIP:DMG: - [1657617920.045907][8948:8953] CHIP:DMG: ], - [1657617920.045948][8948:8953] CHIP:DMG: - [1657617920.045976][8948:8953] CHIP:DMG: InteractionModelRevision = 1 - [1657617920.046002][8948:8953] CHIP:DMG: } - [1657617920.046147][8948:8953] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1657617920.046184][8948:8953] CHIP:TOO: Response Failure: IM Error 0x00000587: General error: 0x87 (CONSTRAINT_ERROR) - disabled: true + command: "writeAttribute" + attribute: "ACL" + arguments: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [CommissionerNodeId], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "3", + AuthMode: "2", + Subjects: null, + Targets: + [ + { + Cluster: null, + Endpoint: null, + DeviceType: 4294967295, + }, + ], + FabricIndex: CurrentFabricIndex, + }, + ] + response: + error: CONSTRAINT_ERROR - label: - "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value - is list of AccessControlEntryStruct containing 2 elements 1.struct - Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null 2.struct Privilege field: Operate (3) - AuthMode field: CASE (2) Subjects field: null Targets field: - [{Endpoint: 22, DeviceType: 33}]" + "Step 42:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute + value is list of AccessControlEntryStruct containing 2 elements + 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) + Subjects field: [N1] Targets field: null 2.struct Privilege field: + Operate (3) AuthMode field: CASE (2) Subjects field: null Targets + field: [{Endpoint: 22, DeviceType: 33}]" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": null, "endpoint": 22, "deviceType": 33 }]}]' 1 0 - - On TH1(Chiptool), Verify that the status is success when writing the AccessControl cluster ACL attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path due to invalid Target field with both Endpoint and DeviceType fields present - [1658477583.616961][3701:3706] CHIP:DMG: WriteClient moving to [ResponseRe] - [1658477583.617072][3701:3706] CHIP:DMG: WriteResponseMessage = - [1658477583.617120][3701:3706] CHIP:DMG: { - [1658477583.617143][3701:3706] CHIP:DMG: AttributeStatusIBs = - [1658477583.617174][3701:3706] CHIP:DMG: [ - [1658477583.617199][3701:3706] CHIP:DMG: AttributeStatusIB = - [1658477583.617244][3701:3706] CHIP:DMG: { - [1658477583.617282][3701:3706] CHIP:DMG: AttributePathIB = - [1658477583.617329][3701:3706] CHIP:DMG: { - [1658477583.617376][3701:3706] CHIP:DMG: Endpoint = 0x0, - [1658477583.617421][3701:3706] CHIP:DMG: Cluster = 0x1f, - [1658477583.617468][3701:3706] CHIP:DMG: Attribute = 0x0000_0000, - [1658477583.617510][3701:3706] CHIP:DMG: } - [1658477583.617560][3701:3706] CHIP:DMG: - [1658477583.617604][3701:3706] CHIP:DMG: StatusIB = - [1658477583.617639][3701:3706] CHIP:DMG: { - [1658477583.617683][3701:3706] CHIP:DMG: status = 0x00 (SUCCESS), - [1658477583.617730][3701:3706] CHIP:DMG: }, - [1658477583.617773][3701:3706] CHIP:DMG: - [1658477583.617803][3701:3706] CHIP:DMG: }, - [1658477583.617848][3701:3706] CHIP:DMG: - [1658477583.617874][3701:3706] CHIP:DMG: AttributeStatusIB = - [1658477583.617903][3701:3706] CHIP:DMG: { - [1658477583.617934][3701:3706] CHIP:DMG: AttributePathIB = - [1658477583.617966][3701:3706] CHIP:DMG: { - [1658477583.618011][3701:3706] CHIP:DMG: Endpoint = 0x0, - [1658477583.618059][3701:3706] CHIP:DMG: Cluster = 0x1f, - [1658477583.618108][3701:3706] CHIP:DMG: Attribute = 0x0000_0000, - [1658477583.618156][3701:3706] CHIP:DMG: ListIndex = Null, - [1658477583.618201][3701:3706] CHIP:DMG: } - [1658477583.618249][3701:3706] CHIP:DMG: - [1658477583.618292][3701:3706] CHIP:DMG: StatusIB = - [1658477583.618325][3701:3706] CHIP:DMG: { - [1658477583.618369][3701:3706] CHIP:DMG: status = 0x00 (SUCCESS), - [1658477583.618401][3701:3706] CHIP:DMG: }, - [1658477583.618432][3701:3706] CHIP:DMG: - [1658477583.618459][3701:3706] CHIP:DMG: }, - [1658477583.618504][3701:3706] CHIP:DMG: - [1658477583.618530][3701:3706] CHIP:DMG: AttributeStatusIB = - [1658477583.618558][3701:3706] CHIP:DMG: { - [1658477583.618627][3701:3706] CHIP:DMG: AttributePathIB = - [1658477583.618664][3701:3706] CHIP:DMG: { - [1658477583.618707][3701:3706] CHIP:DMG: Endpoint = 0x0, - [1658477583.618755][3701:3706] CHIP:DMG: Cluster = 0x1f, - [1658477583.618804][3701:3706] CHIP:DMG: Attribute = 0x0000_0000, - [1658477583.618851][3701:3706] CHIP:DMG: ListIndex = Null, - [1658477583.618897][3701:3706] CHIP:DMG: } - [1658477583.618947][3701:3706] CHIP:DMG: - [1658477583.618990][3701:3706] CHIP:DMG: StatusIB = - [1658477583.619034][3701:3706] CHIP:DMG: { - [1658477583.619078][3701:3706] CHIP:DMG: status = 0x87 (CONSTRAINT_ERROR), - [1658477583.619124][3701:3706] CHIP:DMG: }, - [1658477583.619167][3701:3706] CHIP:DMG: - [1658477583.619196][3701:3706] CHIP:DMG: }, - [1658477583.619235][3701:3706] CHIP:DMG: - [1658477583.619261][3701:3706] CHIP:DMG: ], - [1658477583.619297][3701:3706] CHIP:DMG: - [1658477583.619321][3701:3706] CHIP:DMG: InteractionModelRevision = 1 - [1658477583.619346][3701:3706] CHIP:DMG: } - [1658477583.619476][3701:3706] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1658477583.619510][3701:3706] CHIP:TOO: Response Failure: IM Error 0x00000587: General error: 0x87 (CONSTRAINT_ERROR) - [1658477583.619575][3701:3706] CHIP:EM: Sending Standalone Ack for MessageCounter:77176256 on exchange 29384i - disabled: true + command: "writeAttribute" + attribute: "ACL" + arguments: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [CommissionerNodeId], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "3", + AuthMode: "2", + Subjects: null, + Targets: + [{ Cluster: null, Endpoint: 22, DeviceType: 33 }], + FabricIndex: CurrentFabricIndex, + }, + ] + response: + error: CONSTRAINT_ERROR - label: - "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value - is list of AccessControlEntryStruct containing 2 elements 1.struct - Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null 2.struct Privilege field: Operate (3) - AuthMode field: CASE (2) Subjects field: null Targets field: - [{Cluster: 11, Endpoint: 22, DeviceType: 33}]" + "Step 43:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute + value is list of AccessControlEntryStruct containing 2 elements + 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) + Subjects field: [N1] Targets field: null 2.struct Privilege field: + Operate (3) AuthMode field: CASE (2) Subjects field: null Targets + field: [{Cluster: 11, Endpoint: 22, DeviceType: 33}]" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": 11, "endpoint": 22, "deviceType": 33 }]}]' 1 0 - - - On TH1(Chiptool), Verify that the status is success when writing the AccessControl cluster ACL attribute with a value is list of AccessControlEntryStruct containing 2 elements with Success for first element path and CONSTRAINT_ERROR (0x87) for Second element path due to invalid Target field - [1658477662.415412][3710:3715] CHIP:EM: Removed CHIP MessageCounter:35384027 from RetransTable on exchange 6953i - [1658477662.415452][3710:3715] CHIP:DMG: WriteClient moving to [ResponseRe] - [1658477662.415535][3710:3715] CHIP:DMG: WriteResponseMessage = - [1658477662.415563][3710:3715] CHIP:DMG: { - [1658477662.415582][3710:3715] CHIP:DMG: AttributeStatusIBs = - [1658477662.415609][3710:3715] CHIP:DMG: [ - [1658477662.415629][3710:3715] CHIP:DMG: AttributeStatusIB = - [1658477662.415662][3710:3715] CHIP:DMG: { - [1658477662.415692][3710:3715] CHIP:DMG: AttributePathIB = - [1658477662.415727][3710:3715] CHIP:DMG: { - [1658477662.415779][3710:3715] CHIP:DMG: Endpoint = 0x0, - [1658477662.415845][3710:3715] CHIP:DMG: Cluster = 0x1f, - [1658477662.415895][3710:3715] CHIP:DMG: Attribute = 0x0000_0000, - [1658477662.415942][3710:3715] CHIP:DMG: } - [1658477662.415994][3710:3715] CHIP:DMG: - [1658477662.416051][3710:3715] CHIP:DMG: StatusIB = - [1658477662.416097][3710:3715] CHIP:DMG: { - [1658477662.416150][3710:3715] CHIP:DMG: status = 0x00 (SUCCESS), - [1658477662.416205][3710:3715] CHIP:DMG: }, - [1658477662.416239][3710:3715] CHIP:DMG: - [1658477662.416275][3710:3715] CHIP:DMG: }, - [1658477662.416323][3710:3715] CHIP:DMG: - [1658477662.416348][3710:3715] CHIP:DMG: AttributeStatusIB = - [1658477662.416385][3710:3715] CHIP:DMG: { - [1658477662.416414][3710:3715] CHIP:DMG: AttributePathIB = - [1658477662.416454][3710:3715] CHIP:DMG: { - [1658477662.416487][3710:3715] CHIP:DMG: Endpoint = 0x0, - [1658477662.416533][3710:3715] CHIP:DMG: Cluster = 0x1f, - [1658477662.416580][3710:3715] CHIP:DMG: Attribute = 0x0000_0000, - [1658477662.416615][3710:3715] CHIP:DMG: ListIndex = Null, - [1658477662.416658][3710:3715] CHIP:DMG: } - [1658477662.416702][3710:3715] CHIP:DMG: - [1658477662.416736][3710:3715] CHIP:DMG: StatusIB = - [1658477662.416779][3710:3715] CHIP:DMG: { - [1658477662.416820][3710:3715] CHIP:DMG: status = 0x00 (SUCCESS), - [1658477662.416855][3710:3715] CHIP:DMG: }, - [1658477662.416893][3710:3715] CHIP:DMG: - [1658477662.416920][3710:3715] CHIP:DMG: }, - [1658477662.416965][3710:3715] CHIP:DMG: - [1658477662.416990][3710:3715] CHIP:DMG: AttributeStatusIB = - [1658477662.417028][3710:3715] CHIP:DMG: { - [1658477662.417056][3710:3715] CHIP:DMG: AttributePathIB = - [1658477662.417098][3710:3715] CHIP:DMG: { - [1658477662.417141][3710:3715] CHIP:DMG: Endpoint = 0x0, - [1658477662.417176][3710:3715] CHIP:DMG: Cluster = 0x1f, - [1658477662.417221][3710:3715] CHIP:DMG: Attribute = 0x0000_0000, - [1658477662.417266][3710:3715] CHIP:DMG: ListIndex = Null, - [1658477662.417300][3710:3715] CHIP:DMG: } - [1658477662.417334][3710:3715] CHIP:DMG: - [1658477662.417367][3710:3715] CHIP:DMG: StatusIB = - [1658477662.417400][3710:3715] CHIP:DMG: { - [1658477662.417435][3710:3715] CHIP:DMG: status = 0x87 (CONSTRAINT_ERROR), - [1658477662.417468][3710:3715] CHIP:DMG: }, - [1658477662.417501][3710:3715] CHIP:DMG: - [1658477662.417528][3710:3715] CHIP:DMG: }, - [1658477662.417559][3710:3715] CHIP:DMG: - [1658477662.417582][3710:3715] CHIP:DMG: ], - [1658477662.417618][3710:3715] CHIP:DMG: - [1658477662.417641][3710:3715] CHIP:DMG: InteractionModelRevision = 1 - [1658477662.417664][3710:3715] CHIP:DMG: } - [1658477662.417794][3710:3715] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1658477662.417828][3710:3715] CHIP:TOO: Response Failure: IM Error 0x00000587: General error: 0x87 (CONSTRAINT_ERROR) - [1658477662.417896][3710:3715] CHIP:EM: Sending Standalone Ack for MessageCounter:43630190 on exchange 6953i - [1658477662.417987][3710:3715] CHIP:IN: Prepared secure message 0xffff82fdd9e8 to 0x0000000000000001 (1) of type 0x10 and prot - disabled: true + command: "writeAttribute" + attribute: "ACL" + arguments: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [CommissionerNodeId], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + { + Privilege: "3", + AuthMode: "2", + Subjects: null, + Targets: [{ Cluster: 11, Endpoint: 22, DeviceType: 33 }], + FabricIndex: CurrentFabricIndex, + }, + ] + response: + error: CONSTRAINT_ERROR - label: - "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value - is an empty list" + "Step 44:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute + value is an empty list" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol write acl '[]' 1 0 - On TH1(Chiptool), Verify that the status is success for acl attribute value is an empty list since all ACL entries removed - RetransTable on exchange 43997i - [1660632377.411062][3241:3246] CHIP:DMG: WriteClient moving to [ResponseRe] - [1660632377.411111][3241:3246] CHIP:DMG: WriteResponseMessage = - [1660632377.411137][3241:3246] CHIP:DMG: { - [1660632377.411159][3241:3246] CHIP:DMG: AttributeStatusIBs = - [1660632377.411190][3241:3246] CHIP:DMG: [ - [1660632377.411215][3241:3246] CHIP:DMG: AttributeStatusIB = - [1660632377.411248][3241:3246] CHIP:DMG: { - [1660632377.411277][3241:3246] CHIP:DMG: AttributePathIB = - [1660632377.411313][3241:3246] CHIP:DMG: { - [1660632377.411350][3241:3246] CHIP:DMG: Endpoint = 0x0, - [1660632377.411388][3241:3246] CHIP:DMG: Cluster = 0x1f, - [1660632377.411423][3241:3246] CHIP:DMG: Attribute = 0x0000_0000, - [1660632377.411456][3241:3246] CHIP:DMG: } - [1660632377.411496][3241:3246] CHIP:DMG: - [1660632377.411528][3241:3246] CHIP:DMG: StatusIB = - [1660632377.411563][3241:3246] CHIP:DMG: { - [1660632377.411596][3241:3246] CHIP:DMG: status = 0x00 (SUCCESS), - [1660632377.411628][3241:3246] CHIP:DMG: }, - [1660632377.411687][3241:3246] CHIP:DMG: - [1660632377.411717][3241:3246] CHIP:DMG: }, - [1660632377.411748][3241:3246] CHIP:DMG: - [1660632377.411775][3241:3246] CHIP:DMG: ], - [1660632377.411804][3241:3246] CHIP:DMG: - [1660632377.411828][3241:3246] CHIP:DMG: InteractionModelRevision = 1 - [1660632377.411851][3241:3246] CHIP:DMG: } - [1660632377.411922][3241:3246] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1660632377.411986][3241:3246] CHIP:EM: Sending Standalone Ack for MessageCounter:259751171 on exchange 43997i - disabled: true + command: "writeAttribute" + attribute: "ACL" + arguments: + value: [] diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_7.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_7.yaml index cd5ef68b9291c3..59e09a8dd7010f 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_7.yaml @@ -13,258 +13,164 @@ # limitations under the License. # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 3.2.7. [TC-ACL-2.7] Extension multi-fabric +name: 133.2.3. [TC-ACL-2.7] Extension attribute PICS: - ACL.S config: nodeId: 0x12344321 - cluster: "Basic Information" + cluster: "Access Control" endpoint: 0 + nodeId2: + type: node_id + defaultValue: 0xCAFE + TH1CommissionerNodeId: + type: node_id + defaultValue: 112233 + TH2CommissionerNodeId: + type: node_id + defaultValue: 112233 + payload: + type: char_string + defaultValue: "MT:-24J0AFN00KA0648G00" + D_OK_EMPTY: + type: octet_string + defaultValue: "hex:1718" + D_OK_SINGLE: + type: octet_string + defaultValue: "hex:17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018" tests: - - label: "Pre-Conditions" - verification: | - 1.N1 is the node ID of TH1 - - 2.N2 is the node ID of TH2 - - 2.D_OK_EMPTY: "1718" which is an octstr of length 2 containing valid TLV: - - - top-level anonymous list (empty) - - 3.D_OK_SINGLE:"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018" which is an octstr of length 50-100 containing valid TLV: - - - top-level anonymous list, containing - one element with profile-specific tag in fully-qualified form - disabled: true - - - label: "TH1 commissions DUT using admin node ID N1" - verification: | - DUT - sudo ./chip-all-clusters-app --wifi - - TH1 - ./chip-tool pairing ble-wifi 1 zigbee-thread matter123 20202021 3841 - disabled: true + - label: "Step 1:Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - label: - "TH1 reads DUT Endpoint 0 OperationalCredentials cluster - CurrentFabricIndex attribute" - verification: | - ./chip-tool operationalcredentials read current-fabric-index 1 0 - - On TH1(Chiptool), verify CurrentFabricIndex attribute of operationalCredential cluster as 1 - - [1657186774.908634][10846:10851] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0005 DataVersion: 3161849734 - [1657186774.911149][10846:10851] CHIP:TOO: CurrentFabricIndex: 1 - disabled: true + "Step 2:TH1 reads OperationalCredentials cluster CurrentFabricIndex + attribute" + command: "readAttribute" + cluster: "Operational Credentials" + attribute: "CurrentFabricIndex" + response: + saveAs: TH1FabricIndex - label: - "TH1 puts DUT into commissioning mode, TH2 commissions DUT using admin - node ID N2" - verification: | - Open a commissioning window On TH1(Chiptool)using below command - - ./chip-tool pairing open-commissioning-window 1 1 400 2000 3841 - - [1657186324.710951][10820:10825] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 Status=0x0 - [1657186324.710980][10820:10825] CHIP:CTL: Successfully opened pairing window On TH(Chiptool)e device - [1657186324.711048][10820:10825] CHIP:CTL: Manual pairing code: [36253605617] - [1657186324.711108][10820:10825] CHIP:CTL: SetupQRCode: [MT:-24J0IRV01A7TB7E700] - - - Commission TH2(Chiptool) to DUT using manualcode generated in TH1 using open commission window - - ./chip-tool pairing code 2 36253605617 --commissioner-name beta --commissioner-nodeid 223344 - [1657186359.584672][3509:3514] CHIP:CTL: Successfully finished commissioning step "Cleanup" - [1657186359.584743][3509:3514] CHIP:TOO: Device commissioning completed with success - disabled: true + "Step 3:TH1 puts DUT into commissioning mode, TH2 commissions DUT + using admin node ID N2" + cluster: "AdministratorCommissioning" + command: "OpenBasicCommissioningWindow" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: 180 + + - label: "Step 4:TH2 starts a commissioning process with DUT" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload + + - label: "DUT is commissioned by TH2 on Fabric ID2 " + identity: "beta" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId2 - label: - "TH2 reads DUT Endpoint 0 OperationalCredentials cluster - CurrentFabricIndex attribute" - verification: | - ./chip-tool operationalcredentials read current-fabric-index 2 0 --commissioner-name beta --commissioner-nodeid 223344 - - On TH2(Chiptool), verify CurrentFabricIndex attribute of operationalCredential cluster as 2 - [1657186956.724761][3910:3915] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0005 DataVersion: 3161849734 - [1657186956.731658][3910:3915] CHIP:TOO: CurrentFabricIndex: 2 - disabled: true + "Step 5:TH2 reads OperationalCredentials cluster CurrentFabricIndex + attribute" + identity: "beta" + command: "readAttribute" + cluster: "Operational Credentials" + attribute: "CurrentFabricIndex" + response: + saveAs: TH2FabricIndex - label: - "TH1 writes DUT Endpoint 0 AccessControl cluster Extension attribute, - value is list of AccessControlExtensionStruct containing 1 element - 1.struct .Data field: D_OK_EMPTY 1718" + "Step 6:TH1 writes DUT Endpoint 0 AccessControl cluster Extension + attribute, value is list of AccessControlExtensionStruct containing 1 + element" PICS: ACL.S.A0001 - verification: | - ./chip-tool accesscontrol write extension '[{"data":"1718"}]' 1 0 - - On TH1(Chiptool),Verify Successfully to extension attribute list containg one element . - - - 657893593.975649][4116:4121] CHIP:DMG: { - [1657893593.975678][4116:4121] CHIP:DMG: AttributePathIB = - [1657893593.975718][4116:4121] CHIP:DMG: { - [1657893593.975755][4116:4121] CHIP:DMG: Endpoint = 0x0, - [1657893593.975797][4116:4121] CHIP:DMG: Cluster = 0x1f, - [1657893593.975835][4116:4121] CHIP:DMG: Attribute = 0x0000_0001, - [1657893593.975871][4116:4121] CHIP:DMG: } - [1657893593.975910][4116:4121] CHIP:DMG: - [1657893593.975944][4116:4121] CHIP:DMG: StatusIB = - [1657893593.975980][4116:4121] CHIP:DMG: { - [1657893593.976015][4116:4121] CHIP:DMG: status = 0x00 (SUCCESS), - [1657893593.976054][4116:4121] CHIP:DMG: }, - [1657893593.976088][4116:4121] CHIP:DMG: - [1657893593.976119][4116:4121] CHIP:DMG: }, - [1657893593.976161][4116:4121] CHIP:DMG: - [1657893593.976188][4116:4121] CHIP:DMG: AttributeStatusIB = - [1657893593.976220][4116:4121] CHIP:DMG: { - [1657893593.976248][4116:4121] CHIP:DMG: AttributePathIB = - [1657893593.976281][4116:4121] CHIP:DMG: { - [1657893593.976316][4116:4121] CHIP:DMG: Endpoint = 0x0, - [1657893593.976354][4116:4121] CHIP:DMG: Cluster = 0x1f, - [1657893593.976395][4116:4121] CHIP:DMG: Attribute = 0x0000_0001, - [1657893593.976434][4116:4121] CHIP:DMG: ListIndex = Null, - [1657893593.976469][4116:4121] CHIP:DMG: } - [1657893593.976507][4116:4121] CHIP:DMG: - [1657893593.976541][4116:4121] CHIP:DMG: StatusIB = - [1657893593.976574][4116:4121] CHIP:DMG: { - [1657893593.976610][4116:4121] CHIP:DMG: status = 0x00 (SUCCESS), - [1657893593.976645][4116:4121] CHIP:DMG: }, - [1657893593.976678][4116:4121] CHIP:DMG: - [1657893593.976709][4116:4121] CHIP:DMG: }, - [1657893593.976744][4116:4121] CHIP:DMG: - [1657893593.976771][4116:4121] CHIP:DMG: ], - [1657893593.976808][4116:4121] CHIP:DMG: - [1657893593.976835][4116:4121] CHIP:D - disabled: true + command: "writeAttribute" + attribute: "Extension" + arguments: + value: [{ Data: D_OK_EMPTY, FabricIndex: TH1FabricIndex }] - label: - "TH2 writes DUT Endpoint 0 AccessControl cluster Extension attribute - value is list of AccessControlExtensionStruct containing 1 element - 1.struct Data field: D_OK_SINGLE - 17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018" + "Step 7:TH2 writes DUT Endpoint 0 AccessControl cluster Extension + attribute, value is list of AccessControlExtensionStruct containing 1 + element" PICS: ACL.S.A0001 - verification: | - ./chip-tool accesscontrol write extension '[{"data":"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018"}]' 2 0 --commissioner-name beta --commissioner-nodeid 223344 + identity: "beta" + command: "writeAttribute" + attribute: "Extension" + arguments: + value: [{ Data: D_OK_SINGLE, FabricIndex: TH2FabricIndex }] - On TH2(Chiptool),Verify Successfully to extension attribute list containg one element . - 1657894672.479983][2433:2438] CHIP:DMG: WriteClient moving to [ResponseRe] - [1657894672.480057][2433:2438] CHIP:DMG: WriteResponseMessage = - [1657894672.480092][2433:2438] CHIP:DMG: { - [1657894672.480124][2433:2438] CHIP:DMG: AttributeStatusIBs = - [1657894672.480175][2433:2438] CHIP:DMG: [ - [1657894672.480211][2433:2438] CHIP:DMG: AttributeStatusIB = - [1657894672.480251][2433:2438] CHIP:DMG: { - [1657894672.480288][2433:2438] CHIP:DMG: AttributePathIB = - [1657894672.480333][2433:2438] CHIP:DMG: { - [1657894672.480379][2433:2438] CHIP:DMG: Endpoint = 0x0, - [1657894672.480427][2433:2438] CHIP:DMG: Cluster = 0x1f, - [1657894672.480476][2433:2438] CHIP:DMG: Attribute = 0x0000_0001, - [1657894672.480521][2433:2438] CHIP:DMG: } - [1657894672.480570][2433:2438] CHIP:DMG: - [1657894672.480612][2433:2438] CHIP:DMG: StatusIB = - [1657894672.480657][2433:2438] CHIP:DMG: { - [1657894672.480700][2433:2438] CHIP:DMG: status = 0x00 (SUCCESS), - [1657894672.480745][2433:2438] CHIP:DMG: }, - [1657894672.480789][2433:2438] CHIP:DMG: - [1657894672.480826][2433:2438] CHIP:DMG: }, - [1657894672.480877][2433:2438] CHIP:DMG: - [1657894672.480911][2433:2438] CHIP:DMG: AttributeStatusIB = - [1657894672.480949][2433:2438] CHIP:DMG: { - [1657894672.480986][2433:2438] CHIP:DMG: AttributePathIB = - [1657894672.481028][2433:2438] CHIP:DMG: { - [1657894672.481072][2433:2438] CHIP:DMG: Endpoint = 0x0, - [1657894672.481120][2433:2438] CHIP:DMG: Cluster = 0x1f, - [1657894672.481168][2433:2438] CHIP:DMG: Attribute = 0x0000_0001, - [1657894672.481214][2433:2438] CHIP:DMG: ListIndex = Null, - [1657894672.481258][2433:2438] CHIP:DMG: } - [1657894672.481306][2433:2438] CHIP:DMG: - [1657894672.481347][2433:2438] CHIP:DMG: StatusIB = - [1657894672.481390][2433:2438] CHIP:DMG: { - [1657894672.481433][2433:2438] CHIP:DMG: status = 0x00 (SUCCESS), - [1657894672.481482][2433:2438] CHIP:DMG: }, - [1657894672.481526][2433:2438] CHIP:DMG: - [1657894672.481562][2433:2438] CHIP:DMG: }, - [1657894672.481605][2433:2438] CHIP:DMG: - [1657894672.481639][2433:2438] CHIP:DMG: ], - [1657894672.481686][2433:2438] CHIP:DMG: - [1657894672.481720][2433:2438] CHIP:DMG: InteractionModelRevision = 1 - [1657894672.481754][2433:2438] CHIP:DMG: } - disabled: true - - - label: - "TH1 reads DUT Endpoint 0 AccessControl cluster Extension attribute" + - label: "Step 8:TH1 reads AccessControl cluster Extension attribute" PICS: ACL.S.A0001 - verification: | - ./chip-tool accesscontrol read extension 1 0 - On TH1(Chiptool) ,verify AccessControlExtensionStruct containing 1 element, and MUST NOT contain an element with FabricIndex F2 - - [1657187433.621369][10890:10895] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0001 DataVersion: 3415499944 - [1657187433.621422][10890:10895] CHIP:TOO: Extension: 1 entries - [1657187433.621470][10890:10895] CHIP:TOO: [1]: { - [1657187433.621498][10890:10895] CHIP:TOO: Data: 1718 - [1657187433.621534][10890:10895] CHIP:TOO: FabricIndex: 1 - [1657187433.621557][10890:10895] CHIP:TOO: } - disabled: true + command: "readAttribute" + attribute: "Extension" + response: + value: [{ Data: D_OK_EMPTY, FabricIndex: TH1FabricIndex }] - - label: - "TH2 reads DUT Endpoint 0 AccessControl cluster Extension attribute" + - label: "Step 9:TH2 reads AccessControl cluster Extension attribute" PICS: ACL.S.A0001 - verification: | - ./chip-tool accesscontrol read extension 2 0 --commissioner-name beta --commissioner-nodeid 223344 - - On TH2(Chiptool), Verify AccessControlExtensionStruct containing 1 element, and MUST NOT contain an element with FabricIndex F1 - [1658327214.683199][2749:2754] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0001 DataVersion: 2953114587 - [1658327214.683283][2749:2754] CHIP:TOO: Extension: 1 entries - [1658327214.683348][2749:2754] CHIP:TOO: [1]: { - [1658327214.683388][2749:2754] CHIP:TOO: Data: 17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018 - [1658327214.683423][2749:2754] CHIP:TOO: FabricIndex: 2 - [1658327214.683454][2749:2754] CHIP:TOO: } - disabled: true + identity: "beta" + command: "readAttribute" + attribute: "Extension" + response: + value: [{ Data: D_OK_SINGLE, FabricIndex: TH2FabricIndex }] - label: - "TH1 reads DUT Endpoint 0 AccessControl cluster + "Step 10:TH1 reads DUT Endpoint 0 AccessControl cluster AccessControlExtensionChanged event" PICS: ACL.S.E01 - verification: | - ./chip-tool accesscontrol read-event access-control-extension-changed 1 0 - On TH1(Chiptool) , Verify AccessControlExtensionChanged containing 1 element, and MUST NOT contain an element with FabricIndex F2 - - [1658327494.282263][2810:2815] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0001 - [1658327494.282295][2810:2815] CHIP:TOO: Event number: 5 - [1658327494.282319][2810:2815] CHIP:TOO: Priority: Info - [1658327494.282342][2810:2815] CHIP:TOO: Timestamp: 4621721 - [1658327494.282458][2810:2815] CHIP:TOO: AccessControlExtensionChanged: { - [1658327494.282497][2810:2815] CHIP:TOO: AdminNodeID: 112233 - [1658327494.282524][2810:2815] CHIP:TOO: AdminPasscodeID: null - [1658327494.282551][2810:2815] CHIP:TOO: ChangeType: 1 - [1658327494.282576][2810:2815] CHIP:TOO: LatestValue: { - [1658327494.282633][2810:2815] CHIP:TOO: Data: 1718 - [1658327494.282660][2810:2815] CHIP:TOO: FabricIndex: 1 - [1658327494.282684][2810:2815] CHIP:TOO: } - [1658327494.282709][2810:2815] CHIP:TOO: AdminFabricIndex: 1 - [1658327494.282733][2810:2815] CHIP:TOO: } - disabled: true + command: "readEvent" + event: "AccessControlExtensionChanged" + response: + value: + [ + { + AdminNodeID: TH1CommissionerNodeId, + AdminPasscodeID: null, + ChangeType: 1, + LatestValue: + { Data: D_OK_EMPTY, FabricIndex: TH1FabricIndex }, + }, + FabricIndex: TH1FabricIndex, + ] - label: - "TH2 reads DUT Endpoint 0 AccessControl cluster + "Step 11:TH2 reads DUT Endpoint 0 AccessControl cluster AccessControlExtensionChanged event" PICS: ACL.S.E01 - verification: | - ./chip-tool accesscontrol read-event access-control-extension-changed 2 0 --commissioner-name beta --commissioner-nodeid 223344 - On TH2(Chiptool) , Verify AccessControlExtensionChanged containing 1 element, and MUST NOT contain an element with FabricIndex F1 - [1663242753.957097][4264:4270] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0001 - [1663242753.957400][4264:4270] CHIP:TOO: Event number: 8 - [1663242753.957459][4264:4270] CHIP:TOO: Priority: Info - [1663242753.957507][4264:4270] CHIP:TOO: Timestamp: 20785045 - [1663242753.957708][4264:4270] CHIP:TOO: AccessControlExtensionChanged: { - [1663242753.957801][4264:4270] CHIP:TOO: AdminNodeID: 223344 - [1663242753.957867][4264:4270] CHIP:TOO: AdminPasscodeID: null - [1663242753.957931][4264:4270] CHIP:TOO: ChangeType: 1 - [1663242753.957991][4264:4270] CHIP:TOO: LatestValue: { - [1663242753.958055][4264:4270] CHIP:TOO: Data: 17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018 - [1663242753.958118][4264:4270] CHIP:TOO: FabricIndex: 2 - [1663242753.958183][4264:4270] CHIP:TOO: } - disabled: true + identity: "beta" + command: "readEvent" + event: "AccessControlExtensionChanged" + response: + value: + [ + { + AdminNodeID: TH2CommissionerNodeId, + AdminPasscodeID: null, + ChangeType: 1, + LatestValue: + { Data: D_OK_SINGLE, FabricIndex: TH2FabricIndex }, + }, + FabricIndex: TH2FabricIndex, + ] diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_9.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_9.yaml index 0b0fee2eaa325c..3a573717b5a751 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_9.yaml @@ -13,439 +13,150 @@ # limitations under the License. # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 129.2.9. [TC-ACL-2.9] Cluster access +name: 133.2.3. [TC-ACL-2.9] Extension attribute PICS: - ACL.S config: nodeId: 0x12344321 - cluster: "Basic Information" + cluster: "Access Control" endpoint: 0 + nodeId2: + type: node_id + defaultValue: 0xCAFE + CommissionerNodeId: + type: node_id + defaultValue: 112233 + payload: + type: char_string + defaultValue: "MT:-24J0AFN00KA0648G00" # This value needs to be generated automatically tests: - - label: "Pre-Conditions" - verification: | - N1 is the node ID of TH1 - disabled: true + - label: "Step 1:Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - - label: "TH1 commissions DUT using admin node ID N1" - verification: | - DUT - sudo ./chip-all-clusters-app --wifi - - TH1 - ./chip-tool pairing ble-wifi 1 zigbee-thread matter123 20202021 3841 - disabled: true + - label: + "TH1 reads OperationalCredentials cluster CurrentFabricIndex attribute" + command: "readAttribute" + cluster: "Operational Credentials" + attribute: "CurrentFabricIndex" + response: + saveAs: CurrentFabricIndex - label: - "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 1 element struct - Privilege field: Manage (4) AuthMode field: CASE (2) Subjects field: - [N1] Targets field: null" + "Step 2:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol write acl "[{ "privilege": 4, "authMode": 2, "subjects": [112233], "targets": null}]" 1 0 - On TH1(Chiptool), verify AccessControl cluster ACL attribute, value is list of AccessControlEntryStruct containing 1 element + command: "writeAttribute" + attribute: "ACL" + arguments: + value: + [ + { + Privilege: "4", + AuthMode: "2", + Subjects: [CommissionerNodeId], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + ] - [1656589077.991761][3452:3457] CHIP:DMG: WriteClient moving to [ResponseRe] - [1656589077.991838][3452:3457] CHIP:DMG: WriteResponseMessage = - [1656589077.991879][3452:3457] CHIP:DMG: { - [1656589077.991914][3452:3457] CHIP:DMG: AttributeStatusIBs = - [1656589077.991964][3452:3457] CHIP:DMG: [ - [1656589077.992003][3452:3457] CHIP:DMG: AttributeStatusIB = - [1656589077.992047][3452:3457] CHIP:DMG: { - [1656589077.992090][3452:3457] CHIP:DMG: AttributePathIB = - [1656589077.992146][3452:3457] CHIP:DMG: { - [1656589077.992198][3452:3457] CHIP:DMG: Endpoint = 0x0, - [1656589077.992253][3452:3457] CHIP:DMG: Cluster = 0x1f, - [1656589077.992307][3452:3457] CHIP:DMG: Attribute = 0x0000_0000, - [1656589077.992361][3452:3457] CHIP:DMG: } - [1656589077.992416][3452:3457] CHIP:DMG: - [1656589077.992465][3452:3457] CHIP:DMG: StatusIB = - [1656589077.992516][3452:3457] CHIP:DMG: { - [1656589077.992565][3452:3457] CHIP:DMG: status = 0x00 (SUCCESS), - [1656589077.992642][3452:3457] CHIP:DMG: }, - [1656589077.992695][3452:3457] CHIP:DMG: - [1656589077.992736][3452:3457] CHIP:DMG: }, - [1656589077.992794][3452:3457] CHIP:DMG: - [1656589077.992833][3452:3457] CHIP:DMG: AttributeStatusIB = - [1656589077.992879][3452:3457] CHIP:DMG: { - [1656589077.992920][3452:3457] CHIP:DMG: AttributePathIB = - [1656589077.992968][3452:3457] CHIP:DMG: { - [1656589077.993018][3452:3457] CHIP:DMG: Endpoint = 0x0, - [1656589077.993076][3452:3457] CHIP:DMG: Cluster = 0x1f, - [1656589077.993130][3452:3457] CHIP:DMG: Attribute = 0x0000_0000, - [1656589077.993184][3452:3457] CHIP:DMG: ListIndex = Null, - [1656589077.993234][3452:3457] CHIP:DMG: } - [1656589077.993288][3452:3457] CHIP:DMG: - [1656589077.993335][3452:3457] CHIP:DMG: StatusIB = - [1656589077.993382][3452:3457] CHIP:DMG: { - [1656589077.993431][3452:3457] CHIP:DMG: status = 0x00 (SUCCESS), - [1656589077.993480][3452:3457] CHIP:DMG: }, - [1656589077.993530][3452:3457] CHIP:DMG: - [1656589077.993571][3452:3457] CHIP:DMG: }, - [1656589077.993619][3452:3457] CHIP:DMG: - [1656589077.993657][3452:3457] CHIP:DMG: ], - [1656589077.993710][3452:3457] CHIP:DMG: - [1656589077.993749][3452:3457] CHIP:DMG: InteractionModelRevision = 1 - [1656589077.993787][3452:3457] CHIP:DMG: } - [1656589077.993938][3452:3457] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1656589077.994024][3452:3457] CHIP:EM: Sending Standalone Ack for MessageCounter:54734971 on exchange 46491i - disabled: true - - - label: "TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute" + - label: + "Step 3:TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol read acl 1 0 - - On TH1(Chiptool), verify AccessControl cluster ACL attribute Returns UNSUPPORTED_ACCESS (0x7e) - [1656589294.730359][3469:3474] CHIP:DMG: ReportDataMessage = - [1656589294.730409][3469:3474] CHIP:DMG: { - [1656589294.730449][3469:3474] CHIP:DMG: AttributeReportIBs = - [1656589294.730506][3469:3474] CHIP:DMG: [ - [1656589294.730550][3469:3474] CHIP:DMG: AttributeReportIB = - [1656589294.730616][3469:3474] CHIP:DMG: { - [1656589294.730663][3469:3474] CHIP:DMG: AttributeStatusIB = - [1656589294.730719][3469:3474] CHIP:DMG: { - [1656589294.730772][3469:3474] CHIP:DMG: AttributePathIB = - [1656589294.730834][3469:3474] CHIP:DMG: { - [1656589294.730896][3469:3474] CHIP:DMG: Endpoint = 0x0, - [1656589294.730961][3469:3474] CHIP:DMG: Cluster = 0x1f, - [1656589294.731078][3469:3474] CHIP:DMG: Attribute = 0x0000_0000, - [1656589294.731174][3469:3474] CHIP:DMG: } - [1656589294.731244][3469:3474] CHIP:DMG: - [1656589294.731303][3469:3474] CHIP:DMG: StatusIB = - [1656589294.731364][3469:3474] CHIP:DMG: { - [1656589294.731424][3469:3474] CHIP:DMG: status = 0x7e (UNSUPPORTED_ACCESS), - [1656589294.731484][3469:3474] CHIP:DMG: }, - [1656589294.731545][3469:3474] CHIP:DMG: - [1656589294.731600][3469:3474] CHIP:DMG: }, - [1656589294.731662][3469:3474] CHIP:DMG: - [1656589294.731712][3469:3474] CHIP:DMG: }, - [1656589294.731769][3469:3474] CHIP:DMG: - [1656589294.731813][3469:3474] CHIP:DMG: ], - [1656589294.731867][3469:3474] CHIP:DMG: - [1656589294.731913][3469:3474] CHIP:DMG: SuppressResponse = true, - [1656589294.731959][3469:3474] CHIP:DMG: InteractionModelRevision = 1 - [1656589294.732001][3469:3474] CHIP:DMG: } - [1656589294.732174][3469:3474] CHIP:TOO: Response Failure: IM Error 0x0000057E: General error: 0x7e (UNSUPPORTED_ACCESS) - [1656589294.732303][3469:3474] CHIP:EM: Sending Standalone Ack for MessageCounter:239082421 on exchange 10750i - [1656589294.732405][3469:3474] CHIP:IN: Prepared secure message 0xffffa9da2958 to 0x0000000000000001 (1) - disabled: true + command: "readAttribute" + attribute: "ACL" + response: + error: UNSUPPORTED_ACCESS - label: - "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 1 element 1.struct - Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null" + "Step 4:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol write acl "[{"privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}]" 1 0 - On TH1(Chiptool), verify AccessControl cluster ACL attribute, value is list of AccessControlEntryStruct containing 1 element Returns Unsupported Access - - [1656589843.696435][3518:3523] CHIP:DMG: WriteResponseMessage = - [1656589843.696471][3518:3523] CHIP:DMG: { - [1656589843.696504][3518:3523] CHIP:DMG: AttributeStatusIBs = - [1656589843.696549][3518:3523] CHIP:DMG: [ - [1656589843.696636][3518:3523] CHIP:DMG: AttributeStatusIB = - [1656589843.696685][3518:3523] CHIP:DMG: { - [1656589843.696724][3518:3523] CHIP:DMG: AttributePathIB = - [1656589843.696767][3518:3523] CHIP:DMG: { - [1656589843.696813][3518:3523] CHIP:DMG: Endpoint = 0x0, - [1656589843.696859][3518:3523] CHIP:DMG: Cluster = 0x1f, - [1656589843.696905][3518:3523] CHIP:DMG: Attribute = 0x0000_0000, - [1656589843.696951][3518:3523] CHIP:DMG: } - [1656589843.697002][3518:3523] CHIP:DMG: - [1656589843.697046][3518:3523] CHIP:DMG: StatusIB = - [1656589843.697092][3518:3523] CHIP:DMG: { - [1656589843.697137][3518:3523] CHIP:DMG: status = 0x7e (UNSUPPORTED_ACCESS), - [1656589843.697179][3518:3523] CHIP:DMG: }, - [1656589843.697225][3518:3523] CHIP:DMG: - [1656589843.697265][3518:3523] CHIP:DMG: }, - [1656589843.697316][3518:3523] CHIP:DMG: - [1656589843.697352][3518:3523] CHIP:DMG: AttributeStatusIB = - [1656589843.697393][3518:3523] CHIP:DMG: { - [1656589843.697430][3518:3523] CHIP:DMG: AttributePathIB = - [1656589843.697473][3518:3523] CHIP:DMG: { - [1656589843.697518][3518:3523] CHIP:DMG: Endpoint = 0x0, - [1656589843.697567][3518:3523] CHIP:DMG: Cluster = 0x1f, - [1656589843.697616][3518:3523] CHIP:DMG: Attribute = 0x0000_0000, - [1656589843.697662][3518:3523] CHIP:DMG: ListIndex = Null, - [1656589843.697708][3518:3523] CHIP:DMG: } - [1656589843.697758][3518:3523] CHIP:DMG: - [1656589843.697802][3518:3523] CHIP:DMG: StatusIB = - [1656589843.697846][3518:3523] CHIP:DMG: { - [1656589843.697890][3518:3523] CHIP:DMG: status = 0x7e (UNSUPPORTED_ACCESS), - [1656589843.697939][3518:3523] CHIP:DMG: }, - [1656589843.697985][3518:3523] CHIP:DMG: - [1656589843.698026][3518:3523] CHIP:DMG: }, - [1656589843.698071][3518:3523] CHIP:DMG: - [1656589843.698106][3518:3523] CHIP:DMG: ], - [1656589843.698154][3518:3523] CHIP:DMG: - [1656589843.698190][3518:3523] CHIP:DMG: InteractionModelRevision = 1 - [1656589843.698225][3518:3523] CHIP:DMG: } - [1656589843.698364][3518:3523] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1656589843.698409][3518:3523] CHIP:TOO: Response Failure: IM Error 0x0000057E: General error: 0x7e (UNSUPPORTED_ACCESS) - [1656589843.698479][3518:3523] CHIP:EM: Sending Standalone Ack for MessageCounter:108024547 on exchange 43576i - disabled: true + command: "writeAttribute" + attribute: "ACL" + arguments: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [CommissionerNodeId], + Targets: null, + FabricIndex: CurrentFabricIndex, + }, + ] + response: + error: UNSUPPORTED_ACCESS - label: - "TH1 reads DUT Endpoint 0 AccessControl cluster Extension attribute" + "Step 5:TH1 reads DUT Endpoint 0 AccessControl cluster Extension + attribute" PICS: ACL.S.A0001 - verification: | - ./chip-tool accesscontrol read extension 1 0 - On TH1(Chiptool), verify AccessControl cluster Extension attribute Returns UNSUPPORTED_ACCESS (0x7e) - [1656590048.181895][3536:3541] CHIP:DMG: ReportDataMessage = - [1656590048.181938][3536:3541] CHIP:DMG: { - [1656590048.181973][3536:3541] CHIP:DMG: AttributeReportIBs = - [1656590048.182023][3536:3541] CHIP:DMG: [ - [1656590048.182063][3536:3541] CHIP:DMG: AttributeReportIB = - [1656590048.182119][3536:3541] CHIP:DMG: { - [1656590048.182161][3536:3541] CHIP:DMG: AttributeStatusIB = - [1656590048.182210][3536:3541] CHIP:DMG: { - [1656590048.182257][3536:3541] CHIP:DMG: AttributePathIB = - [1656590048.182311][3536:3541] CHIP:DMG: { - [1656590048.182366][3536:3541] CHIP:DMG: Endpoint = 0x0, - [1656590048.182424][3536:3541] CHIP:DMG: Cluster = 0x1f, - [1656590048.182482][3536:3541] CHIP:DMG: Attribute = 0x0000_0001, - [1656590048.182540][3536:3541] CHIP:DMG: } - [1656590048.182601][3536:3541] CHIP:DMG: - [1656590048.182653][3536:3541] CHIP:DMG: StatusIB = - [1656590048.182711][3536:3541] CHIP:DMG: { - [1656590048.182766][3536:3541] CHIP:DMG: status = 0x7e (UNSUPPORTED_ACCESS), - [1656590048.182819][3536:3541] CHIP:DMG: }, - [1656590048.182873][3536:3541] CHIP:DMG: - [1656590048.182920][3536:3541] CHIP:DMG: }, - [1656590048.182973][3536:3541] CHIP:DMG: - [1656590048.183017][3536:3541] CHIP:DMG: }, - [1656590048.183066][3536:3541] CHIP:DMG: - [1656590048.183104][3536:3541] CHIP:DMG: ], - [1656590048.183152][3536:3541] CHIP:DMG: - [1656590048.183192][3536:3541] CHIP:DMG: SuppressResponse = true, - [1656590048.183233][3536:3541] CHIP:DMG: InteractionModelRevision = 1 - [1656590048.183271][3536:3541] CHIP:DMG: } - [1656590048.183424][3536:3541] CHIP:TOO: Response Failure: IM Error 0x0000057E: General error: 0x7e (UNSUPPORTED_ACCESS) - [1656590048.183539][3536:3541] CHIP:EM: Sending Standalone Ack for MessageCounter:5598495 on exchange 61834i - disabled: true + command: "readAttribute" + attribute: "Extension" + response: + error: UNSUPPORTED_ACCESS - label: - "TH1 writes DUT Endpoint 0 AccessControl cluster Extension attribute, - value is an empty list" + "Step 6:TH1 writes DUT Endpoint 0 AccessControl cluster Extension + attribute" PICS: ACL.S.A0001 - verification: | - ./chip-tool accesscontrol write extension [] 1 0 - On TH1(Chiptool) , Verify the Successfully with extension attribute value is an empty list which Returns - UNSUPPORTED_ACCESS (0x7e) - [1656592607.144276][3897:3903] CHIP:DMG: WriteClient moving to [ResponseRe] - [1656592607.144341][3897:3903] CHIP:DMG: WriteResponseMessage = - [1656592607.144378][3897:3903] CHIP:DMG: { - [1656592607.144410][3897:3903] CHIP:DMG: AttributeStatusIBs = - [1656592607.144463][3897:3903] CHIP:DMG: [ - [1656592607.144499][3897:3903] CHIP:DMG: AttributeStatusIB = - [1656592607.144539][3897:3903] CHIP:DMG: { - [1656592607.144576][3897:3903] CHIP:DMG: AttributePathIB = - [1656592607.144652][3897:3903] CHIP:DMG: { - [1656592607.144700][3897:3903] CHIP:DMG: Endpoint = 0x0, - [1656592607.144751][3897:3903] CHIP:DMG: Cluster = 0x1f, - [1656592607.144799][3897:3903] CHIP:DMG: Attribute = 0x0000_0001, - [1656592607.144846][3897:3903] CHIP:DMG: } - [1656592607.144897][3897:3903] CHIP:DMG: - [1656592607.144939][3897:3903] CHIP:DMG: StatusIB = - [1656592607.144986][3897:3903] CHIP:DMG: { - [1656592607.145030][3897:3903] CHIP:DMG: status = 0x7e (UNSUPPORTED_ACCESS), - [1656592607.145080][3897:3903] CHIP:DMG: }, - disabled: true + command: "writeAttribute" + attribute: "Extension" + arguments: + value: [] + response: + error: UNSUPPORTED_ACCESS - label: - "TH1 reads DUT Endpoint 0 AccessControl cluster + "Step 7:TH1 reads DUT Endpoint 0 AccessControl cluster SubjectsPerAccessControlEntry attribute" - PICS: ACL.S.A0002 - verification: | - ./chip-tool accesscontrol read subjects-per-access-control-entry 1 0 - On TH1(Chiptool), verify with value 4 or greater as subjects-per-access-control-entry. - - [1656592739.107798][3916:3921] CHIP:DMG: ReportDataMessage = - [1656592739.107828][3916:3921] CHIP:DMG: { - [1656592739.107850][3916:3921] CHIP:DMG: AttributeReportIBs = - [1656592739.107881][3916:3921] CHIP:DMG: [ - [1656592739.107906][3916:3921] CHIP:DMG: AttributeReportIB = - [1656592739.107938][3916:3921] CHIP:DMG: { - [1656592739.107963][3916:3921] CHIP:DMG: AttributeDataIB = - [1656592739.107998][3916:3921] CHIP:DMG: { - [1656592739.108032][3916:3921] CHIP:DMG: DataVersion = 0x182902e1, - [1656592739.108068][3916:3921] CHIP:DMG: AttributePathIB = - [1656592739.108103][3916:3921] CHIP:DMG: { - [1656592739.108137][3916:3921] CHIP:DMG: Endpoint = 0x0, - [1656592739.108177][3916:3921] CHIP:DMG: Cluster = 0x1f, - [1656592739.108216][3916:3921] CHIP:DMG: Attribute = 0x0000_0002, - [1656592739.108252][3916:3921] CHIP:DMG: } - [1656592739.108287][3916:3921] CHIP:DMG: - [1656592739.108325][3916:3921] CHIP:DMG: Data = 4, - [1656592739.108355][3916:3921] CHIP:DMG: }, - [1656592739.108388][3916:3921] CHIP:DMG: - [1656592739.108413][3916:3921] CHIP:DMG: }, - [1656592739.108443][3916:3921] CHIP:DMG: - [1656592739.108466][3916:3921] CHIP:DMG: ], - [1656592739.108496][3916:3921] CHIP:DMG: - [1656592739.108520][3916:3921] CHIP:DMG: SuppressResponse = true, - [1656592739.108545][3916:3921] CHIP:DMG: InteractionModelRevision = 1 - [1656592739.108568][3916:3921] CHIP:DMG: } - [1656592739.108729][3916:3921] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0002 DataVersion: 405340897 - [1656592739.108793][3916:3921] CHIP:TOO: SubjectsPerAccessControlEntry: 4 - [1656592739.108878][3916:3921] CHIP:EM: Sending Standalone Ack for MessageCounter:265434881 on exchange 145 - disabled: true + PICS: ACL.S.A0001 + command: "readAttribute" + attribute: "SubjectsPerAccessControlEntry" + response: + constraints: + minValue: 4 - label: - "TH1 reads DUT Endpoint 0 AccessControl cluster + "Step 8:TH1 reads DUT Endpoint 0 AccessControl cluster TargetsPerAccessControlEntry attribute" - PICS: ACL.S.A0003 - verification: | - ./chip-tool accesscontrol read targets-per-access-control-entry 1 0 - On TH1(Chiptool), verify with value 3 or greater as TargetsPerAccessControlEntry - [1656593266.074720][3943:3948] CHIP:DMG: ReportDataMessage = - [1656593266.074748][3943:3948] CHIP:DMG: { - [1656593266.074769][3943:3948] CHIP:DMG: AttributeReportIBs = - [1656593266.074800][3943:3948] CHIP:DMG: [ - [1656593266.074824][3943:3948] CHIP:DMG: AttributeReportIB = - [1656593266.074863][3943:3948] CHIP:DMG: { - [1656593266.074889][3943:3948] CHIP:DMG: AttributeDataIB = - [1656593266.074919][3943:3948] CHIP:DMG: { - [1656593266.074950][3943:3948] CHIP:DMG: DataVersion = 0x182902e1, - [1656593266.074998][3943:3948] CHIP:DMG: AttributePathIB = - [1656593266.075037][3943:3948] CHIP:DMG: { - [1656593266.075074][3943:3948] CHIP:DMG: Endpoint = 0x0, - [1656593266.075112][3943:3948] CHIP:DMG: Cluster = 0x1f, - [1656593266.075145][3943:3948] CHIP:DMG: Attribute = 0x0000_0003, - [1656593266.075178][3943:3948] CHIP:DMG: } - [1656593266.075214][3943:3948] CHIP:DMG: - [1656593266.075246][3943:3948] CHIP:DMG: Data = 3, - [1656593266.075276][3943:3948] CHIP:DMG: }, - [1656593266.075309][3943:3948] CHIP:DMG: - [1656593266.075335][3943:3948] CHIP:DMG: }, - [1656593266.075365][3943:3948] CHIP:DMG: - [1656593266.075388][3943:3948] CHIP:DMG: ], - [1656593266.075418][3943:3948] CHIP:DMG: - [1656593266.075442][3943:3948] CHIP:DMG: SuppressResponse = true, - [1656593266.075467][3943:3948] CHIP:DMG: InteractionModelRevision = 1 - [1656593266.075491][3943:3948] CHIP:DMG: } - [1656593266.075626][3943:3948] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0003 DataVersion: 405340897 - [1656593266.075684][3943:3948] CHIP:TOO: TargetsPerAccessControlEntry: 3 - [1656593266.075758][3943:3948] CHIP:EM: Sending Standalone Ack for MessageCounter:42625412 on exchange 36195i - disabled: true + PICS: ACL.S.A0001 + command: "readAttribute" + attribute: "TargetsPerAccessControlEntry" + response: + constraints: + minValue: 3 - label: - "TH1 reads DUT Endpoint 0 AccessControl cluster + "Step 9:TH1 reads DUT Endpoint 0 AccessControl cluster AccessControlEntriesPerFabric attribute" - PICS: ACL.S.A0004 - verification: | - ./chip-tool accesscontrol read access-control-entries-per-fabric 1 0 - - On TH1(Chiptool), verify with value 3 or greater as AccessControlEntriesPerFabric. - [1656593406.902865][3956:3961] CHIP:DMG: ReportDataMessage = - [1656593406.902902][3956:3961] CHIP:DMG: { - [1656593406.902931][3956:3961] CHIP:DMG: AttributeReportIBs = - [1656593406.902971][3956:3961] CHIP:DMG: [ - [1656593406.903004][3956:3961] CHIP:DMG: AttributeReportIB = - [1656593406.903049][3956:3961] CHIP:DMG: { - [1656593406.903087][3956:3961] CHIP:DMG: AttributeDataIB = - [1656593406.903128][3956:3961] CHIP:DMG: { - [1656593406.903173][3956:3961] CHIP:DMG: DataVersion = 0x182902e1, - [1656593406.903216][3956:3961] CHIP:DMG: AttributePathIB = - [1656593406.903259][3956:3961] CHIP:DMG: { - [1656593406.903304][3956:3961] CHIP:DMG: Endpoint = 0x0, - [1656593406.903354][3956:3961] CHIP:DMG: Cluster = 0x1f, - [1656593406.903400][3956:3961] CHIP:DMG: Attribute = 0x0000_0004, - [1656593406.903447][3956:3961] CHIP:DMG: } - [1656593406.903493][3956:3961] CHIP:DMG: - [1656593406.903539][3956:3961] CHIP:DMG: Data = 3, - [1656593406.903580][3956:3961] CHIP:DMG: }, - [1656593406.903624][3956:3961] CHIP:DMG: - [1656593406.903661][3956:3961] CHIP:DMG: }, - [1656593406.903700][3956:3961] CHIP:DMG: - [1656593406.903732][3956:3961] CHIP:DMG: ], - [1656593406.903771][3956:3961] CHIP:DMG: - [1656593406.903804][3956:3961] CHIP:DMG: SuppressResponse = true, - [1656593406.903837][3956:3961] CHIP:DMG: InteractionModelRevision = 1 - [1656593406.903868][3956:3961] CHIP:DMG: } - [1656593406.904032][3956:3961] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0004 DataVersion: 405340897 - [1656593406.904102][3956:3961] CHIP:TOO: AccessControlEntriesPerFabric: 3 - [1656593406.904200][3956:3961] CHIP:EM: Sending Standalone Ack for MessageCounter:135320969 on exchange 30343i - [1656593406.904273][3956:3961] CHIP:IN: Prepared secure message 0xffff977ed958 to 0x0000000000000001 (1) of type 0x10 and protocolId (0, 0) on exchange 30343i with MessageCounter:267106256. - disabled: true + PICS: ACL.S.A0001 + command: "readAttribute" + attribute: "AccessControlEntriesPerFabric" + response: + constraints: + minValue: 3 - label: "TH1 reads DUT Endpoint 0 AccessControl cluster AccessControlEntryChanged event" PICS: ACL.S.E00 - verification: | - ./chip-tool accesscontrol read-event access-control-entry-changed 1 - On TH1(Chiptool), Verify AccessControl cluster AccessControlEntryChanged event Returns UNSUPPORTED_ACCESS (0x7e) - [1656593588.305232][3979:3984] CHIP:DMG: }, - [1656593588.305269][3979:3984] CHIP:DMG: - [1656593588.305299][3979:3984] CHIP:DMG: StatusIB = - [1656593588.305333][3979:3984] CHIP:DMG: { - [1656593588.305371][3979:3984] CHIP:DMG: status = 0x7e (UNSUPPORTED_ACCESS), - [1656593588.305408][3979:3984] CHIP:DMG: }, - [1656593588.305445][3979:3984] CHIP:DMG: - [1656593588.305475][3979:3984] CHIP:DMG: }, - [1656593588.305512][3979:3984] CHIP:DMG: - [1656593588.305542][3979:3984] CHIP:DMG: }, - [1656593588.305575][3979:3984] CHIP:DMG: - [1656593588.305602][3979:3984] CHIP:DMG: ], - [1656593588.305641][3979:3984] CHIP:DMG: - [1656593588.305668][3979:3984] CHIP:DMG: SuppressResponse = true, - [1656593588.305696][3979:3984] CHIP:DMG: InteractionModelRevision = 1 - [1656593588.305721][3979:3984] CHIP:DMG: } - [1656593588.305841][3979:3984] CHIP:TOO: Response Failure: IM Error 0x0000057E: General error: 0x7e (UNSUPPORTED_ACCESS) - [1656593588.305905][3979:3984] CHIP:TOO: Response Failure: IM Error 0x0000057E: General error: 0x7e (UNSUPPORTED_ACCESS) - [1656593588.305969][3979:3984] CHIP:TOO: Response Failure: IM Error 0x0000057E: General error: 0x7e (UNSUPPORTED_ACCESS) - [1656593588.306132][3979:3984] CHIP:EM: Sending Standalone Ack for MessageCounter:82107286 - disabled: true + command: "readEvent" + event: "AccessControlEntryChanged" + response: + error: UNSUPPORTED_ACCESS - label: "TH1 reads DUT Endpoint 0 AccessControl cluster AccessControlExtensionChanged event" PICS: ACL.S.E01 - verification: | - ./chip-tool accesscontrol read-event access-control-extension-changed 1 0 - On TH1(Chiptool), verify AccessControl cluster AccessControlExtensionChanged event Returns UNSUPPORTED_ACCESS (0x7e) - [1656593726.387025][3990:3995] CHIP:DMG: - [1656593726.387048][3990:3995] CHIP:DMG: EventReportIB = - [1656593726.387078][3990:3995] CHIP:DMG: { - [1656593726.387103][3990:3995] CHIP:DMG: EventStatusIB = - [1656593726.387133][3990:3995] CHIP:DMG: { - [1656593726.387161][3990:3995] CHIP:DMG: EventPath = - [1656593726.387193][3990:3995] CHIP:DMG: { - [1656593726.387226][3990:3995] CHIP:DMG: Endpoint = 0x0, - [1656593726.387260][3990:3995] CHIP:DMG: Cluster = 0x1f, - [1656593726.387293][3990:3995] CHIP:DMG: Event = 0x1, - [1656593726.387324][3990:3995] CHIP:DMG: }, - [1656593726.387359][3990:3995] CHIP:DMG: - [1656593726.387388][3990:3995] CHIP:DMG: StatusIB = - [1656593726.387419][3990:3995] CHIP:DMG: { - [1656593726.387452][3990:3995] CHIP:DMG: status = 0x7e (UNSUPPORTED_ACCESS), - [1656593726.387484][3990:3995] CHIP:DMG: }, - [1656593726.387516][3990:3995] CHIP:DMG: - [1656593726.387544][3990:3995] CHIP:DMG: }, - [1656593726.387577][3990:3995] CHIP:DMG: - [1656593726.387602][3990:3995] CHIP:DMG: }, - [1656593726.387635][3990:3995] CHIP:DMG: - [1656593726.387659][3990:3995] CHIP:DMG: EventReportIB = - [1656593726.387689][3990:3995] CHIP:DMG: { - [1656593726.387714][3990:3995] CHIP:DMG: EventStatusIB = - [1656593726.387743][3990:3995] CHIP:DMG: { - [1656593726.387772][3990:3995] CHIP:DMG: EventPath = - [1656593726.387804][3990:3995] CHIP:DMG: { - [1656593726.387837][3990:3995] CHIP:DMG: Endpoint = 0x0, - [1656593726.387870][3990:3995] CHIP:DMG: Cluster = 0x1f, - [1656593726.387904][3990:3995] CHIP:DMG: Event = 0x1, - [1656593726.387935][3990:3995] CHIP:DMG: }, - [1656593726.387969][3990:3995] CHIP:DMG: - [1656593726.387998][3990:3995] CHIP:DMG: StatusIB = - [1656593726.388030][3990:3995] CHIP:DMG: { - [1656593726.388063][3990:3995] CHIP:DMG: status = 0x7e (UNSUPPORTED_ACCESS), - [1656593726.388094][3990:3995] CHIP:DMG: }, - [1656593726.388126][3990:3995] CHIP:DMG: - [1656593726.388154][3990:3995] CHIP:DMG: }, - disabled: true + command: "readEvent" + event: "AccessControlExtensionChanged" + response: + error: UNSUPPORTED_ACCESS diff --git a/src/app/tests/suites/certification/Test_TC_LCFG_3_1.yaml b/src/app/tests/suites/certification/Test_TC_LCFG_3_1.yaml deleted file mode 100644 index f7b73b3d0e38de..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_LCFG_3_1.yaml +++ /dev/null @@ -1,86 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: - 102.3.1. [TC-LCFG-3.1] Localization Configuration Cluster - Attributes[DUT-Client] - -PICS: - - LCFG.C - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Note" - verification: | - Chip-tool command used below are an example to verify the DUT as client test cases. For certification test, we expect DUT should have a capability or way to run the equivalent command. - disabled: true - - - label: "DUT reads SupportedLocales attribute from TH" - PICS: LCFG.C.A0001 - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - ./chip-tool localizationconfiguration read supported-locales 1 0 - Verify DUT receives supported-locales attribute response on the TH(all-clusters-app) Log: - 659616748.134098][11438:11438] CHIP:IM: Received Read request - [1659616748.134248][11438:11438] CHIP:DMG: ReadRequestMessage = - [1659616748.134307][11438:11438] CHIP:DMG: { - [1659616748.134355][11438:11438] CHIP:DMG: AttributePathIBs = - [1659616748.134410][11438:11438] CHIP:DMG: [ - [1659616748.134463][11438:11438] CHIP:DMG: AttributePathIB = - [1659616748.134536][11438:11438] CHIP:DMG: { - [1659616748.134599][11438:11438] CHIP:DMG: Endpoint = 0x0, - [1659616748.134673][11438:11438] CHIP:DMG: Cluster = 0x2b, - [1659616748.134743][11438:11438] CHIP:DMG: Attribute = 0x0000_0001, - [1659616748.134808][11438:11438] CHIP:DMG: } - [1659616748.134875][11438:11438] CHIP:DMG: - [1659616748.134936][11438:11438] CHIP:DMG: ], - [1659616748.134996][11438:11438] CHIP:DMG: - [1659616748.135053][11438:11438] CHIP:DMG: isFabricFiltered = true, - [1659616748.135109][11438:11438] CHIP:DMG: InteractionModelRevision = 1 - [1659616748.135160][11438:11438] CHIP:DMG: }, - [1659616748.135322][11438:11438] CHIP:DMG: IM RH moving to [GeneratingReports] - disabled: true - - - label: "DUT reads ActiveLocale attribute from the TH" - PICS: LCFG.C.A0000 - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - ./chip-tool localizationconfiguration read active-locale 1 0 - Verify DUT receives active-locale attribute response on the TH(all-clusters-app) Log: - - [1659616904.401632][11438:11438] CHIP:DMG: ReadRequestMessage = - [1659616904.401657][11438:11438] CHIP:DMG: { - [1659616904.401676][11438:11438] CHIP:DMG: AttributePathIBs = - [1659616904.401699][11438:11438] CHIP:DMG: [ - [1659616904.401720][11438:11438] CHIP:DMG: AttributePathIB = - [1659616904.401754][11438:11438] CHIP:DMG: { - [1659616904.401786][11438:11438] CHIP:DMG: Endpoint = 0x0, - [1659616904.401819][11438:11438] CHIP:DMG: Cluster = 0x2b, - [1659616904.401851][11438:11438] CHIP:DMG: Attribute = 0x0000_0000, - [1659616904.401880][11438:11438] CHIP:DMG: } - [1659616904.401906][11438:11438] CHIP:DMG: - [1659616904.401930][11438:11438] CHIP:DMG: ], - [1659616904.401955][11438:11438] CHIP:DMG: - [1659616904.401978][11438:11438] CHIP:DMG: isFabricFiltered = true, - [1659616904.402000][11438:11438] CHIP:DMG: InteractionModelRevision = 1 - [1659616904.402020][11438:11438] CHIP:DMG: }, - [1659616904.402087][11438:11438] CHIP:DMG: IM RH moving to [GeneratingReports] - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_LCFG_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_LCFG_3_1_Simulated.yaml new file mode 100644 index 00000000000000..22b8f3b528317d --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_LCFG_3_1_Simulated.yaml @@ -0,0 +1,40 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: + 101.3.1. [TC-LCFG-3.1] Localization Configuration Cluster + Attributes[DUT-Client] + +PICS: + - LCFG.C + +config: + nodeId: 0x12344321 + cluster: "Localization Configuration" + endpoint: 1 + +tests: + - label: "Wait for the device to be commissioned" + cluster: "DelayCommands" + command: "WaitForCommissioning" + + - label: "DUT reads SupportedLocales attribute from TH" + PICS: LCFG.C.A0001 + wait: "readAttribute" + attribute: "SupportedLocales" + + - label: "DUT reads ActiveLocale attribute from TH" + PICS: LCFG.C.A0000 + wait: "readAttribute" + attribute: "ActiveLocale" diff --git a/src/app/tests/suites/certification/Test_TC_LUNIT_1_1.yaml b/src/app/tests/suites/certification/Test_TC_LUNIT_1_1.yaml deleted file mode 100644 index 31cac947bd5dd9..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_LUNIT_1_1.yaml +++ /dev/null @@ -1,194 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 105.1.1. [TC-LUNIT-1.1] Global Attributes [DUT as Client] - -PICS: - - LUNIT.C - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Note" - verification: | - Chip-tool command used below are an example to verify the DUT as client test cases. For certification test, we expect DUT should have a capability or way to run the equivalent command. - disabled: true - - - label: "Commission DUT to TH" - verification: | - - disabled: true - - - label: "{DUTread} (0xFFFD) ClusterRevision attribute" - PICS: LUNIT.C.Afffd - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - ./chip-tool unitlocalization read cluster-revision 1 0 - Verify DUT receives cluster-revision attribute response on the TH(all-clusters-app) Log: - [1659785279.519464][4122:4122] CHIP:EM: Received message of type 0x2 with protocolId (0, 1) and MessageCounter:239393541 on exchange 51048r - [1659785279.519511][4122:4122] CHIP:EM: Handling via exchange: 51048r, Delegate: 0xaaaaeaa68fa0 - [1659785279.519548][4122:4122] CHIP:IM: Received Read request - [1659785279.519625][4122:4122] CHIP:DMG: ReadRequestMessage = - [1659785279.519652][4122:4122] CHIP:DMG: { - [1659785279.519679][4122:4122] CHIP:DMG: AttributePathIBs = - [1659785279.519705][4122:4122] CHIP:DMG: [ - [1659785279.519729][4122:4122] CHIP:DMG: AttributePathIB = - [1659785279.519759][4122:4122] CHIP:DMG: { - [1659785279.519790][4122:4122] CHIP:DMG: Endpoint = 0x0, - [1659785279.519822][4122:4122] CHIP:DMG: Cluster = 0x2d, - [1659785279.519853][4122:4122] CHIP:DMG: Attribute = 0x0000_FFFD, - [1659785279.519877][4122:4122] CHIP:DMG: } - [1659785279.519904][4122:4122] CHIP:DMG: - [1659785279.519932][4122:4122] CHIP:DMG: ], - [1659785279.519960][4122:4122] CHIP:DMG: - [1659785279.519986][4122:4122] CHIP:DMG: isFabricFiltered = true, - [1659785279.520011][4122:4122] CHIP:DMG: InteractionModelRevision = 1 - [1659785279.520034][4122:4122] CHIP:DMG: }, - [1659785279.520108][4122:4122] CHIP:DMG: IM RH moving to [GeneratingReports] - [1659785279.520189][4122:4122] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - disabled: true - - - label: "{DUTread} (0xFFFC) FeatureMap attribute" - PICS: LUNIT.C.Afffc - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - ./chip-tool unitlocalization read feature-map 1 0 - Verify DUT receives feature-map attribute response on the TH(all-clusters-app) Log: - - [1659785328.533426][4122:4122] CHIP:IM: Received Read request - [1659785328.533548][4122:4122] CHIP:DMG: ReadRequestMessage = - [1659785328.533596][4122:4122] CHIP:DMG: { - [1659785328.533637][4122:4122] CHIP:DMG: AttributePathIBs = - [1659785328.533685][4122:4122] CHIP:DMG: [ - [1659785328.533730][4122:4122] CHIP:DMG: AttributePathIB = - [1659785328.533785][4122:4122] CHIP:DMG: { - [1659785328.533837][4122:4122] CHIP:DMG: Endpoint = 0x0, - [1659785328.533894][4122:4122] CHIP:DMG: Cluster = 0x2d, - [1659785328.533958][4122:4122] CHIP:DMG: Attribute = 0x0000_FFFC, - [1659785328.534017][4122:4122] CHIP:DMG: } - [1659785328.534072][4122:4122] CHIP:DMG: - [1659785328.534124][4122:4122] CHIP:DMG: ], - [1659785328.534176][4122:4122] CHIP:DMG: - [1659785328.534224][4122:4122] CHIP:DMG: isFabricFiltered = true, - [1659785328.534275][4122:4122] CHIP:DMG: InteractionModelRevision = 1 - [1659785328.534319][4122:4122] CHIP:DMG: }, - [1659785328.534443][4122:4122] CHIP:DMG: IM RH moving to [GeneratingReports] - [1659785328.534578][4122:4122] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1659785328.534629][4122:4122] CHIP:DMG: Cluster 2d, Attribute fffc is dirty - disabled: true - - - label: "{DUTread} (0xFFFB) AttributeList attribute" - PICS: LUNIT.C.Afffb - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - ./chip-tool unitlocalization read attribute-list 1 0 - - Verify DUT receives attribute-list attribute response on the TH(all-clusters-app) Log: - [1661843250.245339][2719:2719] CHIP:IM: Received Read request - [1661843176.295960][2719:2719] CHIP:DMG: ReadRequestMessage = - [1661843176.295989][2719:2719] CHIP:DMG: { - [1661843176.296011][2719:2719] CHIP:DMG: AttributePathIBs = - [1661843176.296036][2719:2719] CHIP:DMG: [ - [1661843176.296059][2719:2719] CHIP:DMG: AttributePathIB = - [1661843176.296089][2719:2719] CHIP:DMG: { - [1661843176.296118][2719:2719] CHIP:DMG: Endpoint = 0x0, - [1661843176.296153][2719:2719] CHIP:DMG: Cluster = 0x2d, - [1661843176.296186][2719:2719] CHIP:DMG: Attribute = 0x0000_FFFB, - [1661843176.296218][2719:2719] CHIP:DMG: } - [1661843176.296247][2719:2719] CHIP:DMG: - [1661843176.296273][2719:2719] CHIP:DMG: ], - [1661843176.296300][2719:2719] CHIP:DMG: - [1661843176.296325][2719:2719] CHIP:DMG: isFabricFiltered = true, - [1661843176.296349][2719:2719] CHIP:DMG: InteractionModelRevision = 1 - [1661843176.296371][2719:2719] CHIP:DMG: }, - [1661843176.296442][2719:2719] CHIP:DMG: IM RH moving to [GeneratingReports] - [1661843176.296539][2719:2719] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1661843176.296567][2719:2719] CHIP:DMG: Cluster 2d, Attribute fffb is dirty - [1661843176.296588][2719:2719] CHIP:DMG: Reading attribute: Cluster=0x0000_002D Endpoint=0 AttributeId=0x0000_FFFB (expanded=0) - [1661843176.296613][2719:2719] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_002D e=0 p=v - [1661843176.296646][2719:2719] CHIP:DMG: AccessControl: allowed - disabled: true - - - label: "{DUTread} (0xFFFA) EventList attribute" - PICS: LUNIT.C.Afffa - verification: | - out of scope for V1.0 - disabled: true - - - label: "{DUTread} (0xFFF9) AcceptedCommandList attribute" - PICS: LUNIT.C.Afff9 - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - ./chip-tool unitlocalization read accepted-command-list 1 0 - Verify DUT receives AcceptedCommandList attribute response on the TH(all-clusters-app) Log: - [1659785385.381041][4122:4122] CHIP:EM: Handling via exchange: 60781r, Delegate: 0xaaaaeaa68fa0 - [1661843250.245339][2719:2719] CHIP:IM: Received Read request - [1661843250.245414][2719:2719] CHIP:DMG: ReadRequestMessage = - [1661843250.245438][2719:2719] CHIP:DMG: { - [1661843250.245455][2719:2719] CHIP:DMG: AttributePathIBs = - [1661843250.245478][2719:2719] CHIP:DMG: [ - [1661843250.245499][2719:2719] CHIP:DMG: AttributePathIB = - [1661843250.245531][2719:2719] CHIP:DMG: { - [1661843250.245557][2719:2719] CHIP:DMG: Endpoint = 0x0, - [1661843250.245585][2719:2719] CHIP:DMG: Cluster = 0x2d, - [1661843250.245611][2719:2719] CHIP:DMG: Attribute = 0x0000_FFF9, - [1661843250.245669][2719:2719] CHIP:DMG: } - [1661843250.245696][2719:2719] CHIP:DMG: - [1661843250.245718][2719:2719] CHIP:DMG: ], - [1661843250.245741][2719:2719] CHIP:DMG: - [1661843250.245763][2719:2719] CHIP:DMG: isFabricFiltered = true, - [1661843250.245784][2719:2719] CHIP:DMG: InteractionModelRevision = 1 - [1661843250.245802][2719:2719] CHIP:DMG: }, - [1661843250.245867][2719:2719] CHIP:DMG: IM RH moving to [GeneratingReports] - [1661843250.245953][2719:2719] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1661843250.245979][2719:2719] CHIP:DMG: Cluster 2d, Attribute fff9 is dirty - [1661843250.245997][2719:2719] CHIP:DMG: Reading attribute: Cluster=0x0000_002D Endpoint=0 AttributeId=0x0000_FFF9 (expanded=0) - [1661843250.246019][2719:2719] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_002D e=0 p=v - [1661843250.246050][2719:2719] CHIP:DMG: AccessControl: allowed - disabled: true - - - label: "{DUTread} (0xFFF8) GeneratedCommandList attribute" - PICS: LUNIT.C.Afff8 - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - ./chip-tool unitlocalization read generated-command-list 1 0 - Verify DUT receives GeneratedCommandList attribute response on the TH(all-clusters-app) Log: - [1659785447.481659][4122:4122] CHIP:IM: Received Read request - [1659785447.481736][4122:4122] CHIP:DMG: ReadRequestMessage = - [1659785447.481763][4122:4122] CHIP:DMG: { - [1659785447.481785][4122:4122] CHIP:DMG: AttributePathIBs = - [1659785447.481813][4122:4122] CHIP:DMG: [ - [1659785447.481837][4122:4122] CHIP:DMG: AttributePathIB = - [1659785447.481864][4122:4122] CHIP:DMG: { - [1659785447.481892][4122:4122] CHIP:DMG: Endpoint = 0x0, - [1659785447.481923][4122:4122] CHIP:DMG: Cluster = 0x2d, - [1659785447.481958][4122:4122] CHIP:DMG: Attribute = 0x0000_FFF8, - [1659785447.481985][4122:4122] CHIP:DMG: } - [1659785447.482014][4122:4122] CHIP:DMG: - [1659785447.482039][4122:4122] CHIP:DMG: ], - [1659785447.482067][4122:4122] CHIP:DMG: - [1659785447.482093][4122:4122] CHIP:DMG: isFabricFiltered = true, - [1659785447.482118][4122:4122] CHIP:DMG: InteractionModelRevision = 1 - [1659785447.482142][4122:4122] CHIP:DMG: }, - [1659785447.482215][4122:4122] CHIP:DMG: IM RH moving to [GeneratingReports] - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_LUNIT_1_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_LUNIT_1_1_Simulated.yaml new file mode 100644 index 00000000000000..643d764df507d5 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_LUNIT_1_1_Simulated.yaml @@ -0,0 +1,54 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default + +name: 104.1.1. [TC-LUNIT-1.1] Global Attributes [DUT as Client] + +PICS: + - LUNIT.C + +config: + nodeId: 0x12344321 + cluster: "Unit Localization" + endpoint: 1 + +tests: + - label: "Wait for the device to be commissioned" + cluster: "DelayCommands" + command: "WaitForCommissioning" + + - label: "DUT read (0xFFFD) ClusterRevision attribute" + PICS: LUNIT.C.Afffd + wait: "readAttribute" + attribute: "ClusterRevision" + + - label: "DUT read (0xFFFC) FeatureMap attribute" + PICS: LUNIT.C.Afffc + wait: "readAttribute" + attribute: "FeatureMap" + + - label: "DUT read (0xFFFB) AttributeList attribute" + PICS: LUNIT.C.Afffb + wait: "readAttribute" + attribute: "AttributeList" + + - label: "DUT read (0xFFF9) AcceptedCommandList attribute" + PICS: LUNIT.C.Afff9 + wait: "readAttribute" + attribute: "AcceptedCommandList" + + - label: "DUT read (0xFFF8) GeneratedCommandList attribute" + PICS: LUNIT.C.Afff8 + wait: "readAttribute" + attribute: "GeneratedCommandList" diff --git a/src/app/tests/suites/certification/Test_TC_LUNIT_2_1.yaml b/src/app/tests/suites/certification/Test_TC_LUNIT_2_1.yaml deleted file mode 100644 index 9c37cc32c6e84d..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_LUNIT_2_1.yaml +++ /dev/null @@ -1,124 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: - 106.2.1. [TC-LUNIT-2.1] Read and Write Unit Localization Cluster Attributes - [DUT as Client] - -PICS: - - LUNIT.C - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Note" - verification: | - Chip-tool command used below are an example to verify the DUT as client test cases. For certification test, we expect DUT should have a capability or way to run the equivalent command. - disabled: true - - - label: "DUT reads TemperatureUnit attribute from TH" - PICS: LUNIT.C.A0000 - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - ./chip-tool unitlocalization read temperature-unit 1 0 - Verify DUT receives TemperatureUnit attribute response on the TH(all-clusters-app) Log: - [1659785506.642187][4122:4122] CHIP:EM: Handling via exchange: 35080r, Delegate: 0xaaaaeaa68fa0 - [1659785506.642224][4122:4122] CHIP:IM: Received Read request - [1659785506.642300][4122:4122] CHIP:DMG: ReadRequestMessage = - [1659785506.642327][4122:4122] CHIP:DMG: { - [1659785506.642349][4122:4122] CHIP:DMG: AttributePathIBs = - [1659785506.642375][4122:4122] CHIP:DMG: [ - [1659785506.642399][4122:4122] CHIP:DMG: AttributePathIB = - [1659785506.642428][4122:4122] CHIP:DMG: { - [1659785506.642456][4122:4122] CHIP:DMG: Endpoint = 0x0, - [1659785506.642484][4122:4122] CHIP:DMG: Cluster = 0x2d, - [1659785506.642512][4122:4122] CHIP:DMG: Attribute = 0x0000_0000, - [1659785506.642535][4122:4122] CHIP:DMG: } - [1659785506.642565][4122:4122] CHIP:DMG: - [1659785506.642590][4122:4122] CHIP:DMG: ], - [1659785506.642618][4122:4122] CHIP:DMG: - [1659785506.642645][4122:4122] CHIP:DMG: isFabricFiltered = true, - [1659785506.642670][4122:4122] CHIP:DMG: InteractionModelRevision = 1 - [1659785506.642693][4122:4122] CHIP:DMG: }, - [1659785506.642766][4122:4122] CHIP:DMG: IM RH moving to [GeneratingReports] - disabled: true - - - label: "DUT writes 3 to TemperatureUnit attribute on TH" - PICS: LUNIT.C.A0000 - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - ./chip-tool unitlocalization write temperature-unit 3 1 0 - Verify DUT receives TemperatureUnit attribute write response on the TH(all-clusters-app) Log: - - [1659785555.542655][4122:4122] CHIP:DMG: WriteRequestMessage = - [1659785555.542689][4122:4122] CHIP:DMG: { - [1659785555.542719][4122:4122] CHIP:DMG: suppressResponse = false, - [1659785555.542754][4122:4122] CHIP:DMG: timedRequest = false, - [1659785555.542787][4122:4122] CHIP:DMG: AttributeDataIBs = - [1659785555.542827][4122:4122] CHIP:DMG: [ - [1659785555.542859][4122:4122] CHIP:DMG: AttributeDataIB = - [1659785555.542895][4122:4122] CHIP:DMG: { - [1659785555.542934][4122:4122] CHIP:DMG: AttributePathIB = - [1659785555.542975][4122:4122] CHIP:DMG: { - [1659785555.543017][4122:4122] CHIP:DMG: Endpoint = 0x0, - [1659785555.543062][4122:4122] CHIP:DMG: Cluster = 0x2d, - [1659785555.543107][4122:4122] CHIP:DMG: Attribute = 0x0000_0000, - [1659785555.543172][4122:4122] CHIP:DMG: } - [1659785555.543218][4122:4122] CHIP:DMG: - [1659785555.543260][4122:4122] CHIP:DMG: Data = 3, - [1659785555.543321][4122:4122] CHIP:DMG: }, - [1659785555.543362][4122:4122] CHIP:DMG: - [1659785555.543395][4122:4122] CHIP:DMG: ], - [1659785555.543434][4122:4122] CHIP:DMG: - [1659785555.543468][4122:4122] CHIP:DMG: moreChunkedMessages = false, - [1659785555.543502][4122:4122] CHIP:DMG: InteractionModelRevision = 1 - [1659785555.543534][4122:4122] CHIP:DMG: }, - [1659785555.543637][4122:4122] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= - disabled: true - - - label: "DUT reads TemperatureUnit attribute from TH" - PICS: LUNIT.C.A0000 - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - ./chip-tool unitlocalization read temperature-unit 1 0 - Verify DUT receives TemperatureUnit attribute response on the TH(all-clusters-app) Log: - - [1659785612.134440][4122:4122] CHIP:IM: Received Read request - [1659785612.134567][4122:4122] CHIP:DMG: ReadRequestMessage = - [1659785612.134616][4122:4122] CHIP:DMG: { - [1659785612.134656][4122:4122] CHIP:DMG: AttributePathIBs = - [1659785612.134703][4122:4122] CHIP:DMG: [ - [1659785612.134746][4122:4122] CHIP:DMG: AttributePathIB = - [1659785612.134808][4122:4122] CHIP:DMG: { - [1659785612.134860][4122:4122] CHIP:DMG: Endpoint = 0x0, - [1659785612.134917][4122:4122] CHIP:DMG: Cluster = 0x2d, - [1659785612.134983][4122:4122] CHIP:DMG: Attribute = 0x0000_0000, - [1659785612.135041][4122:4122] CHIP:DMG: } - [1659785612.135093][4122:4122] CHIP:DMG: - [1659785612.135167][4122:4122] CHIP:DMG: ], - [1659785612.135223][4122:4122] CHIP:DMG: - [1659785612.135272][4122:4122] CHIP:DMG: isFabricFiltered = true, - [1659785612.135320][4122:4122] CHIP:DMG: InteractionModelRevision = 1 - [1659785612.135364][4122:4122] CHIP:DMG: }, - [1659785612.135489][4122:4122] CHIP:DMG: IM RH moving to [GeneratingReports] - [1659785612.135628][4122:4122] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1659785612.135679][4122:4122] CHIP:DMG: Cluster 2d, Attribute 0 is dirty - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_LUNIT_2_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_LUNIT_2_1_Simulated.yaml new file mode 100644 index 00000000000000..153fddbf017eaf --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_LUNIT_2_1_Simulated.yaml @@ -0,0 +1,48 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default + +name: + 104.2.1. [TC-LUNIT-2.1] Read and Write Unit Localization Cluster Attributes + [DUT as Client] + +PICS: + - LUNIT.C + +config: + nodeId: 0x12344321 + cluster: "Unit Localization" + endpoint: 1 + +tests: + - label: "Wait for the device to be commissioned" + cluster: "DelayCommands" + command: "WaitForCommissioning" + + - label: "DUT reads TemperatureUnit attribute from TH" + PICS: LUNIT.C.A0000 + wait: "readAttribute" + attribute: "TemperatureUnit" + + - label: "DUT writes 3 to TemperatureUnit attribute on TH" + PICS: LUNIT.C.A0000 + wait: "writeAttribute" + attribute: "TemperatureUnit" + arguments: + value: + + - label: "DUT reads TemperatureUnit attribute from TH" + PICS: LUNIT.C.A0000 + wait: "readAttribute" + attribute: "TemperatureUnit" diff --git a/src/app/tests/suites/certification/Test_TC_OCC_2_2.yaml b/src/app/tests/suites/certification/Test_TC_OCC_2_2.yaml deleted file mode 100644 index 4d8279b864dd9a..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_OCC_2_2.yaml +++ /dev/null @@ -1,400 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 3.2.2. [TC-OCC-2.2] Attributes with client as DUT - -PICS: - - OCC.S - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Note" - verification: | - For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. - disabled: true - - - label: "Commission DUT to TH" - verification: | - - disabled: true - - - label: "DUT reads from the TH the (0x0000) Occupancy attribute" - PICS: OCC.C.A0000 - verification: | - ./chip-tool occupancysensing read occupancy 1 1 - - verify the " occupancy response" on the TH (all-cluster-app) log: - - [1657906563.293939][2361:2361] CHIP:IM: Received Read request - [1657906563.294045][2361:2361] CHIP:DMG: ReadRequestMessage = - [1657906563.294085][2361:2361] CHIP:DMG: { - [1657906563.294118][2361:2361] CHIP:DMG: AttributePathIBs = - [1657906563.294157][2361:2361] CHIP:DMG: [ - [1657906563.294192][2361:2361] CHIP:DMG: AttributePathIB = - [1657906563.294235][2361:2361] CHIP:DMG: { - [1657906563.294280][2361:2361] CHIP:DMG: Endpoint = 0x1, - [1657906563.294319][2361:2361] CHIP:DMG: Cluster = 0x406, - [1657906563.294375][2361:2361] CHIP:DMG: Attribute = 0x0000_0000, - [1657906563.294415][2361:2361] CHIP:DMG: } - [1657906563.294456][2361:2361] CHIP:DMG: - [1657906563.294497][2361:2361] CHIP:DMG: ], - [1657906563.294538][2361:2361] CHIP:DMG: - [1657906563.294608][2361:2361] CHIP:DMG: isFabricFiltered = true, - [1657906563.294653][2361:2361] CHIP:DMG: InteractionModelRevision = 1 - [1657906563.294688][2361:2361] CHIP:DMG: }, - disabled: true - - - label: "DUT reads from the TH the (0x0001) OccupancySensorType attribute" - PICS: OCC.C.A0001 - verification: | - ./chip-tool occupancysensing read occupancy-sensor-type 1 1 - - verify the " occupancy-sensor-type response" on the TH (all-cluster-app) log: - - [1657906599.161154][2361:2361] CHIP:IM: Received Read request - [1657906599.161269][2361:2361] CHIP:DMG: ReadRequestMessage = - [1657906599.161312][2361:2361] CHIP:DMG: { - [1657906599.161348][2361:2361] CHIP:DMG: AttributePathIBs = - [1657906599.161385][2361:2361] CHIP:DMG: [ - [1657906599.161419][2361:2361] CHIP:DMG: AttributePathIB = - [1657906599.161463][2361:2361] CHIP:DMG: { - [1657906599.161518][2361:2361] CHIP:DMG: Endpoint = 0x1, - [1657906599.161570][2361:2361] CHIP:DMG: Cluster = 0x406, - [1657906599.161621][2361:2361] CHIP:DMG: Attribute = 0x0000_0001, - [1657906599.161669][2361:2361] CHIP:DMG: } - [1657906599.161716][2361:2361] CHIP:DMG: - [1657906599.161757][2361:2361] CHIP:DMG: ], - [1657906599.161803][2361:2361] CHIP:DMG: - [1657906599.161846][2361:2361] CHIP:DMG: isFabricFiltered = true, - [1657906599.161887][2361:2361] CHIP:DMG: InteractionModelRevision = 1 - [1657906599.161924][2361:2361] CHIP:DMG: }, - disabled: true - - - label: - "DUT reads from the TH the (0x0002) OccupancySensorTypeBitmap - attribute" - PICS: OCC.C.A0002 - verification: | - ./chip-tool occupancysensing read occupancy-sensor-type-bitmap 1 1 - - verify the " occupancy-sensor-type-bitmap response" on the TH (all-cluster-app) log: - - [1657906629.182638][2361:2361] CHIP:IM: Received Read request - [1657906629.182760][2361:2361] CHIP:DMG: ReadRequestMessage = - [1657906629.182805][2361:2361] CHIP:DMG: { - [1657906629.182841][2361:2361] CHIP:DMG: AttributePathIBs = - [1657906629.182883][2361:2361] CHIP:DMG: [ - [1657906629.182923][2361:2361] CHIP:DMG: AttributePathIB = - [1657906629.182967][2361:2361] CHIP:DMG: { - [1657906629.183013][2361:2361] CHIP:DMG: Endpoint = 0x1, - [1657906629.183065][2361:2361] CHIP:DMG: Cluster = 0x406, - [1657906629.183113][2361:2361] CHIP:DMG: Attribute = 0x0000_0002, - [1657906629.183167][2361:2361] CHIP:DMG: } - [1657906629.183218][2361:2361] CHIP:DMG: - [1657906629.183260][2361:2361] CHIP:DMG: ], - [1657906629.183305][2361:2361] CHIP:DMG: - [1657906629.183422][2361:2361] CHIP:DMG: isFabricFiltered = true, - [1657906629.183467][2361:2361] CHIP:DMG: InteractionModelRevision = 1 - [1657906629.183504][2361:2361] CHIP:DMG: }, - disabled: true - - - label: - "DUT reads from the TH the (0x0010) PIROccupiedToUnoccupiedDelay - optional attribute, if PIR sensor" - PICS: OCC.C.A0010 - verification: | - This is an Optional attribute, so its not compulsory to get the expected outcome - - - ./chip-tool occupancysensing read pir-occupied-to-unoccupied-delay 1 1 - - verify the " pir-occupied-to-unoccupied-delay response" on the TH (all-cluster-app) log: - - [1657906650.927182][2361:2361] CHIP:IM: Received Read request - [1657906650.927324][2361:2361] CHIP:DMG: ReadRequestMessage = - [1657906650.927381][2361:2361] CHIP:DMG: { - [1657906650.927427][2361:2361] CHIP:DMG: AttributePathIBs = - [1657906650.927482][2361:2361] CHIP:DMG: [ - [1657906650.927532][2361:2361] CHIP:DMG: AttributePathIB = - [1657906650.927590][2361:2361] CHIP:DMG: { - [1657906650.927651][2361:2361] CHIP:DMG: Endpoint = 0x1, - [1657906650.927717][2361:2361] CHIP:DMG: Cluster = 0x406, - [1657906650.927783][2361:2361] CHIP:DMG: Attribute = 0x0000_0010, - [1657906650.927846][2361:2361] CHIP:DMG: } - [1657906650.927905][2361:2361] CHIP:DMG: - [1657906650.927960][2361:2361] CHIP:DMG: ], - [1657906650.928018][2361:2361] CHIP:DMG: - [1657906650.928073][2361:2361] CHIP:DMG: isFabricFiltered = true, - [1657906650.928126][2361:2361] CHIP:DMG: InteractionModelRevision = 1 - [1657906650.928184][2361:2361] CHIP:DMG: }, - disabled: true - - - label: - "DUT reads from the TH the (0x0011) PIRUnoccupiedToOccupiedDelay - optional attribute, if PIR sensor" - PICS: OCC.C.A0011 - verification: | - This is an Optional attribute, so its not compulsory to get the expected outcome - - - ./chip-tool occupancysensing read pir-unoccupied-to-occupied-delay 1 1 - - verify the " pir-unoccupied-to-occupied-delay response" on the TH (all-cluster-app) log: - - [1657906670.678493][2361:2361] CHIP:IM: Received Read request - [1657906670.678680][2361:2361] CHIP:DMG: ReadRequestMessage = - [1657906670.678741][2361:2361] CHIP:DMG: { - [1657906670.678787][2361:2361] CHIP:DMG: AttributePathIBs = - [1657906670.678842][2361:2361] CHIP:DMG: [ - [1657906670.678892][2361:2361] CHIP:DMG: AttributePathIB = - [1657906670.678950][2361:2361] CHIP:DMG: { - [1657906670.679008][2361:2361] CHIP:DMG: Endpoint = 0x1, - [1657906670.679073][2361:2361] CHIP:DMG: Cluster = 0x406, - [1657906670.679141][2361:2361] CHIP:DMG: Attribute = 0x0000_0011, - [1657906670.679201][2361:2361] CHIP:DMG: } - [1657906670.679263][2361:2361] CHIP:DMG: - [1657906670.679321][2361:2361] CHIP:DMG: ], - [1657906670.679380][2361:2361] CHIP:DMG: - [1657906670.679435][2361:2361] CHIP:DMG: isFabricFiltered = true, - [1657906670.679493][2361:2361] CHIP:DMG: InteractionModelRevision = 1 - [1657906670.679542][2361:2361] CHIP:DMG: }, - disabled: true - - - label: - "DUT reads from the TH the (0x0012) PIRUnoccupiedToOccupiedThreshold - optional attribute, if PIR sensor" - PICS: OCC.C.A0012 - verification: | - This is an Optional attribute, so its not compulsory to get the expected outcome - - - ./chip-tool occupancysensing read pir-unoccupied-to-occupied-threshold 1 1 - - verify the " pir-unoccupied-to-occupied-threshold response" on the TH (all-cluster-app) log: - - [1657906696.122069][2361:2361] CHIP:IM: Received Read request - [1657906696.122210][2361:2361] CHIP:DMG: ReadRequestMessage = - [1657906696.122265][2361:2361] CHIP:DMG: { - [1657906696.122312][2361:2361] CHIP:DMG: AttributePathIBs = - [1657906696.122366][2361:2361] CHIP:DMG: [ - [1657906696.122416][2361:2361] CHIP:DMG: AttributePathIB = - [1657906696.122480][2361:2361] CHIP:DMG: { - [1657906696.122543][2361:2361] CHIP:DMG: Endpoint = 0x1, - [1657906696.122670][2361:2361] CHIP:DMG: Cluster = 0x406, - [1657906696.122744][2361:2361] CHIP:DMG: Attribute = 0x0000_0012, - [1657906696.122809][2361:2361] CHIP:DMG: } - [1657906696.122874][2361:2361] CHIP:DMG: - [1657906696.122929][2361:2361] CHIP:DMG: ], - [1657906696.122987][2361:2361] CHIP:DMG: - [1657906696.123042][2361:2361] CHIP:DMG: isFabricFiltered = true, - [1657906696.123094][2361:2361] CHIP:DMG: InteractionModelRevision = 1 - [1657906696.123143][2361:2361] CHIP:DMG: }, - disabled: true - - - label: - "DUT reads from the TH the (0x0020) - UltrasonicOccupiedToUnoccupiedDelay optional attribute, if ultrasonic - sensor" - PICS: OCC.C.A0020 - verification: | - This is an Optional attribute, so its not compulsory to get the expected outcome - - - ./chip-tool occupancysensing read ultrasonic-occupied-to-unoccupied-delay 1 1 - - verify the " ultrasonic-occupied-to-unoccupied-delay response" on the TH (all-cluster-app) log: - - [1657906729.107330][2361:2361] CHIP:IM: Received Read request - [1657906729.107455][2361:2361] CHIP:DMG: ReadRequestMessage = - [1657906729.107504][2361:2361] CHIP:DMG: { - [1657906729.107566][2361:2361] CHIP:DMG: AttributePathIBs = - [1657906729.107620][2361:2361] CHIP:DMG: [ - [1657906729.107664][2361:2361] CHIP:DMG: AttributePathIB = - [1657906729.107738][2361:2361] CHIP:DMG: { - [1657906729.107789][2361:2361] CHIP:DMG: Endpoint = 0x1, - [1657906729.107847][2361:2361] CHIP:DMG: Cluster = 0x406, - [1657906729.107929][2361:2361] CHIP:DMG: Attribute = 0x0000_0020, - [1657906729.107984][2361:2361] CHIP:DMG: } - [1657906729.108038][2361:2361] CHIP:DMG: - [1657906729.108105][2361:2361] CHIP:DMG: ], - [1657906729.108157][2361:2361] CHIP:DMG: - [1657906729.108205][2361:2361] CHIP:DMG: isFabricFiltered = true, - [1657906729.108269][2361:2361] CHIP:DMG: InteractionModelRevision = 1 - [1657906729.108312][2361:2361] CHIP:DMG: }, - disabled: true - - - label: - "DUT reads from the TH the (0x0021) - UltrasonicUnoccupiedToOccupiedDelay optional attribute, if ultrasonic - sensor" - PICS: OCC.C.A0021 - verification: | - This is an Optional attribute, so its not compulsory to get the expected outcome - - - ./chip-tool occupancysensing read ultrasonic-unoccupied-to-occupied-delay 1 1 - - verify the " ultrasonic-unoccupied-to-occupied-delay response" on the TH (all-cluster-app) log: - - [1657906752.147785][2361:2361] CHIP:IM: Received Read request - [1657906752.147914][2361:2361] CHIP:DMG: ReadRequestMessage = - [1657906752.147963][2361:2361] CHIP:DMG: { - [1657906752.148021][2361:2361] CHIP:DMG: AttributePathIBs = - [1657906752.148070][2361:2361] CHIP:DMG: [ - [1657906752.148113][2361:2361] CHIP:DMG: AttributePathIB = - [1657906752.148183][2361:2361] CHIP:DMG: { - [1657906752.148240][2361:2361] CHIP:DMG: Endpoint = 0x1, - [1657906752.148304][2361:2361] CHIP:DMG: Cluster = 0x406, - [1657906752.148378][2361:2361] CHIP:DMG: Attribute = 0x0000_0021, - [1657906752.148433][2361:2361] CHIP:DMG: } - [1657906752.148484][2361:2361] CHIP:DMG: - [1657906752.148551][2361:2361] CHIP:DMG: ], - [1657906752.148603][2361:2361] CHIP:DMG: - [1657906752.148651][2361:2361] CHIP:DMG: isFabricFiltered = true, - [1657906752.148717][2361:2361] CHIP:DMG: InteractionModelRevision = 1 - [1657906752.148760][2361:2361] CHIP:DMG: }, - disabled: true - - - label: - "DUT reads from the TH the (0x0022) - UltrasonicUnoccupiedToOccupiedThreshold optional attribute, if - ultrasonic sensor" - PICS: OCC.C.A0022 - verification: | - This is an Optional attribute, so its not compulsory to get the expected outcome - - - - ./chip-tool occupancysensing read ultrasonic-unoccupied-to-occupied-threshold 1 1 - - verify the " ultrasonic-unoccupied-to-occupied-threshold response" on the TH (all-cluster-app) log: - - [1657906770.663661][2361:2361] CHIP:IM: Received Read request - [1657906770.663787][2361:2361] CHIP:DMG: ReadRequestMessage = - [1657906770.663853][2361:2361] CHIP:DMG: { - [1657906770.663896][2361:2361] CHIP:DMG: AttributePathIBs = - [1657906770.663943][2361:2361] CHIP:DMG: [ - [1657906770.663988][2361:2361] CHIP:DMG: AttributePathIB = - [1657906770.664055][2361:2361] CHIP:DMG: { - [1657906770.664107][2361:2361] CHIP:DMG: Endpoint = 0x1, - [1657906770.664195][2361:2361] CHIP:DMG: Cluster = 0x406, - [1657906770.664255][2361:2361] CHIP:DMG: Attribute = 0x0000_0022, - [1657906770.664299][2361:2361] CHIP:DMG: } - [1657906770.664365][2361:2361] CHIP:DMG: - [1657906770.664415][2361:2361] CHIP:DMG: ], - [1657906770.664466][2361:2361] CHIP:DMG: - [1657906770.664530][2361:2361] CHIP:DMG: isFabricFiltered = true, - [1657906770.664578][2361:2361] CHIP:DMG: InteractionModelRevision = 1 - [1657906770.664621][2361:2361] CHIP:DMG: }, - disabled: true - - - label: - "DUT reads from the TH the (0x0030) - PhysicalContactOccupiedToUnoccupiedDelay optional attribute, if - Physical Contact sensor" - PICS: OCC.C.A0030 - verification: | - This is an Optional attribute, so its not compulsory to get the expected outcome - - ./chip-tool occupancysensing read physical-contact-occupied-to-unoccupied-delay 1 1 - - verify the " physical-contact-occupied-to-unoccupied-delay response" on the TH (all-cluster-app) log: - - [1657906788.836643][2361:2361] CHIP:IM: Received Read request - [1657906788.836806][2361:2361] CHIP:DMG: ReadRequestMessage = - [1657906788.836862][2361:2361] CHIP:DMG: { - [1657906788.836928][2361:2361] CHIP:DMG: AttributePathIBs = - [1657906788.836982][2361:2361] CHIP:DMG: [ - [1657906788.837032][2361:2361] CHIP:DMG: AttributePathIB = - [1657906788.837110][2361:2361] CHIP:DMG: { - [1657906788.837170][2361:2361] CHIP:DMG: Endpoint = 0x1, - [1657906788.837246][2361:2361] CHIP:DMG: Cluster = 0x406, - [1657906788.837328][2361:2361] CHIP:DMG: Attribute = 0x0000_0030, - [1657906788.837387][2361:2361] CHIP:DMG: } - [1657906788.837464][2361:2361] CHIP:DMG: - [1657906788.837520][2361:2361] CHIP:DMG: ], - [1657906788.837579][2361:2361] CHIP:DMG: - [1657906788.837634][2361:2361] CHIP:DMG: isFabricFiltered = true, - [1657906788.837706][2361:2361] CHIP:DMG: InteractionModelRevision = 1 - [1657906788.837756][2361:2361] CHIP:DMG: }, - disabled: true - - - label: - "DUT reads from the TH the (0x0031) - PhysicalContactUnoccupiedToOccupiedDelay optional attribute, if - Physical Contact sensor" - PICS: OCC.C.A0031 - verification: | - This is an Optional attribute, so its not compulsory to get the expected outcome - - - ./chip-tool occupancysensing read physical-contact-unoccupied-to-occupied-delay 1 1 - - verify the " physical-contact-unoccupied-to-occupied-delay response" on the TH (all-cluster-app) log: - - [1657906806.229307][2361:2361] CHIP:IM: Received Read request - [1657906806.229449][2361:2361] CHIP:DMG: ReadRequestMessage = - [1657906806.229503][2361:2361] CHIP:DMG: { - [1657906806.229572][2361:2361] CHIP:DMG: AttributePathIBs = - [1657906806.229628][2361:2361] CHIP:DMG: [ - [1657906806.229678][2361:2361] CHIP:DMG: AttributePathIB = - [1657906806.229759][2361:2361] CHIP:DMG: { - [1657906806.229823][2361:2361] CHIP:DMG: Endpoint = 0x1, - [1657906806.229891][2361:2361] CHIP:DMG: Cluster = 0x406, - [1657906806.229972][2361:2361] CHIP:DMG: Attribute = 0x0000_0031, - [1657906806.230028][2361:2361] CHIP:DMG: } - [1657906806.230090][2361:2361] CHIP:DMG: - [1657906806.230166][2361:2361] CHIP:DMG: ], - [1657906806.230224][2361:2361] CHIP:DMG: - [1657906806.230279][2361:2361] CHIP:DMG: isFabricFiltered = true, - [1657906806.230348][2361:2361] CHIP:DMG: InteractionModelRevision = 1 - [1657906806.230399][2361:2361] CHIP:DMG: }, - disabled: true - - - label: - "DUT reads from the TH the (0x0032) - PhysicalContactUnoccupiedToOccupiedThreshold optional attribute, if - Physical Contact sensor" - PICS: OCC.C.A0032 - verification: | - This is an Optional attribute, so its not compulsory to get the expected outcome - - - ./chip-tool occupancysensing read physical-contact-unoccupied-to-occupied-threshold 1 1 - - verify the " physical-contact-unoccupied-to-occupied-threshold response" on the TH (all-cluster-app) log: - - [1657906821.965692][2361:2361] CHIP:IM: Received Read request - [1657906821.965776][2361:2361] CHIP:DMG: ReadRequestMessage = - [1657906821.965808][2361:2361] CHIP:DMG: { - [1657906821.965831][2361:2361] CHIP:DMG: AttributePathIBs = - [1657906821.965872][2361:2361] CHIP:DMG: [ - [1657906821.965902][2361:2361] CHIP:DMG: AttributePathIB = - [1657906821.965937][2361:2361] CHIP:DMG: { - [1657906821.965971][2361:2361] CHIP:DMG: Endpoint = 0x1, - [1657906821.966019][2361:2361] CHIP:DMG: Cluster = 0x406, - [1657906821.966057][2361:2361] CHIP:DMG: Attribute = 0x0000_0032, - [1657906821.966092][2361:2361] CHIP:DMG: } - [1657906821.966135][2361:2361] CHIP:DMG: - [1657906821.966167][2361:2361] CHIP:DMG: ], - [1657906821.966197][2361:2361] CHIP:DMG: - [1657906821.966220][2361:2361] CHIP:DMG: isFabricFiltered = true, - [1657906821.966241][2361:2361] CHIP:DMG: InteractionModelRevision = 1 - [1657906821.966277][2361:2361] CHIP:DMG: }, - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_OCC_2_2_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_OCC_2_2_Simulated.yaml new file mode 100644 index 00000000000000..7a6a2e3c01e9fa --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_OCC_2_2_Simulated.yaml @@ -0,0 +1,106 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 30.2.1. [TC-OCC-2.2] Attributes with server as DUT + +PICS: + - OCC.C + +config: + nodeId: 0x12344321 + cluster: "Occupancy Sensing" + endpoint: 0 + +tests: + - label: "Wait for the device to be commissioned" + cluster: "DelayCommands" + command: "WaitForCommissioning" + + - label: "DUT reads from the TH the (0x0000) Occupancy attribute" + PICS: OCC.C.A0000 + wait: "readAttribute" + attribute: "occupancy" + + - label: "DUT reads from the TH the (0x0001) OccupancySensorType attribute" + PICS: OCC.C.A0001 + wait: "readAttribute" + attribute: "occupancy sensor type" + + - label: "DUT reads from the TH the (0x0002) OccupancySensorType attribute" + PICS: OCC.C.A0002 + wait: "readAttribute" + attribute: "occupancy sensor type bitmap" + + - label: + "DUT reads from the TH the (0x0010) PIROccupiedToUnoccupiedDelay + optional attribute" + PICS: OCC.C.A0010 + wait: "readAttribute" + attribute: "PIR occupied to unoccupied delay" + + - label: + "DUT reads from the TH the (0x0011) PIRUnoccupiedToOccupiedDelay + optional attribute" + PICS: OCC.C.A0011 + wait: "readAttribute" + attribute: "PIR unoccupied to occupied delay" + + - label: + "DUT reads from the TH the (0x0012) PIRUnoccupiedToOccupiedThreshold + optional attribute" + PICS: OCC.C.A0012 + wait: "readAttribute" + attribute: "PIR unoccupied to occupied threshold" + + - label: + "DUT reads from the TH the (0x0020) + UltrasonicOccupiedToUnoccupiedDelay optional attribute" + PICS: OCC.C.A0020 + wait: "readAttribute" + attribute: "ultrasonic occupied to unoccupied delay" + + - label: + "DUT reads from the TH the (0x0021) + UltrasonicUnoccupiedToOccupiedDelay optional attribute" + PICS: OCC.C.A0021 + wait: "readAttribute" + attribute: "ultrasonic unoccupied to occupied delay" + + - label: + "DUT reads from the TH the (0x0022) + UltrasonicUnoccupiedToOccupiedThreshold optional attribute" + PICS: OCC.C.A0022 + wait: "readAttribute" + attribute: "ultrasonic unoccupied to occupied threshold" + + - label: + "DUT reads from the TH the (0x0030) + PhysicalContactOccupiedToUnoccupiedDelay optional attribute" + PICS: OCC.C.A0030 + wait: "readAttribute" + attribute: "physical contact occupied to unoccupied delay" + + - label: + "DUT reads from the TH the (0x0031) + PhysicalContactUnoccupiedToOccupiedDelay optional attribute" + PICS: OCC.C.A0031 + wait: "readAttribute" + attribute: "physical contact unoccupied to occupied delay" + + - label: + "DUT reads from the TH the (0x0032) + PhysicalContactUnoccupiedToOccupiedThreshold optional attribute" + PICS: OCC.C.A0032 + wait: "readAttribute" + attribute: "physical contact unoccupied to occupied threshold" diff --git a/src/app/tests/suites/certification/Test_TC_OCC_2_4.yaml b/src/app/tests/suites/certification/Test_TC_OCC_2_4.yaml deleted file mode 100644 index 1e76d132199e79..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_OCC_2_4.yaml +++ /dev/null @@ -1,89 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: - 3.2.4. [TC-OCC-2.4] OccupancySensorTypeBitmap and OccupancySensorType - interdependency with client as DUT - -PICS: - - OCC.S - -config: - nodeId: 0x12344321 - cluster: "Occupancy Sensing" - endpoint: 1 - -tests: - - label: "Note" - verification: | - For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. - disabled: true - - - label: "Commission DUT to TH" - verification: | - - disabled: true - - - label: "DUT reads OccupancySensorType attribute from TH" - PICS: OCC.C.A0001 - verification: | - ./chip-tool occupancysensing read occupancy-sensor-type 1 1 - - verify the " occupancy-sensor-type response" on the TH (all-cluster-app) log: - - [1657906852.014556][2361:2361] CHIP:IM: Received Read request - [1657906852.014724][2361:2361] CHIP:DMG: ReadRequestMessage = - [1657906852.014775][2361:2361] CHIP:DMG: { - [1657906852.014817][2361:2361] CHIP:DMG: AttributePathIBs = - [1657906852.014865][2361:2361] CHIP:DMG: [ - [1657906852.014910][2361:2361] CHIP:DMG: AttributePathIB = - [1657906852.014965][2361:2361] CHIP:DMG: { - [1657906852.015017][2361:2361] CHIP:DMG: Endpoint = 0x1, - [1657906852.015075][2361:2361] CHIP:DMG: Cluster = 0x406, - [1657906852.015134][2361:2361] CHIP:DMG: Attribute = 0x0000_0001, - [1657906852.015189][2361:2361] CHIP:DMG: } - [1657906852.015241][2361:2361] CHIP:DMG: - [1657906852.015290][2361:2361] CHIP:DMG: ], - [1657906852.015336][2361:2361] CHIP:DMG: - [1657906852.015385][2361:2361] CHIP:DMG: isFabricFiltered = true, - [1657906852.015431][2361:2361] CHIP:DMG: InteractionModelRevision = 1 - [1657906852.015474][2361:2361] CHIP:DMG: }, - disabled: true - - - label: "DUT reads OccupancySensorTypeBitmap attribute from TH" - PICS: OCC.C.A0002 - verification: | - ./chip-tool occupancysensing read occupancy-sensor-type-bitmap 1 1 - - verify the " occupancy-sensor-type-bitmap response" on the TH (all-cluster-app) log: - - [1657906867.937264][2361:2361] CHIP:IM: Received Read request - [1657906867.937390][2361:2361] CHIP:DMG: ReadRequestMessage = - [1657906867.937440][2361:2361] CHIP:DMG: { - [1657906867.937498][2361:2361] CHIP:DMG: AttributePathIBs = - [1657906867.937546][2361:2361] CHIP:DMG: [ - [1657906867.937591][2361:2361] CHIP:DMG: AttributePathIB = - [1657906867.937663][2361:2361] CHIP:DMG: { - [1657906867.937715][2361:2361] CHIP:DMG: Endpoint = 0x1, - [1657906867.937771][2361:2361] CHIP:DMG: Cluster = 0x406, - [1657906867.937853][2361:2361] CHIP:DMG: Attribute = 0x0000_0002, - [1657906867.937915][2361:2361] CHIP:DMG: } - [1657906867.937986][2361:2361] CHIP:DMG: - [1657906867.938034][2361:2361] CHIP:DMG: ], - [1657906867.938085][2361:2361] CHIP:DMG: - [1657906867.938148][2361:2361] CHIP:DMG: isFabricFiltered = true, - [1657906867.938187][2361:2361] CHIP:DMG: InteractionModelRevision = 1 - [1657906867.938213][2361:2361] CHIP:DMG: }, - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_OCC_2_4_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_OCC_2_4_Simulated.yaml new file mode 100644 index 00000000000000..e9d45210f6930c --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_OCC_2_4_Simulated.yaml @@ -0,0 +1,38 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 30.2.1. [TC-OCC-2.4] Attributes with server as DUT + +PICS: + - OCC.C + +config: + nodeId: 0x12344321 + cluster: "Occupancy Sensing" + endpoint: 0 + +tests: + - label: "Wait for the device to be commissioned" + cluster: "DelayCommands" + command: "WaitForCommissioning" + + - label: "TH reads OccupancySensorType attribute from DUT" + PICS: OCC.S.A0001 + wait: "readAttribute" + attribute: "occupancy sensor type" + + - label: "TH reads OccupancySensorTypeBitmap attribute from DUT" + PICS: OCC.S.A0002 + wait: "readAttribute" + attribute: "occupancy sensor type bitmap" diff --git a/src/app/tests/suites/certification/Test_TC_SWTCH_3_1.yaml b/src/app/tests/suites/certification/Test_TC_SWTCH_3_1.yaml deleted file mode 100644 index b35dd23cf69b84..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_SWTCH_3_1.yaml +++ /dev/null @@ -1,240 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 74.3.1. [TC-SWTCH-3.1] Global attributes with client as DUT - -PICS: - - SWTCH.C - - SWTCH.C.AM-READ - - SWTCH.C.AO-READ - - SWTCH.C.AM-WRITE - - SWTCH.C.AO-WRITE - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Note" - verification: | - For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. - disabled: true - - - label: - "DUT reads all supported mandatory attributes from TH one at a time in - a manufacturer specific order" - verification: | - ./chip-tool switch read number-of-positions 1 1 - - verify on TH all-cluster-app number-of-positions attribute receives the right ReadRequest for the data sent in the above command: - - [1650539419.579618][3678:3678] CHIP:IM: Received Read request - [1650539419.579683][3678:3678] CHIP:DMG: ReadRequestMessage = - [1650539419.579718][3678:3678] CHIP:DMG: { - [1650539419.579748][3678:3678] CHIP:DMG: AttributePathIBs = - [1650539419.579783][3678:3678] CHIP:DMG: [ - [1650539419.579816][3678:3678] CHIP:DMG: AttributePathIB = - [1650539419.579857][3678:3678] CHIP:DMG: { - [1650539419.579895][3678:3678] CHIP:DMG: Endpoint = 0x1, - [1650539419.579943][3678:3678] CHIP:DMG: Cluster = 0x3b, - [1650539419.579990][3678:3678] CHIP:DMG: Attribute = 0x0000_0000, - [1650539419.580034][3678:3678] CHIP:DMG: } - [1650539419.580075][3678:3678] CHIP:DMG: - [1650539419.580111][3678:3678] CHIP:DMG: ], - [1650539419.580150][3678:3678] CHIP:DMG: - [1650539419.580184][3678:3678] CHIP:DMG: isFabricFiltered = true, - [1650539419.580218][3678:3678] CHIP:DMG: InteractionModelRevision = 1 - [1650539419.580250][3678:3678] CHIP:DMG: }, - - ./chip-tool switch read current-position 1 1 - - verify on TH all-cluster-app current-position attribute receives the right ReadRequest for the data sent in the above command: - - [1650539484.199120][3678:3678] CHIP:DMG: ReadRequestMessage = - [1650539484.199188][3678:3678] CHIP:DMG: { - [1650539484.199243][3678:3678] CHIP:DMG: AttributePathIBs = - [1650539484.199308][3678:3678] CHIP:DMG: [ - [1650539484.199368][3678:3678] CHIP:DMG: AttributePathIB = - [1650539484.199442][3678:3678] CHIP:DMG: { - [1650539484.199515][3678:3678] CHIP:DMG: Endpoint = 0x1, - [1650539484.199600][3678:3678] CHIP:DMG: Cluster = 0x3b, - [1650539484.199685][3678:3678] CHIP:DMG: Attribute = 0x0000_0001, - [1650539484.199760][3678:3678] CHIP:DMG: } - [1650539484.199835][3678:3678] CHIP:DMG: - [1650539484.199901][3678:3678] CHIP:DMG: ], - [1650539484.199971][3678:3678] CHIP:DMG: - [1650539484.200035][3678:3678] CHIP:DMG: isFabricFiltered = true, - [1650539484.200098][3678:3678] CHIP:DMG: InteractionModelRevision = 1 - [1650539484.200156][3678:3678] CHIP:DMG: }, - disabled: true - - - label: - "DUT reads all supported optional attributes from TH one at a time in - a manufacturer specific order" - verification: | - verify on Reference app receives the right response for the data sent in the above commands - - ./chip-tool switch read multi-press-max 1 1 - - verify on TH all-cluster-app multi-press-max attribute receives the right ReadRequest for the data sent in the above command: - - [1646209889.768919][2190:2190] CHIP:DMG: ReadRequestMessage = - [1646209889.768984][2190:2190] CHIP:DMG: { - [1646209889.769012][2190:2190] CHIP:DMG: AttributePathIBs = - [1646209889.769049][2190:2190] CHIP:DMG: [ - [1646209889.769076][2190:2190] CHIP:DMG: AttributePathIB = - [1646209889.769107][2190:2190] CHIP:DMG: { - [1646209889.769154][2190:2190] CHIP:DMG: Endpoint = 0x1, - [1646209889.769205][2190:2190] CHIP:DMG: Cluster = 0x3b, - [1646209889.769254][2190:2190] CHIP:DMG: Attribute = 0x0000_0002, - [1646209889.769292][2190:2190] CHIP:DMG: } - [1646209889.769325][2190:2190] CHIP:DMG: - [1646209889.769367][2190:2190] CHIP:DMG: ], - [1646209889.769401][2190:2190] CHIP:DMG: - [1646209889.769432][2190:2190] CHIP:DMG: isFabricFiltered = false, - [1646209889.769461][2190:2190] CHIP:DMG: InteractionModelRevision = 1 - [1646209889.769499][2190:2190] CHIP:DMG: }, - [1646209889.769572][2190:2190] CHIP:DMG: IM RH moving to [GeneratingReports] - disabled: true - - - label: - "DUT writes a suitable value to all supported mandatory attributes on - the TH one at a time in a manufacturer specific order" - verification: | - This cluster doesn"t have any writable attributes - disabled: true - - - label: - "DUT writes a suitable value to all supported optional attributes on - the TH one at a time in a manufacturer specific order" - verification: | - This cluster doesn"t have any writable attributes - disabled: true - - - label: - "Configure TH such that it implements mandatory and none of the - optional attributes of the server-side of the cluster, and that it - also reflects this in global attributes such as FeatureMap and - AttributeList. Commission DUT to TH again" - verification: | - ./chip-tool switch read feature-map 1 1 - - verify on TH all-clusters-minimal-app feature-map attribute receives the right ReadRequest for the data sent in the above command - - [1659597205.359182][2409:2409] CHIP:IM: Received Read request - [1659597205.359281][2409:2409] CHIP:DMG: ReadRequestMessage = - [1659597205.359315][2409:2409] CHIP:DMG: { - [1659597205.359344][2409:2409] CHIP:DMG: AttributePathIBs = - [1659597205.359378][2409:2409] CHIP:DMG: [ - [1659597205.359409][2409:2409] CHIP:DMG: AttributePathIB = - [1659597205.359447][2409:2409] CHIP:DMG: { - [1659597205.359487][2409:2409] CHIP:DMG: Endpoint = 0x1, - [1659597205.359530][2409:2409] CHIP:DMG: Cluster = 0x3b, - [1659597205.359572][2409:2409] CHIP:DMG: Attribute = 0x0000_FFFC, - [1659597205.359615][2409:2409] CHIP:DMG: } - [1659597205.359654][2409:2409] CHIP:DMG: - [1659597205.359689][2409:2409] CHIP:DMG: ], - [1659597205.359726][2409:2409] CHIP:DMG: - [1659597205.359760][2409:2409] CHIP:DMG: isFabricFiltered = true, - [1659597205.359792][2409:2409] CHIP:DMG: InteractionModelRevision = 1 - [1659597205.359822][2409:2409] CHIP:DMG: }, - [1659597205.359912][2409:2409] CHIP:DMG: IM RH moving to [GeneratingReports]1 - - ./chip-tool switch read attribute-list 1 1 - - verify on TH all-clusters-minimal-app attribute-list receives the right ReadRequest for the data sent in the above command - - [1659597229.124241][2409:2409] CHIP:IM: Received Read request - [1659597229.124312][2409:2409] CHIP:DMG: ReadRequestMessage = - [1659597229.124335][2409:2409] CHIP:DMG: { - [1659597229.124353][2409:2409] CHIP:DMG: AttributePathIBs = - [1659597229.124376][2409:2409] CHIP:DMG: [ - [1659597229.124396][2409:2409] CHIP:DMG: AttributePathIB = - [1659597229.124428][2409:2409] CHIP:DMG: { - [1659597229.124455][2409:2409] CHIP:DMG: Endpoint = 0x1, - [1659597229.124484][2409:2409] CHIP:DMG: Cluster = 0x3b, - [1659597229.124512][2409:2409] CHIP:DMG: Attribute = 0x0000_FFFB, - [1659597229.124538][2409:2409] CHIP:DMG: } - [1659597229.124564][2409:2409] CHIP:DMG: - [1659597229.124588][2409:2409] CHIP:DMG: ], - [1659597229.124612][2409:2409] CHIP:DMG: - [1659597229.124635][2409:2409] CHIP:DMG: isFabricFiltered = true, - [1659597229.124656][2409:2409] CHIP:DMG: InteractionModelRevision = 1 - [1659597229.124676][2409:2409] CHIP:DMG: }, - [1659597229.124740][2409:2409] CHIP:DMG: IM RH moving to [GeneratingReports - - - - ./chip-tool switch read number-of-positions 1 1 - - verify on TH all-clusters-minimal-app number-of-positions attribute receives the right ReadRequest for the data sent in the above command - - [1650539419.579618][3678:3678] CHIP:IM: Received Read request - [1650539419.579683][3678:3678] CHIP:DMG: ReadRequestMessage = - [1650539419.579718][3678:3678] CHIP:DMG: { - [1650539419.579748][3678:3678] CHIP:DMG: AttributePathIBs = - [1650539419.579783][3678:3678] CHIP:DMG: [ - [1650539419.579816][3678:3678] CHIP:DMG: AttributePathIB = - [1650539419.579857][3678:3678] CHIP:DMG: { - [1650539419.579895][3678:3678] CHIP:DMG: Endpoint = 0x1, - [1650539419.579943][3678:3678] CHIP:DMG: Cluster = 0x3b, - [1650539419.579990][3678:3678] CHIP:DMG: Attribute = 0x0000_0000, - [1650539419.580034][3678:3678] CHIP:DMG: } - [1650539419.580075][3678:3678] CHIP:DMG: - [1650539419.580111][3678:3678] CHIP:DMG: ], - [1650539419.580150][3678:3678] CHIP:DMG: - [1650539419.580184][3678:3678] CHIP:DMG: isFabricFiltered = true, - [1650539419.580218][3678:3678] CHIP:DMG: InteractionModelRevision = 1 - [1650539419.580250][3678:3678] CHIP:DMG: }, - - ./chip-tool switch read current-position 1 1 - - verify on TH all-clusters-minimal-app current-position attribute receives the right ReadRequest for the data sent in the above command - - [1650539484.199120][3678:3678] CHIP:DMG: ReadRequestMessage = - [1650539484.199188][3678:3678] CHIP:DMG: { - [1650539484.199243][3678:3678] CHIP:DMG: AttributePathIBs = - [1650539484.199308][3678:3678] CHIP:DMG: [ - [1650539484.199368][3678:3678] CHIP:DMG: AttributePathIB = - [1650539484.199442][3678:3678] CHIP:DMG: { - [1650539484.199515][3678:3678] CHIP:DMG: Endpoint = 0x1, - [1650539484.199600][3678:3678] CHIP:DMG: Cluster = 0x3b, - [1650539484.199685][3678:3678] CHIP:DMG: Attribute = 0x0000_0001, - [1650539484.199760][3678:3678] CHIP:DMG: } - [1650539484.199835][3678:3678] CHIP:DMG: - [1650539484.199901][3678:3678] CHIP:DMG: ], - [1650539484.199971][3678:3678] CHIP:DMG: - [1650539484.200035][3678:3678] CHIP:DMG: isFabricFiltered = true, - [1650539484.200098][3678:3678] CHIP:DMG: InteractionModelRevision = 1 - [1650539484.200156][3678:3678] CHIP:DMG: }, - disabled: true - - - label: - "DUT reads all supported optional attributes from TH one at a time in - a manufacturer specific order" - verification: | - TH all-clusters-minimal-app does not support optional attributes - - - ./chip-tool switch read multi-press-max 1 1 - disabled: true - - - label: - "DUT writes a suitable value to all supported optional attributes on - the TH one at a time in a manufacturer specific order" - verification: | - This cluster doesn"t have any writable attributes - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_ULABEL_3_1.yaml b/src/app/tests/suites/certification/Test_TC_ULABEL_3_1.yaml deleted file mode 100644 index be6d0a80a186dc..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_ULABEL_3_1.yaml +++ /dev/null @@ -1,140 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 3.3.1. [TC-ULABEL-3.1] User label cluster [DUT-client] - -PICS: - - ULABEL.C - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Note" - verification: | - Chip-tool command used below are an example to verify the DUT as client test cases. For certification test, we expect DUT should have a capability or way to run the equivalent command. - disabled: true - - - label: "TH is commissioned with DUT" - verification: | - - disabled: true - - - label: "DUT reads LabelList from the TH" - PICS: ULABEL.C.A0000 - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - ./chip-tool userlabel read label-list 1 0 - - Verify DUT receives LabelList attribute response on the TH(all-clusters-app) Log: - [1659609723.950391][2409:2409] CHIP:EM: Handling via exchange: 38919r, Delegate: 0xaaaadba0fee0 - [1659609723.950455][2409:2409] CHIP:IM: Received Read request - [1659609723.950570][2409:2409] CHIP:DMG: ReadRequestMessage = - [1659609723.950611][2409:2409] CHIP:DMG: { - [1659609723.950644][2409:2409] CHIP:DMG: AttributePathIBs = - [1659609723.950685][2409:2409] CHIP:DMG: [ - [1659609723.950722][2409:2409] CHIP:DMG: AttributePathIB = - [1659609723.950770][2409:2409] CHIP:DMG: { - [1659609723.950814][2409:2409] CHIP:DMG: Endpoint = 0x0, - [1659609723.950868][2409:2409] CHIP:DMG: Cluster = 0x41, - [1659609723.950926][2409:2409] CHIP:DMG: Attribute = 0x0000_0000, - [1659609723.950980][2409:2409] CHIP:DMG: } - [1659609723.951024][2409:2409] CHIP:DMG: - [1659609723.951065][2409:2409] CHIP:DMG: ], - [1659609723.951111][2409:2409] CHIP:DMG: - [1659609723.951152][2409:2409] CHIP:DMG: isFabricFiltered = true, - [1659609723.951192][2409:2409] CHIP:DMG: InteractionModelRevision = 1 - [1659609723.951228][2409:2409] CHIP:DMG: }, - [1659609723.951341][2409:2409] CHIP:DMG: IM RH moving to [GeneratingReports] - disabled: true - - - label: - "DUT sends a write request to the TH to write to an entry in the - LabelList" - PICS: ULABEL.C.A0000 - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - ./chip-tool userlabel write label-list '[{"label":"room", "value":"bedroom 1"}, {"label":"orientation", "value":"east"}]' 1 0 - - Verify DUT receives LabelList attribute response on the TH(all-clusters-app) Log: - - [1659609795.578716][2409:2409] CHIP:DMG: IM WH moving to [Initialized] - [1659609795.578784][2409:2409] CHIP:DMG: WriteRequestMessage = - [1659609795.578809][2409:2409] CHIP:DMG: { - [1659609795.578829][2409:2409] CHIP:DMG: suppressResponse = false, - [1659609795.578852][2409:2409] CHIP:DMG: timedRequest = false, - [1659609795.578873][2409:2409] CHIP:DMG: AttributeDataIBs = - [1659609795.578900][2409:2409] CHIP:DMG: [ - [1659609795.578922][2409:2409] CHIP:DMG: AttributeDataIB = - [1659609795.578951][2409:2409] CHIP:DMG: { - [1659609795.578974][2409:2409] CHIP:DMG: AttributePathIB = - [1659609795.579007][2409:2409] CHIP:DMG: { - [1659609795.579035][2409:2409] CHIP:DMG: Endpoint = 0x0, - [1659609795.579069][2409:2409] CHIP:DMG: Cluster = 0x41, - [1659609795.579101][2409:2409] CHIP:DMG: Attribute = 0x0000_0000, - [1659609795.579133][2409:2409] CHIP:DMG: } - [1659609795.579166][2409:2409] CHIP:DMG: - [1659609795.579197][2409:2409] CHIP:DMG: Data = [ - [1659609795.579227][2409:2409] CHIP:DMG: - [1659609795.579345][2409:2409] CHIP:DMG: ], - [1659609795.579372][2409:2409] CHIP:DMG: }, - [1659609795.579401][2409:2409] CHIP:DMG: - [1659609795.579422][2409:2409] CHIP:DMG: AttributeDataIB = - [1659609795.579446][2409:2409] CHIP:DMG: { - [1659609795.579468][2409:2409] CHIP:DMG: AttributePathIB = - [1659609795.579498][2409:2409] CHIP:DMG: { - [1659609795.579526][2409:2409] CHIP:DMG: Endpoint = 0x0, - [1659609795.579558][2409:2409] CHIP:DMG: Cluster = 0x41, - [1659609795.579591][2409:2409] CHIP:DMG: Attribute = 0x0000_0000, - [1659609795.579623][2409:2409] CHIP:DMG: ListIndex = Null, - [1659609795.579653][2409:2409] CHIP:DMG: } - [1659609795.579682][2409:2409] CHIP:DMG: - [1659609795.579712][2409:2409] CHIP:DMG: Data = - [1659609795.579743][2409:2409] CHIP:DMG: { - [1659609795.579777][2409:2409] CHIP:DMG: 0x0 = "room" (4 chars), - [1659609795.579809][2409:2409] CHIP:DMG: 0x1 = "bedroom 1" (9 chars), - [1659609795.579841][2409:2409] CHIP:DMG: }, - [1659609795.579871][2409:2409] CHIP:DMG: }, - [1659609795.579903][2409:2409] CHIP:DMG: - [1659609795.579924][2409:2409] CHIP:DMG: AttributeDataIB = - [1659609795.579950][2409:2409] CHIP:DMG: { - [1659609795.579972][2409:2409] CHIP:DMG: AttributePathIB = - [1659609795.580002][2409:2409] CHIP:DMG: { - [1659609795.580033][2409:2409] CHIP:DMG: Endpoint = 0x0, - [1659609795.580065][2409:2409] CHIP:DMG: Cluster = 0x41, - [1659609795.580098][2409:2409] CHIP:DMG: Attribute = 0x0000_0000, - [1659609795.580130][2409:2409] CHIP:DMG: ListIndex = Null, - [1659609795.580157][2409:2409] CHIP:DMG: } - [1659609795.580186][2409:2409] CHIP:DMG: - [1659609795.580215][2409:2409] CHIP:DMG: Data = - [1659609795.580241][2409:2409] CHIP:DMG: { - [1659609795.580270][2409:2409] CHIP:DMG: 0x0 = "orientation" (11 chars), - [1659609795.580302][2409:2409] CHIP:DMG: 0x1 = "east" (4 chars), - [1659609795.580332][2409:2409] CHIP:DMG: }, - [1659609795.580357][2409:2409] CHIP:DMG: }, - [1659609795.580383][2409:2409] CHIP:DMG: - [1659609795.580404][2409:2409] CHIP:DMG: ], - [1659609795.580437][2409:2409] CHIP:DMG: - [1659609795.580459][2409:2409] CHIP:DMG: moreChunkedMessages = false, - [1659609795.580480][2409:2409] CHIP:DMG: InteractionModelRevision = 1 - [1659609795.580500][2409:2409] CHIP:DMG: }, - [1659609795.580591][2409:2409] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0041 e=0 p=m - [1659609795.580626][2409:2409] CHIP:DMG: AccessControl: allowed - [1659609795.580892][2409:2409] CHIP:DL: writing settings to file (/tmp/chip_kvs-utHZk3) - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_ULABEL_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_ULABEL_3_1_Simulated.yaml new file mode 100644 index 00000000000000..e42190de8b9e53 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_ULABEL_3_1_Simulated.yaml @@ -0,0 +1,40 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 92.1. [TC-ULABEL-3.1] Global Attributes [DUT-server] + +PICS: + - ULABEL.C + +config: + nodeId: 0x12344321 + cluster: "User Label" + endpoint: 0 + +tests: + - label: "Wait for the device to be commissioned" + cluster: "DelayCommands" + command: "WaitForCommissioning" + + - label: "Read attribute: LabelList" + PICS: ULABEL.C.A0000 + wait: "readAttribute" + attribute: "label list" + + - label: "write attribute: LabelList" + PICS: ULABEL.C.A0000 + wait: "writeAttribute" + attribute: "label list" + arguments: + value: diff --git a/src/app/tests/suites/ciTests.json b/src/app/tests/suites/ciTests.json index 8e02636bd76894..61286397607778 100644 --- a/src/app/tests/suites/ciTests.json +++ b/src/app/tests/suites/ciTests.json @@ -4,7 +4,10 @@ "Test_TC_ACL_1_1", "Test_TC_ACL_2_1", "Test_TC_ACL_2_2", - "Test_TC_ACL_2_3" + "Test_TC_ACL_2_3", + "Test_TC_ACL_2_4", + "Test_TC_ACL_2_7", + "Test_TC_ACL_2_9" ], "BooleanState": ["Test_TC_BOOL_1_1", "Test_TC_BOOL_2_1"], "Binding": ["Test_TC_BIND_1_1"], @@ -61,7 +64,11 @@ "Test_TC_ILL_2_1", "Test_TC_ILL_2_2" ], - "OccupancySensing": ["Test_TC_OCC_1_1", "Test_TC_OCC_2_1"], + "OccupancySensing": [ + "Test_TC_OCC_1_1", + "Test_TC_OCC_2_1", + "Test_TC_OCC_2_3" + ], "LevelControl": [ "Test_TC_LVL_1_1", "Test_TC_LVL_2_1", @@ -73,7 +80,7 @@ ], "LocalizationConfiguration": ["Test_TC_LCFG_1_1"], "TimeFormatLocalization": ["Test_TC_LTIME_1_2"], - "UnitLocalization": ["Test_TC_LUNIT_1_2"], + "UnitLocalization": ["Test_TC_LUNIT_1_2", "Test_TC_LUNIT_3_1"], "UserLabel": [ "Test_TC_ULABEL_1_1", "Test_TC_ULABEL_2_1", diff --git a/src/app/tests/suites/manualTests.json b/src/app/tests/suites/manualTests.json index a70896e1adea1c..a090ba676de5f0 100644 --- a/src/app/tests/suites/manualTests.json +++ b/src/app/tests/suites/manualTests.json @@ -242,12 +242,7 @@ "WiFiNetworkDiagnostics": ["Test_TC_DGWIFI_2_2"], "WindowCovering": ["Test_TC_WNCV_6_1", "Test_TC_WNCV_7_1"], "FlowMeasurement": ["Test_TC_FLW_2_2"], - "OccupancySensing": [ - "Test_TC_OCC_2_2", - "Test_TC_OCC_2_3", - "Test_TC_OCC_2_4", - "Test_TC_OCC_3_1" - ], + "OccupancySensing": ["Test_TC_OCC_3_1"], "PowerSource": ["Test_TC_PS_2_2"], "BooleanState": ["Test_TC_BOOL_2_2"], "ColorControl": [ @@ -272,7 +267,7 @@ "Test_TC_DRLK_3_2", "Test_TC_DRLK_3_3" ], - "LocalizationConfiguration": ["Test_TC_LCFG_2_1", "Test_TC_LCFG_3_1"], + "LocalizationConfiguration": ["Test_TC_LCFG_2_1"], "LevelControl": ["Test_TC_LVL_2_3", "Test_TC_LVL_7_1", "Test_TC_LVL_8_1"], "OnOff": ["Test_TC_OO_2_3", "Test_TC_OO_3_1", "Test_TC_OO_3_2"], "RelativeHumidityMeasurement": ["Test_TC_RH_2_2"], @@ -294,11 +289,7 @@ "Test_TC_LTIME_2_1", "Test_TC_LTIME_3_1" ], - "UnitLocalization": [ - "Test_TC_LUNIT_1_1", - "Test_TC_LUNIT_2_1", - "Test_TC_LUNIT_3_1" - ], + "UnitLocalization": [], "Binding": ["Test_TC_BIND_2_1", "Test_TC_BIND_2_2", "Test_TC_BIND_2_3"], "Scenes": [ "Test_TC_S_1_1", @@ -309,15 +300,12 @@ ], "PumpConfigurationControl": ["Test_TC_PCC_3_1"], "AccessControl": [ - "Test_TC_ACL_2_4", "Test_TC_ACL_2_5", "Test_TC_ACL_2_6", - "Test_TC_ACL_2_7", "Test_TC_ACL_2_8", - "Test_TC_ACL_2_9", "Test_TC_ACL_2_10" ], - "UserLabel": ["Test_TC_ULABEL_3_1"], + "UserLabel": [], "BridgedDeviceBasicInformation": [ "Test_TC_BRBINFO_2_2", "Test_TC_BRBINFO_2_3" diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index a4c3223b511588..326ffd667d5218 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -40,6 +40,9 @@ class TestList : public Command printf("Test_TC_ACL_2_1\n"); printf("Test_TC_ACL_2_2\n"); printf("Test_TC_ACL_2_3\n"); + printf("Test_TC_ACL_2_4\n"); + printf("Test_TC_ACL_2_7\n"); + printf("Test_TC_ACL_2_9\n"); printf("Test_TC_BOOL_1_1\n"); printf("Test_TC_BOOL_2_1\n"); printf("Test_TC_BRBINFO_1_1\n"); @@ -97,6 +100,7 @@ class TestList : public Command printf("Test_TC_LVL_6_1\n"); printf("Test_TC_LCFG_1_1\n"); printf("Test_TC_LUNIT_1_2\n"); + printf("Test_TC_LUNIT_3_1\n"); printf("Test_TC_LTIME_1_2\n"); printf("Test_TC_LOWPOWER_1_1\n"); printf("Test_TC_KEYPADINPUT_1_2\n"); @@ -141,6 +145,7 @@ class TestList : public Command printf("OTA_SuccessfulTransfer\n"); printf("Test_TC_OCC_1_1\n"); printf("Test_TC_OCC_2_1\n"); + printf("Test_TC_OCC_2_3\n"); printf("Test_TC_OO_1_1\n"); printf("Test_TC_OO_2_1\n"); printf("Test_TC_OO_2_2\n"); @@ -488,9 +493,6 @@ class ManualTestList : public Command printf("Test_TC_WNCV_6_1\n"); printf("Test_TC_WNCV_7_1\n"); printf("Test_TC_FLW_2_2\n"); - printf("Test_TC_OCC_2_2\n"); - printf("Test_TC_OCC_2_3\n"); - printf("Test_TC_OCC_2_4\n"); printf("Test_TC_OCC_3_1\n"); printf("Test_TC_PS_2_2\n"); printf("Test_TC_BOOL_2_2\n"); @@ -513,7 +515,6 @@ class ManualTestList : public Command printf("Test_TC_DRLK_3_2\n"); printf("Test_TC_DRLK_3_3\n"); printf("Test_TC_LCFG_2_1\n"); - printf("Test_TC_LCFG_3_1\n"); printf("Test_TC_LVL_2_3\n"); printf("Test_TC_LVL_7_1\n"); printf("Test_TC_LVL_8_1\n"); @@ -540,9 +541,6 @@ class ManualTestList : public Command printf("Test_TC_LTIME_1_1\n"); printf("Test_TC_LTIME_2_1\n"); printf("Test_TC_LTIME_3_1\n"); - printf("Test_TC_LUNIT_1_1\n"); - printf("Test_TC_LUNIT_2_1\n"); - printf("Test_TC_LUNIT_3_1\n"); printf("Test_TC_BIND_2_1\n"); printf("Test_TC_BIND_2_2\n"); printf("Test_TC_BIND_2_3\n"); @@ -552,14 +550,10 @@ class ManualTestList : public Command printf("Test_TC_S_2_3\n"); printf("Test_TC_S_3_1\n"); printf("Test_TC_PCC_3_1\n"); - printf("Test_TC_ACL_2_4\n"); printf("Test_TC_ACL_2_5\n"); printf("Test_TC_ACL_2_6\n"); - printf("Test_TC_ACL_2_7\n"); printf("Test_TC_ACL_2_8\n"); - printf("Test_TC_ACL_2_9\n"); printf("Test_TC_ACL_2_10\n"); - printf("Test_TC_ULABEL_3_1\n"); printf("Test_TC_BRBINFO_2_2\n"); printf("Test_TC_BRBINFO_2_3\n"); printf("Test_TC_ACE_1_1\n"); @@ -2937,18 +2931,23 @@ class Test_TC_ACL_2_3Suite : public TestCommand } }; -class Test_TC_BOOL_1_1Suite : public TestCommand +class Test_TC_ACL_2_4Suite : public TestCommand { public: - Test_TC_BOOL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BOOL_1_1", 6, credsIssuerConfig) + Test_TC_ACL_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_4", 44, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("CommissionerNodeId", 0, UINT64_MAX, &mCommissionerNodeId); + AddArgument("CAT1", 0, UINT64_MAX, &mCat1); + AddArgument("CAT2", 0, UINT64_MAX, &mCat2); + AddArgument("CAT3", 0, UINT64_MAX, &mCat3); + AddArgument("CAT4", 0, UINT64_MAX, &mCat4); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BOOL_1_1Suite() {} + ~Test_TC_ACL_2_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -2959,8 +2958,18 @@ class Test_TC_BOOL_1_1Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mCommissionerNodeId; + chip::Optional mCat1; + chip::Optional mCat2; + chip::Optional mCat3; + chip::Optional mCat4; chip::Optional mTimeout; + uint8_t CurrentFabricIndex; + uint16_t MAXSUBJECTS; + uint16_t TargetsPerAccessControlEntry; + uint16_t MAXENTRIES; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -2980,415 +2989,826 @@ class Test_TC_BOOL_1_1Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + CurrentFabricIndex = value; } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint32_t value; + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> + value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); + VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); + VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); + VerifyOrReturn(CheckValueNonNull("acl[0].subjects", iter_0.GetValue().subjects)); + { + auto iter_3 = iter_0.GetValue().subjects.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[0].subjects.Value()", iter_3, 0)); + VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), + mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL)); + VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", + iter_3, 1)); + } + VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); + VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); + VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 1)); + } } break; case 3: 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")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> + value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); + VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); + VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); + VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); + VerifyOrReturn(CheckValueNonNull("acl[0].subjects", iter_0.GetValue().subjects)); + { + auto iter_3 = iter_0.GetValue().subjects.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[0].subjects.Value()", iter_3, 0)); + VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), + mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL)); + VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", + iter_3, 1)); + } + VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); + VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); + VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 1)); + VerifyOrReturn(CheckValue("acl[1].privilege", iter_0.GetValue().privilege, 1U)); + VerifyOrReturn(CheckValue("acl[1].authMode", iter_0.GetValue().authMode, 3U)); + VerifyOrReturn(CheckValueNonNull("acl[1].subjects", iter_0.GetValue().subjects)); + { + auto iter_3 = iter_0.GetValue().subjects.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[1].subjects.Value()", iter_3, 0)); + VerifyOrReturn(CheckValue("acl[1].subjects.Value()[0]", iter_3.GetValue(), 111ULL)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[1].subjects.Value()", iter_3, 1)); + VerifyOrReturn(CheckValue("acl[1].subjects.Value()[1]", iter_3.GetValue(), 222ULL)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[1].subjects.Value()", iter_3, 2)); + VerifyOrReturn(CheckValue("acl[1].subjects.Value()[2]", iter_3.GetValue(), 333ULL)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[1].subjects.Value()", iter_3, 3)); + VerifyOrReturn(CheckValue("acl[1].subjects.Value()[3]", iter_3.GetValue(), 444ULL)); + VerifyOrReturn(CheckNoMoreListItems("acl[1].subjects.Value()", + iter_3, 4)); + } + VerifyOrReturn(CheckValueNonNull("acl[1].targets", iter_0.GetValue().targets)); + { + auto iter_3 = iter_0.GetValue().targets.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[1].targets.Value()", iter_3, 0)); + VerifyOrReturn(CheckValueNonNull("acl[1].targets.Value()[0].cluster", iter_3.GetValue().cluster)); + VerifyOrReturn( + CheckValue("acl[1].targets.Value()[0].cluster.Value()", iter_3.GetValue().cluster.Value(), 11UL)); + VerifyOrReturn(CheckValueNonNull("acl[1].targets.Value()[0].endpoint", iter_3.GetValue().endpoint)); + VerifyOrReturn( + CheckValue("acl[1].targets.Value()[0].endpoint.Value()", iter_3.GetValue().endpoint.Value(), 22U)); + VerifyOrReturn(CheckValueNull("acl[1].targets.Value()[0].deviceType", iter_3.GetValue().deviceType)); + VerifyOrReturn( + CheckNoMoreListItems("acl[1].targets.Value()", iter_3, 1)); + } + VerifyOrReturn(CheckValue("acl[1].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); + VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 2)); + VerifyOrReturn(CheckValue("acl[2].privilege", iter_0.GetValue().privilege, 3U)); + VerifyOrReturn(CheckValue("acl[2].authMode", iter_0.GetValue().authMode, 3U)); + VerifyOrReturn(CheckValueNonNull("acl[2].subjects", iter_0.GetValue().subjects)); + { + auto iter_3 = iter_0.GetValue().subjects.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[2].subjects.Value()", iter_3, 0)); + VerifyOrReturn(CheckValue("acl[2].subjects.Value()[0]", iter_3.GetValue(), 555ULL)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[2].subjects.Value()", iter_3, 1)); + VerifyOrReturn(CheckValue("acl[2].subjects.Value()[1]", iter_3.GetValue(), 666ULL)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[2].subjects.Value()", iter_3, 2)); + VerifyOrReturn(CheckValue("acl[2].subjects.Value()[2]", iter_3.GetValue(), 777ULL)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[2].subjects.Value()", iter_3, 3)); + VerifyOrReturn(CheckValue("acl[2].subjects.Value()[3]", iter_3.GetValue(), 888ULL)); + VerifyOrReturn(CheckNoMoreListItems("acl[2].subjects.Value()", + iter_3, 4)); + } + VerifyOrReturn(CheckValueNonNull("acl[2].targets", iter_0.GetValue().targets)); + { + auto iter_3 = iter_0.GetValue().targets.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[2].targets.Value()", iter_3, 0)); + VerifyOrReturn(CheckValueNonNull("acl[2].targets.Value()[0].cluster", iter_3.GetValue().cluster)); + VerifyOrReturn( + CheckValue("acl[2].targets.Value()[0].cluster.Value()", iter_3.GetValue().cluster.Value(), 55UL)); + VerifyOrReturn(CheckValueNonNull("acl[2].targets.Value()[0].endpoint", iter_3.GetValue().endpoint)); + VerifyOrReturn( + CheckValue("acl[2].targets.Value()[0].endpoint.Value()", iter_3.GetValue().endpoint.Value(), 66U)); + VerifyOrReturn(CheckValueNull("acl[2].targets.Value()[0].deviceType", iter_3.GetValue().deviceType)); + VerifyOrReturn( + CheckNoMoreListItems("acl[2].targets.Value()", iter_3, 1)); + } + VerifyOrReturn(CheckValue("acl[2].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); + VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 3)); } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> + value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); + VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); + VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); + VerifyOrReturn(CheckValueNonNull("acl[0].subjects", iter_0.GetValue().subjects)); + { + auto iter_3 = iter_0.GetValue().subjects.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[0].subjects.Value()", iter_3, 0)); + VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), + mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL)); + VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", + iter_3, 1)); + } + VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); + VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); + VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 1)); + VerifyOrReturn(CheckValue("acl[1].privilege", iter_0.GetValue().privilege, 4U)); + VerifyOrReturn(CheckValue("acl[1].authMode", iter_0.GetValue().authMode, 3U)); + VerifyOrReturn(CheckValueNonNull("acl[1].subjects", iter_0.GetValue().subjects)); + { + auto iter_3 = iter_0.GetValue().subjects.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[1].subjects.Value()", iter_3, 0)); + VerifyOrReturn(CheckValue("acl[1].subjects.Value()[0]", iter_3.GetValue(), 444ULL)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[1].subjects.Value()", iter_3, 1)); + VerifyOrReturn(CheckValue("acl[1].subjects.Value()[1]", iter_3.GetValue(), 333ULL)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[1].subjects.Value()", iter_3, 2)); + VerifyOrReturn(CheckValue("acl[1].subjects.Value()[2]", iter_3.GetValue(), 222ULL)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[1].subjects.Value()", iter_3, 3)); + VerifyOrReturn(CheckValue("acl[1].subjects.Value()[3]", iter_3.GetValue(), 111ULL)); + VerifyOrReturn(CheckNoMoreListItems("acl[1].subjects.Value()", + iter_3, 4)); + } + VerifyOrReturn(CheckValueNonNull("acl[1].targets", iter_0.GetValue().targets)); + { + auto iter_3 = iter_0.GetValue().targets.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[1].targets.Value()", iter_3, 0)); + VerifyOrReturn(CheckValueNonNull("acl[1].targets.Value()[0].cluster", iter_3.GetValue().cluster)); + VerifyOrReturn( + CheckValue("acl[1].targets.Value()[0].cluster.Value()", iter_3.GetValue().cluster.Value(), 44UL)); + VerifyOrReturn(CheckValueNonNull("acl[1].targets.Value()[0].endpoint", iter_3.GetValue().endpoint)); + VerifyOrReturn( + CheckValue("acl[1].targets.Value()[0].endpoint.Value()", iter_3.GetValue().endpoint.Value(), 33U)); + VerifyOrReturn(CheckValueNull("acl[1].targets.Value()[0].deviceType", iter_3.GetValue().deviceType)); + VerifyOrReturn( + CheckNoMoreListItems("acl[1].targets.Value()", iter_3, 1)); + } + VerifyOrReturn(CheckValue("acl[1].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); + VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 2)); + VerifyOrReturn(CheckValue("acl[2].privilege", iter_0.GetValue().privilege, 5U)); + VerifyOrReturn(CheckValue("acl[2].authMode", iter_0.GetValue().authMode, 2U)); + VerifyOrReturn(CheckValueNonNull("acl[2].subjects", iter_0.GetValue().subjects)); + { + auto iter_3 = iter_0.GetValue().subjects.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[2].subjects.Value()", iter_3, 0)); + VerifyOrReturn(CheckValue("acl[2].subjects.Value()[0]", iter_3.GetValue(), 888ULL)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[2].subjects.Value()", iter_3, 1)); + VerifyOrReturn(CheckValue("acl[2].subjects.Value()[1]", iter_3.GetValue(), 777ULL)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[2].subjects.Value()", iter_3, 2)); + VerifyOrReturn(CheckValue("acl[2].subjects.Value()[2]", iter_3.GetValue(), 666ULL)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[2].subjects.Value()", iter_3, 3)); + VerifyOrReturn(CheckValue("acl[2].subjects.Value()[3]", iter_3.GetValue(), 555ULL)); + VerifyOrReturn(CheckNoMoreListItems("acl[2].subjects.Value()", + iter_3, 4)); + } + VerifyOrReturn(CheckValueNonNull("acl[2].targets", iter_0.GetValue().targets)); + { + auto iter_3 = iter_0.GetValue().targets.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[2].targets.Value()", iter_3, 0)); + VerifyOrReturn(CheckValueNonNull("acl[2].targets.Value()[0].cluster", iter_3.GetValue().cluster)); + VerifyOrReturn( + CheckValue("acl[2].targets.Value()[0].cluster.Value()", iter_3.GetValue().cluster.Value(), 88UL)); + VerifyOrReturn(CheckValueNonNull("acl[2].targets.Value()[0].endpoint", iter_3.GetValue().endpoint)); + VerifyOrReturn( + CheckValue("acl[2].targets.Value()[0].endpoint.Value()", iter_3.GetValue().endpoint.Value(), 77U)); + VerifyOrReturn(CheckValueNull("acl[2].targets.Value()[0].deviceType", iter_3.GetValue().deviceType)); + VerifyOrReturn( + CheckNoMoreListItems("acl[2].targets.Value()", iter_3, 1)); + } + VerifyOrReturn(CheckValue("acl[2].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); + VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 3)); } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::ClusterRevision::Id, - true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read the global attribute: FeatureMap"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Read the global attribute: AttributeList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 4: { - LogStep(4, "Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, - BooleanState::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, - BooleanState::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BOOL_2_1Suite : public TestCommand -{ -public: - Test_TC_BOOL_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BOOL_2_1", 2, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BOOL_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; - case 1: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - bool value; + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> + value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); + VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); + VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); + VerifyOrReturn(CheckValueNonNull("acl[0].subjects", iter_0.GetValue().subjects)); + { + auto iter_3 = iter_0.GetValue().subjects.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[0].subjects.Value()", iter_3, 0)); + VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), + mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL)); + VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", + iter_3, 1)); + } + VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); + VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); + VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 1)); + VerifyOrReturn(CheckValue("acl[1].privilege", iter_0.GetValue().privilege, 1U)); + VerifyOrReturn(CheckValue("acl[1].authMode", iter_0.GetValue().authMode, 2U)); + VerifyOrReturn(CheckValueNonNull("acl[1].subjects", iter_0.GetValue().subjects)); + { + auto iter_3 = iter_0.GetValue().subjects.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[1].subjects.Value()", iter_3, 0)); + VerifyOrReturn(CheckValue("acl[1].subjects.Value()[0]", iter_3.GetValue(), 111ULL)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[1].subjects.Value()", iter_3, 1)); + VerifyOrReturn(CheckValue("acl[1].subjects.Value()[1]", iter_3.GetValue(), 222ULL)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[1].subjects.Value()", iter_3, 2)); + VerifyOrReturn(CheckValue("acl[1].subjects.Value()[2]", iter_3.GetValue(), 333ULL)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[1].subjects.Value()", iter_3, 3)); + VerifyOrReturn(CheckValue("acl[1].subjects.Value()[3]", iter_3.GetValue(), 444ULL)); + VerifyOrReturn(CheckNoMoreListItems("acl[1].subjects.Value()", + iter_3, 4)); + } + VerifyOrReturn(CheckValueNonNull("acl[1].targets", iter_0.GetValue().targets)); + { + auto iter_3 = iter_0.GetValue().targets.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[1].targets.Value()", iter_3, 0)); + VerifyOrReturn(CheckValueNonNull("acl[1].targets.Value()[0].cluster", iter_3.GetValue().cluster)); + VerifyOrReturn( + CheckValue("acl[1].targets.Value()[0].cluster.Value()", iter_3.GetValue().cluster.Value(), 11UL)); + VerifyOrReturn(CheckValueNonNull("acl[1].targets.Value()[0].endpoint", iter_3.GetValue().endpoint)); + VerifyOrReturn( + CheckValue("acl[1].targets.Value()[0].endpoint.Value()", iter_3.GetValue().endpoint.Value(), 22U)); + VerifyOrReturn(CheckValueNull("acl[1].targets.Value()[0].deviceType", iter_3.GetValue().deviceType)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[1].targets.Value()", iter_3, 1)); + VerifyOrReturn(CheckValueNonNull("acl[1].targets.Value()[1].cluster", iter_3.GetValue().cluster)); + VerifyOrReturn( + CheckValue("acl[1].targets.Value()[1].cluster.Value()", iter_3.GetValue().cluster.Value(), 33UL)); + VerifyOrReturn(CheckValueNull("acl[1].targets.Value()[1].endpoint", iter_3.GetValue().endpoint)); + VerifyOrReturn(CheckValueNonNull("acl[1].targets.Value()[1].deviceType", iter_3.GetValue().deviceType)); + VerifyOrReturn( + CheckValue("acl[1].targets.Value()[1].deviceType.Value()", iter_3.GetValue().deviceType.Value(), 44UL)); + VerifyOrReturn( + CheckNoMoreListItems("acl[1].targets.Value()", iter_3, 2)); + } + VerifyOrReturn(CheckValue("acl[1].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); + VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 2)); + VerifyOrReturn(CheckValue("acl[2].privilege", iter_0.GetValue().privilege, 3U)); + VerifyOrReturn(CheckValue("acl[2].authMode", iter_0.GetValue().authMode, 3U)); + VerifyOrReturn(CheckValueNonNull("acl[2].subjects", iter_0.GetValue().subjects)); + { + auto iter_3 = iter_0.GetValue().subjects.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[2].subjects.Value()", iter_3, 0)); + VerifyOrReturn(CheckValue("acl[2].subjects.Value()[0]", iter_3.GetValue(), 555ULL)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[2].subjects.Value()", iter_3, 1)); + VerifyOrReturn(CheckValue("acl[2].subjects.Value()[1]", iter_3.GetValue(), 666ULL)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[2].subjects.Value()", iter_3, 2)); + VerifyOrReturn(CheckValue("acl[2].subjects.Value()[2]", iter_3.GetValue(), 777ULL)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[2].subjects.Value()", iter_3, 3)); + VerifyOrReturn(CheckValue("acl[2].subjects.Value()[3]", iter_3.GetValue(), 888ULL)); + VerifyOrReturn(CheckNoMoreListItems("acl[2].subjects.Value()", + iter_3, 4)); + } + VerifyOrReturn(CheckValueNonNull("acl[2].targets", iter_0.GetValue().targets)); + { + auto iter_3 = iter_0.GetValue().targets.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[2].targets.Value()", iter_3, 0)); + VerifyOrReturn(CheckValueNonNull("acl[2].targets.Value()[0].cluster", iter_3.GetValue().cluster)); + VerifyOrReturn( + CheckValue("acl[2].targets.Value()[0].cluster.Value()", iter_3.GetValue().cluster.Value(), 55UL)); + VerifyOrReturn(CheckValueNonNull("acl[2].targets.Value()[0].endpoint", iter_3.GetValue().endpoint)); + VerifyOrReturn( + CheckValue("acl[2].targets.Value()[0].endpoint.Value()", iter_3.GetValue().endpoint.Value(), 66U)); + VerifyOrReturn(CheckValueNull("acl[2].targets.Value()[0].deviceType", iter_3.GetValue().deviceType)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[2].targets.Value()", iter_3, 1)); + VerifyOrReturn(CheckValueNonNull("acl[2].targets.Value()[1].cluster", iter_3.GetValue().cluster)); + VerifyOrReturn( + CheckValue("acl[2].targets.Value()[1].cluster.Value()", iter_3.GetValue().cluster.Value(), 77UL)); + VerifyOrReturn(CheckValueNull("acl[2].targets.Value()[1].endpoint", iter_3.GetValue().endpoint)); + VerifyOrReturn(CheckValueNonNull("acl[2].targets.Value()[1].deviceType", iter_3.GetValue().deviceType)); + VerifyOrReturn( + CheckValue("acl[2].targets.Value()[1].deviceType.Value()", iter_3.GetValue().deviceType.Value(), 88UL)); + VerifyOrReturn( + CheckNoMoreListItems("acl[2].targets.Value()", iter_3, 2)); + } + VerifyOrReturn(CheckValue("acl[2].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); + VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 3)); + } } break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read mandatory non-global attribute: StateValue"); - VerifyOrDo(!ShouldSkip("BOOL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::StateValue::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BRBINFO_1_1Suite : public TestCommand -{ -public: - Test_TC_BRBINFO_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_BRBINFO_1_1", 20, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BRBINFO_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; - case 1: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> + value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); + VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); + VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); + VerifyOrReturn(CheckValueNonNull("acl[0].subjects", iter_0.GetValue().subjects)); + { + auto iter_3 = iter_0.GetValue().subjects.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[0].subjects.Value()", iter_3, 0)); + VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), + mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL)); + VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", + iter_3, 1)); + } + VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); + VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); + VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 1)); + VerifyOrReturn(CheckValue("acl[1].privilege", iter_0.GetValue().privilege, 1U)); + VerifyOrReturn(CheckValue("acl[1].authMode", iter_0.GetValue().authMode, 2U)); + VerifyOrReturn(CheckValueNull("acl[1].subjects", iter_0.GetValue().subjects)); + VerifyOrReturn(CheckValueNonNull("acl[1].targets", iter_0.GetValue().targets)); + { + auto iter_3 = iter_0.GetValue().targets.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[1].targets.Value()", iter_3, 0)); + VerifyOrReturn(CheckValueNonNull("acl[1].targets.Value()[0].cluster", iter_3.GetValue().cluster)); + VerifyOrReturn( + CheckValue("acl[1].targets.Value()[0].cluster.Value()", iter_3.GetValue().cluster.Value(), 11UL)); + VerifyOrReturn(CheckValueNonNull("acl[1].targets.Value()[0].endpoint", iter_3.GetValue().endpoint)); + VerifyOrReturn( + CheckValue("acl[1].targets.Value()[0].endpoint.Value()", iter_3.GetValue().endpoint.Value(), 22U)); + VerifyOrReturn(CheckValueNull("acl[1].targets.Value()[0].deviceType", iter_3.GetValue().deviceType)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[1].targets.Value()", iter_3, 1)); + VerifyOrReturn(CheckValueNonNull("acl[1].targets.Value()[1].cluster", iter_3.GetValue().cluster)); + VerifyOrReturn( + CheckValue("acl[1].targets.Value()[1].cluster.Value()", iter_3.GetValue().cluster.Value(), 33UL)); + VerifyOrReturn(CheckValueNull("acl[1].targets.Value()[1].endpoint", iter_3.GetValue().endpoint)); + VerifyOrReturn(CheckValueNonNull("acl[1].targets.Value()[1].deviceType", iter_3.GetValue().deviceType)); + VerifyOrReturn( + CheckValue("acl[1].targets.Value()[1].deviceType.Value()", iter_3.GetValue().deviceType.Value(), 44UL)); + VerifyOrReturn( + CheckNoMoreListItems("acl[1].targets.Value()", iter_3, 2)); + } + VerifyOrReturn(CheckValue("acl[1].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); + VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 2)); + VerifyOrReturn(CheckValue("acl[2].privilege", iter_0.GetValue().privilege, 3U)); + VerifyOrReturn(CheckValue("acl[2].authMode", iter_0.GetValue().authMode, 3U)); + VerifyOrReturn(CheckValueNull("acl[2].subjects", iter_0.GetValue().subjects)); + VerifyOrReturn(CheckValueNonNull("acl[2].targets", iter_0.GetValue().targets)); + { + auto iter_3 = iter_0.GetValue().targets.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[2].targets.Value()", iter_3, 0)); + VerifyOrReturn(CheckValueNonNull("acl[2].targets.Value()[0].cluster", iter_3.GetValue().cluster)); + VerifyOrReturn( + CheckValue("acl[2].targets.Value()[0].cluster.Value()", iter_3.GetValue().cluster.Value(), 55UL)); + VerifyOrReturn(CheckValueNonNull("acl[2].targets.Value()[0].endpoint", iter_3.GetValue().endpoint)); + VerifyOrReturn( + CheckValue("acl[2].targets.Value()[0].endpoint.Value()", iter_3.GetValue().endpoint.Value(), 66U)); + VerifyOrReturn(CheckValueNull("acl[2].targets.Value()[0].deviceType", iter_3.GetValue().deviceType)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[2].targets.Value()", iter_3, 1)); + VerifyOrReturn(CheckValueNonNull("acl[2].targets.Value()[1].cluster", iter_3.GetValue().cluster)); + VerifyOrReturn( + CheckValue("acl[2].targets.Value()[1].cluster.Value()", iter_3.GetValue().cluster.Value(), 77UL)); + VerifyOrReturn(CheckValueNull("acl[2].targets.Value()[1].endpoint", iter_3.GetValue().endpoint)); + VerifyOrReturn(CheckValueNonNull("acl[2].targets.Value()[1].deviceType", iter_3.GetValue().deviceType)); + VerifyOrReturn( + CheckValue("acl[2].targets.Value()[1].deviceType.Value()", iter_3.GetValue().deviceType.Value(), 88UL)); + VerifyOrReturn( + CheckNoMoreListItems("acl[2].targets.Value()", iter_3, 2)); + } + VerifyOrReturn(CheckValue("acl[2].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); + VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 3)); + } } break; - case 2: + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint32_t value; + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> + value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - 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")); - VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); + VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); + VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); + VerifyOrReturn(CheckValueNonNull("acl[0].subjects", iter_0.GetValue().subjects)); + { + auto iter_3 = iter_0.GetValue().subjects.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[0].subjects.Value()", iter_3, 0)); + VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), + mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL)); + VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", + iter_3, 1)); + } + VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); + VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); + VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 1)); + VerifyOrReturn(CheckValue("acl[1].privilege", iter_0.GetValue().privilege, 1U)); + VerifyOrReturn(CheckValue("acl[1].authMode", iter_0.GetValue().authMode, 2U)); + VerifyOrReturn(CheckValueNonNull("acl[1].subjects", iter_0.GetValue().subjects)); + { + auto iter_3 = iter_0.GetValue().subjects.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[1].subjects.Value()", iter_3, 0)); + VerifyOrReturn(CheckValue("acl[1].subjects.Value()[0]", iter_3.GetValue(), 111ULL)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[1].subjects.Value()", iter_3, 1)); + VerifyOrReturn(CheckValue("acl[1].subjects.Value()[1]", iter_3.GetValue(), 222ULL)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[1].subjects.Value()", iter_3, 2)); + VerifyOrReturn(CheckValue("acl[1].subjects.Value()[2]", iter_3.GetValue(), 333ULL)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[1].subjects.Value()", iter_3, 3)); + VerifyOrReturn(CheckValue("acl[1].subjects.Value()[3]", iter_3.GetValue(), 444ULL)); + VerifyOrReturn(CheckNoMoreListItems("acl[1].subjects.Value()", + iter_3, 4)); + } + VerifyOrReturn(CheckValueNull("acl[1].targets", iter_0.GetValue().targets)); + VerifyOrReturn(CheckValue("acl[1].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); + VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 2)); + VerifyOrReturn(CheckValue("acl[2].privilege", iter_0.GetValue().privilege, 3U)); + VerifyOrReturn(CheckValue("acl[2].authMode", iter_0.GetValue().authMode, 3U)); + VerifyOrReturn(CheckValueNonNull("acl[2].subjects", iter_0.GetValue().subjects)); + { + auto iter_3 = iter_0.GetValue().subjects.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[2].subjects.Value()", iter_3, 0)); + VerifyOrReturn(CheckValue("acl[2].subjects.Value()[0]", iter_3.GetValue(), 555ULL)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[2].subjects.Value()", iter_3, 1)); + VerifyOrReturn(CheckValue("acl[2].subjects.Value()[1]", iter_3.GetValue(), 666ULL)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[2].subjects.Value()", iter_3, 2)); + VerifyOrReturn(CheckValue("acl[2].subjects.Value()[2]", iter_3.GetValue(), 777ULL)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[2].subjects.Value()", iter_3, 3)); + VerifyOrReturn(CheckValue("acl[2].subjects.Value()[3]", iter_3.GetValue(), 888ULL)); + VerifyOrReturn(CheckNoMoreListItems("acl[2].subjects.Value()", + iter_3, 4)); + } + VerifyOrReturn(CheckValueNull("acl[2].targets", iter_0.GetValue().targets)); + VerifyOrReturn(CheckValue("acl[2].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); + VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 3)); + } } break; - case 4: + case 13: 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")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } break; - case 5: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> + value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); + VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); + VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); + VerifyOrReturn(CheckValueNonNull("acl[0].subjects", iter_0.GetValue().subjects)); + { + auto iter_3 = iter_0.GetValue().subjects.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[0].subjects.Value()", iter_3, 0)); + VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), + mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL)); + VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", + iter_3, 1)); + } + VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); + VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); + VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 1)); + VerifyOrReturn(CheckValue("acl[1].privilege", iter_0.GetValue().privilege, 3U)); + VerifyOrReturn(CheckValue("acl[1].authMode", iter_0.GetValue().authMode, 3U)); + VerifyOrReturn(CheckValueNull("acl[1].subjects", iter_0.GetValue().subjects)); + VerifyOrReturn(CheckValueNull("acl[1].targets", iter_0.GetValue().targets)); + VerifyOrReturn(CheckValue("acl[1].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); + VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 2)); + } } break; - case 6: + case 15: 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")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } break; - case 7: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> + value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); + VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); + VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); + VerifyOrReturn(CheckValueNonNull("acl[0].subjects", iter_0.GetValue().subjects)); + { + auto iter_3 = iter_0.GetValue().subjects.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[0].subjects.Value()", iter_3, 0)); + VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), + mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL)); + VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", + iter_3, 1)); + } + VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); + VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); + VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 1)); + VerifyOrReturn(CheckValue("acl[1].privilege", iter_0.GetValue().privilege, 2U)); + VerifyOrReturn(CheckValue("acl[1].authMode", iter_0.GetValue().authMode, 2U)); + VerifyOrReturn(CheckValueNull("acl[1].subjects", iter_0.GetValue().subjects)); + VerifyOrReturn(CheckValueNull("acl[1].targets", iter_0.GetValue().targets)); + VerifyOrReturn(CheckValue("acl[1].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); + VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 2)); + } } break; - case 8: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); + MAXSUBJECTS = value; } break; - case 9: + case 18: 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")); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - } + shouldContinue = true; break; - case 10: + case 19: 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")); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - } + shouldContinue = true; break; - case 11: + case 20: 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")); - VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); - } break; - case 12: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> + value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); + VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); + VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); + VerifyOrReturn(CheckValueNonNull("acl[0].subjects", iter_0.GetValue().subjects)); + { + auto iter_3 = iter_0.GetValue().subjects.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[0].subjects.Value()", iter_3, 0)); + VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), + mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL)); + VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", + iter_3, 1)); + } + VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); + VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); + VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 1)); + VerifyOrReturn(CheckValue("acl[1].privilege", iter_0.GetValue().privilege, 3U)); + VerifyOrReturn(CheckValue("acl[1].authMode", iter_0.GetValue().authMode, 2U)); + VerifyOrReturn(CheckValueNonNull("acl[1].subjects", iter_0.GetValue().subjects)); + { + auto iter_3 = iter_0.GetValue().subjects.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[1].subjects.Value()", iter_3, 0)); + VerifyOrReturn(CheckValue("acl[1].subjects.Value()[0]", iter_3.GetValue(), + mCat1.HasValue() ? mCat1.Value() : 65520ULL)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[1].subjects.Value()", iter_3, 1)); + VerifyOrReturn(CheckValue("acl[1].subjects.Value()[1]", iter_3.GetValue(), + mCat2.HasValue() ? mCat2.Value() : 65521ULL)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[1].subjects.Value()", iter_3, 2)); + VerifyOrReturn(CheckValue("acl[1].subjects.Value()[2]", iter_3.GetValue(), + mCat3.HasValue() ? mCat3.Value() : 65522ULL)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[1].subjects.Value()", iter_3, 3)); + VerifyOrReturn(CheckValue("acl[1].subjects.Value()[3]", iter_3.GetValue(), + mCat4.HasValue() ? mCat4.Value() : 65523ULL)); + VerifyOrReturn(CheckNoMoreListItems("acl[1].subjects.Value()", + iter_3, 4)); + } + VerifyOrReturn(CheckValueNull("acl[1].targets", iter_0.GetValue().targets)); + VerifyOrReturn(CheckValue("acl[1].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); + VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 2)); + } } break; - case 13: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 12UL)); + TargetsPerAccessControlEntry = value; } break; - case 14: + case 23: 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")); - VerifyOrReturn(CheckConstraintContains("value", value, 13UL)); - } + shouldContinue = true; break; - case 15: + case 24: 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")); - VerifyOrReturn(CheckConstraintContains("value", value, 14UL)); - } + shouldContinue = true; break; - case 16: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); + MAXENTRIES = value; } break; - case 17: + case 26: 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")); - VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); - } break; - case 18: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> + value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); + VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); + VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); + VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); + VerifyOrReturn(CheckValueNonNull("acl[0].subjects", iter_0.GetValue().subjects)); + { + auto iter_3 = iter_0.GetValue().subjects.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[0].subjects.Value()", iter_3, 0)); + VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), + mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL)); + VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", + iter_3, 1)); + } + VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); + VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); + VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 1)); + VerifyOrReturn(CheckValue("acl[1].privilege", iter_0.GetValue().privilege, 3U)); + VerifyOrReturn(CheckValue("acl[1].authMode", iter_0.GetValue().authMode, 2U)); + VerifyOrReturn(CheckValueNull("acl[1].subjects", iter_0.GetValue().subjects)); + VerifyOrReturn(CheckValueNull("acl[1].targets", iter_0.GetValue().targets)); + VerifyOrReturn(CheckValue("acl[1].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); + VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 2)); + VerifyOrReturn(CheckValue("acl[2].privilege", iter_0.GetValue().privilege, 3U)); + VerifyOrReturn(CheckValue("acl[2].authMode", iter_0.GetValue().authMode, 2U)); + VerifyOrReturn(CheckValueNull("acl[2].subjects", iter_0.GetValue().subjects)); + VerifyOrReturn(CheckValueNull("acl[2].targets", iter_0.GetValue().targets)); + VerifyOrReturn(CheckValue("acl[2].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); + VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 3)); } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 19: + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> + value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); + VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); + VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); + VerifyOrReturn(CheckValueNonNull("acl[0].subjects", iter_0.GetValue().subjects)); + { + auto iter_3 = iter_0.GetValue().subjects.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[0].subjects.Value()", iter_3, 0)); + VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), + mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL)); + VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", + iter_3, 1)); + } + VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); + VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); + VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 1)); } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; + case 30: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 31: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 32: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 33: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 34: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 35: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 36: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 37: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 38: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 39: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 40: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 41: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 42: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 43: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -3405,44 +3825,2656 @@ class Test_TC_BRBINFO_1_1Suite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); + LogStep(0, "Step 1:Wait for the commissioned device to be retrieved"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "TH reads the ClusterRevision from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasic::Id, - BridgedDeviceBasic::Attributes::ClusterRevision::Id, true, chip::NullOptional); + LogStep(1, "Step 2:TH1 reads DUT Endpoint 0 OperationalCredentials cluster CurrentFabricIndex attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "TH reads the FeatureMap from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasic::Id, - BridgedDeviceBasic::Attributes::FeatureMap::Id, true, chip::NullOptional); + LogStep(2, "Step 3:TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, + chip::NullOptional); } case 3: { - LogStep(3, "TH reads AttributeList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasic::Id, - BridgedDeviceBasic::Attributes::AttributeList::Id, true, chip::NullOptional); + LogStep( + 3, + "Step 4:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of AccessControlEntryStruct " + "containing 3 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects field: [N1] " + "Targets field: null 2 . struct Privilege field: View (1) AuthMode field: CASE (3) Subjects field: [111, 222, 333, " + "444] Targets field: [{Cluster: 11}, {Endpoint: 22}] 3..struct Privilege field: Operate (3) AuthMode field: Group " + "(3) Subjects field: [555, 666, 777, 888] Targets field: [{Cluster: 55}, {Endpoint: 66}]"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(3); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); + listHolder_0->mList[0].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; + + listHolder_0->mList[1].privilege = + static_cast(1); + listHolder_0->mList[1].authMode = + static_cast(3); + listHolder_0->mList[1].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(4); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = 111ULL; + listHolder_3->mList[1] = 222ULL; + listHolder_3->mList[2] = 333ULL; + listHolder_3->mList[3] = 444ULL; + listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 4); + } + listHolder_0->mList[1].targets.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + + listHolder_3->mList[0].cluster.SetNonNull(); + listHolder_3->mList[0].cluster.Value() = 11UL; + listHolder_3->mList[0].endpoint.SetNonNull(); + listHolder_3->mList[0].endpoint.Value() = 22U; + listHolder_3->mList[0].deviceType.SetNull(); + + listHolder_0->mList[1].targets.Value() = + chip::app::DataModel::List(listHolder_3->mList, + 1); + } + listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; + + listHolder_0->mList[2].privilege = + static_cast(3); + listHolder_0->mList[2].authMode = + static_cast(3); + listHolder_0->mList[2].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(4); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = 555ULL; + listHolder_3->mList[1] = 666ULL; + listHolder_3->mList[2] = 777ULL; + listHolder_3->mList[3] = 888ULL; + listHolder_0->mList[2].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 4); + } + listHolder_0->mList[2].targets.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + + listHolder_3->mList[0].cluster.SetNonNull(); + listHolder_3->mList[0].cluster.Value() = 55UL; + listHolder_3->mList[0].endpoint.SetNonNull(); + listHolder_3->mList[0].endpoint.Value() = 66U; + listHolder_3->mList[0].deviceType.SetNull(); + + listHolder_0->mList[2].targets.Value() = + chip::app::DataModel::List(listHolder_3->mList, + 1); + } + listHolder_0->mList[2].fabricIndex = CurrentFabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 3); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); } case 4: { - LogStep(4, "TH reads optional attribute(VendorName) in AttributeList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasic::Id, - BridgedDeviceBasic::Attributes::AttributeList::Id, true, chip::NullOptional); + LogStep(4, "Step 5:TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, + chip::NullOptional); } case 5: { - LogStep(5, "TH reads optional attribute(VendorID) in AttributeList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasic::Id, - BridgedDeviceBasic::Attributes::AttributeList::Id, true, chip::NullOptional); + LogStep( + 5, + "Step 6:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of AccessControlEntryStruct " + "containing 3 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects field: [N1] " + "Targets field: null 2.struct Privilege field: Manage (4) AuthMode field: Group (3) Subjects field: [444, 333, " + "222, 111] Targets field: [{Cluster: 44}, {Endpoint: 33}] 3.struct Privilege field: Administer (5) AuthMode field: " + "CASE (2) Subjects field: [888, 777, 666, 555] Targets field: [{Cluster: 88}, {Endpoint: 77}]"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(3); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); + listHolder_0->mList[0].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; + + listHolder_0->mList[1].privilege = + static_cast(4); + listHolder_0->mList[1].authMode = + static_cast(3); + listHolder_0->mList[1].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(4); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = 444ULL; + listHolder_3->mList[1] = 333ULL; + listHolder_3->mList[2] = 222ULL; + listHolder_3->mList[3] = 111ULL; + listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 4); + } + listHolder_0->mList[1].targets.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + + listHolder_3->mList[0].cluster.SetNonNull(); + listHolder_3->mList[0].cluster.Value() = 44UL; + listHolder_3->mList[0].endpoint.SetNonNull(); + listHolder_3->mList[0].endpoint.Value() = 33U; + listHolder_3->mList[0].deviceType.SetNull(); + + listHolder_0->mList[1].targets.Value() = + chip::app::DataModel::List(listHolder_3->mList, + 1); + } + listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; + + listHolder_0->mList[2].privilege = + static_cast(5); + listHolder_0->mList[2].authMode = + static_cast(2); + listHolder_0->mList[2].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(4); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = 888ULL; + listHolder_3->mList[1] = 777ULL; + listHolder_3->mList[2] = 666ULL; + listHolder_3->mList[3] = 555ULL; + listHolder_0->mList[2].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 4); + } + listHolder_0->mList[2].targets.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + + listHolder_3->mList[0].cluster.SetNonNull(); + listHolder_3->mList[0].cluster.Value() = 88UL; + listHolder_3->mList[0].endpoint.SetNonNull(); + listHolder_3->mList[0].endpoint.Value() = 77U; + listHolder_3->mList[0].deviceType.SetNull(); + + listHolder_0->mList[2].targets.Value() = + chip::app::DataModel::List(listHolder_3->mList, + 1); + } + listHolder_0->mList[2].fabricIndex = CurrentFabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 3); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); } case 6: { - LogStep(6, "TH reads optional attribute(ProductName) in AttributeList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasic::Id, - BridgedDeviceBasic::Attributes::AttributeList::Id, true, chip::NullOptional); + LogStep(6, "Step 7:TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, + chip::NullOptional); + } + case 7: { + LogStep(7, + "Step 8:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of " + "AccessControlEntryStruct containing 3 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " + "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: View (1) AuthMode field: CASE (2) " + "Subjects field: [111, 222, 333, 444] Targets field: [{Cluster: 11, Endpoint: 22}, {Cluster: 33, DeviceType: " + "44}] 3.struct Privilege field: Operate (3) AuthMode field: Group (3) Subjects field: [555, 666, 777, 888] " + "Targets field: [{Cluster: 55, Endpoint: 66}, {Cluster: 77, DeviceType: 88}]"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(3); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); + listHolder_0->mList[0].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; + + listHolder_0->mList[1].privilege = + static_cast(1); + listHolder_0->mList[1].authMode = + static_cast(2); + listHolder_0->mList[1].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(4); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = 111ULL; + listHolder_3->mList[1] = 222ULL; + listHolder_3->mList[2] = 333ULL; + listHolder_3->mList[3] = 444ULL; + listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 4); + } + listHolder_0->mList[1].targets.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(2); + listFreer.add(listHolder_3); + + listHolder_3->mList[0].cluster.SetNonNull(); + listHolder_3->mList[0].cluster.Value() = 11UL; + listHolder_3->mList[0].endpoint.SetNonNull(); + listHolder_3->mList[0].endpoint.Value() = 22U; + listHolder_3->mList[0].deviceType.SetNull(); + + listHolder_3->mList[1].cluster.SetNonNull(); + listHolder_3->mList[1].cluster.Value() = 33UL; + listHolder_3->mList[1].endpoint.SetNull(); + listHolder_3->mList[1].deviceType.SetNonNull(); + listHolder_3->mList[1].deviceType.Value() = 44UL; + + listHolder_0->mList[1].targets.Value() = + chip::app::DataModel::List(listHolder_3->mList, + 2); + } + listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; + + listHolder_0->mList[2].privilege = + static_cast(3); + listHolder_0->mList[2].authMode = + static_cast(3); + listHolder_0->mList[2].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(4); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = 555ULL; + listHolder_3->mList[1] = 666ULL; + listHolder_3->mList[2] = 777ULL; + listHolder_3->mList[3] = 888ULL; + listHolder_0->mList[2].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 4); + } + listHolder_0->mList[2].targets.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(2); + listFreer.add(listHolder_3); + + listHolder_3->mList[0].cluster.SetNonNull(); + listHolder_3->mList[0].cluster.Value() = 55UL; + listHolder_3->mList[0].endpoint.SetNonNull(); + listHolder_3->mList[0].endpoint.Value() = 66U; + listHolder_3->mList[0].deviceType.SetNull(); + + listHolder_3->mList[1].cluster.SetNonNull(); + listHolder_3->mList[1].cluster.Value() = 77UL; + listHolder_3->mList[1].endpoint.SetNull(); + listHolder_3->mList[1].deviceType.SetNonNull(); + listHolder_3->mList[1].deviceType.Value() = 88UL; + + listHolder_0->mList[2].targets.Value() = + chip::app::DataModel::List(listHolder_3->mList, + 2); + } + listHolder_0->mList[2].fabricIndex = CurrentFabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 3); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 8: { + LogStep(8, "Step 9:TH1 reads AccessControl cluster ACL attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, + chip::NullOptional); + } + case 9: { + LogStep(9, + "Step 10:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of " + "AccessControlEntryStruct containing 3 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " + "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: View (1) AuthMode field: CASE (2) " + "Subjects field: null Targets field: [{Cluster: 11, Endpoint: 22}, {Cluster: 33, DeviceType: 44}] 3.struct " + "Privilege field: Operate (3) AuthMode field: Group (3) Subjects field: null Targets field: [{Cluster: 55, " + "Endpoint: 66}, {Cluster: 77, DeviceType: 88}]"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(3); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); + listHolder_0->mList[0].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; + + listHolder_0->mList[1].privilege = + static_cast(1); + listHolder_0->mList[1].authMode = + static_cast(2); + listHolder_0->mList[1].subjects.SetNull(); + listHolder_0->mList[1].targets.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(2); + listFreer.add(listHolder_3); + + listHolder_3->mList[0].cluster.SetNonNull(); + listHolder_3->mList[0].cluster.Value() = 11UL; + listHolder_3->mList[0].endpoint.SetNonNull(); + listHolder_3->mList[0].endpoint.Value() = 22U; + listHolder_3->mList[0].deviceType.SetNull(); + + listHolder_3->mList[1].cluster.SetNonNull(); + listHolder_3->mList[1].cluster.Value() = 33UL; + listHolder_3->mList[1].endpoint.SetNull(); + listHolder_3->mList[1].deviceType.SetNonNull(); + listHolder_3->mList[1].deviceType.Value() = 44UL; + + listHolder_0->mList[1].targets.Value() = + chip::app::DataModel::List(listHolder_3->mList, + 2); + } + listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; + + listHolder_0->mList[2].privilege = + static_cast(3); + listHolder_0->mList[2].authMode = + static_cast(3); + listHolder_0->mList[2].subjects.SetNull(); + listHolder_0->mList[2].targets.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(2); + listFreer.add(listHolder_3); + + listHolder_3->mList[0].cluster.SetNonNull(); + listHolder_3->mList[0].cluster.Value() = 55UL; + listHolder_3->mList[0].endpoint.SetNonNull(); + listHolder_3->mList[0].endpoint.Value() = 66U; + listHolder_3->mList[0].deviceType.SetNull(); + + listHolder_3->mList[1].cluster.SetNonNull(); + listHolder_3->mList[1].cluster.Value() = 77UL; + listHolder_3->mList[1].endpoint.SetNull(); + listHolder_3->mList[1].deviceType.SetNonNull(); + listHolder_3->mList[1].deviceType.Value() = 88UL; + + listHolder_0->mList[2].targets.Value() = + chip::app::DataModel::List(listHolder_3->mList, + 2); + } + listHolder_0->mList[2].fabricIndex = CurrentFabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 3); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 10: { + LogStep(10, "Step 11:TH1 reads AccessControl cluster ACL attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, + chip::NullOptional); + } + case 11: { + LogStep(11, + "Step 12:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of " + "AccessControlEntryStruct containing 3 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " + "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: View (1) AuthMode field: CASE (2) " + "Subjects field: [111, 222, 333, 444] Targets field: null 3.struct Privilege field: Operate (3) AuthMode " + "field: Group (3) Subjects field: [555, 666, 777, 888] Targets field: null"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(3); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); + listHolder_0->mList[0].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; + + listHolder_0->mList[1].privilege = + static_cast(1); + listHolder_0->mList[1].authMode = + static_cast(2); + listHolder_0->mList[1].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(4); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = 111ULL; + listHolder_3->mList[1] = 222ULL; + listHolder_3->mList[2] = 333ULL; + listHolder_3->mList[3] = 444ULL; + listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 4); + } + listHolder_0->mList[1].targets.SetNull(); + listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; + + listHolder_0->mList[2].privilege = + static_cast(3); + listHolder_0->mList[2].authMode = + static_cast(3); + listHolder_0->mList[2].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(4); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = 555ULL; + listHolder_3->mList[1] = 666ULL; + listHolder_3->mList[2] = 777ULL; + listHolder_3->mList[3] = 888ULL; + listHolder_0->mList[2].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 4); + } + listHolder_0->mList[2].targets.SetNull(); + listHolder_0->mList[2].fabricIndex = CurrentFabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 3); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 12: { + LogStep(12, "Step 13:TH1 reads AccessControl cluster ACL attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, + chip::NullOptional); + } + case 13: { + LogStep(13, + "Step 14:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of " + "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " + "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: Group (3) " + "Subjects field: null Targets field: null"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(2); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); + listHolder_0->mList[0].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; + + listHolder_0->mList[1].privilege = + static_cast(3); + listHolder_0->mList[1].authMode = + static_cast(3); + listHolder_0->mList[1].subjects.SetNull(); + listHolder_0->mList[1].targets.SetNull(); + listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 2); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 14: { + LogStep(14, "Step 15:TH1 reads AccessControl cluster ACL attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, + chip::NullOptional); + } + case 15: { + LogStep(15, + "Step 16:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of " + "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " + "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: ProxyView (2) AuthMode field: CASE (2) " + "Subjects field: null Targets field: null"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(2); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); + listHolder_0->mList[0].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; + + listHolder_0->mList[1].privilege = + static_cast(2); + listHolder_0->mList[1].authMode = + static_cast(2); + listHolder_0->mList[1].subjects.SetNull(); + listHolder_0->mList[1].targets.SetNull(); + listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 2); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 16: { + LogStep(16, "Step 17:TH1 reads AccessControl cluster ACL attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, + chip::NullOptional); + } + case 17: { + LogStep(17, "Step 18:TH1 reads DUT AccessControl cluster SubjectsPerAccessControlEntry attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, + AccessControl::Attributes::SubjectsPerAccessControlEntry::Id, true, chip::NullOptional); + } + case 18: { + LogStep(18, + "Step 19:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of " + "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " + "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) " + "Subjects field: list of MAXSUBJECTS random node IDs (stored as SUBJECTS) Targets field: null"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000 && PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 19: { + LogStep(19, "Step 20:TH1 reads AccessControl cluster ACL attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000 && PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 20: { + LogStep(20, + "Step 21:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of " + "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " + "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) " + "Subjects field: [CAT1, CAT2, CAT3, CAT4] Targets field: null"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(2); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); + listHolder_0->mList[0].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; + + listHolder_0->mList[1].privilege = + static_cast(3); + listHolder_0->mList[1].authMode = + static_cast(2); + listHolder_0->mList[1].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(4); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = mCat1.HasValue() ? mCat1.Value() : 65520ULL; + listHolder_3->mList[1] = mCat2.HasValue() ? mCat2.Value() : 65521ULL; + listHolder_3->mList[2] = mCat3.HasValue() ? mCat3.Value() : 65522ULL; + listHolder_3->mList[3] = mCat4.HasValue() ? mCat4.Value() : 65523ULL; + listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 4); + } + listHolder_0->mList[1].targets.SetNull(); + listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 2); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 21: { + LogStep(21, "Step 22:TH1 reads AccessControl cluster ACL attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, + chip::NullOptional); + } + case 22: { + LogStep(22, "Step 23:TH1 reads AccessControl cluster TargetsPerAccessControlEntry attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, + AccessControl::Attributes::TargetsPerAccessControlEntry::Id, true, chip::NullOptional); + } + case 23: { + LogStep(23, + "Step 24:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of " + "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " + "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) " + "Subjects field:null Targets field: list of MAXTARGETS targets {Cluster: random} (stored as TARGETS)"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000 && PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 24: { + LogStep(24, "Step 25:TH1 reads AccessControl cluster ACL attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000 && PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 25: { + LogStep(25, "Step 26:TH1 reads AccessControl cluster AccessControlEntriesPerFabric attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, + AccessControl::Attributes::AccessControlEntriesPerFabric::Id, true, chip::NullOptional); + } + case 26: { + LogStep(26, + "Step 27:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of " + "AccessControlEntryStruct containing MAXENTRIES elements 1.struct Privilege field: Administer (5) AuthMode " + "field: CASE (2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode " + "field: CASE (2) Subjects field: null Targets field: null subsequent elements same as second element"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(3); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); + listHolder_0->mList[0].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; + + listHolder_0->mList[1].privilege = + static_cast(3); + listHolder_0->mList[1].authMode = + static_cast(2); + listHolder_0->mList[1].subjects.SetNull(); + listHolder_0->mList[1].targets.SetNull(); + listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; + + listHolder_0->mList[2].privilege = + static_cast(3); + listHolder_0->mList[2].authMode = + static_cast(2); + listHolder_0->mList[2].subjects.SetNull(); + listHolder_0->mList[2].targets.SetNull(); + listHolder_0->mList[2].fabricIndex = CurrentFabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 3); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 27: { + LogStep(27, "Step 28:TH1 reads AccessControl cluster ACL attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, + chip::NullOptional); + } + case 28: { + LogStep(28, + "Step 29:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of " + "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " + "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: PASE (1) " + "Subjects field: null Targets field: null"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(2); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); + listHolder_0->mList[0].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; + + listHolder_0->mList[1].privilege = + static_cast(3); + listHolder_0->mList[1].authMode = + static_cast(1); + listHolder_0->mList[1].subjects.SetNull(); + listHolder_0->mList[1].targets.SetNull(); + listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 2); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 29: { + LogStep(29, "Step 30:TH1 reads AccessControl cluster ACL attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, + chip::NullOptional); + } + case 30: { + LogStep(30, + "Step 31:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of " + "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " + "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Administer (5) AuthMode field: Group " + "(3) Subjects field: null Targets field: null"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(2); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); + listHolder_0->mList[0].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; + + listHolder_0->mList[1].privilege = + static_cast(5); + listHolder_0->mList[1].authMode = + static_cast(3); + listHolder_0->mList[1].subjects.SetNull(); + listHolder_0->mList[1].targets.SetNull(); + listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 2); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 31: { + LogStep(31, + "Step 32:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of " + "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " + "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: invalid value (not 1-5) AuthMode " + "field: CASE (2) Subjects field: null Targets field: null"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(2); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); + listHolder_0->mList[0].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; + + listHolder_0->mList[1].privilege = + static_cast(6); + listHolder_0->mList[1].authMode = + static_cast(3); + listHolder_0->mList[1].subjects.SetNull(); + listHolder_0->mList[1].targets.SetNull(); + listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 2); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 32: { + LogStep(32, + "Step 33:TH1 writes AccessControl cluster ACL attribute, value is list of AccessControlEntryStruct containing " + "2 elements"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(2); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); + listHolder_0->mList[0].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; + + listHolder_0->mList[1].privilege = + static_cast(6); + listHolder_0->mList[1].authMode = + static_cast(4); + listHolder_0->mList[1].subjects.SetNull(); + listHolder_0->mList[1].targets.SetNull(); + listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 2); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 33: { + LogStep(33, + "Step 34:TH1 writes AccessControl cluster ACL attribute, value is list of AccessControlEntryStruct containing " + "2 elements"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(2); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); + listHolder_0->mList[0].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; + + listHolder_0->mList[1].privilege = + static_cast(3); + listHolder_0->mList[1].authMode = + static_cast(2); + listHolder_0->mList[1].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = 0ULL; + listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[1].targets.SetNull(); + listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 2); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 34: { + LogStep(34, + "Step 35:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value is list of " + "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " + "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) " + "Subjects field: [0xFFFFFFFFFFFFFFFF] Targets field: null"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(2); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); + listHolder_0->mList[0].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; + + listHolder_0->mList[1].privilege = + static_cast(3); + listHolder_0->mList[1].authMode = + static_cast(2); + listHolder_0->mList[1].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = 18446744073709551615ULL; + listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[1].targets.SetNull(); + listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 2); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 35: { + LogStep(35, + "Step 36:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value is list of " + "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " + "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) " + "Subjects field: [0xFFFFFFFD00000000] Targets field: null"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(2); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); + listHolder_0->mList[0].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; + + listHolder_0->mList[1].privilege = + static_cast(3); + listHolder_0->mList[1].authMode = + static_cast(2); + listHolder_0->mList[1].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = 18446744060824649728ULL; + listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[1].targets.SetNull(); + listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 2); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 36: { + LogStep(36, + "Step 37:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value is list of " + "AccessControlEntryStruct containing 2 elements struct Privilege field: Administer (5) AuthMode field: CASE " + "(2) Subjects field: [N1] Targets field: null struct Privilege field: Operate (3) AuthMode field: CASE (2) " + "Subjects field: [0xFFFFFFFFFFFF0000] Targets field: null"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(2); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); + listHolder_0->mList[0].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; + + listHolder_0->mList[1].privilege = + static_cast(3); + listHolder_0->mList[1].authMode = + static_cast(2); + listHolder_0->mList[1].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = 18446744073709486080ULL; + listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[1].targets.SetNull(); + listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 2); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 37: { + LogStep(37, + "Step 38:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value is list of " + "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " + "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) " + "Subjects field: null Targets field: [{}]"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(2); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); + listHolder_0->mList[0].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; + + listHolder_0->mList[1].privilege = + static_cast(3); + listHolder_0->mList[1].authMode = + static_cast(2); + listHolder_0->mList[1].subjects.SetNull(); + listHolder_0->mList[1].targets.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + + listHolder_3->mList[0].cluster.SetNull(); + listHolder_3->mList[0].endpoint.SetNull(); + listHolder_3->mList[0].deviceType.SetNull(); + + listHolder_0->mList[1].targets.Value() = + chip::app::DataModel::List(listHolder_3->mList, + 1); + } + listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 2); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 38: { + LogStep(38, + "Step 39:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value is list of " + "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " + "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) " + "Subjects field: null Targets field: [{Cluster: 0xFFFFFFFF}]"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(2); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); + listHolder_0->mList[0].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; + + listHolder_0->mList[1].privilege = + static_cast(3); + listHolder_0->mList[1].authMode = + static_cast(2); + listHolder_0->mList[1].subjects.SetNull(); + listHolder_0->mList[1].targets.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + + listHolder_3->mList[0].cluster.SetNonNull(); + listHolder_3->mList[0].cluster.Value() = 4294967295UL; + listHolder_3->mList[0].endpoint.SetNull(); + listHolder_3->mList[0].deviceType.SetNull(); + + listHolder_0->mList[1].targets.Value() = + chip::app::DataModel::List(listHolder_3->mList, + 1); + } + listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 2); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 39: { + LogStep(39, + "Step 40:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value is list of " + "AccessControlEntryStruct containing 2 elements 1. struct Privilege field: Administer (5) AuthMode field: " + "CASE (2) Subjects field: [N1] Targets field: null 2. struct Privilege field: Operate (3) AuthMode field: " + "CASE (2) Subjects field: null Targets field: [{Endpoint: 65535}]"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(2); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); + listHolder_0->mList[0].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; + + listHolder_0->mList[1].privilege = + static_cast(3); + listHolder_0->mList[1].authMode = + static_cast(2); + listHolder_0->mList[1].subjects.SetNull(); + listHolder_0->mList[1].targets.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + + listHolder_3->mList[0].cluster.SetNull(); + listHolder_3->mList[0].endpoint.SetNonNull(); + listHolder_3->mList[0].endpoint.Value() = 65535U; + listHolder_3->mList[0].deviceType.SetNull(); + + listHolder_0->mList[1].targets.Value() = + chip::app::DataModel::List(listHolder_3->mList, + 1); + } + listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 2); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 40: { + LogStep(40, + "Step 41:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value is list of " + "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " + "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) " + "Subjects field: null Targets field: [{DeviceType: 0xFFFFFFFF}]"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(2); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); + listHolder_0->mList[0].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; + + listHolder_0->mList[1].privilege = + static_cast(3); + listHolder_0->mList[1].authMode = + static_cast(2); + listHolder_0->mList[1].subjects.SetNull(); + listHolder_0->mList[1].targets.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + + listHolder_3->mList[0].cluster.SetNull(); + listHolder_3->mList[0].endpoint.SetNull(); + listHolder_3->mList[0].deviceType.SetNonNull(); + listHolder_3->mList[0].deviceType.Value() = 4294967295UL; + + listHolder_0->mList[1].targets.Value() = + chip::app::DataModel::List(listHolder_3->mList, + 1); + } + listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 2); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 41: { + LogStep(41, + "Step 42:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value is list of " + "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " + "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) " + "Subjects field: null Targets field: [{Endpoint: 22, DeviceType: 33}]"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(2); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); + listHolder_0->mList[0].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; + + listHolder_0->mList[1].privilege = + static_cast(3); + listHolder_0->mList[1].authMode = + static_cast(2); + listHolder_0->mList[1].subjects.SetNull(); + listHolder_0->mList[1].targets.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + + listHolder_3->mList[0].cluster.SetNull(); + listHolder_3->mList[0].endpoint.SetNonNull(); + listHolder_3->mList[0].endpoint.Value() = 22U; + listHolder_3->mList[0].deviceType.SetNonNull(); + listHolder_3->mList[0].deviceType.Value() = 33UL; + + listHolder_0->mList[1].targets.Value() = + chip::app::DataModel::List(listHolder_3->mList, + 1); + } + listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 2); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 42: { + LogStep(42, + "Step 43:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value is list of " + "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " + "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) " + "Subjects field: null Targets field: [{Cluster: 11, Endpoint: 22, DeviceType: 33}]"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(2); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); + listHolder_0->mList[0].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; + + listHolder_0->mList[1].privilege = + static_cast(3); + listHolder_0->mList[1].authMode = + static_cast(2); + listHolder_0->mList[1].subjects.SetNull(); + listHolder_0->mList[1].targets.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + + listHolder_3->mList[0].cluster.SetNonNull(); + listHolder_3->mList[0].cluster.Value() = 11UL; + listHolder_3->mList[0].endpoint.SetNonNull(); + listHolder_3->mList[0].endpoint.Value() = 22U; + listHolder_3->mList[0].deviceType.SetNonNull(); + listHolder_3->mList[0].deviceType.Value() = 33UL; + + listHolder_0->mList[1].targets.Value() = + chip::app::DataModel::List(listHolder_3->mList, + 1); + } + listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 2); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 43: { + LogStep(43, "Step 44:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value is an empty list"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + value = chip::app::DataModel::List(); + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_ACL_2_7Suite : public TestCommand +{ +public: + Test_TC_ACL_2_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_7", 12, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); + AddArgument("TH1CommissionerNodeId", 0, UINT64_MAX, &mTH1CommissionerNodeId); + AddArgument("TH2CommissionerNodeId", 0, UINT64_MAX, &mTH2CommissionerNodeId); + AddArgument("payload", &mPayload); + AddArgument("D_OK_EMPTY", &mDOkEmpty); + AddArgument("D_OK_SINGLE", &mDOkSingle); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_ACL_2_7Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mNodeId2; + chip::Optional mTH1CommissionerNodeId; + chip::Optional mTH2CommissionerNodeId; + chip::Optional mPayload; + chip::Optional mDOkEmpty; + chip::Optional mDOkSingle; + chip::Optional mTimeout; + + uint8_t TH1FabricIndex; + uint8_t TH2FabricIndex; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + TH1FabricIndex = value; + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + TH2FabricIndex = value; + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("extension", iter_0, 0)); + VerifyOrReturn(CheckValueAsString( + "extension[0].data", iter_0.GetValue().data, + mDOkEmpty.HasValue() ? mDOkEmpty.Value() : chip::ByteSpan(chip::Uint8::from_const_char("\x17\x18"), 2))); + VerifyOrReturn(CheckValue("extension[0].fabricIndex", iter_0.GetValue().fabricIndex, TH1FabricIndex)); + VerifyOrReturn(CheckNoMoreListItems("extension", iter_0, 1)); + } + } + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("extension", iter_0, 0)); + VerifyOrReturn(CheckValueAsString( + "extension[0].data", iter_0.GetValue().data, + mDOkSingle.HasValue() + ? mDOkSingle.Value() + : chip::ByteSpan(chip::Uint8::from_const_char( + "\x17\xD0\x00\x00\xF1\xFF\x01\x00\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64" + "\x2E\x20\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65" + "\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69\x76\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63" + "\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18"), + 71))); + VerifyOrReturn(CheckValue("extension[0].fabricIndex", iter_0.GetValue().fabricIndex, TH2FabricIndex)); + VerifyOrReturn(CheckNoMoreListItems("extension", iter_0, 1)); + } + } + break; + case 10: + switch (mTestSubStepIndex) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::AccessControl::Events::AccessControlExtensionChanged::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + } + mTestSubStepIndex++; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + break; + } + break; + case 11: + switch (mTestSubStepIndex) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::AccessControl::Events::AccessControlExtensionChanged::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + } + mTestSubStepIndex++; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + break; + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Step 1:Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Step 2:TH1 reads OperationalCredentials cluster CurrentFabricIndex attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "Step 3:TH1 puts DUT into commissioning mode, TH2 commissions DUT using admin node ID N2"); + ListFreer listFreer; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, + chip::Optional(10000), chip::NullOptional + + ); + } + case 3: { + LogStep(3, "Step 4:TH2 starts a commissioning process with DUT"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 4: { + LogStep(4, "DUT is commissioned by TH2 on Fabric ID2 "); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + return WaitForCommissionee(kIdentityBeta, value); + } + case 5: { + LogStep(5, "Step 5:TH2 reads OperationalCredentials cluster CurrentFabricIndex attribute"); + return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, + "Step 6:TH1 writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " + "AccessControlExtensionStruct containing 1 element"); + VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(1); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].data = + mDOkEmpty.HasValue() ? mDOkEmpty.Value() : chip::ByteSpan(chip::Uint8::from_const_char("\x17\x18"), 2); + listHolder_0->mList[0].fabricIndex = TH1FabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 1); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, + value, chip::NullOptional, chip::NullOptional); + } + case 7: { + LogStep(7, + "Step 7:TH2 writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " + "AccessControlExtensionStruct containing 1 element"); + VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(1); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].data = mDOkSingle.HasValue() + ? mDOkSingle.Value() + : chip::ByteSpan( + chip::Uint8::from_const_char( + "\x17\xD0\x00\x00\xF1\xFF\x01\x00\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20\x54\x68\x69" + "\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69\x76" + "\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18"), + 71); + listHolder_0->mList[0].fabricIndex = TH2FabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 1); + } + return WriteAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 8: { + LogStep(8, "Step 8:TH1 reads AccessControl cluster Extension attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, true, + chip::NullOptional); + } + case 9: { + LogStep(9, "Step 9:TH2 reads AccessControl cluster Extension attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, true, + chip::NullOptional); + } + case 10: { + LogStep(10, "Step 10:TH1 reads DUT Endpoint 0 AccessControl cluster AccessControlExtensionChanged event"); + VerifyOrDo(!ShouldSkip("ACL.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + mTestSubStepCount = 1; + return ReadEvent(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, + AccessControl::Events::AccessControlExtensionChanged::Id, false, chip::NullOptional); + } + case 11: { + LogStep(11, "Step 11:TH2 reads DUT Endpoint 0 AccessControl cluster AccessControlExtensionChanged event"); + VerifyOrDo(!ShouldSkip("ACL.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + mTestSubStepCount = 1; + return ReadEvent(kIdentityBeta, GetEndpoint(0), AccessControl::Id, + AccessControl::Events::AccessControlExtensionChanged::Id, false, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_ACL_2_9Suite : public TestCommand +{ +public: + Test_TC_ACL_2_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_9", 12, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); + AddArgument("CommissionerNodeId", 0, UINT64_MAX, &mCommissionerNodeId); + AddArgument("payload", &mPayload); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_ACL_2_9Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mNodeId2; + chip::Optional mCommissionerNodeId; + chip::Optional mPayload; + chip::Optional mTimeout; + + uint8_t CurrentFabricIndex; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + CurrentFabricIndex = value; + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 4U)); + } + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 3U)); + } + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 3U)); + } + break; + case 10: + switch (mTestSubStepIndex) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); + mTestSubStepIndex++; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + break; + } + break; + case 11: + switch (mTestSubStepIndex) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); + mTestSubStepIndex++; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + break; + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Step 1:Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH1 reads OperationalCredentials cluster CurrentFabricIndex attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "Step 2:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(1); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = + static_cast(4); + listHolder_0->mList[0].authMode = + static_cast(2); + listHolder_0->mList[0].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 1); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 3: { + LogStep(3, "Step 3:TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, + chip::NullOptional); + } + case 4: { + LogStep(4, "Step 4:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(1); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); + listHolder_0->mList[0].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 1); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 5: { + LogStep(5, "Step 5:TH1 reads DUT Endpoint 0 AccessControl cluster Extension attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, true, + chip::NullOptional); + } + case 6: { + LogStep(6, "Step 6:TH1 writes DUT Endpoint 0 AccessControl cluster Extension attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + value = chip::app::DataModel::List(); + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, + value, chip::NullOptional, chip::NullOptional); + } + case 7: { + LogStep(7, "Step 7:TH1 reads DUT Endpoint 0 AccessControl cluster SubjectsPerAccessControlEntry attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, + AccessControl::Attributes::SubjectsPerAccessControlEntry::Id, true, chip::NullOptional); + } + case 8: { + LogStep(8, "Step 8:TH1 reads DUT Endpoint 0 AccessControl cluster TargetsPerAccessControlEntry attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, + AccessControl::Attributes::TargetsPerAccessControlEntry::Id, true, chip::NullOptional); + } + case 9: { + LogStep(9, "Step 9:TH1 reads DUT Endpoint 0 AccessControl cluster AccessControlEntriesPerFabric attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, + AccessControl::Attributes::AccessControlEntriesPerFabric::Id, true, chip::NullOptional); + } + case 10: { + LogStep(10, "TH1 reads DUT Endpoint 0 AccessControl cluster AccessControlEntryChanged event"); + VerifyOrDo(!ShouldSkip("ACL.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + mTestSubStepCount = 1; + return ReadEvent(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, + AccessControl::Events::AccessControlEntryChanged::Id, false, chip::NullOptional); + } + case 11: { + LogStep(11, "TH1 reads DUT Endpoint 0 AccessControl cluster AccessControlExtensionChanged event"); + VerifyOrDo(!ShouldSkip("ACL.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + mTestSubStepCount = 1; + return ReadEvent(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, + AccessControl::Events::AccessControlExtensionChanged::Id, false, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_BOOL_1_1Suite : public TestCommand +{ +public: + Test_TC_BOOL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BOOL_1_1", 6, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_BOOL_1_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + } + break; + case 3: + 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")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "read the global attribute: ClusterRevision"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::ClusterRevision::Id, + true, chip::NullOptional); + } + case 2: { + LogStep(2, "Read the global attribute: FeatureMap"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::FeatureMap::Id, true, + chip::NullOptional); + } + case 3: { + LogStep(3, "Read the global attribute: AttributeList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 4: { + LogStep(4, "Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, + BooleanState::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 5: { + LogStep(5, "Read the global attribute: GeneratedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, + BooleanState::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_BOOL_2_1Suite : public TestCommand +{ +public: + Test_TC_BOOL_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BOOL_2_1", 2, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_BOOL_2_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + bool value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Read mandatory non-global attribute: StateValue"); + VerifyOrDo(!ShouldSkip("BOOL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::StateValue::Id, true, + chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_BRBINFO_1_1Suite : public TestCommand +{ +public: + Test_TC_BRBINFO_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_BRBINFO_1_1", 20, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_BRBINFO_1_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + } + break; + case 3: + 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")); + VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 4: + 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")); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + } + break; + case 5: + 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")); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + } + break; + case 6: + 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")); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + } + break; + case 7: + 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")); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + } + break; + case 8: + 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")); + VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); + } + break; + case 9: + 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")); + VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); + } + break; + case 10: + 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")); + VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); + } + break; + case 11: + 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")); + VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); + } + break; + case 12: + 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")); + VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); + } + break; + case 13: + 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")); + VerifyOrReturn(CheckConstraintContains("value", value, 12UL)); + } + break; + case 14: + 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")); + VerifyOrReturn(CheckConstraintContains("value", value, 13UL)); + } + break; + case 15: + 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")); + VerifyOrReturn(CheckConstraintContains("value", value, 14UL)); + } + break; + case 16: + 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")); + VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); + } + break; + case 17: + 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")); + VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); + } + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH reads the ClusterRevision from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasic::Id, + BridgedDeviceBasic::Attributes::ClusterRevision::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "TH reads the FeatureMap from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasic::Id, + BridgedDeviceBasic::Attributes::FeatureMap::Id, true, chip::NullOptional); + } + case 3: { + LogStep(3, "TH reads AttributeList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasic::Id, + BridgedDeviceBasic::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads optional attribute(VendorName) in AttributeList"); + VerifyOrDo(!ShouldSkip("BRBINFO.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasic::Id, + BridgedDeviceBasic::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 5: { + LogStep(5, "TH reads optional attribute(VendorID) in AttributeList"); + VerifyOrDo(!ShouldSkip("BRBINFO.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasic::Id, + BridgedDeviceBasic::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, "TH reads optional attribute(ProductName) in AttributeList"); + VerifyOrDo(!ShouldSkip("BRBINFO.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasic::Id, + BridgedDeviceBasic::Attributes::AttributeList::Id, true, chip::NullOptional); } case 7: { LogStep(7, "TH reads optional attribute(NodeLabel) in AttributeList"); @@ -22854,38 +25886,220 @@ class Test_TC_LCFG_1_1Suite : public TestCommand } case 1: { LogStep(1, "TH reads the ClusterRevision from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), LocalizationConfiguration::Id, - LocalizationConfiguration::Attributes::ClusterRevision::Id, true, chip::NullOptional); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), LocalizationConfiguration::Id, + LocalizationConfiguration::Attributes::ClusterRevision::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "TH reads the FeatureMap from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), LocalizationConfiguration::Id, + LocalizationConfiguration::Attributes::FeatureMap::Id, true, chip::NullOptional); + } + case 3: { + LogStep(3, "TH reads AttributeList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), LocalizationConfiguration::Id, + LocalizationConfiguration::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads AcceptedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), LocalizationConfiguration::Id, + LocalizationConfiguration::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 5: { + LogStep(5, "TH reads GeneratedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), LocalizationConfiguration::Id, + LocalizationConfiguration::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_LUNIT_1_2Suite : public TestCommand +{ +public: + Test_TC_LUNIT_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LUNIT_1_2", 8, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_LUNIT_1_2Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); + } + break; + case 4: + 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")); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 5: + 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")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH reads the ClusterRevision from DUT"); + VerifyOrDo(!ShouldSkip("LUNIT.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { LogStep(2, "TH reads the FeatureMap from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), LocalizationConfiguration::Id, - LocalizationConfiguration::Attributes::FeatureMap::Id, true, chip::NullOptional); + VerifyOrDo(!ShouldSkip("LUNIT.S.Afffc && !LUNIT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, UnitLocalization::Attributes::FeatureMap::Id, + true, chip::NullOptional); } case 3: { - LogStep(3, "TH reads AttributeList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), LocalizationConfiguration::Id, - LocalizationConfiguration::Attributes::AttributeList::Id, true, chip::NullOptional); + LogStep(3, "Given LUNIT.S.F00(TEMP) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("LUNIT.S.Afffc && LUNIT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, UnitLocalization::Attributes::FeatureMap::Id, + true, chip::NullOptional); } case 4: { - LogStep(4, "TH reads AcceptedCommandList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), LocalizationConfiguration::Id, - LocalizationConfiguration::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + LogStep(4, "TH reads AttributeList from DUT"); + VerifyOrDo(!ShouldSkip("LUNIT.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "TH reads GeneratedCommandList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), LocalizationConfiguration::Id, - LocalizationConfiguration::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + LogStep(5, "TH reads Feature dependent(LUNIT.S.F00) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("LUNIT.S.Afffb && LUNIT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, "TH reads AcceptedCommandList from DUT"); + VerifyOrDo(!ShouldSkip("LUNIT.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 7: { + LogStep(7, "TH reads GeneratedCommandList from DUT"); + VerifyOrDo(!ShouldSkip("LUNIT.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } } return CHIP_NO_ERROR; } }; -class Test_TC_LUNIT_1_2Suite : public TestCommand +class Test_TC_LUNIT_3_1Suite : public TestCommand { public: - Test_TC_LUNIT_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LUNIT_1_2", 8, credsIssuerConfig) + Test_TC_LUNIT_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LUNIT_3_1", 9, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -22893,7 +26107,7 @@ class Test_TC_LUNIT_1_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_LUNIT_1_2Suite() {} + ~Test_TC_LUNIT_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -22925,76 +26139,47 @@ class Test_TC_LUNIT_1_2Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + chip::app::Clusters::UnitLocalization::TempUnit value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint32_t value; + chip::app::Clusters::UnitLocalization::TempUnit value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); + VerifyOrReturn(CheckValue("temperatureUnit", value, 0U)); } break; case 4: 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")); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::Clusters::UnitLocalization::TempUnit value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckValue("temperatureUnit", value, 1U)); } break; case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } break; case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::Clusters::UnitLocalization::TempUnit value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckValue("temperatureUnit", value, 2U)); } break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -23018,46 +26203,64 @@ class Test_TC_LUNIT_1_2Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "TH reads the ClusterRevision from DUT"); - VerifyOrDo(!ShouldSkip("LUNIT.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(1, "TH reads TemperatureUnit attribute from DUT"); + VerifyOrDo(!ShouldSkip("LUNIT.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::ClusterRevision::Id, true, chip::NullOptional); + UnitLocalization::Attributes::TemperatureUnit::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "TH reads the FeatureMap from DUT"); - VerifyOrDo(!ShouldSkip("LUNIT.S.Afffc && !LUNIT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, UnitLocalization::Attributes::FeatureMap::Id, - true, chip::NullOptional); + LogStep(2, "TH writes 0 (Fahrenheit) to TemperatureUnit attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Fahrenheit"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::UnitLocalization::TempUnit value; + value = static_cast(0); + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::TemperatureUnit::Id, value, chip::NullOptional, chip::NullOptional); } case 3: { - LogStep(3, "Given LUNIT.S.F00(TEMP) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("LUNIT.S.Afffc && LUNIT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, UnitLocalization::Attributes::FeatureMap::Id, - true, chip::NullOptional); + LogStep(3, "TH reads TemperatureUnit attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Fahrenheit"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::TemperatureUnit::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "TH reads AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("LUNIT.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::AttributeList::Id, true, chip::NullOptional); + LogStep(4, "TH writes 1 (Celsius) to TemperatureUnit attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Celsius"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::UnitLocalization::TempUnit value; + value = static_cast(1); + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::TemperatureUnit::Id, value, chip::NullOptional, chip::NullOptional); } case 5: { - LogStep(5, "TH reads Feature dependent(LUNIT.S.F00) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("LUNIT.S.Afffb && LUNIT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "TH reads TemperatureUnit attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Celsius"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::AttributeList::Id, true, chip::NullOptional); + UnitLocalization::Attributes::TemperatureUnit::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "TH reads AcceptedCommandList from DUT"); - VerifyOrDo(!ShouldSkip("LUNIT.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + LogStep(6, "TH writes 2 (Kelvin) to TemperatureUnit attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Kelvin"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::UnitLocalization::TempUnit value; + value = static_cast(2); + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::TemperatureUnit::Id, value, chip::NullOptional, chip::NullOptional); } case 7: { - LogStep(7, "TH reads GeneratedCommandList from DUT"); - VerifyOrDo(!ShouldSkip("LUNIT.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "TH reads TemperatureUnit attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Kelvin"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + UnitLocalization::Attributes::TemperatureUnit::Id, true, chip::NullOptional); + } + case 8: { + LogStep(8, "TH writes 5 to TemperatureUnit attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::UnitLocalization::TempUnit value; + value = static_cast(5); + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::TemperatureUnit::Id, value, chip::NullOptional, chip::NullOptional); } } return CHIP_NO_ERROR; @@ -30469,6 +33672,105 @@ class Test_TC_OCC_2_1Suite : public TestCommand } }; +class Test_TC_OCC_2_3Suite : public TestCommand +{ +public: + Test_TC_OCC_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OCC_2_3", 3, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_OCC_2_3Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 7U)); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Reads mandatory attribute constrains: OccupancySensorType"); + VerifyOrDo(!ShouldSkip("OCC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, + OccupancySensing::Attributes::OccupancySensorType::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "Reads mandatory attribute constrains: OccupancySensorTypeBitmap"); + VerifyOrDo(!ShouldSkip("OCC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, + OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id, true, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + class Test_TC_OO_1_1Suite : public TestCommand { public: @@ -96478,217 +99780,6 @@ class Test_TC_FLW_2_2Suite : public TestCommand } }; -class Test_TC_OCC_2_2Suite : public TestCommand -{ -public: - Test_TC_OCC_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OCC_2_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OCC_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OCC_2_3Suite : public TestCommand -{ -public: - Test_TC_OCC_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OCC_2_3", 3, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OCC_2_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 7U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Reads mandatory attribute constrains: OccupancySensorType"); - VerifyOrDo(!ShouldSkip("OCC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::OccupancySensorType::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Reads mandatory attribute constrains: OccupancySensorTypeBitmap"); - VerifyOrDo(!ShouldSkip("OCC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OCC_2_4Suite : public TestCommand -{ -public: - Test_TC_OCC_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OCC_2_4", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OCC_2_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - class Test_TC_OCC_3_1Suite : public TestCommand { public: @@ -101478,62 +104569,6 @@ class Test_TC_LCFG_2_1Suite : public TestCommand } }; -class Test_TC_LCFG_3_1Suite : public TestCommand -{ -public: - Test_TC_LCFG_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LCFG_3_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LCFG_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - class Test_TC_LVL_2_3Suite : public TestCommand { public: @@ -103273,790 +106308,270 @@ class Test_TC_OO_2_3Suite : public TestCommand case 96: { LogStep(96, "Wait 10000ms"); ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 97: { - LogStep(97, "19b:Sends OnWithTimedOff command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type value; - value.onOffControl = static_cast>(0U); - value.onTime = 300U; - value.offWaitTime = 300U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id, value, - chip::NullOptional - - ); - } - case 98: { - LogStep(98, "Wait 10000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 99: { - LogStep(99, "19c:Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 100: { - LogStep(100, "19c:Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4001 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 101: { - LogStep(101, "19c:Reads OffWaitTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4002 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, - chip::NullOptional); - } - case 102: { - LogStep(102, "20a:Send Off Command"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 103: { - LogStep(103, "20b:Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000 && OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 104: { - LogStep(104, "20b:Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4001 && OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 105: { - LogStep(105, "20b:Reads OffWaitTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4002 && OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, - chip::NullOptional); - } - case 106: { - LogStep(106, "21a:Sends OnWithTimedOff command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type value; - value.onOffControl = static_cast>(0U); - value.onTime = 300U; - value.offWaitTime = 300U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id, value, - chip::NullOptional - - ); - } - case 107: { - LogStep(107, "Wait 10000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 108: { - LogStep(108, "21b:Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 109: { - LogStep(109, "21b:Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4001 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 110: { - LogStep(110, "21b:Reads OffWaitTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4002 && PICS_SKIP_SAMPLE_APP && OO.S.C42.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, - chip::NullOptional); - } - case 111: { - LogStep(111, "22a:Send On Command"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 112: { - LogStep(112, "22b:Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000 && OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 113: { - LogStep(113, "22b:Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4001 && OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 114: { - LogStep(114, "22b:Reads OffWaitTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4002 && OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, - chip::NullOptional); - } - case 115: { - LogStep(115, "Wait 10000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 116: { - LogStep(116, "23a:Sends OnWithTimedOff command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type value; - value.onOffControl = static_cast>(0U); - value.onTime = 300U; - value.offWaitTime = 300U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id, value, - chip::NullOptional - - ); - } - case 117: { - LogStep(117, "23b:Send Off Command"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 118: { - LogStep(118, "23c:Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000 && OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 119: { - LogStep(119, "23c:Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4001 && OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 120: { - LogStep(120, "23c:Reads OffWaitTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4002 && OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, - chip::NullOptional); - } - case 121: { - LogStep(121, "Wait 40000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 40000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 122: { - LogStep(122, "23d:Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000 && OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 123: { - LogStep(123, "23d:Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4001 && OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 124: { - LogStep(124, "23d:Reads OffWaitTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4002 && OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, - chip::NullOptional); - } - case 125: { - LogStep(125, "24a:Sends OnWithTimedOff command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type value; - value.onOffControl = static_cast>(0U); - value.onTime = 300U; - value.offWaitTime = 300U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id, value, - chip::NullOptional - - ); - } - case 126: { - LogStep(126, "24b:Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 127: { - LogStep(127, "24b:Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4001 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 128: { - LogStep(128, "24b:Reads OffWaitTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4002 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, - chip::NullOptional); - } - case 129: { - LogStep(129, "Wait 40000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 40000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 130: { - LogStep(130, "24c:Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 131: { - LogStep(131, "24c:Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 132: { - LogStep(132, "24c:Reads OffWaitTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OO_3_1Suite : public TestCommand -{ -public: - Test_TC_OO_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OO_3_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OO_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OO_3_2Suite : public TestCommand -{ -public: - Test_TC_OO_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OO_3_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OO_3_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_RH_2_2Suite : public TestCommand -{ -public: - Test_TC_RH_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_RH_2_2", 6, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_RH_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::app::DataModel::Nullable ValueBeforeChange; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 9999U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); - ValueBeforeChange = value; - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintNotValue("value", value, ValueBeforeChange)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); } + case 97: { + LogStep(97, "19b:Sends OnWithTimedOff command to DUT"); + VerifyOrDo(!ShouldSkip("OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type value; + value.onOffControl = static_cast>(0U); + value.onTime = 300U; + value.offWaitTime = 300U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id, value, + chip::NullOptional - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); + ); } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); + case 98: { + LogStep(98, "Wait 10000ms"); ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); } - case 1: { - LogStep(1, "Reads constraints of attribute: MinMeasuredValue"); - VerifyOrDo(!ShouldSkip("RH.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); + case 99: { + LogStep(99, "19c:Reads OnOff attribute from DUT"); + VerifyOrDo(!ShouldSkip("OO.S.A0000 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } - case 2: { - LogStep(2, "Reads constraints of attribute: MaxMeasuredValue"); - VerifyOrDo(!ShouldSkip("RH.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); + case 100: { + LogStep(100, "19c:Reads OnTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("OO.S.A4001 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, + chip::NullOptional); } - case 3: { - LogStep(3, "Reads MeasuredValue attribute from DUT"); - VerifyOrDo(!ShouldSkip("RH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); + case 101: { + LogStep(101, "19c:Reads OffWaitTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("OO.S.A4002 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, + chip::NullOptional); } - case 4: { - LogStep(4, "Operate on device to change the relative humidity significantly"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && RH.M.ManuallyControlled"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 102: { + LogStep(102, "20a:Send Off Command"); + VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - 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(kIdentityAlpha, value); + chip::app::Clusters::OnOff::Commands::Off::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional + + ); } - case 5: { - LogStep(5, "Read the mandatory attribute: MeasuredValue"); - VerifyOrDo(!ShouldSkip("RH.S.A0000 && RH.M.ManuallyControlled"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); + case 103: { + LogStep(103, "20b:Reads OnOff attribute from DUT"); + VerifyOrDo(!ShouldSkip("OO.S.A0000 && OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } + case 104: { + LogStep(104, "20b:Reads OnTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("OO.S.A4001 && OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, + chip::NullOptional); } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SWTCH_2_2Suite : public TestCommand -{ -public: - Test_TC_SWTCH_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_2_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SWTCH_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + case 105: { + LogStep(105, "20b:Reads OffWaitTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("OO.S.A4002 && OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, + chip::NullOptional); } + case 106: { + LogStep(106, "21a:Sends OnWithTimedOff command to DUT"); + VerifyOrDo(!ShouldSkip("OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type value; + value.onOffControl = static_cast>(0U); + value.onTime = 300U; + value.offWaitTime = 300U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id, value, + chip::NullOptional - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); + ); } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { + case 107: { + LogStep(107, "Wait 10000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SWTCH_3_2Suite : public TestCommand -{ -public: - Test_TC_SWTCH_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_3_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SWTCH_3_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + case 108: { + LogStep(108, "21b:Reads OnOff attribute from DUT"); + VerifyOrDo(!ShouldSkip("OO.S.A0000 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); + case 109: { + LogStep(109, "21b:Reads OnTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("OO.S.A4001 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, + chip::NullOptional); } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { + case 110: { + LogStep(110, "21b:Reads OffWaitTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("OO.S.A4002 && PICS_SKIP_SAMPLE_APP && OO.S.C42.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, + chip::NullOptional); } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TMP_2_2Suite : public TestCommand -{ -public: - Test_TC_TMP_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TMP_2_2", 6, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_TMP_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::app::DataModel::Nullable valueBeforeChange; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; + case 111: { + LogStep(111, "22a:Send On Command"); + VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::On::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32766)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - valueBeforeChange = value; - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - VerifyOrReturn(CheckConstraintNotValue("value", value, valueBeforeChange)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + ); + } + case 112: { + LogStep(112, "22b:Reads OnOff attribute from DUT"); + VerifyOrDo(!ShouldSkip("OO.S.A0000 && OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); + } + case 113: { + LogStep(113, "22b:Reads OnTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("OO.S.A4001 && OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, + chip::NullOptional); + } + case 114: { + LogStep(114, "22b:Reads OffWaitTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("OO.S.A4002 && OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, + chip::NullOptional); + } + case 115: { + LogStep(115, "Wait 10000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); } + case 116: { + LogStep(116, "23a:Sends OnWithTimedOff command to DUT"); + VerifyOrDo(!ShouldSkip("OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type value; + value.onOffControl = static_cast>(0U); + value.onTime = 300U; + value.offWaitTime = 300U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id, value, + chip::NullOptional - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); + ); } - } + case 117: { + LogStep(117, "23b:Send Off Command"); + VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::Off::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); + ); + } + case 118: { + LogStep(118, "23c:Reads OnOff attribute from DUT"); + VerifyOrDo(!ShouldSkip("OO.S.A0000 && OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); + } + case 119: { + LogStep(119, "23c:Reads OnTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("OO.S.A4001 && OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, + chip::NullOptional); + } + case 120: { + LogStep(120, "23c:Reads OffWaitTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("OO.S.A4002 && OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, + chip::NullOptional); + } + case 121: { + LogStep(121, "Wait 40000ms"); ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 40000UL; + return WaitForMs(kIdentityAlpha, value); } - case 1: { - LogStep(1, "Read the mandatory attribute: MinMeasuredValue"); - VerifyOrDo(!ShouldSkip("TMP.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); + case 122: { + LogStep(122, "23d:Reads OnOff attribute from DUT"); + VerifyOrDo(!ShouldSkip("OO.S.A0000 && OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } - case 2: { - LogStep(2, "Read the mandatory attribute: MaxMeasuredValue"); - VerifyOrDo(!ShouldSkip("TMP.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); + case 123: { + LogStep(123, "23d:Reads OnTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("OO.S.A4001 && OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, + chip::NullOptional); } - case 3: { - LogStep(3, "Reads MeasuredValue attribute from DUT"); - VerifyOrDo(!ShouldSkip("TMP.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); + case 124: { + LogStep(124, "23d:Reads OffWaitTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("OO.S.A4002 && OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, + chip::NullOptional); } - case 4: { - LogStep(4, "Operate on device to change the temperature significantly"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TMP.M.ManuallyControlled"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 125: { + LogStep(125, "24a:Sends OnWithTimedOff command to DUT"); + VerifyOrDo(!ShouldSkip("OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - 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(kIdentityAlpha, value); + chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type value; + value.onOffControl = static_cast>(0U); + value.onTime = 300U; + value.offWaitTime = 300U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id, value, + chip::NullOptional + + ); } - case 5: { - LogStep(5, "Read the mandatory attribute: MeasuredValue"); - VerifyOrDo(!ShouldSkip("TMP.S.A0000 && TMP.M.ManuallyControlled"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); + case 126: { + LogStep(126, "24b:Reads OnOff attribute from DUT"); + VerifyOrDo(!ShouldSkip("OO.S.A0000 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); + } + case 127: { + LogStep(127, "24b:Reads OnTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("OO.S.A4001 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, + chip::NullOptional); + } + case 128: { + LogStep(128, "24b:Reads OffWaitTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("OO.S.A4002 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, + chip::NullOptional); + } + case 129: { + LogStep(129, "Wait 40000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 40000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 130: { + LogStep(130, "24c:Reads OnOff attribute from DUT"); + VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); + } + case 131: { + LogStep(131, "24c:Reads OnTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("OO.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, + chip::NullOptional); + } + case 132: { + LogStep(132, "24c:Reads OffWaitTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("OO.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, + chip::NullOptional); } } return CHIP_NO_ERROR; } }; -class Test_TC_TMP_3_1Suite : public TestCommand +class Test_TC_OO_3_1Suite : public TestCommand { public: - Test_TC_TMP_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TMP_3_1", 0, credsIssuerConfig) + Test_TC_OO_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OO_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -104064,7 +106579,7 @@ class Test_TC_TMP_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_TMP_3_1Suite() {} + ~Test_TC_OO_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -104109,10 +106624,10 @@ class Test_TC_TMP_3_1Suite : public TestCommand } }; -class Test_TC_TSTAT_3_1Suite : public TestCommand +class Test_TC_OO_3_2Suite : public TestCommand { public: - Test_TC_TSTAT_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_3_1", 0, credsIssuerConfig) + Test_TC_OO_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OO_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -104120,7 +106635,7 @@ class Test_TC_TSTAT_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_TSTAT_3_1Suite() {} + ~Test_TC_OO_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -104165,10 +106680,10 @@ class Test_TC_TSTAT_3_1Suite : public TestCommand } }; -class Test_TC_TSTAT_3_2Suite : public TestCommand +class Test_TC_RH_2_2Suite : public TestCommand { public: - Test_TC_TSTAT_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_3_2", 0, credsIssuerConfig) + Test_TC_RH_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_RH_2_2", 6, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -104176,7 +106691,7 @@ class Test_TC_TSTAT_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_TSTAT_3_2Suite() {} + ~Test_TC_RH_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -104189,6 +106704,8 @@ class Test_TC_TSTAT_3_2Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; + chip::app::DataModel::Nullable ValueBeforeChange; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -104201,6 +106718,54 @@ class Test_TC_TSTAT_3_2Suite : public TestCommand switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 9999U)); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); + ValueBeforeChange = value; + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintNotValue("value", value, ValueBeforeChange)); + } + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -104216,72 +106781,56 @@ class Test_TC_TSTAT_3_2Suite : public TestCommand using namespace chip::app::Clusters; switch (testIndex) { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TSUIC_3_1Suite : public TestCommand -{ -public: - Test_TC_TSUIC_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSUIC_3_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_TSUIC_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + case 1: { + LogStep(1, "Reads constraints of attribute: MinMeasuredValue"); + VerifyOrDo(!ShouldSkip("RH.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, + RelativeHumidityMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); + case 2: { + LogStep(2, "Reads constraints of attribute: MaxMeasuredValue"); + VerifyOrDo(!ShouldSkip("RH.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, + RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); + } + case 3: { + LogStep(3, "Reads MeasuredValue attribute from DUT"); + VerifyOrDo(!ShouldSkip("RH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, + RelativeHumidityMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "Operate on device to change the relative humidity significantly"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && RH.M.ManuallyControlled"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + 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(kIdentityAlpha, value); + } + case 5: { + LogStep(5, "Read the mandatory attribute: MeasuredValue"); + VerifyOrDo(!ShouldSkip("RH.S.A0000 && RH.M.ManuallyControlled"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, + RelativeHumidityMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { } return CHIP_NO_ERROR; } }; -class Test_TC_DGTHREAD_2_5Suite : public TestCommand +class Test_TC_SWTCH_2_2Suite : public TestCommand { public: - Test_TC_DGTHREAD_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_2_5", 0, credsIssuerConfig) + Test_TC_SWTCH_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -104289,7 +106838,7 @@ class Test_TC_DGTHREAD_2_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGTHREAD_2_5Suite() {} + ~Test_TC_SWTCH_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -104334,11 +106883,10 @@ class Test_TC_DGTHREAD_2_5Suite : public TestCommand } }; -class Test_TC_DGTHREAD_3_1Suite : public TestCommand +class Test_TC_SWTCH_3_2Suite : public TestCommand { public: - Test_TC_DGTHREAD_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_3_1", 0, credsIssuerConfig) + Test_TC_SWTCH_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -104346,7 +106894,7 @@ class Test_TC_DGTHREAD_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGTHREAD_3_1Suite() {} + ~Test_TC_SWTCH_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -104391,11 +106939,10 @@ class Test_TC_DGTHREAD_3_1Suite : public TestCommand } }; -class Test_TC_DGTHREAD_3_2Suite : public TestCommand +class Test_TC_TMP_2_2Suite : public TestCommand { public: - Test_TC_DGTHREAD_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_3_2", 0, credsIssuerConfig) + Test_TC_TMP_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TMP_2_2", 6, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -104403,7 +106950,7 @@ class Test_TC_DGTHREAD_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGTHREAD_3_2Suite() {} + ~Test_TC_TMP_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -104416,6 +106963,8 @@ class Test_TC_DGTHREAD_3_2Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; + chip::app::DataModel::Nullable valueBeforeChange; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -104428,6 +106977,56 @@ class Test_TC_DGTHREAD_3_2Suite : public TestCommand switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 32766)); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); + valueBeforeChange = value; + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); + VerifyOrReturn(CheckConstraintNotValue("value", value, valueBeforeChange)); + } + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -104443,16 +107042,56 @@ class Test_TC_DGTHREAD_3_2Suite : public TestCommand using namespace chip::app::Clusters; switch (testIndex) { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Read the mandatory attribute: MinMeasuredValue"); + VerifyOrDo(!ShouldSkip("TMP.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, + TemperatureMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "Read the mandatory attribute: MaxMeasuredValue"); + VerifyOrDo(!ShouldSkip("TMP.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, + TemperatureMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); + } + case 3: { + LogStep(3, "Reads MeasuredValue attribute from DUT"); + VerifyOrDo(!ShouldSkip("TMP.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, + TemperatureMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "Operate on device to change the temperature significantly"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TMP.M.ManuallyControlled"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + 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(kIdentityAlpha, value); + } + case 5: { + LogStep(5, "Read the mandatory attribute: MeasuredValue"); + VerifyOrDo(!ShouldSkip("TMP.S.A0000 && TMP.M.ManuallyControlled"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, + TemperatureMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); + } } return CHIP_NO_ERROR; } }; -class Test_TC_DGTHREAD_3_3Suite : public TestCommand +class Test_TC_TMP_3_1Suite : public TestCommand { public: - Test_TC_DGTHREAD_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_3_3", 0, credsIssuerConfig) + Test_TC_TMP_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TMP_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -104460,7 +107099,7 @@ class Test_TC_DGTHREAD_3_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGTHREAD_3_3Suite() {} + ~Test_TC_TMP_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -104505,11 +107144,10 @@ class Test_TC_DGTHREAD_3_3Suite : public TestCommand } }; -class Test_TC_DGTHREAD_3_4Suite : public TestCommand +class Test_TC_TSTAT_3_1Suite : public TestCommand { public: - Test_TC_DGTHREAD_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_3_4", 0, credsIssuerConfig) + Test_TC_TSTAT_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -104517,7 +107155,7 @@ class Test_TC_DGTHREAD_3_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGTHREAD_3_4Suite() {} + ~Test_TC_TSTAT_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -104562,11 +107200,10 @@ class Test_TC_DGTHREAD_3_4Suite : public TestCommand } }; -class Test_TC_DGTHREAD_3_5Suite : public TestCommand +class Test_TC_TSTAT_3_2Suite : public TestCommand { public: - Test_TC_DGTHREAD_3_5Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_3_5", 0, credsIssuerConfig) + Test_TC_TSTAT_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -104574,7 +107211,7 @@ class Test_TC_DGTHREAD_3_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGTHREAD_3_5Suite() {} + ~Test_TC_TSTAT_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -104619,10 +107256,10 @@ class Test_TC_DGTHREAD_3_5Suite : public TestCommand } }; -class Test_TC_ACT_2_1Suite : public TestCommand +class Test_TC_TSUIC_3_1Suite : public TestCommand { public: - Test_TC_ACT_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_2_1", 0, credsIssuerConfig) + Test_TC_TSUIC_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSUIC_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -104630,7 +107267,7 @@ class Test_TC_ACT_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACT_2_1Suite() {} + ~Test_TC_TSUIC_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -104675,10 +107312,11 @@ class Test_TC_ACT_2_1Suite : public TestCommand } }; -class Test_TC_ACT_2_2Suite : public TestCommand +class Test_TC_DGTHREAD_2_5Suite : public TestCommand { public: - Test_TC_ACT_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_2_2", 0, credsIssuerConfig) + Test_TC_DGTHREAD_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DGTHREAD_2_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -104686,7 +107324,7 @@ class Test_TC_ACT_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACT_2_2Suite() {} + ~Test_TC_DGTHREAD_2_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -104731,10 +107369,11 @@ class Test_TC_ACT_2_2Suite : public TestCommand } }; -class Test_TC_ACT_3_2Suite : public TestCommand +class Test_TC_DGTHREAD_3_1Suite : public TestCommand { public: - Test_TC_ACT_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_3_2", 0, credsIssuerConfig) + Test_TC_DGTHREAD_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DGTHREAD_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -104742,7 +107381,7 @@ class Test_TC_ACT_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACT_3_2Suite() {} + ~Test_TC_DGTHREAD_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -104787,10 +107426,11 @@ class Test_TC_ACT_3_2Suite : public TestCommand } }; -class Test_TC_LTIME_1_1Suite : public TestCommand +class Test_TC_DGTHREAD_3_2Suite : public TestCommand { public: - Test_TC_LTIME_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_1_1", 0, credsIssuerConfig) + Test_TC_DGTHREAD_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DGTHREAD_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -104798,7 +107438,7 @@ class Test_TC_LTIME_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_LTIME_1_1Suite() {} + ~Test_TC_DGTHREAD_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -104843,10 +107483,11 @@ class Test_TC_LTIME_1_1Suite : public TestCommand } }; -class Test_TC_LTIME_2_1Suite : public TestCommand +class Test_TC_DGTHREAD_3_3Suite : public TestCommand { public: - Test_TC_LTIME_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_2_1", 0, credsIssuerConfig) + Test_TC_DGTHREAD_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DGTHREAD_3_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -104854,7 +107495,7 @@ class Test_TC_LTIME_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_LTIME_2_1Suite() {} + ~Test_TC_DGTHREAD_3_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -104899,10 +107540,11 @@ class Test_TC_LTIME_2_1Suite : public TestCommand } }; -class Test_TC_LTIME_3_1Suite : public TestCommand +class Test_TC_DGTHREAD_3_4Suite : public TestCommand { public: - Test_TC_LTIME_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_3_1", 0, credsIssuerConfig) + Test_TC_DGTHREAD_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DGTHREAD_3_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -104910,7 +107552,7 @@ class Test_TC_LTIME_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_LTIME_3_1Suite() {} + ~Test_TC_DGTHREAD_3_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -104955,10 +107597,11 @@ class Test_TC_LTIME_3_1Suite : public TestCommand } }; -class Test_TC_LUNIT_1_1Suite : public TestCommand +class Test_TC_DGTHREAD_3_5Suite : public TestCommand { public: - Test_TC_LUNIT_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LUNIT_1_1", 0, credsIssuerConfig) + Test_TC_DGTHREAD_3_5Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DGTHREAD_3_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -104966,7 +107609,7 @@ class Test_TC_LUNIT_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_LUNIT_1_1Suite() {} + ~Test_TC_DGTHREAD_3_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -105011,10 +107654,10 @@ class Test_TC_LUNIT_1_1Suite : public TestCommand } }; -class Test_TC_LUNIT_2_1Suite : public TestCommand +class Test_TC_ACT_2_1Suite : public TestCommand { public: - Test_TC_LUNIT_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LUNIT_2_1", 0, credsIssuerConfig) + Test_TC_ACT_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -105022,7 +107665,7 @@ class Test_TC_LUNIT_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_LUNIT_2_1Suite() {} + ~Test_TC_ACT_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -105067,10 +107710,10 @@ class Test_TC_LUNIT_2_1Suite : public TestCommand } }; -class Test_TC_LUNIT_3_1Suite : public TestCommand +class Test_TC_ACT_2_2Suite : public TestCommand { public: - Test_TC_LUNIT_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LUNIT_3_1", 9, credsIssuerConfig) + Test_TC_ACT_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -105078,7 +107721,7 @@ class Test_TC_LUNIT_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_LUNIT_3_1Suite() {} + ~Test_TC_ACT_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -105103,54 +107746,6 @@ class Test_TC_LUNIT_3_1Suite : public TestCommand switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitLocalization::TempUnit value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitLocalization::TempUnit value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("temperatureUnit", value, 0U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitLocalization::TempUnit value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("temperatureUnit", value, 1U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitLocalization::TempUnit value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("temperatureUnit", value, 2U)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -105166,82 +107761,15 @@ class Test_TC_LUNIT_3_1Suite : public TestCommand using namespace chip::app::Clusters; switch (testIndex) { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "TH reads TemperatureUnit attribute from DUT"); - VerifyOrDo(!ShouldSkip("LUNIT.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::TemperatureUnit::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "TH writes 0 (Fahrenheit) to TemperatureUnit attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Fahrenheit"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::UnitLocalization::TempUnit value; - value = static_cast(0); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::TemperatureUnit::Id, value, chip::NullOptional, chip::NullOptional); - } - case 3: { - LogStep(3, "TH reads TemperatureUnit attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Fahrenheit"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::TemperatureUnit::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "TH writes 1 (Celsius) to TemperatureUnit attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Celsius"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::UnitLocalization::TempUnit value; - value = static_cast(1); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::TemperatureUnit::Id, value, chip::NullOptional, chip::NullOptional); - } - case 5: { - LogStep(5, "TH reads TemperatureUnit attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Celsius"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::TemperatureUnit::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "TH writes 2 (Kelvin) to TemperatureUnit attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Kelvin"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::UnitLocalization::TempUnit value; - value = static_cast(2); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::TemperatureUnit::Id, value, chip::NullOptional, chip::NullOptional); - } - case 7: { - LogStep(7, "TH reads TemperatureUnit attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Kelvin"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::TemperatureUnit::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "TH writes 5 to TemperatureUnit attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::UnitLocalization::TempUnit value; - value = static_cast(5); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::TemperatureUnit::Id, value, chip::NullOptional, chip::NullOptional); - } } return CHIP_NO_ERROR; } }; -class Test_TC_BIND_2_1Suite : public TestCommand +class Test_TC_ACT_3_2Suite : public TestCommand { public: - Test_TC_BIND_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BIND_2_1", 0, credsIssuerConfig) + Test_TC_ACT_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -105249,7 +107777,7 @@ class Test_TC_BIND_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BIND_2_1Suite() {} + ~Test_TC_ACT_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -105294,10 +107822,10 @@ class Test_TC_BIND_2_1Suite : public TestCommand } }; -class Test_TC_BIND_2_2Suite : public TestCommand +class Test_TC_LTIME_1_1Suite : public TestCommand { public: - Test_TC_BIND_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BIND_2_2", 0, credsIssuerConfig) + Test_TC_LTIME_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_1_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -105305,7 +107833,7 @@ class Test_TC_BIND_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BIND_2_2Suite() {} + ~Test_TC_LTIME_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -105350,10 +107878,10 @@ class Test_TC_BIND_2_2Suite : public TestCommand } }; -class Test_TC_BIND_2_3Suite : public TestCommand +class Test_TC_LTIME_2_1Suite : public TestCommand { public: - Test_TC_BIND_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BIND_2_3", 0, credsIssuerConfig) + Test_TC_LTIME_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -105361,7 +107889,7 @@ class Test_TC_BIND_2_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BIND_2_3Suite() {} + ~Test_TC_LTIME_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -105406,10 +107934,10 @@ class Test_TC_BIND_2_3Suite : public TestCommand } }; -class Test_TC_S_1_1Suite : public TestCommand +class Test_TC_LTIME_3_1Suite : public TestCommand { public: - Test_TC_S_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_1_1", 0, credsIssuerConfig) + Test_TC_LTIME_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -105417,7 +107945,7 @@ class Test_TC_S_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_S_1_1Suite() {} + ~Test_TC_LTIME_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -105462,10 +107990,10 @@ class Test_TC_S_1_1Suite : public TestCommand } }; -class Test_TC_S_2_1Suite : public TestCommand +class Test_TC_BIND_2_1Suite : public TestCommand { public: - Test_TC_S_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_2_1", 0, credsIssuerConfig) + Test_TC_BIND_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BIND_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -105473,7 +108001,7 @@ class Test_TC_S_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_S_2_1Suite() {} + ~Test_TC_BIND_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -105518,10 +108046,10 @@ class Test_TC_S_2_1Suite : public TestCommand } }; -class Test_TC_S_2_2Suite : public TestCommand +class Test_TC_BIND_2_2Suite : public TestCommand { public: - Test_TC_S_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_2_2", 0, credsIssuerConfig) + Test_TC_BIND_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BIND_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -105529,7 +108057,7 @@ class Test_TC_S_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_S_2_2Suite() {} + ~Test_TC_BIND_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -105574,10 +108102,10 @@ class Test_TC_S_2_2Suite : public TestCommand } }; -class Test_TC_S_2_3Suite : public TestCommand +class Test_TC_BIND_2_3Suite : public TestCommand { public: - Test_TC_S_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_2_3", 0, credsIssuerConfig) + Test_TC_BIND_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BIND_2_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -105585,7 +108113,7 @@ class Test_TC_S_2_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_S_2_3Suite() {} + ~Test_TC_BIND_2_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -105630,10 +108158,10 @@ class Test_TC_S_2_3Suite : public TestCommand } }; -class Test_TC_S_3_1Suite : public TestCommand +class Test_TC_S_1_1Suite : public TestCommand { public: - Test_TC_S_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_3_1", 0, credsIssuerConfig) + Test_TC_S_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_1_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -105641,7 +108169,7 @@ class Test_TC_S_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_S_3_1Suite() {} + ~Test_TC_S_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -105686,10 +108214,10 @@ class Test_TC_S_3_1Suite : public TestCommand } }; -class Test_TC_PCC_3_1Suite : public TestCommand +class Test_TC_S_2_1Suite : public TestCommand { public: - Test_TC_PCC_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PCC_3_1", 0, credsIssuerConfig) + Test_TC_S_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -105697,7 +108225,7 @@ class Test_TC_PCC_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_PCC_3_1Suite() {} + ~Test_TC_S_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -105742,10 +108270,10 @@ class Test_TC_PCC_3_1Suite : public TestCommand } }; -class Test_TC_ACL_2_4Suite : public TestCommand +class Test_TC_S_2_2Suite : public TestCommand { public: - Test_TC_ACL_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_4", 0, credsIssuerConfig) + Test_TC_S_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -105753,7 +108281,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACL_2_4Suite() {} + ~Test_TC_S_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -105798,10 +108326,10 @@ class Test_TC_ACL_2_4Suite : public TestCommand } }; -class Test_TC_ACL_2_5Suite : public TestCommand +class Test_TC_S_2_3Suite : public TestCommand { public: - Test_TC_ACL_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_5", 0, credsIssuerConfig) + Test_TC_S_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_2_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -105809,7 +108337,7 @@ class Test_TC_ACL_2_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACL_2_5Suite() {} + ~Test_TC_S_2_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -105854,10 +108382,10 @@ class Test_TC_ACL_2_5Suite : public TestCommand } }; -class Test_TC_ACL_2_6Suite : public TestCommand +class Test_TC_S_3_1Suite : public TestCommand { public: - Test_TC_ACL_2_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_6", 0, credsIssuerConfig) + Test_TC_S_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -105865,7 +108393,7 @@ class Test_TC_ACL_2_6Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACL_2_6Suite() {} + ~Test_TC_S_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -105910,10 +108438,10 @@ class Test_TC_ACL_2_6Suite : public TestCommand } }; -class Test_TC_ACL_2_7Suite : public TestCommand +class Test_TC_PCC_3_1Suite : public TestCommand { public: - Test_TC_ACL_2_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_7", 0, credsIssuerConfig) + Test_TC_PCC_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PCC_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -105921,7 +108449,7 @@ class Test_TC_ACL_2_7Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACL_2_7Suite() {} + ~Test_TC_PCC_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -105966,10 +108494,10 @@ class Test_TC_ACL_2_7Suite : public TestCommand } }; -class Test_TC_ACL_2_8Suite : public TestCommand +class Test_TC_ACL_2_5Suite : public TestCommand { public: - Test_TC_ACL_2_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_8", 0, credsIssuerConfig) + Test_TC_ACL_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -105977,7 +108505,7 @@ class Test_TC_ACL_2_8Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACL_2_8Suite() {} + ~Test_TC_ACL_2_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -106022,10 +108550,10 @@ class Test_TC_ACL_2_8Suite : public TestCommand } }; -class Test_TC_ACL_2_9Suite : public TestCommand +class Test_TC_ACL_2_6Suite : public TestCommand { public: - Test_TC_ACL_2_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_9", 0, credsIssuerConfig) + Test_TC_ACL_2_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_6", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -106033,7 +108561,7 @@ class Test_TC_ACL_2_9Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACL_2_9Suite() {} + ~Test_TC_ACL_2_6Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -106078,10 +108606,10 @@ class Test_TC_ACL_2_9Suite : public TestCommand } }; -class Test_TC_ACL_2_10Suite : public TestCommand +class Test_TC_ACL_2_8Suite : public TestCommand { public: - Test_TC_ACL_2_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_10", 0, credsIssuerConfig) + Test_TC_ACL_2_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_8", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -106089,7 +108617,7 @@ class Test_TC_ACL_2_10Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACL_2_10Suite() {} + ~Test_TC_ACL_2_8Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -106134,10 +108662,10 @@ class Test_TC_ACL_2_10Suite : public TestCommand } }; -class Test_TC_ULABEL_3_1Suite : public TestCommand +class Test_TC_ACL_2_10Suite : public TestCommand { public: - Test_TC_ULABEL_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ULABEL_3_1", 0, credsIssuerConfig) + Test_TC_ACL_2_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_10", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -106145,7 +108673,7 @@ class Test_TC_ULABEL_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ULABEL_3_1Suite() {} + ~Test_TC_ACL_2_10Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -106431,6 +108959,9 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -106488,6 +109019,7 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -106532,6 +109064,7 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -106868,9 +109401,6 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -106893,7 +109423,6 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -106920,9 +109449,6 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -106932,14 +109458,10 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), 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 2e471589934d39..d51bece01aa2ef 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -91,6 +91,7 @@ class TestList : public Command { printf("Test_TC_LVL_6_1\n"); printf("Test_TC_LCFG_1_1\n"); printf("Test_TC_LUNIT_1_2\n"); + printf("Test_TC_LUNIT_3_1\n"); printf("Test_TC_LTIME_1_2\n"); printf("Test_TC_LOWPOWER_1_1\n"); printf("Test_TC_KEYPADINPUT_1_2\n"); @@ -132,6 +133,7 @@ class TestList : public Command { printf("OTA_SuccessfulTransfer\n"); printf("Test_TC_OCC_1_1\n"); printf("Test_TC_OCC_2_1\n"); + printf("Test_TC_OCC_2_3\n"); printf("Test_TC_OO_1_1\n"); printf("Test_TC_OO_2_1\n"); printf("Test_TC_OO_2_2\n"); @@ -34117,6 +34119,355 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { } }; +class Test_TC_LUNIT_3_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_LUNIT_3_1() + : TestCommandBridge("Test_TC_LUNIT_3_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_LUNIT_3_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LUNIT_3_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LUNIT_3_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 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads TemperatureUnit attribute from DUT\n"); + if (ShouldSkip("LUNIT.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsTemperatureUnitAttributeFromDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH writes 0 (Fahrenheit) to TemperatureUnit attribute\n"); + if (ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Fahrenheit")) { + NextTest(); + return; + } + err = TestThWrites0FahrenheitToTemperatureUnitAttribute_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads TemperatureUnit attribute\n"); + if (ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Fahrenheit")) { + NextTest(); + return; + } + err = TestThReadsTemperatureUnitAttribute_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : TH writes 1 (Celsius) to TemperatureUnit attribute\n"); + if (ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Celsius")) { + NextTest(); + return; + } + err = TestThWrites1CelsiusToTemperatureUnitAttribute_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads TemperatureUnit attribute\n"); + if (ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Celsius")) { + NextTest(); + return; + } + err = TestThReadsTemperatureUnitAttribute_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : TH writes 2 (Kelvin) to TemperatureUnit attribute\n"); + if (ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Kelvin")) { + NextTest(); + return; + } + err = TestThWrites2KelvinToTemperatureUnitAttribute_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads TemperatureUnit attribute\n"); + if (ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Kelvin")) { + NextTest(); + return; + } + err = TestThReadsTemperatureUnitAttribute_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TH writes 5 to TemperatureUnit attribute\n"); + if (ShouldSkip("LUNIT.S.A0000")) { + NextTest(); + return; + } + err = TestThWrites5ToTemperatureUnitAttribute_8(); + 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; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + 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 = 9; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestThReadsTemperatureUnitAttributeFromDut_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeTemperatureUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads TemperatureUnit attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("temperatureUnit", "enum8", "enum8")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThWrites0FahrenheitToTemperatureUnitAttribute_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id temperatureUnitArgument; + temperatureUnitArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeTemperatureUnitWithValue:temperatureUnitArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 (Fahrenheit) to TemperatureUnit attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsTemperatureUnitAttribute_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeTemperatureUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads TemperatureUnit attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("TemperatureUnit", actualValue, 0U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThWrites1CelsiusToTemperatureUnitAttribute_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id temperatureUnitArgument; + temperatureUnitArgument = [NSNumber numberWithUnsignedChar:1U]; + [cluster writeAttributeTemperatureUnitWithValue:temperatureUnitArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes 1 (Celsius) to TemperatureUnit attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsTemperatureUnitAttribute_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeTemperatureUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads TemperatureUnit attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("TemperatureUnit", actualValue, 1U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThWrites2KelvinToTemperatureUnitAttribute_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id temperatureUnitArgument; + temperatureUnitArgument = [NSNumber numberWithUnsignedChar:2U]; + [cluster writeAttributeTemperatureUnitWithValue:temperatureUnitArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes 2 (Kelvin) to TemperatureUnit attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsTemperatureUnitAttribute_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeTemperatureUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads TemperatureUnit attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("TemperatureUnit", actualValue, 2U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThWrites5ToTemperatureUnitAttribute_8() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id temperatureUnitArgument; + temperatureUnitArgument = [NSNumber numberWithUnsignedChar:5U]; + [cluster writeAttributeTemperatureUnitWithValue:temperatureUnitArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes 5 to TemperatureUnit attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + class Test_TC_LTIME_1_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced @@ -46046,6 +46397,157 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { } }; +class Test_TC_OCC_2_3 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_OCC_2_3() + : TestCommandBridge("Test_TC_OCC_2_3") + , 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_OCC_2_3() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_OCC_2_3\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OCC_2_3\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 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads mandatory attribute constrains: OccupancySensorType\n"); + if (ShouldSkip("OCC.S.A0001")) { + NextTest(); + return; + } + err = TestReadsMandatoryAttributeConstrainsOccupancySensorType_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads mandatory attribute constrains: OccupancySensorTypeBitmap\n"); + if (ShouldSkip("OCC.S.A0002")) { + NextTest(); + return; + } + err = TestReadsMandatoryAttributeConstrainsOccupancySensorTypeBitmap_2(); + 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; + } + + // 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 = 3; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestReadsMandatoryAttributeConstrainsOccupancySensorType_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOccupancySensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads mandatory attribute constrains: OccupancySensorType Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("occupancySensorType", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("occupancySensorType", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("occupancySensorType", [value unsignedCharValue], 3U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsMandatoryAttributeConstrainsOccupancySensorTypeBitmap_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOccupancySensorTypeBitmapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads mandatory attribute constrains: OccupancySensorTypeBitmap Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("occupancySensorTypeBitmap", "bitmap8", "bitmap8")); + VerifyOrReturn(CheckConstraintMinValue("occupancySensorTypeBitmap", [value unsignedCharValue], 1U)); + VerifyOrReturn(CheckConstraintMaxValue("occupancySensorTypeBitmap", [value unsignedCharValue], 7U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + class Test_TC_OO_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced @@ -129223,6 +129725,7 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), @@ -129264,6 +129767,7 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), diff --git a/zzz_generated/placeholder/app1/zap-generated/CHIPClientCallbacks.h b/zzz_generated/placeholder/app1/zap-generated/CHIPClientCallbacks.h index 707be5dcd69d6f..c10efabe0e0d97 100644 --- a/zzz_generated/placeholder/app1/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/placeholder/app1/zap-generated/CHIPClientCallbacks.h @@ -30,6 +30,8 @@ #include // List specific responses +typedef void (*LocalizationConfigurationSupportedLocalesListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*GeneralCommissioningGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*GeneralCommissioningAcceptedCommandListListAttributeCallback)( diff --git a/zzz_generated/placeholder/app1/zap-generated/CHIPClusters.h b/zzz_generated/placeholder/app1/zap-generated/CHIPClusters.h index 39cffc7788d3a2..aefeb49a4e45bc 100644 --- a/zzz_generated/placeholder/app1/zap-generated/CHIPClusters.h +++ b/zzz_generated/placeholder/app1/zap-generated/CHIPClusters.h @@ -39,6 +39,25 @@ class DLL_EXPORT OnOffCluster : public ClusterBase ~OnOffCluster() {} }; +class DLL_EXPORT LocalizationConfigurationCluster : public ClusterBase +{ +public: + LocalizationConfigurationCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::LocalizationConfiguration::Id, endpoint) + {} + ~LocalizationConfigurationCluster() {} +}; + +class DLL_EXPORT UnitLocalizationCluster : public ClusterBase +{ +public: + UnitLocalizationCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::UnitLocalization::Id, endpoint) + {} + ~UnitLocalizationCluster() {} +}; + class DLL_EXPORT GeneralCommissioningCluster : public ClusterBase { public: diff --git a/zzz_generated/placeholder/app1/zap-generated/access.h b/zzz_generated/placeholder/app1/zap-generated/access.h index a4d242bb1e7d28..c86680f21431c5 100644 --- a/zzz_generated/placeholder/app1/zap-generated/access.h +++ b/zzz_generated/placeholder/app1/zap-generated/access.h @@ -40,6 +40,7 @@ 49, /* Cluster: Network Commissioning, Attribute: LastNetworkingStatus, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Attribute: LastNetworkID, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Attribute: LastConnectErrorValue, Privilege: administer */ \ + /* Cluster: User Label, Attribute: label list, Privilege: view */ \ /* Cluster: Window Covering, Attribute: Mode, Privilege: view */ \ /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: view */ \ /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: view */ \ @@ -55,6 +56,15 @@ /* Cluster: Thermostat User Interface Configuration, Attribute: keypad lockout, Privilege: view */ \ /* Cluster: Thermostat User Interface Configuration, Attribute: schedule programming visibility, Privilege: view */ \ /* Cluster: Color Control, Attribute: StartUpColorTemperatureMireds, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: PIR occupied to unoccupied delay, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: PIR unoccupied to occupied delay, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: PIR unoccupied to occupied threshold, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: ultrasonic occupied to unoccupied delay, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: ultrasonic unoccupied to occupied delay, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: ultrasonic unoccupied to occupied threshold, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: physical contact occupied to unoccupied delay, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: physical contact unoccupied to occupied delay, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: physical contact unoccupied to occupied threshold, Privilege: view */ \ } // Parallel array data (cluster, *attribute*, privilege) for read attribute @@ -70,6 +80,7 @@ 5, /* Cluster: Network Commissioning, Attribute: LastNetworkingStatus, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Attribute: LastNetworkID, Privilege: administer */ \ 7, /* Cluster: Network Commissioning, Attribute: LastConnectErrorValue, Privilege: administer */ \ + /* Cluster: User Label, Attribute: label list, Privilege: view */ \ /* Cluster: Window Covering, Attribute: Mode, Privilege: view */ \ /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: view */ \ /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: view */ \ @@ -85,6 +96,15 @@ /* Cluster: Thermostat User Interface Configuration, Attribute: keypad lockout, Privilege: view */ \ /* Cluster: Thermostat User Interface Configuration, Attribute: schedule programming visibility, Privilege: view */ \ /* Cluster: Color Control, Attribute: StartUpColorTemperatureMireds, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: PIR occupied to unoccupied delay, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: PIR unoccupied to occupied delay, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: PIR unoccupied to occupied threshold, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: ultrasonic occupied to unoccupied delay, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: ultrasonic unoccupied to occupied delay, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: ultrasonic unoccupied to occupied threshold, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: physical contact occupied to unoccupied delay, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: physical contact unoccupied to occupied delay, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: physical contact unoccupied to occupied threshold, Privilege: view */ \ } // Parallel array data (cluster, attribute, *privilege*) for read attribute @@ -100,6 +120,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Attribute: LastNetworkingStatus, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Attribute: LastNetworkID, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Attribute: LastConnectErrorValue, Privilege: administer */ \ + /* Cluster: User Label, Attribute: label list, Privilege: view */ \ /* Cluster: Window Covering, Attribute: Mode, Privilege: view */ \ /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: view */ \ /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: view */ \ @@ -115,6 +136,15 @@ /* Cluster: Thermostat User Interface Configuration, Attribute: keypad lockout, Privilege: view */ \ /* Cluster: Thermostat User Interface Configuration, Attribute: schedule programming visibility, Privilege: view */ \ /* Cluster: Color Control, Attribute: StartUpColorTemperatureMireds, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: PIR occupied to unoccupied delay, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: PIR unoccupied to occupied delay, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: PIR unoccupied to occupied threshold, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: ultrasonic occupied to unoccupied delay, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: ultrasonic unoccupied to occupied delay, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: ultrasonic unoccupied to occupied threshold, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: physical contact occupied to unoccupied delay, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: physical contact unoccupied to occupied delay, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: physical contact unoccupied to occupied threshold, Privilege: view */ \ } //////////////////////////////////////////////////////////////////////////////// @@ -127,6 +157,7 @@ 40, /* Cluster: Basic Information, Attribute: LocalConfigDisabled, Privilege: manage */ \ 48, /* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: administer */ \ + 65, /* Cluster: User Label, Attribute: label list, Privilege: manage */ \ 258, /* Cluster: Window Covering, Attribute: Mode, Privilege: manage */ \ 512, /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: manage */ \ 512, /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: manage */ \ @@ -142,6 +173,15 @@ 516, /* Cluster: Thermostat User Interface Configuration, Attribute: keypad lockout, Privilege: manage */ \ 516, /* Cluster: Thermostat User Interface Configuration, Attribute: schedule programming visibility, Privilege: manage */ \ 768, /* Cluster: Color Control, Attribute: StartUpColorTemperatureMireds, Privilege: manage */ \ + 1030, /* Cluster: Occupancy Sensing, Attribute: PIR occupied to unoccupied delay, Privilege: manage */ \ + 1030, /* Cluster: Occupancy Sensing, Attribute: PIR unoccupied to occupied delay, Privilege: manage */ \ + 1030, /* Cluster: Occupancy Sensing, Attribute: PIR unoccupied to occupied threshold, Privilege: manage */ \ + 1030, /* Cluster: Occupancy Sensing, Attribute: ultrasonic occupied to unoccupied delay, Privilege: manage */ \ + 1030, /* Cluster: Occupancy Sensing, Attribute: ultrasonic unoccupied to occupied delay, Privilege: manage */ \ + 1030, /* Cluster: Occupancy Sensing, Attribute: ultrasonic unoccupied to occupied threshold, Privilege: manage */ \ + 1030, /* Cluster: Occupancy Sensing, Attribute: physical contact occupied to unoccupied delay, Privilege: manage */ \ + 1030, /* Cluster: Occupancy Sensing, Attribute: physical contact unoccupied to occupied delay, Privilege: manage */ \ + 1030, /* Cluster: Occupancy Sensing, Attribute: physical contact unoccupied to occupied threshold, Privilege: manage */ \ } // Parallel array data (cluster, *attribute*, privilege) for write attribute @@ -152,6 +192,7 @@ 16, /* Cluster: Basic Information, Attribute: LocalConfigDisabled, Privilege: manage */ \ 0, /* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: administer */ \ 4, /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: administer */ \ + 0, /* Cluster: User Label, Attribute: label list, Privilege: manage */ \ 23, /* Cluster: Window Covering, Attribute: Mode, Privilege: manage */ \ 21, /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: manage */ \ 23, /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: manage */ \ @@ -167,6 +208,15 @@ 1, /* Cluster: Thermostat User Interface Configuration, Attribute: keypad lockout, Privilege: manage */ \ 2, /* Cluster: Thermostat User Interface Configuration, Attribute: schedule programming visibility, Privilege: manage */ \ 16400, /* Cluster: Color Control, Attribute: StartUpColorTemperatureMireds, Privilege: manage */ \ + 16, /* Cluster: Occupancy Sensing, Attribute: PIR occupied to unoccupied delay, Privilege: manage */ \ + 17, /* Cluster: Occupancy Sensing, Attribute: PIR unoccupied to occupied delay, Privilege: manage */ \ + 18, /* Cluster: Occupancy Sensing, Attribute: PIR unoccupied to occupied threshold, Privilege: manage */ \ + 32, /* Cluster: Occupancy Sensing, Attribute: ultrasonic occupied to unoccupied delay, Privilege: manage */ \ + 33, /* Cluster: Occupancy Sensing, Attribute: ultrasonic unoccupied to occupied delay, Privilege: manage */ \ + 34, /* Cluster: Occupancy Sensing, Attribute: ultrasonic unoccupied to occupied threshold, Privilege: manage */ \ + 48, /* Cluster: Occupancy Sensing, Attribute: physical contact occupied to unoccupied delay, Privilege: manage */ \ + 49, /* Cluster: Occupancy Sensing, Attribute: physical contact unoccupied to occupied delay, Privilege: manage */ \ + 50, /* Cluster: Occupancy Sensing, Attribute: physical contact unoccupied to occupied threshold, Privilege: manage */ \ } // Parallel array data (cluster, attribute, *privilege*) for write attribute @@ -177,6 +227,7 @@ kMatterAccessPrivilegeManage, /* Cluster: Basic Information, Attribute: LocalConfigDisabled, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: User Label, Attribute: label list, Privilege: manage */ \ kMatterAccessPrivilegeManage, /* Cluster: Window Covering, Attribute: Mode, Privilege: manage */ \ kMatterAccessPrivilegeManage, /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: manage */ \ kMatterAccessPrivilegeManage, /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: manage */ \ @@ -192,6 +243,15 @@ kMatterAccessPrivilegeManage, /* Cluster: Thermostat User Interface Configuration, Attribute: keypad lockout, Privilege: manage */ \ kMatterAccessPrivilegeManage, /* Cluster: Thermostat User Interface Configuration, Attribute: schedule programming visibility, Privilege: manage */ \ kMatterAccessPrivilegeManage, /* Cluster: Color Control, Attribute: StartUpColorTemperatureMireds, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Occupancy Sensing, Attribute: PIR occupied to unoccupied delay, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Occupancy Sensing, Attribute: PIR unoccupied to occupied delay, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Occupancy Sensing, Attribute: PIR unoccupied to occupied threshold, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Occupancy Sensing, Attribute: ultrasonic occupied to unoccupied delay, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Occupancy Sensing, Attribute: ultrasonic unoccupied to occupied delay, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Occupancy Sensing, Attribute: ultrasonic unoccupied to occupied threshold, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Occupancy Sensing, Attribute: physical contact occupied to unoccupied delay, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Occupancy Sensing, Attribute: physical contact unoccupied to occupied delay, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Occupancy Sensing, Attribute: physical contact unoccupied to occupied threshold, Privilege: manage */ \ } //////////////////////////////////////////////////////////////////////////////// diff --git a/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h b/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h index d89ce5d05623d3..ef376538064083 100644 --- a/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h +++ b/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h @@ -68,7 +68,7 @@ } // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 17 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 27 #define GENERATED_MIN_MAX_DEFAULTS \ { \ \ @@ -98,15 +98,29 @@ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x5 }, /* keypad lockout */ \ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 }, /* schedule programming visibility */ \ \ - /* Endpoint: 1, Cluster: Color Control (server) */ \ + /* Endpoint: 1, Cluster: Unit Localization (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x2 }, /* TemperatureUnit */ \ + \ + /* Endpoint: 1, Cluster: Color Control (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* StartUpColorTemperatureMireds */ \ + \ + /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFFFE }, /* PIR occupied to unoccupied delay */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFFFE }, /* PIR unoccupied to occupied delay */ \ + { (uint16_t) 0x1, (uint16_t) 0x1, (uint16_t) 0xFE }, /* PIR unoccupied to occupied threshold */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFFFE }, /* ultrasonic occupied to unoccupied delay */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFFFE }, /* ultrasonic unoccupied to occupied delay */ \ + { (uint16_t) 0x1, (uint16_t) 0x1, (uint16_t) 0xFE }, /* ultrasonic unoccupied to occupied threshold */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFFFE }, /* physical contact occupied to unoccupied delay */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFFFE }, /* physical contact unoccupied to occupied delay */ \ { \ - (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF \ - } /* StartUpColorTemperatureMireds */ \ + (uint16_t) 0x1, (uint16_t) 0x1, (uint16_t) 0xFE \ + } /* physical contact unoccupied to occupied threshold */ \ } #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 338 +#define GENERATED_ATTRIBUTE_COUNT 362 #define GENERATED_ATTRIBUTES \ { \ \ @@ -622,10 +636,29 @@ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ + /* Endpoint: 1, Cluster: Localization Configuration (server) */ \ + { 0x00000000, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + \ + /* Endpoint: 1, Cluster: Unit Localization (server) */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, \ + ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(16) }, /* TemperatureUnit */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + \ /* Endpoint: 1, Cluster: Fixed Label (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* label list */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ + /* Endpoint: 1, Cluster: User Label (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* label list */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ClusterRevision */ \ + \ /* Endpoint: 1, Cluster: Color Control (server) */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x616B) }, /* CurrentX */ \ { 0x00000004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x607D) }, /* CurrentY */ \ @@ -633,9 +666,34 @@ { 0x0000400D, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* CoupleColorTempToLevelMinMireds */ \ { 0x00004010, ZAP_TYPE(INT16U), 2, \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(16) }, /* StartUpColorTemperatureMireds */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(17) }, /* StartUpColorTemperatureMireds */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ + \ + /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ + { 0x00000000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* occupancy */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* occupancy sensor type */ \ + { 0x00000002, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* occupancy sensor type bitmap */ \ + { 0x00000010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(18) }, /* PIR occupied to unoccupied delay */ \ + { 0x00000011, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(19) }, /* PIR unoccupied to occupied delay */ \ + { 0x00000012, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(20) }, /* PIR unoccupied to occupied threshold */ \ + { 0x00000020, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(21) }, /* ultrasonic occupied to unoccupied delay */ \ + { 0x00000021, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(22) }, /* ultrasonic unoccupied to occupied delay */ \ + { 0x00000022, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(23) }, /* ultrasonic unoccupied to occupied threshold */ \ + { 0x00000030, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(24) }, /* physical contact occupied to unoccupied delay */ \ + { 0x00000031, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(25) }, /* physical contact unoccupied to occupied delay */ \ + { 0x00000032, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(26) }, /* physical contact unoccupied to occupied threshold */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ClusterRevision */ \ } // This is an array of EmberAfCluster structures. @@ -680,8 +738,15 @@ const EmberAfGenericClusterFunction chipFuncArrayLevelControlServer[] = { \ (EmberAfGenericClusterFunction) emberAfLevelControlClusterServerInitCallback, \ }; \ + const EmberAfGenericClusterFunction chipFuncArrayLocalizationConfigurationServer[] = { \ + (EmberAfGenericClusterFunction) emberAfLocalizationConfigurationClusterServerInitCallback, \ + (EmberAfGenericClusterFunction) MatterLocalizationConfigurationClusterServerPreAttributeChangedCallback, \ + }; \ const EmberAfGenericClusterFunction chipFuncArrayColorControlServer[] = { \ (EmberAfGenericClusterFunction) emberAfColorControlClusterServerInitCallback, \ + }; \ + const EmberAfGenericClusterFunction chipFuncArrayOccupancySensingServer[] = { \ + (EmberAfGenericClusterFunction) emberAfOccupancySensingClusterServerInitCallback, \ }; // clang-format off @@ -860,7 +925,7 @@ // clang-format on #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 52 +#define GENERATED_CLUSTER_COUNT 58 // clang-format off #define GENERATED_CLUSTERS { \ @@ -1403,10 +1468,54 @@ .acceptedCommandList = nullptr ,\ .generatedCommandList = nullptr ,\ },\ + { \ + /* Endpoint: 1, Cluster: Localization Configuration (client) */ \ + .clusterId = 0x0000002B, \ + .attributes = ZAP_ATTRIBUTE_INDEX(329), \ + .attributeCount = 0, \ + .clusterSize = 0, \ + .mask = ZAP_CLUSTER_MASK(CLIENT), \ + .functions = NULL, \ + .acceptedCommandList = nullptr ,\ + .generatedCommandList = nullptr ,\ + },\ + { \ + /* Endpoint: 1, Cluster: Localization Configuration (server) */ \ + .clusterId = 0x0000002B, \ + .attributes = ZAP_ATTRIBUTE_INDEX(329), \ + .attributeCount = 4, \ + .clusterSize = 42, \ + .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ + .functions = chipFuncArrayLocalizationConfigurationServer, \ + .acceptedCommandList = nullptr ,\ + .generatedCommandList = nullptr ,\ + },\ + { \ + /* Endpoint: 1, Cluster: Unit Localization (client) */ \ + .clusterId = 0x0000002D, \ + .attributes = ZAP_ATTRIBUTE_INDEX(333), \ + .attributeCount = 0, \ + .clusterSize = 0, \ + .mask = ZAP_CLUSTER_MASK(CLIENT), \ + .functions = NULL, \ + .acceptedCommandList = nullptr ,\ + .generatedCommandList = nullptr ,\ + },\ + { \ + /* Endpoint: 1, Cluster: Unit Localization (server) */ \ + .clusterId = 0x0000002D, \ + .attributes = ZAP_ATTRIBUTE_INDEX(333), \ + .attributeCount = 3, \ + .clusterSize = 7, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .acceptedCommandList = nullptr ,\ + .generatedCommandList = nullptr ,\ + },\ { \ /* Endpoint: 1, Cluster: Fixed Label (client) */ \ .clusterId = 0x00000040, \ - .attributes = ZAP_ATTRIBUTE_INDEX(329), \ + .attributes = ZAP_ATTRIBUTE_INDEX(336), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -1417,7 +1526,7 @@ { \ /* Endpoint: 1, Cluster: Fixed Label (server) */ \ .clusterId = 0x00000040, \ - .attributes = ZAP_ATTRIBUTE_INDEX(329), \ + .attributes = ZAP_ATTRIBUTE_INDEX(336), \ .attributeCount = 2, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1425,10 +1534,21 @@ .acceptedCommandList = nullptr ,\ .generatedCommandList = nullptr ,\ },\ + { \ + /* Endpoint: 1, Cluster: User Label (server) */ \ + .clusterId = 0x00000041, \ + .attributes = ZAP_ATTRIBUTE_INDEX(338), \ + .attributeCount = 3, \ + .clusterSize = 4, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .acceptedCommandList = nullptr ,\ + .generatedCommandList = nullptr ,\ + },\ { \ /* Endpoint: 1, Cluster: Color Control (server) */ \ .clusterId = 0x00000300, \ - .attributes = ZAP_ATTRIBUTE_INDEX(331), \ + .attributes = ZAP_ATTRIBUTE_INDEX(341), \ .attributeCount = 7, \ .clusterSize = 15, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -1436,18 +1556,29 @@ .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 117 ) ,\ .generatedCommandList = nullptr ,\ },\ + { \ + /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ + .clusterId = 0x00000406, \ + .attributes = ZAP_ATTRIBUTE_INDEX(348), \ + .attributeCount = 14, \ + .clusterSize = 22, \ + .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ + .functions = chipFuncArrayOccupancySensingServer, \ + .acceptedCommandList = nullptr ,\ + .generatedCommandList = nullptr ,\ + },\ } // clang-format on #define ZAP_CLUSTER_INDEX(index) (&generatedClusters[index]) -#define ZAP_FIXED_ENDPOINT_DATA_VERSION_COUNT 38 +#define ZAP_FIXED_ENDPOINT_DATA_VERSION_COUNT 42 // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 42, 792 }, { ZAP_CLUSTER_INDEX(42), 10, 100 }, \ + { ZAP_CLUSTER_INDEX(0), 42, 792 }, { ZAP_CLUSTER_INDEX(42), 16, 175 }, \ } // Largest attribute size is needed for various buffers @@ -1456,10 +1587,10 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, "ATTRIBUTE_LARGEST larger than expected"); // Total size of singleton attributes -#define ATTRIBUTE_SINGLETONS_SIZE (74) +#define ATTRIBUTE_SINGLETONS_SIZE (75) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (892) +#define ATTRIBUTE_MAX_SIZE (967) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) diff --git a/zzz_generated/placeholder/app1/zap-generated/gen_config.h b/zzz_generated/placeholder/app1/zap-generated/gen_config.h index ac5c952ee245c0..7a40fc5eb73e41 100644 --- a/zzz_generated/placeholder/app1/zap-generated/gen_config.h +++ b/zzz_generated/placeholder/app1/zap-generated/gen_config.h @@ -38,6 +38,10 @@ #define EMBER_AF_DESCRIPTOR_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_ACTIONS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_BASIC_INFORMATION_CLUSTER_SERVER_ENDPOINT_COUNT (2) +#define EMBER_AF_LOCALIZATION_CONFIGURATION_CLUSTER_CLIENT_ENDPOINT_COUNT (1) +#define EMBER_AF_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_UNIT_LOCALIZATION_CLUSTER_CLIENT_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 (1) #define EMBER_AF_GENERAL_COMMISSIONING_CLUSTER_CLIENT_ENDPOINT_COUNT (1) @@ -54,6 +58,7 @@ #define EMBER_AF_OPERATIONAL_CREDENTIALS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_FIXED_LABEL_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_FIXED_LABEL_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_USER_LABEL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_BOOLEAN_STATE_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_MODE_SELECT_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_MODE_SELECT_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -70,6 +75,7 @@ #define EMBER_AF_FLOW_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_OCCUPANCY_SENSING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_TARGET_NAVIGATOR_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_TARGET_NAVIGATOR_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_KEYPAD_INPUT_CLUSTER_CLIENT_ENDPOINT_COUNT (1) @@ -141,6 +147,24 @@ #define EMBER_AF_PLUGIN_BASIC_INFORMATION_SERVER #define EMBER_AF_PLUGIN_BASIC_INFORMATION +// Use this macro to check if the client side of the Localization Configuration cluster is included +#define ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_CLIENT +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION_CLIENT + +// Use this macro to check if the server side of the Localization Configuration cluster is included +#define ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION + +// Use this macro to check if the client side of the Unit Localization cluster is included +#define ZCL_USING_UNIT_LOCALIZATION_CLUSTER_CLIENT +#define EMBER_AF_PLUGIN_UNIT_LOCALIZATION_CLIENT + +// Use this macro to check if the server side of the Unit Localization cluster is included +#define ZCL_USING_UNIT_LOCALIZATION_CLUSTER_SERVER +#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 @@ -217,6 +241,11 @@ #define EMBER_AF_PLUGIN_FIXED_LABEL_SERVER #define EMBER_AF_PLUGIN_FIXED_LABEL +// Use this macro to check if the server side of the User Label cluster is included +#define ZCL_USING_USER_LABEL_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_USER_LABEL_SERVER +#define EMBER_AF_PLUGIN_USER_LABEL + // Use this macro to check if the server side of the Boolean State cluster is included #define ZCL_USING_BOOLEAN_STATE_CLUSTER_SERVER #define EMBER_AF_PLUGIN_BOOLEAN_STATE_SERVER @@ -297,6 +326,11 @@ #define EMBER_AF_PLUGIN_RELATIVE_HUMIDITY_MEASUREMENT_SERVER #define EMBER_AF_PLUGIN_RELATIVE_HUMIDITY_MEASUREMENT +// Use this macro to check if the server side of the Occupancy Sensing cluster is included +#define ZCL_USING_OCCUPANCY_SENSING_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_OCCUPANCY_SENSING_SERVER +#define EMBER_AF_PLUGIN_OCCUPANCY_SENSING + // Use this macro to check if the client side of the Target Navigator cluster is included #define ZCL_USING_TARGET_NAVIGATOR_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_TARGET_NAVIGATOR_CLIENT diff --git a/zzz_generated/placeholder/app1/zap-generated/test/Commands.h b/zzz_generated/placeholder/app1/zap-generated/test/Commands.h index 2aa767a3d65ebb..1bf2477979ebdf 100644 --- a/zzz_generated/placeholder/app1/zap-generated/test/Commands.h +++ b/zzz_generated/placeholder/app1/zap-generated/test/Commands.h @@ -1725,6 +1725,513 @@ class Test_TC_WNCV_5_1_SimulatedSuite : public TestCommand } }; +class Test_TC_LCFG_3_1_SimulatedSuite : public TestCommand +{ +public: + Test_TC_LCFG_3_1_SimulatedSuite() : TestCommand("Test_TC_LCFG_3_1_Simulated", 3) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_LCFG_3_1_SimulatedSuite() {} + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the device to be commissioned"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; + return WaitForCommissioning(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "DUT reads SupportedLocales attribute from TH"); + VerifyOrDo(!ShouldSkip("LCFG.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), LocalizationConfiguration::Id, + LocalizationConfiguration::Attributes::SupportedLocales::Id); + } + case 2: { + LogStep(2, "DUT reads ActiveLocale attribute from TH"); + VerifyOrDo(!ShouldSkip("LCFG.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), LocalizationConfiguration::Id, + LocalizationConfiguration::Attributes::ActiveLocale::Id); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_LUNIT_1_1_SimulatedSuite : public TestCommand +{ +public: + Test_TC_LUNIT_1_1_SimulatedSuite() : TestCommand("Test_TC_LUNIT_1_1_Simulated", 6) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_LUNIT_1_1_SimulatedSuite() {} + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the device to be commissioned"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; + return WaitForCommissioning(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "DUT read (0xFFFD) ClusterRevision attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.C.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::ClusterRevision::Id); + } + case 2: { + LogStep(2, "DUT read (0xFFFC) FeatureMap attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.C.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::FeatureMap::Id); + } + case 3: { + LogStep(3, "DUT read (0xFFFB) AttributeList attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.C.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::AttributeList::Id); + } + case 4: { + LogStep(4, "DUT read (0xFFF9) AcceptedCommandList attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.C.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::AcceptedCommandList::Id); + } + case 5: { + LogStep(5, "DUT read (0xFFF8) GeneratedCommandList attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.C.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::GeneratedCommandList::Id); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_LUNIT_2_1_SimulatedSuite : public TestCommand +{ +public: + Test_TC_LUNIT_2_1_SimulatedSuite() : TestCommand("Test_TC_LUNIT_2_1_Simulated", 4) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_LUNIT_2_1_SimulatedSuite() {} + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the device to be commissioned"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; + return WaitForCommissioning(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "DUT reads TemperatureUnit attribute from TH"); + VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::TemperatureUnit::Id); + } + case 2: { + LogStep(2, "DUT writes 3 to TemperatureUnit attribute on TH"); + VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::TemperatureUnit::Id); + } + case 3: { + LogStep(3, "DUT reads TemperatureUnit attribute from TH"); + VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::TemperatureUnit::Id); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_OCC_2_2_SimulatedSuite : public TestCommand +{ +public: + Test_TC_OCC_2_2_SimulatedSuite() : TestCommand("Test_TC_OCC_2_2_Simulated", 13) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_OCC_2_2_SimulatedSuite() {} + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the device to be commissioned"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; + return WaitForCommissioning(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "DUT reads from the TH the (0x0000) Occupancy attribute"); + VerifyOrDo(!ShouldSkip("OCC.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, OccupancySensing::Attributes::Occupancy::Id); + } + case 2: { + LogStep(2, "DUT reads from the TH the (0x0001) OccupancySensorType attribute"); + VerifyOrDo(!ShouldSkip("OCC.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorType::Id); + } + case 3: { + LogStep(3, "DUT reads from the TH the (0x0002) OccupancySensorType attribute"); + VerifyOrDo(!ShouldSkip("OCC.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id); + } + case 4: { + LogStep(4, "DUT reads from the TH the (0x0010) PIROccupiedToUnoccupiedDelay optional attribute"); + VerifyOrDo(!ShouldSkip("OCC.C.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, + OccupancySensing::Attributes::PirOccupiedToUnoccupiedDelay::Id); + } + case 5: { + LogStep(5, "DUT reads from the TH the (0x0011) PIRUnoccupiedToOccupiedDelay optional attribute"); + VerifyOrDo(!ShouldSkip("OCC.C.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, + OccupancySensing::Attributes::PirUnoccupiedToOccupiedDelay::Id); + } + case 6: { + LogStep(6, "DUT reads from the TH the (0x0012) PIRUnoccupiedToOccupiedThreshold optional attribute"); + VerifyOrDo(!ShouldSkip("OCC.C.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, + OccupancySensing::Attributes::PirUnoccupiedToOccupiedThreshold::Id); + } + case 7: { + LogStep(7, "DUT reads from the TH the (0x0020) UltrasonicOccupiedToUnoccupiedDelay optional attribute"); + VerifyOrDo(!ShouldSkip("OCC.C.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, + OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id); + } + case 8: { + LogStep(8, "DUT reads from the TH the (0x0021) UltrasonicUnoccupiedToOccupiedDelay optional attribute"); + VerifyOrDo(!ShouldSkip("OCC.C.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, + OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id); + } + case 9: { + LogStep(9, "DUT reads from the TH the (0x0022) UltrasonicUnoccupiedToOccupiedThreshold optional attribute"); + VerifyOrDo(!ShouldSkip("OCC.C.A0022"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, + OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id); + } + case 10: { + LogStep(10, "DUT reads from the TH the (0x0030) PhysicalContactOccupiedToUnoccupiedDelay optional attribute"); + VerifyOrDo(!ShouldSkip("OCC.C.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, + OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id); + } + case 11: { + LogStep(11, "DUT reads from the TH the (0x0031) PhysicalContactUnoccupiedToOccupiedDelay optional attribute"); + VerifyOrDo(!ShouldSkip("OCC.C.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, + OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id); + } + case 12: { + LogStep(12, "DUT reads from the TH the (0x0032) PhysicalContactUnoccupiedToOccupiedThreshold optional attribute"); + VerifyOrDo(!ShouldSkip("OCC.C.A0032"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, + OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_OCC_2_4_SimulatedSuite : public TestCommand +{ +public: + Test_TC_OCC_2_4_SimulatedSuite() : TestCommand("Test_TC_OCC_2_4_Simulated", 3) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_OCC_2_4_SimulatedSuite() {} + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the device to be commissioned"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; + return WaitForCommissioning(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH reads OccupancySensorType attribute from DUT"); + VerifyOrDo(!ShouldSkip("OCC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorType::Id); + } + case 2: { + LogStep(2, "TH reads OccupancySensorTypeBitmap attribute from DUT"); + VerifyOrDo(!ShouldSkip("OCC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_ULABEL_3_1_SimulatedSuite : public TestCommand +{ +public: + Test_TC_ULABEL_3_1_SimulatedSuite() : TestCommand("Test_TC_ULABEL_3_1_Simulated", 3) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_ULABEL_3_1_SimulatedSuite() {} + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the device to be commissioned"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; + return WaitForCommissioning(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Read attribute: LabelList"); + VerifyOrDo(!ShouldSkip("ULABEL.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), UserLabel::Id, UserLabel::Attributes::LabelList::Id); + } + case 2: { + LogStep(2, "write attribute: LabelList"); + VerifyOrDo(!ShouldSkip("ULABEL.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), UserLabel::Id, UserLabel::Attributes::LabelList::Id); + } + } + return CHIP_NO_ERROR; + } +}; + std::unique_ptr GetTestCommand(std::string testName) { if (testName == "Test_TC_BINFO_2_3_Simulated") @@ -1803,6 +2310,30 @@ std::unique_ptr GetTestCommand(std::string testName) { return std::unique_ptr(new Test_TC_WNCV_5_1_SimulatedSuite()); } + if (testName == "Test_TC_LCFG_3_1_Simulated") + { + return std::unique_ptr(new Test_TC_LCFG_3_1_SimulatedSuite()); + } + if (testName == "Test_TC_LUNIT_1_1_Simulated") + { + return std::unique_ptr(new Test_TC_LUNIT_1_1_SimulatedSuite()); + } + if (testName == "Test_TC_LUNIT_2_1_Simulated") + { + return std::unique_ptr(new Test_TC_LUNIT_2_1_SimulatedSuite()); + } + if (testName == "Test_TC_OCC_2_2_Simulated") + { + return std::unique_ptr(new Test_TC_OCC_2_2_SimulatedSuite()); + } + if (testName == "Test_TC_OCC_2_4_Simulated") + { + return std::unique_ptr(new Test_TC_OCC_2_4_SimulatedSuite()); + } + if (testName == "Test_TC_ULABEL_3_1_Simulated") + { + return std::unique_ptr(new Test_TC_ULABEL_3_1_SimulatedSuite()); + } return nullptr; } @@ -1829,4 +2360,10 @@ void PrintTestCommands() ChipLogError(chipTool, "\t* Test_TC_RH_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_SWTCH_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_WNCV_5_1_Simulated"); + ChipLogError(chipTool, "\t* Test_TC_LCFG_3_1_Simulated"); + ChipLogError(chipTool, "\t* Test_TC_LUNIT_1_1_Simulated"); + ChipLogError(chipTool, "\t* Test_TC_LUNIT_2_1_Simulated"); + ChipLogError(chipTool, "\t* Test_TC_OCC_2_2_Simulated"); + ChipLogError(chipTool, "\t* Test_TC_OCC_2_4_Simulated"); + ChipLogError(chipTool, "\t* Test_TC_ULABEL_3_1_Simulated"); } diff --git a/zzz_generated/placeholder/app2/zap-generated/access.h b/zzz_generated/placeholder/app2/zap-generated/access.h index a4d242bb1e7d28..c86680f21431c5 100644 --- a/zzz_generated/placeholder/app2/zap-generated/access.h +++ b/zzz_generated/placeholder/app2/zap-generated/access.h @@ -40,6 +40,7 @@ 49, /* Cluster: Network Commissioning, Attribute: LastNetworkingStatus, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Attribute: LastNetworkID, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Attribute: LastConnectErrorValue, Privilege: administer */ \ + /* Cluster: User Label, Attribute: label list, Privilege: view */ \ /* Cluster: Window Covering, Attribute: Mode, Privilege: view */ \ /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: view */ \ /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: view */ \ @@ -55,6 +56,15 @@ /* Cluster: Thermostat User Interface Configuration, Attribute: keypad lockout, Privilege: view */ \ /* Cluster: Thermostat User Interface Configuration, Attribute: schedule programming visibility, Privilege: view */ \ /* Cluster: Color Control, Attribute: StartUpColorTemperatureMireds, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: PIR occupied to unoccupied delay, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: PIR unoccupied to occupied delay, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: PIR unoccupied to occupied threshold, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: ultrasonic occupied to unoccupied delay, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: ultrasonic unoccupied to occupied delay, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: ultrasonic unoccupied to occupied threshold, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: physical contact occupied to unoccupied delay, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: physical contact unoccupied to occupied delay, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: physical contact unoccupied to occupied threshold, Privilege: view */ \ } // Parallel array data (cluster, *attribute*, privilege) for read attribute @@ -70,6 +80,7 @@ 5, /* Cluster: Network Commissioning, Attribute: LastNetworkingStatus, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Attribute: LastNetworkID, Privilege: administer */ \ 7, /* Cluster: Network Commissioning, Attribute: LastConnectErrorValue, Privilege: administer */ \ + /* Cluster: User Label, Attribute: label list, Privilege: view */ \ /* Cluster: Window Covering, Attribute: Mode, Privilege: view */ \ /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: view */ \ /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: view */ \ @@ -85,6 +96,15 @@ /* Cluster: Thermostat User Interface Configuration, Attribute: keypad lockout, Privilege: view */ \ /* Cluster: Thermostat User Interface Configuration, Attribute: schedule programming visibility, Privilege: view */ \ /* Cluster: Color Control, Attribute: StartUpColorTemperatureMireds, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: PIR occupied to unoccupied delay, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: PIR unoccupied to occupied delay, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: PIR unoccupied to occupied threshold, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: ultrasonic occupied to unoccupied delay, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: ultrasonic unoccupied to occupied delay, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: ultrasonic unoccupied to occupied threshold, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: physical contact occupied to unoccupied delay, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: physical contact unoccupied to occupied delay, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: physical contact unoccupied to occupied threshold, Privilege: view */ \ } // Parallel array data (cluster, attribute, *privilege*) for read attribute @@ -100,6 +120,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Attribute: LastNetworkingStatus, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Attribute: LastNetworkID, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Attribute: LastConnectErrorValue, Privilege: administer */ \ + /* Cluster: User Label, Attribute: label list, Privilege: view */ \ /* Cluster: Window Covering, Attribute: Mode, Privilege: view */ \ /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: view */ \ /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: view */ \ @@ -115,6 +136,15 @@ /* Cluster: Thermostat User Interface Configuration, Attribute: keypad lockout, Privilege: view */ \ /* Cluster: Thermostat User Interface Configuration, Attribute: schedule programming visibility, Privilege: view */ \ /* Cluster: Color Control, Attribute: StartUpColorTemperatureMireds, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: PIR occupied to unoccupied delay, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: PIR unoccupied to occupied delay, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: PIR unoccupied to occupied threshold, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: ultrasonic occupied to unoccupied delay, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: ultrasonic unoccupied to occupied delay, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: ultrasonic unoccupied to occupied threshold, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: physical contact occupied to unoccupied delay, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: physical contact unoccupied to occupied delay, Privilege: view */ \ + /* Cluster: Occupancy Sensing, Attribute: physical contact unoccupied to occupied threshold, Privilege: view */ \ } //////////////////////////////////////////////////////////////////////////////// @@ -127,6 +157,7 @@ 40, /* Cluster: Basic Information, Attribute: LocalConfigDisabled, Privilege: manage */ \ 48, /* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: administer */ \ + 65, /* Cluster: User Label, Attribute: label list, Privilege: manage */ \ 258, /* Cluster: Window Covering, Attribute: Mode, Privilege: manage */ \ 512, /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: manage */ \ 512, /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: manage */ \ @@ -142,6 +173,15 @@ 516, /* Cluster: Thermostat User Interface Configuration, Attribute: keypad lockout, Privilege: manage */ \ 516, /* Cluster: Thermostat User Interface Configuration, Attribute: schedule programming visibility, Privilege: manage */ \ 768, /* Cluster: Color Control, Attribute: StartUpColorTemperatureMireds, Privilege: manage */ \ + 1030, /* Cluster: Occupancy Sensing, Attribute: PIR occupied to unoccupied delay, Privilege: manage */ \ + 1030, /* Cluster: Occupancy Sensing, Attribute: PIR unoccupied to occupied delay, Privilege: manage */ \ + 1030, /* Cluster: Occupancy Sensing, Attribute: PIR unoccupied to occupied threshold, Privilege: manage */ \ + 1030, /* Cluster: Occupancy Sensing, Attribute: ultrasonic occupied to unoccupied delay, Privilege: manage */ \ + 1030, /* Cluster: Occupancy Sensing, Attribute: ultrasonic unoccupied to occupied delay, Privilege: manage */ \ + 1030, /* Cluster: Occupancy Sensing, Attribute: ultrasonic unoccupied to occupied threshold, Privilege: manage */ \ + 1030, /* Cluster: Occupancy Sensing, Attribute: physical contact occupied to unoccupied delay, Privilege: manage */ \ + 1030, /* Cluster: Occupancy Sensing, Attribute: physical contact unoccupied to occupied delay, Privilege: manage */ \ + 1030, /* Cluster: Occupancy Sensing, Attribute: physical contact unoccupied to occupied threshold, Privilege: manage */ \ } // Parallel array data (cluster, *attribute*, privilege) for write attribute @@ -152,6 +192,7 @@ 16, /* Cluster: Basic Information, Attribute: LocalConfigDisabled, Privilege: manage */ \ 0, /* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: administer */ \ 4, /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: administer */ \ + 0, /* Cluster: User Label, Attribute: label list, Privilege: manage */ \ 23, /* Cluster: Window Covering, Attribute: Mode, Privilege: manage */ \ 21, /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: manage */ \ 23, /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: manage */ \ @@ -167,6 +208,15 @@ 1, /* Cluster: Thermostat User Interface Configuration, Attribute: keypad lockout, Privilege: manage */ \ 2, /* Cluster: Thermostat User Interface Configuration, Attribute: schedule programming visibility, Privilege: manage */ \ 16400, /* Cluster: Color Control, Attribute: StartUpColorTemperatureMireds, Privilege: manage */ \ + 16, /* Cluster: Occupancy Sensing, Attribute: PIR occupied to unoccupied delay, Privilege: manage */ \ + 17, /* Cluster: Occupancy Sensing, Attribute: PIR unoccupied to occupied delay, Privilege: manage */ \ + 18, /* Cluster: Occupancy Sensing, Attribute: PIR unoccupied to occupied threshold, Privilege: manage */ \ + 32, /* Cluster: Occupancy Sensing, Attribute: ultrasonic occupied to unoccupied delay, Privilege: manage */ \ + 33, /* Cluster: Occupancy Sensing, Attribute: ultrasonic unoccupied to occupied delay, Privilege: manage */ \ + 34, /* Cluster: Occupancy Sensing, Attribute: ultrasonic unoccupied to occupied threshold, Privilege: manage */ \ + 48, /* Cluster: Occupancy Sensing, Attribute: physical contact occupied to unoccupied delay, Privilege: manage */ \ + 49, /* Cluster: Occupancy Sensing, Attribute: physical contact unoccupied to occupied delay, Privilege: manage */ \ + 50, /* Cluster: Occupancy Sensing, Attribute: physical contact unoccupied to occupied threshold, Privilege: manage */ \ } // Parallel array data (cluster, attribute, *privilege*) for write attribute @@ -177,6 +227,7 @@ kMatterAccessPrivilegeManage, /* Cluster: Basic Information, Attribute: LocalConfigDisabled, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: User Label, Attribute: label list, Privilege: manage */ \ kMatterAccessPrivilegeManage, /* Cluster: Window Covering, Attribute: Mode, Privilege: manage */ \ kMatterAccessPrivilegeManage, /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: manage */ \ kMatterAccessPrivilegeManage, /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: manage */ \ @@ -192,6 +243,15 @@ kMatterAccessPrivilegeManage, /* Cluster: Thermostat User Interface Configuration, Attribute: keypad lockout, Privilege: manage */ \ kMatterAccessPrivilegeManage, /* Cluster: Thermostat User Interface Configuration, Attribute: schedule programming visibility, Privilege: manage */ \ kMatterAccessPrivilegeManage, /* Cluster: Color Control, Attribute: StartUpColorTemperatureMireds, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Occupancy Sensing, Attribute: PIR occupied to unoccupied delay, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Occupancy Sensing, Attribute: PIR unoccupied to occupied delay, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Occupancy Sensing, Attribute: PIR unoccupied to occupied threshold, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Occupancy Sensing, Attribute: ultrasonic occupied to unoccupied delay, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Occupancy Sensing, Attribute: ultrasonic unoccupied to occupied delay, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Occupancy Sensing, Attribute: ultrasonic unoccupied to occupied threshold, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Occupancy Sensing, Attribute: physical contact occupied to unoccupied delay, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Occupancy Sensing, Attribute: physical contact unoccupied to occupied delay, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Occupancy Sensing, Attribute: physical contact unoccupied to occupied threshold, Privilege: manage */ \ } //////////////////////////////////////////////////////////////////////////////// diff --git a/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h b/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h index f093105b6d1d17..8178333b2e0d40 100644 --- a/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h +++ b/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h @@ -68,13 +68,16 @@ } // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 17 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 27 #define GENERATED_MIN_MAX_DEFAULTS \ { \ \ /* Endpoint: 0, Cluster: On/Off (server) */ \ { (uint16_t) 0xFF, (uint16_t) 0x0, (uint16_t) 0x2 }, /* StartUpOnOff */ \ \ + /* Endpoint: 0, Cluster: Unit Localization (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x2 }, /* TemperatureUnit */ \ + \ /* Endpoint: 0, Cluster: Window Covering (server) */ \ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xF }, /* Mode */ \ \ @@ -98,15 +101,26 @@ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x5 }, /* keypad lockout */ \ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 }, /* schedule programming visibility */ \ \ - /* Endpoint: 1, Cluster: Color Control (server) */ \ + /* Endpoint: 1, Cluster: Color Control (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* StartUpColorTemperatureMireds */ \ + \ + /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFFFE }, /* PIR occupied to unoccupied delay */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFFFE }, /* PIR unoccupied to occupied delay */ \ + { (uint16_t) 0x1, (uint16_t) 0x1, (uint16_t) 0xFE }, /* PIR unoccupied to occupied threshold */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFFFE }, /* ultrasonic occupied to unoccupied delay */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFFFE }, /* ultrasonic unoccupied to occupied delay */ \ + { (uint16_t) 0x1, (uint16_t) 0x1, (uint16_t) 0xFE }, /* ultrasonic unoccupied to occupied threshold */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFFFE }, /* physical contact occupied to unoccupied delay */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFFFE }, /* physical contact unoccupied to occupied delay */ \ { \ - (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF \ - } /* StartUpColorTemperatureMireds */ \ + (uint16_t) 0x1, (uint16_t) 0x1, (uint16_t) 0xFE \ + } /* physical contact unoccupied to occupied threshold */ \ } #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 338 +#define GENERATED_ATTRIBUTE_COUNT 362 #define GENERATED_ATTRIBUTES \ { \ \ @@ -182,6 +196,19 @@ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ + /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { 0x00000000, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + \ + /* Endpoint: 0, Cluster: Unit Localization (server) */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, \ + ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* TemperatureUnit */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + \ /* Endpoint: 0, Cluster: Power Source Configuration (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Sources */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ @@ -349,6 +376,12 @@ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ + /* Endpoint: 0, Cluster: User Label (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* label list */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ClusterRevision */ \ + \ /* Endpoint: 0, Cluster: Boolean State (server) */ \ { 0x00000000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* StateValue */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ @@ -396,7 +429,7 @@ ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitTilt */ \ { 0x00000017, ZAP_TYPE(BITMAP8), 1, \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* Mode */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* Mode */ \ { 0x0000001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* SafetyStatus */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0x17) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ @@ -426,9 +459,9 @@ { 0x00000017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0x00000000) }, /* LifetimeEnergyConsumed */ \ { 0x00000020, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* OperationMode */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(3) }, /* OperationMode */ \ { 0x00000021, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(3) }, /* ControlMode */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(4) }, /* ControlMode */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ @@ -438,23 +471,23 @@ { 0x00000005, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x0640) }, /* AbsMinCoolSetpointLimit */ \ { 0x00000006, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x0C80) }, /* AbsMaxCoolSetpointLimit */ \ { 0x00000011, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(4) }, /* OccupiedCoolingSetpoint */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(5) }, /* OccupiedCoolingSetpoint */ \ { 0x00000012, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(5) }, /* OccupiedHeatingSetpoint */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(6) }, /* OccupiedHeatingSetpoint */ \ { 0x00000015, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(6) }, /* MinHeatSetpointLimit */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(7) }, /* MinHeatSetpointLimit */ \ { 0x00000016, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(7) }, /* MaxHeatSetpointLimit */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(8) }, /* MaxHeatSetpointLimit */ \ { 0x00000017, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(8) }, /* MinCoolSetpointLimit */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(9) }, /* MinCoolSetpointLimit */ \ { 0x00000018, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(9) }, /* MaxCoolSetpointLimit */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(10) }, /* MaxCoolSetpointLimit */ \ { 0x00000019, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(10) }, /* MinSetpointDeadBand */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(11) }, /* MinSetpointDeadBand */ \ { 0x0000001B, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(11) }, /* ControlSequenceOfOperation */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(12) }, /* ControlSequenceOfOperation */ \ { 0x0000001C, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(12) }, /* SystemMode */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(13) }, /* SystemMode */ \ { 0x00000020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* StartOfWeek */ \ { 0x00000021, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(7) }, /* NumberOfWeeklyTransitions */ \ { 0x00000022, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(4) }, /* NumberOfDailyTransitions */ \ @@ -463,11 +496,11 @@ \ /* Endpoint: 0, Cluster: Thermostat User Interface Configuration (server) */ \ { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(13) }, /* temperature display mode */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(14) }, /* temperature display mode */ \ { 0x00000001, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(14) }, /* keypad lockout */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(15) }, /* keypad lockout */ \ { 0x00000002, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(15) }, /* schedule programming visibility */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(16) }, /* schedule programming visibility */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ @@ -633,9 +666,34 @@ { 0x0000400D, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* CoupleColorTempToLevelMinMireds */ \ { 0x00004010, ZAP_TYPE(INT16U), 2, \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(16) }, /* StartUpColorTemperatureMireds */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(17) }, /* StartUpColorTemperatureMireds */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ + \ + /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ + { 0x00000000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* occupancy */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* occupancy sensor type */ \ + { 0x00000002, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* occupancy sensor type bitmap */ \ + { 0x00000010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(18) }, /* PIR occupied to unoccupied delay */ \ + { 0x00000011, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(19) }, /* PIR unoccupied to occupied delay */ \ + { 0x00000012, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(20) }, /* PIR unoccupied to occupied threshold */ \ + { 0x00000020, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(21) }, /* ultrasonic occupied to unoccupied delay */ \ + { 0x00000021, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(22) }, /* ultrasonic unoccupied to occupied delay */ \ + { 0x00000022, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(23) }, /* ultrasonic unoccupied to occupied threshold */ \ + { 0x00000030, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(24) }, /* physical contact occupied to unoccupied delay */ \ + { 0x00000031, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(25) }, /* physical contact unoccupied to occupied delay */ \ + { 0x00000032, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(26) }, /* physical contact unoccupied to occupied threshold */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ClusterRevision */ \ } // This is an array of EmberAfCluster structures. @@ -648,6 +706,10 @@ const EmberAfGenericClusterFunction chipFuncArrayOnOffServer[] = { \ (EmberAfGenericClusterFunction) emberAfOnOffClusterServerInitCallback, \ }; \ + const EmberAfGenericClusterFunction chipFuncArrayLocalizationConfigurationServer[] = { \ + (EmberAfGenericClusterFunction) emberAfLocalizationConfigurationClusterServerInitCallback, \ + (EmberAfGenericClusterFunction) MatterLocalizationConfigurationClusterServerPreAttributeChangedCallback, \ + }; \ const EmberAfGenericClusterFunction chipFuncArrayModeSelectServer[] = { \ (EmberAfGenericClusterFunction) emberAfModeSelectClusterServerInitCallback, \ (EmberAfGenericClusterFunction) MatterModeSelectClusterServerPreAttributeChangedCallback, \ @@ -682,6 +744,9 @@ }; \ const EmberAfGenericClusterFunction chipFuncArrayColorControlServer[] = { \ (EmberAfGenericClusterFunction) emberAfColorControlClusterServerInitCallback, \ + }; \ + const EmberAfGenericClusterFunction chipFuncArrayOccupancySensingServer[] = { \ + (EmberAfGenericClusterFunction) emberAfOccupancySensingClusterServerInitCallback, \ }; // clang-format off @@ -860,7 +925,7 @@ // clang-format on #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 52 +#define GENERATED_CLUSTER_COUNT 56 // clang-format off #define GENERATED_CLUSTERS { \ @@ -919,10 +984,32 @@ .acceptedCommandList = nullptr ,\ .generatedCommandList = nullptr ,\ },\ + { \ + /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + .clusterId = 0x0000002B, \ + .attributes = ZAP_ATTRIBUTE_INDEX(40), \ + .attributeCount = 4, \ + .clusterSize = 42, \ + .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ + .functions = chipFuncArrayLocalizationConfigurationServer, \ + .acceptedCommandList = nullptr ,\ + .generatedCommandList = nullptr ,\ + },\ + { \ + /* Endpoint: 0, Cluster: Unit Localization (server) */ \ + .clusterId = 0x0000002D, \ + .attributes = ZAP_ATTRIBUTE_INDEX(44), \ + .attributeCount = 3, \ + .clusterSize = 7, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .acceptedCommandList = nullptr ,\ + .generatedCommandList = nullptr ,\ + },\ { \ /* Endpoint: 0, Cluster: Power Source Configuration (server) */ \ .clusterId = 0x0000002E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(40), \ + .attributes = ZAP_ATTRIBUTE_INDEX(47), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -933,7 +1020,7 @@ { \ /* Endpoint: 0, Cluster: Power Source (server) */ \ .clusterId = 0x0000002F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(43), \ + .attributes = ZAP_ATTRIBUTE_INDEX(50), \ .attributeCount = 33, \ .clusterSize = 228, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -944,7 +1031,7 @@ { \ /* Endpoint: 0, Cluster: General Commissioning (client) */ \ .clusterId = 0x00000030, \ - .attributes = ZAP_ATTRIBUTE_INDEX(76), \ + .attributes = ZAP_ATTRIBUTE_INDEX(83), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -955,7 +1042,7 @@ { \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ .clusterId = 0x00000030, \ - .attributes = ZAP_ATTRIBUTE_INDEX(76), \ + .attributes = ZAP_ATTRIBUTE_INDEX(83), \ .attributeCount = 7, \ .clusterSize = 14, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -966,7 +1053,7 @@ { \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ .clusterId = 0x00000031, \ - .attributes = ZAP_ATTRIBUTE_INDEX(83), \ + .attributes = ZAP_ATTRIBUTE_INDEX(90), \ .attributeCount = 10, \ .clusterSize = 48, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -977,7 +1064,7 @@ { \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ .clusterId = 0x00000033, \ - .attributes = ZAP_ATTRIBUTE_INDEX(93), \ + .attributes = ZAP_ATTRIBUTE_INDEX(100), \ .attributeCount = 11, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -988,7 +1075,7 @@ { \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ .clusterId = 0x00000034, \ - .attributes = ZAP_ATTRIBUTE_INDEX(104), \ + .attributes = ZAP_ATTRIBUTE_INDEX(111), \ .attributeCount = 6, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -999,7 +1086,7 @@ { \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ .clusterId = 0x00000036, \ - .attributes = ZAP_ATTRIBUTE_INDEX(110), \ + .attributes = ZAP_ATTRIBUTE_INDEX(117), \ .attributeCount = 15, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1010,7 +1097,7 @@ { \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ .clusterId = 0x00000037, \ - .attributes = ZAP_ATTRIBUTE_INDEX(125), \ + .attributes = ZAP_ATTRIBUTE_INDEX(132), \ .attributeCount = 11, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1021,7 +1108,7 @@ { \ /* Endpoint: 0, Cluster: Switch (client) */ \ .clusterId = 0x0000003B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(136), \ + .attributes = ZAP_ATTRIBUTE_INDEX(143), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -1032,7 +1119,7 @@ { \ /* Endpoint: 0, Cluster: Switch (server) */ \ .clusterId = 0x0000003B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(136), \ + .attributes = ZAP_ATTRIBUTE_INDEX(143), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1043,7 +1130,7 @@ { \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ .clusterId = 0x0000003C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(141), \ + .attributes = ZAP_ATTRIBUTE_INDEX(148), \ .attributeCount = 5, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1054,7 +1141,7 @@ { \ /* Endpoint: 0, Cluster: Operational Credentials (client) */ \ .clusterId = 0x0000003E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(146), \ + .attributes = ZAP_ATTRIBUTE_INDEX(153), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -1065,7 +1152,7 @@ { \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ .clusterId = 0x0000003E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(146), \ + .attributes = ZAP_ATTRIBUTE_INDEX(153), \ .attributeCount = 7, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1073,10 +1160,21 @@ .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 38 ) ,\ .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 47 ) ,\ },\ + { \ + /* Endpoint: 0, Cluster: User Label (server) */ \ + .clusterId = 0x00000041, \ + .attributes = ZAP_ATTRIBUTE_INDEX(160), \ + .attributeCount = 3, \ + .clusterSize = 4, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .acceptedCommandList = nullptr ,\ + .generatedCommandList = nullptr ,\ + },\ { \ /* Endpoint: 0, Cluster: Boolean State (server) */ \ .clusterId = 0x00000045, \ - .attributes = ZAP_ATTRIBUTE_INDEX(153), \ + .attributes = ZAP_ATTRIBUTE_INDEX(163), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1087,7 +1185,7 @@ { \ /* Endpoint: 0, Cluster: Mode Select (client) */ \ .clusterId = 0x00000050, \ - .attributes = ZAP_ATTRIBUTE_INDEX(156), \ + .attributes = ZAP_ATTRIBUTE_INDEX(166), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -1098,7 +1196,7 @@ { \ /* Endpoint: 0, Cluster: Mode Select (server) */ \ .clusterId = 0x00000050, \ - .attributes = ZAP_ATTRIBUTE_INDEX(156), \ + .attributes = ZAP_ATTRIBUTE_INDEX(166), \ .attributeCount = 7, \ .clusterSize = 41, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -1109,7 +1207,7 @@ { \ /* Endpoint: 0, Cluster: Window Covering (server) */ \ .clusterId = 0x00000102, \ - .attributes = ZAP_ATTRIBUTE_INDEX(163), \ + .attributes = ZAP_ATTRIBUTE_INDEX(173), \ .attributeCount = 20, \ .clusterSize = 35, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ @@ -1120,7 +1218,7 @@ { \ /* Endpoint: 0, Cluster: Pump Configuration and Control (server) */ \ .clusterId = 0x00000200, \ - .attributes = ZAP_ATTRIBUTE_INDEX(183), \ + .attributes = ZAP_ATTRIBUTE_INDEX(193), \ .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), \ @@ -1131,7 +1229,7 @@ { \ /* Endpoint: 0, Cluster: Thermostat (server) */ \ .clusterId = 0x00000201, \ - .attributes = ZAP_ATTRIBUTE_INDEX(208), \ + .attributes = ZAP_ATTRIBUTE_INDEX(218), \ .attributeCount = 18, \ .clusterSize = 32, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -1142,7 +1240,7 @@ { \ /* Endpoint: 0, Cluster: Thermostat User Interface Configuration (client) */ \ .clusterId = 0x00000204, \ - .attributes = ZAP_ATTRIBUTE_INDEX(226), \ + .attributes = ZAP_ATTRIBUTE_INDEX(236), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -1153,7 +1251,7 @@ { \ /* Endpoint: 0, Cluster: Thermostat User Interface Configuration (server) */ \ .clusterId = 0x00000204, \ - .attributes = ZAP_ATTRIBUTE_INDEX(226), \ + .attributes = ZAP_ATTRIBUTE_INDEX(236), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -1164,7 +1262,7 @@ { \ /* Endpoint: 0, Cluster: Illuminance Measurement (server) */ \ .clusterId = 0x00000400, \ - .attributes = ZAP_ATTRIBUTE_INDEX(231), \ + .attributes = ZAP_ATTRIBUTE_INDEX(241), \ .attributeCount = 7, \ .clusterSize = 15, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1175,7 +1273,7 @@ { \ /* Endpoint: 0, Cluster: Temperature Measurement (client) */ \ .clusterId = 0x00000402, \ - .attributes = ZAP_ATTRIBUTE_INDEX(238), \ + .attributes = ZAP_ATTRIBUTE_INDEX(248), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -1186,7 +1284,7 @@ { \ /* Endpoint: 0, Cluster: Temperature Measurement (server) */ \ .clusterId = 0x00000402, \ - .attributes = ZAP_ATTRIBUTE_INDEX(238), \ + .attributes = ZAP_ATTRIBUTE_INDEX(248), \ .attributeCount = 6, \ .clusterSize = 14, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1197,7 +1295,7 @@ { \ /* Endpoint: 0, Cluster: Pressure Measurement (server) */ \ .clusterId = 0x00000403, \ - .attributes = ZAP_ATTRIBUTE_INDEX(244), \ + .attributes = ZAP_ATTRIBUTE_INDEX(254), \ .attributeCount = 11, \ .clusterSize = 23, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1208,7 +1306,7 @@ { \ /* Endpoint: 0, Cluster: Flow Measurement (server) */ \ .clusterId = 0x00000404, \ - .attributes = ZAP_ATTRIBUTE_INDEX(255), \ + .attributes = ZAP_ATTRIBUTE_INDEX(265), \ .attributeCount = 6, \ .clusterSize = 14, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1219,7 +1317,7 @@ { \ /* Endpoint: 0, Cluster: Relative Humidity Measurement (client) */ \ .clusterId = 0x00000405, \ - .attributes = ZAP_ATTRIBUTE_INDEX(261), \ + .attributes = ZAP_ATTRIBUTE_INDEX(271), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -1230,7 +1328,7 @@ { \ /* Endpoint: 0, Cluster: Relative Humidity Measurement (server) */ \ .clusterId = 0x00000405, \ - .attributes = ZAP_ATTRIBUTE_INDEX(261), \ + .attributes = ZAP_ATTRIBUTE_INDEX(271), \ .attributeCount = 6, \ .clusterSize = 14, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1241,7 +1339,7 @@ { \ /* Endpoint: 0, Cluster: Target Navigator (client) */ \ .clusterId = 0x00000505, \ - .attributes = ZAP_ATTRIBUTE_INDEX(267), \ + .attributes = ZAP_ATTRIBUTE_INDEX(277), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -1252,7 +1350,7 @@ { \ /* Endpoint: 0, Cluster: Target Navigator (server) */ \ .clusterId = 0x00000505, \ - .attributes = ZAP_ATTRIBUTE_INDEX(267), \ + .attributes = ZAP_ATTRIBUTE_INDEX(277), \ .attributeCount = 4, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1263,7 +1361,7 @@ { \ /* Endpoint: 0, Cluster: Keypad Input (client) */ \ .clusterId = 0x00000509, \ - .attributes = ZAP_ATTRIBUTE_INDEX(271), \ + .attributes = ZAP_ATTRIBUTE_INDEX(281), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -1274,7 +1372,7 @@ { \ /* Endpoint: 0, Cluster: Keypad Input (server) */ \ .clusterId = 0x00000509, \ - .attributes = ZAP_ATTRIBUTE_INDEX(271), \ + .attributes = ZAP_ATTRIBUTE_INDEX(281), \ .attributeCount = 2, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1285,7 +1383,7 @@ { \ /* Endpoint: 0, Cluster: Content Launcher (client) */ \ .clusterId = 0x0000050A, \ - .attributes = ZAP_ATTRIBUTE_INDEX(273), \ + .attributes = ZAP_ATTRIBUTE_INDEX(283), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -1296,7 +1394,7 @@ { \ /* Endpoint: 0, Cluster: Content Launcher (server) */ \ .clusterId = 0x0000050A, \ - .attributes = ZAP_ATTRIBUTE_INDEX(273), \ + .attributes = ZAP_ATTRIBUTE_INDEX(283), \ .attributeCount = 4, \ .clusterSize = 10, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1307,7 +1405,7 @@ { \ /* Endpoint: 0, Cluster: Application Basic (client) */ \ .clusterId = 0x0000050D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(277), \ + .attributes = ZAP_ATTRIBUTE_INDEX(287), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -1318,7 +1416,7 @@ { \ /* Endpoint: 0, Cluster: Application Basic (server) */ \ .clusterId = 0x0000050D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(277), \ + .attributes = ZAP_ATTRIBUTE_INDEX(287), \ .attributeCount = 10, \ .clusterSize = 110, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1329,7 +1427,7 @@ { \ /* Endpoint: 1, Cluster: Identify (server) */ \ .clusterId = 0x00000003, \ - .attributes = ZAP_ATTRIBUTE_INDEX(287), \ + .attributes = ZAP_ATTRIBUTE_INDEX(297), \ .attributeCount = 4, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ @@ -1340,7 +1438,7 @@ { \ /* Endpoint: 1, Cluster: Groups (server) */ \ .clusterId = 0x00000004, \ - .attributes = ZAP_ATTRIBUTE_INDEX(291), \ + .attributes = ZAP_ATTRIBUTE_INDEX(301), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -1351,7 +1449,7 @@ { \ /* Endpoint: 1, Cluster: Scenes (server) */ \ .clusterId = 0x00000005, \ - .attributes = ZAP_ATTRIBUTE_INDEX(294), \ + .attributes = ZAP_ATTRIBUTE_INDEX(304), \ .attributeCount = 7, \ .clusterSize = 12, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -1362,7 +1460,7 @@ { \ /* Endpoint: 1, Cluster: On/Off (client) */ \ .clusterId = 0x00000006, \ - .attributes = ZAP_ATTRIBUTE_INDEX(301), \ + .attributes = ZAP_ATTRIBUTE_INDEX(311), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -1373,7 +1471,7 @@ { \ /* Endpoint: 1, Cluster: On/Off (server) */ \ .clusterId = 0x00000006, \ - .attributes = ZAP_ATTRIBUTE_INDEX(301), \ + .attributes = ZAP_ATTRIBUTE_INDEX(311), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -1384,7 +1482,7 @@ { \ /* Endpoint: 1, Cluster: Level Control (server) */ \ .clusterId = 0x00000008, \ - .attributes = ZAP_ATTRIBUTE_INDEX(304), \ + .attributes = ZAP_ATTRIBUTE_INDEX(314), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -1395,7 +1493,7 @@ { \ /* Endpoint: 1, Cluster: Basic Information (server) */ \ .clusterId = 0x00000028, \ - .attributes = ZAP_ATTRIBUTE_INDEX(307), \ + .attributes = ZAP_ATTRIBUTE_INDEX(317), \ .attributeCount = 22, \ .clusterSize = 41, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1406,7 +1504,7 @@ { \ /* Endpoint: 1, Cluster: Fixed Label (client) */ \ .clusterId = 0x00000040, \ - .attributes = ZAP_ATTRIBUTE_INDEX(329), \ + .attributes = ZAP_ATTRIBUTE_INDEX(339), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -1417,7 +1515,7 @@ { \ /* Endpoint: 1, Cluster: Fixed Label (server) */ \ .clusterId = 0x00000040, \ - .attributes = ZAP_ATTRIBUTE_INDEX(329), \ + .attributes = ZAP_ATTRIBUTE_INDEX(339), \ .attributeCount = 2, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1428,7 +1526,7 @@ { \ /* Endpoint: 1, Cluster: Color Control (server) */ \ .clusterId = 0x00000300, \ - .attributes = ZAP_ATTRIBUTE_INDEX(331), \ + .attributes = ZAP_ATTRIBUTE_INDEX(341), \ .attributeCount = 7, \ .clusterSize = 15, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -1436,18 +1534,29 @@ .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 117 ) ,\ .generatedCommandList = nullptr ,\ },\ + { \ + /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ + .clusterId = 0x00000406, \ + .attributes = ZAP_ATTRIBUTE_INDEX(348), \ + .attributeCount = 14, \ + .clusterSize = 22, \ + .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ + .functions = chipFuncArrayOccupancySensingServer, \ + .acceptedCommandList = nullptr ,\ + .generatedCommandList = nullptr ,\ + },\ } // clang-format on #define ZAP_CLUSTER_INDEX(index) (&generatedClusters[index]) -#define ZAP_FIXED_ENDPOINT_DATA_VERSION_COUNT 38 +#define ZAP_FIXED_ENDPOINT_DATA_VERSION_COUNT 42 // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 42, 792 }, { ZAP_CLUSTER_INDEX(42), 10, 100 }, \ + { ZAP_CLUSTER_INDEX(0), 45, 845 }, { ZAP_CLUSTER_INDEX(45), 11, 122 }, \ } // Largest attribute size is needed for various buffers @@ -1456,10 +1565,10 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, "ATTRIBUTE_LARGEST larger than expected"); // Total size of singleton attributes -#define ATTRIBUTE_SINGLETONS_SIZE (74) +#define ATTRIBUTE_SINGLETONS_SIZE (75) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (892) +#define ATTRIBUTE_MAX_SIZE (967) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) diff --git a/zzz_generated/placeholder/app2/zap-generated/gen_config.h b/zzz_generated/placeholder/app2/zap-generated/gen_config.h index ac5c952ee245c0..86462f05105369 100644 --- a/zzz_generated/placeholder/app2/zap-generated/gen_config.h +++ b/zzz_generated/placeholder/app2/zap-generated/gen_config.h @@ -38,6 +38,8 @@ #define EMBER_AF_DESCRIPTOR_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_ACTIONS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_BASIC_INFORMATION_CLUSTER_SERVER_ENDPOINT_COUNT (2) +#define EMBER_AF_LOCALIZATION_CONFIGURATION_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 (1) #define EMBER_AF_GENERAL_COMMISSIONING_CLUSTER_CLIENT_ENDPOINT_COUNT (1) @@ -54,6 +56,7 @@ #define EMBER_AF_OPERATIONAL_CREDENTIALS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_FIXED_LABEL_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_FIXED_LABEL_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_USER_LABEL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_BOOLEAN_STATE_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_MODE_SELECT_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_MODE_SELECT_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -70,6 +73,7 @@ #define EMBER_AF_FLOW_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_OCCUPANCY_SENSING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_TARGET_NAVIGATOR_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_TARGET_NAVIGATOR_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_KEYPAD_INPUT_CLUSTER_CLIENT_ENDPOINT_COUNT (1) @@ -141,6 +145,16 @@ #define EMBER_AF_PLUGIN_BASIC_INFORMATION_SERVER #define EMBER_AF_PLUGIN_BASIC_INFORMATION +// Use this macro to check if the server side of the Localization Configuration cluster is included +#define ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION_SERVER +#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION + +// Use this macro to check if the server side of the Unit Localization cluster is included +#define ZCL_USING_UNIT_LOCALIZATION_CLUSTER_SERVER +#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 @@ -217,6 +231,11 @@ #define EMBER_AF_PLUGIN_FIXED_LABEL_SERVER #define EMBER_AF_PLUGIN_FIXED_LABEL +// Use this macro to check if the server side of the User Label cluster is included +#define ZCL_USING_USER_LABEL_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_USER_LABEL_SERVER +#define EMBER_AF_PLUGIN_USER_LABEL + // Use this macro to check if the server side of the Boolean State cluster is included #define ZCL_USING_BOOLEAN_STATE_CLUSTER_SERVER #define EMBER_AF_PLUGIN_BOOLEAN_STATE_SERVER @@ -297,6 +316,11 @@ #define EMBER_AF_PLUGIN_RELATIVE_HUMIDITY_MEASUREMENT_SERVER #define EMBER_AF_PLUGIN_RELATIVE_HUMIDITY_MEASUREMENT +// Use this macro to check if the server side of the Occupancy Sensing cluster is included +#define ZCL_USING_OCCUPANCY_SENSING_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_OCCUPANCY_SENSING_SERVER +#define EMBER_AF_PLUGIN_OCCUPANCY_SENSING + // Use this macro to check if the client side of the Target Navigator cluster is included #define ZCL_USING_TARGET_NAVIGATOR_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_TARGET_NAVIGATOR_CLIENT diff --git a/zzz_generated/placeholder/app2/zap-generated/test/Commands.h b/zzz_generated/placeholder/app2/zap-generated/test/Commands.h index 2aa767a3d65ebb..1bf2477979ebdf 100644 --- a/zzz_generated/placeholder/app2/zap-generated/test/Commands.h +++ b/zzz_generated/placeholder/app2/zap-generated/test/Commands.h @@ -1725,6 +1725,513 @@ class Test_TC_WNCV_5_1_SimulatedSuite : public TestCommand } }; +class Test_TC_LCFG_3_1_SimulatedSuite : public TestCommand +{ +public: + Test_TC_LCFG_3_1_SimulatedSuite() : TestCommand("Test_TC_LCFG_3_1_Simulated", 3) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_LCFG_3_1_SimulatedSuite() {} + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the device to be commissioned"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; + return WaitForCommissioning(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "DUT reads SupportedLocales attribute from TH"); + VerifyOrDo(!ShouldSkip("LCFG.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), LocalizationConfiguration::Id, + LocalizationConfiguration::Attributes::SupportedLocales::Id); + } + case 2: { + LogStep(2, "DUT reads ActiveLocale attribute from TH"); + VerifyOrDo(!ShouldSkip("LCFG.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), LocalizationConfiguration::Id, + LocalizationConfiguration::Attributes::ActiveLocale::Id); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_LUNIT_1_1_SimulatedSuite : public TestCommand +{ +public: + Test_TC_LUNIT_1_1_SimulatedSuite() : TestCommand("Test_TC_LUNIT_1_1_Simulated", 6) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_LUNIT_1_1_SimulatedSuite() {} + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the device to be commissioned"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; + return WaitForCommissioning(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "DUT read (0xFFFD) ClusterRevision attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.C.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::ClusterRevision::Id); + } + case 2: { + LogStep(2, "DUT read (0xFFFC) FeatureMap attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.C.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::FeatureMap::Id); + } + case 3: { + LogStep(3, "DUT read (0xFFFB) AttributeList attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.C.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::AttributeList::Id); + } + case 4: { + LogStep(4, "DUT read (0xFFF9) AcceptedCommandList attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.C.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::AcceptedCommandList::Id); + } + case 5: { + LogStep(5, "DUT read (0xFFF8) GeneratedCommandList attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.C.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::GeneratedCommandList::Id); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_LUNIT_2_1_SimulatedSuite : public TestCommand +{ +public: + Test_TC_LUNIT_2_1_SimulatedSuite() : TestCommand("Test_TC_LUNIT_2_1_Simulated", 4) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_LUNIT_2_1_SimulatedSuite() {} + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the device to be commissioned"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; + return WaitForCommissioning(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "DUT reads TemperatureUnit attribute from TH"); + VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::TemperatureUnit::Id); + } + case 2: { + LogStep(2, "DUT writes 3 to TemperatureUnit attribute on TH"); + VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::TemperatureUnit::Id); + } + case 3: { + LogStep(3, "DUT reads TemperatureUnit attribute from TH"); + VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::TemperatureUnit::Id); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_OCC_2_2_SimulatedSuite : public TestCommand +{ +public: + Test_TC_OCC_2_2_SimulatedSuite() : TestCommand("Test_TC_OCC_2_2_Simulated", 13) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_OCC_2_2_SimulatedSuite() {} + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the device to be commissioned"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; + return WaitForCommissioning(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "DUT reads from the TH the (0x0000) Occupancy attribute"); + VerifyOrDo(!ShouldSkip("OCC.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, OccupancySensing::Attributes::Occupancy::Id); + } + case 2: { + LogStep(2, "DUT reads from the TH the (0x0001) OccupancySensorType attribute"); + VerifyOrDo(!ShouldSkip("OCC.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorType::Id); + } + case 3: { + LogStep(3, "DUT reads from the TH the (0x0002) OccupancySensorType attribute"); + VerifyOrDo(!ShouldSkip("OCC.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id); + } + case 4: { + LogStep(4, "DUT reads from the TH the (0x0010) PIROccupiedToUnoccupiedDelay optional attribute"); + VerifyOrDo(!ShouldSkip("OCC.C.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, + OccupancySensing::Attributes::PirOccupiedToUnoccupiedDelay::Id); + } + case 5: { + LogStep(5, "DUT reads from the TH the (0x0011) PIRUnoccupiedToOccupiedDelay optional attribute"); + VerifyOrDo(!ShouldSkip("OCC.C.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, + OccupancySensing::Attributes::PirUnoccupiedToOccupiedDelay::Id); + } + case 6: { + LogStep(6, "DUT reads from the TH the (0x0012) PIRUnoccupiedToOccupiedThreshold optional attribute"); + VerifyOrDo(!ShouldSkip("OCC.C.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, + OccupancySensing::Attributes::PirUnoccupiedToOccupiedThreshold::Id); + } + case 7: { + LogStep(7, "DUT reads from the TH the (0x0020) UltrasonicOccupiedToUnoccupiedDelay optional attribute"); + VerifyOrDo(!ShouldSkip("OCC.C.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, + OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id); + } + case 8: { + LogStep(8, "DUT reads from the TH the (0x0021) UltrasonicUnoccupiedToOccupiedDelay optional attribute"); + VerifyOrDo(!ShouldSkip("OCC.C.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, + OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id); + } + case 9: { + LogStep(9, "DUT reads from the TH the (0x0022) UltrasonicUnoccupiedToOccupiedThreshold optional attribute"); + VerifyOrDo(!ShouldSkip("OCC.C.A0022"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, + OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id); + } + case 10: { + LogStep(10, "DUT reads from the TH the (0x0030) PhysicalContactOccupiedToUnoccupiedDelay optional attribute"); + VerifyOrDo(!ShouldSkip("OCC.C.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, + OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id); + } + case 11: { + LogStep(11, "DUT reads from the TH the (0x0031) PhysicalContactUnoccupiedToOccupiedDelay optional attribute"); + VerifyOrDo(!ShouldSkip("OCC.C.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, + OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id); + } + case 12: { + LogStep(12, "DUT reads from the TH the (0x0032) PhysicalContactUnoccupiedToOccupiedThreshold optional attribute"); + VerifyOrDo(!ShouldSkip("OCC.C.A0032"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, + OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_OCC_2_4_SimulatedSuite : public TestCommand +{ +public: + Test_TC_OCC_2_4_SimulatedSuite() : TestCommand("Test_TC_OCC_2_4_Simulated", 3) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_OCC_2_4_SimulatedSuite() {} + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the device to be commissioned"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; + return WaitForCommissioning(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH reads OccupancySensorType attribute from DUT"); + VerifyOrDo(!ShouldSkip("OCC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorType::Id); + } + case 2: { + LogStep(2, "TH reads OccupancySensorTypeBitmap attribute from DUT"); + VerifyOrDo(!ShouldSkip("OCC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_ULABEL_3_1_SimulatedSuite : public TestCommand +{ +public: + Test_TC_ULABEL_3_1_SimulatedSuite() : TestCommand("Test_TC_ULABEL_3_1_Simulated", 3) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_ULABEL_3_1_SimulatedSuite() {} + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the device to be commissioned"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; + return WaitForCommissioning(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Read attribute: LabelList"); + VerifyOrDo(!ShouldSkip("ULABEL.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), UserLabel::Id, UserLabel::Attributes::LabelList::Id); + } + case 2: { + LogStep(2, "write attribute: LabelList"); + VerifyOrDo(!ShouldSkip("ULABEL.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), UserLabel::Id, UserLabel::Attributes::LabelList::Id); + } + } + return CHIP_NO_ERROR; + } +}; + std::unique_ptr GetTestCommand(std::string testName) { if (testName == "Test_TC_BINFO_2_3_Simulated") @@ -1803,6 +2310,30 @@ std::unique_ptr GetTestCommand(std::string testName) { return std::unique_ptr(new Test_TC_WNCV_5_1_SimulatedSuite()); } + if (testName == "Test_TC_LCFG_3_1_Simulated") + { + return std::unique_ptr(new Test_TC_LCFG_3_1_SimulatedSuite()); + } + if (testName == "Test_TC_LUNIT_1_1_Simulated") + { + return std::unique_ptr(new Test_TC_LUNIT_1_1_SimulatedSuite()); + } + if (testName == "Test_TC_LUNIT_2_1_Simulated") + { + return std::unique_ptr(new Test_TC_LUNIT_2_1_SimulatedSuite()); + } + if (testName == "Test_TC_OCC_2_2_Simulated") + { + return std::unique_ptr(new Test_TC_OCC_2_2_SimulatedSuite()); + } + if (testName == "Test_TC_OCC_2_4_Simulated") + { + return std::unique_ptr(new Test_TC_OCC_2_4_SimulatedSuite()); + } + if (testName == "Test_TC_ULABEL_3_1_Simulated") + { + return std::unique_ptr(new Test_TC_ULABEL_3_1_SimulatedSuite()); + } return nullptr; } @@ -1829,4 +2360,10 @@ void PrintTestCommands() ChipLogError(chipTool, "\t* Test_TC_RH_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_SWTCH_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_WNCV_5_1_Simulated"); + ChipLogError(chipTool, "\t* Test_TC_LCFG_3_1_Simulated"); + ChipLogError(chipTool, "\t* Test_TC_LUNIT_1_1_Simulated"); + ChipLogError(chipTool, "\t* Test_TC_LUNIT_2_1_Simulated"); + ChipLogError(chipTool, "\t* Test_TC_OCC_2_2_Simulated"); + ChipLogError(chipTool, "\t* Test_TC_OCC_2_4_Simulated"); + ChipLogError(chipTool, "\t* Test_TC_ULABEL_3_1_Simulated"); }