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 d7f6c71d460821..b8967311979721 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 @@ -914,7 +914,43 @@ server cluster PowerSourceConfiguration = 46 { } server cluster PowerSource = 47 { - enum BatChargeFault : ENUM8 { + enum BatApprovedChemistryEnum : ENUM16 { + kUnspecified = 0; + kAlkaline = 1; + kLithiumCarbonFluoride = 2; + kLithiumChromiumOxide = 3; + kLithiumCopperOxide = 4; + kLithiumIronDisulfide = 5; + kLithiumManganeseDioxide = 6; + kLithiumThionylChloride = 7; + kMagnesium = 8; + kMercuryOxide = 9; + kNickelOxyhydride = 10; + kSilverOxide = 11; + kZincAir = 12; + kZincCarbon = 13; + kZincChloride = 14; + kZincManganeseDioxide = 15; + kLeadAcid = 16; + kLithiumCobaltOxide = 17; + kLithiumIon = 18; + kLithiumIonPolymer = 19; + kLithiumIronPhosphate = 20; + kLithiumSulfur = 21; + kLithiumTitanate = 22; + kNickelCadmium = 23; + kNickelHydrogen = 24; + kNickelIron = 25; + kNickelMetalHydride = 26; + kNickelZinc = 27; + kSilverZinc = 28; + kSodiumIon = 29; + kSodiumSulfur = 30; + kZincBromide = 31; + kZincCerium = 32; + } + + enum BatChargeFaultEnum : ENUM8 { kUnspecified = 0; kAmbientTooHot = 1; kAmbientTooCold = 2; @@ -928,46 +964,130 @@ server cluster PowerSource = 47 { kSafetyTimeout = 10; } - enum BatChargeLevel : ENUM8 { + enum BatChargeLevelEnum : ENUM8 { kOk = 0; kWarning = 1; kCritical = 2; } - enum BatChargeState : ENUM8 { + enum BatChargeStateEnum : ENUM8 { kUnknown = 0; kIsCharging = 1; kIsAtFullCharge = 2; kIsNotCharging = 3; } - enum BatFault : ENUM8 { - kUnspecfied = 0; + enum BatCommonDesignationEnum : ENUM16 { + kUnspecified = 0; + kAaa = 1; + kAa = 2; + kC = 3; + kD = 4; + k4v5 = 5; + k6v0 = 6; + k9v0 = 7; + k12aa = 8; + kAaaa = 9; + kA = 10; + kB = 11; + kF = 12; + kN = 13; + kNo6 = 14; + kSubC = 15; + kA23 = 16; + kA27 = 17; + kBa5800 = 18; + kDuplex = 19; + k4sr44 = 20; + k523 = 21; + k531 = 22; + k15v0 = 23; + k22v5 = 24; + k30v0 = 25; + k45v0 = 26; + k67v5 = 27; + kJ = 28; + kCr123a = 29; + kCr2 = 30; + k2cr5 = 31; + kCrP2 = 32; + kCrV3 = 33; + kSr41 = 34; + kSr43 = 35; + kSr44 = 36; + kSr45 = 37; + kSr48 = 38; + kSr54 = 39; + kSr55 = 40; + kSr57 = 41; + kSr58 = 42; + kSr59 = 43; + kSr60 = 44; + kSr63 = 45; + kSr64 = 46; + kSr65 = 47; + kSr66 = 48; + kSr67 = 49; + kSr68 = 50; + kSr69 = 51; + kSr516 = 52; + kSr731 = 53; + kSr712 = 54; + kLr932 = 55; + kA5 = 56; + kA10 = 57; + kA13 = 58; + kA312 = 59; + kA675 = 60; + kAc41e = 61; + k10180 = 62; + k10280 = 63; + k10440 = 64; + k14250 = 65; + k14430 = 66; + k14500 = 67; + k14650 = 68; + k15270 = 69; + k16340 = 70; + kRcr123a = 71; + k17500 = 72; + k17670 = 73; + k18350 = 74; + k18500 = 75; + k18650 = 76; + k19670 = 77; + k25500 = 78; + k26650 = 79; + k32600 = 80; + } + + enum BatFaultEnum : ENUM8 { + kUnspecified = 0; kOverTemp = 1; kUnderTemp = 2; } - enum BatReplaceability : ENUM8 { + enum BatReplaceabilityEnum : ENUM8 { kUnspecified = 0; kNotReplaceable = 1; kUserReplaceable = 2; kFactoryReplaceable = 3; } - enum PowerSourceStatus : ENUM8 { + enum PowerSourceStatusEnum : ENUM8 { kUnspecified = 0; kActive = 1; kStandby = 2; kUnavailable = 3; } - enum WiredCurrentType : ENUM8 { + enum WiredCurrentTypeEnum : ENUM8 { kAc = 0; kDc = 1; } - enum WiredFault : ENUM8 { - kUnspecfied = 0; + enum WiredFaultEnum : ENUM8 { + kUnspecified = 0; kOverVoltage = 1; kUnderVoltage = 2; } @@ -980,26 +1100,26 @@ server cluster PowerSource = 47 { } info event WiredFaultChange = 0 { - WiredFault current[] = 0; - WiredFault previous[] = 1; + WiredFaultEnum current[] = 0; + WiredFaultEnum previous[] = 1; } info event BatFaultChange = 1 { - BatFault current[] = 0; - BatFault previous[] = 1; + BatFaultEnum current[] = 0; + BatFaultEnum previous[] = 1; } info event BatChargeFaultChange = 2 { - BatChargeFault current[] = 0; - BatChargeFault previous[] = 1; + BatChargeFaultEnum current[] = 0; + BatChargeFaultEnum previous[] = 1; } - readonly attribute PowerSourceStatus status = 0; + readonly attribute PowerSourceStatusEnum status = 0; readonly attribute int8u order = 1; readonly attribute char_string<60> description = 2; - readonly attribute BatChargeLevel batChargeLevel = 14; + readonly attribute BatChargeLevelEnum batChargeLevel = 14; readonly attribute boolean batReplacementNeeded = 15; - readonly attribute BatReplaceability batReplaceability = 16; + readonly attribute BatReplaceabilityEnum batReplaceability = 16; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; 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 ecc46d9b26a0d2..9d6897ba5f5bfa 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 @@ -2255,7 +2255,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "PowerSourceStatus", + "type": "PowerSourceStatusEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -2335,7 +2335,7 @@ "code": 5, "mfgCode": null, "side": "server", - "type": "WiredCurrentType", + "type": "WiredCurrentTypeEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -2479,7 +2479,7 @@ "code": 14, "mfgCode": null, "side": "server", - "type": "BatChargeLevel", + "type": "BatChargeLevelEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -2511,7 +2511,7 @@ "code": 16, "mfgCode": null, "side": "server", - "type": "BatReplaceability", + "type": "BatReplaceabilityEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -2575,7 +2575,7 @@ "code": 20, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "BatCommonDesignationEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -2623,7 +2623,7 @@ "code": 23, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "BatApprovedChemistryEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -2671,7 +2671,7 @@ "code": 26, "mfgCode": null, "side": "server", - "type": "BatChargeState", + "type": "BatChargeStateEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -11275,7 +11275,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "PowerSourceStatus", + "type": "PowerSourceStatusEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -11355,7 +11355,7 @@ "code": 5, "mfgCode": null, "side": "server", - "type": "WiredCurrentType", + "type": "WiredCurrentTypeEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -11499,7 +11499,7 @@ "code": 14, "mfgCode": null, "side": "server", - "type": "BatChargeLevel", + "type": "BatChargeLevelEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -11531,7 +11531,7 @@ "code": 16, "mfgCode": null, "side": "server", - "type": "BatReplaceability", + "type": "BatReplaceabilityEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -11595,7 +11595,7 @@ "code": 20, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "BatCommonDesignationEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -11643,7 +11643,7 @@ "code": 23, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "BatApprovedChemistryEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -11691,7 +11691,7 @@ "code": 26, "mfgCode": null, "side": "server", - "type": "BatChargeState", + "type": "BatChargeStateEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -22851,7 +22851,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "PowerSourceStatus", + "type": "PowerSourceStatusEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -22931,7 +22931,7 @@ "code": 5, "mfgCode": null, "side": "server", - "type": "WiredCurrentType", + "type": "WiredCurrentTypeEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -23075,7 +23075,7 @@ "code": 14, "mfgCode": null, "side": "server", - "type": "BatChargeLevel", + "type": "BatChargeLevelEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -23107,7 +23107,7 @@ "code": 16, "mfgCode": null, "side": "server", - "type": "BatReplaceability", + "type": "BatReplaceabilityEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -23171,7 +23171,7 @@ "code": 20, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "BatCommonDesignationEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -23219,7 +23219,7 @@ "code": 23, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "BatApprovedChemistryEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -23267,7 +23267,7 @@ "code": 26, "mfgCode": null, "side": "server", - "type": "BatChargeState", + "type": "BatChargeStateEnum", "included": 0, "storageOption": "RAM", "singleton": 0, diff --git a/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp b/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp index a9fce33410c7b7..0694c091cb3787 100644 --- a/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp +++ b/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp @@ -354,22 +354,22 @@ class EditAttributeListModel : public TouchesMatterStackModel else if (name == "Charge level" && cluster == "Power Source") { using namespace chip::app::Clusters::PowerSource; - auto attributeValue = BatChargeLevel::kOk; + auto attributeValue = BatChargeLevelEnum::kOk; if (value == "OK") { value = "Warning"; - attributeValue = BatChargeLevel::kWarning; + attributeValue = BatChargeLevelEnum::kWarning; } else if (value == "Warning") { value = "Critical"; - attributeValue = BatChargeLevel::kCritical; + attributeValue = BatChargeLevelEnum::kCritical; } else { value = "OK"; - attributeValue = BatChargeLevel::kOk; + attributeValue = BatChargeLevelEnum::kOk; } // update the battery charge level here for hardcoded endpoint 1 @@ -689,7 +689,7 @@ void SetupPretendDevices() AddAttribute("Bat remaining", "70"); app::Clusters::PowerSource::Attributes::BatPercentRemaining::Set(1, static_cast(70 * 2)); AddAttribute("Charge level", "0"); - app::Clusters::PowerSource::Attributes::BatChargeLevel::Set(1, app::Clusters::PowerSource::BatChargeLevel::kOk); + app::Clusters::PowerSource::Attributes::BatChargeLevel::Set(1, app::Clusters::PowerSource::BatChargeLevelEnum::kOk); } esp_err_t InitM5Stack(std::string qrCodeText) 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 38db730b65a2f2..4d272e6081288c 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 @@ -796,7 +796,43 @@ server cluster PowerSourceConfiguration = 46 { } server cluster PowerSource = 47 { - enum BatChargeFault : ENUM8 { + enum BatApprovedChemistryEnum : ENUM16 { + kUnspecified = 0; + kAlkaline = 1; + kLithiumCarbonFluoride = 2; + kLithiumChromiumOxide = 3; + kLithiumCopperOxide = 4; + kLithiumIronDisulfide = 5; + kLithiumManganeseDioxide = 6; + kLithiumThionylChloride = 7; + kMagnesium = 8; + kMercuryOxide = 9; + kNickelOxyhydride = 10; + kSilverOxide = 11; + kZincAir = 12; + kZincCarbon = 13; + kZincChloride = 14; + kZincManganeseDioxide = 15; + kLeadAcid = 16; + kLithiumCobaltOxide = 17; + kLithiumIon = 18; + kLithiumIonPolymer = 19; + kLithiumIronPhosphate = 20; + kLithiumSulfur = 21; + kLithiumTitanate = 22; + kNickelCadmium = 23; + kNickelHydrogen = 24; + kNickelIron = 25; + kNickelMetalHydride = 26; + kNickelZinc = 27; + kSilverZinc = 28; + kSodiumIon = 29; + kSodiumSulfur = 30; + kZincBromide = 31; + kZincCerium = 32; + } + + enum BatChargeFaultEnum : ENUM8 { kUnspecified = 0; kAmbientTooHot = 1; kAmbientTooCold = 2; @@ -810,46 +846,130 @@ server cluster PowerSource = 47 { kSafetyTimeout = 10; } - enum BatChargeLevel : ENUM8 { + enum BatChargeLevelEnum : ENUM8 { kOk = 0; kWarning = 1; kCritical = 2; } - enum BatChargeState : ENUM8 { + enum BatChargeStateEnum : ENUM8 { kUnknown = 0; kIsCharging = 1; kIsAtFullCharge = 2; kIsNotCharging = 3; } - enum BatFault : ENUM8 { - kUnspecfied = 0; + enum BatCommonDesignationEnum : ENUM16 { + kUnspecified = 0; + kAaa = 1; + kAa = 2; + kC = 3; + kD = 4; + k4v5 = 5; + k6v0 = 6; + k9v0 = 7; + k12aa = 8; + kAaaa = 9; + kA = 10; + kB = 11; + kF = 12; + kN = 13; + kNo6 = 14; + kSubC = 15; + kA23 = 16; + kA27 = 17; + kBa5800 = 18; + kDuplex = 19; + k4sr44 = 20; + k523 = 21; + k531 = 22; + k15v0 = 23; + k22v5 = 24; + k30v0 = 25; + k45v0 = 26; + k67v5 = 27; + kJ = 28; + kCr123a = 29; + kCr2 = 30; + k2cr5 = 31; + kCrP2 = 32; + kCrV3 = 33; + kSr41 = 34; + kSr43 = 35; + kSr44 = 36; + kSr45 = 37; + kSr48 = 38; + kSr54 = 39; + kSr55 = 40; + kSr57 = 41; + kSr58 = 42; + kSr59 = 43; + kSr60 = 44; + kSr63 = 45; + kSr64 = 46; + kSr65 = 47; + kSr66 = 48; + kSr67 = 49; + kSr68 = 50; + kSr69 = 51; + kSr516 = 52; + kSr731 = 53; + kSr712 = 54; + kLr932 = 55; + kA5 = 56; + kA10 = 57; + kA13 = 58; + kA312 = 59; + kA675 = 60; + kAc41e = 61; + k10180 = 62; + k10280 = 63; + k10440 = 64; + k14250 = 65; + k14430 = 66; + k14500 = 67; + k14650 = 68; + k15270 = 69; + k16340 = 70; + kRcr123a = 71; + k17500 = 72; + k17670 = 73; + k18350 = 74; + k18500 = 75; + k18650 = 76; + k19670 = 77; + k25500 = 78; + k26650 = 79; + k32600 = 80; + } + + enum BatFaultEnum : ENUM8 { + kUnspecified = 0; kOverTemp = 1; kUnderTemp = 2; } - enum BatReplaceability : ENUM8 { + enum BatReplaceabilityEnum : ENUM8 { kUnspecified = 0; kNotReplaceable = 1; kUserReplaceable = 2; kFactoryReplaceable = 3; } - enum PowerSourceStatus : ENUM8 { + enum PowerSourceStatusEnum : ENUM8 { kUnspecified = 0; kActive = 1; kStandby = 2; kUnavailable = 3; } - enum WiredCurrentType : ENUM8 { + enum WiredCurrentTypeEnum : ENUM8 { kAc = 0; kDc = 1; } - enum WiredFault : ENUM8 { - kUnspecfied = 0; + enum WiredFaultEnum : ENUM8 { + kUnspecified = 0; kOverVoltage = 1; kUnderVoltage = 2; } @@ -862,21 +982,21 @@ server cluster PowerSource = 47 { } info event WiredFaultChange = 0 { - WiredFault current[] = 0; - WiredFault previous[] = 1; + WiredFaultEnum current[] = 0; + WiredFaultEnum previous[] = 1; } info event BatFaultChange = 1 { - BatFault current[] = 0; - BatFault previous[] = 1; + BatFaultEnum current[] = 0; + BatFaultEnum previous[] = 1; } info event BatChargeFaultChange = 2 { - BatChargeFault current[] = 0; - BatChargeFault previous[] = 1; + BatChargeFaultEnum current[] = 0; + BatChargeFaultEnum previous[] = 1; } - readonly attribute PowerSourceStatus status = 0; + readonly attribute PowerSourceStatusEnum status = 0; readonly attribute int8u order = 1; readonly attribute char_string<60> description = 2; readonly attribute command_id generatedCommandList[] = 65528; diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap index 0f672a4612a129..49abcd177b56e0 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap @@ -2234,7 +2234,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "PowerSourceStatus", + "type": "PowerSourceStatusEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -2314,7 +2314,7 @@ "code": 5, "mfgCode": null, "side": "server", - "type": "WiredCurrentType", + "type": "WiredCurrentTypeEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -2458,7 +2458,7 @@ "code": 14, "mfgCode": null, "side": "server", - "type": "BatChargeLevel", + "type": "BatChargeLevelEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -2490,7 +2490,7 @@ "code": 16, "mfgCode": null, "side": "server", - "type": "BatReplaceability", + "type": "BatReplaceabilityEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -2554,7 +2554,7 @@ "code": 20, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "BatCommonDesignationEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -2602,7 +2602,7 @@ "code": 23, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "BatApprovedChemistryEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -2650,7 +2650,7 @@ "code": 26, "mfgCode": null, "side": "server", - "type": "BatChargeState", + "type": "BatChargeStateEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -10828,7 +10828,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "PowerSourceStatus", + "type": "PowerSourceStatusEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -10908,7 +10908,7 @@ "code": 5, "mfgCode": null, "side": "server", - "type": "WiredCurrentType", + "type": "WiredCurrentTypeEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -11052,7 +11052,7 @@ "code": 14, "mfgCode": null, "side": "server", - "type": "BatChargeLevel", + "type": "BatChargeLevelEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -11084,7 +11084,7 @@ "code": 16, "mfgCode": null, "side": "server", - "type": "BatReplaceability", + "type": "BatReplaceabilityEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -11148,7 +11148,7 @@ "code": 20, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "BatCommonDesignationEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -11196,7 +11196,7 @@ "code": 23, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "BatApprovedChemistryEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -11244,7 +11244,7 @@ "code": 26, "mfgCode": null, "side": "server", - "type": "BatChargeState", + "type": "BatChargeStateEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -22305,7 +22305,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "PowerSourceStatus", + "type": "PowerSourceStatusEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -22385,7 +22385,7 @@ "code": 5, "mfgCode": null, "side": "server", - "type": "WiredCurrentType", + "type": "WiredCurrentTypeEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -22529,7 +22529,7 @@ "code": 14, "mfgCode": null, "side": "server", - "type": "BatChargeLevel", + "type": "BatChargeLevelEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -22561,7 +22561,7 @@ "code": 16, "mfgCode": null, "side": "server", - "type": "BatReplaceability", + "type": "BatReplaceabilityEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -22625,7 +22625,7 @@ "code": 20, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "BatCommonDesignationEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -22673,7 +22673,7 @@ "code": 23, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "BatApprovedChemistryEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -22721,7 +22721,7 @@ "code": 26, "mfgCode": null, "side": "server", - "type": "BatChargeState", + "type": "BatChargeStateEnum", "included": 0, "storageOption": "RAM", "singleton": 0, diff --git a/examples/all-clusters-minimal-app/esp32/main/DeviceWithDisplay.cpp b/examples/all-clusters-minimal-app/esp32/main/DeviceWithDisplay.cpp index e3061455e96c8f..dd85fcda16a152 100644 --- a/examples/all-clusters-minimal-app/esp32/main/DeviceWithDisplay.cpp +++ b/examples/all-clusters-minimal-app/esp32/main/DeviceWithDisplay.cpp @@ -264,22 +264,22 @@ class EditAttributeListModel : public TouchesMatterStackModel else if (name == "Charge level" && cluster == "Power Source") { using namespace chip::app::Clusters::PowerSource; - auto attributeValue = BatChargeLevel::kOk; + auto attributeValue = BatChargeLevelEnum::kOk; if (value == "OK") { value = "Warning"; - attributeValue = BatChargeLevel::kWarning; + attributeValue = BatChargeLevelEnum::kWarning; } else if (value == "Warning") { value = "Critical"; - attributeValue = BatChargeLevel::kCritical; + attributeValue = BatChargeLevelEnum::kCritical; } else { value = "OK"; - attributeValue = BatChargeLevel::kOk; + attributeValue = BatChargeLevelEnum::kOk; } // update the battery charge level here for hardcoded endpoint 1 @@ -593,7 +593,7 @@ void SetupPretendDevices() AddAttribute("Bat remaining", "70"); app::Clusters::PowerSource::Attributes::BatPercentRemaining::Set(1, static_cast(70 * 2)); AddAttribute("Charge level", "0"); - app::Clusters::PowerSource::Attributes::BatChargeLevel::Set(1, app::Clusters::PowerSource::BatChargeLevel::kOk); + app::Clusters::PowerSource::Attributes::BatChargeLevel::Set(1, app::Clusters::PowerSource::BatChargeLevelEnum::kOk); } esp_err_t InitM5Stack(std::string qrCodeText) diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 46b92fd288b8cd..1d4b51515a7ea2 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -426,7 +426,43 @@ server cluster PowerSourceConfiguration = 46 { } server cluster PowerSource = 47 { - enum BatChargeFault : ENUM8 { + enum BatApprovedChemistryEnum : ENUM16 { + kUnspecified = 0; + kAlkaline = 1; + kLithiumCarbonFluoride = 2; + kLithiumChromiumOxide = 3; + kLithiumCopperOxide = 4; + kLithiumIronDisulfide = 5; + kLithiumManganeseDioxide = 6; + kLithiumThionylChloride = 7; + kMagnesium = 8; + kMercuryOxide = 9; + kNickelOxyhydride = 10; + kSilverOxide = 11; + kZincAir = 12; + kZincCarbon = 13; + kZincChloride = 14; + kZincManganeseDioxide = 15; + kLeadAcid = 16; + kLithiumCobaltOxide = 17; + kLithiumIon = 18; + kLithiumIonPolymer = 19; + kLithiumIronPhosphate = 20; + kLithiumSulfur = 21; + kLithiumTitanate = 22; + kNickelCadmium = 23; + kNickelHydrogen = 24; + kNickelIron = 25; + kNickelMetalHydride = 26; + kNickelZinc = 27; + kSilverZinc = 28; + kSodiumIon = 29; + kSodiumSulfur = 30; + kZincBromide = 31; + kZincCerium = 32; + } + + enum BatChargeFaultEnum : ENUM8 { kUnspecified = 0; kAmbientTooHot = 1; kAmbientTooCold = 2; @@ -440,46 +476,130 @@ server cluster PowerSource = 47 { kSafetyTimeout = 10; } - enum BatChargeLevel : ENUM8 { + enum BatChargeLevelEnum : ENUM8 { kOk = 0; kWarning = 1; kCritical = 2; } - enum BatChargeState : ENUM8 { + enum BatChargeStateEnum : ENUM8 { kUnknown = 0; kIsCharging = 1; kIsAtFullCharge = 2; kIsNotCharging = 3; } - enum BatFault : ENUM8 { - kUnspecfied = 0; + enum BatCommonDesignationEnum : ENUM16 { + kUnspecified = 0; + kAaa = 1; + kAa = 2; + kC = 3; + kD = 4; + k4v5 = 5; + k6v0 = 6; + k9v0 = 7; + k12aa = 8; + kAaaa = 9; + kA = 10; + kB = 11; + kF = 12; + kN = 13; + kNo6 = 14; + kSubC = 15; + kA23 = 16; + kA27 = 17; + kBa5800 = 18; + kDuplex = 19; + k4sr44 = 20; + k523 = 21; + k531 = 22; + k15v0 = 23; + k22v5 = 24; + k30v0 = 25; + k45v0 = 26; + k67v5 = 27; + kJ = 28; + kCr123a = 29; + kCr2 = 30; + k2cr5 = 31; + kCrP2 = 32; + kCrV3 = 33; + kSr41 = 34; + kSr43 = 35; + kSr44 = 36; + kSr45 = 37; + kSr48 = 38; + kSr54 = 39; + kSr55 = 40; + kSr57 = 41; + kSr58 = 42; + kSr59 = 43; + kSr60 = 44; + kSr63 = 45; + kSr64 = 46; + kSr65 = 47; + kSr66 = 48; + kSr67 = 49; + kSr68 = 50; + kSr69 = 51; + kSr516 = 52; + kSr731 = 53; + kSr712 = 54; + kLr932 = 55; + kA5 = 56; + kA10 = 57; + kA13 = 58; + kA312 = 59; + kA675 = 60; + kAc41e = 61; + k10180 = 62; + k10280 = 63; + k10440 = 64; + k14250 = 65; + k14430 = 66; + k14500 = 67; + k14650 = 68; + k15270 = 69; + k16340 = 70; + kRcr123a = 71; + k17500 = 72; + k17670 = 73; + k18350 = 74; + k18500 = 75; + k18650 = 76; + k19670 = 77; + k25500 = 78; + k26650 = 79; + k32600 = 80; + } + + enum BatFaultEnum : ENUM8 { + kUnspecified = 0; kOverTemp = 1; kUnderTemp = 2; } - enum BatReplaceability : ENUM8 { + enum BatReplaceabilityEnum : ENUM8 { kUnspecified = 0; kNotReplaceable = 1; kUserReplaceable = 2; kFactoryReplaceable = 3; } - enum PowerSourceStatus : ENUM8 { + enum PowerSourceStatusEnum : ENUM8 { kUnspecified = 0; kActive = 1; kStandby = 2; kUnavailable = 3; } - enum WiredCurrentType : ENUM8 { + enum WiredCurrentTypeEnum : ENUM8 { kAc = 0; kDc = 1; } - enum WiredFault : ENUM8 { - kUnspecfied = 0; + enum WiredFaultEnum : ENUM8 { + kUnspecified = 0; kOverVoltage = 1; kUnderVoltage = 2; } @@ -492,27 +612,27 @@ server cluster PowerSource = 47 { } info event WiredFaultChange = 0 { - WiredFault current[] = 0; - WiredFault previous[] = 1; + WiredFaultEnum current[] = 0; + WiredFaultEnum previous[] = 1; } info event BatFaultChange = 1 { - BatFault current[] = 0; - BatFault previous[] = 1; + BatFaultEnum current[] = 0; + BatFaultEnum previous[] = 1; } info event BatChargeFaultChange = 2 { - BatChargeFault current[] = 0; - BatChargeFault previous[] = 1; + BatChargeFaultEnum current[] = 0; + BatChargeFaultEnum previous[] = 1; } - readonly attribute PowerSourceStatus status = 0; + readonly attribute PowerSourceStatusEnum status = 0; readonly attribute int8u order = 1; readonly attribute char_string<60> description = 2; readonly attribute nullable int32u wiredAssessedCurrent = 6; - readonly attribute BatChargeLevel batChargeLevel = 14; + readonly attribute BatChargeLevelEnum batChargeLevel = 14; readonly attribute boolean batReplacementNeeded = 15; - readonly attribute BatReplaceability batReplaceability = 16; + readonly attribute BatReplaceabilityEnum batReplaceability = 16; readonly attribute char_string<60> batReplacementDescription = 19; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; diff --git a/examples/lock-app/lock-common/lock-app.zap b/examples/lock-app/lock-common/lock-app.zap index b56fd7d0175406..1388a446179956 100644 --- a/examples/lock-app/lock-common/lock-app.zap +++ b/examples/lock-app/lock-common/lock-app.zap @@ -1949,7 +1949,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "PowerSourceStatus", + "type": "PowerSourceStatusEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -6715,7 +6715,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "PowerSourceStatus", + "type": "PowerSourceStatusEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -6779,7 +6779,7 @@ "code": 14, "mfgCode": null, "side": "server", - "type": "BatChargeLevel", + "type": "BatChargeLevelEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -6811,7 +6811,7 @@ "code": 16, "mfgCode": null, "side": "server", - "type": "BatReplaceability", + "type": "BatReplaceabilityEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index a737acdad28865..a83048426b1a1c 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -760,7 +760,43 @@ server cluster PowerSourceConfiguration = 46 { } server cluster PowerSource = 47 { - enum BatChargeFault : ENUM8 { + enum BatApprovedChemistryEnum : ENUM16 { + kUnspecified = 0; + kAlkaline = 1; + kLithiumCarbonFluoride = 2; + kLithiumChromiumOxide = 3; + kLithiumCopperOxide = 4; + kLithiumIronDisulfide = 5; + kLithiumManganeseDioxide = 6; + kLithiumThionylChloride = 7; + kMagnesium = 8; + kMercuryOxide = 9; + kNickelOxyhydride = 10; + kSilverOxide = 11; + kZincAir = 12; + kZincCarbon = 13; + kZincChloride = 14; + kZincManganeseDioxide = 15; + kLeadAcid = 16; + kLithiumCobaltOxide = 17; + kLithiumIon = 18; + kLithiumIonPolymer = 19; + kLithiumIronPhosphate = 20; + kLithiumSulfur = 21; + kLithiumTitanate = 22; + kNickelCadmium = 23; + kNickelHydrogen = 24; + kNickelIron = 25; + kNickelMetalHydride = 26; + kNickelZinc = 27; + kSilverZinc = 28; + kSodiumIon = 29; + kSodiumSulfur = 30; + kZincBromide = 31; + kZincCerium = 32; + } + + enum BatChargeFaultEnum : ENUM8 { kUnspecified = 0; kAmbientTooHot = 1; kAmbientTooCold = 2; @@ -774,46 +810,130 @@ server cluster PowerSource = 47 { kSafetyTimeout = 10; } - enum BatChargeLevel : ENUM8 { + enum BatChargeLevelEnum : ENUM8 { kOk = 0; kWarning = 1; kCritical = 2; } - enum BatChargeState : ENUM8 { + enum BatChargeStateEnum : ENUM8 { kUnknown = 0; kIsCharging = 1; kIsAtFullCharge = 2; kIsNotCharging = 3; } - enum BatFault : ENUM8 { - kUnspecfied = 0; + enum BatCommonDesignationEnum : ENUM16 { + kUnspecified = 0; + kAaa = 1; + kAa = 2; + kC = 3; + kD = 4; + k4v5 = 5; + k6v0 = 6; + k9v0 = 7; + k12aa = 8; + kAaaa = 9; + kA = 10; + kB = 11; + kF = 12; + kN = 13; + kNo6 = 14; + kSubC = 15; + kA23 = 16; + kA27 = 17; + kBa5800 = 18; + kDuplex = 19; + k4sr44 = 20; + k523 = 21; + k531 = 22; + k15v0 = 23; + k22v5 = 24; + k30v0 = 25; + k45v0 = 26; + k67v5 = 27; + kJ = 28; + kCr123a = 29; + kCr2 = 30; + k2cr5 = 31; + kCrP2 = 32; + kCrV3 = 33; + kSr41 = 34; + kSr43 = 35; + kSr44 = 36; + kSr45 = 37; + kSr48 = 38; + kSr54 = 39; + kSr55 = 40; + kSr57 = 41; + kSr58 = 42; + kSr59 = 43; + kSr60 = 44; + kSr63 = 45; + kSr64 = 46; + kSr65 = 47; + kSr66 = 48; + kSr67 = 49; + kSr68 = 50; + kSr69 = 51; + kSr516 = 52; + kSr731 = 53; + kSr712 = 54; + kLr932 = 55; + kA5 = 56; + kA10 = 57; + kA13 = 58; + kA312 = 59; + kA675 = 60; + kAc41e = 61; + k10180 = 62; + k10280 = 63; + k10440 = 64; + k14250 = 65; + k14430 = 66; + k14500 = 67; + k14650 = 68; + k15270 = 69; + k16340 = 70; + kRcr123a = 71; + k17500 = 72; + k17670 = 73; + k18350 = 74; + k18500 = 75; + k18650 = 76; + k19670 = 77; + k25500 = 78; + k26650 = 79; + k32600 = 80; + } + + enum BatFaultEnum : ENUM8 { + kUnspecified = 0; kOverTemp = 1; kUnderTemp = 2; } - enum BatReplaceability : ENUM8 { + enum BatReplaceabilityEnum : ENUM8 { kUnspecified = 0; kNotReplaceable = 1; kUserReplaceable = 2; kFactoryReplaceable = 3; } - enum PowerSourceStatus : ENUM8 { + enum PowerSourceStatusEnum : ENUM8 { kUnspecified = 0; kActive = 1; kStandby = 2; kUnavailable = 3; } - enum WiredCurrentType : ENUM8 { + enum WiredCurrentTypeEnum : ENUM8 { kAc = 0; kDc = 1; } - enum WiredFault : ENUM8 { - kUnspecfied = 0; + enum WiredFaultEnum : ENUM8 { + kUnspecified = 0; kOverVoltage = 1; kUnderVoltage = 2; } @@ -826,51 +946,51 @@ server cluster PowerSource = 47 { } info event WiredFaultChange = 0 { - WiredFault current[] = 0; - WiredFault previous[] = 1; + WiredFaultEnum current[] = 0; + WiredFaultEnum previous[] = 1; } info event BatFaultChange = 1 { - BatFault current[] = 0; - BatFault previous[] = 1; + BatFaultEnum current[] = 0; + BatFaultEnum previous[] = 1; } info event BatChargeFaultChange = 2 { - BatChargeFault current[] = 0; - BatChargeFault previous[] = 1; + BatChargeFaultEnum current[] = 0; + BatChargeFaultEnum previous[] = 1; } - readonly attribute PowerSourceStatus status = 0; + readonly attribute PowerSourceStatusEnum status = 0; readonly attribute int8u order = 1; readonly attribute char_string<60> description = 2; readonly attribute nullable int32u wiredAssessedInputVoltage = 3; readonly attribute nullable int16u wiredAssessedInputFrequency = 4; - readonly attribute WiredCurrentType wiredCurrentType = 5; + readonly attribute WiredCurrentTypeEnum wiredCurrentType = 5; readonly attribute nullable int32u wiredAssessedCurrent = 6; readonly attribute int32u wiredNominalVoltage = 7; readonly attribute int32u wiredMaximumCurrent = 8; readonly attribute boolean wiredPresent = 9; - readonly attribute WiredFault activeWiredFaults[] = 10; + readonly attribute WiredFaultEnum activeWiredFaults[] = 10; readonly attribute nullable int32u batVoltage = 11; readonly attribute nullable int8u batPercentRemaining = 12; readonly attribute nullable int32u batTimeRemaining = 13; - readonly attribute BatChargeLevel batChargeLevel = 14; + readonly attribute BatChargeLevelEnum batChargeLevel = 14; readonly attribute boolean batReplacementNeeded = 15; - readonly attribute BatReplaceability batReplaceability = 16; + readonly attribute BatReplaceabilityEnum batReplaceability = 16; readonly attribute boolean batPresent = 17; - readonly attribute BatFault activeBatFaults[] = 18; + readonly attribute BatFaultEnum activeBatFaults[] = 18; readonly attribute char_string<60> batReplacementDescription = 19; - readonly attribute int32u batCommonDesignation = 20; + readonly attribute BatCommonDesignationEnum batCommonDesignation = 20; readonly attribute char_string<20> batANSIDesignation = 21; readonly attribute char_string<20> batIECDesignation = 22; - readonly attribute int32u batApprovedChemistry = 23; + readonly attribute BatApprovedChemistryEnum batApprovedChemistry = 23; readonly attribute int32u batCapacity = 24; readonly attribute int8u batQuantity = 25; - readonly attribute BatChargeState batChargeState = 26; + readonly attribute BatChargeStateEnum batChargeState = 26; readonly attribute nullable int32u batTimeToFullCharge = 27; readonly attribute boolean batFunctionalWhileCharging = 28; readonly attribute nullable int32u batChargingCurrent = 29; - readonly attribute BatChargeFault activeBatChargeFaults[] = 30; + readonly attribute BatChargeFaultEnum activeBatChargeFaults[] = 30; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/placeholder/linux/apps/app1/config.zap b/examples/placeholder/linux/apps/app1/config.zap index 88def6740847aa..8c19b14aa82204 100644 --- a/examples/placeholder/linux/apps/app1/config.zap +++ b/examples/placeholder/linux/apps/app1/config.zap @@ -1408,7 +1408,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "PowerSourceStatus", + "type": "PowerSourceStatusEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -1488,7 +1488,7 @@ "code": 5, "mfgCode": null, "side": "server", - "type": "WiredCurrentType", + "type": "WiredCurrentTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -1632,7 +1632,7 @@ "code": 14, "mfgCode": null, "side": "server", - "type": "BatChargeLevel", + "type": "BatChargeLevelEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -1664,7 +1664,7 @@ "code": 16, "mfgCode": null, "side": "server", - "type": "BatReplaceability", + "type": "BatReplaceabilityEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -1728,7 +1728,7 @@ "code": 20, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "BatCommonDesignationEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -1776,7 +1776,7 @@ "code": 23, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "BatApprovedChemistryEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -1824,7 +1824,7 @@ "code": 26, "mfgCode": null, "side": "server", - "type": "BatChargeState", + "type": "BatChargeStateEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 7b96e15d773ab8..cc9b83dd836f4e 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -729,7 +729,43 @@ server cluster PowerSourceConfiguration = 46 { } server cluster PowerSource = 47 { - enum BatChargeFault : ENUM8 { + enum BatApprovedChemistryEnum : ENUM16 { + kUnspecified = 0; + kAlkaline = 1; + kLithiumCarbonFluoride = 2; + kLithiumChromiumOxide = 3; + kLithiumCopperOxide = 4; + kLithiumIronDisulfide = 5; + kLithiumManganeseDioxide = 6; + kLithiumThionylChloride = 7; + kMagnesium = 8; + kMercuryOxide = 9; + kNickelOxyhydride = 10; + kSilverOxide = 11; + kZincAir = 12; + kZincCarbon = 13; + kZincChloride = 14; + kZincManganeseDioxide = 15; + kLeadAcid = 16; + kLithiumCobaltOxide = 17; + kLithiumIon = 18; + kLithiumIonPolymer = 19; + kLithiumIronPhosphate = 20; + kLithiumSulfur = 21; + kLithiumTitanate = 22; + kNickelCadmium = 23; + kNickelHydrogen = 24; + kNickelIron = 25; + kNickelMetalHydride = 26; + kNickelZinc = 27; + kSilverZinc = 28; + kSodiumIon = 29; + kSodiumSulfur = 30; + kZincBromide = 31; + kZincCerium = 32; + } + + enum BatChargeFaultEnum : ENUM8 { kUnspecified = 0; kAmbientTooHot = 1; kAmbientTooCold = 2; @@ -743,46 +779,130 @@ server cluster PowerSource = 47 { kSafetyTimeout = 10; } - enum BatChargeLevel : ENUM8 { + enum BatChargeLevelEnum : ENUM8 { kOk = 0; kWarning = 1; kCritical = 2; } - enum BatChargeState : ENUM8 { + enum BatChargeStateEnum : ENUM8 { kUnknown = 0; kIsCharging = 1; kIsAtFullCharge = 2; kIsNotCharging = 3; } - enum BatFault : ENUM8 { - kUnspecfied = 0; + enum BatCommonDesignationEnum : ENUM16 { + kUnspecified = 0; + kAaa = 1; + kAa = 2; + kC = 3; + kD = 4; + k4v5 = 5; + k6v0 = 6; + k9v0 = 7; + k12aa = 8; + kAaaa = 9; + kA = 10; + kB = 11; + kF = 12; + kN = 13; + kNo6 = 14; + kSubC = 15; + kA23 = 16; + kA27 = 17; + kBa5800 = 18; + kDuplex = 19; + k4sr44 = 20; + k523 = 21; + k531 = 22; + k15v0 = 23; + k22v5 = 24; + k30v0 = 25; + k45v0 = 26; + k67v5 = 27; + kJ = 28; + kCr123a = 29; + kCr2 = 30; + k2cr5 = 31; + kCrP2 = 32; + kCrV3 = 33; + kSr41 = 34; + kSr43 = 35; + kSr44 = 36; + kSr45 = 37; + kSr48 = 38; + kSr54 = 39; + kSr55 = 40; + kSr57 = 41; + kSr58 = 42; + kSr59 = 43; + kSr60 = 44; + kSr63 = 45; + kSr64 = 46; + kSr65 = 47; + kSr66 = 48; + kSr67 = 49; + kSr68 = 50; + kSr69 = 51; + kSr516 = 52; + kSr731 = 53; + kSr712 = 54; + kLr932 = 55; + kA5 = 56; + kA10 = 57; + kA13 = 58; + kA312 = 59; + kA675 = 60; + kAc41e = 61; + k10180 = 62; + k10280 = 63; + k10440 = 64; + k14250 = 65; + k14430 = 66; + k14500 = 67; + k14650 = 68; + k15270 = 69; + k16340 = 70; + kRcr123a = 71; + k17500 = 72; + k17670 = 73; + k18350 = 74; + k18500 = 75; + k18650 = 76; + k19670 = 77; + k25500 = 78; + k26650 = 79; + k32600 = 80; + } + + enum BatFaultEnum : ENUM8 { + kUnspecified = 0; kOverTemp = 1; kUnderTemp = 2; } - enum BatReplaceability : ENUM8 { + enum BatReplaceabilityEnum : ENUM8 { kUnspecified = 0; kNotReplaceable = 1; kUserReplaceable = 2; kFactoryReplaceable = 3; } - enum PowerSourceStatus : ENUM8 { + enum PowerSourceStatusEnum : ENUM8 { kUnspecified = 0; kActive = 1; kStandby = 2; kUnavailable = 3; } - enum WiredCurrentType : ENUM8 { + enum WiredCurrentTypeEnum : ENUM8 { kAc = 0; kDc = 1; } - enum WiredFault : ENUM8 { - kUnspecfied = 0; + enum WiredFaultEnum : ENUM8 { + kUnspecified = 0; kOverVoltage = 1; kUnderVoltage = 2; } @@ -795,51 +915,51 @@ server cluster PowerSource = 47 { } info event WiredFaultChange = 0 { - WiredFault current[] = 0; - WiredFault previous[] = 1; + WiredFaultEnum current[] = 0; + WiredFaultEnum previous[] = 1; } info event BatFaultChange = 1 { - BatFault current[] = 0; - BatFault previous[] = 1; + BatFaultEnum current[] = 0; + BatFaultEnum previous[] = 1; } info event BatChargeFaultChange = 2 { - BatChargeFault current[] = 0; - BatChargeFault previous[] = 1; + BatChargeFaultEnum current[] = 0; + BatChargeFaultEnum previous[] = 1; } - readonly attribute PowerSourceStatus status = 0; + readonly attribute PowerSourceStatusEnum status = 0; readonly attribute int8u order = 1; readonly attribute char_string<60> description = 2; readonly attribute nullable int32u wiredAssessedInputVoltage = 3; readonly attribute nullable int16u wiredAssessedInputFrequency = 4; - readonly attribute WiredCurrentType wiredCurrentType = 5; + readonly attribute WiredCurrentTypeEnum wiredCurrentType = 5; readonly attribute nullable int32u wiredAssessedCurrent = 6; readonly attribute int32u wiredNominalVoltage = 7; readonly attribute int32u wiredMaximumCurrent = 8; readonly attribute boolean wiredPresent = 9; - readonly attribute WiredFault activeWiredFaults[] = 10; + readonly attribute WiredFaultEnum activeWiredFaults[] = 10; readonly attribute nullable int32u batVoltage = 11; readonly attribute nullable int8u batPercentRemaining = 12; readonly attribute nullable int32u batTimeRemaining = 13; - readonly attribute BatChargeLevel batChargeLevel = 14; + readonly attribute BatChargeLevelEnum batChargeLevel = 14; readonly attribute boolean batReplacementNeeded = 15; - readonly attribute BatReplaceability batReplaceability = 16; + readonly attribute BatReplaceabilityEnum batReplaceability = 16; readonly attribute boolean batPresent = 17; - readonly attribute BatFault activeBatFaults[] = 18; + readonly attribute BatFaultEnum activeBatFaults[] = 18; readonly attribute char_string<60> batReplacementDescription = 19; - readonly attribute int32u batCommonDesignation = 20; + readonly attribute BatCommonDesignationEnum batCommonDesignation = 20; readonly attribute char_string<20> batANSIDesignation = 21; readonly attribute char_string<20> batIECDesignation = 22; - readonly attribute int32u batApprovedChemistry = 23; + readonly attribute BatApprovedChemistryEnum batApprovedChemistry = 23; readonly attribute int32u batCapacity = 24; readonly attribute int8u batQuantity = 25; - readonly attribute BatChargeState batChargeState = 26; + readonly attribute BatChargeStateEnum batChargeState = 26; readonly attribute nullable int32u batTimeToFullCharge = 27; readonly attribute boolean batFunctionalWhileCharging = 28; readonly attribute nullable int32u batChargingCurrent = 29; - readonly attribute BatChargeFault activeBatChargeFaults[] = 30; + readonly attribute BatChargeFaultEnum activeBatChargeFaults[] = 30; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/placeholder/linux/apps/app2/config.zap b/examples/placeholder/linux/apps/app2/config.zap index b0e9a24952b92f..da1514c9fcabb4 100644 --- a/examples/placeholder/linux/apps/app2/config.zap +++ b/examples/placeholder/linux/apps/app2/config.zap @@ -1608,7 +1608,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "PowerSourceStatus", + "type": "PowerSourceStatusEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -1688,7 +1688,7 @@ "code": 5, "mfgCode": null, "side": "server", - "type": "WiredCurrentType", + "type": "WiredCurrentTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -1832,7 +1832,7 @@ "code": 14, "mfgCode": null, "side": "server", - "type": "BatChargeLevel", + "type": "BatChargeLevelEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -1864,7 +1864,7 @@ "code": 16, "mfgCode": null, "side": "server", - "type": "BatReplaceability", + "type": "BatReplaceabilityEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -1928,7 +1928,7 @@ "code": 20, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "BatCommonDesignationEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -1976,7 +1976,7 @@ "code": 23, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "BatApprovedChemistryEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -2024,7 +2024,7 @@ "code": 26, "mfgCode": null, "side": "server", - "type": "BatChargeState", + "type": "BatChargeStateEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index ca4045501d3870..798a06b4a04567 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -574,7 +574,43 @@ server cluster UnitLocalization = 45 { } server cluster PowerSource = 47 { - enum BatChargeFault : ENUM8 { + enum BatApprovedChemistryEnum : ENUM16 { + kUnspecified = 0; + kAlkaline = 1; + kLithiumCarbonFluoride = 2; + kLithiumChromiumOxide = 3; + kLithiumCopperOxide = 4; + kLithiumIronDisulfide = 5; + kLithiumManganeseDioxide = 6; + kLithiumThionylChloride = 7; + kMagnesium = 8; + kMercuryOxide = 9; + kNickelOxyhydride = 10; + kSilverOxide = 11; + kZincAir = 12; + kZincCarbon = 13; + kZincChloride = 14; + kZincManganeseDioxide = 15; + kLeadAcid = 16; + kLithiumCobaltOxide = 17; + kLithiumIon = 18; + kLithiumIonPolymer = 19; + kLithiumIronPhosphate = 20; + kLithiumSulfur = 21; + kLithiumTitanate = 22; + kNickelCadmium = 23; + kNickelHydrogen = 24; + kNickelIron = 25; + kNickelMetalHydride = 26; + kNickelZinc = 27; + kSilverZinc = 28; + kSodiumIon = 29; + kSodiumSulfur = 30; + kZincBromide = 31; + kZincCerium = 32; + } + + enum BatChargeFaultEnum : ENUM8 { kUnspecified = 0; kAmbientTooHot = 1; kAmbientTooCold = 2; @@ -588,46 +624,130 @@ server cluster PowerSource = 47 { kSafetyTimeout = 10; } - enum BatChargeLevel : ENUM8 { + enum BatChargeLevelEnum : ENUM8 { kOk = 0; kWarning = 1; kCritical = 2; } - enum BatChargeState : ENUM8 { + enum BatChargeStateEnum : ENUM8 { kUnknown = 0; kIsCharging = 1; kIsAtFullCharge = 2; kIsNotCharging = 3; } - enum BatFault : ENUM8 { - kUnspecfied = 0; + enum BatCommonDesignationEnum : ENUM16 { + kUnspecified = 0; + kAaa = 1; + kAa = 2; + kC = 3; + kD = 4; + k4v5 = 5; + k6v0 = 6; + k9v0 = 7; + k12aa = 8; + kAaaa = 9; + kA = 10; + kB = 11; + kF = 12; + kN = 13; + kNo6 = 14; + kSubC = 15; + kA23 = 16; + kA27 = 17; + kBa5800 = 18; + kDuplex = 19; + k4sr44 = 20; + k523 = 21; + k531 = 22; + k15v0 = 23; + k22v5 = 24; + k30v0 = 25; + k45v0 = 26; + k67v5 = 27; + kJ = 28; + kCr123a = 29; + kCr2 = 30; + k2cr5 = 31; + kCrP2 = 32; + kCrV3 = 33; + kSr41 = 34; + kSr43 = 35; + kSr44 = 36; + kSr45 = 37; + kSr48 = 38; + kSr54 = 39; + kSr55 = 40; + kSr57 = 41; + kSr58 = 42; + kSr59 = 43; + kSr60 = 44; + kSr63 = 45; + kSr64 = 46; + kSr65 = 47; + kSr66 = 48; + kSr67 = 49; + kSr68 = 50; + kSr69 = 51; + kSr516 = 52; + kSr731 = 53; + kSr712 = 54; + kLr932 = 55; + kA5 = 56; + kA10 = 57; + kA13 = 58; + kA312 = 59; + kA675 = 60; + kAc41e = 61; + k10180 = 62; + k10280 = 63; + k10440 = 64; + k14250 = 65; + k14430 = 66; + k14500 = 67; + k14650 = 68; + k15270 = 69; + k16340 = 70; + kRcr123a = 71; + k17500 = 72; + k17670 = 73; + k18350 = 74; + k18500 = 75; + k18650 = 76; + k19670 = 77; + k25500 = 78; + k26650 = 79; + k32600 = 80; + } + + enum BatFaultEnum : ENUM8 { + kUnspecified = 0; kOverTemp = 1; kUnderTemp = 2; } - enum BatReplaceability : ENUM8 { + enum BatReplaceabilityEnum : ENUM8 { kUnspecified = 0; kNotReplaceable = 1; kUserReplaceable = 2; kFactoryReplaceable = 3; } - enum PowerSourceStatus : ENUM8 { + enum PowerSourceStatusEnum : ENUM8 { kUnspecified = 0; kActive = 1; kStandby = 2; kUnavailable = 3; } - enum WiredCurrentType : ENUM8 { + enum WiredCurrentTypeEnum : ENUM8 { kAc = 0; kDc = 1; } - enum WiredFault : ENUM8 { - kUnspecfied = 0; + enum WiredFaultEnum : ENUM8 { + kUnspecified = 0; kOverVoltage = 1; kUnderVoltage = 2; } @@ -640,29 +760,29 @@ server cluster PowerSource = 47 { } info event WiredFaultChange = 0 { - WiredFault current[] = 0; - WiredFault previous[] = 1; + WiredFaultEnum current[] = 0; + WiredFaultEnum previous[] = 1; } info event BatFaultChange = 1 { - BatFault current[] = 0; - BatFault previous[] = 1; + BatFaultEnum current[] = 0; + BatFaultEnum previous[] = 1; } info event BatChargeFaultChange = 2 { - BatChargeFault current[] = 0; - BatChargeFault previous[] = 1; + BatChargeFaultEnum current[] = 0; + BatChargeFaultEnum previous[] = 1; } - readonly attribute PowerSourceStatus status = 0; + readonly attribute PowerSourceStatusEnum status = 0; readonly attribute int8u order = 1; readonly attribute char_string<60> description = 2; readonly attribute nullable int32u batVoltage = 11; readonly attribute nullable int8u batPercentRemaining = 12; readonly attribute nullable int32u batTimeRemaining = 13; - readonly attribute BatChargeLevel batChargeLevel = 14; - readonly attribute BatFault activeBatFaults[] = 18; - readonly attribute BatChargeState batChargeState = 26; + readonly attribute BatChargeLevelEnum batChargeLevel = 14; + readonly attribute BatFaultEnum activeBatFaults[] = 18; + readonly attribute BatChargeStateEnum batChargeState = 26; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/window-app/common/window-app.zap b/examples/window-app/common/window-app.zap index bebcebe0343dc7..610a2132247ebe 100644 --- a/examples/window-app/common/window-app.zap +++ b/examples/window-app/common/window-app.zap @@ -2453,7 +2453,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "PowerSourceStatus", + "type": "PowerSourceStatusEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -2549,7 +2549,7 @@ "code": 14, "mfgCode": null, "side": "server", - "type": "BatChargeLevel", + "type": "BatChargeLevelEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -2581,7 +2581,7 @@ "code": 26, "mfgCode": null, "side": "server", - "type": "BatChargeState", + "type": "BatChargeStateEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/scripts/tools/zap/tests/inputs/all-clusters-app.zap b/scripts/tools/zap/tests/inputs/all-clusters-app.zap index b0c0673e926741..6352f7276c0de7 100644 --- a/scripts/tools/zap/tests/inputs/all-clusters-app.zap +++ b/scripts/tools/zap/tests/inputs/all-clusters-app.zap @@ -2255,7 +2255,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "PowerSourceStatus", + "type": "PowerSourceStatusEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -2335,7 +2335,7 @@ "code": 5, "mfgCode": null, "side": "server", - "type": "WiredCurrentType", + "type": "WiredCurrentTypeEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -2479,7 +2479,7 @@ "code": 14, "mfgCode": null, "side": "server", - "type": "BatChargeLevel", + "type": "BatChargeLevelEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -2511,7 +2511,7 @@ "code": 16, "mfgCode": null, "side": "server", - "type": "BatReplaceability", + "type": "BatReplaceabilityEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -2575,7 +2575,7 @@ "code": 20, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "BatCommonDesignationEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -2623,7 +2623,7 @@ "code": 23, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "BatApprovedChemistryEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -2671,7 +2671,7 @@ "code": 26, "mfgCode": null, "side": "server", - "type": "BatChargeState", + "type": "BatChargeStateEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -11061,7 +11061,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "PowerSourceStatus", + "type": "PowerSourceStatusEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -11141,7 +11141,7 @@ "code": 5, "mfgCode": null, "side": "server", - "type": "WiredCurrentType", + "type": "WiredCurrentTypeEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -11285,7 +11285,7 @@ "code": 14, "mfgCode": null, "side": "server", - "type": "BatChargeLevel", + "type": "BatChargeLevelEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -11317,7 +11317,7 @@ "code": 16, "mfgCode": null, "side": "server", - "type": "BatReplaceability", + "type": "BatReplaceabilityEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -11381,7 +11381,7 @@ "code": 20, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "BatCommonDesignationEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -11429,7 +11429,7 @@ "code": 23, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "BatApprovedChemistryEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -11477,7 +11477,7 @@ "code": 26, "mfgCode": null, "side": "server", - "type": "BatChargeState", + "type": "BatChargeStateEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -22272,7 +22272,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "PowerSourceStatus", + "type": "PowerSourceStatusEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -22352,7 +22352,7 @@ "code": 5, "mfgCode": null, "side": "server", - "type": "WiredCurrentType", + "type": "WiredCurrentTypeEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -22496,7 +22496,7 @@ "code": 14, "mfgCode": null, "side": "server", - "type": "BatChargeLevel", + "type": "BatChargeLevelEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -22528,7 +22528,7 @@ "code": 16, "mfgCode": null, "side": "server", - "type": "BatReplaceability", + "type": "BatReplaceabilityEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -22592,7 +22592,7 @@ "code": 20, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "BatCommonDesignationEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -22640,7 +22640,7 @@ "code": 23, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "BatApprovedChemistryEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -22688,7 +22688,7 @@ "code": 26, "mfgCode": null, "side": "server", - "type": "BatChargeState", + "type": "BatChargeStateEnum", "included": 0, "storageOption": "RAM", "singleton": 0, diff --git a/src/app/zap-templates/zcl/data-model/chip/power-source-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/power-source-cluster.xml index b37a81fe79a7e4..5a256ae97abd75 100644 --- a/src/app/zap-templates/zcl/data-model/chip/power-source-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/power-source-cluster.xml @@ -25,56 +25,56 @@ limitations under the License. true This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. - Status + Status Order Description WiredAssessedInputVoltage WiredAssessedInputFrequency - WiredCurrentType + WiredCurrentType WiredAssessedCurrent WiredNominalVoltage WiredMaximumCurrent WiredPresent - ActiveWiredFaults + ActiveWiredFaults BatVoltage BatPercentRemaining BatTimeRemaining - BatChargeLevel + BatChargeLevel BatReplacementNeeded - BatReplaceability + BatReplaceability BatPresent - ActiveBatFaults + ActiveBatFaults BatReplacementDescription - BatCommonDesignation + BatCommonDesignation BatANSIDesignation BatIECDesignation - BatApprovedChemistry + BatApprovedChemistry BatCapacity BatQuantity - BatChargeState + BatChargeState BatTimeToFullCharge BatFunctionalWhileCharging BatChargingCurrent - ActiveBatChargeFaults + ActiveBatChargeFaults The WiredFaultChange Event SHALL indicate a change in the set of wired faults currently detected by the Node on this wired power source. - - + + The BatFaultChange Event SHALL indicate a change in the set of battery faults currently detected by the Node on this battery power source. - - + + The BatChargeFaultChange Event SHALL indicate a change in the set of charge faults currently detected by the Node on this battery power source. - - + + @@ -87,21 +87,21 @@ limitations under the License. - + - + - + - + - + @@ -116,7 +116,7 @@ limitations under the License. - + @@ -124,20 +124,20 @@ limitations under the License. - + - + - + @@ -145,7 +145,7 @@ limitations under the License. - + @@ -153,24 +153,146 @@ limitations under the License. - - - + + - - + + - - + + diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index dd1450dc61f56a..d7016061bf502d 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -961,7 +961,43 @@ client cluster PowerSourceConfiguration = 46 { } client cluster PowerSource = 47 { - enum BatChargeFault : ENUM8 { + enum BatApprovedChemistryEnum : ENUM16 { + kUnspecified = 0; + kAlkaline = 1; + kLithiumCarbonFluoride = 2; + kLithiumChromiumOxide = 3; + kLithiumCopperOxide = 4; + kLithiumIronDisulfide = 5; + kLithiumManganeseDioxide = 6; + kLithiumThionylChloride = 7; + kMagnesium = 8; + kMercuryOxide = 9; + kNickelOxyhydride = 10; + kSilverOxide = 11; + kZincAir = 12; + kZincCarbon = 13; + kZincChloride = 14; + kZincManganeseDioxide = 15; + kLeadAcid = 16; + kLithiumCobaltOxide = 17; + kLithiumIon = 18; + kLithiumIonPolymer = 19; + kLithiumIronPhosphate = 20; + kLithiumSulfur = 21; + kLithiumTitanate = 22; + kNickelCadmium = 23; + kNickelHydrogen = 24; + kNickelIron = 25; + kNickelMetalHydride = 26; + kNickelZinc = 27; + kSilverZinc = 28; + kSodiumIon = 29; + kSodiumSulfur = 30; + kZincBromide = 31; + kZincCerium = 32; + } + + enum BatChargeFaultEnum : ENUM8 { kUnspecified = 0; kAmbientTooHot = 1; kAmbientTooCold = 2; @@ -975,46 +1011,130 @@ client cluster PowerSource = 47 { kSafetyTimeout = 10; } - enum BatChargeLevel : ENUM8 { + enum BatChargeLevelEnum : ENUM8 { kOk = 0; kWarning = 1; kCritical = 2; } - enum BatChargeState : ENUM8 { + enum BatChargeStateEnum : ENUM8 { kUnknown = 0; kIsCharging = 1; kIsAtFullCharge = 2; kIsNotCharging = 3; } - enum BatFault : ENUM8 { - kUnspecfied = 0; + enum BatCommonDesignationEnum : ENUM16 { + kUnspecified = 0; + kAaa = 1; + kAa = 2; + kC = 3; + kD = 4; + k4v5 = 5; + k6v0 = 6; + k9v0 = 7; + k12aa = 8; + kAaaa = 9; + kA = 10; + kB = 11; + kF = 12; + kN = 13; + kNo6 = 14; + kSubC = 15; + kA23 = 16; + kA27 = 17; + kBa5800 = 18; + kDuplex = 19; + k4sr44 = 20; + k523 = 21; + k531 = 22; + k15v0 = 23; + k22v5 = 24; + k30v0 = 25; + k45v0 = 26; + k67v5 = 27; + kJ = 28; + kCr123a = 29; + kCr2 = 30; + k2cr5 = 31; + kCrP2 = 32; + kCrV3 = 33; + kSr41 = 34; + kSr43 = 35; + kSr44 = 36; + kSr45 = 37; + kSr48 = 38; + kSr54 = 39; + kSr55 = 40; + kSr57 = 41; + kSr58 = 42; + kSr59 = 43; + kSr60 = 44; + kSr63 = 45; + kSr64 = 46; + kSr65 = 47; + kSr66 = 48; + kSr67 = 49; + kSr68 = 50; + kSr69 = 51; + kSr516 = 52; + kSr731 = 53; + kSr712 = 54; + kLr932 = 55; + kA5 = 56; + kA10 = 57; + kA13 = 58; + kA312 = 59; + kA675 = 60; + kAc41e = 61; + k10180 = 62; + k10280 = 63; + k10440 = 64; + k14250 = 65; + k14430 = 66; + k14500 = 67; + k14650 = 68; + k15270 = 69; + k16340 = 70; + kRcr123a = 71; + k17500 = 72; + k17670 = 73; + k18350 = 74; + k18500 = 75; + k18650 = 76; + k19670 = 77; + k25500 = 78; + k26650 = 79; + k32600 = 80; + } + + enum BatFaultEnum : ENUM8 { + kUnspecified = 0; kOverTemp = 1; kUnderTemp = 2; } - enum BatReplaceability : ENUM8 { + enum BatReplaceabilityEnum : ENUM8 { kUnspecified = 0; kNotReplaceable = 1; kUserReplaceable = 2; kFactoryReplaceable = 3; } - enum PowerSourceStatus : ENUM8 { + enum PowerSourceStatusEnum : ENUM8 { kUnspecified = 0; kActive = 1; kStandby = 2; kUnavailable = 3; } - enum WiredCurrentType : ENUM8 { + enum WiredCurrentTypeEnum : ENUM8 { kAc = 0; kDc = 1; } - enum WiredFault : ENUM8 { - kUnspecfied = 0; + enum WiredFaultEnum : ENUM8 { + kUnspecified = 0; kOverVoltage = 1; kUnderVoltage = 2; } @@ -1027,51 +1147,51 @@ client cluster PowerSource = 47 { } info event WiredFaultChange = 0 { - WiredFault current[] = 0; - WiredFault previous[] = 1; + WiredFaultEnum current[] = 0; + WiredFaultEnum previous[] = 1; } info event BatFaultChange = 1 { - BatFault current[] = 0; - BatFault previous[] = 1; + BatFaultEnum current[] = 0; + BatFaultEnum previous[] = 1; } info event BatChargeFaultChange = 2 { - BatChargeFault current[] = 0; - BatChargeFault previous[] = 1; + BatChargeFaultEnum current[] = 0; + BatChargeFaultEnum previous[] = 1; } - readonly attribute PowerSourceStatus status = 0; + readonly attribute PowerSourceStatusEnum status = 0; readonly attribute int8u order = 1; readonly attribute char_string<60> description = 2; readonly attribute nullable int32u wiredAssessedInputVoltage = 3; readonly attribute nullable int16u wiredAssessedInputFrequency = 4; - readonly attribute WiredCurrentType wiredCurrentType = 5; + readonly attribute WiredCurrentTypeEnum wiredCurrentType = 5; readonly attribute nullable int32u wiredAssessedCurrent = 6; readonly attribute int32u wiredNominalVoltage = 7; readonly attribute int32u wiredMaximumCurrent = 8; readonly attribute boolean wiredPresent = 9; - readonly attribute WiredFault activeWiredFaults[] = 10; + readonly attribute WiredFaultEnum activeWiredFaults[] = 10; readonly attribute nullable int32u batVoltage = 11; readonly attribute nullable int8u batPercentRemaining = 12; readonly attribute nullable int32u batTimeRemaining = 13; - readonly attribute BatChargeLevel batChargeLevel = 14; + readonly attribute BatChargeLevelEnum batChargeLevel = 14; readonly attribute boolean batReplacementNeeded = 15; - readonly attribute BatReplaceability batReplaceability = 16; + readonly attribute BatReplaceabilityEnum batReplaceability = 16; readonly attribute boolean batPresent = 17; - readonly attribute BatFault activeBatFaults[] = 18; + readonly attribute BatFaultEnum activeBatFaults[] = 18; readonly attribute char_string<60> batReplacementDescription = 19; - readonly attribute int32u batCommonDesignation = 20; + readonly attribute BatCommonDesignationEnum batCommonDesignation = 20; readonly attribute char_string<20> batANSIDesignation = 21; readonly attribute char_string<20> batIECDesignation = 22; - readonly attribute int32u batApprovedChemistry = 23; + readonly attribute BatApprovedChemistryEnum batApprovedChemistry = 23; readonly attribute int32u batCapacity = 24; readonly attribute int8u batQuantity = 25; - readonly attribute BatChargeState batChargeState = 26; + readonly attribute BatChargeStateEnum batChargeState = 26; readonly attribute nullable int32u batTimeToFullCharge = 27; readonly attribute boolean batFunctionalWhileCharging = 28; readonly attribute nullable int32u batChargingCurrent = 29; - readonly attribute BatChargeFault activeBatChargeFaults[] = 30; + readonly attribute BatChargeFaultEnum activeBatChargeFaults[] = 30; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index cc6fbe2bd7f9cc..9402805c9e3607 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -4269,7 +4269,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "PowerSourceStatus", + "type": "PowerSourceStatusEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -4349,7 +4349,7 @@ "code": 5, "mfgCode": null, "side": "server", - "type": "WiredCurrentType", + "type": "WiredCurrentTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -4493,7 +4493,7 @@ "code": 14, "mfgCode": null, "side": "server", - "type": "BatChargeLevel", + "type": "BatChargeLevelEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -4525,7 +4525,7 @@ "code": 16, "mfgCode": null, "side": "server", - "type": "BatReplaceability", + "type": "BatReplaceabilityEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -4589,7 +4589,7 @@ "code": 20, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "BatCommonDesignationEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -4637,7 +4637,7 @@ "code": 23, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "BatApprovedChemistryEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -4685,7 +4685,7 @@ "code": 26, "mfgCode": null, "side": "server", - "type": "BatChargeState", + "type": "BatChargeStateEnum", "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 c715b5eae0dce5..841f21a8272e37 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -4548,10 +4548,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - std::string valueClassName = "java/lang/Long"; - std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + static_cast(cppValue), value); return value; } case Attributes::BatANSIDesignation::Id: { @@ -4587,10 +4587,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - std::string valueClassName = "java/lang/Long"; - std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + static_cast(cppValue), value); return value; } case Attributes::BatCapacity::Id: { diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index 1c6dba70667e8c..f32eb447345bcd 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -7947,7 +7947,7 @@ CHIPPowerSourceActiveWiredFaultsAttributeCallback::~CHIPPowerSourceActiveWiredFa } void CHIPPowerSourceActiveWiredFaultsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -8216,7 +8216,7 @@ CHIPPowerSourceActiveBatFaultsAttributeCallback::~CHIPPowerSourceActiveBatFaults } void CHIPPowerSourceActiveBatFaultsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -8421,7 +8421,7 @@ CHIPPowerSourceActiveBatChargeFaultsAttributeCallback::~CHIPPowerSourceActiveBat } void CHIPPowerSourceActiveBatChargeFaultsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.h b/src/controller/java/zap-generated/CHIPReadCallbacks.h index 76ab4b1bb4aa09..7d1df204dcd207 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.h +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.h @@ -3353,7 +3353,7 @@ class CHIPPowerSourceActiveWiredFaultsAttributeCallback } static void CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list); + const chip::app::DataModel::DecodableList & list); static void OnSubscriptionEstablished(void * context) { CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( @@ -3474,7 +3474,7 @@ class CHIPPowerSourceActiveBatFaultsAttributeCallback } static void CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list); + const chip::app::DataModel::DecodableList & list); static void OnSubscriptionEstablished(void * context) { CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( @@ -3565,7 +3565,7 @@ class CHIPPowerSourceActiveBatChargeFaultsAttributeCallback } static void CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list); + const chip::app::DataModel::DecodableList & list); static void OnSubscriptionEstablished(void * context) { CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index db3370ee3ba039..3003a74046cffc 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -5967,12 +5967,12 @@ public void subscribeBatReplacementDescriptionAttribute( chipClusterPtr, callback, minInterval, maxInterval); } - public void readBatCommonDesignationAttribute(LongAttributeCallback callback) { + public void readBatCommonDesignationAttribute(IntegerAttributeCallback callback) { readBatCommonDesignationAttribute(chipClusterPtr, callback); } public void subscribeBatCommonDesignationAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { + IntegerAttributeCallback callback, int minInterval, int maxInterval) { subscribeBatCommonDesignationAttribute(chipClusterPtr, callback, minInterval, maxInterval); } @@ -5994,12 +5994,12 @@ public void subscribeBatIECDesignationAttribute( subscribeBatIECDesignationAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readBatApprovedChemistryAttribute(LongAttributeCallback callback) { + public void readBatApprovedChemistryAttribute(IntegerAttributeCallback callback) { readBatApprovedChemistryAttribute(chipClusterPtr, callback); } public void subscribeBatApprovedChemistryAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { + IntegerAttributeCallback callback, int minInterval, int maxInterval) { subscribeBatApprovedChemistryAttribute(chipClusterPtr, callback, minInterval, maxInterval); } @@ -6271,10 +6271,10 @@ private native void subscribeBatReplacementDescriptionAttribute( int maxInterval); private native void readBatCommonDesignationAttribute( - long chipClusterPtr, LongAttributeCallback callback); + long chipClusterPtr, IntegerAttributeCallback callback); private native void subscribeBatCommonDesignationAttribute( - long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); private native void readBatANSIDesignationAttribute( long chipClusterPtr, CharStringAttributeCallback callback); @@ -6295,10 +6295,10 @@ private native void subscribeBatIECDesignationAttribute( int maxInterval); private native void readBatApprovedChemistryAttribute( - long chipClusterPtr, LongAttributeCallback callback); + long chipClusterPtr, IntegerAttributeCallback callback); private native void subscribeBatApprovedChemistryAttribute( - long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); private native void readBatCapacityAttribute( long chipClusterPtr, LongAttributeCallback callback); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java index e246d405460d3a..bb436d77a4765d 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java @@ -2924,9 +2924,10 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.PowerSourceCluster) cluster) - .readBatCommonDesignationAttribute((ChipClusters.LongAttributeCallback) callback); + .readBatCommonDesignationAttribute( + (ChipClusters.IntegerAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readPowerSourceBatCommonDesignationCommandParams); readPowerSourceInteractionInfo.put( "readBatCommonDesignationAttribute", @@ -2964,9 +2965,10 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.PowerSourceCluster) cluster) - .readBatApprovedChemistryAttribute((ChipClusters.LongAttributeCallback) callback); + .readBatApprovedChemistryAttribute( + (ChipClusters.IntegerAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readPowerSourceBatApprovedChemistryCommandParams); readPowerSourceInteractionInfo.put( "readBatApprovedChemistryAttribute", diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 388e69d741964e..42fbad2dce005f 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -5961,37 +5961,37 @@ class PowerSource(Cluster): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="status", Tag=0x00000000, Type=PowerSource.Enums.PowerSourceStatus), + ClusterObjectFieldDescriptor(Label="status", Tag=0x00000000, Type=PowerSource.Enums.PowerSourceStatusEnum), ClusterObjectFieldDescriptor(Label="order", Tag=0x00000001, Type=uint), ClusterObjectFieldDescriptor(Label="description", Tag=0x00000002, Type=str), ClusterObjectFieldDescriptor(Label="wiredAssessedInputVoltage", Tag=0x00000003, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="wiredAssessedInputFrequency", Tag=0x00000004, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="wiredCurrentType", Tag=0x00000005, Type=typing.Optional[PowerSource.Enums.WiredCurrentType]), + ClusterObjectFieldDescriptor(Label="wiredCurrentType", Tag=0x00000005, Type=typing.Optional[PowerSource.Enums.WiredCurrentTypeEnum]), ClusterObjectFieldDescriptor(Label="wiredAssessedCurrent", Tag=0x00000006, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="wiredNominalVoltage", Tag=0x00000007, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="wiredMaximumCurrent", Tag=0x00000008, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="wiredPresent", Tag=0x00000009, Type=typing.Optional[bool]), - ClusterObjectFieldDescriptor(Label="activeWiredFaults", Tag=0x0000000A, Type=typing.Optional[typing.List[PowerSource.Enums.WiredFault]]), + ClusterObjectFieldDescriptor(Label="activeWiredFaults", Tag=0x0000000A, Type=typing.Optional[typing.List[PowerSource.Enums.WiredFaultEnum]]), ClusterObjectFieldDescriptor(Label="batVoltage", Tag=0x0000000B, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="batPercentRemaining", Tag=0x0000000C, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="batTimeRemaining", Tag=0x0000000D, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="batChargeLevel", Tag=0x0000000E, Type=typing.Optional[PowerSource.Enums.BatChargeLevel]), + ClusterObjectFieldDescriptor(Label="batChargeLevel", Tag=0x0000000E, Type=typing.Optional[PowerSource.Enums.BatChargeLevelEnum]), ClusterObjectFieldDescriptor(Label="batReplacementNeeded", Tag=0x0000000F, Type=typing.Optional[bool]), - ClusterObjectFieldDescriptor(Label="batReplaceability", Tag=0x00000010, Type=typing.Optional[PowerSource.Enums.BatReplaceability]), + ClusterObjectFieldDescriptor(Label="batReplaceability", Tag=0x00000010, Type=typing.Optional[PowerSource.Enums.BatReplaceabilityEnum]), ClusterObjectFieldDescriptor(Label="batPresent", Tag=0x00000011, Type=typing.Optional[bool]), - ClusterObjectFieldDescriptor(Label="activeBatFaults", Tag=0x00000012, Type=typing.Optional[typing.List[PowerSource.Enums.BatFault]]), + ClusterObjectFieldDescriptor(Label="activeBatFaults", Tag=0x00000012, Type=typing.Optional[typing.List[PowerSource.Enums.BatFaultEnum]]), ClusterObjectFieldDescriptor(Label="batReplacementDescription", Tag=0x00000013, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="batCommonDesignation", Tag=0x00000014, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="batCommonDesignation", Tag=0x00000014, Type=typing.Optional[PowerSource.Enums.BatCommonDesignationEnum]), ClusterObjectFieldDescriptor(Label="batANSIDesignation", Tag=0x00000015, Type=typing.Optional[str]), ClusterObjectFieldDescriptor(Label="batIECDesignation", Tag=0x00000016, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="batApprovedChemistry", Tag=0x00000017, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="batApprovedChemistry", Tag=0x00000017, Type=typing.Optional[PowerSource.Enums.BatApprovedChemistryEnum]), ClusterObjectFieldDescriptor(Label="batCapacity", Tag=0x00000018, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="batQuantity", Tag=0x00000019, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="batChargeState", Tag=0x0000001A, Type=typing.Optional[PowerSource.Enums.BatChargeState]), + ClusterObjectFieldDescriptor(Label="batChargeState", Tag=0x0000001A, Type=typing.Optional[PowerSource.Enums.BatChargeStateEnum]), ClusterObjectFieldDescriptor(Label="batTimeToFullCharge", Tag=0x0000001B, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="batFunctionalWhileCharging", Tag=0x0000001C, Type=typing.Optional[bool]), ClusterObjectFieldDescriptor(Label="batChargingCurrent", Tag=0x0000001D, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="activeBatChargeFaults", Tag=0x0000001E, Type=typing.Optional[typing.List[PowerSource.Enums.BatChargeFault]]), + ClusterObjectFieldDescriptor(Label="activeBatChargeFaults", Tag=0x0000001E, Type=typing.Optional[typing.List[PowerSource.Enums.BatChargeFaultEnum]]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -6000,37 +6000,37 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - status: 'PowerSource.Enums.PowerSourceStatus' = None + status: 'PowerSource.Enums.PowerSourceStatusEnum' = None order: 'uint' = None description: 'str' = None wiredAssessedInputVoltage: 'typing.Union[None, Nullable, uint]' = None wiredAssessedInputFrequency: 'typing.Union[None, Nullable, uint]' = None - wiredCurrentType: 'typing.Optional[PowerSource.Enums.WiredCurrentType]' = None + wiredCurrentType: 'typing.Optional[PowerSource.Enums.WiredCurrentTypeEnum]' = None wiredAssessedCurrent: 'typing.Union[None, Nullable, uint]' = None wiredNominalVoltage: 'typing.Optional[uint]' = None wiredMaximumCurrent: 'typing.Optional[uint]' = None wiredPresent: 'typing.Optional[bool]' = None - activeWiredFaults: 'typing.Optional[typing.List[PowerSource.Enums.WiredFault]]' = None + activeWiredFaults: 'typing.Optional[typing.List[PowerSource.Enums.WiredFaultEnum]]' = None batVoltage: 'typing.Union[None, Nullable, uint]' = None batPercentRemaining: 'typing.Union[None, Nullable, uint]' = None batTimeRemaining: 'typing.Union[None, Nullable, uint]' = None - batChargeLevel: 'typing.Optional[PowerSource.Enums.BatChargeLevel]' = None + batChargeLevel: 'typing.Optional[PowerSource.Enums.BatChargeLevelEnum]' = None batReplacementNeeded: 'typing.Optional[bool]' = None - batReplaceability: 'typing.Optional[PowerSource.Enums.BatReplaceability]' = None + batReplaceability: 'typing.Optional[PowerSource.Enums.BatReplaceabilityEnum]' = None batPresent: 'typing.Optional[bool]' = None - activeBatFaults: 'typing.Optional[typing.List[PowerSource.Enums.BatFault]]' = None + activeBatFaults: 'typing.Optional[typing.List[PowerSource.Enums.BatFaultEnum]]' = None batReplacementDescription: 'typing.Optional[str]' = None - batCommonDesignation: 'typing.Optional[uint]' = None + batCommonDesignation: 'typing.Optional[PowerSource.Enums.BatCommonDesignationEnum]' = None batANSIDesignation: 'typing.Optional[str]' = None batIECDesignation: 'typing.Optional[str]' = None - batApprovedChemistry: 'typing.Optional[uint]' = None + batApprovedChemistry: 'typing.Optional[PowerSource.Enums.BatApprovedChemistryEnum]' = None batCapacity: 'typing.Optional[uint]' = None batQuantity: 'typing.Optional[uint]' = None - batChargeState: 'typing.Optional[PowerSource.Enums.BatChargeState]' = None + batChargeState: 'typing.Optional[PowerSource.Enums.BatChargeStateEnum]' = None batTimeToFullCharge: 'typing.Union[None, Nullable, uint]' = None batFunctionalWhileCharging: 'typing.Optional[bool]' = None batChargingCurrent: 'typing.Union[None, Nullable, uint]' = None - activeBatChargeFaults: 'typing.Optional[typing.List[PowerSource.Enums.BatChargeFault]]' = None + activeBatChargeFaults: 'typing.Optional[typing.List[PowerSource.Enums.BatChargeFaultEnum]]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -6039,7 +6039,47 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None class Enums: - class BatChargeFault(MatterIntEnum): + class BatApprovedChemistryEnum(MatterIntEnum): + kUnspecified = 0x00 + kAlkaline = 0x01 + kLithiumCarbonFluoride = 0x02 + kLithiumChromiumOxide = 0x03 + kLithiumCopperOxide = 0x04 + kLithiumIronDisulfide = 0x05 + kLithiumManganeseDioxide = 0x06 + kLithiumThionylChloride = 0x07 + kMagnesium = 0x08 + kMercuryOxide = 0x09 + kNickelOxyhydride = 0x0A + kSilverOxide = 0x0B + kZincAir = 0x0C + kZincCarbon = 0x0D + kZincChloride = 0x0E + kZincManganeseDioxide = 0x0F + kLeadAcid = 0x10 + kLithiumCobaltOxide = 0x11 + kLithiumIon = 0x12 + kLithiumIonPolymer = 0x13 + kLithiumIronPhosphate = 0x14 + kLithiumSulfur = 0x15 + kLithiumTitanate = 0x16 + kNickelCadmium = 0x17 + kNickelHydrogen = 0x18 + kNickelIron = 0x19 + kNickelMetalHydride = 0x1A + kNickelZinc = 0x1B + kSilverZinc = 0x1C + kSodiumIon = 0x1D + kSodiumSulfur = 0x1E + kZincBromide = 0x1F + kZincCerium = 0x20 + # 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 = 33, + + class BatChargeFaultEnum(MatterIntEnum): kUnspecified = 0x00 kAmbientTooHot = 0x01 kAmbientTooCold = 0x02 @@ -6057,7 +6097,7 @@ class BatChargeFault(MatterIntEnum): # enum value. This specific should never be transmitted. kUnknownEnumValue = 11, - class BatChargeLevel(MatterIntEnum): + class BatChargeLevelEnum(MatterIntEnum): kOk = 0x00 kWarning = 0x01 kCritical = 0x02 @@ -6067,7 +6107,7 @@ class BatChargeLevel(MatterIntEnum): # enum value. This specific should never be transmitted. kUnknownEnumValue = 3, - class BatChargeState(MatterIntEnum): + class BatChargeStateEnum(MatterIntEnum): kUnknown = 0x00 kIsCharging = 0x01 kIsAtFullCharge = 0x02 @@ -6078,8 +6118,96 @@ class BatChargeState(MatterIntEnum): # enum value. This specific should never be transmitted. kUnknownEnumValue = 4, - class BatFault(MatterIntEnum): - kUnspecfied = 0x00 + class BatCommonDesignationEnum(MatterIntEnum): + kUnspecified = 0x00 + kAaa = 0x01 + kAa = 0x02 + kC = 0x03 + kD = 0x04 + k4v5 = 0x05 + k6v0 = 0x06 + k9v0 = 0x07 + k12aa = 0x08 + kAaaa = 0x09 + kA = 0x0A + kB = 0x0B + kF = 0x0C + kN = 0x0D + kNo6 = 0x0E + kSubC = 0x0F + kA23 = 0x10 + kA27 = 0x11 + kBa5800 = 0x12 + kDuplex = 0x13 + k4sr44 = 0x14 + k523 = 0x15 + k531 = 0x16 + k15v0 = 0x17 + k22v5 = 0x18 + k30v0 = 0x19 + k45v0 = 0x1A + k67v5 = 0x1B + kJ = 0x1C + kCr123a = 0x1D + kCr2 = 0x1E + k2cr5 = 0x1F + kCrP2 = 0x20 + kCrV3 = 0x21 + kSr41 = 0x22 + kSr43 = 0x23 + kSr44 = 0x24 + kSr45 = 0x25 + kSr48 = 0x26 + kSr54 = 0x27 + kSr55 = 0x28 + kSr57 = 0x29 + kSr58 = 0x2A + kSr59 = 0x2B + kSr60 = 0x2C + kSr63 = 0x2D + kSr64 = 0x2E + kSr65 = 0x2F + kSr66 = 0x30 + kSr67 = 0x31 + kSr68 = 0x32 + kSr69 = 0x33 + kSr516 = 0x34 + kSr731 = 0x35 + kSr712 = 0x36 + kLr932 = 0x37 + kA5 = 0x38 + kA10 = 0x39 + kA13 = 0x3A + kA312 = 0x3B + kA675 = 0x3C + kAc41e = 0x3D + k10180 = 0x3E + k10280 = 0x3F + k10440 = 0x40 + k14250 = 0x41 + k14430 = 0x42 + k14500 = 0x43 + k14650 = 0x44 + k15270 = 0x45 + k16340 = 0x46 + kRcr123a = 0x47 + k17500 = 0x48 + k17670 = 0x49 + k18350 = 0x4A + k18500 = 0x4B + k18650 = 0x4C + k19670 = 0x4D + k25500 = 0x4E + k26650 = 0x4F + k32600 = 0x50 + # 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 = 81, + + class BatFaultEnum(MatterIntEnum): + kUnspecified = 0x00 kOverTemp = 0x01 kUnderTemp = 0x02 # All received enum values that are not listed above will be mapped @@ -6088,7 +6216,7 @@ class BatFault(MatterIntEnum): # enum value. This specific should never be transmitted. kUnknownEnumValue = 3, - class BatReplaceability(MatterIntEnum): + class BatReplaceabilityEnum(MatterIntEnum): kUnspecified = 0x00 kNotReplaceable = 0x01 kUserReplaceable = 0x02 @@ -6099,7 +6227,7 @@ class BatReplaceability(MatterIntEnum): # enum value. This specific should never be transmitted. kUnknownEnumValue = 4, - class PowerSourceStatus(MatterIntEnum): + class PowerSourceStatusEnum(MatterIntEnum): kUnspecified = 0x00 kActive = 0x01 kStandby = 0x02 @@ -6110,7 +6238,7 @@ class PowerSourceStatus(MatterIntEnum): # enum value. This specific should never be transmitted. kUnknownEnumValue = 4, - class WiredCurrentType(MatterIntEnum): + class WiredCurrentTypeEnum(MatterIntEnum): kAc = 0x00 kDc = 0x01 # All received enum values that are not listed above will be mapped @@ -6119,8 +6247,8 @@ class WiredCurrentType(MatterIntEnum): # enum value. This specific should never be transmitted. kUnknownEnumValue = 2, - class WiredFault(MatterIntEnum): - kUnspecfied = 0x00 + class WiredFaultEnum(MatterIntEnum): + kUnspecified = 0x00 kOverVoltage = 0x01 kUnderVoltage = 0x02 # All received enum values that are not listed above will be mapped @@ -6145,12 +6273,12 @@ class BatChargeFaultChangeType(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="current", Tag=0, Type=typing.List[PowerSource.Enums.BatChargeFault]), - ClusterObjectFieldDescriptor(Label="previous", Tag=1, Type=typing.List[PowerSource.Enums.BatChargeFault]), + ClusterObjectFieldDescriptor(Label="current", Tag=0, Type=typing.List[PowerSource.Enums.BatChargeFaultEnum]), + ClusterObjectFieldDescriptor(Label="previous", Tag=1, Type=typing.List[PowerSource.Enums.BatChargeFaultEnum]), ]) - current: 'typing.List[PowerSource.Enums.BatChargeFault]' = field(default_factory=lambda: []) - previous: 'typing.List[PowerSource.Enums.BatChargeFault]' = field(default_factory=lambda: []) + current: 'typing.List[PowerSource.Enums.BatChargeFaultEnum]' = field(default_factory=lambda: []) + previous: 'typing.List[PowerSource.Enums.BatChargeFaultEnum]' = field(default_factory=lambda: []) @dataclass class BatFaultChangeType(ClusterObject): @@ -6158,12 +6286,12 @@ class BatFaultChangeType(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="current", Tag=0, Type=typing.List[PowerSource.Enums.BatFault]), - ClusterObjectFieldDescriptor(Label="previous", Tag=1, Type=typing.List[PowerSource.Enums.BatFault]), + ClusterObjectFieldDescriptor(Label="current", Tag=0, Type=typing.List[PowerSource.Enums.BatFaultEnum]), + ClusterObjectFieldDescriptor(Label="previous", Tag=1, Type=typing.List[PowerSource.Enums.BatFaultEnum]), ]) - current: 'typing.List[PowerSource.Enums.BatFault]' = field(default_factory=lambda: []) - previous: 'typing.List[PowerSource.Enums.BatFault]' = field(default_factory=lambda: []) + current: 'typing.List[PowerSource.Enums.BatFaultEnum]' = field(default_factory=lambda: []) + previous: 'typing.List[PowerSource.Enums.BatFaultEnum]' = field(default_factory=lambda: []) @dataclass class WiredFaultChangeType(ClusterObject): @@ -6171,12 +6299,12 @@ class WiredFaultChangeType(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="current", Tag=0, Type=typing.List[PowerSource.Enums.WiredFault]), - ClusterObjectFieldDescriptor(Label="previous", Tag=1, Type=typing.List[PowerSource.Enums.WiredFault]), + ClusterObjectFieldDescriptor(Label="current", Tag=0, Type=typing.List[PowerSource.Enums.WiredFaultEnum]), + ClusterObjectFieldDescriptor(Label="previous", Tag=1, Type=typing.List[PowerSource.Enums.WiredFaultEnum]), ]) - current: 'typing.List[PowerSource.Enums.WiredFault]' = field(default_factory=lambda: []) - previous: 'typing.List[PowerSource.Enums.WiredFault]' = field(default_factory=lambda: []) + current: 'typing.List[PowerSource.Enums.WiredFaultEnum]' = field(default_factory=lambda: []) + previous: 'typing.List[PowerSource.Enums.WiredFaultEnum]' = field(default_factory=lambda: []) @@ -6194,9 +6322,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=PowerSource.Enums.PowerSourceStatus) + return ClusterObjectFieldDescriptor(Type=PowerSource.Enums.PowerSourceStatusEnum) - value: 'PowerSource.Enums.PowerSourceStatus' = 0 + value: 'PowerSource.Enums.PowerSourceStatusEnum' = 0 @dataclass class Order(ClusterAttributeDescriptor): @@ -6274,9 +6402,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[PowerSource.Enums.WiredCurrentType]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[PowerSource.Enums.WiredCurrentTypeEnum]) - value: 'typing.Optional[PowerSource.Enums.WiredCurrentType]' = None + value: 'typing.Optional[PowerSource.Enums.WiredCurrentTypeEnum]' = None @dataclass class WiredAssessedCurrent(ClusterAttributeDescriptor): @@ -6354,9 +6482,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[PowerSource.Enums.WiredFault]]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[PowerSource.Enums.WiredFaultEnum]]) - value: 'typing.Optional[typing.List[PowerSource.Enums.WiredFault]]' = None + value: 'typing.Optional[typing.List[PowerSource.Enums.WiredFaultEnum]]' = None @dataclass class BatVoltage(ClusterAttributeDescriptor): @@ -6418,9 +6546,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[PowerSource.Enums.BatChargeLevel]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[PowerSource.Enums.BatChargeLevelEnum]) - value: 'typing.Optional[PowerSource.Enums.BatChargeLevel]' = None + value: 'typing.Optional[PowerSource.Enums.BatChargeLevelEnum]' = None @dataclass class BatReplacementNeeded(ClusterAttributeDescriptor): @@ -6450,9 +6578,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[PowerSource.Enums.BatReplaceability]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[PowerSource.Enums.BatReplaceabilityEnum]) - value: 'typing.Optional[PowerSource.Enums.BatReplaceability]' = None + value: 'typing.Optional[PowerSource.Enums.BatReplaceabilityEnum]' = None @dataclass class BatPresent(ClusterAttributeDescriptor): @@ -6482,9 +6610,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[PowerSource.Enums.BatFault]]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[PowerSource.Enums.BatFaultEnum]]) - value: 'typing.Optional[typing.List[PowerSource.Enums.BatFault]]' = None + value: 'typing.Optional[typing.List[PowerSource.Enums.BatFaultEnum]]' = None @dataclass class BatReplacementDescription(ClusterAttributeDescriptor): @@ -6514,9 +6642,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[PowerSource.Enums.BatCommonDesignationEnum]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[PowerSource.Enums.BatCommonDesignationEnum]' = None @dataclass class BatANSIDesignation(ClusterAttributeDescriptor): @@ -6562,9 +6690,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[PowerSource.Enums.BatApprovedChemistryEnum]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[PowerSource.Enums.BatApprovedChemistryEnum]' = None @dataclass class BatCapacity(ClusterAttributeDescriptor): @@ -6610,9 +6738,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[PowerSource.Enums.BatChargeState]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[PowerSource.Enums.BatChargeStateEnum]) - value: 'typing.Optional[PowerSource.Enums.BatChargeState]' = None + value: 'typing.Optional[PowerSource.Enums.BatChargeStateEnum]' = None @dataclass class BatTimeToFullCharge(ClusterAttributeDescriptor): @@ -6674,9 +6802,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[PowerSource.Enums.BatChargeFault]]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[PowerSource.Enums.BatChargeFaultEnum]]) - value: 'typing.Optional[typing.List[PowerSource.Enums.BatChargeFault]]' = None + value: 'typing.Optional[typing.List[PowerSource.Enums.BatChargeFaultEnum]]' = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -6790,12 +6918,12 @@ def event_id(cls) -> int: def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="current", Tag=0, Type=typing.List[PowerSource.Enums.WiredFault]), - ClusterObjectFieldDescriptor(Label="previous", Tag=1, Type=typing.List[PowerSource.Enums.WiredFault]), + ClusterObjectFieldDescriptor(Label="current", Tag=0, Type=typing.List[PowerSource.Enums.WiredFaultEnum]), + ClusterObjectFieldDescriptor(Label="previous", Tag=1, Type=typing.List[PowerSource.Enums.WiredFaultEnum]), ]) - current: 'typing.List[PowerSource.Enums.WiredFault]' = field(default_factory=lambda: []) - previous: 'typing.List[PowerSource.Enums.WiredFault]' = field(default_factory=lambda: []) + current: 'typing.List[PowerSource.Enums.WiredFaultEnum]' = field(default_factory=lambda: []) + previous: 'typing.List[PowerSource.Enums.WiredFaultEnum]' = field(default_factory=lambda: []) @dataclass class BatFaultChange(ClusterEvent): @@ -6811,12 +6939,12 @@ def event_id(cls) -> int: def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="current", Tag=0, Type=typing.List[PowerSource.Enums.BatFault]), - ClusterObjectFieldDescriptor(Label="previous", Tag=1, Type=typing.List[PowerSource.Enums.BatFault]), + ClusterObjectFieldDescriptor(Label="current", Tag=0, Type=typing.List[PowerSource.Enums.BatFaultEnum]), + ClusterObjectFieldDescriptor(Label="previous", Tag=1, Type=typing.List[PowerSource.Enums.BatFaultEnum]), ]) - current: 'typing.List[PowerSource.Enums.BatFault]' = field(default_factory=lambda: []) - previous: 'typing.List[PowerSource.Enums.BatFault]' = field(default_factory=lambda: []) + current: 'typing.List[PowerSource.Enums.BatFaultEnum]' = field(default_factory=lambda: []) + previous: 'typing.List[PowerSource.Enums.BatFaultEnum]' = field(default_factory=lambda: []) @dataclass class BatChargeFaultChange(ClusterEvent): @@ -6832,12 +6960,12 @@ def event_id(cls) -> int: def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="current", Tag=0, Type=typing.List[PowerSource.Enums.BatChargeFault]), - ClusterObjectFieldDescriptor(Label="previous", Tag=1, Type=typing.List[PowerSource.Enums.BatChargeFault]), + ClusterObjectFieldDescriptor(Label="current", Tag=0, Type=typing.List[PowerSource.Enums.BatChargeFaultEnum]), + ClusterObjectFieldDescriptor(Label="previous", Tag=1, Type=typing.List[PowerSource.Enums.BatChargeFaultEnum]), ]) - current: 'typing.List[PowerSource.Enums.BatChargeFault]' = field(default_factory=lambda: []) - previous: 'typing.List[PowerSource.Enums.BatChargeFault]' = field(default_factory=lambda: []) + current: 'typing.List[PowerSource.Enums.BatChargeFaultEnum]' = field(default_factory=lambda: []) + previous: 'typing.List[PowerSource.Enums.BatChargeFaultEnum]' = field(default_factory=lambda: []) @dataclass diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index 3e0a06643b259b..90b2f38158f11a 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -3068,14 +3068,17 @@ UnitLocalization: - TempUnit PowerSource: - - BatChargeFault - - BatChargeLevel - - BatChargeState - - BatFault - - BatReplaceability - - PowerSourceStatus - - WiredCurrentType - - WiredFault + # All the PowerSource enums originally did not have the "Enum" + # suffix, but we generate the same API whether that suffix is + # there or not, so the names can just change here. + - BatChargeFaultEnum + - BatChargeLevelEnum + - BatChargeStateEnum + - BatFaultEnum + - BatReplaceabilityEnum + - PowerSourceStatusEnum + - WiredCurrentTypeEnum + - WiredFaultEnum GeneralCommissioning: - CommissioningError - RegulatoryLocationType @@ -3340,7 +3343,10 @@ - Celsius - Kelvin PowerSource: - BatChargeFault: + # All the PowerSource enums originally did not have the "Enum" + # suffix, but we generate the same API whether that suffix is + # there or not, so the names can just change here. + BatChargeFaultEnum: - Unspecfied - AmbientTooHot - AmbientTooCold @@ -3352,33 +3358,33 @@ - ChargerOverVoltage - ChargerUnderVoltage - SafetyTimeout - BatChargeLevel: + BatChargeLevelEnum: - Ok - Warning - Critical - BatChargeState: + BatChargeStateEnum: - Unknown - IsCharging - IsAtFullCharge - IsNotCharging - BatFault: + BatFaultEnum: - Unspecfied - OverTemp - UnderTemp - BatReplaceability: + BatReplaceabilityEnum: - Unspecified - NotReplaceable - UserReplaceable - FactoryReplaceable - PowerSourceStatus: + PowerSourceStatusEnum: - Unspecfied - Active - Standby - Unavailable - WiredCurrentType: + WiredCurrentTypeEnum: - AC - DC - WiredFault: + WiredFaultEnum: - Unspecfied - OverVoltage - UnderVoltage @@ -5501,11 +5507,11 @@ - CASE - Group PowerSource: - BatChargeLevel: + BatChargeLevelEnum: - OK - BatChargeFault: + BatChargeFaultEnum: - Unspecified - PowerSourceStatus: + PowerSourceStatusEnum: - Unspecified ThreadNetworkDiagnostics: ConnectionStatusEnum: @@ -6037,11 +6043,11 @@ CommissioningError: - Ok PowerSource: - BatChargeLevel: + BatChargeLevelEnum: - Ok - BatChargeFault: + BatChargeFaultEnum: - Unspecfied - PowerSourceStatus: + PowerSourceStatusEnum: - Unspecfied WiFiNetworkDiagnostics: WiFiVersionType: @@ -6417,11 +6423,11 @@ CommissioningError: OK: Ok PowerSource: - BatChargeLevel: + BatChargeLevelEnum: OK: Ok - BatChargeFault: + BatChargeFaultEnum: Unspecified: Unspecfied - PowerSourceStatus: + PowerSourceStatusEnum: Unspecified: Unspecfied WiFiNetworkDiagnostics: WiFiVersionType: @@ -6701,6 +6707,9 @@ PumpConfigurationAndControl: - ControlModeEnum - OperationModeEnum + PowerSource: + - BatCommonDesignationEnum + - BatApprovedChemistryEnum enum values: DoorLock: LockDataTypeEnum: @@ -6750,6 +6759,127 @@ - Minimum - Maximum - Local + PowerSource: + WiredFaultEnum: + - Unspecified + BatFaultEnum: + - Unspecified + BatCommonDesignationEnum: + - Unspecified + - AAA + - AA + - C + - D + - 4v5 + - 6v0 + - 9v0 + - 12AA + - AAAA + - A + - B + - F + - N + - No6 + - SubC + - A23 + - A27 + - BA5800 + - Duplex + - 4SR44 + - "523" + - "531" + - 15v0 + - 22v5 + - 30v0 + - 45v0 + - 67v5 + - J + - CR123A + - CR2 + - 2CR5 + - CRP2 + - CRV3 + - SR41 + - SR43 + - SR44 + - SR45 + - SR48 + - SR54 + - SR55 + - SR57 + - SR58 + - SR59 + - SR60 + - SR63 + - SR64 + - SR65 + - SR66 + - SR67 + - SR68 + - SR69 + - SR516 + - SR731 + - SR712 + - LR932 + - A5 + - A10 + - A13 + - A312 + - A675 + - AC41E + - "10180" + - "10280" + - "10440" + - "14250" + - "14430" + - "14500" + - "14650" + - "15270" + - "16340" + - RCR123A + - "17500" + - "17670" + - "18350" + - "18500" + - "18650" + - "19670" + - "25500" + - "26650" + - "32600" + BatApprovedChemistryEnum: + - Unspecified + - Alkaline + - LithiumCarbonFluoride + - LithiumChromiumOxide + - LithiumCopperOxide + - LithiumIronDisulfide + - LithiumManganeseDioxide + - LithiumThionylChloride + - Magnesium + - MercuryOxide + - NickelOxyhydride + - SilverOxide + - ZincAir + - ZincCarbon + - ZincChloride + - ZincManganeseDioxide + - LeadAcid + - LithiumCobaltOxide + - LithiumIon + - LithiumIonPolymer + - LithiumIronPhosphate + - LithiumSulfur + - LithiumTitanate + - NickelCadmium + - NickelHydrogen + - NickelIron + - NickelMetalHydride + - NickelZinc + - SilverZinc + - SodiumIon + - SodiumSulfur + - ZincBromide + - ZincCerium bitmaps: OccupancySensing: - OccupancyBitmap @@ -6796,6 +6926,12 @@ PumpConfigurationAndControl: - PumpControlMode - PumpOperationMode + enum values: + PowerSource: + WiredFaultEnum: + - Unspecfied + BatFaultEnum: + - Unspecfied bitmaps: PumpConfigurationAndControl: - PumpStatus @@ -6830,6 +6966,12 @@ PumpConfigurationAndControl: ControlModeEnum: PumpControlMode OperationModeEnum: PumpOperationMode + enum values: + PowerSource: + WiredFaultEnum: + Unspecified: Unspecfied + BatFaultEnum: + Unspecified: Unspecfied bitmaps: PumpConfigurationAndControl: PumpStatusBitmap: PumpStatus diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index 0ed3d414ea6251..8f75683725a6f2 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -4010,7 +4010,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:chip::to_underlying(cppValue)]; return value; } case Attributes::BatANSIDesignation::Id: { @@ -4043,7 +4043,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:chip::to_underlying(cppValue)]; return value; } case Attributes::BatCapacity::Id: { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 0a5ad245e5f3f9..c9ddb9f32a627a 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -19985,6 +19985,42 @@ typedef NS_OPTIONS(uint32_t, MTRUnitLocalizationFeature) { MTRUnitLocalizationFeatureTemperatureUnit API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint16_t, MTRPowerSourceBatApprovedChemistry) { + MTRPowerSourceBatApprovedChemistryUnspecified MTR_NEWLY_AVAILABLE = 0x00, + MTRPowerSourceBatApprovedChemistryAlkaline MTR_NEWLY_AVAILABLE = 0x01, + MTRPowerSourceBatApprovedChemistryLithiumCarbonFluoride MTR_NEWLY_AVAILABLE = 0x02, + MTRPowerSourceBatApprovedChemistryLithiumChromiumOxide MTR_NEWLY_AVAILABLE = 0x03, + MTRPowerSourceBatApprovedChemistryLithiumCopperOxide MTR_NEWLY_AVAILABLE = 0x04, + MTRPowerSourceBatApprovedChemistryLithiumIronDisulfide MTR_NEWLY_AVAILABLE = 0x05, + MTRPowerSourceBatApprovedChemistryLithiumManganeseDioxide MTR_NEWLY_AVAILABLE = 0x06, + MTRPowerSourceBatApprovedChemistryLithiumThionylChloride MTR_NEWLY_AVAILABLE = 0x07, + MTRPowerSourceBatApprovedChemistryMagnesium MTR_NEWLY_AVAILABLE = 0x08, + MTRPowerSourceBatApprovedChemistryMercuryOxide MTR_NEWLY_AVAILABLE = 0x09, + MTRPowerSourceBatApprovedChemistryNickelOxyhydride MTR_NEWLY_AVAILABLE = 0x0A, + MTRPowerSourceBatApprovedChemistrySilverOxide MTR_NEWLY_AVAILABLE = 0x0B, + MTRPowerSourceBatApprovedChemistryZincAir MTR_NEWLY_AVAILABLE = 0x0C, + MTRPowerSourceBatApprovedChemistryZincCarbon MTR_NEWLY_AVAILABLE = 0x0D, + MTRPowerSourceBatApprovedChemistryZincChloride MTR_NEWLY_AVAILABLE = 0x0E, + MTRPowerSourceBatApprovedChemistryZincManganeseDioxide MTR_NEWLY_AVAILABLE = 0x0F, + MTRPowerSourceBatApprovedChemistryLeadAcid MTR_NEWLY_AVAILABLE = 0x10, + MTRPowerSourceBatApprovedChemistryLithiumCobaltOxide MTR_NEWLY_AVAILABLE = 0x11, + MTRPowerSourceBatApprovedChemistryLithiumIon MTR_NEWLY_AVAILABLE = 0x12, + MTRPowerSourceBatApprovedChemistryLithiumIonPolymer MTR_NEWLY_AVAILABLE = 0x13, + MTRPowerSourceBatApprovedChemistryLithiumIronPhosphate MTR_NEWLY_AVAILABLE = 0x14, + MTRPowerSourceBatApprovedChemistryLithiumSulfur MTR_NEWLY_AVAILABLE = 0x15, + MTRPowerSourceBatApprovedChemistryLithiumTitanate MTR_NEWLY_AVAILABLE = 0x16, + MTRPowerSourceBatApprovedChemistryNickelCadmium MTR_NEWLY_AVAILABLE = 0x17, + MTRPowerSourceBatApprovedChemistryNickelHydrogen MTR_NEWLY_AVAILABLE = 0x18, + MTRPowerSourceBatApprovedChemistryNickelIron MTR_NEWLY_AVAILABLE = 0x19, + MTRPowerSourceBatApprovedChemistryNickelMetalHydride MTR_NEWLY_AVAILABLE = 0x1A, + MTRPowerSourceBatApprovedChemistryNickelZinc MTR_NEWLY_AVAILABLE = 0x1B, + MTRPowerSourceBatApprovedChemistrySilverZinc MTR_NEWLY_AVAILABLE = 0x1C, + MTRPowerSourceBatApprovedChemistrySodiumIon MTR_NEWLY_AVAILABLE = 0x1D, + MTRPowerSourceBatApprovedChemistrySodiumSulfur MTR_NEWLY_AVAILABLE = 0x1E, + MTRPowerSourceBatApprovedChemistryZincBromide MTR_NEWLY_AVAILABLE = 0x1F, + MTRPowerSourceBatApprovedChemistryZincCerium MTR_NEWLY_AVAILABLE = 0x20, +} MTR_NEWLY_AVAILABLE; + typedef NS_ENUM(uint8_t, MTRPowerSourceBatChargeFault) { MTRPowerSourceBatChargeFaultUnspecified API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, MTRPowerSourceBatChargeFaultUnspecfied API_DEPRECATED("Please use MTRPowerSourceBatChargeFaultUnspecified", ios(16.1, 16.4), @@ -20018,8 +20054,95 @@ typedef NS_ENUM(uint8_t, MTRPowerSourceBatChargeState) { MTRPowerSourceBatChargeStateIsNotCharging API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint16_t, MTRPowerSourceBatCommonDesignation) { + MTRPowerSourceBatCommonDesignationUnspecified MTR_NEWLY_AVAILABLE = 0x00, + MTRPowerSourceBatCommonDesignationAAA MTR_NEWLY_AVAILABLE = 0x01, + MTRPowerSourceBatCommonDesignationAA MTR_NEWLY_AVAILABLE = 0x02, + MTRPowerSourceBatCommonDesignationC MTR_NEWLY_AVAILABLE = 0x03, + MTRPowerSourceBatCommonDesignationD MTR_NEWLY_AVAILABLE = 0x04, + MTRPowerSourceBatCommonDesignation4v5 MTR_NEWLY_AVAILABLE = 0x05, + MTRPowerSourceBatCommonDesignation6v0 MTR_NEWLY_AVAILABLE = 0x06, + MTRPowerSourceBatCommonDesignation9v0 MTR_NEWLY_AVAILABLE = 0x07, + MTRPowerSourceBatCommonDesignation12AA MTR_NEWLY_AVAILABLE = 0x08, + MTRPowerSourceBatCommonDesignationAAAA MTR_NEWLY_AVAILABLE = 0x09, + MTRPowerSourceBatCommonDesignationA MTR_NEWLY_AVAILABLE = 0x0A, + MTRPowerSourceBatCommonDesignationB MTR_NEWLY_AVAILABLE = 0x0B, + MTRPowerSourceBatCommonDesignationF MTR_NEWLY_AVAILABLE = 0x0C, + MTRPowerSourceBatCommonDesignationN MTR_NEWLY_AVAILABLE = 0x0D, + MTRPowerSourceBatCommonDesignationNo6 MTR_NEWLY_AVAILABLE = 0x0E, + MTRPowerSourceBatCommonDesignationSubC MTR_NEWLY_AVAILABLE = 0x0F, + MTRPowerSourceBatCommonDesignationA23 MTR_NEWLY_AVAILABLE = 0x10, + MTRPowerSourceBatCommonDesignationA27 MTR_NEWLY_AVAILABLE = 0x11, + MTRPowerSourceBatCommonDesignationBA5800 MTR_NEWLY_AVAILABLE = 0x12, + MTRPowerSourceBatCommonDesignationDuplex MTR_NEWLY_AVAILABLE = 0x13, + MTRPowerSourceBatCommonDesignation4SR44 MTR_NEWLY_AVAILABLE = 0x14, + MTRPowerSourceBatCommonDesignation523 MTR_NEWLY_AVAILABLE = 0x15, + MTRPowerSourceBatCommonDesignation531 MTR_NEWLY_AVAILABLE = 0x16, + MTRPowerSourceBatCommonDesignation15v0 MTR_NEWLY_AVAILABLE = 0x17, + MTRPowerSourceBatCommonDesignation22v5 MTR_NEWLY_AVAILABLE = 0x18, + MTRPowerSourceBatCommonDesignation30v0 MTR_NEWLY_AVAILABLE = 0x19, + MTRPowerSourceBatCommonDesignation45v0 MTR_NEWLY_AVAILABLE = 0x1A, + MTRPowerSourceBatCommonDesignation67v5 MTR_NEWLY_AVAILABLE = 0x1B, + MTRPowerSourceBatCommonDesignationJ MTR_NEWLY_AVAILABLE = 0x1C, + MTRPowerSourceBatCommonDesignationCR123A MTR_NEWLY_AVAILABLE = 0x1D, + MTRPowerSourceBatCommonDesignationCR2 MTR_NEWLY_AVAILABLE = 0x1E, + MTRPowerSourceBatCommonDesignation2CR5 MTR_NEWLY_AVAILABLE = 0x1F, + MTRPowerSourceBatCommonDesignationCRP2 MTR_NEWLY_AVAILABLE = 0x20, + MTRPowerSourceBatCommonDesignationCRV3 MTR_NEWLY_AVAILABLE = 0x21, + MTRPowerSourceBatCommonDesignationSR41 MTR_NEWLY_AVAILABLE = 0x22, + MTRPowerSourceBatCommonDesignationSR43 MTR_NEWLY_AVAILABLE = 0x23, + MTRPowerSourceBatCommonDesignationSR44 MTR_NEWLY_AVAILABLE = 0x24, + MTRPowerSourceBatCommonDesignationSR45 MTR_NEWLY_AVAILABLE = 0x25, + MTRPowerSourceBatCommonDesignationSR48 MTR_NEWLY_AVAILABLE = 0x26, + MTRPowerSourceBatCommonDesignationSR54 MTR_NEWLY_AVAILABLE = 0x27, + MTRPowerSourceBatCommonDesignationSR55 MTR_NEWLY_AVAILABLE = 0x28, + MTRPowerSourceBatCommonDesignationSR57 MTR_NEWLY_AVAILABLE = 0x29, + MTRPowerSourceBatCommonDesignationSR58 MTR_NEWLY_AVAILABLE = 0x2A, + MTRPowerSourceBatCommonDesignationSR59 MTR_NEWLY_AVAILABLE = 0x2B, + MTRPowerSourceBatCommonDesignationSR60 MTR_NEWLY_AVAILABLE = 0x2C, + MTRPowerSourceBatCommonDesignationSR63 MTR_NEWLY_AVAILABLE = 0x2D, + MTRPowerSourceBatCommonDesignationSR64 MTR_NEWLY_AVAILABLE = 0x2E, + MTRPowerSourceBatCommonDesignationSR65 MTR_NEWLY_AVAILABLE = 0x2F, + MTRPowerSourceBatCommonDesignationSR66 MTR_NEWLY_AVAILABLE = 0x30, + MTRPowerSourceBatCommonDesignationSR67 MTR_NEWLY_AVAILABLE = 0x31, + MTRPowerSourceBatCommonDesignationSR68 MTR_NEWLY_AVAILABLE = 0x32, + MTRPowerSourceBatCommonDesignationSR69 MTR_NEWLY_AVAILABLE = 0x33, + MTRPowerSourceBatCommonDesignationSR516 MTR_NEWLY_AVAILABLE = 0x34, + MTRPowerSourceBatCommonDesignationSR731 MTR_NEWLY_AVAILABLE = 0x35, + MTRPowerSourceBatCommonDesignationSR712 MTR_NEWLY_AVAILABLE = 0x36, + MTRPowerSourceBatCommonDesignationLR932 MTR_NEWLY_AVAILABLE = 0x37, + MTRPowerSourceBatCommonDesignationA5 MTR_NEWLY_AVAILABLE = 0x38, + MTRPowerSourceBatCommonDesignationA10 MTR_NEWLY_AVAILABLE = 0x39, + MTRPowerSourceBatCommonDesignationA13 MTR_NEWLY_AVAILABLE = 0x3A, + MTRPowerSourceBatCommonDesignationA312 MTR_NEWLY_AVAILABLE = 0x3B, + MTRPowerSourceBatCommonDesignationA675 MTR_NEWLY_AVAILABLE = 0x3C, + MTRPowerSourceBatCommonDesignationAC41E MTR_NEWLY_AVAILABLE = 0x3D, + MTRPowerSourceBatCommonDesignation10180 MTR_NEWLY_AVAILABLE = 0x3E, + MTRPowerSourceBatCommonDesignation10280 MTR_NEWLY_AVAILABLE = 0x3F, + MTRPowerSourceBatCommonDesignation10440 MTR_NEWLY_AVAILABLE = 0x40, + MTRPowerSourceBatCommonDesignation14250 MTR_NEWLY_AVAILABLE = 0x41, + MTRPowerSourceBatCommonDesignation14430 MTR_NEWLY_AVAILABLE = 0x42, + MTRPowerSourceBatCommonDesignation14500 MTR_NEWLY_AVAILABLE = 0x43, + MTRPowerSourceBatCommonDesignation14650 MTR_NEWLY_AVAILABLE = 0x44, + MTRPowerSourceBatCommonDesignation15270 MTR_NEWLY_AVAILABLE = 0x45, + MTRPowerSourceBatCommonDesignation16340 MTR_NEWLY_AVAILABLE = 0x46, + MTRPowerSourceBatCommonDesignationRCR123A MTR_NEWLY_AVAILABLE = 0x47, + MTRPowerSourceBatCommonDesignation17500 MTR_NEWLY_AVAILABLE = 0x48, + MTRPowerSourceBatCommonDesignation17670 MTR_NEWLY_AVAILABLE = 0x49, + MTRPowerSourceBatCommonDesignation18350 MTR_NEWLY_AVAILABLE = 0x4A, + MTRPowerSourceBatCommonDesignation18500 MTR_NEWLY_AVAILABLE = 0x4B, + MTRPowerSourceBatCommonDesignation18650 MTR_NEWLY_AVAILABLE = 0x4C, + MTRPowerSourceBatCommonDesignation19670 MTR_NEWLY_AVAILABLE = 0x4D, + MTRPowerSourceBatCommonDesignation25500 MTR_NEWLY_AVAILABLE = 0x4E, + MTRPowerSourceBatCommonDesignation26650 MTR_NEWLY_AVAILABLE = 0x4F, + MTRPowerSourceBatCommonDesignation32600 MTR_NEWLY_AVAILABLE = 0x50, +} MTR_NEWLY_AVAILABLE; + typedef NS_ENUM(uint8_t, MTRPowerSourceBatFault) { - MTRPowerSourceBatFaultUnspecfied API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRPowerSourceBatFaultUnspecified MTR_NEWLY_AVAILABLE = 0x00, + MTRPowerSourceBatFaultUnspecfied API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRPowerSourceBatFaultUnspecified") + = 0x00, MTRPowerSourceBatFaultOverTemp API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, MTRPowerSourceBatFaultUnderTemp API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -20047,7 +20170,10 @@ typedef NS_ENUM(uint8_t, MTRPowerSourceWiredCurrentType) { } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_ENUM(uint8_t, MTRPowerSourceWiredFault) { - MTRPowerSourceWiredFaultUnspecfied API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRPowerSourceWiredFaultUnspecified MTR_NEWLY_AVAILABLE = 0x00, + MTRPowerSourceWiredFaultUnspecfied API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRPowerSourceWiredFaultUnspecified") + = 0x00, MTRPowerSourceWiredFaultOverVoltage API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, MTRPowerSourceWiredFaultUnderVoltage API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 087b588ccfe506..48560bf1959926 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -20550,7 +20550,7 @@ - (void)readAttributeStatusWithCompletion:(void (^)(NSNumber * _Nullable value, { MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::Status::TypeInfo; - return MTRReadAttribute( + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -20559,7 +20559,7 @@ - (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams * _Nonnull)params reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::Status::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -20569,9 +20569,9 @@ + (void)readAttributeStatusWithClusterStateCache:(MTRClusterStateCacheContainer queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPowerSourceClusterPowerSourceStatusAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRPowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PowerSourceClusterPowerSourceStatusAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(PowerSourceClusterPowerSourceStatusEnumAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; using TypeInfo = PowerSource::Attributes::Status::TypeInfo; @@ -20771,7 +20771,7 @@ - (void)readAttributeWiredCurrentTypeWithCompletion:(void (^)(NSNumber * _Nullab { MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; - return MTRReadAttribute( + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -20780,7 +20780,7 @@ - (void)subscribeAttributeWiredCurrentTypeWithParams:(MTRSubscribeParams * _Nonn reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -20791,9 +20791,9 @@ + (void)readAttributeWiredCurrentTypeWithClusterStateCache:(MTRClusterStateCache completion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRPowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PowerSourceClusterWiredCurrentTypeAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(PowerSourceClusterWiredCurrentTypeEnumAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; @@ -21169,7 +21169,7 @@ - (void)readAttributeBatChargeLevelWithCompletion:(void (^)(NSNumber * _Nullable { MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::BatChargeLevel::TypeInfo; - return MTRReadAttribute( + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21178,7 +21178,7 @@ - (void)subscribeAttributeBatChargeLevelWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::BatChargeLevel::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21188,9 +21188,9 @@ + (void)readAttributeBatChargeLevelWithClusterStateCache:(MTRClusterStateCacheCo queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPowerSourceClusterBatChargeLevelAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRPowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PowerSourceClusterBatChargeLevelAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(PowerSourceClusterBatChargeLevelEnumAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; using TypeInfo = PowerSource::Attributes::BatChargeLevel::TypeInfo; @@ -21257,7 +21257,7 @@ - (void)readAttributeBatReplaceabilityWithCompletion:(void (^)(NSNumber * _Nulla { MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::BatReplaceability::TypeInfo; - return MTRReadAttribute( + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21266,7 +21266,7 @@ - (void)subscribeAttributeBatReplaceabilityWithParams:(MTRSubscribeParams * _Non reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::BatReplaceability::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21277,9 +21277,9 @@ + (void)readAttributeBatReplaceabilityWithClusterStateCache:(MTRClusterStateCach completion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRPowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PowerSourceClusterBatReplaceabilityAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(PowerSourceClusterBatReplaceabilityEnumAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; using TypeInfo = PowerSource::Attributes::BatReplaceability::TypeInfo; @@ -21433,7 +21433,8 @@ - (void)readAttributeBatCommonDesignationWithCompletion:(void (^)(NSNumber * _Nu { MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::BatCommonDesignation::TypeInfo; - return MTRReadAttribute( + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21443,9 +21444,9 @@ - (void)subscribeAttributeBatCommonDesignationWithParams:(MTRSubscribeParams * _ (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::BatCommonDesignation::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeBatCommonDesignationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -21454,9 +21455,9 @@ + (void)readAttributeBatCommonDesignationWithClusterStateCache:(MTRClusterStateC completion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRPowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(PowerSourceClusterBatCommonDesignationEnumAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; using TypeInfo = PowerSource::Attributes::BatCommonDesignation::TypeInfo; @@ -21567,7 +21568,8 @@ - (void)readAttributeBatApprovedChemistryWithCompletion:(void (^)(NSNumber * _Nu { MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::BatApprovedChemistry::TypeInfo; - return MTRReadAttribute( + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21577,9 +21579,9 @@ - (void)subscribeAttributeBatApprovedChemistryWithParams:(MTRSubscribeParams * _ (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::BatApprovedChemistry::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeBatApprovedChemistryWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -21588,9 +21590,9 @@ + (void)readAttributeBatApprovedChemistryWithClusterStateCache:(MTRClusterStateC completion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRPowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(PowerSourceClusterBatApprovedChemistryEnumAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; using TypeInfo = PowerSource::Attributes::BatApprovedChemistry::TypeInfo; @@ -21698,7 +21700,7 @@ - (void)readAttributeBatChargeStateWithCompletion:(void (^)(NSNumber * _Nullable { MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::BatChargeState::TypeInfo; - return MTRReadAttribute( + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21707,7 +21709,7 @@ - (void)subscribeAttributeBatChargeStateWithParams:(MTRSubscribeParams * _Nonnul reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = PowerSource::Attributes::BatChargeState::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21717,9 +21719,9 @@ + (void)readAttributeBatChargeStateWithClusterStateCache:(MTRClusterStateCacheCo queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRPowerSourceClusterBatChargeStateAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRPowerSourceClusterBatChargeStateEnumAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(PowerSourceClusterBatChargeStateAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(PowerSourceClusterBatChargeStateEnumAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; using TypeInfo = PowerSource::Attributes::BatChargeState::TypeInfo; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h index b5759a2a17d698..df43e676bf6f75 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h @@ -226,30 +226,41 @@ typedef void (*NullableTimeFormatLocalizationClusterHourFormatAttributeCallback) typedef void (*UnitLocalizationClusterTempUnitAttributeCallback)(void *, chip::app::Clusters::UnitLocalization::TempUnit); typedef void (*NullableUnitLocalizationClusterTempUnitAttributeCallback)( void *, const chip::app::DataModel::Nullable &); -typedef void (*PowerSourceClusterBatChargeFaultAttributeCallback)(void *, chip::app::Clusters::PowerSource::BatChargeFault); -typedef void (*NullablePowerSourceClusterBatChargeFaultAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*PowerSourceClusterBatChargeLevelAttributeCallback)(void *, chip::app::Clusters::PowerSource::BatChargeLevel); -typedef void (*NullablePowerSourceClusterBatChargeLevelAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*PowerSourceClusterBatChargeStateAttributeCallback)(void *, chip::app::Clusters::PowerSource::BatChargeState); -typedef void (*NullablePowerSourceClusterBatChargeStateAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*PowerSourceClusterBatFaultAttributeCallback)(void *, chip::app::Clusters::PowerSource::BatFault); -typedef void (*NullablePowerSourceClusterBatFaultAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*PowerSourceClusterBatReplaceabilityAttributeCallback)(void *, chip::app::Clusters::PowerSource::BatReplaceability); -typedef void (*NullablePowerSourceClusterBatReplaceabilityAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*PowerSourceClusterPowerSourceStatusAttributeCallback)(void *, chip::app::Clusters::PowerSource::PowerSourceStatus); -typedef void (*NullablePowerSourceClusterPowerSourceStatusAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*PowerSourceClusterWiredCurrentTypeAttributeCallback)(void *, chip::app::Clusters::PowerSource::WiredCurrentType); -typedef void (*NullablePowerSourceClusterWiredCurrentTypeAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*PowerSourceClusterWiredFaultAttributeCallback)(void *, chip::app::Clusters::PowerSource::WiredFault); -typedef void (*NullablePowerSourceClusterWiredFaultAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); +typedef void (*PowerSourceClusterBatApprovedChemistryEnumAttributeCallback)( + void *, chip::app::Clusters::PowerSource::BatApprovedChemistryEnum); +typedef void (*NullablePowerSourceClusterBatApprovedChemistryEnumAttributeCallback)( + void *, const chip::app::DataModel::Nullable &); +typedef void (*PowerSourceClusterBatChargeFaultEnumAttributeCallback)(void *, chip::app::Clusters::PowerSource::BatChargeFaultEnum); +typedef void (*NullablePowerSourceClusterBatChargeFaultEnumAttributeCallback)( + void *, const chip::app::DataModel::Nullable &); +typedef void (*PowerSourceClusterBatChargeLevelEnumAttributeCallback)(void *, chip::app::Clusters::PowerSource::BatChargeLevelEnum); +typedef void (*NullablePowerSourceClusterBatChargeLevelEnumAttributeCallback)( + void *, const chip::app::DataModel::Nullable &); +typedef void (*PowerSourceClusterBatChargeStateEnumAttributeCallback)(void *, chip::app::Clusters::PowerSource::BatChargeStateEnum); +typedef void (*NullablePowerSourceClusterBatChargeStateEnumAttributeCallback)( + void *, const chip::app::DataModel::Nullable &); +typedef void (*PowerSourceClusterBatCommonDesignationEnumAttributeCallback)( + void *, chip::app::Clusters::PowerSource::BatCommonDesignationEnum); +typedef void (*NullablePowerSourceClusterBatCommonDesignationEnumAttributeCallback)( + void *, const chip::app::DataModel::Nullable &); +typedef void (*PowerSourceClusterBatFaultEnumAttributeCallback)(void *, chip::app::Clusters::PowerSource::BatFaultEnum); +typedef void (*NullablePowerSourceClusterBatFaultEnumAttributeCallback)( + void *, const chip::app::DataModel::Nullable &); +typedef void (*PowerSourceClusterBatReplaceabilityEnumAttributeCallback)(void *, + chip::app::Clusters::PowerSource::BatReplaceabilityEnum); +typedef void (*NullablePowerSourceClusterBatReplaceabilityEnumAttributeCallback)( + void *, const chip::app::DataModel::Nullable &); +typedef void (*PowerSourceClusterPowerSourceStatusEnumAttributeCallback)(void *, + chip::app::Clusters::PowerSource::PowerSourceStatusEnum); +typedef void (*NullablePowerSourceClusterPowerSourceStatusEnumAttributeCallback)( + void *, const chip::app::DataModel::Nullable &); +typedef void (*PowerSourceClusterWiredCurrentTypeEnumAttributeCallback)(void *, + chip::app::Clusters::PowerSource::WiredCurrentTypeEnum); +typedef void (*NullablePowerSourceClusterWiredCurrentTypeEnumAttributeCallback)( + void *, const chip::app::DataModel::Nullable &); +typedef void (*PowerSourceClusterWiredFaultEnumAttributeCallback)(void *, chip::app::Clusters::PowerSource::WiredFaultEnum); +typedef void (*NullablePowerSourceClusterWiredFaultEnumAttributeCallback)( + void *, const chip::app::DataModel::Nullable &); typedef void (*GeneralCommissioningClusterCommissioningErrorAttributeCallback)( void *, chip::app::Clusters::GeneralCommissioning::CommissioningError); typedef void (*NullableGeneralCommissioningClusterCommissioningErrorAttributeCallback)( @@ -722,11 +733,11 @@ typedef void (*PowerSourceConfigurationEventListListAttributeCallback)( typedef void (*PowerSourceConfigurationAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*PowerSourceActiveWiredFaultsListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*PowerSourceActiveBatFaultsListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*PowerSourceActiveBatChargeFaultsListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*PowerSourceGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*PowerSourceAcceptedCommandListListAttributeCallback)( @@ -4919,7 +4930,7 @@ class MTRPowerSourceActiveWiredFaultsListAttributeCallbackBridge MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value); + const chip::app::DataModel::DecodableList & value); }; class MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge @@ -4953,7 +4964,7 @@ class MTRPowerSourceActiveBatFaultsListAttributeCallbackBridge MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value); + const chip::app::DataModel::DecodableList & value); }; class MTRPowerSourceActiveBatFaultsListAttributeCallbackSubscriptionBridge @@ -4986,8 +4997,9 @@ class MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackBridge MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value); + static void + OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & value); }; class MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge @@ -15623,533 +15635,675 @@ class MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBri MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRPowerSourceClusterBatChargeFaultAttributeCallbackBridge - : public MTRCallbackBridge +class MTRPowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRPowerSourceClusterBatChargeFaultAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRPowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPowerSourceClusterBatChargeFaultAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRPowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::BatChargeFault value); + static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::BatApprovedChemistryEnum value); }; -class MTRPowerSourceClusterBatChargeFaultAttributeCallbackSubscriptionBridge - : public MTRPowerSourceClusterBatChargeFaultAttributeCallbackBridge +class MTRPowerSourceClusterBatApprovedChemistryEnumAttributeCallbackSubscriptionBridge + : public MTRPowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge { public: - MTRPowerSourceClusterBatChargeFaultAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPowerSourceClusterBatChargeFaultAttributeCallbackBridge(queue, handler, action), + MTRPowerSourceClusterBatApprovedChemistryEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRPowerSourceClusterBatChargeFaultAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPowerSourceClusterBatChargeFaultAttributeCallbackBridge::OnDone; + using MTRPowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullablePowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullablePowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullablePowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; + + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); +}; + +class MTRNullablePowerSourceClusterBatApprovedChemistryEnumAttributeCallbackSubscriptionBridge + : public MTRNullablePowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge +{ +public: + MTRNullablePowerSourceClusterBatApprovedChemistryEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullablePowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRNullablePowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullablePowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRPowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRPowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRPowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::BatChargeFaultEnum value); +}; + +class MTRPowerSourceClusterBatChargeFaultEnumAttributeCallbackSubscriptionBridge + : public MTRPowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge +{ +public: + MTRPowerSourceClusterBatChargeFaultEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRPowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRNullablePowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRNullablePowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRNullablePowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge(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 MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackSubscriptionBridge - : public MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackBridge +class MTRNullablePowerSourceClusterBatChargeFaultEnumAttributeCallbackSubscriptionBridge + : public MTRNullablePowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge { public: - MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackSubscriptionBridge( + MTRNullablePowerSourceClusterBatChargeFaultEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackBridge(queue, handler, action), + MTRNullablePowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackBridge::OnDone; + using MTRNullablePowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullablePowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRPowerSourceClusterBatChargeLevelAttributeCallbackBridge - : public MTRCallbackBridge +class MTRPowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRPowerSourceClusterBatChargeLevelAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRPowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPowerSourceClusterBatChargeLevelAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRPowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::BatChargeLevel value); + static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::BatChargeLevelEnum value); }; -class MTRPowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge - : public MTRPowerSourceClusterBatChargeLevelAttributeCallbackBridge +class MTRPowerSourceClusterBatChargeLevelEnumAttributeCallbackSubscriptionBridge + : public MTRPowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge { public: - MTRPowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPowerSourceClusterBatChargeLevelAttributeCallbackBridge(queue, handler, action), + MTRPowerSourceClusterBatChargeLevelEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRPowerSourceClusterBatChargeLevelAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPowerSourceClusterBatChargeLevelAttributeCallbackBridge::OnDone; + using MTRPowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullablePowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullablePowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullablePowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge(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 MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge - : public MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackBridge +class MTRNullablePowerSourceClusterBatChargeLevelEnumAttributeCallbackSubscriptionBridge + : public MTRNullablePowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge { public: - MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge( + MTRNullablePowerSourceClusterBatChargeLevelEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackBridge(queue, handler, action), + MTRNullablePowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackBridge::OnDone; + using MTRNullablePowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullablePowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRPowerSourceClusterBatChargeStateAttributeCallbackBridge - : public MTRCallbackBridge +class MTRPowerSourceClusterBatChargeStateEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRPowerSourceClusterBatChargeStateAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRPowerSourceClusterBatChargeStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPowerSourceClusterBatChargeStateAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRPowerSourceClusterBatChargeStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::BatChargeState value); + static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::BatChargeStateEnum value); }; -class MTRPowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge - : public MTRPowerSourceClusterBatChargeStateAttributeCallbackBridge +class MTRPowerSourceClusterBatChargeStateEnumAttributeCallbackSubscriptionBridge + : public MTRPowerSourceClusterBatChargeStateEnumAttributeCallbackBridge { public: - MTRPowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPowerSourceClusterBatChargeStateAttributeCallbackBridge(queue, handler, action), + MTRPowerSourceClusterBatChargeStateEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPowerSourceClusterBatChargeStateEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRPowerSourceClusterBatChargeStateAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPowerSourceClusterBatChargeStateAttributeCallbackBridge::OnDone; + using MTRPowerSourceClusterBatChargeStateEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceClusterBatChargeStateEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullablePowerSourceClusterBatChargeStateEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullablePowerSourceClusterBatChargeStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullablePowerSourceClusterBatChargeStateEnumAttributeCallbackBridge(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 MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge - : public MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackBridge +class MTRNullablePowerSourceClusterBatChargeStateEnumAttributeCallbackSubscriptionBridge + : public MTRNullablePowerSourceClusterBatChargeStateEnumAttributeCallbackBridge { public: - MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge( + MTRNullablePowerSourceClusterBatChargeStateEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackBridge(queue, handler, action), + MTRNullablePowerSourceClusterBatChargeStateEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackBridge::OnDone; + using MTRNullablePowerSourceClusterBatChargeStateEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullablePowerSourceClusterBatChargeStateEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRPowerSourceClusterBatFaultAttributeCallbackBridge : public MTRCallbackBridge +class MTRPowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRPowerSourceClusterBatFaultAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRPowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPowerSourceClusterBatFaultAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRPowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::BatFault value); + static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::BatCommonDesignationEnum value); }; -class MTRPowerSourceClusterBatFaultAttributeCallbackSubscriptionBridge : public MTRPowerSourceClusterBatFaultAttributeCallbackBridge +class MTRPowerSourceClusterBatCommonDesignationEnumAttributeCallbackSubscriptionBridge + : public MTRPowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge { public: - MTRPowerSourceClusterBatFaultAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPowerSourceClusterBatFaultAttributeCallbackBridge(queue, handler, action), + MTRPowerSourceClusterBatCommonDesignationEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRPowerSourceClusterBatFaultAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPowerSourceClusterBatFaultAttributeCallbackBridge::OnDone; + using MTRPowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullablePowerSourceClusterBatFaultAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullablePowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullablePowerSourceClusterBatFaultAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullablePowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullablePowerSourceClusterBatFaultAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullablePowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; + + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); +}; + +class MTRNullablePowerSourceClusterBatCommonDesignationEnumAttributeCallbackSubscriptionBridge + : public MTRNullablePowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge +{ +public: + MTRNullablePowerSourceClusterBatCommonDesignationEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullablePowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRNullablePowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullablePowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRPowerSourceClusterBatFaultEnumAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRPowerSourceClusterBatFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRPowerSourceClusterBatFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::BatFaultEnum value); +}; + +class MTRPowerSourceClusterBatFaultEnumAttributeCallbackSubscriptionBridge + : public MTRPowerSourceClusterBatFaultEnumAttributeCallbackBridge +{ +public: + MTRPowerSourceClusterBatFaultEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPowerSourceClusterBatFaultEnumAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRPowerSourceClusterBatFaultEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceClusterBatFaultEnumAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRNullablePowerSourceClusterBatFaultEnumAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRNullablePowerSourceClusterBatFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRNullablePowerSourceClusterBatFaultEnumAttributeCallbackBridge(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 MTRNullablePowerSourceClusterBatFaultAttributeCallbackSubscriptionBridge - : public MTRNullablePowerSourceClusterBatFaultAttributeCallbackBridge +class MTRNullablePowerSourceClusterBatFaultEnumAttributeCallbackSubscriptionBridge + : public MTRNullablePowerSourceClusterBatFaultEnumAttributeCallbackBridge { public: - MTRNullablePowerSourceClusterBatFaultAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePowerSourceClusterBatFaultAttributeCallbackBridge(queue, handler, action), + MTRNullablePowerSourceClusterBatFaultEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullablePowerSourceClusterBatFaultEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullablePowerSourceClusterBatFaultAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullablePowerSourceClusterBatFaultAttributeCallbackBridge::OnDone; + using MTRNullablePowerSourceClusterBatFaultEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullablePowerSourceClusterBatFaultEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge - : public MTRCallbackBridge +class MTRPowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRPowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRPowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::BatReplaceability value); + static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::BatReplaceabilityEnum value); }; -class MTRPowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge - : public MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge +class MTRPowerSourceClusterBatReplaceabilityEnumAttributeCallbackSubscriptionBridge + : public MTRPowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge { public: - MTRPowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge( + MTRPowerSourceClusterBatReplaceabilityEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge(queue, handler, action), + MTRPowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge::OnDone; + using MTRPowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullablePowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullablePowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullablePowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge(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 MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge - : public MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackBridge +class MTRNullablePowerSourceClusterBatReplaceabilityEnumAttributeCallbackSubscriptionBridge + : public MTRNullablePowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge { public: - MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge( + MTRNullablePowerSourceClusterBatReplaceabilityEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackBridge(queue, handler, action), + MTRNullablePowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackBridge::OnDone; + using MTRNullablePowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullablePowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRPowerSourceClusterPowerSourceStatusAttributeCallbackBridge - : public MTRCallbackBridge +class MTRPowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRPowerSourceClusterPowerSourceStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRPowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPowerSourceClusterPowerSourceStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRPowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::PowerSourceStatus value); + static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::PowerSourceStatusEnum value); }; -class MTRPowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge - : public MTRPowerSourceClusterPowerSourceStatusAttributeCallbackBridge +class MTRPowerSourceClusterPowerSourceStatusEnumAttributeCallbackSubscriptionBridge + : public MTRPowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge { public: - MTRPowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge( + MTRPowerSourceClusterPowerSourceStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPowerSourceClusterPowerSourceStatusAttributeCallbackBridge(queue, handler, action), + MTRPowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRPowerSourceClusterPowerSourceStatusAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPowerSourceClusterPowerSourceStatusAttributeCallbackBridge::OnDone; + using MTRPowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullablePowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullablePowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullablePowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge(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 MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge - : public MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackBridge +class MTRNullablePowerSourceClusterPowerSourceStatusEnumAttributeCallbackSubscriptionBridge + : public MTRNullablePowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge { public: - MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge( + MTRNullablePowerSourceClusterPowerSourceStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackBridge(queue, handler, action), + MTRNullablePowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackBridge::OnDone; + using MTRNullablePowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullablePowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRPowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRPowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRPowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::WiredCurrentType value); + static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::WiredCurrentTypeEnum value); }; -class MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge - : public MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackBridge +class MTRPowerSourceClusterWiredCurrentTypeEnumAttributeCallbackSubscriptionBridge + : public MTRPowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge { public: - MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackBridge(queue, handler, action), + MTRPowerSourceClusterWiredCurrentTypeEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackBridge::OnDone; + using MTRPowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullablePowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullablePowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullablePowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge(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 MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge - : public MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackBridge +class MTRNullablePowerSourceClusterWiredCurrentTypeEnumAttributeCallbackSubscriptionBridge + : public MTRNullablePowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge { public: - MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge( + MTRNullablePowerSourceClusterWiredCurrentTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackBridge(queue, handler, action), + MTRNullablePowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackBridge::OnDone; + using MTRNullablePowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullablePowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRPowerSourceClusterWiredFaultAttributeCallbackBridge - : public MTRCallbackBridge +class MTRPowerSourceClusterWiredFaultEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRPowerSourceClusterWiredFaultAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRPowerSourceClusterWiredFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPowerSourceClusterWiredFaultAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRPowerSourceClusterWiredFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::WiredFault value); + static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::WiredFaultEnum value); }; -class MTRPowerSourceClusterWiredFaultAttributeCallbackSubscriptionBridge - : public MTRPowerSourceClusterWiredFaultAttributeCallbackBridge +class MTRPowerSourceClusterWiredFaultEnumAttributeCallbackSubscriptionBridge + : public MTRPowerSourceClusterWiredFaultEnumAttributeCallbackBridge { public: - MTRPowerSourceClusterWiredFaultAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPowerSourceClusterWiredFaultAttributeCallbackBridge(queue, handler, action), + MTRPowerSourceClusterWiredFaultEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPowerSourceClusterWiredFaultEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRPowerSourceClusterWiredFaultAttributeCallbackBridge::KeepAliveOnCallback; - using MTRPowerSourceClusterWiredFaultAttributeCallbackBridge::OnDone; + using MTRPowerSourceClusterWiredFaultEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceClusterWiredFaultEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullablePowerSourceClusterWiredFaultAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullablePowerSourceClusterWiredFaultEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullablePowerSourceClusterWiredFaultAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullablePowerSourceClusterWiredFaultEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullablePowerSourceClusterWiredFaultAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullablePowerSourceClusterWiredFaultEnumAttributeCallbackBridge(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 MTRNullablePowerSourceClusterWiredFaultAttributeCallbackSubscriptionBridge - : public MTRNullablePowerSourceClusterWiredFaultAttributeCallbackBridge +class MTRNullablePowerSourceClusterWiredFaultEnumAttributeCallbackSubscriptionBridge + : public MTRNullablePowerSourceClusterWiredFaultEnumAttributeCallbackBridge { public: - MTRNullablePowerSourceClusterWiredFaultAttributeCallbackSubscriptionBridge( + MTRNullablePowerSourceClusterWiredFaultEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePowerSourceClusterWiredFaultAttributeCallbackBridge(queue, handler, action), + MTRNullablePowerSourceClusterWiredFaultEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullablePowerSourceClusterWiredFaultAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullablePowerSourceClusterWiredFaultAttributeCallbackBridge::OnDone; + using MTRNullablePowerSourceClusterWiredFaultEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullablePowerSourceClusterWiredFaultEnumAttributeCallbackBridge::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 bc027fe230faca..0fcbe3e5b7c79f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm @@ -4100,7 +4100,7 @@ } void MTRPowerSourceActiveWiredFaultsListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -4138,7 +4138,7 @@ } void MTRPowerSourceActiveBatFaultsListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -4176,7 +4176,7 @@ } void MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -16840,15 +16840,65 @@ } } -void MTRPowerSourceClusterBatChargeFaultAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::PowerSource::BatChargeFault value) +void MTRPowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::PowerSource::BatApprovedChemistryEnum value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedShort:chip::to_underlying(value)]; + DispatchSuccess(context, objCValue); +}; + +void MTRPowerSourceClusterBatApprovedChemistryEnumAttributeCallbackSubscriptionBridge::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 MTRNullablePowerSourceClusterBatApprovedChemistryEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + NSNumber * _Nullable objCValue; + if (value.IsNull()) { + objCValue = nil; + } else { + objCValue = [NSNumber numberWithUnsignedShort:chip::to_underlying(value.Value())]; + } + DispatchSuccess(context, objCValue); +}; + +void MTRNullablePowerSourceClusterBatApprovedChemistryEnumAttributeCallbackSubscriptionBridge::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 MTRPowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::PowerSource::BatChargeFaultEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRPowerSourceClusterBatChargeFaultAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPowerSourceClusterBatChargeFaultEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -16863,8 +16913,8 @@ } } -void MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullablePowerSourceClusterBatChargeFaultEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -16875,7 +16925,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullablePowerSourceClusterBatChargeFaultEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -16890,15 +16940,15 @@ } } -void MTRPowerSourceClusterBatChargeLevelAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::PowerSource::BatChargeLevel value) +void MTRPowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::PowerSource::BatChargeLevelEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRPowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPowerSourceClusterBatChargeLevelEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -16913,8 +16963,8 @@ } } -void MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullablePowerSourceClusterBatChargeLevelEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -16925,7 +16975,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullablePowerSourceClusterBatChargeLevelEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -16940,15 +16990,15 @@ } } -void MTRPowerSourceClusterBatChargeStateAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::PowerSource::BatChargeState value) +void MTRPowerSourceClusterBatChargeStateEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::PowerSource::BatChargeStateEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRPowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPowerSourceClusterBatChargeStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -16963,8 +17013,8 @@ } } -void MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullablePowerSourceClusterBatChargeStateEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -16975,7 +17025,57 @@ DispatchSuccess(context, objCValue); }; -void MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullablePowerSourceClusterBatChargeStateEnumAttributeCallbackSubscriptionBridge::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 MTRPowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::PowerSource::BatCommonDesignationEnum value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedShort:chip::to_underlying(value)]; + DispatchSuccess(context, objCValue); +}; + +void MTRPowerSourceClusterBatCommonDesignationEnumAttributeCallbackSubscriptionBridge::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 MTRNullablePowerSourceClusterBatCommonDesignationEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + NSNumber * _Nullable objCValue; + if (value.IsNull()) { + objCValue = nil; + } else { + objCValue = [NSNumber numberWithUnsignedShort:chip::to_underlying(value.Value())]; + } + DispatchSuccess(context, objCValue); +}; + +void MTRNullablePowerSourceClusterBatCommonDesignationEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -16990,15 +17090,15 @@ } } -void MTRPowerSourceClusterBatFaultAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::PowerSource::BatFault value) +void MTRPowerSourceClusterBatFaultEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::PowerSource::BatFaultEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRPowerSourceClusterBatFaultAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPowerSourceClusterBatFaultEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -17013,8 +17113,8 @@ } } -void MTRNullablePowerSourceClusterBatFaultAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullablePowerSourceClusterBatFaultEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -17025,7 +17125,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullablePowerSourceClusterBatFaultAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullablePowerSourceClusterBatFaultEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -17040,15 +17140,15 @@ } } -void MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::PowerSource::BatReplaceability value) +void MTRPowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::PowerSource::BatReplaceabilityEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRPowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPowerSourceClusterBatReplaceabilityEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -17063,8 +17163,8 @@ } } -void MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullablePowerSourceClusterBatReplaceabilityEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -17075,7 +17175,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullablePowerSourceClusterBatReplaceabilityEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -17090,15 +17190,15 @@ } } -void MTRPowerSourceClusterPowerSourceStatusAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::PowerSource::PowerSourceStatus value) +void MTRPowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::PowerSource::PowerSourceStatusEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRPowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPowerSourceClusterPowerSourceStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -17113,8 +17213,8 @@ } } -void MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullablePowerSourceClusterPowerSourceStatusEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -17125,7 +17225,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullablePowerSourceClusterPowerSourceStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -17140,15 +17240,15 @@ } } -void MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::PowerSource::WiredCurrentType value) +void MTRPowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::PowerSource::WiredCurrentTypeEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPowerSourceClusterWiredCurrentTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -17163,8 +17263,8 @@ } } -void MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullablePowerSourceClusterWiredCurrentTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -17175,7 +17275,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullablePowerSourceClusterWiredCurrentTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -17190,15 +17290,15 @@ } } -void MTRPowerSourceClusterWiredFaultAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::PowerSource::WiredFault value) +void MTRPowerSourceClusterWiredFaultEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::PowerSource::WiredFaultEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRPowerSourceClusterWiredFaultAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPowerSourceClusterWiredFaultEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -17213,8 +17313,8 @@ } } -void MTRNullablePowerSourceClusterWiredFaultAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullablePowerSourceClusterWiredFaultEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -17225,7 +17325,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullablePowerSourceClusterWiredFaultAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullablePowerSourceClusterWiredFaultEnumAttributeCallbackSubscriptionBridge::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 cbf740c561d0fb..356e36485559c8 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 @@ -3654,9 +3654,9 @@ namespace Attributes { namespace Status { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::PowerSourceStatus * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::PowerSourceStatusEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); @@ -3668,9 +3668,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::P *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::PowerSourceStatus value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::PowerSourceStatusEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -3852,9 +3852,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl namespace WiredCurrentType { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::WiredCurrentType * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::WiredCurrentTypeEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); @@ -3866,9 +3866,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::W *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::WiredCurrentType value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::WiredCurrentTypeEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -4188,9 +4188,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl namespace BatChargeLevel { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeLevel * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeLevelEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); @@ -4202,9 +4202,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::B *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeLevel value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeLevelEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -4250,9 +4250,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, bool value) namespace BatReplaceability { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatReplaceability * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatReplaceabilityEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); @@ -4264,9 +4264,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::B *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatReplaceability value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatReplaceabilityEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -4342,9 +4342,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) namespace BatCommonDesignation { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatCommonDesignationEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); @@ -4356,9 +4356,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatCommonDesignationEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -4366,7 +4366,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE); } } // namespace BatCommonDesignation @@ -4433,9 +4433,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) namespace BatApprovedChemistry { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatApprovedChemistryEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); @@ -4447,9 +4447,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatApprovedChemistryEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -4457,7 +4457,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE); } } // namespace BatApprovedChemistry @@ -4526,9 +4526,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace BatChargeState { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeState * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeStateEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); @@ -4540,9 +4540,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::B *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeState value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeStateEnum 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 5139803de5504e..813784c3f36020 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 @@ -708,8 +708,9 @@ namespace PowerSource { namespace Attributes { namespace Status { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::PowerSourceStatus * value); // PowerSourceStatus -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::PowerSourceStatus value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::app::Clusters::PowerSource::PowerSourceStatusEnum * value); // PowerSourceStatusEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::PowerSourceStatusEnum value); } // namespace Status namespace Order { @@ -737,8 +738,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl } // namespace WiredAssessedInputFrequency namespace WiredCurrentType { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::WiredCurrentType * value); // WiredCurrentType -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::WiredCurrentType value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::app::Clusters::PowerSource::WiredCurrentTypeEnum * value); // WiredCurrentTypeEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::WiredCurrentTypeEnum value); } // namespace WiredCurrentType namespace WiredAssessedCurrent { @@ -785,8 +787,8 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl } // namespace BatTimeRemaining namespace BatChargeLevel { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeLevel * value); // BatChargeLevel -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeLevel value); +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeLevelEnum * value); // BatChargeLevelEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeLevelEnum value); } // namespace BatChargeLevel namespace BatReplacementNeeded { @@ -795,8 +797,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, bool value); } // namespace BatReplacementNeeded namespace BatReplaceability { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatReplaceability * value); // BatReplaceability -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatReplaceability value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::app::Clusters::PowerSource::BatReplaceabilityEnum * value); // BatReplaceabilityEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatReplaceabilityEnum value); } // namespace BatReplaceability namespace BatPresent { @@ -810,8 +813,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace BatReplacementDescription namespace BatCommonDesignation { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // int32u -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::app::Clusters::PowerSource::BatCommonDesignationEnum * value); // BatCommonDesignationEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatCommonDesignationEnum value); } // namespace BatCommonDesignation namespace BatANSIDesignation { @@ -825,8 +829,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace BatIECDesignation namespace BatApprovedChemistry { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // int32u -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::app::Clusters::PowerSource::BatApprovedChemistryEnum * value); // BatApprovedChemistryEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatApprovedChemistryEnum value); } // namespace BatApprovedChemistry namespace BatCapacity { @@ -840,8 +845,8 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace BatQuantity namespace BatChargeState { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeState * value); // BatChargeState -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeState value); +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeStateEnum * value); // BatChargeStateEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeStateEnum value); } // namespace BatChargeState namespace BatTimeToFullCharge { 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 74da3d8191b43d..cdbec8e3ce7ace 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 @@ -423,9 +423,52 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(UnitLocalization::TempU } } -static auto __attribute__((unused)) EnsureKnownEnumValue(PowerSource::BatChargeFault val) +static auto __attribute__((unused)) EnsureKnownEnumValue(PowerSource::BatApprovedChemistryEnum val) { - using EnumType = PowerSource::BatChargeFault; + using EnumType = PowerSource::BatApprovedChemistryEnum; + switch (val) + { + case EnumType::kUnspecified: + case EnumType::kAlkaline: + case EnumType::kLithiumCarbonFluoride: + case EnumType::kLithiumChromiumOxide: + case EnumType::kLithiumCopperOxide: + case EnumType::kLithiumIronDisulfide: + case EnumType::kLithiumManganeseDioxide: + case EnumType::kLithiumThionylChloride: + case EnumType::kMagnesium: + case EnumType::kMercuryOxide: + case EnumType::kNickelOxyhydride: + case EnumType::kSilverOxide: + case EnumType::kZincAir: + case EnumType::kZincCarbon: + case EnumType::kZincChloride: + case EnumType::kZincManganeseDioxide: + case EnumType::kLeadAcid: + case EnumType::kLithiumCobaltOxide: + case EnumType::kLithiumIon: + case EnumType::kLithiumIonPolymer: + case EnumType::kLithiumIronPhosphate: + case EnumType::kLithiumSulfur: + case EnumType::kLithiumTitanate: + case EnumType::kNickelCadmium: + case EnumType::kNickelHydrogen: + case EnumType::kNickelIron: + case EnumType::kNickelMetalHydride: + case EnumType::kNickelZinc: + case EnumType::kSilverZinc: + case EnumType::kSodiumIon: + case EnumType::kSodiumSulfur: + case EnumType::kZincBromide: + case EnumType::kZincCerium: + return val; + default: + return static_cast(33); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(PowerSource::BatChargeFaultEnum val) +{ + using EnumType = PowerSource::BatChargeFaultEnum; switch (val) { case EnumType::kUnspecified: @@ -444,9 +487,9 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(PowerSource::BatChargeF return static_cast(11); } } -static auto __attribute__((unused)) EnsureKnownEnumValue(PowerSource::BatChargeLevel val) +static auto __attribute__((unused)) EnsureKnownEnumValue(PowerSource::BatChargeLevelEnum val) { - using EnumType = PowerSource::BatChargeLevel; + using EnumType = PowerSource::BatChargeLevelEnum; switch (val) { case EnumType::kOk: @@ -457,9 +500,9 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(PowerSource::BatChargeL return static_cast(3); } } -static auto __attribute__((unused)) EnsureKnownEnumValue(PowerSource::BatChargeState val) +static auto __attribute__((unused)) EnsureKnownEnumValue(PowerSource::BatChargeStateEnum val) { - using EnumType = PowerSource::BatChargeState; + using EnumType = PowerSource::BatChargeStateEnum; switch (val) { case EnumType::kUnknown: @@ -471,12 +514,103 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(PowerSource::BatChargeS return static_cast(4); } } -static auto __attribute__((unused)) EnsureKnownEnumValue(PowerSource::BatFault val) +static auto __attribute__((unused)) EnsureKnownEnumValue(PowerSource::BatCommonDesignationEnum val) { - using EnumType = PowerSource::BatFault; + using EnumType = PowerSource::BatCommonDesignationEnum; switch (val) { - case EnumType::kUnspecfied: + case EnumType::kUnspecified: + case EnumType::kAaa: + case EnumType::kAa: + case EnumType::kC: + case EnumType::kD: + case EnumType::k4v5: + case EnumType::k6v0: + case EnumType::k9v0: + case EnumType::k12aa: + case EnumType::kAaaa: + case EnumType::kA: + case EnumType::kB: + case EnumType::kF: + case EnumType::kN: + case EnumType::kNo6: + case EnumType::kSubC: + case EnumType::kA23: + case EnumType::kA27: + case EnumType::kBa5800: + case EnumType::kDuplex: + case EnumType::k4sr44: + case EnumType::k523: + case EnumType::k531: + case EnumType::k15v0: + case EnumType::k22v5: + case EnumType::k30v0: + case EnumType::k45v0: + case EnumType::k67v5: + case EnumType::kJ: + case EnumType::kCr123a: + case EnumType::kCr2: + case EnumType::k2cr5: + case EnumType::kCrP2: + case EnumType::kCrV3: + case EnumType::kSr41: + case EnumType::kSr43: + case EnumType::kSr44: + case EnumType::kSr45: + case EnumType::kSr48: + case EnumType::kSr54: + case EnumType::kSr55: + case EnumType::kSr57: + case EnumType::kSr58: + case EnumType::kSr59: + case EnumType::kSr60: + case EnumType::kSr63: + case EnumType::kSr64: + case EnumType::kSr65: + case EnumType::kSr66: + case EnumType::kSr67: + case EnumType::kSr68: + case EnumType::kSr69: + case EnumType::kSr516: + case EnumType::kSr731: + case EnumType::kSr712: + case EnumType::kLr932: + case EnumType::kA5: + case EnumType::kA10: + case EnumType::kA13: + case EnumType::kA312: + case EnumType::kA675: + case EnumType::kAc41e: + case EnumType::k10180: + case EnumType::k10280: + case EnumType::k10440: + case EnumType::k14250: + case EnumType::k14430: + case EnumType::k14500: + case EnumType::k14650: + case EnumType::k15270: + case EnumType::k16340: + case EnumType::kRcr123a: + case EnumType::k17500: + case EnumType::k17670: + case EnumType::k18350: + case EnumType::k18500: + case EnumType::k18650: + case EnumType::k19670: + case EnumType::k25500: + case EnumType::k26650: + case EnumType::k32600: + return val; + default: + return static_cast(81); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(PowerSource::BatFaultEnum val) +{ + using EnumType = PowerSource::BatFaultEnum; + switch (val) + { + case EnumType::kUnspecified: case EnumType::kOverTemp: case EnumType::kUnderTemp: return val; @@ -484,9 +618,9 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(PowerSource::BatFault v return static_cast(3); } } -static auto __attribute__((unused)) EnsureKnownEnumValue(PowerSource::BatReplaceability val) +static auto __attribute__((unused)) EnsureKnownEnumValue(PowerSource::BatReplaceabilityEnum val) { - using EnumType = PowerSource::BatReplaceability; + using EnumType = PowerSource::BatReplaceabilityEnum; switch (val) { case EnumType::kUnspecified: @@ -498,9 +632,9 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(PowerSource::BatReplace return static_cast(4); } } -static auto __attribute__((unused)) EnsureKnownEnumValue(PowerSource::PowerSourceStatus val) +static auto __attribute__((unused)) EnsureKnownEnumValue(PowerSource::PowerSourceStatusEnum val) { - using EnumType = PowerSource::PowerSourceStatus; + using EnumType = PowerSource::PowerSourceStatusEnum; switch (val) { case EnumType::kUnspecified: @@ -512,9 +646,9 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(PowerSource::PowerSourc return static_cast(4); } } -static auto __attribute__((unused)) EnsureKnownEnumValue(PowerSource::WiredCurrentType val) +static auto __attribute__((unused)) EnsureKnownEnumValue(PowerSource::WiredCurrentTypeEnum val) { - using EnumType = PowerSource::WiredCurrentType; + using EnumType = PowerSource::WiredCurrentTypeEnum; switch (val) { case EnumType::kAc: @@ -524,12 +658,12 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(PowerSource::WiredCurre return static_cast(2); } } -static auto __attribute__((unused)) EnsureKnownEnumValue(PowerSource::WiredFault val) +static auto __attribute__((unused)) EnsureKnownEnumValue(PowerSource::WiredFaultEnum val) { - using EnumType = PowerSource::WiredFault; + using EnumType = PowerSource::WiredFaultEnum; switch (val) { - case EnumType::kUnspecfied: + case EnumType::kUnspecified: case EnumType::kOverVoltage: case EnumType::kUnderVoltage: return val; 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 cbc6c8c091df54..95a6d3399e2c44 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 @@ -531,8 +531,51 @@ namespace PowerSourceConfiguration {} // namespace PowerSourceConfiguration namespace PowerSource { -// Enum for BatChargeFault -enum class BatChargeFault : uint8_t +// Enum for BatApprovedChemistryEnum +enum class BatApprovedChemistryEnum : uint16_t +{ + kUnspecified = 0x00, + kAlkaline = 0x01, + kLithiumCarbonFluoride = 0x02, + kLithiumChromiumOxide = 0x03, + kLithiumCopperOxide = 0x04, + kLithiumIronDisulfide = 0x05, + kLithiumManganeseDioxide = 0x06, + kLithiumThionylChloride = 0x07, + kMagnesium = 0x08, + kMercuryOxide = 0x09, + kNickelOxyhydride = 0x0A, + kSilverOxide = 0x0B, + kZincAir = 0x0C, + kZincCarbon = 0x0D, + kZincChloride = 0x0E, + kZincManganeseDioxide = 0x0F, + kLeadAcid = 0x10, + kLithiumCobaltOxide = 0x11, + kLithiumIon = 0x12, + kLithiumIonPolymer = 0x13, + kLithiumIronPhosphate = 0x14, + kLithiumSulfur = 0x15, + kLithiumTitanate = 0x16, + kNickelCadmium = 0x17, + kNickelHydrogen = 0x18, + kNickelIron = 0x19, + kNickelMetalHydride = 0x1A, + kNickelZinc = 0x1B, + kSilverZinc = 0x1C, + kSodiumIon = 0x1D, + kSodiumSulfur = 0x1E, + kZincBromide = 0x1F, + kZincCerium = 0x20, + // 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 = 33, +}; + +// Enum for BatChargeFaultEnum +enum class BatChargeFaultEnum : uint8_t { kUnspecified = 0x00, kAmbientTooHot = 0x01, @@ -552,8 +595,8 @@ enum class BatChargeFault : uint8_t kUnknownEnumValue = 11, }; -// Enum for BatChargeLevel -enum class BatChargeLevel : uint8_t +// Enum for BatChargeLevelEnum +enum class BatChargeLevelEnum : uint8_t { kOk = 0x00, kWarning = 0x01, @@ -565,8 +608,8 @@ enum class BatChargeLevel : uint8_t kUnknownEnumValue = 3, }; -// Enum for BatChargeState -enum class BatChargeState : uint8_t +// Enum for BatChargeStateEnum +enum class BatChargeStateEnum : uint8_t { kUnknown = 0x00, kIsCharging = 0x01, @@ -579,12 +622,103 @@ enum class BatChargeState : uint8_t kUnknownEnumValue = 4, }; -// Enum for BatFault -enum class BatFault : uint8_t +// Enum for BatCommonDesignationEnum +enum class BatCommonDesignationEnum : uint16_t { - kUnspecfied = 0x00, - kOverTemp = 0x01, - kUnderTemp = 0x02, + kUnspecified = 0x00, + kAaa = 0x01, + kAa = 0x02, + kC = 0x03, + kD = 0x04, + k4v5 = 0x05, + k6v0 = 0x06, + k9v0 = 0x07, + k12aa = 0x08, + kAaaa = 0x09, + kA = 0x0A, + kB = 0x0B, + kF = 0x0C, + kN = 0x0D, + kNo6 = 0x0E, + kSubC = 0x0F, + kA23 = 0x10, + kA27 = 0x11, + kBa5800 = 0x12, + kDuplex = 0x13, + k4sr44 = 0x14, + k523 = 0x15, + k531 = 0x16, + k15v0 = 0x17, + k22v5 = 0x18, + k30v0 = 0x19, + k45v0 = 0x1A, + k67v5 = 0x1B, + kJ = 0x1C, + kCr123a = 0x1D, + kCr2 = 0x1E, + k2cr5 = 0x1F, + kCrP2 = 0x20, + kCrV3 = 0x21, + kSr41 = 0x22, + kSr43 = 0x23, + kSr44 = 0x24, + kSr45 = 0x25, + kSr48 = 0x26, + kSr54 = 0x27, + kSr55 = 0x28, + kSr57 = 0x29, + kSr58 = 0x2A, + kSr59 = 0x2B, + kSr60 = 0x2C, + kSr63 = 0x2D, + kSr64 = 0x2E, + kSr65 = 0x2F, + kSr66 = 0x30, + kSr67 = 0x31, + kSr68 = 0x32, + kSr69 = 0x33, + kSr516 = 0x34, + kSr731 = 0x35, + kSr712 = 0x36, + kLr932 = 0x37, + kA5 = 0x38, + kA10 = 0x39, + kA13 = 0x3A, + kA312 = 0x3B, + kA675 = 0x3C, + kAc41e = 0x3D, + k10180 = 0x3E, + k10280 = 0x3F, + k10440 = 0x40, + k14250 = 0x41, + k14430 = 0x42, + k14500 = 0x43, + k14650 = 0x44, + k15270 = 0x45, + k16340 = 0x46, + kRcr123a = 0x47, + k17500 = 0x48, + k17670 = 0x49, + k18350 = 0x4A, + k18500 = 0x4B, + k18650 = 0x4C, + k19670 = 0x4D, + k25500 = 0x4E, + k26650 = 0x4F, + k32600 = 0x50, + // 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 = 81, +}; + +// Enum for BatFaultEnum +enum class BatFaultEnum : uint8_t +{ + kUnspecified = 0x00, + kOverTemp = 0x01, + kUnderTemp = 0x02, // 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 @@ -592,8 +726,8 @@ enum class BatFault : uint8_t kUnknownEnumValue = 3, }; -// Enum for BatReplaceability -enum class BatReplaceability : uint8_t +// Enum for BatReplaceabilityEnum +enum class BatReplaceabilityEnum : uint8_t { kUnspecified = 0x00, kNotReplaceable = 0x01, @@ -606,8 +740,8 @@ enum class BatReplaceability : uint8_t kUnknownEnumValue = 4, }; -// Enum for PowerSourceStatus -enum class PowerSourceStatus : uint8_t +// Enum for PowerSourceStatusEnum +enum class PowerSourceStatusEnum : uint8_t { kUnspecified = 0x00, kActive = 0x01, @@ -620,8 +754,8 @@ enum class PowerSourceStatus : uint8_t kUnknownEnumValue = 4, }; -// Enum for WiredCurrentType -enum class WiredCurrentType : uint8_t +// Enum for WiredCurrentTypeEnum +enum class WiredCurrentTypeEnum : uint8_t { kAc = 0x00, kDc = 0x01, @@ -632,10 +766,10 @@ enum class WiredCurrentType : uint8_t kUnknownEnumValue = 2, }; -// Enum for WiredFault -enum class WiredFault : uint8_t +// Enum for WiredFaultEnum +enum class WiredFaultEnum : uint8_t { - kUnspecfied = 0x00, + kUnspecified = 0x00, kOverVoltage = 0x01, kUnderVoltage = 0x02, // All received enum values that are not listed above will be mapped 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 e33172adbc8772..142b1332c07de7 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 @@ -6001,8 +6001,8 @@ enum class Fields struct Type { public: - DataModel::List current; - DataModel::List previous; + DataModel::List current; + DataModel::List previous; static constexpr bool kIsFabricScoped = false; @@ -6012,8 +6012,8 @@ struct Type struct DecodableType { public: - DataModel::DecodableList current; - DataModel::DecodableList previous; + DataModel::DecodableList current; + DataModel::DecodableList previous; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -6031,8 +6031,8 @@ enum class Fields struct Type { public: - DataModel::List current; - DataModel::List previous; + DataModel::List current; + DataModel::List previous; static constexpr bool kIsFabricScoped = false; @@ -6042,8 +6042,8 @@ struct Type struct DecodableType { public: - DataModel::DecodableList current; - DataModel::DecodableList previous; + DataModel::DecodableList current; + DataModel::DecodableList previous; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -6061,8 +6061,8 @@ enum class Fields struct Type { public: - DataModel::List current; - DataModel::List previous; + DataModel::List current; + DataModel::List previous; static constexpr bool kIsFabricScoped = false; @@ -6072,8 +6072,8 @@ struct Type struct DecodableType { public: - DataModel::DecodableList current; - DataModel::DecodableList previous; + DataModel::DecodableList current; + DataModel::DecodableList previous; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -6088,9 +6088,9 @@ namespace Attributes { namespace Status { struct TypeInfo { - using Type = chip::app::Clusters::PowerSource::PowerSourceStatus; - using DecodableType = chip::app::Clusters::PowerSource::PowerSourceStatus; - using DecodableArgType = chip::app::Clusters::PowerSource::PowerSourceStatus; + using Type = chip::app::Clusters::PowerSource::PowerSourceStatusEnum; + using DecodableType = chip::app::Clusters::PowerSource::PowerSourceStatusEnum; + using DecodableArgType = chip::app::Clusters::PowerSource::PowerSourceStatusEnum; static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::Status::Id; } @@ -6149,9 +6149,9 @@ struct TypeInfo namespace WiredCurrentType { struct TypeInfo { - using Type = chip::app::Clusters::PowerSource::WiredCurrentType; - using DecodableType = chip::app::Clusters::PowerSource::WiredCurrentType; - using DecodableArgType = chip::app::Clusters::PowerSource::WiredCurrentType; + using Type = chip::app::Clusters::PowerSource::WiredCurrentTypeEnum; + using DecodableType = chip::app::Clusters::PowerSource::WiredCurrentTypeEnum; + using DecodableArgType = chip::app::Clusters::PowerSource::WiredCurrentTypeEnum; static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::WiredCurrentType::Id; } @@ -6209,9 +6209,9 @@ struct TypeInfo namespace ActiveWiredFaults { struct TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; - using DecodableArgType = const chip::app::DataModel::DecodableList &; + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList &; static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::ActiveWiredFaults::Id; } @@ -6257,9 +6257,9 @@ struct TypeInfo namespace BatChargeLevel { struct TypeInfo { - using Type = chip::app::Clusters::PowerSource::BatChargeLevel; - using DecodableType = chip::app::Clusters::PowerSource::BatChargeLevel; - using DecodableArgType = chip::app::Clusters::PowerSource::BatChargeLevel; + using Type = chip::app::Clusters::PowerSource::BatChargeLevelEnum; + using DecodableType = chip::app::Clusters::PowerSource::BatChargeLevelEnum; + using DecodableArgType = chip::app::Clusters::PowerSource::BatChargeLevelEnum; static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::BatChargeLevel::Id; } @@ -6281,9 +6281,9 @@ struct TypeInfo namespace BatReplaceability { struct TypeInfo { - using Type = chip::app::Clusters::PowerSource::BatReplaceability; - using DecodableType = chip::app::Clusters::PowerSource::BatReplaceability; - using DecodableArgType = chip::app::Clusters::PowerSource::BatReplaceability; + using Type = chip::app::Clusters::PowerSource::BatReplaceabilityEnum; + using DecodableType = chip::app::Clusters::PowerSource::BatReplaceabilityEnum; + using DecodableArgType = chip::app::Clusters::PowerSource::BatReplaceabilityEnum; static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::BatReplaceability::Id; } @@ -6305,9 +6305,9 @@ struct TypeInfo namespace ActiveBatFaults { struct TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; - using DecodableArgType = const chip::app::DataModel::DecodableList &; + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList &; static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::ActiveBatFaults::Id; } @@ -6330,9 +6330,9 @@ struct TypeInfo namespace BatCommonDesignation { struct TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; + using Type = chip::app::Clusters::PowerSource::BatCommonDesignationEnum; + using DecodableType = chip::app::Clusters::PowerSource::BatCommonDesignationEnum; + using DecodableArgType = chip::app::Clusters::PowerSource::BatCommonDesignationEnum; static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::BatCommonDesignation::Id; } @@ -6368,9 +6368,9 @@ struct TypeInfo namespace BatApprovedChemistry { struct TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; + using Type = chip::app::Clusters::PowerSource::BatApprovedChemistryEnum; + using DecodableType = chip::app::Clusters::PowerSource::BatApprovedChemistryEnum; + using DecodableArgType = chip::app::Clusters::PowerSource::BatApprovedChemistryEnum; static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::BatApprovedChemistry::Id; } @@ -6404,9 +6404,9 @@ struct TypeInfo namespace BatChargeState { struct TypeInfo { - using Type = chip::app::Clusters::PowerSource::BatChargeState; - using DecodableType = chip::app::Clusters::PowerSource::BatChargeState; - using DecodableArgType = chip::app::Clusters::PowerSource::BatChargeState; + using Type = chip::app::Clusters::PowerSource::BatChargeStateEnum; + using DecodableType = chip::app::Clusters::PowerSource::BatChargeStateEnum; + using DecodableArgType = chip::app::Clusters::PowerSource::BatChargeStateEnum; static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::BatChargeState::Id; } @@ -6452,9 +6452,9 @@ struct TypeInfo namespace ActiveBatChargeFaults { struct TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; - using DecodableArgType = const chip::app::DataModel::DecodableList &; + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList &; static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::ActiveBatChargeFaults::Id; } @@ -6506,13 +6506,14 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::Status::TypeInfo::DecodableType status = static_cast(0); - Attributes::Order::TypeInfo::DecodableType order = static_cast(0); + Attributes::Status::TypeInfo::DecodableType status = + static_cast(0); + Attributes::Order::TypeInfo::DecodableType order = static_cast(0); Attributes::Description::TypeInfo::DecodableType description; Attributes::WiredAssessedInputVoltage::TypeInfo::DecodableType wiredAssessedInputVoltage; Attributes::WiredAssessedInputFrequency::TypeInfo::DecodableType wiredAssessedInputFrequency; Attributes::WiredCurrentType::TypeInfo::DecodableType wiredCurrentType = - static_cast(0); + static_cast(0); Attributes::WiredAssessedCurrent::TypeInfo::DecodableType wiredAssessedCurrent; Attributes::WiredNominalVoltage::TypeInfo::DecodableType wiredNominalVoltage = static_cast(0); Attributes::WiredMaximumCurrent::TypeInfo::DecodableType wiredMaximumCurrent = static_cast(0); @@ -6522,21 +6523,23 @@ struct TypeInfo Attributes::BatPercentRemaining::TypeInfo::DecodableType batPercentRemaining; Attributes::BatTimeRemaining::TypeInfo::DecodableType batTimeRemaining; Attributes::BatChargeLevel::TypeInfo::DecodableType batChargeLevel = - static_cast(0); + static_cast(0); Attributes::BatReplacementNeeded::TypeInfo::DecodableType batReplacementNeeded = static_cast(0); Attributes::BatReplaceability::TypeInfo::DecodableType batReplaceability = - static_cast(0); + static_cast(0); Attributes::BatPresent::TypeInfo::DecodableType batPresent = static_cast(0); Attributes::ActiveBatFaults::TypeInfo::DecodableType activeBatFaults; Attributes::BatReplacementDescription::TypeInfo::DecodableType batReplacementDescription; - Attributes::BatCommonDesignation::TypeInfo::DecodableType batCommonDesignation = static_cast(0); + Attributes::BatCommonDesignation::TypeInfo::DecodableType batCommonDesignation = + static_cast(0); Attributes::BatANSIDesignation::TypeInfo::DecodableType batANSIDesignation; Attributes::BatIECDesignation::TypeInfo::DecodableType batIECDesignation; - Attributes::BatApprovedChemistry::TypeInfo::DecodableType batApprovedChemistry = static_cast(0); - Attributes::BatCapacity::TypeInfo::DecodableType batCapacity = static_cast(0); - Attributes::BatQuantity::TypeInfo::DecodableType batQuantity = static_cast(0); + Attributes::BatApprovedChemistry::TypeInfo::DecodableType batApprovedChemistry = + static_cast(0); + Attributes::BatCapacity::TypeInfo::DecodableType batCapacity = static_cast(0); + Attributes::BatQuantity::TypeInfo::DecodableType batQuantity = static_cast(0); Attributes::BatChargeState::TypeInfo::DecodableType batChargeState = - static_cast(0); + static_cast(0); Attributes::BatTimeToFullCharge::TypeInfo::DecodableType batTimeToFullCharge; Attributes::BatFunctionalWhileCharging::TypeInfo::DecodableType batFunctionalWhileCharging = static_cast(0); Attributes::BatChargingCurrent::TypeInfo::DecodableType batChargingCurrent; @@ -6568,8 +6571,8 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } static constexpr bool kIsFabricScoped = false; - DataModel::List current; - DataModel::List previous; + DataModel::List current; + DataModel::List previous; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -6581,8 +6584,8 @@ struct DecodableType static constexpr EventId GetEventId() { return Events::WiredFaultChange::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - DataModel::DecodableList current; - DataModel::DecodableList previous; + DataModel::DecodableList current; + DataModel::DecodableList previous; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -6604,8 +6607,8 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } static constexpr bool kIsFabricScoped = false; - DataModel::List current; - DataModel::List previous; + DataModel::List current; + DataModel::List previous; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -6617,8 +6620,8 @@ struct DecodableType static constexpr EventId GetEventId() { return Events::BatFaultChange::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - DataModel::DecodableList current; - DataModel::DecodableList previous; + DataModel::DecodableList current; + DataModel::DecodableList previous; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -6640,8 +6643,8 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } static constexpr bool kIsFabricScoped = false; - DataModel::List current; - DataModel::List previous; + DataModel::List current; + DataModel::List previous; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -6653,8 +6656,8 @@ struct DecodableType static constexpr EventId GetEventId() { return Events::BatChargeFaultChange::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - DataModel::DecodableList current; - DataModel::DecodableList previous; + DataModel::DecodableList current; + DataModel::DecodableList previous; CHIP_ERROR Decode(TLV::TLVReader & reader); }; diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 98409d06a311fe..09e793623de03e 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -9886,7 +9886,7 @@ void registerClusterPowerSource(Commands & commands, CredentialIssuerCommands * 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, "status", 0, UINT8_MAX, Attributes::Status::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "order", 0, UINT8_MAX, Attributes::Order::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -9898,7 +9898,7 @@ void registerClusterPowerSource(Commands & commands, CredentialIssuerCommands * make_unique>>(Id, "wired-assessed-input-frequency", 0, UINT16_MAX, Attributes::WiredAssessedInputFrequency::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( + make_unique>( Id, "wired-current-type", 0, UINT8_MAX, Attributes::WiredCurrentType::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>(Id, "wired-assessed-current", 0, UINT32_MAX, @@ -9910,7 +9910,7 @@ void registerClusterPowerSource(Commands & commands, CredentialIssuerCommands * WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "wired-present", 0, 1, Attributes::WiredPresent::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( + make_unique>>( Id, "active-wired-faults", Attributes::ActiveWiredFaults::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "bat-voltage", 0, UINT32_MAX, Attributes::BatVoltage::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -9920,33 +9920,35 @@ void registerClusterPowerSource(Commands & commands, CredentialIssuerCommands * make_unique>>(Id, "bat-time-remaining", 0, UINT32_MAX, Attributes::BatTimeRemaining::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( + make_unique>( Id, "bat-charge-level", 0, UINT8_MAX, Attributes::BatChargeLevel::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "bat-replacement-needed", 0, 1, Attributes::BatReplacementNeeded::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( + make_unique>( Id, "bat-replaceability", 0, UINT8_MAX, Attributes::BatReplaceability::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "bat-present", 0, 1, Attributes::BatPresent::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( + make_unique>>( Id, "active-bat-faults", Attributes::ActiveBatFaults::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "bat-replacement-description", Attributes::BatReplacementDescription::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "bat-common-designation", 0, UINT32_MAX, Attributes::BatCommonDesignation::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "bat-common-designation", 0, UINT16_MAX, Attributes::BatCommonDesignation::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // make_unique>(Id, "bat-ansidesignation", Attributes::BatANSIDesignation::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "bat-iecdesignation", Attributes::BatIECDesignation::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "bat-approved-chemistry", 0, UINT32_MAX, Attributes::BatApprovedChemistry::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "bat-approved-chemistry", 0, UINT16_MAX, Attributes::BatApprovedChemistry::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // make_unique>(Id, "bat-capacity", 0, UINT32_MAX, Attributes::BatCapacity::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "bat-quantity", 0, UINT8_MAX, Attributes::BatQuantity::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( + make_unique>( Id, "bat-charge-state", 0, UINT8_MAX, Attributes::BatChargeState::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>(Id, "bat-time-to-full-charge", 0, UINT32_MAX, @@ -9957,7 +9959,8 @@ void registerClusterPowerSource(Commands & commands, CredentialIssuerCommands * make_unique>>(Id, "bat-charging-current", 0, UINT32_MAX, Attributes::BatChargingCurrent::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( + make_unique< + WriteAttributeAsComplex>>( Id, "active-bat-charge-faults", Attributes::ActiveBatChargeFaults::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( 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 8fc9b5f18904d5..65f7da1143f798 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -5327,7 +5327,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP switch (path.mAttributeId) { case PowerSource::Attributes::Status::Id: { - chip::app::Clusters::PowerSource::PowerSourceStatus value; + chip::app::Clusters::PowerSource::PowerSourceStatusEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("Status", 1, value); } @@ -5352,7 +5352,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("WiredAssessedInputFrequency", 1, value); } case PowerSource::Attributes::WiredCurrentType::Id: { - chip::app::Clusters::PowerSource::WiredCurrentType value; + chip::app::Clusters::PowerSource::WiredCurrentTypeEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("WiredCurrentType", 1, value); } @@ -5377,7 +5377,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("WiredPresent", 1, value); } case PowerSource::Attributes::ActiveWiredFaults::Id: { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ActiveWiredFaults", 1, value); } @@ -5397,7 +5397,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("BatTimeRemaining", 1, value); } case PowerSource::Attributes::BatChargeLevel::Id: { - chip::app::Clusters::PowerSource::BatChargeLevel value; + chip::app::Clusters::PowerSource::BatChargeLevelEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("BatChargeLevel", 1, value); } @@ -5407,7 +5407,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("BatReplacementNeeded", 1, value); } case PowerSource::Attributes::BatReplaceability::Id: { - chip::app::Clusters::PowerSource::BatReplaceability value; + chip::app::Clusters::PowerSource::BatReplaceabilityEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("BatReplaceability", 1, value); } @@ -5417,7 +5417,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("BatPresent", 1, value); } case PowerSource::Attributes::ActiveBatFaults::Id: { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ActiveBatFaults", 1, value); } @@ -5427,7 +5427,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("BatReplacementDescription", 1, value); } case PowerSource::Attributes::BatCommonDesignation::Id: { - uint32_t value; + chip::app::Clusters::PowerSource::BatCommonDesignationEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("BatCommonDesignation", 1, value); } @@ -5442,7 +5442,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("BatIECDesignation", 1, value); } case PowerSource::Attributes::BatApprovedChemistry::Id: { - uint32_t value; + chip::app::Clusters::PowerSource::BatApprovedChemistryEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("BatApprovedChemistry", 1, value); } @@ -5457,7 +5457,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("BatQuantity", 1, value); } case PowerSource::Attributes::BatChargeState::Id: { - chip::app::Clusters::PowerSource::BatChargeState value; + chip::app::Clusters::PowerSource::BatChargeStateEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("BatChargeState", 1, value); } @@ -5477,7 +5477,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("BatChargingCurrent", 1, value); } case PowerSource::Attributes::ActiveBatChargeFaults::Id: { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ActiveBatChargeFaults", 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 e05ff01df48e43..d8b821b88c28c5 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -38222,7 +38222,7 @@ class Test_TC_PS_2_1Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::PowerSource::PowerSourceStatus value; + chip::app::Clusters::PowerSource::PowerSourceStatusEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); @@ -38270,7 +38270,7 @@ class Test_TC_PS_2_1Suite : public TestCommand case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::PowerSource::WiredCurrentType value; + chip::app::Clusters::PowerSource::WiredCurrentTypeEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); @@ -38318,7 +38318,7 @@ class Test_TC_PS_2_1Suite : public TestCommand case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintMaxLength("value", value, 8)); @@ -38357,7 +38357,7 @@ class Test_TC_PS_2_1Suite : public TestCommand case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::PowerSource::BatChargeLevel value; + chip::app::Clusters::PowerSource::BatChargeLevelEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); @@ -38375,7 +38375,7 @@ class Test_TC_PS_2_1Suite : public TestCommand case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::PowerSource::BatReplaceability value; + chip::app::Clusters::PowerSource::BatReplaceabilityEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); @@ -38393,7 +38393,7 @@ class Test_TC_PS_2_1Suite : public TestCommand case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintMaxLength("value", value, 8)); @@ -38411,11 +38411,11 @@ class Test_TC_PS_2_1Suite : public TestCommand case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint32_t value; + chip::app::Clusters::PowerSource::BatCommonDesignationEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 80UL)); + VerifyOrReturn(CheckConstraintType("value", "enum16", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 80U)); } break; case 22: @@ -38439,11 +38439,11 @@ class Test_TC_PS_2_1Suite : public TestCommand case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint32_t value; + chip::app::Clusters::PowerSource::BatApprovedChemistryEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32UL)); + VerifyOrReturn(CheckConstraintType("value", "enum16", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 32U)); } break; case 25: @@ -38469,7 +38469,7 @@ class Test_TC_PS_2_1Suite : public TestCommand case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::PowerSource::BatChargeState value; + chip::app::Clusters::PowerSource::BatChargeStateEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); @@ -38507,7 +38507,7 @@ class Test_TC_PS_2_1Suite : public TestCommand case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); } 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 2086b60ee4a013..c461b7d8b78c06 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -52728,9 +52728,9 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batCommonDesignation", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("batCommonDesignation", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("batCommonDesignation", [value unsignedIntValue], 80UL)); + VerifyOrReturn(CheckConstraintType("batCommonDesignation", "enum16", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("batCommonDesignation", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("batCommonDesignation", [value unsignedShortValue], 80U)); NextTest(); }]; @@ -52790,9 +52790,9 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batApprovedChemistry", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("batApprovedChemistry", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("batApprovedChemistry", [value unsignedIntValue], 32UL)); + VerifyOrReturn(CheckConstraintType("batApprovedChemistry", "enum16", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("batApprovedChemistry", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("batApprovedChemistry", [value unsignedShortValue], 32U)); NextTest(); }]; diff --git a/zzz_generated/darwin/controller-clusters/zap-generated/CHIPClientCallbacks.h b/zzz_generated/darwin/controller-clusters/zap-generated/CHIPClientCallbacks.h index 0f24b2f1f7cf73..a05cc25bea55f2 100644 --- a/zzz_generated/darwin/controller-clusters/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/darwin/controller-clusters/zap-generated/CHIPClientCallbacks.h @@ -210,11 +210,11 @@ typedef void (*PowerSourceConfigurationEventListListAttributeCallback)( typedef void (*PowerSourceConfigurationAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*PowerSourceActiveWiredFaultsListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*PowerSourceActiveBatFaultsListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*PowerSourceActiveBatChargeFaultsListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*PowerSourceGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*PowerSourceAcceptedCommandListListAttributeCallback)(