diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.matter b/examples/light-switch-app/light-switch-common/light-switch-app.matter index db7b722df87860..4b486900f2cdb6 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.matter +++ b/examples/light-switch-app/light-switch-common/light-switch-app.matter @@ -2147,6 +2147,9 @@ cluster IcdManagement = 70 { fabric_idx fabricIndex = 254; } + critical event OnTransitionToActiveMode = 0 { + } + readonly attribute int32u idleModeDuration = 0; readonly attribute int32u activeModeDuration = 1; readonly attribute int16u activeModeThreshold = 2; diff --git a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter index 1d09cf81bfbcd2..1af37adcc789a7 100644 --- a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter +++ b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter @@ -1412,6 +1412,9 @@ cluster IcdManagement = 70 { fabric_idx fabricIndex = 254; } + critical event OnTransitionToActiveMode = 0 { + } + readonly attribute int32u idleModeDuration = 0; readonly attribute int32u activeModeDuration = 1; readonly attribute int16u activeModeThreshold = 2; @@ -1734,6 +1737,7 @@ endpoint 0 { } server cluster IcdManagement { + emits event OnTransitionToActiveMode; callback attribute idleModeDuration; callback attribute activeModeDuration; callback attribute activeModeThreshold; diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 8ddf0f1b644245..3642db616340de 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -1772,6 +1772,9 @@ cluster IcdManagement = 70 { fabric_idx fabricIndex = 254; } + critical event OnTransitionToActiveMode = 0 { + } + readonly attribute int32u idleModeDuration = 0; readonly attribute int32u activeModeDuration = 1; readonly attribute int16u activeModeThreshold = 2; diff --git a/examples/lock-app/qpg/zap/lock.matter b/examples/lock-app/qpg/zap/lock.matter index fe403eac28cf46..e936096318362f 100644 --- a/examples/lock-app/qpg/zap/lock.matter +++ b/examples/lock-app/qpg/zap/lock.matter @@ -1428,6 +1428,9 @@ cluster IcdManagement = 70 { fabric_idx fabricIndex = 254; } + critical event OnTransitionToActiveMode = 0 { + } + readonly attribute int32u idleModeDuration = 0; readonly attribute int32u activeModeDuration = 1; readonly attribute int16u activeModeThreshold = 2; 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 b33469527db40a..bca8ae2c0292d0 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 @@ -1748,6 +1748,9 @@ cluster IcdManagement = 70 { fabric_idx fabricIndex = 254; } + critical event OnTransitionToActiveMode = 0 { + } + readonly attribute int32u idleModeDuration = 0; readonly attribute int32u activeModeDuration = 1; readonly attribute int16u activeModeThreshold = 2; diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 70cef4b39d5675..da1924a65e1823 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -2880,6 +2880,9 @@ cluster IcdManagement = 70 { fabric_idx fabricIndex = 254; } + critical event OnTransitionToActiveMode = 0 { + } + readonly attribute int32u idleModeDuration = 0; readonly attribute int32u activeModeDuration = 1; readonly attribute int16u activeModeThreshold = 2; diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java index 9d18a3e786d5b4..9f5c25260c131b 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java @@ -2297,6 +2297,34 @@ public String toString() { return output.toString(); } } +public static class IcdManagementClusterOnTransitionToActiveModeEvent { + + public IcdManagementClusterOnTransitionToActiveModeEvent( + ) { + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + + return new StructType(values); + } + + public static IcdManagementClusterOnTransitionToActiveModeEvent decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + return new IcdManagementClusterOnTransitionToActiveModeEvent( + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("IcdManagementClusterOnTransitionToActiveModeEvent {\n"); + output.append("}\n"); + return output.toString(); + } +} public static class OvenCavityOperationalStateClusterOperationalErrorEvent { public ChipStructs.OvenCavityOperationalStateClusterErrorStateStruct errorState; private static final long ERROR_STATE_ID = 0L; diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index 77021a240507ed..79440eeed9f239 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -6060,7 +6060,8 @@ public static Attribute value(long id) throws NoSuchFieldError { } } - public enum Event {; + public enum Event { + OnTransitionToActiveMode(0L),; private final long id; Event(long id) { this.id = id; diff --git a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp index c4ae9e316db9ec..98d7fe2ad05306 100644 --- a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp @@ -2473,6 +2473,33 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & using namespace app::Clusters::IcdManagement; switch (aPath.mEventId) { + case Events::OnTransitionToActiveMode::Id: { + Events::OnTransitionToActiveMode::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jclass onTransitionToActiveModeStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipEventStructs$IcdManagementClusterOnTransitionToActiveModeEvent", + onTransitionToActiveModeStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipEventStructs$IcdManagementClusterOnTransitionToActiveModeEvent"); + return nullptr; + } + jmethodID onTransitionToActiveModeStructCtor = env->GetMethodID(onTransitionToActiveModeStructClass, "", "()V"); + if (onTransitionToActiveModeStructCtor == nullptr) + { + ChipLogError(Zcl, "Could not find ChipEventStructs$IcdManagementClusterOnTransitionToActiveModeEvent constructor"); + return nullptr; + } + + jobject value = env->NewObject(onTransitionToActiveModeStructClass, onTransitionToActiveModeStructCtor); + + return value; + } default: *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; break; diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index ac7aeca1cab875..4087ed2ff58c53 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -15210,6 +15210,23 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 + class Events: + @dataclass + class OnTransitionToActiveMode(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000046 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) + @dataclass class Timer(Cluster): diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index 4cf0aa3990a7dd..3f811984b055e7 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -7134,6 +7134,9 @@ typedef NS_ENUM(uint32_t, MTREventIDType) { // Cluster BooleanState events MTREventIDTypeClusterBooleanStateEventStateChangeID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000000, + // Cluster ICDManagement events + MTREventIDTypeClusterICDManagementEventOnTransitionToActiveModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + // Cluster OvenCavityOperationalState events MTREventIDTypeClusterOvenCavityOperationalStateEventOperationalErrorID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, MTREventIDTypeClusterOvenCavityOperationalStateEventOperationCompletionID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm index 09fea691852259..10fc1751ed0b9e 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm @@ -1636,6 +1636,17 @@ static id _Nullable DecodeEventPayloadForICDManagementCluster(EventId aEventId, { using namespace Clusters::IcdManagement; switch (aEventId) { + case Events::OnTransitionToActiveMode::Id: { + Events::OnTransitionToActiveMode::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + + __auto_type * value = [MTRICDManagementClusterOnTransitionToActiveModeEvent new]; + + return value; + } default: { break; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index aab3bef1def900..c952dc3da5faa2 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -789,6 +789,10 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy) NSNumber * _Nonnull fabricIndex MTR_PROVISIONALLY_AVAILABLE; @end +MTR_PROVISIONALLY_AVAILABLE +@interface MTRICDManagementClusterOnTransitionToActiveModeEvent : NSObject +@end + MTR_PROVISIONALLY_AVAILABLE @interface MTROvenCavityOperationalStateClusterErrorStateStruct : NSObject @property (nonatomic, copy) NSNumber * _Nonnull errorStateID MTR_PROVISIONALLY_AVAILABLE; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index 9ddf0fa17f9128..9324a04d612704 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -2920,6 +2920,29 @@ - (NSString *)description @end +@implementation MTRICDManagementClusterOnTransitionToActiveModeEvent +- (instancetype)init +{ + if (self = [super init]) { + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRICDManagementClusterOnTransitionToActiveModeEvent alloc] init]; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + return descriptionString; +} + +@end + @implementation MTROvenCavityOperationalStateClusterErrorStateStruct - (instancetype)init { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index e3798e4613005c..a4c47d609ff048 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -10754,7 +10754,29 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre } } // namespace Attributes -namespace Events {} // namespace Events +namespace Events { +namespace OnTransitionToActiveMode { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + return aWriter.EndContainer(outer); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + } +} +} // namespace OnTransitionToActiveMode. +} // namespace Events } // namespace IcdManagement namespace Timer { 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 cb176c39ba7394..e511659d9c7f68 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 @@ -14466,6 +14466,36 @@ struct TypeInfo }; }; } // namespace Attributes +namespace Events { +namespace OnTransitionToActiveMode { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; + +enum class Fields : uint8_t +{ +}; + +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::OnTransitionToActiveMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +struct DecodableType +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::OnTransitionToActiveMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace OnTransitionToActiveMode +} // namespace Events } // namespace IcdManagement namespace Timer { diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Events.h b/zzz_generated/app-common/app-common/zap-generated/ids/Events.h index 0ea221e713cc6c..65ad986343a434 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Events.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Events.h @@ -267,6 +267,16 @@ static constexpr EventId Id = 0x00000000; } // namespace Events } // namespace BooleanState +namespace IcdManagement { +namespace Events { + +namespace OnTransitionToActiveMode { +static constexpr EventId Id = 0x00000000; +} // namespace OnTransitionToActiveMode + +} // namespace Events +} // namespace IcdManagement + namespace OvenCavityOperationalState { namespace Events { diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 24be99ebdc010a..aee55fe90ccc5d 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -4606,6 +4606,7 @@ class GroupKeyManagementKeySetReadAllIndices : public ClusterCommand | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | +| * OnTransitionToActiveMode | 0x0000 | \*----------------------------------------------------------------------------*/ /* @@ -17629,8 +17630,10 @@ void registerClusterIcdManagement(Commands & commands, CredentialIssuerCommands // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "on-transition-to-active-mode", Events::OnTransitionToActiveMode::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "on-transition-to-active-mode", Events::OnTransitionToActiveMode::Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); 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 8f0584c156f190..d8203d12d7ad27 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -5155,6 +5155,14 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const IcdManagement::Events::OnTransitionToActiveMode::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const OvenCavityOperationalState::Events::OperationalError::DecodableType & value) { @@ -17800,6 +17808,17 @@ CHIP_ERROR DataModelLogger::LogEvent(const chip::app::EventHeader & header, chip } break; } + case IcdManagement::Id: { + switch (header.mPath.mEventId) + { + case IcdManagement::Events::OnTransitionToActiveMode::Id: { + chip::app::Clusters::IcdManagement::Events::OnTransitionToActiveMode::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("OnTransitionToActiveMode", 1, value); + } + } + break; + } case OvenCavityOperationalState::Id: { switch (header.mPath.mEventId) { diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h index 007d791c07066b..2880226ecb9d14 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h @@ -426,6 +426,8 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Switch::Events::MultiPressComplete::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::BooleanState::Events::StateChange::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::IcdManagement::Events::OnTransitionToActiveMode::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::OvenCavityOperationalState::Events::OperationalError::DecodableType & value); static CHIP_ERROR diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h index bdfa874c995304..7b9ab81c027db2 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -49229,6 +49229,7 @@ class SubscribeAttributeBooleanStateClusterRevision : public SubscribeAttribute | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | +| * OnTransitionToActiveMode | 0x0000 | \*----------------------------------------------------------------------------*/ #if MTR_ENABLE_PROVISIONAL @@ -176350,6 +176351,8 @@ void registerClusterIcdManagement(Commands & commands) make_unique(), // make_unique(), // #endif // MTR_ENABLE_PROVISIONAL + make_unique(Id), // + make_unique(Id), // }; commands.RegisterCluster(clusterName, clusterCommands);