diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 1e87224ca9d81b..33a29558443f42 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -3696,12 +3696,17 @@ server cluster FanControl = 514 { kReverse = 1; } - enum DirectionEnum : ENUM8 { - kIncrease = 0; - kDecrease = 1; + enum FanModeEnum : ENUM8 { + kOff = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; + kOn = 4; + kAuto = 5; + kSmart = 6; } - enum FanModeSequenceType : ENUM8 { + enum FanModeSequenceEnum : ENUM8 { kOffLowMedHigh = 0; kOffLowHigh = 1; kOffLowMedHighAuto = 2; @@ -3710,14 +3715,9 @@ server cluster FanControl = 514 { kOffOn = 5; } - enum FanModeType : ENUM8 { - kOff = 0; - kLow = 1; - kMedium = 2; - kHigh = 3; - kOn = 4; - kAuto = 5; - kSmart = 6; + enum StepDirectionEnum : ENUM8 { + kIncrease = 0; + kDecrease = 1; } bitmap Feature : BITMAP32 { @@ -3729,33 +3729,28 @@ server cluster FanControl = 514 { kAirflowDirection = 0x20; } - bitmap RockSupportMask : BITMAP8 { + bitmap RockBitmap : BITMAP8 { kRockLeftRight = 0x1; kRockUpDown = 0x2; kRockRound = 0x4; } - bitmap WindSettingMask : BITMAP8 { - kSleepWind = 0x1; - kNaturalWind = 0x2; - } - - bitmap WindSupportMask : BITMAP8 { + bitmap WindBitmap : BITMAP8 { kSleepWind = 0x1; kNaturalWind = 0x2; } - attribute FanModeType fanMode = 0; - attribute FanModeSequenceType fanModeSequence = 1; - attribute nullable int8u percentSetting = 2; - readonly attribute int8u percentCurrent = 3; + attribute FanModeEnum fanMode = 0; + attribute FanModeSequenceEnum fanModeSequence = 1; + attribute nullable Percent percentSetting = 2; + readonly attribute Percent percentCurrent = 3; readonly attribute int8u speedMax = 4; attribute nullable int8u speedSetting = 5; readonly attribute int8u speedCurrent = 6; - readonly attribute bitmap8 rockSupport = 7; - attribute bitmap8 rockSetting = 8; - readonly attribute bitmap8 windSupport = 9; - attribute bitmap8 windSetting = 10; + readonly attribute RockBitmap rockSupport = 7; + attribute RockBitmap rockSetting = 8; + readonly attribute WindBitmap windSupport = 9; + attribute WindBitmap windSetting = 10; attribute AirflowDirectionEnum airflowDirection = 11; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -3765,7 +3760,7 @@ server cluster FanControl = 514 { readonly attribute int16u clusterRevision = 65533; request struct StepRequest { - DirectionEnum direction = 0; + StepDirectionEnum direction = 0; optional boolean wrap = 1; optional boolean lowestOff = 2; } @@ -6471,12 +6466,12 @@ endpoint 1 { ram attribute speedMax default = 100; ram attribute speedSetting default = 0x00; ram attribute speedCurrent default = 0x00; - ram attribute rockSupport default = 0x00; + ram attribute rockSupport default = 0x03; ram attribute rockSetting default = 0x00; - ram attribute windSupport default = 0x00; + ram attribute windSupport default = 0x03; ram attribute windSetting default = 0x00; ram attribute airflowDirection default = 0; - ram attribute featureMap default = 0x0F; + ram attribute featureMap default = 0x3F; ram attribute clusterRevision default = 2; } 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 c5e15ce673f529..494ab7418bf4d1 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 @@ -16,6 +16,12 @@ } ], "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" + }, { "pathRelativity": "relativeToZap", "path": "../../../src/app/zap-templates/zcl/zcl-with-test-extensions.json", @@ -23,12 +29,6 @@ "category": "matter", "version": 1, "description": "Matter SDK ZCL data with some extensions" - }, - { - "pathRelativity": "relativeToZap", - "path": "../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" } ], "endpointTypes": [ @@ -18482,7 +18482,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "FanModeType", + "type": "FanModeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -18498,7 +18498,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "FanModeSequenceType", + "type": "FanModeSequenceEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -18514,7 +18514,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "Percent", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -18530,7 +18530,7 @@ "code": 3, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "Percent", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -18594,12 +18594,12 @@ "code": 7, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "RockBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "0x03", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -18610,7 +18610,7 @@ "code": 8, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "RockBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -18626,12 +18626,12 @@ "code": 9, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "WindBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "0x03", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -18642,7 +18642,7 @@ "code": 10, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "WindBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -18727,7 +18727,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0F", + "defaultValue": "0x3F", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -32125,4 +32125,4 @@ } ], "log": [] -} +} \ No newline at end of file diff --git a/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp b/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp index 4f70f80f7ccb24..d28904010f0cca 100644 --- a/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp @@ -57,9 +57,9 @@ class FanAttrAccess : public AttributeAccessInterface CHIP_ERROR FanAttrAccess::ReadPercentCurrent(EndpointId endpoint, AttributeValueEncoder & aEncoder) { // Return PercentSetting attribute value for now - DataModel::Nullable percentSetting; + DataModel::Nullable percentSetting; PercentSetting::Get(endpoint, percentSetting); - uint8_t ret = 0; + Percent ret = 0; if (!percentSetting.IsNull()) { ret = percentSetting.Value(); @@ -103,13 +103,5 @@ CHIP_ERROR FanAttrAccess::Read(const ConcreteReadAttributePath & aPath, Attribut void emberAfFanControlClusterInitCallback(EndpointId endpoint) { - uint32_t featureMap = 0; - - featureMap |= to_underlying(FanControl::Feature::kMultiSpeed); - featureMap |= to_underlying(FanControl::Feature::kMultiSpeed); - featureMap |= to_underlying(FanControl::Feature::kAuto); - - FeatureMap::Set(endpoint, featureMap); - registerAttributeAccessOverride(&gAttrAccess); } 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 528e98a664aa05..ae887a2138c9b1 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 @@ -2792,12 +2792,17 @@ server cluster FanControl = 514 { kReverse = 1; } - enum DirectionEnum : ENUM8 { - kIncrease = 0; - kDecrease = 1; + enum FanModeEnum : ENUM8 { + kOff = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; + kOn = 4; + kAuto = 5; + kSmart = 6; } - enum FanModeSequenceType : ENUM8 { + enum FanModeSequenceEnum : ENUM8 { kOffLowMedHigh = 0; kOffLowHigh = 1; kOffLowMedHighAuto = 2; @@ -2806,14 +2811,9 @@ server cluster FanControl = 514 { kOffOn = 5; } - enum FanModeType : ENUM8 { - kOff = 0; - kLow = 1; - kMedium = 2; - kHigh = 3; - kOn = 4; - kAuto = 5; - kSmart = 6; + enum StepDirectionEnum : ENUM8 { + kIncrease = 0; + kDecrease = 1; } bitmap Feature : BITMAP32 { @@ -2825,26 +2825,21 @@ server cluster FanControl = 514 { kAirflowDirection = 0x20; } - bitmap RockSupportMask : BITMAP8 { + bitmap RockBitmap : BITMAP8 { kRockLeftRight = 0x1; kRockUpDown = 0x2; kRockRound = 0x4; } - bitmap WindSettingMask : BITMAP8 { - kSleepWind = 0x1; - kNaturalWind = 0x2; - } - - bitmap WindSupportMask : BITMAP8 { + bitmap WindBitmap : BITMAP8 { kSleepWind = 0x1; kNaturalWind = 0x2; } - attribute FanModeType fanMode = 0; - attribute FanModeSequenceType fanModeSequence = 1; - attribute nullable int8u percentSetting = 2; - readonly attribute int8u percentCurrent = 3; + attribute FanModeEnum fanMode = 0; + attribute FanModeSequenceEnum fanModeSequence = 1; + attribute nullable Percent percentSetting = 2; + readonly attribute Percent percentCurrent = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter index ac8b7825a22475..8114f21312532e 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter @@ -1210,12 +1210,17 @@ server cluster FanControl = 514 { kReverse = 1; } - enum DirectionEnum : ENUM8 { - kIncrease = 0; - kDecrease = 1; + enum FanModeEnum : ENUM8 { + kOff = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; + kOn = 4; + kAuto = 5; + kSmart = 6; } - enum FanModeSequenceType : ENUM8 { + enum FanModeSequenceEnum : ENUM8 { kOffLowMedHigh = 0; kOffLowHigh = 1; kOffLowMedHighAuto = 2; @@ -1224,14 +1229,9 @@ server cluster FanControl = 514 { kOffOn = 5; } - enum FanModeType : ENUM8 { - kOff = 0; - kLow = 1; - kMedium = 2; - kHigh = 3; - kOn = 4; - kAuto = 5; - kSmart = 6; + enum StepDirectionEnum : ENUM8 { + kIncrease = 0; + kDecrease = 1; } bitmap Feature : BITMAP32 { @@ -1243,33 +1243,28 @@ server cluster FanControl = 514 { kAirflowDirection = 0x20; } - bitmap RockSupportMask : BITMAP8 { + bitmap RockBitmap : BITMAP8 { kRockLeftRight = 0x1; kRockUpDown = 0x2; kRockRound = 0x4; } - bitmap WindSettingMask : BITMAP8 { - kSleepWind = 0x1; - kNaturalWind = 0x2; - } - - bitmap WindSupportMask : BITMAP8 { + bitmap WindBitmap : BITMAP8 { kSleepWind = 0x1; kNaturalWind = 0x2; } - attribute FanModeType fanMode = 0; - attribute FanModeSequenceType fanModeSequence = 1; - attribute nullable int8u percentSetting = 2; - readonly attribute int8u percentCurrent = 3; + attribute FanModeEnum fanMode = 0; + attribute FanModeSequenceEnum fanModeSequence = 1; + attribute nullable Percent percentSetting = 2; + readonly attribute Percent percentCurrent = 3; readonly attribute int8u speedMax = 4; attribute nullable int8u speedSetting = 5; readonly attribute int8u speedCurrent = 6; - readonly attribute bitmap8 rockSupport = 7; - attribute bitmap8 rockSetting = 8; - readonly attribute bitmap8 windSupport = 9; - attribute bitmap8 windSetting = 10; + readonly attribute RockBitmap rockSupport = 7; + attribute RockBitmap rockSetting = 8; + readonly attribute WindBitmap windSupport = 9; + attribute WindBitmap windSetting = 10; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap b/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap index f715082468805f..cab0ff28e19c12 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap @@ -6112,7 +6112,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "FanModeType", + "type": "FanModeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -6128,7 +6128,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "FanModeSequenceType", + "type": "FanModeSequenceEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -6144,7 +6144,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "Percent", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -6160,7 +6160,7 @@ "code": 3, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "Percent", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -6224,7 +6224,7 @@ "code": 7, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "RockBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -6240,7 +6240,7 @@ "code": 8, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "RockBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -6256,7 +6256,7 @@ "code": 9, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "WindBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -6272,7 +6272,7 @@ "code": 10, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "WindBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -6387,5 +6387,6 @@ "endpointVersion": 1, "deviceIdentifier": 43 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index c79d8d208594a4..683ec5e863619c 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -1523,12 +1523,17 @@ server cluster FanControl = 514 { kReverse = 1; } - enum DirectionEnum : ENUM8 { - kIncrease = 0; - kDecrease = 1; + enum FanModeEnum : ENUM8 { + kOff = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; + kOn = 4; + kAuto = 5; + kSmart = 6; } - enum FanModeSequenceType : ENUM8 { + enum FanModeSequenceEnum : ENUM8 { kOffLowMedHigh = 0; kOffLowHigh = 1; kOffLowMedHighAuto = 2; @@ -1537,14 +1542,9 @@ server cluster FanControl = 514 { kOffOn = 5; } - enum FanModeType : ENUM8 { - kOff = 0; - kLow = 1; - kMedium = 2; - kHigh = 3; - kOn = 4; - kAuto = 5; - kSmart = 6; + enum StepDirectionEnum : ENUM8 { + kIncrease = 0; + kDecrease = 1; } bitmap Feature : BITMAP32 { @@ -1556,26 +1556,21 @@ server cluster FanControl = 514 { kAirflowDirection = 0x20; } - bitmap RockSupportMask : BITMAP8 { + bitmap RockBitmap : BITMAP8 { kRockLeftRight = 0x1; kRockUpDown = 0x2; kRockRound = 0x4; } - bitmap WindSettingMask : BITMAP8 { - kSleepWind = 0x1; - kNaturalWind = 0x2; - } - - bitmap WindSupportMask : BITMAP8 { + bitmap WindBitmap : BITMAP8 { kSleepWind = 0x1; kNaturalWind = 0x2; } - attribute FanModeType fanMode = 0; - attribute FanModeSequenceType fanModeSequence = 1; - attribute nullable int8u percentSetting = 2; - readonly attribute int8u percentCurrent = 3; + attribute FanModeEnum fanMode = 0; + attribute FanModeSequenceEnum fanModeSequence = 1; + attribute nullable Percent percentSetting = 2; + readonly attribute Percent percentCurrent = 3; readonly attribute int8u speedMax = 4; attribute nullable int8u speedSetting = 5; readonly attribute int8u speedCurrent = 6; diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap index a363843cff96b7..63a60b24272408 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap @@ -7912,7 +7912,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "FanModeType", + "type": "FanModeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -7928,7 +7928,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "FanModeSequenceType", + "type": "FanModeSequenceEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -7944,7 +7944,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "Percent", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -7960,7 +7960,7 @@ "code": 3, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "Percent", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -8024,7 +8024,7 @@ "code": 7, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "RockBitmap", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -8040,7 +8040,7 @@ "code": 8, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "RockBitmap", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -8056,7 +8056,7 @@ "code": 9, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "WindBitmap", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -8072,7 +8072,7 @@ "code": 10, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "WindBitmap", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -8187,5 +8187,6 @@ "endpointVersion": 1, "deviceIdentifier": 768 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index fb6d1886e2b7f3..09438ae6a30c4f 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -1332,12 +1332,17 @@ client cluster FanControl = 514 { kReverse = 1; } - enum DirectionEnum : ENUM8 { - kIncrease = 0; - kDecrease = 1; + enum FanModeEnum : ENUM8 { + kOff = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; + kOn = 4; + kAuto = 5; + kSmart = 6; } - enum FanModeSequenceType : ENUM8 { + enum FanModeSequenceEnum : ENUM8 { kOffLowMedHigh = 0; kOffLowHigh = 1; kOffLowMedHighAuto = 2; @@ -1346,14 +1351,9 @@ client cluster FanControl = 514 { kOffOn = 5; } - enum FanModeType : ENUM8 { - kOff = 0; - kLow = 1; - kMedium = 2; - kHigh = 3; - kOn = 4; - kAuto = 5; - kSmart = 6; + enum StepDirectionEnum : ENUM8 { + kIncrease = 0; + kDecrease = 1; } bitmap Feature : BITMAP32 { @@ -1365,33 +1365,28 @@ client cluster FanControl = 514 { kAirflowDirection = 0x20; } - bitmap RockSupportMask : BITMAP8 { + bitmap RockBitmap : BITMAP8 { kRockLeftRight = 0x1; kRockUpDown = 0x2; kRockRound = 0x4; } - bitmap WindSettingMask : BITMAP8 { - kSleepWind = 0x1; - kNaturalWind = 0x2; - } - - bitmap WindSupportMask : BITMAP8 { + bitmap WindBitmap : BITMAP8 { kSleepWind = 0x1; kNaturalWind = 0x2; } - attribute FanModeType fanMode = 0; - attribute FanModeSequenceType fanModeSequence = 1; - attribute nullable int8u percentSetting = 2; - readonly attribute int8u percentCurrent = 3; + attribute FanModeEnum fanMode = 0; + attribute FanModeSequenceEnum fanModeSequence = 1; + attribute nullable Percent percentSetting = 2; + readonly attribute Percent percentCurrent = 3; readonly attribute optional int8u speedMax = 4; attribute optional nullable int8u speedSetting = 5; readonly attribute optional int8u speedCurrent = 6; - readonly attribute optional bitmap8 rockSupport = 7; - attribute optional bitmap8 rockSetting = 8; - readonly attribute optional bitmap8 windSupport = 9; - attribute optional bitmap8 windSetting = 10; + readonly attribute optional RockBitmap rockSupport = 7; + attribute optional RockBitmap rockSetting = 8; + readonly attribute optional WindBitmap windSupport = 9; + attribute optional WindBitmap windSetting = 10; attribute optional AirflowDirectionEnum airflowDirection = 11; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1401,7 +1396,7 @@ client cluster FanControl = 514 { readonly attribute int16u clusterRevision = 65533; request struct StepRequest { - DirectionEnum direction = 0; + StepDirectionEnum direction = 0; optional boolean wrap = 1; optional boolean lowestOff = 2; } diff --git a/scripts/tools/zap/tests/inputs/all-clusters-app.zap b/scripts/tools/zap/tests/inputs/all-clusters-app.zap index 32b040ada86d42..8796229aaa2868 100644 --- a/scripts/tools/zap/tests/inputs/all-clusters-app.zap +++ b/scripts/tools/zap/tests/inputs/all-clusters-app.zap @@ -16,6 +16,12 @@ } ], "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" + }, { "pathRelativity": "relativeToZap", "path": "../../../../../src/app/zap-templates/zcl/zcl-with-test-extensions.json", @@ -23,12 +29,6 @@ "category": "matter", "version": 1, "description": "Matter SDK ZCL data with some extensions" - }, - { - "pathRelativity": "relativeToZap", - "path": "../../../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" } ], "endpointTypes": [ @@ -15214,7 +15214,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "FanModeType", + "type": "FanModeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -15230,7 +15230,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "FanModeSequenceType", + "type": "FanModeSequenceEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -15246,7 +15246,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "Percent", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -15262,7 +15262,7 @@ "code": 3, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "Percent", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -15326,7 +15326,7 @@ "code": 7, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "RockBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -15342,7 +15342,7 @@ "code": 8, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "RockBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -15358,7 +15358,7 @@ "code": 9, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "WindBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -15374,7 +15374,7 @@ "code": 10, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "WindBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -24919,5 +24919,6 @@ "endpointVersion": 1, "deviceIdentifier": 61442 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h index 6354fcfd514c8b..ccdcdf1a1eb4b0 100644 --- a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h +++ b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h @@ -1041,9 +1041,9 @@ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* FanMode */ \ { ZAP_MIN_MAX_DEFAULTS_INDEX(23), 0x00000001, 1, ZAP_TYPE(ENUM8), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* FanModeSequence */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(24), 0x00000002, 1, ZAP_TYPE(INT8U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(24), 0x00000002, 1, ZAP_TYPE(PERCENT), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* PercentSetting */ \ - { ZAP_SIMPLE_DEFAULT(0x00), 0x00000003, 1, ZAP_TYPE(INT8U), 0 }, /* PercentCurrent */ \ + { ZAP_SIMPLE_DEFAULT(0x00), 0x00000003, 1, ZAP_TYPE(PERCENT), 0 }, /* PercentCurrent */ \ { ZAP_SIMPLE_DEFAULT(100), 0x00000004, 1, ZAP_TYPE(INT8U), 0 }, /* SpeedMax */ \ { ZAP_MIN_MAX_DEFAULTS_INDEX(25), 0x00000005, 1, ZAP_TYPE(INT8U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* SpeedSetting */ \ diff --git a/src/app/clusters/fan-control-server/fan-control-server.cpp b/src/app/clusters/fan-control-server/fan-control-server.cpp index c2c9c1cc2fe3ee..4c70a4a0f02073 100644 --- a/src/app/clusters/fan-control-server/fan-control-server.cpp +++ b/src/app/clusters/fan-control-server/fan-control-server.cpp @@ -48,13 +48,13 @@ bool gWriteFromClusterLogic = false; EmberAfStatus SetFanModeToOff(EndpointId endpointId) { - FanModeType currentFanMode; + FanModeEnum currentFanMode; EmberAfStatus status = FanMode::Get(endpointId, ¤tFanMode); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (currentFanMode != FanModeType::kOff) + if (currentFanMode != FanModeEnum::kOff) { - status = FanMode::Set(endpointId, FanModeType::kOff); + status = FanMode::Set(endpointId, FanModeEnum::kOff); } return status; @@ -69,32 +69,32 @@ bool HasFeature(EndpointId endpoint, Feature feature) return success ? ((featureMap & to_underlying(feature)) != 0) : false; } -inline bool SupportsMultiSpeed(chip::EndpointId endpointId) +inline bool SupportsMultiSpeed(EndpointId endpointId) { return HasFeature(endpointId, Feature::kMultiSpeed); } -inline bool SupportsAuto(chip::EndpointId endpointId) +inline bool SupportsAuto(EndpointId endpointId) { return HasFeature(endpointId, Feature::kAuto); } -inline bool SupportsRocking(chip::EndpointId endpointId) +inline bool SupportsRocking(EndpointId endpointId) { return HasFeature(endpointId, Feature::kRocking); } -inline bool SupportsWind(chip::EndpointId endpointId) +inline bool SupportsWind(EndpointId endpointId) { return HasFeature(endpointId, Feature::kWind); } -inline bool SupportsStep(chip::EndpointId endpointId) +inline bool SupportsStep(EndpointId endpointId) { return HasFeature(endpointId, Feature::kStep); } -inline bool SupportsAirflowDirection(chip::EndpointId endpointId) +inline bool SupportsAirflowDirection(EndpointId endpointId) { return HasFeature(endpointId, Feature::kAirflowDirection); } @@ -116,26 +116,26 @@ MatterFanControlClusterServerPreAttributeChangedCallback(const ConcreteAttribute switch (attributePath.mAttributeId) { case FanMode::Id: { - if (*value == to_underlying(FanModeType::kOn)) + if (*value == to_underlying(FanModeEnum::kOn)) { - FanMode::Set(attributePath.mEndpointId, FanModeType::kHigh); + FanMode::Set(attributePath.mEndpointId, FanModeEnum::kHigh); res = Status::WriteIgnored; } - else if (*value == to_underlying(FanModeType::kSmart)) + else if (*value == to_underlying(FanModeEnum::kSmart)) { - FanModeSequenceType fanModeSequence; + FanModeSequenceEnum fanModeSequence; EmberAfStatus status = FanModeSequence::Get(attributePath.mEndpointId, &fanModeSequence); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, Status::Failure); if (SupportsAuto(attributePath.mEndpointId) && - ((fanModeSequence == FanModeSequenceType::kOffLowHighAuto) || - (fanModeSequence == FanModeSequenceType::kOffLowMedHighAuto))) + ((fanModeSequence == FanModeSequenceEnum::kOffLowHighAuto) || + (fanModeSequence == FanModeSequenceEnum::kOffLowMedHighAuto))) { - FanMode::Set(attributePath.mEndpointId, FanModeType::kAuto); + FanMode::Set(attributePath.mEndpointId, FanModeEnum::kAuto); } else { - FanMode::Set(attributePath.mEndpointId, FanModeType::kHigh); + FanMode::Set(attributePath.mEndpointId, FanModeEnum::kHigh); } res = Status::WriteIgnored; } @@ -186,7 +186,7 @@ MatterFanControlClusterServerPreAttributeChangedCallback(const ConcreteAttribute } case PercentSetting::Id: { // Check if the PercentSetting is null. - if (NumericAttributeTraits::IsNullValue(*value)) + if (NumericAttributeTraits::IsNullValue(*value)) { if (gWriteFromClusterLogic) { @@ -207,10 +207,11 @@ MatterFanControlClusterServerPreAttributeChangedCallback(const ConcreteAttribute case RockSetting::Id: { if (SupportsRocking(attributePath.mEndpointId)) { - uint8_t rockSupport; + BitMask rockSupport; EmberAfStatus status = RockSupport::Get(attributePath.mEndpointId, &rockSupport); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, Status::ConstraintError); - if ((*value & rockSupport) == *value) + auto rawRockSupport = rockSupport.Raw(); + if ((*value & rawRockSupport) == *value) { res = Status::Success; } @@ -225,13 +226,14 @@ MatterFanControlClusterServerPreAttributeChangedCallback(const ConcreteAttribute } break; } - case WindSupport::Id: { + case WindSetting::Id: { if (SupportsWind(attributePath.mEndpointId)) { - uint8_t windSupport; + BitMask windSupport; EmberAfStatus status = WindSupport::Get(attributePath.mEndpointId, &windSupport); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, Status::ConstraintError); - if ((*value & windSupport) == *value) + auto rawWindSupport = windSupport.Raw(); + if ((*value & rawWindSupport) == *value) { res = Status::Success; } @@ -270,13 +272,13 @@ void MatterFanControlClusterServerAttributeChangedCallback(const app::ConcreteAt switch (attributePath.mAttributeId) { case FanMode::Id: { - FanModeType mode; + FanModeEnum mode; EmberAfStatus status = FanMode::Get(attributePath.mEndpointId, &mode); VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status); // Setting the FanMode value to Off SHALL set the values of PercentSetting, PercentCurrent, // SpeedSetting, SpeedCurrent attributes to 0 (zero). - if (mode == FanModeType::kOff) + if (mode == FanModeEnum::kOff) { status = PercentSetting::Set(attributePath.mEndpointId, 0); VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, @@ -300,7 +302,7 @@ void MatterFanControlClusterServerAttributeChangedCallback(const app::ConcreteAt // Setting the attribute value to Auto SHALL set the values of PercentSetting, SpeedSetting (if present) // to null. - if (mode == FanModeType::kAuto) + if (mode == FanModeEnum::kAuto) { gWriteFromClusterLogic = true; status = PercentSetting::SetNull(attributePath.mEndpointId); @@ -318,7 +320,7 @@ void MatterFanControlClusterServerAttributeChangedCallback(const app::ConcreteAt break; } case PercentSetting::Id: { - DataModel::Nullable percentSetting; + DataModel::Nullable percentSetting; EmberAfStatus status = PercentSetting::Get(attributePath.mEndpointId, percentSetting); VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status && !percentSetting.IsNull()); @@ -378,13 +380,13 @@ void MatterFanControlClusterServerAttributeChangedCallback(const app::ConcreteAt VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(Zcl, "Failed to get SpeedMax with error: 0x%02x", status)); - DataModel::Nullable currentPercentSetting; + DataModel::Nullable currentPercentSetting; status = PercentSetting::Get(attributePath.mEndpointId, currentPercentSetting); VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(Zcl, "Failed to get PercentSetting with error: 0x%02x", status)); float speed = speedSetting.Value(); - uint8_t percentSetting = static_cast(speed / speedMax * 100); + Percent percentSetting = static_cast(speed / speedMax * 100); if (currentPercentSetting.IsNull() || percentSetting != currentPercentSetting.Value()) { @@ -400,9 +402,8 @@ void MatterFanControlClusterServerAttributeChangedCallback(const app::ConcreteAt } } -bool emberAfFanControlClusterStepCallback(chip::app::CommandHandler * commandObj, - const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::FanControl::Commands::Step::DecodableType & commandData) +bool emberAfFanControlClusterStepCallback(CommandHandler * commandObj, const ConcreteCommandPath & commandPath, + const Commands::Step::DecodableType & commandData) { /* * TODO: Clarification needed in spec issue #6496 - if this is tied to the SpeedSetting attribute, then diff --git a/src/app/tests/suites/certification/Test_TC_FAN_2_1.yaml b/src/app/tests/suites/certification/Test_TC_FAN_2_1.yaml index e9575ba38acbb7..f293ae62e57621 100644 --- a/src/app/tests/suites/certification/Test_TC_FAN_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_FAN_2_1.yaml @@ -57,7 +57,7 @@ tests: attribute: "PercentSetting" response: constraints: - type: int8u + type: Percent minValue: 0 maxValue: 100 @@ -67,6 +67,6 @@ tests: attribute: "PercentCurrent" response: constraints: - type: int8u + type: Percent minValue: 0 maxValue: 100 diff --git a/src/app/zap-templates/zcl/data-model/chip/fan-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/fan-control-cluster.xml index 8460756a679d30..1b7552f451c66a 100644 --- a/src/app/zap-templates/zcl/data-model/chip/fan-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/fan-control-cluster.xml @@ -19,7 +19,7 @@ limitations under the License. - + @@ -27,7 +27,7 @@ limitations under the License. - + @@ -38,7 +38,7 @@ limitations under the License. - + @@ -48,26 +48,20 @@ limitations under the License. - + - + - - - - - - - + @@ -89,22 +83,22 @@ limitations under the License. true true - FanMode - FanModeSequence - PercentSetting - PercentCurrent + FanMode + FanModeSequence + PercentSetting + PercentCurrent SpeedMax SpeedSetting SpeedCurrent - RockSupport - RockSetting - WindSupport - WindSetting + RockSupport + RockSetting + WindSupport + WindSetting AirflowDirection - + The Step command speeds up or slows down the fan, in steps. - + diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 87bd9a50fdc4b8..463247067b2757 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -4921,12 +4921,17 @@ client cluster FanControl = 514 { kReverse = 1; } - enum DirectionEnum : ENUM8 { - kIncrease = 0; - kDecrease = 1; + enum FanModeEnum : ENUM8 { + kOff = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; + kOn = 4; + kAuto = 5; + kSmart = 6; } - enum FanModeSequenceType : ENUM8 { + enum FanModeSequenceEnum : ENUM8 { kOffLowMedHigh = 0; kOffLowHigh = 1; kOffLowMedHighAuto = 2; @@ -4935,14 +4940,9 @@ client cluster FanControl = 514 { kOffOn = 5; } - enum FanModeType : ENUM8 { - kOff = 0; - kLow = 1; - kMedium = 2; - kHigh = 3; - kOn = 4; - kAuto = 5; - kSmart = 6; + enum StepDirectionEnum : ENUM8 { + kIncrease = 0; + kDecrease = 1; } bitmap Feature : BITMAP32 { @@ -4954,33 +4954,28 @@ client cluster FanControl = 514 { kAirflowDirection = 0x20; } - bitmap RockSupportMask : BITMAP8 { + bitmap RockBitmap : BITMAP8 { kRockLeftRight = 0x1; kRockUpDown = 0x2; kRockRound = 0x4; } - bitmap WindSettingMask : BITMAP8 { - kSleepWind = 0x1; - kNaturalWind = 0x2; - } - - bitmap WindSupportMask : BITMAP8 { + bitmap WindBitmap : BITMAP8 { kSleepWind = 0x1; kNaturalWind = 0x2; } - attribute FanModeType fanMode = 0; - attribute FanModeSequenceType fanModeSequence = 1; - attribute nullable int8u percentSetting = 2; - readonly attribute int8u percentCurrent = 3; + attribute FanModeEnum fanMode = 0; + attribute FanModeSequenceEnum fanModeSequence = 1; + attribute nullable Percent percentSetting = 2; + readonly attribute Percent percentCurrent = 3; readonly attribute optional int8u speedMax = 4; attribute optional nullable int8u speedSetting = 5; readonly attribute optional int8u speedCurrent = 6; - readonly attribute optional bitmap8 rockSupport = 7; - attribute optional bitmap8 rockSetting = 8; - readonly attribute optional bitmap8 windSupport = 9; - attribute optional bitmap8 windSetting = 10; + readonly attribute optional RockBitmap rockSupport = 7; + attribute optional RockBitmap rockSetting = 8; + readonly attribute optional WindBitmap windSupport = 9; + attribute optional WindBitmap windSetting = 10; attribute optional AirflowDirectionEnum airflowDirection = 11; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -4990,7 +4985,7 @@ client cluster FanControl = 514 { readonly attribute int16u clusterRevision = 65533; request struct StepRequest { - DirectionEnum direction = 0; + StepDirectionEnum direction = 0; optional boolean wrap = 1; optional boolean lowestOff = 2; } diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 69218e0355a231..648c8e7bbd3b6d 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -19592,7 +19592,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "FanModeType", + "type": "FanModeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -19608,7 +19608,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "FanModeSequenceType", + "type": "FanModeSequenceEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -19624,7 +19624,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "Percent", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -19640,7 +19640,7 @@ "code": 3, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "Percent", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -19704,7 +19704,7 @@ "code": 7, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "RockBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -19720,7 +19720,7 @@ "code": 8, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "RockBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -19736,7 +19736,7 @@ "code": 9, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "WindBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -19752,7 +19752,7 @@ "code": 10, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "WindBitmap", "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 8fdbbde37221e9..1696e4a0636255 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -21281,7 +21281,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + cppValue.Raw(), value); return value; } case Attributes::RockSetting::Id: { @@ -21296,7 +21296,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + cppValue.Raw(), value); return value; } case Attributes::WindSupport::Id: { @@ -21311,7 +21311,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + cppValue.Raw(), value); return value; } case Attributes::WindSetting::Id: { @@ -21326,7 +21326,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + cppValue.Raw(), value); return value; } case Attributes::AirflowDirection::Id: { diff --git a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp index e92be17671753d..c102ef8e8e882f 100644 --- a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp @@ -6291,8 +6291,8 @@ JNI_METHOD(void, FanControlCluster, writeRockSettingAttribute) std::vector> cleanupByteArrays; std::vector> cleanupStrings; - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + cppValue.SetRaw(static_cast::IntegerType>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value))); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -6343,8 +6343,8 @@ JNI_METHOD(void, FanControlCluster, writeWindSettingAttribute) std::vector> cleanupByteArrays; std::vector> cleanupStrings; - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + cppValue.SetRaw(static_cast::IntegerType>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value))); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index 9471d374bc6092..cea30958852d00 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -33054,7 +33054,7 @@ CHIPFanControlPercentSettingAttributeCallback::~CHIPFanControlPercentSettingAttr } void CHIPFanControlPercentSettingAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 361c55ce428e38..d0572a7909deec 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -26760,8 +26760,8 @@ class FanControl(Cluster): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="fanMode", Tag=0x00000000, Type=FanControl.Enums.FanModeType), - ClusterObjectFieldDescriptor(Label="fanModeSequence", Tag=0x00000001, Type=FanControl.Enums.FanModeSequenceType), + ClusterObjectFieldDescriptor(Label="fanMode", Tag=0x00000000, Type=FanControl.Enums.FanModeEnum), + ClusterObjectFieldDescriptor(Label="fanModeSequence", Tag=0x00000001, Type=FanControl.Enums.FanModeSequenceEnum), ClusterObjectFieldDescriptor(Label="percentSetting", Tag=0x00000002, Type=typing.Union[Nullable, uint]), ClusterObjectFieldDescriptor(Label="percentCurrent", Tag=0x00000003, Type=uint), ClusterObjectFieldDescriptor(Label="speedMax", Tag=0x00000004, Type=typing.Optional[uint]), @@ -26780,8 +26780,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - fanMode: 'FanControl.Enums.FanModeType' = None - fanModeSequence: 'FanControl.Enums.FanModeSequenceType' = None + fanMode: 'FanControl.Enums.FanModeEnum' = None + fanModeSequence: 'FanControl.Enums.FanModeSequenceEnum' = None percentSetting: 'typing.Union[Nullable, uint]' = None percentCurrent: 'uint' = None speedMax: 'typing.Optional[uint]' = None @@ -26809,16 +26809,21 @@ class AirflowDirectionEnum(MatterIntEnum): # enum value. This specific should never be transmitted. kUnknownEnumValue = 2, - class DirectionEnum(MatterIntEnum): - kIncrease = 0x00 - kDecrease = 0x01 + class FanModeEnum(MatterIntEnum): + kOff = 0x00 + kLow = 0x01 + kMedium = 0x02 + kHigh = 0x03 + kOn = 0x04 + kAuto = 0x05 + kSmart = 0x06 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving and unknown # enum value. This specific should never be transmitted. - kUnknownEnumValue = 2, + kUnknownEnumValue = 7, - class FanModeSequenceType(MatterIntEnum): + class FanModeSequenceEnum(MatterIntEnum): kOffLowMedHigh = 0x00 kOffLowHigh = 0x01 kOffLowMedHighAuto = 0x02 @@ -26831,19 +26836,14 @@ class FanModeSequenceType(MatterIntEnum): # enum value. This specific should never be transmitted. kUnknownEnumValue = 6, - class FanModeType(MatterIntEnum): - kOff = 0x00 - kLow = 0x01 - kMedium = 0x02 - kHigh = 0x03 - kOn = 0x04 - kAuto = 0x05 - kSmart = 0x06 + class StepDirectionEnum(MatterIntEnum): + kIncrease = 0x00 + kDecrease = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving and unknown # enum value. This specific should never be transmitted. - kUnknownEnumValue = 7, + kUnknownEnumValue = 2, class Bitmaps: class Feature(IntFlag): @@ -26854,16 +26854,12 @@ class Feature(IntFlag): kStep = 0x10 kAirflowDirection = 0x20 - class RockSupportMask(IntFlag): + class RockBitmap(IntFlag): kRockLeftRight = 0x1 kRockUpDown = 0x2 kRockRound = 0x4 - class WindSettingMask(IntFlag): - kSleepWind = 0x1 - kNaturalWind = 0x2 - - class WindSupportMask(IntFlag): + class WindBitmap(IntFlag): kSleepWind = 0x1 kNaturalWind = 0x2 @@ -26879,12 +26875,12 @@ class Step(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="direction", Tag=0, Type=FanControl.Enums.DirectionEnum), + ClusterObjectFieldDescriptor(Label="direction", Tag=0, Type=FanControl.Enums.StepDirectionEnum), ClusterObjectFieldDescriptor(Label="wrap", Tag=1, Type=typing.Optional[bool]), ClusterObjectFieldDescriptor(Label="lowestOff", Tag=2, Type=typing.Optional[bool]), ]) - direction: 'FanControl.Enums.DirectionEnum' = 0 + direction: 'FanControl.Enums.StepDirectionEnum' = 0 wrap: 'typing.Optional[bool]' = None lowestOff: 'typing.Optional[bool]' = None @@ -26901,9 +26897,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=FanControl.Enums.FanModeType) + return ClusterObjectFieldDescriptor(Type=FanControl.Enums.FanModeEnum) - value: 'FanControl.Enums.FanModeType' = 0 + value: 'FanControl.Enums.FanModeEnum' = 0 @dataclass class FanModeSequence(ClusterAttributeDescriptor): @@ -26917,9 +26913,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=FanControl.Enums.FanModeSequenceType) + return ClusterObjectFieldDescriptor(Type=FanControl.Enums.FanModeSequenceEnum) - value: 'FanControl.Enums.FanModeSequenceType' = 0 + value: 'FanControl.Enums.FanModeSequenceEnum' = 0 @dataclass class PercentSetting(ClusterAttributeDescriptor): diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index d433f7686bbb09..abe0229ec96592 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -13233,7 +13233,7 @@ static id _Nullable DecodeAttributeValueForFanControlCluster( return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; return value; } case Attributes::RockSetting::Id: { @@ -13244,7 +13244,7 @@ static id _Nullable DecodeAttributeValueForFanControlCluster( return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; return value; } case Attributes::WindSupport::Id: { @@ -13255,7 +13255,7 @@ static id _Nullable DecodeAttributeValueForFanControlCluster( return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; return value; } case Attributes::WindSetting::Id: { @@ -13266,7 +13266,7 @@ static id _Nullable DecodeAttributeValueForFanControlCluster( return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; return value; } case Attributes::AirflowDirection::Id: { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index d026b7fe5d9dac..57defcafb7613f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -25536,29 +25536,29 @@ typedef NS_ENUM(uint8_t, MTRFanControlAirflowDirection) { MTRFanControlAirflowDirectionReverse MTR_NEWLY_AVAILABLE = 0x01, } MTR_NEWLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRFanControlDirection) { - MTRFanControlDirectionIncrease MTR_NEWLY_AVAILABLE = 0x00, - MTRFanControlDirectionDecrease MTR_NEWLY_AVAILABLE = 0x01, +typedef NS_ENUM(uint8_t, MTRFanControlFanMode) { + MTRFanControlFanModeOff MTR_NEWLY_AVAILABLE = 0x00, + MTRFanControlFanModeLow MTR_NEWLY_AVAILABLE = 0x01, + MTRFanControlFanModeMedium MTR_NEWLY_AVAILABLE = 0x02, + MTRFanControlFanModeHigh MTR_NEWLY_AVAILABLE = 0x03, + MTRFanControlFanModeOn MTR_NEWLY_AVAILABLE = 0x04, + MTRFanControlFanModeAuto MTR_NEWLY_AVAILABLE = 0x05, + MTRFanControlFanModeSmart MTR_NEWLY_AVAILABLE = 0x06, } MTR_NEWLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRFanControlFanModeSequenceType) { - MTRFanControlFanModeSequenceTypeOffLowMedHigh API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRFanControlFanModeSequenceTypeOffLowHigh API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRFanControlFanModeSequenceTypeOffLowMedHighAuto API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRFanControlFanModeSequenceTypeOffLowHighAuto API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, - MTRFanControlFanModeSequenceTypeOffOnAuto API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, - MTRFanControlFanModeSequenceTypeOffOn API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, -} API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTRFanControlFanModeSequence) { + MTRFanControlFanModeSequenceOffLowMedHigh MTR_NEWLY_AVAILABLE = 0x00, + MTRFanControlFanModeSequenceOffLowHigh MTR_NEWLY_AVAILABLE = 0x01, + MTRFanControlFanModeSequenceOffLowMedHighAuto MTR_NEWLY_AVAILABLE = 0x02, + MTRFanControlFanModeSequenceOffLowHighAuto MTR_NEWLY_AVAILABLE = 0x03, + MTRFanControlFanModeSequenceOffOnAuto MTR_NEWLY_AVAILABLE = 0x04, + MTRFanControlFanModeSequenceOffOn MTR_NEWLY_AVAILABLE = 0x05, +} MTR_NEWLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRFanControlFanModeType) { - MTRFanControlFanModeTypeOff API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRFanControlFanModeTypeLow API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRFanControlFanModeTypeMedium API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRFanControlFanModeTypeHigh API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, - MTRFanControlFanModeTypeOn API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, - MTRFanControlFanModeTypeAuto API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, - MTRFanControlFanModeTypeSmart API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x06, -} API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTRFanControlStepDirection) { + MTRFanControlStepDirectionIncrease MTR_NEWLY_AVAILABLE = 0x00, + MTRFanControlStepDirectionDecrease MTR_NEWLY_AVAILABLE = 0x01, +} MTR_NEWLY_AVAILABLE; typedef NS_OPTIONS(uint32_t, MTRFanControlFeature) { MTRFanControlFeatureMultiSpeed API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, @@ -25569,21 +25569,16 @@ typedef NS_OPTIONS(uint32_t, MTRFanControlFeature) { MTRFanControlFeatureAirflowDirection MTR_NEWLY_AVAILABLE = 0x20, } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -typedef NS_OPTIONS(uint8_t, MTRFanControlRockSupportMask) { - MTRFanControlRockSupportMaskRockLeftRight API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTRFanControlRockSupportMaskRockUpDown API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, - MTRFanControlRockSupportMaskRockRound API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, -} API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_OPTIONS(uint8_t, MTRFanControlWindSettingMask) { - MTRFanControlWindSettingMaskSleepWind API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTRFanControlWindSettingMaskNaturalWind API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, -} API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint8_t, MTRFanControlRockBitmap) { + MTRFanControlRockBitmapRockLeftRight MTR_NEWLY_AVAILABLE = 0x1, + MTRFanControlRockBitmapRockUpDown MTR_NEWLY_AVAILABLE = 0x2, + MTRFanControlRockBitmapRockRound MTR_NEWLY_AVAILABLE = 0x4, +} MTR_NEWLY_AVAILABLE; -typedef NS_OPTIONS(uint8_t, MTRFanControlWindSupportMask) { - MTRFanControlWindSupportMaskSleepWind API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTRFanControlWindSupportMaskNaturalWind API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, -} API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint8_t, MTRFanControlWindBitmap) { + MTRFanControlWindBitmapSleepWind MTR_NEWLY_AVAILABLE = 0x1, + MTRFanControlWindBitmapNaturalWind MTR_NEWLY_AVAILABLE = 0x2, +} MTR_NEWLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRColorControlColorLoopAction) { MTRColorControlColorLoopActionDeactivate API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 0588c01dd4cdbd..5f7a3297a5deac 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -71143,7 +71143,7 @@ - (void)readAttributeFanModeWithCompletion:(void (^)(NSNumber * _Nullable value, { MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; - return MTRReadAttribute( + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -71189,7 +71189,7 @@ - (void)subscribeAttributeFanModeWithParams:(MTRSubscribeParams * _Nonnull)param reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; - MTRSubscribeAttribute( + MTRSubscribeAttribute( params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -71199,9 +71199,9 @@ + (void)readAttributeFanModeWithClusterStateCache:(MTRClusterStateCacheContainer queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRFanControlClusterFanModeTypeAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRFanControlClusterFanModeEnumAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(FanControlClusterFanModeTypeAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(FanControlClusterFanModeEnumAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; @@ -71223,7 +71223,7 @@ - (void)readAttributeFanModeSequenceWithCompletion:(void (^)(NSNumber * _Nullabl { MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; - return MTRReadAttribute( + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -71269,7 +71269,7 @@ - (void)subscribeAttributeFanModeSequenceWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -71280,9 +71280,9 @@ + (void)readAttributeFanModeSequenceWithClusterStateCache:(MTRClusterStateCacheC completion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRFanControlClusterFanModeSequenceEnumAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(FanControlClusterFanModeSequenceTypeAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(FanControlClusterFanModeSequenceEnumAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; @@ -71603,7 +71603,7 @@ - (void)readAttributeRockSupportWithCompletion:(void (^)(NSNumber * _Nullable va { MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; - return MTRReadAttribute( + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -71612,7 +71612,7 @@ - (void)subscribeAttributeRockSupportWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; - MTRSubscribeAttribute(params, + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -71622,9 +71622,9 @@ + (void)readAttributeRockSupportWithClusterStateCache:(MTRClusterStateCacheConta queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRFanControlRockSupportAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(FanControlRockSupportAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; @@ -71646,7 +71646,7 @@ - (void)readAttributeRockSettingWithCompletion:(void (^)(NSNumber * _Nullable va { MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; - return MTRReadAttribute( + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -71679,7 +71679,7 @@ - (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value ListFreer listFreer; using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); @@ -71692,7 +71692,7 @@ - (void)subscribeAttributeRockSettingWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; - MTRSubscribeAttribute(params, + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -71702,9 +71702,9 @@ + (void)readAttributeRockSettingWithClusterStateCache:(MTRClusterStateCacheConta queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRFanControlRockSettingAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(FanControlRockSettingAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; @@ -71726,7 +71726,7 @@ - (void)readAttributeWindSupportWithCompletion:(void (^)(NSNumber * _Nullable va { MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; - return MTRReadAttribute( + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -71735,7 +71735,7 @@ - (void)subscribeAttributeWindSupportWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; - MTRSubscribeAttribute(params, + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -71745,9 +71745,9 @@ + (void)readAttributeWindSupportWithClusterStateCache:(MTRClusterStateCacheConta queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRFanControlWindSupportAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(FanControlWindSupportAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; @@ -71769,7 +71769,7 @@ - (void)readAttributeWindSettingWithCompletion:(void (^)(NSNumber * _Nullable va { MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; - return MTRReadAttribute( + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -71802,7 +71802,7 @@ - (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value ListFreer listFreer; using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); @@ -71815,7 +71815,7 @@ - (void)subscribeAttributeWindSettingWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; - MTRSubscribeAttribute(params, + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -71825,9 +71825,9 @@ + (void)readAttributeWindSettingWithClusterStateCache:(MTRClusterStateCacheConta queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRFanControlWindSettingAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(FanControlWindSettingAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h index a1e9a2fb5ec3b1..e6c3b3d1b30fb2 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h @@ -520,15 +520,15 @@ typedef void (*FanControlClusterAirflowDirectionEnumAttributeCallback)(void *, chip::app::Clusters::FanControl::AirflowDirectionEnum); typedef void (*NullableFanControlClusterAirflowDirectionEnumAttributeCallback)( void *, const chip::app::DataModel::Nullable &); -typedef void (*FanControlClusterDirectionEnumAttributeCallback)(void *, chip::app::Clusters::FanControl::DirectionEnum); -typedef void (*NullableFanControlClusterDirectionEnumAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*FanControlClusterFanModeSequenceTypeAttributeCallback)(void *, chip::app::Clusters::FanControl::FanModeSequenceType); -typedef void (*NullableFanControlClusterFanModeSequenceTypeAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*FanControlClusterFanModeTypeAttributeCallback)(void *, chip::app::Clusters::FanControl::FanModeType); -typedef void (*NullableFanControlClusterFanModeTypeAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); +typedef void (*FanControlClusterFanModeEnumAttributeCallback)(void *, chip::app::Clusters::FanControl::FanModeEnum); +typedef void (*NullableFanControlClusterFanModeEnumAttributeCallback)( + void *, const chip::app::DataModel::Nullable &); +typedef void (*FanControlClusterFanModeSequenceEnumAttributeCallback)(void *, chip::app::Clusters::FanControl::FanModeSequenceEnum); +typedef void (*NullableFanControlClusterFanModeSequenceEnumAttributeCallback)( + void *, const chip::app::DataModel::Nullable &); +typedef void (*FanControlClusterStepDirectionEnumAttributeCallback)(void *, chip::app::Clusters::FanControl::StepDirectionEnum); +typedef void (*NullableFanControlClusterStepDirectionEnumAttributeCallback)( + void *, const chip::app::DataModel::Nullable &); typedef void (*ColorControlClusterColorLoopActionAttributeCallback)(void *, chip::app::Clusters::ColorControl::ColorLoopAction); typedef void (*NullableColorControlClusterColorLoopActionAttributeCallback)( void *, const chip::app::DataModel::Nullable &); @@ -1296,6 +1296,10 @@ typedef void (*ThermostatEventListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ThermostatAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*FanControlRockSupportAttributeCallback)(void *, chip::BitMask); +typedef void (*FanControlRockSettingAttributeCallback)(void *, chip::BitMask); +typedef void (*FanControlWindSupportAttributeCallback)(void *, chip::BitMask); +typedef void (*FanControlWindSettingAttributeCallback)(void *, chip::BitMask); typedef void (*FanControlGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*FanControlAcceptedCommandListListAttributeCallback)( @@ -10828,6 +10832,126 @@ class MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRFanControlRockSupportAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRFanControlRockSupportAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRFanControlRockSupportAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, chip::BitMask value); +}; + +class MTRFanControlRockSupportAttributeCallbackSubscriptionBridge : public MTRFanControlRockSupportAttributeCallbackBridge +{ +public: + MTRFanControlRockSupportAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRFanControlRockSupportAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRFanControlRockSupportAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFanControlRockSupportAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRFanControlRockSettingAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRFanControlRockSettingAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRFanControlRockSettingAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, chip::BitMask value); +}; + +class MTRFanControlRockSettingAttributeCallbackSubscriptionBridge : public MTRFanControlRockSettingAttributeCallbackBridge +{ +public: + MTRFanControlRockSettingAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRFanControlRockSettingAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRFanControlRockSettingAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFanControlRockSettingAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRFanControlWindSupportAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRFanControlWindSupportAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRFanControlWindSupportAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, chip::BitMask value); +}; + +class MTRFanControlWindSupportAttributeCallbackSubscriptionBridge : public MTRFanControlWindSupportAttributeCallbackBridge +{ +public: + MTRFanControlWindSupportAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRFanControlWindSupportAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRFanControlWindSupportAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFanControlWindSupportAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRFanControlWindSettingAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRFanControlWindSettingAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRFanControlWindSettingAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, chip::BitMask value); +}; + +class MTRFanControlWindSettingAttributeCallbackSubscriptionBridge : public MTRFanControlWindSettingAttributeCallbackBridge +{ +public: + MTRFanControlWindSettingAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRFanControlWindSettingAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRFanControlWindSettingAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFanControlWindSettingAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRFanControlGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -24484,201 +24608,201 @@ class MTRNullableFanControlClusterAirflowDirectionEnumAttributeCallbackSubscript MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRFanControlClusterDirectionEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRFanControlClusterFanModeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRFanControlClusterDirectionEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRFanControlClusterFanModeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRFanControlClusterDirectionEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRFanControlClusterFanModeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::FanControl::DirectionEnum value); + static void OnSuccessFn(void * context, chip::app::Clusters::FanControl::FanModeEnum value); }; -class MTRFanControlClusterDirectionEnumAttributeCallbackSubscriptionBridge - : public MTRFanControlClusterDirectionEnumAttributeCallbackBridge +class MTRFanControlClusterFanModeEnumAttributeCallbackSubscriptionBridge + : public MTRFanControlClusterFanModeEnumAttributeCallbackBridge { public: - MTRFanControlClusterDirectionEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFanControlClusterDirectionEnumAttributeCallbackBridge(queue, handler, action), + MTRFanControlClusterFanModeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRFanControlClusterFanModeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRFanControlClusterDirectionEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRFanControlClusterDirectionEnumAttributeCallbackBridge::OnDone; + using MTRFanControlClusterFanModeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFanControlClusterFanModeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableFanControlClusterDirectionEnumAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableFanControlClusterFanModeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableFanControlClusterDirectionEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableFanControlClusterFanModeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableFanControlClusterDirectionEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableFanControlClusterFanModeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class MTRNullableFanControlClusterDirectionEnumAttributeCallbackSubscriptionBridge - : public MTRNullableFanControlClusterDirectionEnumAttributeCallbackBridge +class MTRNullableFanControlClusterFanModeEnumAttributeCallbackSubscriptionBridge + : public MTRNullableFanControlClusterFanModeEnumAttributeCallbackBridge { public: - MTRNullableFanControlClusterDirectionEnumAttributeCallbackSubscriptionBridge( + MTRNullableFanControlClusterFanModeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableFanControlClusterDirectionEnumAttributeCallbackBridge(queue, handler, action), + MTRNullableFanControlClusterFanModeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableFanControlClusterDirectionEnumAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableFanControlClusterDirectionEnumAttributeCallbackBridge::OnDone; + using MTRNullableFanControlClusterFanModeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableFanControlClusterFanModeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRFanControlClusterFanModeSequenceEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRFanControlClusterFanModeSequenceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRFanControlClusterFanModeSequenceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::FanControl::FanModeSequenceType value); + static void OnSuccessFn(void * context, chip::app::Clusters::FanControl::FanModeSequenceEnum value); }; -class MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge - : public MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge +class MTRFanControlClusterFanModeSequenceEnumAttributeCallbackSubscriptionBridge + : public MTRFanControlClusterFanModeSequenceEnumAttributeCallbackBridge { public: - MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge( + MTRFanControlClusterFanModeSequenceEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge(queue, handler, action), + MTRFanControlClusterFanModeSequenceEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge::OnDone; + using MTRFanControlClusterFanModeSequenceEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFanControlClusterFanModeSequenceEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableFanControlClusterFanModeSequenceEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableFanControlClusterFanModeSequenceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRNullableFanControlClusterFanModeSequenceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge - : public MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackBridge +class MTRNullableFanControlClusterFanModeSequenceEnumAttributeCallbackSubscriptionBridge + : public MTRNullableFanControlClusterFanModeSequenceEnumAttributeCallbackBridge { public: - MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge( + MTRNullableFanControlClusterFanModeSequenceEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackBridge(queue, handler, action), + MTRNullableFanControlClusterFanModeSequenceEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackBridge::OnDone; + using MTRNullableFanControlClusterFanModeSequenceEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableFanControlClusterFanModeSequenceEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRFanControlClusterFanModeTypeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRFanControlClusterStepDirectionEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRFanControlClusterFanModeTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRFanControlClusterStepDirectionEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRFanControlClusterFanModeTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRFanControlClusterStepDirectionEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::FanControl::FanModeType value); + static void OnSuccessFn(void * context, chip::app::Clusters::FanControl::StepDirectionEnum value); }; -class MTRFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge - : public MTRFanControlClusterFanModeTypeAttributeCallbackBridge +class MTRFanControlClusterStepDirectionEnumAttributeCallbackSubscriptionBridge + : public MTRFanControlClusterStepDirectionEnumAttributeCallbackBridge { public: - MTRFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFanControlClusterFanModeTypeAttributeCallbackBridge(queue, handler, action), + MTRFanControlClusterStepDirectionEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRFanControlClusterStepDirectionEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRFanControlClusterFanModeTypeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRFanControlClusterFanModeTypeAttributeCallbackBridge::OnDone; + using MTRFanControlClusterStepDirectionEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFanControlClusterStepDirectionEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableFanControlClusterFanModeTypeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableFanControlClusterStepDirectionEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableFanControlClusterFanModeTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableFanControlClusterStepDirectionEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableFanControlClusterFanModeTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableFanControlClusterStepDirectionEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class MTRNullableFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge - : public MTRNullableFanControlClusterFanModeTypeAttributeCallbackBridge +class MTRNullableFanControlClusterStepDirectionEnumAttributeCallbackSubscriptionBridge + : public MTRNullableFanControlClusterStepDirectionEnumAttributeCallbackBridge { public: - MTRNullableFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge( + MTRNullableFanControlClusterStepDirectionEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableFanControlClusterFanModeTypeAttributeCallbackBridge(queue, handler, action), + MTRNullableFanControlClusterStepDirectionEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableFanControlClusterFanModeTypeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableFanControlClusterFanModeTypeAttributeCallbackBridge::OnDone; + using MTRNullableFanControlClusterStepDirectionEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableFanControlClusterStepDirectionEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm index ff249bb32b2d4f..c1db00a3dfafa9 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm @@ -10523,6 +10523,98 @@ } } +void MTRFanControlRockSupportAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitMask value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; + DispatchSuccess(context, objCValue); +}; + +void MTRFanControlRockSupportAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRFanControlRockSettingAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitMask value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; + DispatchSuccess(context, objCValue); +}; + +void MTRFanControlRockSettingAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRFanControlWindSupportAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitMask value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; + DispatchSuccess(context, objCValue); +}; + +void MTRFanControlWindSupportAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRFanControlWindSettingAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitMask value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; + DispatchSuccess(context, objCValue); +}; + +void MTRFanControlWindSettingAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + void MTRFanControlGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { @@ -23059,15 +23151,15 @@ } } -void MTRFanControlClusterDirectionEnumAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::FanControl::DirectionEnum value) +void MTRFanControlClusterFanModeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::FanControl::FanModeEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRFanControlClusterDirectionEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRFanControlClusterFanModeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23082,8 +23174,8 @@ } } -void MTRNullableFanControlClusterDirectionEnumAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableFanControlClusterFanModeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -23094,7 +23186,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableFanControlClusterDirectionEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableFanControlClusterFanModeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23109,15 +23201,15 @@ } } -void MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::FanControl::FanModeSequenceType value) +void MTRFanControlClusterFanModeSequenceEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::FanControl::FanModeSequenceEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRFanControlClusterFanModeSequenceEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23132,8 +23224,8 @@ } } -void MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableFanControlClusterFanModeSequenceEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -23144,7 +23236,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableFanControlClusterFanModeSequenceEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23159,15 +23251,15 @@ } } -void MTRFanControlClusterFanModeTypeAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::FanControl::FanModeType value) +void MTRFanControlClusterStepDirectionEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::FanControl::StepDirectionEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRFanControlClusterStepDirectionEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -23182,8 +23274,8 @@ } } -void MTRNullableFanControlClusterFanModeTypeAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableFanControlClusterStepDirectionEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -23194,7 +23286,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableFanControlClusterStepDirectionEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index 893fb06b852f32..37bdff68f5df2f 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -17775,9 +17775,9 @@ namespace Attributes { namespace FanMode { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeType * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::FanControl::Id, Id, readable, sizeof(temp)); @@ -17789,9 +17789,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::FanControl::Fa *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeType value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -17806,9 +17806,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::FanControl::Fa namespace FanModeSequence { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeSequenceType * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeSequenceEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::FanControl::Id, Id, readable, sizeof(temp)); @@ -17820,9 +17820,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::FanControl::Fa *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeSequenceType value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeSequenceEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -17837,9 +17837,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::FanControl::Fa namespace PercentSetting { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::FanControl::Id, Id, readable, sizeof(temp)); @@ -17854,9 +17854,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & valu } return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -17864,19 +17864,19 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -17890,9 +17890,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl namespace PercentCurrent { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::Percent * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::FanControl::Id, Id, readable, sizeof(temp)); @@ -17904,9 +17904,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -17914,7 +17914,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); } } // namespace PercentCurrent @@ -18036,9 +18036,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace RockSupport { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::FanControl::Id, Id, readable, sizeof(temp)); @@ -18050,9 +18050,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -18067,9 +18067,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace RockSetting { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::FanControl::Id, Id, readable, sizeof(temp)); @@ -18081,9 +18081,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -18098,9 +18098,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace WindSupport { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::FanControl::Id, Id, readable, sizeof(temp)); @@ -18112,9 +18112,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -18129,9 +18129,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace WindSetting { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::FanControl::Id, Id, readable, sizeof(temp)); @@ -18143,9 +18143,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index 3a6170ec8d2680..d73efc57382d15 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -3195,25 +3195,25 @@ namespace FanControl { namespace Attributes { namespace FanMode { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeType * value); // FanModeType -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeType value); +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeEnum * value); // FanModeEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeEnum value); } // namespace FanMode namespace FanModeSequence { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeSequenceType * value); // FanModeSequenceType -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeSequenceType value); +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeSequenceEnum * value); // FanModeSequenceEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeSequenceEnum value); } // namespace FanModeSequence namespace PercentSetting { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // Percent +EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace PercentSetting namespace PercentCurrent { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, chip::Percent * value); // Percent +EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent value); } // namespace PercentCurrent namespace SpeedMax { @@ -3234,23 +3234,23 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace SpeedCurrent namespace RockSupport { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // bitmap8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value); // RockBitmap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); } // namespace RockSupport namespace RockSetting { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // bitmap8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value); // RockBitmap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); } // namespace RockSetting namespace WindSupport { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // bitmap8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value); // WindBitmap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); } // namespace WindSupport namespace WindSetting { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // bitmap8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value); // WindBitmap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); } // namespace WindSetting namespace AirflowDirection { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h index 29e512d7077f65..659703c03bb43c 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h @@ -2322,21 +2322,26 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(FanControl::AirflowDire return static_cast(2); } } -static auto __attribute__((unused)) EnsureKnownEnumValue(FanControl::DirectionEnum val) +static auto __attribute__((unused)) EnsureKnownEnumValue(FanControl::FanModeEnum val) { - using EnumType = FanControl::DirectionEnum; + using EnumType = FanControl::FanModeEnum; switch (val) { - case EnumType::kIncrease: - case EnumType::kDecrease: + case EnumType::kOff: + case EnumType::kLow: + case EnumType::kMedium: + case EnumType::kHigh: + case EnumType::kOn: + case EnumType::kAuto: + case EnumType::kSmart: return val; default: - return static_cast(2); + return static_cast(7); } } -static auto __attribute__((unused)) EnsureKnownEnumValue(FanControl::FanModeSequenceType val) +static auto __attribute__((unused)) EnsureKnownEnumValue(FanControl::FanModeSequenceEnum val) { - using EnumType = FanControl::FanModeSequenceType; + using EnumType = FanControl::FanModeSequenceEnum; switch (val) { case EnumType::kOffLowMedHigh: @@ -2350,21 +2355,16 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(FanControl::FanModeSequ return static_cast(6); } } -static auto __attribute__((unused)) EnsureKnownEnumValue(FanControl::FanModeType val) +static auto __attribute__((unused)) EnsureKnownEnumValue(FanControl::StepDirectionEnum val) { - using EnumType = FanControl::FanModeType; + using EnumType = FanControl::StepDirectionEnum; switch (val) { - case EnumType::kOff: - case EnumType::kLow: - case EnumType::kMedium: - case EnumType::kHigh: - case EnumType::kOn: - case EnumType::kAuto: - case EnumType::kSmart: + case EnumType::kIncrease: + case EnumType::kDecrease: return val; default: - return static_cast(7); + return static_cast(2); } } diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h index 68f1155d5433d0..2d8b075fab06d6 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h @@ -3072,20 +3072,25 @@ enum class AirflowDirectionEnum : uint8_t kUnknownEnumValue = 2, }; -// Enum for DirectionEnum -enum class DirectionEnum : uint8_t +// Enum for FanModeEnum +enum class FanModeEnum : uint8_t { - kIncrease = 0x00, - kDecrease = 0x01, + kOff = 0x00, + kLow = 0x01, + kMedium = 0x02, + kHigh = 0x03, + kOn = 0x04, + kAuto = 0x05, + kSmart = 0x06, // All received enum values that are not listed above will be mapped // to kUnknownEnumValue. This is a helper enum value that should only // be used by code to process how it handles receiving and unknown // enum value. This specific should never be transmitted. - kUnknownEnumValue = 2, + kUnknownEnumValue = 7, }; -// Enum for FanModeSequenceType -enum class FanModeSequenceType : uint8_t +// Enum for FanModeSequenceEnum +enum class FanModeSequenceEnum : uint8_t { kOffLowMedHigh = 0x00, kOffLowHigh = 0x01, @@ -3100,21 +3105,16 @@ enum class FanModeSequenceType : uint8_t kUnknownEnumValue = 6, }; -// Enum for FanModeType -enum class FanModeType : uint8_t +// Enum for StepDirectionEnum +enum class StepDirectionEnum : uint8_t { - kOff = 0x00, - kLow = 0x01, - kMedium = 0x02, - kHigh = 0x03, - kOn = 0x04, - kAuto = 0x05, - kSmart = 0x06, + kIncrease = 0x00, + kDecrease = 0x01, // All received enum values that are not listed above will be mapped // to kUnknownEnumValue. This is a helper enum value that should only // be used by code to process how it handles receiving and unknown // enum value. This specific should never be transmitted. - kUnknownEnumValue = 7, + kUnknownEnumValue = 2, }; // Bitmap for Feature @@ -3128,23 +3128,16 @@ enum class Feature : uint32_t kAirflowDirection = 0x20, }; -// Bitmap for RockSupportMask -enum class RockSupportMask : uint8_t +// Bitmap for RockBitmap +enum class RockBitmap : uint8_t { kRockLeftRight = 0x1, kRockUpDown = 0x2, kRockRound = 0x4, }; -// Bitmap for WindSettingMask -enum class WindSettingMask : uint8_t -{ - kSleepWind = 0x1, - kNaturalWind = 0x2, -}; - -// Bitmap for WindSupportMask -enum class WindSupportMask : uint8_t +// Bitmap for WindBitmap +enum class WindBitmap : uint8_t { kSleepWind = 0x1, kNaturalWind = 0x2, 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 6555c0e7abfb48..61dcd525815ab6 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 @@ -23871,7 +23871,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::Step::Id; } static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } - DirectionEnum direction = static_cast(0); + StepDirectionEnum direction = static_cast(0); Optional wrap; Optional lowestOff; @@ -23888,7 +23888,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::Step::Id; } static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } - DirectionEnum direction = static_cast(0); + StepDirectionEnum direction = static_cast(0); Optional wrap; Optional lowestOff; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -23901,9 +23901,9 @@ namespace Attributes { namespace FanMode { struct TypeInfo { - using Type = chip::app::Clusters::FanControl::FanModeType; - using DecodableType = chip::app::Clusters::FanControl::FanModeType; - using DecodableArgType = chip::app::Clusters::FanControl::FanModeType; + using Type = chip::app::Clusters::FanControl::FanModeEnum; + using DecodableType = chip::app::Clusters::FanControl::FanModeEnum; + using DecodableArgType = chip::app::Clusters::FanControl::FanModeEnum; static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::FanMode::Id; } @@ -23913,9 +23913,9 @@ struct TypeInfo namespace FanModeSequence { struct TypeInfo { - using Type = chip::app::Clusters::FanControl::FanModeSequenceType; - using DecodableType = chip::app::Clusters::FanControl::FanModeSequenceType; - using DecodableArgType = chip::app::Clusters::FanControl::FanModeSequenceType; + using Type = chip::app::Clusters::FanControl::FanModeSequenceEnum; + using DecodableType = chip::app::Clusters::FanControl::FanModeSequenceEnum; + using DecodableArgType = chip::app::Clusters::FanControl::FanModeSequenceEnum; static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::FanModeSequence::Id; } @@ -23925,9 +23925,9 @@ struct TypeInfo namespace PercentSetting { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::PercentSetting::Id; } @@ -23937,9 +23937,9 @@ struct TypeInfo namespace PercentCurrent { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::Percent; + using DecodableType = chip::Percent; + using DecodableArgType = chip::Percent; static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::PercentCurrent::Id; } @@ -23985,9 +23985,9 @@ struct TypeInfo namespace RockSupport { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::RockSupport::Id; } @@ -23997,9 +23997,9 @@ struct TypeInfo namespace RockSetting { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::RockSetting::Id; } @@ -24009,9 +24009,9 @@ struct TypeInfo namespace WindSupport { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::WindSupport::Id; } @@ -24021,9 +24021,9 @@ struct TypeInfo namespace WindSetting { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::WindSetting::Id; } @@ -24087,18 +24087,22 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::FanMode::TypeInfo::DecodableType fanMode = static_cast(0); + Attributes::FanMode::TypeInfo::DecodableType fanMode = static_cast(0); Attributes::FanModeSequence::TypeInfo::DecodableType fanModeSequence = - static_cast(0); + static_cast(0); Attributes::PercentSetting::TypeInfo::DecodableType percentSetting; - Attributes::PercentCurrent::TypeInfo::DecodableType percentCurrent = static_cast(0); + Attributes::PercentCurrent::TypeInfo::DecodableType percentCurrent = static_cast(0); Attributes::SpeedMax::TypeInfo::DecodableType speedMax = static_cast(0); Attributes::SpeedSetting::TypeInfo::DecodableType speedSetting; Attributes::SpeedCurrent::TypeInfo::DecodableType speedCurrent = static_cast(0); - Attributes::RockSupport::TypeInfo::DecodableType rockSupport = static_cast(0); - Attributes::RockSetting::TypeInfo::DecodableType rockSetting = static_cast(0); - Attributes::WindSupport::TypeInfo::DecodableType windSupport = static_cast(0); - Attributes::WindSetting::TypeInfo::DecodableType windSetting = static_cast(0); + Attributes::RockSupport::TypeInfo::DecodableType rockSupport = + static_cast>(0); + Attributes::RockSetting::TypeInfo::DecodableType rockSetting = + static_cast>(0); + Attributes::WindSupport::TypeInfo::DecodableType windSupport = + static_cast>(0); + Attributes::WindSetting::TypeInfo::DecodableType windSetting = + static_cast>(0); Attributes::AirflowDirection::TypeInfo::DecodableType airflowDirection = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index b25e9cc931ff6e..0be71356cb44aa 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -17626,28 +17626,28 @@ void registerClusterFanControl(Commands & commands, CredentialIssuerCommands * c make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique>( + make_unique>( Id, "fan-mode", 0, UINT8_MAX, Attributes::FanMode::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>( + make_unique>( Id, "fan-mode-sequence", 0, UINT8_MAX, Attributes::FanModeSequence::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>>( + make_unique>>( Id, "percent-setting", 0, UINT8_MAX, Attributes::PercentSetting::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "percent-current", 0, UINT8_MAX, Attributes::PercentCurrent::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "percent-current", 0, UINT8_MAX, Attributes::PercentCurrent::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "speed-max", 0, UINT8_MAX, Attributes::SpeedMax::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "speed-setting", 0, UINT8_MAX, Attributes::SpeedSetting::Id, WriteCommandType::kWrite, credsIssuerConfig), // make_unique>(Id, "speed-current", 0, UINT8_MAX, Attributes::SpeedCurrent::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rock-support", 0, UINT8_MAX, Attributes::RockSupport::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rock-setting", 0, UINT8_MAX, Attributes::RockSetting::Id, - WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "wind-support", 0, UINT8_MAX, Attributes::WindSupport::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "wind-setting", 0, UINT8_MAX, Attributes::WindSetting::Id, - WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>( + Id, "rock-support", 0, UINT8_MAX, Attributes::RockSupport::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "rock-setting", 0, UINT8_MAX, Attributes::RockSetting::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>( + Id, "wind-support", 0, UINT8_MAX, Attributes::WindSupport::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "wind-setting", 0, UINT8_MAX, Attributes::WindSetting::Id, WriteCommandType::kWrite, credsIssuerConfig), // make_unique>( Id, "airflow-direction", 0, UINT8_MAX, Attributes::AirflowDirection::Id, WriteCommandType::kWrite, credsIssuerConfig), // diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index a520f57b9e31e0..aa805aa56696a2 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -10281,22 +10281,22 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP switch (path.mAttributeId) { case FanControl::Attributes::FanMode::Id: { - chip::app::Clusters::FanControl::FanModeType value; + chip::app::Clusters::FanControl::FanModeEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FanMode", 1, value); } case FanControl::Attributes::FanModeSequence::Id: { - chip::app::Clusters::FanControl::FanModeSequenceType value; + chip::app::Clusters::FanControl::FanModeSequenceEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FanModeSequence", 1, value); } case FanControl::Attributes::PercentSetting::Id: { - chip::app::DataModel::Nullable value; + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("PercentSetting", 1, value); } case FanControl::Attributes::PercentCurrent::Id: { - uint8_t value; + chip::Percent value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("PercentCurrent", 1, value); } @@ -10316,22 +10316,22 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("SpeedCurrent", 1, value); } case FanControl::Attributes::RockSupport::Id: { - uint8_t value; + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("RockSupport", 1, value); } case FanControl::Attributes::RockSetting::Id: { - uint8_t value; + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("RockSetting", 1, value); } case FanControl::Attributes::WindSupport::Id: { - uint8_t value; + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("WindSupport", 1, value); } case FanControl::Attributes::WindSetting::Id: { - uint8_t value; + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("WindSetting", 1, value); } diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 8d1e0247edc576..4706338ee85e5c 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -36216,7 +36216,7 @@ class Test_TC_FAN_2_1Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::FanControl::FanModeType value; + chip::app::Clusters::FanControl::FanModeEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); @@ -36226,7 +36226,7 @@ class Test_TC_FAN_2_1Suite : public TestCommand case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::FanControl::FanModeSequenceType value; + chip::app::Clusters::FanControl::FanModeSequenceEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); @@ -36236,9 +36236,9 @@ class Test_TC_FAN_2_1Suite : public TestCommand case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintType("value", "Percent", "Percent")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); } @@ -36246,9 +36246,9 @@ class Test_TC_FAN_2_1Suite : public TestCommand case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::Percent value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintType("value", "Percent", "Percent")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); } @@ -36465,7 +36465,7 @@ class Test_TC_FAN_2_3Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); } @@ -36473,7 +36473,7 @@ class Test_TC_FAN_2_3Suite : public TestCommand case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); } @@ -36560,7 +36560,7 @@ class Test_TC_FAN_2_4Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); } @@ -36568,7 +36568,7 @@ class Test_TC_FAN_2_4Suite : public TestCommand case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); } @@ -36745,7 +36745,7 @@ class Test_TC_FAN_3_1Suite : public TestCommand case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::FanControl::FanModeType value; + chip::app::Clusters::FanControl::FanModeEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("fanMode", value, 3U)); } @@ -36760,7 +36760,7 @@ class Test_TC_FAN_3_1Suite : public TestCommand case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("percentSetting", value)); VerifyOrReturn(CheckValue("percentSetting.Value()", value.Value(), 0U)); @@ -36769,7 +36769,7 @@ class Test_TC_FAN_3_1Suite : public TestCommand case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::Percent value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("percentCurrent", value, 0U)); } @@ -36784,7 +36784,7 @@ class Test_TC_FAN_3_1Suite : public TestCommand case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::Percent value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn( CheckValue("percentCurrent", value, mConfigPercentSetting.HasValue() ? mConfigPercentSetting.Value() : 30U)); @@ -36793,7 +36793,7 @@ class Test_TC_FAN_3_1Suite : public TestCommand case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("percentSetting", value)); VerifyOrReturn(CheckValue("percentSetting.Value()", value.Value(), @@ -36810,7 +36810,7 @@ class Test_TC_FAN_3_1Suite : public TestCommand case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::FanControl::FanModeType value; + chip::app::Clusters::FanControl::FanModeEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("fanMode", value, 0U)); } @@ -36841,8 +36841,8 @@ class Test_TC_FAN_3_1Suite : public TestCommand LogStep(1, "Step 2a: TH writes a supported FanMode attribute that is other than off to DUT"); VerifyOrDo(!ShouldSkip("FAN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::FanControl::FanModeType value; - value = static_cast(3); + chip::app::Clusters::FanControl::FanModeEnum value; + value = static_cast(3); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::FanMode::Id, value, chip::NullOptional, chip::NullOptional); } @@ -36864,8 +36864,8 @@ class Test_TC_FAN_3_1Suite : public TestCommand LogStep(4, "Step 2.1a: TH writes the Off value of FanMode attribute to DUT"); VerifyOrDo(!ShouldSkip("FAN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::FanControl::FanModeType value; - value = static_cast(0); + chip::app::Clusters::FanControl::FanModeEnum value; + value = static_cast(0); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::FanMode::Id, value, chip::NullOptional, chip::NullOptional); } @@ -36893,7 +36893,7 @@ class Test_TC_FAN_3_1Suite : public TestCommand LogStep(8, "Step 3a: TH writes PercentSetting attribute a non-zero value to DUT"); VerifyOrDo(!ShouldSkip("FAN.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::DataModel::Nullable value; + chip::app::DataModel::Nullable value; value.SetNonNull(); value.Value() = mConfigPercentSetting.HasValue() ? mConfigPercentSetting.Value() : 30U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::PercentSetting::Id, value, @@ -36923,7 +36923,7 @@ class Test_TC_FAN_3_1Suite : public TestCommand LogStep(12, "Step 3.1a: TH writes PercentSetting attribute a zero value to DUT"); VerifyOrDo(!ShouldSkip("FAN.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::DataModel::Nullable value; + chip::app::DataModel::Nullable value; value.SetNonNull(); value.Value() = 0U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::PercentSetting::Id, value, @@ -37125,7 +37125,7 @@ class Test_TC_FAN_3_4Suite : public TestCommand case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("windSetting", value, mConfigWindSetting.HasValue() ? mConfigWindSetting.Value() : 1U)); } @@ -37156,8 +37156,9 @@ class Test_TC_FAN_3_4Suite : public TestCommand LogStep(1, "Step 2: TH writes WindSetting attribute a valid value to DUT"); VerifyOrDo(!ShouldSkip("FAN.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - uint8_t value; - value = mConfigWindSetting.HasValue() ? mConfigWindSetting.Value() : 1U; + chip::BitMask value; + value = mConfigWindSetting.HasValue() ? mConfigWindSetting.Value() + : static_cast>(1U); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::WindSetting::Id, value, chip::NullOptional, chip::NullOptional); } @@ -86586,7 +86587,7 @@ class TestFanControlSuite : public TestCommand case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::FanControl::FanModeType value; + chip::app::Clusters::FanControl::FanModeEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("fanMode", value, 3U)); } @@ -86597,7 +86598,7 @@ class TestFanControlSuite : public TestCommand case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::FanControl::FanModeSequenceType value; + chip::app::Clusters::FanControl::FanModeSequenceEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("fanModeSequence", value, 5U)); } @@ -86608,7 +86609,7 @@ class TestFanControlSuite : public TestCommand case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("percentSetting", value)); VerifyOrReturn(CheckValue("percentSetting.Value()", value.Value(), 84U)); @@ -86637,7 +86638,7 @@ class TestFanControlSuite : public TestCommand case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("percentSetting", value)); VerifyOrReturn(CheckValue("percentSetting.Value()", value.Value(), 84U)); @@ -86658,7 +86659,7 @@ class TestFanControlSuite : public TestCommand case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("percentSetting", value)); VerifyOrReturn(CheckValue("percentSetting.Value()", value.Value(), 73U)); @@ -86667,7 +86668,7 @@ class TestFanControlSuite : public TestCommand case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::Percent value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("percentCurrent", value, 73U)); } @@ -86690,7 +86691,7 @@ class TestFanControlSuite : public TestCommand case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("percentSetting", value)); VerifyOrReturn(CheckValue("percentSetting.Value()", value.Value(), 0U)); @@ -86699,7 +86700,7 @@ class TestFanControlSuite : public TestCommand case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::Percent value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("percentCurrent", value, 0U)); } @@ -86727,7 +86728,7 @@ class TestFanControlSuite : public TestCommand case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNull("percentSetting", value)); } @@ -86765,8 +86766,8 @@ class TestFanControlSuite : public TestCommand case 1: { LogStep(1, "Write fan mode"); ListFreer listFreer; - chip::app::Clusters::FanControl::FanModeType value; - value = static_cast(3); + chip::app::Clusters::FanControl::FanModeEnum value; + value = static_cast(3); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::FanMode::Id, value, chip::NullOptional, chip::NullOptional); } @@ -86778,8 +86779,8 @@ class TestFanControlSuite : public TestCommand case 3: { LogStep(3, "Write fan mode sequence"); ListFreer listFreer; - chip::app::Clusters::FanControl::FanModeSequenceType value; - value = static_cast(5); + chip::app::Clusters::FanControl::FanModeSequenceEnum value; + value = static_cast(5); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::FanModeSequence::Id, value, chip::NullOptional, chip::NullOptional); } @@ -86791,7 +86792,7 @@ class TestFanControlSuite : public TestCommand case 5: { LogStep(5, "Write percent setting"); ListFreer listFreer; - chip::app::DataModel::Nullable value; + chip::app::DataModel::Nullable value; value.SetNonNull(); value.Value() = 84U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::PercentSetting::Id, value, @@ -86815,7 +86816,7 @@ class TestFanControlSuite : public TestCommand case 9: { LogStep(9, "Write percent setting"); ListFreer listFreer; - chip::app::DataModel::Nullable value; + chip::app::DataModel::Nullable value; value.SetNull(); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::PercentSetting::Id, value, chip::NullOptional, chip::NullOptional); @@ -86865,8 +86866,8 @@ class TestFanControlSuite : public TestCommand case 17: { LogStep(17, "Write fan mode"); ListFreer listFreer; - chip::app::Clusters::FanControl::FanModeType value; - value = static_cast(0); + chip::app::Clusters::FanControl::FanModeEnum value; + value = static_cast(0); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::FanMode::Id, value, chip::NullOptional, chip::NullOptional); } @@ -86893,8 +86894,8 @@ class TestFanControlSuite : public TestCommand case 22: { LogStep(22, "Write fan mode"); ListFreer listFreer; - chip::app::Clusters::FanControl::FanModeType value; - value = static_cast(5); + chip::app::Clusters::FanControl::FanModeEnum value; + value = static_cast(5); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::FanMode::Id, value, chip::NullOptional, chip::NullOptional); } 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 b2b58d04258c89..8ca008040d84f9 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -62900,7 +62900,7 @@ class WriteFanControlPercentSetting : public WriteAttribute { } private: - uint8_t mValue; + chip::Percent mValue; }; class SubscribeAttributeFanControlPercentSetting : public SubscribeAttribute { 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 bf0c57cbdab961..2b7c8d345c9052 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -48822,9 +48822,9 @@ class Test_TC_FAN_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("percentSetting", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("percentSetting", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("percentSetting", [value unsignedCharValue], 100U)); + VerifyOrReturn(CheckConstraintType("percentSetting", "Percent", "Percent")); + VerifyOrReturn(CheckConstraintMinValue("percentSetting", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("percentSetting", [value unsignedCharValue], 100U)); } NextTest(); @@ -48845,9 +48845,9 @@ class Test_TC_FAN_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("percentCurrent", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("percentCurrent", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("percentCurrent", [value unsignedCharValue], 100U)); + VerifyOrReturn(CheckConstraintType("percentCurrent", "Percent", "Percent")); + VerifyOrReturn(CheckConstraintMinValue("percentCurrent", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("percentCurrent", [value unsignedCharValue], 100U)); NextTest(); }];