diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index f78714be1c9ea4..727730b6b6045a 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -16819,7 +16819,7 @@ "reportableChange": 0 }, { - "name": "IntrinsicBalanceFactor", + "name": "IntrinsicBallastFactor", "code": 20, "mfgCode": null, "side": "server", diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter index 6980d7afb3f3f6..6f9667a26450e3 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter @@ -6,6 +6,11 @@ struct LabelStruct { char_string<16> value = 1; } +struct ApplicationStruct { + int16u catalogVendorID = 0; + char_string applicationID = 1; +} + server cluster Identify = 3 { enum IdentifyEffectIdentifier : ENUM8 { kBlink = 0; @@ -2928,11 +2933,6 @@ server cluster ApplicationLauncher = 1292 { kApplicationPlatform = 0x1; } - struct ApplicationStruct { - int16u catalogVendorID = 0; - char_string applicationID = 1; - } - readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -2967,13 +2967,8 @@ server cluster ApplicationBasic = 1293 { kActiveVisibleNotFocus = 3; } - struct ApplicationBasicApplication { - int16u catalogVendorId = 0; - char_string applicationId = 1; - } - readonly attribute char_string<32> applicationName = 2; - readonly attribute ApplicationBasicApplication application = 4; + readonly attribute ApplicationStruct application = 4; readonly attribute ApplicationStatusEnum status = 5; readonly attribute char_string<32> applicationVersion = 6; readonly attribute vendor_id allowedVendorList[] = 7; diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap index e82b98e527c6b0..ef03195bd8b49b 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap @@ -16311,7 +16311,7 @@ "reportableChange": 0 }, { - "name": "IntrinsicBalanceFactor", + "name": "IntrinsicBallastFactor", "code": 20, "mfgCode": null, "side": "server", @@ -16461,7 +16461,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16477,7 +16477,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16493,7 +16493,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -18865,7 +18865,7 @@ "code": 4, "mfgCode": null, "side": "server", - "type": "ApplicationBasicApplication", + "type": "ApplicationStruct", "included": 1, "storageOption": "External", "singleton": 0, diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index edf4aed790aad1..9beb7e35e56454 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -2692,16 +2692,16 @@ client cluster ApplicationBasic = 1293 { kActiveVisibleNotFocus = 3; } - struct ApplicationBasicApplication { - int16u catalogVendorId = 0; - char_string applicationId = 1; + struct ApplicationStruct { + int16u catalogVendorID = 0; + char_string applicationID = 1; } readonly attribute char_string<32> vendorName = 0; readonly attribute vendor_id vendorID = 1; readonly attribute char_string<32> applicationName = 2; readonly attribute int16u productID = 3; - readonly attribute ApplicationBasicApplication application = 4; + readonly attribute ApplicationStruct application = 4; readonly attribute ApplicationStatusEnum status = 5; readonly attribute char_string<32> applicationVersion = 6; readonly attribute vendor_id allowedVendorList[] = 7; @@ -2720,16 +2720,16 @@ server cluster ApplicationBasic = 1293 { kActiveVisibleNotFocus = 3; } - struct ApplicationBasicApplication { - int16u catalogVendorId = 0; - char_string applicationId = 1; + struct ApplicationStruct { + int16u catalogVendorID = 0; + char_string applicationID = 1; } readonly attribute char_string<32> vendorName = 0; readonly attribute vendor_id vendorID = 1; readonly attribute char_string<32> applicationName = 2; readonly attribute int16u productID = 3; - readonly attribute ApplicationBasicApplication application = 4; + readonly attribute ApplicationStruct application = 4; readonly attribute ApplicationStatusEnum status = 5; readonly attribute char_string<32> applicationVersion = 6; readonly attribute vendor_id allowedVendorList[] = 7; diff --git a/examples/placeholder/linux/apps/app1/config.zap b/examples/placeholder/linux/apps/app1/config.zap index 200c328a48fa82..97bb36fb1b1997 100644 --- a/examples/placeholder/linux/apps/app1/config.zap +++ b/examples/placeholder/linux/apps/app1/config.zap @@ -6683,7 +6683,7 @@ "code": 4, "mfgCode": null, "side": "server", - "type": "ApplicationBasicApplication", + "type": "ApplicationStruct", "included": 1, "storageOption": "External", "singleton": 0, diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 619978a24acf5d..c74463df762bbd 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -2669,16 +2669,16 @@ client cluster ApplicationBasic = 1293 { kActiveVisibleNotFocus = 3; } - struct ApplicationBasicApplication { - int16u catalogVendorId = 0; - char_string applicationId = 1; + struct ApplicationStruct { + int16u catalogVendorID = 0; + char_string applicationID = 1; } readonly attribute char_string<32> vendorName = 0; readonly attribute vendor_id vendorID = 1; readonly attribute char_string<32> applicationName = 2; readonly attribute int16u productID = 3; - readonly attribute ApplicationBasicApplication application = 4; + readonly attribute ApplicationStruct application = 4; readonly attribute ApplicationStatusEnum status = 5; readonly attribute char_string<32> applicationVersion = 6; readonly attribute vendor_id allowedVendorList[] = 7; @@ -2697,16 +2697,16 @@ server cluster ApplicationBasic = 1293 { kActiveVisibleNotFocus = 3; } - struct ApplicationBasicApplication { - int16u catalogVendorId = 0; - char_string applicationId = 1; + struct ApplicationStruct { + int16u catalogVendorID = 0; + char_string applicationID = 1; } readonly attribute char_string<32> vendorName = 0; readonly attribute vendor_id vendorID = 1; readonly attribute char_string<32> applicationName = 2; readonly attribute int16u productID = 3; - readonly attribute ApplicationBasicApplication application = 4; + readonly attribute ApplicationStruct application = 4; readonly attribute ApplicationStatusEnum status = 5; readonly attribute char_string<32> applicationVersion = 6; readonly attribute vendor_id allowedVendorList[] = 7; diff --git a/examples/placeholder/linux/apps/app2/config.zap b/examples/placeholder/linux/apps/app2/config.zap index 57f3dbe7c191a3..1410b0308db2d0 100644 --- a/examples/placeholder/linux/apps/app2/config.zap +++ b/examples/placeholder/linux/apps/app2/config.zap @@ -6967,7 +6967,7 @@ "code": 4, "mfgCode": null, "side": "server", - "type": "ApplicationBasicApplication", + "type": "ApplicationStruct", "included": 1, "storageOption": "External", "singleton": 0, diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index b9c62d4df6a064..d8ec1ac03e2590 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -6,6 +6,11 @@ struct LabelStruct { char_string<16> value = 1; } +struct ApplicationStruct { + int16u catalogVendorID = 0; + char_string applicationID = 1; +} + server cluster OnOff = 6 { enum OnOffDelayedAllOffEffectVariant : ENUM8 { kFadeToOffIn0p8Seconds = 0; @@ -2055,11 +2060,6 @@ server cluster ApplicationLauncher = 1292 { optional endpoint_no endpoint = 1; } - struct ApplicationStruct { - int16u catalogVendorID = 0; - char_string applicationID = 1; - } - readonly attribute INT16U catalogList[] = 0; attribute nullable ApplicationEPStruct currentApp = 1; readonly attribute command_id generatedCommandList[] = 65528; @@ -2099,16 +2099,11 @@ server cluster ApplicationBasic = 1293 { kActiveVisibleNotFocus = 3; } - struct ApplicationBasicApplication { - int16u catalogVendorId = 0; - char_string applicationId = 1; - } - readonly attribute char_string<32> vendorName = 0; readonly attribute vendor_id vendorID = 1; readonly attribute char_string<32> applicationName = 2; readonly attribute int16u productID = 3; - readonly attribute ApplicationBasicApplication application = 4; + readonly attribute ApplicationStruct application = 4; readonly attribute ApplicationStatusEnum status = 5; readonly attribute char_string<32> applicationVersion = 6; readonly attribute vendor_id allowedVendorList[] = 7; diff --git a/examples/tv-app/tv-common/tv-app.zap b/examples/tv-app/tv-common/tv-app.zap index a5f300545b0c6b..605115daa66e57 100644 --- a/examples/tv-app/tv-common/tv-app.zap +++ b/examples/tv-app/tv-common/tv-app.zap @@ -12063,7 +12063,7 @@ "code": 4, "mfgCode": null, "side": "server", - "type": "ApplicationBasicApplication", + "type": "ApplicationStruct", "included": 1, "storageOption": "External", "singleton": 0, diff --git a/scripts/tools/zap/tests/inputs/all-clusters-app.zap b/scripts/tools/zap/tests/inputs/all-clusters-app.zap index 221866e755482b..a60b4ef82f760c 100644 --- a/scripts/tools/zap/tests/inputs/all-clusters-app.zap +++ b/scripts/tools/zap/tests/inputs/all-clusters-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 87, + "featureLevel": 89, "creator": "zap", "keyValuePairs": [ { @@ -91,7 +91,7 @@ "enabled": 1, "attributes": [ { - "name": "identify time", + "name": "IdentifyTime", "code": 0, "mfgCode": null, "side": "server", @@ -107,7 +107,7 @@ "reportableChange": 0 }, { - "name": "identify type", + "name": "IdentifyType", "code": 1, "mfgCode": null, "side": "server", @@ -1139,10 +1139,10 @@ ] }, { - "name": "Basic", + "name": "Basic Information", "code": 40, "mfgCode": null, - "define": "BASIC_CLUSTER", + "define": "BASIC_INFORMATION_CLUSTER", "side": "client", "enabled": 0, "attributes": [ @@ -1165,10 +1165,10 @@ ] }, { - "name": "Basic", + "name": "Basic Information", "code": 40, "mfgCode": null, - "define": "BASIC_CLUSTER", + "define": "BASIC_INFORMATION_CLUSTER", "side": "server", "enabled": 1, "attributes": [ @@ -1663,7 +1663,7 @@ "enabled": 0, "commands": [ { - "name": "AnnounceOtaProvider", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", @@ -1699,7 +1699,7 @@ "enabled": 1, "attributes": [ { - "name": "DefaultOtaProviders", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", @@ -3415,11 +3415,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -3745,7 +3745,7 @@ "enabled": 1, "attributes": [ { - "name": "channel", + "name": "Channel", "code": 0, "mfgCode": null, "side": "server", @@ -3857,7 +3857,7 @@ "reportableChange": 0 }, { - "name": "NeighborTableList", + "name": "NeighborTable", "code": 7, "mfgCode": null, "side": "server", @@ -3873,7 +3873,7 @@ "reportableChange": 0 }, { - "name": "RouteTableList", + "name": "RouteTable", "code": 8, "mfgCode": null, "side": "server", @@ -3905,7 +3905,7 @@ "reportableChange": 0 }, { - "name": "weighting", + "name": "Weighting", "code": 10, "mfgCode": null, "side": "server", @@ -4831,7 +4831,7 @@ "enabled": 1, "attributes": [ { - "name": "bssid", + "name": "BSSID", "code": 0, "mfgCode": null, "side": "server", @@ -4895,7 +4895,7 @@ "reportableChange": 0 }, { - "name": "Rssi", + "name": "RSSI", "code": 4, "mfgCode": null, "side": "server", @@ -5121,7 +5121,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "PHYRateType", + "type": "PHYRateEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -5329,7 +5329,7 @@ "enabled": 0, "attributes": [ { - "name": "number of positions", + "name": "NumberOfPositions", "code": 0, "mfgCode": null, "side": "server", @@ -5345,7 +5345,7 @@ "reportableChange": 0 }, { - "name": "current position", + "name": "CurrentPosition", "code": 1, "mfgCode": null, "side": "server", @@ -5361,7 +5361,7 @@ "reportableChange": 0 }, { - "name": "multi press max", + "name": "MultiPressMax", "code": 2, "mfgCode": null, "side": "server", @@ -5395,7 +5395,7 @@ ] }, { - "name": "AdministratorCommissioning", + "name": "Administrator Commissioning", "code": 60, "mfgCode": null, "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", @@ -5447,7 +5447,7 @@ ] }, { - "name": "AdministratorCommissioning", + "name": "Administrator Commissioning", "code": 60, "mfgCode": null, "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", @@ -5459,7 +5459,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "CommissioningWindowStatus", + "type": "CommissioningWindowStatusEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -6001,7 +6001,7 @@ "enabled": 1, "attributes": [ { - "name": "label list", + "name": "LabelList", "code": 0, "mfgCode": null, "side": "server", @@ -6067,7 +6067,7 @@ "enabled": 1, "attributes": [ { - "name": "label list", + "name": "LabelList", "code": 0, "mfgCode": null, "side": "server", @@ -6221,7 +6221,7 @@ "code": 3, "mfgCode": null, "side": "server", - "type": "DlDoorState", + "type": "DoorStateEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -6301,7 +6301,7 @@ "code": 37, "mfgCode": null, "side": "server", - "type": "DlOperatingMode", + "type": "OperatingModeEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -7857,7 +7857,7 @@ "enabled": 1, "attributes": [ { - "name": "measured value", + "name": "MeasuredValue", "code": 0, "mfgCode": null, "side": "server", @@ -7873,7 +7873,7 @@ "reportableChange": 0 }, { - "name": "min measured value", + "name": "MinMeasuredValue", "code": 1, "mfgCode": null, "side": "server", @@ -7889,7 +7889,7 @@ "reportableChange": 0 }, { - "name": "max measured value", + "name": "MaxMeasuredValue", "code": 2, "mfgCode": null, "side": "server", @@ -7905,7 +7905,7 @@ "reportableChange": 0 }, { - "name": "tolerance", + "name": "Tolerance", "code": 3, "mfgCode": null, "side": "server", @@ -7989,7 +7989,7 @@ "enabled": 0, "attributes": [ { - "name": "occupancy", + "name": "Occupancy", "code": 0, "mfgCode": null, "side": "server", @@ -8005,7 +8005,7 @@ "reportableChange": 0 }, { - "name": "occupancy sensor type", + "name": "OccupancySensorType", "code": 1, "mfgCode": null, "side": "server", @@ -8021,7 +8021,7 @@ "reportableChange": 0 }, { - "name": "occupancy sensor type bitmap", + "name": "OccupancySensorTypeBitmap", "code": 2, "mfgCode": null, "side": "server", @@ -8657,7 +8657,7 @@ "enabled": 1, "attributes": [ { - "name": "identify time", + "name": "IdentifyTime", "code": 0, "mfgCode": null, "side": "server", @@ -8673,7 +8673,7 @@ "reportableChange": 0 }, { - "name": "identify type", + "name": "IdentifyType", "code": 1, "mfgCode": null, "side": "server", @@ -10395,10 +10395,10 @@ ] }, { - "name": "Basic", + "name": "Basic Information", "code": 40, "mfgCode": null, - "define": "BASIC_CLUSTER", + "define": "BASIC_INFORMATION_CLUSTER", "side": "client", "enabled": 0, "attributes": [ @@ -10421,10 +10421,10 @@ ] }, { - "name": "Basic", + "name": "Basic Information", "code": 40, "mfgCode": null, - "define": "BASIC_CLUSTER", + "define": "BASIC_INFORMATION_CLUSTER", "side": "server", "enabled": 0, "attributes": [ @@ -11953,7 +11953,7 @@ "enabled": 1, "attributes": [ { - "name": "number of positions", + "name": "NumberOfPositions", "code": 0, "mfgCode": null, "side": "server", @@ -11969,7 +11969,7 @@ "reportableChange": 0 }, { - "name": "current position", + "name": "CurrentPosition", "code": 1, "mfgCode": null, "side": "server", @@ -11985,7 +11985,7 @@ "reportableChange": 0 }, { - "name": "multi press max", + "name": "MultiPressMax", "code": 2, "mfgCode": null, "side": "server", @@ -12153,7 +12153,7 @@ "enabled": 1, "attributes": [ { - "name": "label list", + "name": "LabelList", "code": 0, "mfgCode": null, "side": "server", @@ -12219,7 +12219,7 @@ "enabled": 1, "attributes": [ { - "name": "label list", + "name": "LabelList", "code": 0, "mfgCode": null, "side": "server", @@ -12817,7 +12817,7 @@ "code": 3, "mfgCode": null, "side": "server", - "type": "DlDoorState", + "type": "DoorStateEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -13137,7 +13137,7 @@ "code": 37, "mfgCode": null, "side": "server", - "type": "DlOperatingMode", + "type": "OperatingModeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -15047,7 +15047,7 @@ "enabled": 1, "attributes": [ { - "name": "fan mode", + "name": "FanMode", "code": 0, "mfgCode": null, "side": "server", @@ -15063,7 +15063,7 @@ "reportableChange": 0 }, { - "name": "fan mode sequence", + "name": "FanModeSequence", "code": 1, "mfgCode": null, "side": "server", @@ -15079,7 +15079,7 @@ "reportableChange": 0 }, { - "name": "percent setting", + "name": "PercentSetting", "code": 2, "mfgCode": null, "side": "server", @@ -15095,7 +15095,7 @@ "reportableChange": 0 }, { - "name": "percent current", + "name": "PercentCurrent", "code": 3, "mfgCode": null, "side": "server", @@ -15111,7 +15111,7 @@ "reportableChange": 0 }, { - "name": "speed max", + "name": "SpeedMax", "code": 4, "mfgCode": null, "side": "server", @@ -15127,7 +15127,7 @@ "reportableChange": 0 }, { - "name": "speed setting", + "name": "SpeedSetting", "code": 5, "mfgCode": null, "side": "server", @@ -15143,7 +15143,7 @@ "reportableChange": 0 }, { - "name": "speed current", + "name": "SpeedCurrent", "code": 6, "mfgCode": null, "side": "server", @@ -15159,7 +15159,7 @@ "reportableChange": 0 }, { - "name": "rock support", + "name": "RockSupport", "code": 7, "mfgCode": null, "side": "server", @@ -15175,7 +15175,7 @@ "reportableChange": 0 }, { - "name": "rock setting", + "name": "RockSetting", "code": 8, "mfgCode": null, "side": "server", @@ -15191,7 +15191,7 @@ "reportableChange": 0 }, { - "name": "wind support", + "name": "WindSupport", "code": 9, "mfgCode": null, "side": "server", @@ -15207,7 +15207,7 @@ "reportableChange": 0 }, { - "name": "wind setting", + "name": "WindSetting", "code": 10, "mfgCode": null, "side": "server", @@ -15339,7 +15339,7 @@ "enabled": 1, "attributes": [ { - "name": "temperature display mode", + "name": "TemperatureDisplayMode", "code": 0, "mfgCode": null, "side": "server", @@ -15355,7 +15355,7 @@ "reportableChange": 0 }, { - "name": "keypad lockout", + "name": "KeypadLockout", "code": 1, "mfgCode": null, "side": "server", @@ -15371,7 +15371,7 @@ "reportableChange": 0 }, { - "name": "schedule programming visibility", + "name": "ScheduleProgrammingVisibility", "code": 2, "mfgCode": null, "side": "server", @@ -17085,7 +17085,7 @@ "enabled": 1, "attributes": [ { - "name": "measured value", + "name": "MeasuredValue", "code": 0, "mfgCode": null, "side": "server", @@ -17101,7 +17101,7 @@ "reportableChange": 0 }, { - "name": "min measured value", + "name": "MinMeasuredValue", "code": 1, "mfgCode": null, "side": "server", @@ -17117,7 +17117,7 @@ "reportableChange": 0 }, { - "name": "max measured value", + "name": "MaxMeasuredValue", "code": 2, "mfgCode": null, "side": "server", @@ -17133,7 +17133,7 @@ "reportableChange": 0 }, { - "name": "tolerance", + "name": "Tolerance", "code": 3, "mfgCode": null, "side": "server", @@ -17217,7 +17217,7 @@ "enabled": 1, "attributes": [ { - "name": "occupancy", + "name": "Occupancy", "code": 0, "mfgCode": null, "side": "server", @@ -17233,7 +17233,7 @@ "reportableChange": 0 }, { - "name": "occupancy sensor type", + "name": "OccupancySensorType", "code": 1, "mfgCode": null, "side": "server", @@ -17249,7 +17249,7 @@ "reportableChange": 0 }, { - "name": "occupancy sensor type bitmap", + "name": "OccupancySensorTypeBitmap", "code": 2, "mfgCode": null, "side": "server", @@ -17503,7 +17503,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "LineupInfo", + "type": "LineupInfoStruct", "included": 0, "storageOption": "External", "singleton": 0, @@ -17519,7 +17519,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "ChannelInfo", + "type": "ChannelInfoStruct", "included": 0, "storageOption": "External", "singleton": 0, @@ -20819,7 +20819,7 @@ "enabled": 0, "attributes": [ { - "name": "identify time", + "name": "IdentifyTime", "code": 0, "mfgCode": null, "side": "server", @@ -21701,10 +21701,10 @@ ] }, { - "name": "Basic", + "name": "Basic Information", "code": 40, "mfgCode": null, - "define": "BASIC_CLUSTER", + "define": "BASIC_INFORMATION_CLUSTER", "side": "client", "enabled": 0, "attributes": [ @@ -21727,10 +21727,10 @@ ] }, { - "name": "Basic", + "name": "Basic Information", "code": 40, "mfgCode": null, - "define": "BASIC_CLUSTER", + "define": "BASIC_INFORMATION_CLUSTER", "side": "server", "enabled": 0, "attributes": [ @@ -22771,7 +22771,7 @@ "code": 3, "mfgCode": null, "side": "server", - "type": "DlDoorState", + "type": "DoorStateEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -22851,7 +22851,7 @@ "code": 37, "mfgCode": null, "side": "server", - "type": "DlOperatingMode", + "type": "OperatingModeEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -24275,7 +24275,7 @@ "enabled": 1, "attributes": [ { - "name": "occupancy", + "name": "Occupancy", "code": 0, "mfgCode": null, "side": "server", @@ -24291,7 +24291,7 @@ "reportableChange": 0 }, { - "name": "occupancy sensor type", + "name": "OccupancySensorType", "code": 1, "mfgCode": null, "side": "server", @@ -24307,7 +24307,7 @@ "reportableChange": 0 }, { - "name": "occupancy sensor type bitmap", + "name": "OccupancySensorTypeBitmap", "code": 2, "mfgCode": null, "side": "server", @@ -24740,6 +24740,5 @@ "endpointVersion": 1, "deviceIdentifier": 61442 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/scripts/tools/zap/tests/inputs/lighting-app.zap b/scripts/tools/zap/tests/inputs/lighting-app.zap index 46f17b66d6dfcf..0b024705ad9d1c 100644 --- a/scripts/tools/zap/tests/inputs/lighting-app.zap +++ b/scripts/tools/zap/tests/inputs/lighting-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 81, + "featureLevel": 89, "creator": "zap", "keyValuePairs": [ { @@ -83,7 +83,7 @@ "enabled": 0, "attributes": [ { - "name": "identify time", + "name": "IdentifyTime", "code": 0, "mfgCode": null, "side": "server", @@ -1133,10 +1133,10 @@ ] }, { - "name": "Basic", + "name": "Basic Information", "code": 40, "mfgCode": null, - "define": "BASIC_CLUSTER", + "define": "BASIC_INFORMATION_CLUSTER", "side": "client", "enabled": 0, "attributes": [ @@ -1159,10 +1159,10 @@ ] }, { - "name": "Basic", + "name": "Basic Information", "code": 40, "mfgCode": null, - "define": "BASIC_CLUSTER", + "define": "BASIC_INFORMATION_CLUSTER", "side": "server", "enabled": 1, "attributes": [ @@ -1657,7 +1657,7 @@ "enabled": 0, "commands": [ { - "name": "AnnounceOtaProvider", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", @@ -1693,7 +1693,7 @@ "enabled": 1, "attributes": [ { - "name": "DefaultOtaProviders", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", @@ -2685,11 +2685,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -2985,7 +2985,7 @@ "enabled": 1, "attributes": [ { - "name": "channel", + "name": "Channel", "code": 0, "mfgCode": null, "side": "server", @@ -3097,7 +3097,7 @@ "reportableChange": 0 }, { - "name": "NeighborTableList", + "name": "NeighborTable", "code": 7, "mfgCode": null, "side": "server", @@ -3113,7 +3113,7 @@ "reportableChange": 0 }, { - "name": "RouteTableList", + "name": "RouteTable", "code": 8, "mfgCode": null, "side": "server", @@ -3145,7 +3145,7 @@ "reportableChange": 0 }, { - "name": "weighting", + "name": "Weighting", "code": 10, "mfgCode": null, "side": "server", @@ -4071,7 +4071,7 @@ "enabled": 1, "attributes": [ { - "name": "bssid", + "name": "BSSID", "code": 0, "mfgCode": null, "side": "server", @@ -4135,7 +4135,7 @@ "reportableChange": 0 }, { - "name": "Rssi", + "name": "RSSI", "code": 4, "mfgCode": null, "side": "server", @@ -4361,7 +4361,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "PHYRateType", + "type": "PHYRateEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4585,7 +4585,7 @@ ] }, { - "name": "AdministratorCommissioning", + "name": "Administrator Commissioning", "code": 60, "mfgCode": null, "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", @@ -4637,7 +4637,7 @@ ] }, { - "name": "AdministratorCommissioning", + "name": "Administrator Commissioning", "code": 60, "mfgCode": null, "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", @@ -4649,7 +4649,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "CommissioningWindowStatus", + "type": "CommissioningWindowStatusEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -5173,7 +5173,7 @@ "enabled": 1, "attributes": [ { - "name": "label list", + "name": "LabelList", "code": 0, "mfgCode": null, "side": "server", @@ -5239,7 +5239,7 @@ "enabled": 1, "attributes": [ { - "name": "label list", + "name": "LabelList", "code": 0, "mfgCode": null, "side": "server", @@ -5349,7 +5349,7 @@ "enabled": 1, "attributes": [ { - "name": "identify time", + "name": "IdentifyTime", "code": 0, "mfgCode": null, "side": "server", @@ -5365,7 +5365,7 @@ "reportableChange": 0 }, { - "name": "identify type", + "name": "IdentifyType", "code": 1, "mfgCode": null, "side": "server", @@ -6261,7 +6261,7 @@ "code": 15, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "LevelControlOptions", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -6583,10 +6583,10 @@ ] }, { - "name": "Basic", + "name": "Basic Information", "code": 40, "mfgCode": null, - "define": "BASIC_CLUSTER", + "define": "BASIC_INFORMATION_CLUSTER", "side": "client", "enabled": 0, "attributes": [ @@ -6609,10 +6609,10 @@ ] }, { - "name": "Basic", + "name": "Basic Information", "code": 40, "mfgCode": null, - "define": "BASIC_CLUSTER", + "define": "BASIC_INFORMATION_CLUSTER", "side": "server", "enabled": 0, "attributes": [ @@ -8091,7 +8091,7 @@ "enabled": 1, "attributes": [ { - "name": "occupancy", + "name": "Occupancy", "code": 0, "mfgCode": null, "side": "server", @@ -8107,7 +8107,7 @@ "reportableChange": 0 }, { - "name": "occupancy sensor type", + "name": "OccupancySensorType", "code": 1, "mfgCode": null, "side": "server", @@ -8123,7 +8123,7 @@ "reportableChange": 0 }, { - "name": "occupancy sensor type bitmap", + "name": "OccupancySensorTypeBitmap", "code": 2, "mfgCode": null, "side": "server", diff --git a/scripts/tools/zap_convert_all.py b/scripts/tools/zap_convert_all.py index 222a5c7a23c713..677067c93dc123 100755 --- a/scripts/tools/zap_convert_all.py +++ b/scripts/tools/zap_convert_all.py @@ -78,7 +78,7 @@ def convertOne(target): """ Helper method that may be run in parallel to convert a single target. """ - subprocess.check_call(['./scripts/tools/zap/convert.py'] + target) + subprocess.check_call(['./scripts/tools/zap/convert.py'] + [target]) def main(): diff --git a/src/app/clusters/application-basic-server/application-basic-delegate.h b/src/app/clusters/application-basic-server/application-basic-delegate.h index 6c847a775f0cb7..82696b5b77a674 100644 --- a/src/app/clusters/application-basic-server/application-basic-delegate.h +++ b/src/app/clusters/application-basic-server/application-basic-delegate.h @@ -18,7 +18,6 @@ #pragma once -#include #include #include @@ -30,7 +29,7 @@ namespace app { namespace Clusters { namespace ApplicationBasic { -using ApplicationBasicApplicationType = chip::app::Clusters::ApplicationBasic::Structs::ApplicationBasicApplication::Type; +using ApplicationBasicApplicationType = chip::app::Clusters::ApplicationBasic::Structs::ApplicationStruct::Type; class DLL_EXPORT CatalogVendorApp { @@ -81,7 +80,7 @@ class Delegate virtual CHIP_ERROR HandleGetAllowedVendorList(app::AttributeValueEncoder & aEncoder) = 0; inline void SetApplicationStatus(ApplicationStatusEnum status) { mApplicationStatus = status; } - bool Matches(ApplicationBasicApplication match); + bool Matches(const ApplicationBasicApplicationType & match); inline CatalogVendorApp * GetCatalogVendorApp() { return &mCatalogVendorApp; } virtual std::list GetAllowedVendorList() = 0; diff --git a/src/app/clusters/application-basic-server/application-basic-server.cpp b/src/app/clusters/application-basic-server/application-basic-server.cpp index b7e3820ab47287..e98a28c04dea6a 100644 --- a/src/app/clusters/application-basic-server/application-basic-server.cpp +++ b/src/app/clusters/application-basic-server/application-basic-server.cpp @@ -107,15 +107,15 @@ Delegate * GetDefaultDelegate(EndpointId endpoint) CHIP_ERROR Delegate::HandleGetApplication(app::AttributeValueEncoder & aEncoder) { ApplicationBasicApplicationType application; - application.catalogVendorId = mCatalogVendorApp.catalogVendorId; - application.applicationId = CharSpan(mCatalogVendorApp.applicationId, strlen(mCatalogVendorApp.applicationId)); + application.catalogVendorID = mCatalogVendorApp.catalogVendorId; + application.applicationID = CharSpan(mCatalogVendorApp.applicationId, strlen(mCatalogVendorApp.applicationId)); return aEncoder.Encode(application); } -bool Delegate::Matches(ApplicationBasicApplication match) +bool Delegate::Matches(const ApplicationBasicApplicationType & match) { - std::string appId(match.applicationId.data(), match.applicationId.size()); - CatalogVendorApp matchApp(match.catalogVendorId, appId.c_str()); + std::string appId(match.applicationID.data(), match.applicationID.size()); + CatalogVendorApp matchApp(match.catalogVendorID, appId.c_str()); return mCatalogVendorApp.Matches(&matchApp); } diff --git a/src/app/common/templates/legacy-struct-list.yaml b/src/app/common/templates/legacy-struct-list.yaml index 9ad0cfec369a94..a879485e168bdf 100644 --- a/src/app/common/templates/legacy-struct-list.yaml +++ b/src/app/common/templates/legacy-struct-list.yaml @@ -1,4 +1,3 @@ # List of structs for which we output a legacy definition in af-structs.h # Ideally this list should become empty. - CredentialStruct -- ApplicationBasicApplication diff --git a/src/app/tests/suites/TV_ApplicationBasicCluster.yaml b/src/app/tests/suites/TV_ApplicationBasicCluster.yaml index 4fd7f37f256ff5..1ddc54e9dcbf9d 100644 --- a/src/app/tests/suites/TV_ApplicationBasicCluster.yaml +++ b/src/app/tests/suites/TV_ApplicationBasicCluster.yaml @@ -64,7 +64,7 @@ tests: command: "readAttribute" attribute: "Application" response: - value: { catalogVendorId: 123, applicationId: "applicationId" } + value: { CatalogVendorID: 123, ApplicationID: "applicationId" } # TODO(#14054): Support chars validation - label: "Read attribute application version" diff --git a/src/app/tests/suites/certification/Test_TC_APBSC_9_1.yaml b/src/app/tests/suites/certification/Test_TC_APBSC_9_1.yaml index d59fd14fbe73ce..badac9c7700c03 100644 --- a/src/app/tests/suites/certification/Test_TC_APBSC_9_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_APBSC_9_1.yaml @@ -73,7 +73,7 @@ tests: attribute: "Application" response: constraints: - type: ApplicationBasicApplication + type: ApplicationStruct - label: "Reads the Status attribute" PICS: APBSC.S.A0005 diff --git a/src/app/zap-templates/zcl/data-model/chip/application-basic-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/application-basic-cluster.xml index b9ef8a0b06a4bd..c8f9f218ed2ddb 100644 --- a/src/app/zap-templates/zcl/data-model/chip/application-basic-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/application-basic-cluster.xml @@ -28,18 +28,19 @@ limitations under the License. VendorID ApplicationName ProductID - Application + Application Status ApplicationVersion AllowedVendorList - + diff --git a/src/app/zap-templates/zcl/data-model/chip/application-launcher-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/application-launcher-cluster.xml index 0577790159d904..41f08d8a1123c5 100644 --- a/src/app/zap-templates/zcl/data-model/chip/application-launcher-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/application-launcher-cluster.xml @@ -60,6 +60,11 @@ limitations under the License. + + diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index aa8ac48901b021..a5ea74f9a50c3f 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -6,6 +6,11 @@ struct LabelStruct { char_string<16> value = 1; } +struct ApplicationStruct { + int16u catalogVendorID = 0; + char_string applicationID = 1; +} + client cluster Identify = 3 { enum IdentifyEffectIdentifier : ENUM8 { kBlink = 0; @@ -4016,11 +4021,6 @@ client cluster ApplicationLauncher = 1292 { optional endpoint_no endpoint = 1; } - struct ApplicationStruct { - int16u catalogVendorID = 0; - char_string applicationID = 1; - } - readonly attribute INT16U catalogList[] = 0; attribute nullable ApplicationEPStruct currentApp = 1; readonly attribute command_id generatedCommandList[] = 65528; @@ -4060,16 +4060,11 @@ client cluster ApplicationBasic = 1293 { kActiveVisibleNotFocus = 3; } - struct ApplicationBasicApplication { - int16u catalogVendorId = 0; - char_string applicationId = 1; - } - readonly attribute char_string<32> vendorName = 0; readonly attribute vendor_id vendorID = 1; readonly attribute char_string<32> applicationName = 2; readonly attribute int16u productID = 3; - readonly attribute ApplicationBasicApplication application = 4; + readonly attribute ApplicationStruct application = 4; readonly attribute ApplicationStatusEnum status = 5; readonly attribute char_string<32> applicationVersion = 6; readonly attribute vendor_id allowedVendorList[] = 7; diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index b183913a61f64b..45a873ac15cfa0 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -13635,7 +13635,7 @@ "reportableChange": 0 }, { - "name": "IntrinsicBalanceFactor", + "name": "IntrinsicBallastFactor", "code": 20, "mfgCode": null, "side": "server", @@ -17161,7 +17161,7 @@ "code": 4, "mfgCode": null, "side": "server", - "type": "ApplicationBasicApplication", + "type": "ApplicationStruct", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 5e811283489618..c5757a97b5cd30 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -16518,35 +16518,34 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - jobject value_catalogVendorId; - std::string value_catalogVendorIdClassName = "java/lang/Integer"; - std::string value_catalogVendorIdCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_catalogVendorIdClassName.c_str(), - value_catalogVendorIdCtorSignature.c_str(), - cppValue.catalogVendorId, value_catalogVendorId); - jobject value_applicationId; - value_applicationId = - env->NewStringUTF(std::string(cppValue.applicationId.data(), cppValue.applicationId.size()).c_str()); - - jclass applicationBasicApplicationStructClass_0; + jobject value_catalogVendorID; + std::string value_catalogVendorIDClassName = "java/lang/Integer"; + std::string value_catalogVendorIDCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(value_catalogVendorIDClassName.c_str(), + value_catalogVendorIDCtorSignature.c_str(), + cppValue.catalogVendorID, value_catalogVendorID); + jobject value_applicationID; + value_applicationID = + env->NewStringUTF(std::string(cppValue.applicationID.data(), cppValue.applicationID.size()).c_str()); + + jclass applicationStructStructClass_0; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ApplicationBasicClusterApplicationBasicApplication", - applicationBasicApplicationStructClass_0); + env, "chip/devicecontroller/ChipStructs$ApplicationBasicClusterApplicationStruct", applicationStructStructClass_0); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ApplicationBasicClusterApplicationBasicApplication"); + ChipLogError(Zcl, "Could not find class ChipStructs$ApplicationBasicClusterApplicationStruct"); return nullptr; } - jmethodID applicationBasicApplicationStructCtor_0 = - env->GetMethodID(applicationBasicApplicationStructClass_0, "", "(Ljava/lang/Integer;Ljava/lang/String;)V"); - if (applicationBasicApplicationStructCtor_0 == nullptr) + jmethodID applicationStructStructCtor_0 = + env->GetMethodID(applicationStructStructClass_0, "", "(Ljava/lang/Integer;Ljava/lang/String;)V"); + if (applicationStructStructCtor_0 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$ApplicationBasicClusterApplicationBasicApplication constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$ApplicationBasicClusterApplicationStruct constructor"); return nullptr; } - value = env->NewObject(applicationBasicApplicationStructClass_0, applicationBasicApplicationStructCtor_0, - value_catalogVendorId, value_applicationId); + value = env->NewObject(applicationStructStructClass_0, applicationStructStructCtor_0, value_catalogVendorID, + value_applicationID); return value; } case Attributes::Status::Id: { diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java index 8aced0eeec990d..c5ada81ecbf732 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java @@ -1806,25 +1806,24 @@ public String toString() { } } - public static class ApplicationBasicClusterApplicationBasicApplication { - public Integer catalogVendorId; - public String applicationId; + public static class ApplicationBasicClusterApplicationStruct { + public Integer catalogVendorID; + public String applicationID; - public ApplicationBasicClusterApplicationBasicApplication( - Integer catalogVendorId, String applicationId) { - this.catalogVendorId = catalogVendorId; - this.applicationId = applicationId; + public ApplicationBasicClusterApplicationStruct(Integer catalogVendorID, String applicationID) { + this.catalogVendorID = catalogVendorID; + this.applicationID = applicationID; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("ApplicationBasicClusterApplicationBasicApplication {\n"); - output.append("\tcatalogVendorId: "); - output.append(catalogVendorId); + output.append("ApplicationBasicClusterApplicationStruct {\n"); + output.append("\tcatalogVendorID: "); + output.append(catalogVendorID); output.append("\n"); - output.append("\tapplicationId: "); - output.append(applicationId); + output.append("\tapplicationID: "); + output.append(applicationID); output.append("\n"); output.append("}\n"); return output.toString(); diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 2559e05ecdab26..43cd0c91eb995b 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -24950,7 +24950,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="vendorID", Tag=0x00000001, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="applicationName", Tag=0x00000002, Type=str), ClusterObjectFieldDescriptor(Label="productID", Tag=0x00000003, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="application", Tag=0x00000004, Type=ApplicationBasic.Structs.ApplicationBasicApplication), + ClusterObjectFieldDescriptor(Label="application", Tag=0x00000004, Type=ApplicationBasic.Structs.ApplicationStruct), ClusterObjectFieldDescriptor(Label="status", Tag=0x00000005, Type=ApplicationBasic.Enums.ApplicationStatusEnum), ClusterObjectFieldDescriptor(Label="applicationVersion", Tag=0x00000006, Type=str), ClusterObjectFieldDescriptor(Label="allowedVendorList", Tag=0x00000007, Type=typing.List[uint]), @@ -24965,7 +24965,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: vendorID: 'typing.Optional[uint]' = None applicationName: 'str' = None productID: 'typing.Optional[uint]' = None - application: 'ApplicationBasic.Structs.ApplicationBasicApplication' = None + application: 'ApplicationBasic.Structs.ApplicationStruct' = None status: 'ApplicationBasic.Enums.ApplicationStatusEnum' = None applicationVersion: 'str' = None allowedVendorList: 'typing.List[uint]' = None @@ -24991,17 +24991,17 @@ class ApplicationStatusEnum(MatterIntEnum): class Structs: @dataclass - class ApplicationBasicApplication(ClusterObject): + class ApplicationStruct(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="catalogVendorId", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="applicationId", Tag=1, Type=str), + ClusterObjectFieldDescriptor(Label="catalogVendorID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="applicationID", Tag=1, Type=str), ]) - catalogVendorId: 'uint' = 0 - applicationId: 'str' = "" + catalogVendorID: 'uint' = 0 + applicationID: 'str' = "" @@ -25083,9 +25083,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=ApplicationBasic.Structs.ApplicationBasicApplication) + return ClusterObjectFieldDescriptor(Type=ApplicationBasic.Structs.ApplicationStruct) - value: 'ApplicationBasic.Structs.ApplicationBasicApplication' = field(default_factory=lambda: ApplicationBasic.Structs.ApplicationBasicApplication()) + value: 'ApplicationBasic.Structs.ApplicationStruct' = field(default_factory=lambda: ApplicationBasic.Structs.ApplicationStruct()) @dataclass class Status(ClusterAttributeDescriptor): diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index 5752ce6ad5d190..cdbb55f85fd97a 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -5089,6 +5089,8 @@ ApplicationLauncher: - ApplicationStruct - ApplicationEPStruct + ApplicationBasic: + - ApplicationStruct struct fields: UnitTesting: SimpleStruct: @@ -5274,6 +5276,14 @@ ApplicationEPStruct: - application - endpoint + ApplicationBasic: + ApplicationStruct: + - catalogVendorID + - applicationID + # Values that are actually deprecated, but we effectively + # introduced them in this release. + - catalogVendorId + - applicationId events: OTASoftwareUpdateRequestor: - StateTransition @@ -5809,6 +5819,8 @@ ApplicationLauncher: - Application - ApplicationEP + ApplicationBasic: + - ApplicationBasicApplication struct fields: Descriptor: DeviceTypeStruct: @@ -5825,6 +5837,10 @@ ApplicationStruct: - catalogVendorId - applicationId + ApplicationBasic: + ApplicationStruct: + - catalogVendorId + - applicationId event fields: Switch: MultiPressComplete: @@ -6109,6 +6125,8 @@ ApplicationLauncher: ApplicationStruct: Application ApplicationEPStruct: ApplicationEP + ApplicationBasic: + ApplicationStruct: ApplicationBasicApplication struct fields: Descriptor: DeviceTypeStruct: @@ -6125,6 +6143,10 @@ ApplicationStruct: catalogVendorID: catalogVendorId applicationID: applicationId + ApplicationBasic: + ApplicationStruct: + catalogVendorID: catalogVendorId + applicationID: applicationId event fields: Switch: MultiPressComplete: diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index 095d73fa19c2c4..f73a5ae049cba8 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -14294,11 +14294,11 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & if (*aError != CHIP_NO_ERROR) { return nil; } - MTRApplicationBasicClusterApplicationBasicApplication * _Nonnull value; - value = [MTRApplicationBasicClusterApplicationBasicApplication new]; - value.catalogVendorId = [NSNumber numberWithUnsignedShort:cppValue.catalogVendorId]; - value.applicationId = [[NSString alloc] initWithBytes:cppValue.applicationId.data() - length:cppValue.applicationId.size() + MTRApplicationBasicClusterApplicationStruct * _Nonnull value; + value = [MTRApplicationBasicClusterApplicationStruct new]; + value.catalogVendorID = [NSNumber numberWithUnsignedShort:cppValue.catalogVendorID]; + value.applicationID = [[NSString alloc] initWithBytes:cppValue.applicationID.data() + length:cppValue.applicationID.size() encoding:NSUTF8StringEncoding]; return value; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 6cfe17c47d1795..1318ae27d76b17 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -13381,18 +13381,17 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeApplicationWithCompletion:(void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, +- (void)readAttributeApplicationWithCompletion:(void (^)(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeApplicationWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, + reportHandler:(void (^)(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeApplicationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion: - (void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + completion:(void (^)(MTRApplicationBasicClusterApplicationStruct * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)readAttributeStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 5e02ba9e64f6b0..4f3e7c997a6012 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -91397,33 +91397,32 @@ + (void)readAttributeProductIDWithClusterStateCache:(MTRClusterStateCacheContain }); } -- (void)readAttributeApplicationWithCompletion:(void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, +- (void)readAttributeApplicationWithCompletion:(void (^)(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; return MTRReadAttribute( + MTRApplicationBasicClusterApplicationStruct, TypeInfo::DecodableType>( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeApplicationWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, + reportHandler:(void (^)(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, - reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRApplicationBasicClusterApplicationStruct, TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, + self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeApplicationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion: - (void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, - NSError * _Nullable error))completion + completion:(void (^)(MTRApplicationBasicClusterApplicationStruct * _Nullable value, + NSError * _Nullable error))completion { auto * bridge = new MTRApplicationBasicApplicationStructAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, @@ -91976,7 +91975,7 @@ - (void)readAttributeApplicationWithCompletionHandler: (void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable error))completionHandler { [self readAttributeApplicationWithCompletion:^( - MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable error) { + MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; @@ -91998,8 +91997,8 @@ - (void)subscribeAttributeApplicationWithMinInterval:(NSNumber * _Nonnull)minInt } [self subscribeAttributeApplicationWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, - NSError * _Nullable error) { + reportHandler:^( + MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler( static_cast(value), error); @@ -92015,7 +92014,7 @@ + (void)readAttributeApplicationWithAttributeCache:(MTRAttributeCacheContainer * [self readAttributeApplicationWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue - completion:^(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, + completion:^(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler( diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h index 936886fb99dff3..a42ab726be8bcd 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h @@ -1054,7 +1054,7 @@ typedef void (*ApplicationLauncherAcceptedCommandListListAttributeCallback)( typedef void (*ApplicationLauncherAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ApplicationBasicApplicationStructAttributeCallback)( - void *, const chip::app::Clusters::ApplicationBasic::Structs::ApplicationBasicApplication::DecodableType &); + void *, const chip::app::Clusters::ApplicationBasic::Structs::ApplicationStruct::DecodableType &); typedef void (*ApplicationBasicAllowedVendorListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ApplicationBasicGeneratedCommandListListAttributeCallback)( @@ -9889,9 +9889,8 @@ class MTRApplicationBasicApplicationStructAttributeCallbackBridge MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void - OnSuccessFn(void * context, - const chip::app::Clusters::ApplicationBasic::Structs::ApplicationBasicApplication::DecodableType & value); + static void OnSuccessFn(void * context, + const chip::app::Clusters::ApplicationBasic::Structs::ApplicationStruct::DecodableType & value); }; class MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm index 9e524f6b19655f..e0ad62db1c9967 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm @@ -10010,13 +10010,13 @@ } void MTRApplicationBasicApplicationStructAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::ApplicationBasic::Structs::ApplicationBasicApplication::DecodableType & value) + void * context, const chip::app::Clusters::ApplicationBasic::Structs::ApplicationStruct::DecodableType & value) { - MTRApplicationBasicClusterApplicationBasicApplication * _Nonnull objCValue; - objCValue = [MTRApplicationBasicClusterApplicationBasicApplication new]; - objCValue.catalogVendorId = [NSNumber numberWithUnsignedShort:value.catalogVendorId]; - objCValue.applicationId = [[NSString alloc] initWithBytes:value.applicationId.data() - length:value.applicationId.size() + MTRApplicationBasicClusterApplicationStruct * _Nonnull objCValue; + objCValue = [MTRApplicationBasicClusterApplicationStruct new]; + objCValue.catalogVendorID = [NSNumber numberWithUnsignedShort:value.catalogVendorID]; + objCValue.applicationID = [[NSString alloc] initWithBytes:value.applicationID.data() + length:value.applicationID.size() encoding:NSUTF8StringEncoding]; DispatchSuccess(context, objCValue); }; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index 50b52a10d9efc5..ded81da62c0444 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -937,10 +937,17 @@ MTR_NEWLY_DEPRECATED("Please use MTRApplicationLauncherClusterApplicationEPStruc @interface MTRApplicationLauncherClusterApplicationEP : MTRApplicationLauncherClusterApplicationEPStruct @end +MTR_NEWLY_AVAILABLE +@interface MTRApplicationBasicClusterApplicationStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull catalogVendorID MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull catalogVendorId MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nonnull applicationID MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nonnull applicationId MTR_NEWLY_AVAILABLE; +@end + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRApplicationBasicClusterApplicationBasicApplication : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull catalogVendorId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSString * _Nonnull applicationId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_NEWLY_DEPRECATED("Please use MTRApplicationBasicClusterApplicationStruct") +@interface MTRApplicationBasicClusterApplicationBasicApplication : MTRApplicationBasicClusterApplicationStruct @end MTR_NEWLY_AVAILABLE diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index 2ed5f682094daf..21c96d9e460ed1 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -3784,35 +3784,58 @@ - (NSString *)description @implementation MTRApplicationLauncherClusterApplicationEP : MTRApplicationLauncherClusterApplicationEPStruct @end -@implementation MTRApplicationBasicClusterApplicationBasicApplication +@implementation MTRApplicationBasicClusterApplicationStruct - (instancetype)init { if (self = [super init]) { - _catalogVendorId = @(0); + _catalogVendorID = @(0); - _applicationId = @""; + _applicationID = @""; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRApplicationBasicClusterApplicationBasicApplication alloc] init]; + auto other = [[MTRApplicationBasicClusterApplicationStruct alloc] init]; - other.catalogVendorId = self.catalogVendorId; - other.applicationId = self.applicationId; + other.catalogVendorID = self.catalogVendorID; + other.applicationID = self.applicationID; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: catalogVendorId:%@; applicationId:%@; >", - NSStringFromClass([self class]), _catalogVendorId, _applicationId]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: catalogVendorID:%@; applicationID:%@; >", + NSStringFromClass([self class]), _catalogVendorID, _applicationID]; return descriptionString; } +- (void)setCatalogVendorId:(NSNumber * _Nonnull)catalogVendorId +{ + self.catalogVendorID = catalogVendorId; +} + +- (NSNumber * _Nonnull)catalogVendorId +{ + return self.catalogVendorID; +} + +- (void)setApplicationId:(NSString * _Nonnull)applicationId +{ + self.applicationID = applicationId; +} + +- (NSString * _Nonnull)applicationId +{ + return self.applicationID; +} + +@end + +@implementation MTRApplicationBasicClusterApplicationBasicApplication : MTRApplicationBasicClusterApplicationStruct @end @implementation MTRUnitTestingClusterSimpleStruct diff --git a/zzz_generated/app-common/app-common/zap-generated/af-structs.h b/zzz_generated/app-common/app-common/zap-generated/af-structs.h index 5bc0a86b450639..013c0a0246a95b 100644 --- a/zzz_generated/app-common/app-common/zap-generated/af-structs.h +++ b/zzz_generated/app-common/app-common/zap-generated/af-structs.h @@ -30,13 +30,6 @@ #include "enums.h" -// Struct for ApplicationBasicApplication -typedef struct _ApplicationBasicApplication -{ - uint16_t catalogVendorId; - chip::CharSpan applicationId; -} ApplicationBasicApplication; - // Struct for CredentialStruct typedef struct _CredentialStruct { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index afe1586d8a736e..8ce0b83858e360 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -26,6 +26,50 @@ namespace Clusters { namespace detail { // Structs shared across multiple clusters. namespace Structs { +namespace ApplicationStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kCatalogVendorID)), catalogVendorID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kApplicationID)), applicationID)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + err = reader.EnterContainer(outer); + ReturnErrorOnFailure(err); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + if (!TLV::IsContextTag(reader.GetTag())) + { + continue; + } + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kCatalogVendorID): + ReturnErrorOnFailure(DataModel::Decode(reader, catalogVendorID)); + break; + case to_underlying(Fields::kApplicationID): + ReturnErrorOnFailure(DataModel::Decode(reader, applicationID)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; +} + +} // namespace ApplicationStruct namespace LabelStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { @@ -17407,50 +17451,6 @@ namespace Events {} // namespace Events } // namespace AudioOutput namespace ApplicationLauncher { namespace Structs { -namespace ApplicationStruct { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const -{ - TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kCatalogVendorID)), catalogVendorID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kApplicationID)), applicationID)); - ReturnErrorOnFailure(writer.EndContainer(outer)); - return CHIP_NO_ERROR; -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVType outer; - VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); - err = reader.EnterContainer(outer); - ReturnErrorOnFailure(err); - while ((err = reader.Next()) == CHIP_NO_ERROR) - { - if (!TLV::IsContextTag(reader.GetTag())) - { - continue; - } - switch (TLV::TagNumFromTag(reader.GetTag())) - { - case to_underlying(Fields::kCatalogVendorID): - ReturnErrorOnFailure(DataModel::Decode(reader, catalogVendorID)); - break; - case to_underlying(Fields::kApplicationID): - ReturnErrorOnFailure(DataModel::Decode(reader, applicationID)); - break; - default: - break; - } - } - - VerifyOrReturnError(err == CHIP_END_OF_TLV, err); - ReturnErrorOnFailure(reader.ExitContainer(outer)); - - return CHIP_NO_ERROR; -} - -} // namespace ApplicationStruct namespace ApplicationEPStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { @@ -17694,52 +17694,7 @@ namespace Events {} // namespace Events } // namespace ApplicationLauncher namespace ApplicationBasic { -namespace Structs { -namespace ApplicationBasicApplication { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const -{ - TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kCatalogVendorId)), catalogVendorId)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kApplicationId)), applicationId)); - ReturnErrorOnFailure(writer.EndContainer(outer)); - return CHIP_NO_ERROR; -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVType outer; - VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); - err = reader.EnterContainer(outer); - ReturnErrorOnFailure(err); - while ((err = reader.Next()) == CHIP_NO_ERROR) - { - if (!TLV::IsContextTag(reader.GetTag())) - { - continue; - } - switch (TLV::TagNumFromTag(reader.GetTag())) - { - case to_underlying(Fields::kCatalogVendorId): - ReturnErrorOnFailure(DataModel::Decode(reader, catalogVendorId)); - break; - case to_underlying(Fields::kApplicationId): - ReturnErrorOnFailure(DataModel::Decode(reader, applicationId)); - break; - default: - break; - } - } - - VerifyOrReturnError(err == CHIP_END_OF_TLV, err); - ReturnErrorOnFailure(reader.ExitContainer(outer)); - - return CHIP_NO_ERROR; -} - -} // namespace ApplicationBasicApplication -} // namespace Structs +namespace Structs {} // namespace Structs namespace Commands {} // namespace Commands diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index 2117cbbbf24fbe..ee11788b87948d 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -43,6 +43,29 @@ namespace Clusters { namespace detail { // Structs shared across multiple clusters. namespace Structs { +namespace ApplicationStruct { +enum class Fields +{ + kCatalogVendorID = 0, + kApplicationID = 1, +}; + +struct Type +{ +public: + uint16_t catalogVendorID = static_cast(0); + chip::CharSpan applicationID; + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; +}; + +using DecodableType = Type; + +} // namespace ApplicationStruct namespace LabelStruct { enum class Fields { @@ -22706,29 +22729,7 @@ struct TypeInfo } // namespace AudioOutput namespace ApplicationLauncher { namespace Structs { -namespace ApplicationStruct { -enum class Fields -{ - kCatalogVendorID = 0, - kApplicationID = 1, -}; - -struct Type -{ -public: - uint16_t catalogVendorID = static_cast(0); - chip::CharSpan applicationID; - - CHIP_ERROR Decode(TLV::TLVReader & reader); - - static constexpr bool kIsFabricScoped = false; - - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; -}; - -using DecodableType = Type; - -} // namespace ApplicationStruct +namespace ApplicationStruct = Clusters::detail::Structs::ApplicationStruct; namespace ApplicationEPStruct { enum class Fields { @@ -22996,29 +22997,7 @@ struct TypeInfo } // namespace ApplicationLauncher namespace ApplicationBasic { namespace Structs { -namespace ApplicationBasicApplication { -enum class Fields -{ - kCatalogVendorId = 0, - kApplicationId = 1, -}; - -struct Type -{ -public: - uint16_t catalogVendorId = static_cast(0); - chip::CharSpan applicationId; - - CHIP_ERROR Decode(TLV::TLVReader & reader); - - static constexpr bool kIsFabricScoped = false; - - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; -}; - -using DecodableType = Type; - -} // namespace ApplicationBasicApplication +namespace ApplicationStruct = Clusters::detail::Structs::ApplicationStruct; } // namespace Structs namespace Attributes { @@ -23076,9 +23055,9 @@ struct TypeInfo namespace Application { struct TypeInfo { - using Type = chip::app::Clusters::ApplicationBasic::Structs::ApplicationBasicApplication::Type; - using DecodableType = chip::app::Clusters::ApplicationBasic::Structs::ApplicationBasicApplication::DecodableType; - using DecodableArgType = const chip::app::Clusters::ApplicationBasic::Structs::ApplicationBasicApplication::DecodableType &; + using Type = chip::app::Clusters::ApplicationBasic::Structs::ApplicationStruct::Type; + using DecodableType = chip::app::Clusters::ApplicationBasic::Structs::ApplicationStruct::DecodableType; + using DecodableArgType = const chip::app::Clusters::ApplicationBasic::Structs::ApplicationStruct::DecodableType &; static constexpr ClusterId GetClusterId() { return Clusters::ApplicationBasic::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::Application::Id; } diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp index 84ca3fdd6c8c4e..571f7c0ec3f1da 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp @@ -160,32 +160,6 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::ContentLauncher::Struc ComplexArgumentParser::Finalize(request.name); ComplexArgumentParser::Finalize(request.value); } -CHIP_ERROR ComplexArgumentParser::Setup(const char * label, - chip::app::Clusters::ApplicationBasic::Structs::ApplicationBasicApplication::Type & request, - Json::Value & value) -{ - VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ApplicationBasicApplication.catalogVendorId", "catalogVendorId", - value.isMember("catalogVendorId"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ApplicationBasicApplication.applicationId", "applicationId", - value.isMember("applicationId"))); - - char labelWithMember[kMaxLabelLength]; - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "catalogVendorId"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.catalogVendorId, value["catalogVendorId"])); - - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "applicationId"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.applicationId, value["applicationId"])); - - return CHIP_NO_ERROR; -} - -void ComplexArgumentParser::Finalize(chip::app::Clusters::ApplicationBasic::Structs::ApplicationBasicApplication::Type & request) -{ - ComplexArgumentParser::Finalize(request.catalogVendorId); - ComplexArgumentParser::Finalize(request.applicationId); -} CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::ApplicationLauncher::Structs::ApplicationEPStruct::Type & request, Json::Value & value) @@ -213,8 +187,7 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::ApplicationLauncher::S ComplexArgumentParser::Finalize(request.application); ComplexArgumentParser::Finalize(request.endpoint); } -CHIP_ERROR ComplexArgumentParser::Setup(const char * label, - chip::app::Clusters::ApplicationLauncher::Structs::ApplicationStruct::Type & request, +CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::detail::Structs::ApplicationStruct::Type & request, Json::Value & value) { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); @@ -234,7 +207,7 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, return CHIP_NO_ERROR; } -void ComplexArgumentParser::Finalize(chip::app::Clusters::ApplicationLauncher::Structs::ApplicationStruct::Type & request) +void ComplexArgumentParser::Finalize(chip::app::Clusters::detail::Structs::ApplicationStruct::Type & request) { ComplexArgumentParser::Finalize(request.catalogVendorID); ComplexArgumentParser::Finalize(request.applicationID); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h index fa38afafbced6f..f901a9c4186368 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h @@ -39,19 +39,14 @@ static CHIP_ERROR Setup(const char * label, chip::app::Clusters::ContentLauncher Json::Value & value); static void Finalize(chip::app::Clusters::ContentLauncher::Structs::AdditionalInfoStruct::Type & request); -static CHIP_ERROR Setup(const char * label, - chip::app::Clusters::ApplicationBasic::Structs::ApplicationBasicApplication::Type & request, - Json::Value & value); - -static void Finalize(chip::app::Clusters::ApplicationBasic::Structs::ApplicationBasicApplication::Type & request); static CHIP_ERROR Setup(const char * label, chip::app::Clusters::ApplicationLauncher::Structs::ApplicationEPStruct::Type & request, Json::Value & value); static void Finalize(chip::app::Clusters::ApplicationLauncher::Structs::ApplicationEPStruct::Type & request); -static CHIP_ERROR Setup(const char * label, chip::app::Clusters::ApplicationLauncher::Structs::ApplicationStruct::Type & request, +static CHIP_ERROR Setup(const char * label, chip::app::Clusters::detail::Structs::ApplicationStruct::Type & request, Json::Value & value); -static void Finalize(chip::app::Clusters::ApplicationLauncher::Structs::ApplicationStruct::Type & request); +static void Finalize(chip::app::Clusters::detail::Structs::ApplicationStruct::Type & request); static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Scenes::Structs::AttributeValuePair::Type & request, Json::Value & value); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index 2c26495971e1fe..fd7004071e454e 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -177,31 +177,6 @@ DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } CHIP_ERROR -DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::ApplicationBasic::Structs::ApplicationBasicApplication::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - { - CHIP_ERROR err = LogValue("CatalogVendorId", indent + 1, value.catalogVendorId); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'CatalogVendorId'"); - return err; - } - } - { - CHIP_ERROR err = LogValue("ApplicationId", indent + 1, value.applicationId); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ApplicationId'"); - return err; - } - } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const chip::app::Clusters::ApplicationLauncher::Structs::ApplicationEPStruct::DecodableType & value) { @@ -226,9 +201,8 @@ DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } -CHIP_ERROR -DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::ApplicationLauncher::Structs::ApplicationStruct::DecodableType & value) +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::detail::Structs::ApplicationStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { @@ -8938,7 +8912,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("ProductID", 1, value); } case ApplicationBasic::Attributes::Application::Id: { - chip::app::Clusters::ApplicationBasic::Structs::ApplicationBasicApplication::DecodableType value; + chip::app::Clusters::ApplicationBasic::Structs::ApplicationStruct::DecodableType value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("Application", 1, value); } diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h index fe650c8154a921..c57766c79a2227 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h @@ -28,13 +28,10 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Actions::Structs::ActionStruct::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::ContentLauncher::Structs::AdditionalInfoStruct::DecodableType & value); -static CHIP_ERROR -LogValue(const char * label, size_t indent, - const chip::app::Clusters::ApplicationBasic::Structs::ApplicationBasicApplication::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::ApplicationLauncher::Structs::ApplicationEPStruct::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::ApplicationLauncher::Structs::ApplicationStruct::DecodableType & value); + const chip::app::Clusters::detail::Structs::ApplicationStruct::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Scenes::Structs::AttributeValuePair::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 0c2ea2750e50f7..19bfd3944e968b 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -34781,9 +34781,9 @@ class Test_TC_APBSC_9_1Suite : public TestCommand case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::ApplicationBasic::Structs::ApplicationBasicApplication::DecodableType value; + chip::app::Clusters::ApplicationBasic::Structs::ApplicationStruct::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "ApplicationBasicApplication", "ApplicationBasicApplication")); + VerifyOrReturn(CheckConstraintType("value", "ApplicationStruct", "ApplicationStruct")); } break; case 6: @@ -55006,11 +55006,11 @@ class TV_ApplicationBasicClusterSuite : public TestCommand case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::ApplicationBasic::Structs::ApplicationBasicApplication::DecodableType value; + chip::app::Clusters::ApplicationBasic::Structs::ApplicationStruct::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("application.catalogVendorId", value.catalogVendorId, 123U)); + VerifyOrReturn(CheckValue("application.catalogVendorID", value.catalogVendorID, 123U)); VerifyOrReturn( - CheckValueAsString("application.applicationId", value.applicationId, chip::CharSpan("applicationId", 13))); + CheckValueAsString("application.applicationID", value.applicationID, chip::CharSpan("applicationId", 13))); } break; case 7: diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h index df076cdad399d6..809f1bda6d0e4b 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -75052,7 +75052,7 @@ class ReadApplicationBasicApplication : public ReadAttribute { endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeApplicationWithCompletion:^( - MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable error) { + MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.Application response %@", [value description]); if (error != nil) { LogNSError("ApplicationBasic Application read Error", error); @@ -75093,7 +75093,7 @@ class SubscribeAttributeApplicationBasicApplication : public SubscribeAttribute subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable error) { + reportHandler:^(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.Application response %@", [value description]); SetCommandExitStatus(error); }]; 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 d3dedf286e8655..c1da84a01f8349 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -46584,12 +46584,12 @@ class Test_TC_APBSC_9_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeApplicationWithCompletion:^( - MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable err) { + MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the Application attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("application", "ApplicationBasicApplication", "ApplicationBasicApplication")); + VerifyOrReturn(CheckConstraintType("application", "ApplicationStruct", "ApplicationStruct")); NextTest(); }]; @@ -74437,17 +74437,17 @@ class TV_ApplicationBasicCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeApplicationWithCompletion:^( - MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable err) { + MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute application status Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("catalogVendorId", - ((MTRApplicationBasicClusterApplicationBasicApplication *) actualValue).catalogVendorId, 123U)); - VerifyOrReturn(CheckValueAsString("applicationId", - ((MTRApplicationBasicClusterApplicationBasicApplication *) actualValue).applicationId, @"applicationId")); + VerifyOrReturn(CheckValue( + "CatalogVendorID", ((MTRApplicationBasicClusterApplicationStruct *) actualValue).catalogVendorID, 123U)); + VerifyOrReturn(CheckValueAsString("ApplicationID", + ((MTRApplicationBasicClusterApplicationStruct *) actualValue).applicationID, @"applicationId")); } NextTest();