From fae523cdc8bd8af96304bb3504b869a41af98ae0 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 7 Dec 2021 17:15:35 -0500 Subject: [PATCH] Rename ActionStatusEnum to ActionStateEnum. (#12691) It's called ActionStateEnum in the spec. --- .../data-model/chip/bridged-actions-cluster.xml | 8 ++++---- .../java/zap-generated/CHIPReadCallbacks.cpp | 2 +- src/controller/python/chip/clusters/Objects.py | 14 +++++++------- .../app-common/zap-generated/cluster-objects.h | 14 +++++++------- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/bridged-actions-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/bridged-actions-cluster.xml index cc9b2d3684c355..7e751aa0590ba1 100644 --- a/src/app/zap-templates/zcl/data-model/chip/bridged-actions-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/bridged-actions-cluster.xml @@ -39,7 +39,7 @@ limitations under the License. - + @@ -72,7 +72,7 @@ limitations under the License. - + @@ -176,14 +176,14 @@ limitations under the License. This event SHALL be generated when there is a change in the Status of an ActionID. - + This event SHALL be generated when there is some error which prevents the action from its normal planned execution. - + diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index 16ee2bc29dc05b..eaaa6ef6125916 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -1362,7 +1362,7 @@ void CHIPBridgedActionsActionListAttributeCallback::CallbackFn( bool statusNull = false; bool statusHasValue = true; - chip::app::Clusters::BridgedActions::ActionStatusEnum statusValue = entry.status; + chip::app::Clusters::BridgedActions::ActionStateEnum statusValue = entry.status; jobject status = nullptr; if (!statusNull && statusHasValue) diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index b23ed905ede963..6e682eb239f445 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -4761,7 +4761,7 @@ class ActionErrorEnum(IntEnum): kUnknown = 0x00 kInterrupted = 0x01 - class ActionStatusEnum(IntEnum): + class ActionStateEnum(IntEnum): kInactive = 0x00 kActive = 0x01 kPaused = 0x02 @@ -4794,7 +4794,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="type", Tag=3, Type=BridgedActions.Enums.ActionTypeEnum), ClusterObjectFieldDescriptor(Label="endpointListID", Tag=4, Type=uint), ClusterObjectFieldDescriptor(Label="supportedCommands", Tag=5, Type=uint), - ClusterObjectFieldDescriptor(Label="status", Tag=6, Type=BridgedActions.Enums.ActionStatusEnum), + ClusterObjectFieldDescriptor(Label="status", Tag=6, Type=BridgedActions.Enums.ActionStateEnum), ]) actionID: 'uint' = 0 @@ -4802,7 +4802,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: type: 'BridgedActions.Enums.ActionTypeEnum' = 0 endpointListID: 'uint' = 0 supportedCommands: 'uint' = 0 - status: 'BridgedActions.Enums.ActionStatusEnum' = 0 + status: 'BridgedActions.Enums.ActionStateEnum' = 0 @dataclass class EndpointListStruct(ClusterObject): @@ -5133,12 +5133,12 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields = [ ClusterObjectFieldDescriptor(Label="actionID", Tag=0, Type=uint), ClusterObjectFieldDescriptor(Label="invokeID", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="newState", Tag=2, Type=BridgedActions.Enums.ActionStatusEnum), + ClusterObjectFieldDescriptor(Label="newState", Tag=2, Type=BridgedActions.Enums.ActionStateEnum), ]) actionID: 'uint' = 0 invokeID: 'uint' = 0 - newState: 'BridgedActions.Enums.ActionStatusEnum' = 0 + newState: 'BridgedActions.Enums.ActionStateEnum' = 0 @dataclass class ActionFailed(ClusterEventDescriptor): @@ -5151,13 +5151,13 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields = [ ClusterObjectFieldDescriptor(Label="actionID", Tag=0, Type=uint), ClusterObjectFieldDescriptor(Label="invokeID", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="newState", Tag=2, Type=BridgedActions.Enums.ActionStatusEnum), + ClusterObjectFieldDescriptor(Label="newState", Tag=2, Type=BridgedActions.Enums.ActionStateEnum), ClusterObjectFieldDescriptor(Label="error", Tag=3, Type=BridgedActions.Enums.ActionErrorEnum), ]) actionID: 'uint' = 0 invokeID: 'uint' = 0 - newState: 'BridgedActions.Enums.ActionStatusEnum' = 0 + newState: 'BridgedActions.Enums.ActionStateEnum' = 0 error: 'BridgedActions.Enums.ActionErrorEnum' = 0 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 dccf050d5458c4..d665da5735f361 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 @@ -6249,8 +6249,8 @@ enum class ActionErrorEnum : uint8_t kUnknown = 0x00, kInterrupted = 0x01, }; -// Enum for ActionStatusEnum -enum class ActionStatusEnum : uint8_t +// Enum for ActionStateEnum +enum class ActionStateEnum : uint8_t { kInactive = 0x00, kActive = 0x01, @@ -6313,7 +6313,7 @@ struct Type ActionTypeEnum type; uint16_t endpointListID; uint16_t supportedCommands; - ActionStatusEnum status; + ActionStateEnum status; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -6941,7 +6941,7 @@ struct Type uint16_t actionID; uint32_t invokeID; - ActionStatusEnum newState; + ActionStateEnum newState; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -6955,7 +6955,7 @@ struct DecodableType uint16_t actionID; uint32_t invokeID; - ActionStatusEnum newState; + ActionStateEnum newState; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -6981,7 +6981,7 @@ struct Type uint16_t actionID; uint32_t invokeID; - ActionStatusEnum newState; + ActionStateEnum newState; ActionErrorEnum error; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -6996,7 +6996,7 @@ struct DecodableType uint16_t actionID; uint32_t invokeID; - ActionStatusEnum newState; + ActionStateEnum newState; ActionErrorEnum error; CHIP_ERROR Decode(TLV::TLVReader & reader);