From 20408769c6dd53ac358bf7ee0e1c82c1ee026648 Mon Sep 17 00:00:00 2001 From: Robert Szewczyk Date: Fri, 30 Jun 2023 12:36:27 -0700 Subject: [PATCH] Reorder EndOfServiceEnum elements according to the canonical pattern (#27564) * Reorder EndOfServiceEnum elements according to the canonical pattern Fixes #27563 * Regenerated dependent files --- .../smoke-co-alarm-common/smoke-co-alarm-app.matter | 4 ++-- .../zcl/data-model/chip/smoke-co-alarm-cluster.xml | 4 ++-- src/controller/data_model/controller-clusters.matter | 4 ++-- src/controller/python/chip/clusters/Objects.py | 4 ++-- src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h | 4 ++-- .../app-common/app-common/zap-generated/cluster-enums-check.h | 2 +- .../app-common/app-common/zap-generated/cluster-enums.h | 4 ++-- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter index a60ab0e2431ed7..ee119bf83f9813 100644 --- a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter +++ b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter @@ -1634,8 +1634,8 @@ server cluster SmokeCoAlarm = 92 { } enum EndOfServiceEnum : ENUM8 { - kExpired = 0; - kNormal = 1; + kNormal = 0; + kExpired = 1; } enum ExpressedStateEnum : ENUM8 { diff --git a/src/app/zap-templates/zcl/data-model/chip/smoke-co-alarm-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/smoke-co-alarm-cluster.xml index cf8bb144a8e103..a6dc0fe72e85dd 100644 --- a/src/app/zap-templates/zcl/data-model/chip/smoke-co-alarm-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/smoke-co-alarm-cluster.xml @@ -128,8 +128,8 @@ limitations under the License. - - + + diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 463247067b2757..5a97533ac5be0b 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -3176,8 +3176,8 @@ client cluster SmokeCoAlarm = 92 { } enum EndOfServiceEnum : ENUM8 { - kExpired = 0; - kNormal = 1; + kNormal = 0; + kExpired = 1; } enum ExpressedStateEnum : ENUM8 { diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index d0572a7909deec..85d82a02f4a103 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -17423,8 +17423,8 @@ class ContaminationStateEnum(MatterIntEnum): kUnknownEnumValue = 4, class EndOfServiceEnum(MatterIntEnum): - kExpired = 0x00 - kNormal = 0x01 + kNormal = 0x00 + kExpired = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving and unknown diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 57defcafb7613f..412cd772be7792 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -24414,8 +24414,8 @@ typedef NS_ENUM(uint8_t, MTRSmokeCOAlarmContaminationState) { } MTR_NEWLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRSmokeCOAlarmEndOfService) { - MTRSmokeCOAlarmEndOfServiceExpired MTR_NEWLY_AVAILABLE = 0x00, - MTRSmokeCOAlarmEndOfServiceNormal MTR_NEWLY_AVAILABLE = 0x01, + MTRSmokeCOAlarmEndOfServiceNormal MTR_NEWLY_AVAILABLE = 0x00, + MTRSmokeCOAlarmEndOfServiceExpired MTR_NEWLY_AVAILABLE = 0x01, } MTR_NEWLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRSmokeCOAlarmExpressedState) { 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 659703c03bb43c..e37278001a49b5 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 @@ -1400,8 +1400,8 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(SmokeCoAlarm::EndOfServ using EnumType = SmokeCoAlarm::EndOfServiceEnum; switch (val) { - case EnumType::kExpired: case EnumType::kNormal: + case EnumType::kExpired: return val; default: return static_cast(2); diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h index 2d8b075fab06d6..58fa88f53876be 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 @@ -1718,8 +1718,8 @@ enum class ContaminationStateEnum : uint8_t // Enum for EndOfServiceEnum enum class EndOfServiceEnum : uint8_t { - kExpired = 0x00, - kNormal = 0x01, + kNormal = 0x00, + kExpired = 0x01, // All received enum values that are not listed above will be mapped // to kUnknownEnumValue. This is a helper enum value that should only // be used by code to process how it handles receiving and unknown