From 2820fd7763596132a17a69b81a37864b3324f9d6 Mon Sep 17 00:00:00 2001 From: Mathieu Kardous Date: Tue, 29 Nov 2022 16:27:32 -0500 Subject: [PATCH 1/9] Initial Structure for client monitoring cluster --- .../client-monitoring-server.cpp | 52 +++++++++++++++++++ .../client-monitoring-server.h | 23 ++++++++ src/app/zap-templates/zcl/data-model/all.xml | 1 + .../chip/client-monitoring-cluster.xml | 49 +++++++++++++++++ .../zcl/zcl-with-test-extensions.json | 1 + src/app/zap-templates/zcl/zcl.json | 1 + src/app/zap_cluster_list.py | 1 + 7 files changed, 128 insertions(+) create mode 100644 src/app/clusters/client-monitoring-server/client-monitoring-server.cpp create mode 100644 src/app/clusters/client-monitoring-server/client-monitoring-server.h create mode 100644 src/app/zap-templates/zcl/data-model/chip/client-monitoring-cluster.xml diff --git a/src/app/clusters/client-monitoring-server/client-monitoring-server.cpp b/src/app/clusters/client-monitoring-server/client-monitoring-server.cpp new file mode 100644 index 00000000000000..02cc4bfcb9ae85 --- /dev/null +++ b/src/app/clusters/client-monitoring-server/client-monitoring-server.cpp @@ -0,0 +1,52 @@ +/** + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "client-monitoring-server.h" + +#include +#include +#include +#include +#include +#include + +using namespace chip; +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::ClientMonitoring; + +/** + * @brief Client Monitoring Cluster RegisterClientMonitoring Command callback (from client) + */ +bool emberAfClientMonitoringClusterRegisterClientMonitoringCallback( + app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, + const Commands::RegisterClientMonitoring::DecodableType & commandData) +{ + emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_UNSUPPORTED_COMMAND); + return false; +} +/** + * @brief Client Monitoring Cluster StayAwakeRequest Command callback (from client) + */ +bool emberAfClientMonitoringClusterStayAwakeRequestCallback(app::CommandHandler * commandObj, + const chip::app::ConcreteCommandPath & commandPath, + const Commands::StayAwakeRequest::DecodableType & commandData) +{ + emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_UNSUPPORTED_COMMAND); + return false; +} + +void MatterClientMonitoringPluginServerInitCallback() {} diff --git a/src/app/clusters/client-monitoring-server/client-monitoring-server.h b/src/app/clusters/client-monitoring-server/client-monitoring-server.h new file mode 100644 index 00000000000000..68a536760f3990 --- /dev/null +++ b/src/app/clusters/client-monitoring-server/client-monitoring-server.h @@ -0,0 +1,23 @@ +/** + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include +#include diff --git a/src/app/zap-templates/zcl/data-model/all.xml b/src/app/zap-templates/zcl/data-model/all.xml index c050af49dcafa5..9126b0ff26101a 100644 --- a/src/app/zap-templates/zcl/data-model/all.xml +++ b/src/app/zap-templates/zcl/data-model/all.xml @@ -13,6 +13,7 @@ + diff --git a/src/app/zap-templates/zcl/data-model/chip/client-monitoring-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/client-monitoring-cluster.xml new file mode 100644 index 00000000000000..92321b8d016503 --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/chip/client-monitoring-cluster.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + General + Client Monitoring + 0x0046 + CLIENT_MONITORING_CLUSTER + Client Monitoring allows for ensuring that listed clients meet the required monitoring conditions on the server. + IdleModeInterval + ActiveModeInterval + ActiveModeThreshold + RegisteredClients + + + Register a client to the end device + + + + + + Request the end device to stay in Active Mode for an additional ActiveModeThreshold + + + + diff --git a/src/app/zap-templates/zcl/zcl-with-test-extensions.json b/src/app/zap-templates/zcl/zcl-with-test-extensions.json index 241753199a7105..51f9acc0a93d58 100644 --- a/src/app/zap-templates/zcl/zcl-with-test-extensions.json +++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json @@ -25,6 +25,7 @@ "chip-ota.xml", "chip-types.xml", "channel-cluster.xml", + "client-monitoring-cluster.xml", "clusters-extensions.xml", "content-launch-cluster.xml", "descriptor-cluster.xml", diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index 801b04b57c0c94..52f482acb70847 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -20,6 +20,7 @@ "chip-ota.xml", "chip-types.xml", "channel-cluster.xml", + "client-monitoring-cluster.xml", "clusters-extensions.xml", "content-launch-cluster.xml", "descriptor-cluster.xml", diff --git a/src/app/zap_cluster_list.py b/src/app/zap_cluster_list.py index 11b3c21f05623b..8a6e018c934420 100755 --- a/src/app/zap_cluster_list.py +++ b/src/app/zap_cluster_list.py @@ -25,6 +25,7 @@ 'ACTIONS_CLUSTER': [], 'BRIDGED_DEVICE_BASIC_CLUSTER': ['bridged-device-basic-information-server'], 'CHANNEL_CLUSTER': ['channel-server'], + 'CLIENT_MONITORING_CLUSTER': ['client-monitoring-server'], 'COLOR_CONTROL_CLUSTER': ['color-control-server'], 'COMMISSIONING_CLUSTER': [], 'CONTENT_LAUNCHER_CLUSTER': ['content-launch-server'], From 5255e101a9e301417778492331c4c81b36b2d318 Mon Sep 17 00:00:00 2001 From: Mathieu Kardous Date: Wed, 30 Nov 2022 14:29:21 -0500 Subject: [PATCH 2/9] generated files --- .../python/chip/clusters/Objects.py | 225 +++++++++++++++++ .../CHIP/zap-generated/MTRClusterConstants.h | 59 +++++ .../zap-generated/MTRCommandPayloadsObjc.h | 42 +++ .../zap-generated/MTRCommandPayloadsObjc.mm | 54 ++++ .../CHIP/zap-generated/MTRStructsObjc.h | 8 + .../CHIP/zap-generated/MTRStructsObjc.mm | 31 +++ .../app-common/zap-generated/af-structs.h | 7 + .../app-common/zap-generated/attribute-id.h | 10 + .../zap-generated/attributes/Accessors.cpp | 161 ++++++++++++ .../zap-generated/attributes/Accessors.h | 31 +++ .../app-common/zap-generated/callback.h | 118 +++++++++ .../app-common/zap-generated/cluster-enums.h | 3 + .../app-common/zap-generated/cluster-id.h | 239 ++++++++++++++++++ .../zap-generated/cluster-objects.cpp | 173 +++++++++++++ .../zap-generated/cluster-objects.h | 209 +++++++++++++++ .../app-common/zap-generated/command-id.h | 4 + .../app-common/zap-generated/ids/Attributes.h | 42 +++ .../app-common/zap-generated/ids/Clusters.h | 3 + .../app-common/zap-generated/ids/Commands.h | 14 + .../app-common/zap-generated/print-cluster.h | 7 + .../zap-generated/cluster/Commands.h | 133 ++++++++++ .../cluster/ComplexArgumentParser.cpp | 25 ++ .../cluster/ComplexArgumentParser.h | 4 + .../cluster/logging/DataModelLogger.cpp | 25 ++ .../cluster/logging/DataModelLogger.h | 2 + .../zap-generated/cluster/Commands.h | 1 + 26 files changed, 1630 insertions(+) create mode 100644 zzz_generated/app-common/app-common/zap-generated/cluster-id.h diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index ebe66dee75d117..e74cd71ccd9422 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -12954,6 +12954,231 @@ def descriptor(cls) -> ClusterObjectDescriptor: stateValue: 'bool' = False +@dataclass +class ClientMonitoring(Cluster): + id: typing.ClassVar[int] = 0x0046 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields = [ + ClusterObjectFieldDescriptor(Label="idleModeInterval", Tag=0x00000000, Type=uint), + ClusterObjectFieldDescriptor(Label="activeModeInterval", Tag=0x00000001, Type=uint), + ClusterObjectFieldDescriptor(Label="activeModeThreshold", Tag=0x00000002, Type=uint), + ClusterObjectFieldDescriptor(Label="registeredClients", Tag=0x00000003, Type=typing.List[ClientMonitoring.Structs.MonitoringRegistration]), + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + idleModeInterval: 'uint' = None + activeModeInterval: 'uint' = None + activeModeThreshold: 'uint' = None + registeredClients: 'typing.List[ClientMonitoring.Structs.MonitoringRegistration]' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + + + class Structs: + @dataclass + class MonitoringRegistration(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields = [ + ClusterObjectFieldDescriptor(Label="clientNodeId", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="ICid", Tag=1, Type=uint), + ]) + + clientNodeId: 'uint' = 0 + ICid: 'uint' = 0 + + + + class Commands: + @dataclass + class RegisterClientMonitoring(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0046 + command_id: typing.ClassVar[int] = 0x0000 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields = [ + ClusterObjectFieldDescriptor(Label="clientRegistrationData", Tag=0, Type=ClientMonitoring.Structs.MonitoringRegistration), + ]) + + clientRegistrationData: 'ClientMonitoring.Structs.MonitoringRegistration' = field(default_factory=lambda: ClientMonitoring.Structs.MonitoringRegistration()) + + @dataclass + class StayAwakeRequest(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0046 + command_id: typing.ClassVar[int] = 0x0001 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields = [ + ]) + + + + class Attributes: + @dataclass + class IdleModeInterval(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0046 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class ActiveModeInterval(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0046 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000001 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class ActiveModeThreshold(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0046 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000002 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class RegisteredClients(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0046 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000003 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[ClientMonitoring.Structs.MonitoringRegistration]) + + value: 'typing.List[ClientMonitoring.Structs.MonitoringRegistration]' = field(default_factory=lambda: []) + + @dataclass + class GeneratedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0046 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF8 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AcceptedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0046 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF9 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0046 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class FeatureMap(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0046 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFC + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class ClusterRevision(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0046 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFD + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + + @dataclass class ModeSelect(Cluster): id: typing.ClassVar[int] = 0x0050 diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index 63896e7e95f830..433f5ef34c4503 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -66,6 +66,7 @@ typedef NS_ENUM(uint32_t, MTRClusterIDType) { MTRClusterProxyDiscoveryID MTR_NEWLY_DEPRECATED("Please use MTRClusterIDTypeProxyDiscoveryID") = 0x00000043, MTRClusterProxyValidID MTR_NEWLY_DEPRECATED("Please use MTRClusterIDTypeProxyValidID") = 0x00000044, MTRClusterBooleanStateID MTR_NEWLY_DEPRECATED("Please use MTRClusterIDTypeBooleanStateID") = 0x00000045, + MTRClusterClientMonitoringID MTR_NEWLY_DEPRECATED("Please use MTRClusterIDTypeClientMonitoringID") = 0x00000046, MTRClusterModeSelectID MTR_NEWLY_DEPRECATED("Please use MTRClusterIDTypeModeSelectID") = 0x00000050, MTRClusterDoorLockID MTR_NEWLY_DEPRECATED("Please use MTRClusterIDTypeDoorLockID") = 0x00000101, MTRClusterWindowCoveringID MTR_NEWLY_DEPRECATED("Please use MTRClusterIDTypeWindowCoveringID") = 0x00000102, @@ -141,6 +142,7 @@ typedef NS_ENUM(uint32_t, MTRClusterIDType) { MTRClusterIDTypeProxyDiscoveryID MTR_NEWLY_AVAILABLE = 0x00000043, MTRClusterIDTypeProxyValidID MTR_NEWLY_AVAILABLE = 0x00000044, MTRClusterIDTypeBooleanStateID MTR_NEWLY_AVAILABLE = 0x00000045, + MTRClusterIDTypeClientMonitoringID MTR_NEWLY_AVAILABLE = 0x00000046, MTRClusterIDTypeModeSelectID MTR_NEWLY_AVAILABLE = 0x00000050, MTRClusterIDTypeDoorLockID MTR_NEWLY_AVAILABLE = 0x00000101, MTRClusterIDTypeWindowCoveringID MTR_NEWLY_AVAILABLE = 0x00000102, @@ -2381,6 +2383,51 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterBooleanStateAttributeClusterRevisionID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + // Cluster ClientMonitoring deprecated attribute names + MTRClusterClientMonitoringAttributeIdleModeIntervalID MTR_NEWLY_DEPRECATED( + "Please use MTRAttributeIDTypeClusterClientMonitoringAttributeIdleModeIntervalID") + = 0x00000000, + MTRClusterClientMonitoringAttributeActiveModeIntervalID MTR_NEWLY_DEPRECATED( + "Please use MTRAttributeIDTypeClusterClientMonitoringAttributeActiveModeIntervalID") + = 0x00000001, + MTRClusterClientMonitoringAttributeActiveModeThresholdID MTR_NEWLY_DEPRECATED( + "Please use MTRAttributeIDTypeClusterClientMonitoringAttributeActiveModeThresholdID") + = 0x00000002, + MTRClusterClientMonitoringAttributeRegisteredClientsID MTR_NEWLY_DEPRECATED( + "Please use MTRAttributeIDTypeClusterClientMonitoringAttributeRegisteredClientsID") + = 0x00000003, + MTRClusterClientMonitoringAttributeGeneratedCommandListID MTR_NEWLY_DEPRECATED( + "Please use MTRAttributeIDTypeClusterClientMonitoringAttributeGeneratedCommandListID") + = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterClientMonitoringAttributeAcceptedCommandListID MTR_NEWLY_DEPRECATED( + "Please use MTRAttributeIDTypeClusterClientMonitoringAttributeAcceptedCommandListID") + = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterClientMonitoringAttributeAttributeListID MTR_NEWLY_DEPRECATED( + "Please use MTRAttributeIDTypeClusterClientMonitoringAttributeAttributeListID") + = MTRClusterGlobalAttributeAttributeListID, + MTRClusterClientMonitoringAttributeFeatureMapID MTR_NEWLY_DEPRECATED( + "Please use MTRAttributeIDTypeClusterClientMonitoringAttributeFeatureMapID") + = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterClientMonitoringAttributeClusterRevisionID MTR_NEWLY_DEPRECATED( + "Please use MTRAttributeIDTypeClusterClientMonitoringAttributeClusterRevisionID") + = MTRClusterGlobalAttributeClusterRevisionID, + + // Cluster ClientMonitoring attributes + MTRAttributeIDTypeClusterClientMonitoringAttributeIdleModeIntervalID MTR_NEWLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterClientMonitoringAttributeActiveModeIntervalID MTR_NEWLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterClientMonitoringAttributeActiveModeThresholdID MTR_NEWLY_AVAILABLE = 0x00000002, + MTRAttributeIDTypeClusterClientMonitoringAttributeRegisteredClientsID MTR_NEWLY_AVAILABLE = 0x00000003, + MTRAttributeIDTypeClusterClientMonitoringAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterClientMonitoringAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterClientMonitoringAttributeAttributeListID MTR_NEWLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterClientMonitoringAttributeFeatureMapID MTR_NEWLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterClientMonitoringAttributeClusterRevisionID MTR_NEWLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + // Cluster ModeSelect deprecated attribute names MTRClusterModeSelectAttributeDescriptionID MTR_NEWLY_DEPRECATED( "Please use MTRAttributeIDTypeClusterModeSelectAttributeDescriptionID") @@ -5750,6 +5797,18 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterGroupKeyManagementCommandKeySetReadAllIndicesID MTR_NEWLY_AVAILABLE = 0x00000004, MTRCommandIDTypeClusterGroupKeyManagementCommandKeySetReadAllIndicesResponseID MTR_NEWLY_AVAILABLE = 0x00000005, + // Cluster ClientMonitoring deprecated command id names + MTRClusterClientMonitoringCommandRegisterClientMonitoringID MTR_NEWLY_DEPRECATED( + "Please use MTRCommandIDTypeClusterClientMonitoringCommandRegisterClientMonitoringID") + = 0x00000000, + MTRClusterClientMonitoringCommandStayAwakeRequestID MTR_NEWLY_DEPRECATED( + "Please use MTRCommandIDTypeClusterClientMonitoringCommandStayAwakeRequestID") + = 0x00000001, + + // Cluster ClientMonitoring commands + MTRCommandIDTypeClusterClientMonitoringCommandRegisterClientMonitoringID MTR_NEWLY_AVAILABLE = 0x00000000, + MTRCommandIDTypeClusterClientMonitoringCommandStayAwakeRequestID MTR_NEWLY_AVAILABLE = 0x00000001, + // Cluster ModeSelect deprecated command id names MTRClusterModeSelectCommandChangeToModeID MTR_NEWLY_DEPRECATED( "Please use MTRCommandIDTypeClusterModeSelectCommandChangeToModeID") diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index 6ce42082934421..0fce080819128b 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -2770,6 +2770,48 @@ MTR_NEWLY_DEPRECATED("Please use MTROTASoftwareUpdateRequestorClusterAnnounceOta @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_NEWLY_DEPRECATED("Timed invoke does not make sense for server to client commands"); +- (instancetype)init; +- (id)copyWithZone:(NSZone * _Nullable)zone; +@end +@interface MTRClientMonitoringClusterRegisterClientMonitoringParams : NSObject + +@property (nonatomic, copy) MTRClientMonitoringClusterMonitoringRegistration * _Nonnull clientRegistrationData; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +- (instancetype)init; +- (id)copyWithZone:(NSZone * _Nullable)zone; +@end +@interface MTRClientMonitoringClusterStayAwakeRequestParams : NSObject +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + - (instancetype)init; - (id)copyWithZone:(NSZone * _Nullable)zone; @end diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index 744bd8ceaa80e1..89e27889dd6365 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -3648,6 +3648,60 @@ - (NSString *)description return descriptionString; } +@end +@implementation MTRClientMonitoringClusterRegisterClientMonitoringParams +- (instancetype)init +{ + if (self = [super init]) { + + _clientRegistrationData = [MTRClientMonitoringClusterMonitoringRegistration new]; + _timedInvokeTimeoutMs = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRClientMonitoringClusterRegisterClientMonitoringParams alloc] init]; + + other.clientRegistrationData = self.clientRegistrationData; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = + [NSString stringWithFormat:@"<%@: clientRegistrationData:%@; >", NSStringFromClass([self class]), _clientRegistrationData]; + return descriptionString; +} + +@end +@implementation MTRClientMonitoringClusterStayAwakeRequestParams +- (instancetype)init +{ + if (self = [super init]) { + _timedInvokeTimeoutMs = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRClientMonitoringClusterStayAwakeRequestParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + return descriptionString; +} + @end @implementation MTRModeSelectClusterChangeToModeParams - (instancetype)init diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index 3fc761310b2e4f..242524f33faf35 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -648,6 +648,14 @@ MTR_NEWLY_DEPRECATED("Please use MTROTASoftwareUpdateRequestorClusterDownloadErr - (id)copyWithZone:(NSZone * _Nullable)zone; @end +@interface MTRClientMonitoringClusterMonitoringRegistration : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull clientNodeId; +@property (nonatomic, copy) NSNumber * _Nonnull iCid; + +- (instancetype)init; +- (id)copyWithZone:(NSZone * _Nullable)zone; +@end + @interface MTRModeSelectClusterSemanticTag : NSObject @property (nonatomic, copy) NSNumber * _Nonnull mfgCode; @property (nonatomic, copy) NSNumber * _Nonnull value; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index 78f31666267b70..74110e9dfc2647 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -2355,6 +2355,37 @@ - (NSString *)description @end +@implementation MTRClientMonitoringClusterMonitoringRegistration +- (instancetype)init +{ + if (self = [super init]) { + + _clientNodeId = @(0); + + _iCid = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRClientMonitoringClusterMonitoringRegistration alloc] init]; + + other.clientNodeId = self.clientNodeId; + other.iCid = self.iCid; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = + [NSString stringWithFormat:@"<%@: clientNodeId:%@; iCid:%@; >", NSStringFromClass([self class]), _clientNodeId, _iCid]; + return descriptionString; +} + +@end + @implementation MTRModeSelectClusterSemanticTag - (instancetype)init { diff --git a/zzz_generated/app-common/app-common/zap-generated/af-structs.h b/zzz_generated/app-common/app-common/zap-generated/af-structs.h index 3c1d5866c587f0..e8a92ece4d4351 100644 --- a/zzz_generated/app-common/app-common/zap-generated/af-structs.h +++ b/zzz_generated/app-common/app-common/zap-generated/af-structs.h @@ -368,6 +368,13 @@ typedef struct _LineupInfo uint8_t lineupInfoType; } LineupInfo; +// Struct for MonitoringRegistration +typedef struct _MonitoringRegistration +{ + chip::NodeId ClientNodeId; + uint64_t ICid; +} MonitoringRegistration; + // Struct for NOCStruct typedef struct _NOCStruct { diff --git a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h index ae5e84a0245133..a4657c1b8d55a5 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h +++ b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h @@ -538,6 +538,16 @@ // Server attributes #define ZCL_STATE_VALUE_ATTRIBUTE_ID (0x0000) +// Attribute ids for cluster: Client Monitoring + +// Client attributes + +// Server attributes +#define ZCL_IDLE_MODE_INTERVAL_ATTRIBUTE_ID (0x0000) +#define ZCL_ACTIVE_MODE_INTERVAL_ATTRIBUTE_ID (0x0001) +#define ZCL_ACTIVE_MODE_THRESHOLD_ATTRIBUTE_ID (0x0002) +#define ZCL_REGISTERED_CLIENTS_ATTRIBUTE_ID (0x0003) + // Attribute ids for cluster: Mode Select // Client attributes 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 aba2445a5cba5d..2617d8d107b032 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 @@ -11197,6 +11197,167 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) } // namespace Attributes } // namespace BooleanState +namespace ClientMonitoring { +namespace Attributes { + +namespace IdleModeInterval { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ClientMonitoring::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ClientMonitoring::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); +} + +} // namespace IdleModeInterval + +namespace ActiveModeInterval { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ClientMonitoring::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ClientMonitoring::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); +} + +} // namespace ActiveModeInterval + +namespace ActiveModeThreshold { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ClientMonitoring::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ClientMonitoring::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ActiveModeThreshold + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ClientMonitoring::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ClientMonitoring::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ClientMonitoring::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ClientMonitoring::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace ClientMonitoring + namespace ModeSelect { namespace Attributes { 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 e1e6b3dd21d05d..190498cd8ce223 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 @@ -1963,6 +1963,37 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace Attributes } // namespace BooleanState +namespace ClientMonitoring { +namespace Attributes { + +namespace IdleModeInterval { +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // int32u +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +} // namespace IdleModeInterval + +namespace ActiveModeInterval { +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // int32u +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +} // namespace ActiveModeInterval + +namespace ActiveModeThreshold { +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +} // namespace ActiveModeThreshold + +namespace FeatureMap { +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace ClientMonitoring + namespace ModeSelect { namespace Attributes { diff --git a/zzz_generated/app-common/app-common/zap-generated/callback.h b/zzz_generated/app-common/app-common/zap-generated/callback.h index 6669d106cd3da8..7d5afd14ff48bc 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -354,6 +354,14 @@ void emberAfProxyValidClusterInitCallback(chip::EndpointId endpoint); */ void emberAfBooleanStateClusterInitCallback(chip::EndpointId endpoint); +/** @brief Client Monitoring Cluster Init + * + * Cluster Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfClientMonitoringClusterInitCallback(chip::EndpointId endpoint); + /** @brief Mode Select Cluster Init * * Cluster Init @@ -4454,6 +4462,104 @@ void emberAfBooleanStateClusterServerTickCallback(chip::EndpointId endpoint); */ void emberAfBooleanStateClusterClientTickCallback(chip::EndpointId endpoint); +// +// Client Monitoring Cluster +// + +/** @brief Client Monitoring Cluster Server Init + * + * Server Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfClientMonitoringClusterServerInitCallback(chip::EndpointId endpoint); + +/** @brief Client Monitoring Cluster Client Init + * + * Client Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfClientMonitoringClusterClientInitCallback(chip::EndpointId endpoint); + +/** @brief Client Monitoring Cluster Server Attribute Changed + * + * Server Attribute Changed + * + * @param attributePath Concrete attribute path that changed + */ +void MatterClientMonitoringClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); + +/** @brief Client Monitoring Cluster Server Message Sent + * + * Server Message Sent + * + * @param destination The destination to which the message was sent + * @param apsFrame The APS frame for the message + * @param msgLen The length of the message + * @param message The message that was sent + * @param status The status of the sent message + */ +void emberAfClientMonitoringClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); + +/** @brief Client Monitoring Cluster Client Message Sent + * + * Client Message Sent + * + * @param destination The destination to which the message was sent + * @param apsFrame The APS frame for the message + * @param msgLen The length of the message + * @param message The message that was sent + * @param status The status of the sent message + */ +void emberAfClientMonitoringClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); + +/** @brief Client Monitoring Cluster Server Pre Attribute Changed + * + * Server Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status +MatterClientMonitoringClusterServerPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, + EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Client Monitoring Cluster Client Pre Attribute Changed + * + * Client Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status +MatterClientMonitoringClusterClientPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, + EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Client Monitoring Cluster Server Tick + * + * Server Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfClientMonitoringClusterServerTickCallback(chip::EndpointId endpoint); + +/** @brief Client Monitoring Cluster Client Tick + * + * Client Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfClientMonitoringClusterClientTickCallback(chip::EndpointId endpoint); + // // Mode Select Cluster // @@ -8096,6 +8202,18 @@ bool emberAfGroupKeyManagementClusterKeySetReadAllIndicesCallback( bool emberAfGroupKeyManagementClusterKeySetReadAllIndicesResponseCallback( chip::EndpointId endpoint, chip::app::CommandSender * commandObj, /* TYPE WARNING: array array defaults to */ uint8_t * GroupKeySetIDs); +/** + * @brief Client Monitoring Cluster RegisterClientMonitoring Command callback (from client) + */ +bool emberAfClientMonitoringClusterRegisterClientMonitoringCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::ClientMonitoring::Commands::RegisterClientMonitoring::DecodableType & commandData); +/** + * @brief Client Monitoring Cluster StayAwakeRequest Command callback (from client) + */ +bool emberAfClientMonitoringClusterStayAwakeRequestCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::ClientMonitoring::Commands::StayAwakeRequest::DecodableType & commandData); /** * @brief Mode Select Cluster ChangeToMode Command callback (from client) */ 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 b71d81dba7eaaf..58028cb31246d0 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 @@ -1028,6 +1028,9 @@ namespace ProxyValid { namespace BooleanState { } // namespace BooleanState +namespace ClientMonitoring { +} // namespace ClientMonitoring + namespace ModeSelect { // Bitmap for ModeSelectFeature diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-id.h b/zzz_generated/app-common/app-common/zap-generated/cluster-id.h new file mode 100644 index 00000000000000..087eb6fd1ae65c --- /dev/null +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-id.h @@ -0,0 +1,239 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// THIS FILE IS GENERATED BY ZAP + +// Prevent multiple inclusion +#pragma once + +#include + +// Definitions for cluster: Identify +static constexpr chip::ClusterId ZCL_IDENTIFY_CLUSTER_ID = 0x0003; + +// Definitions for cluster: Groups +static constexpr chip::ClusterId ZCL_GROUPS_CLUSTER_ID = 0x0004; + +// Definitions for cluster: Scenes +static constexpr chip::ClusterId ZCL_SCENES_CLUSTER_ID = 0x0005; + +// Definitions for cluster: On/Off +static constexpr chip::ClusterId ZCL_ON_OFF_CLUSTER_ID = 0x0006; + +// Definitions for cluster: On/off Switch Configuration +static constexpr chip::ClusterId ZCL_ON_OFF_SWITCH_CONFIGURATION_CLUSTER_ID = 0x0007; + +// Definitions for cluster: Level Control +static constexpr chip::ClusterId ZCL_LEVEL_CONTROL_CLUSTER_ID = 0x0008; + +// Definitions for cluster: Binary Input (Basic) +static constexpr chip::ClusterId ZCL_BINARY_INPUT_BASIC_CLUSTER_ID = 0x000F; + +// Definitions for cluster: Pulse Width Modulation +static constexpr chip::ClusterId ZCL_PWM_CLUSTER_ID = 0x001C; + +// Definitions for cluster: Descriptor +static constexpr chip::ClusterId ZCL_DESCRIPTOR_CLUSTER_ID = 0x001D; + +// Definitions for cluster: Binding +static constexpr chip::ClusterId ZCL_BINDING_CLUSTER_ID = 0x001E; + +// Definitions for cluster: Access Control +static constexpr chip::ClusterId ZCL_ACCESS_CONTROL_CLUSTER_ID = 0x001F; + +// Definitions for cluster: Actions +static constexpr chip::ClusterId ZCL_ACTIONS_CLUSTER_ID = 0x0025; + +// Definitions for cluster: Basic +static constexpr chip::ClusterId ZCL_BASIC_CLUSTER_ID = 0x0028; + +// Definitions for cluster: OTA Software Update Provider +static constexpr chip::ClusterId ZCL_OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER_ID = 0x0029; + +// Definitions for cluster: OTA Software Update Requestor +static constexpr chip::ClusterId ZCL_OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER_ID = 0x002A; + +// Definitions for cluster: Localization Configuration +static constexpr chip::ClusterId ZCL_LOCALIZATION_CONFIGURATION_CLUSTER_ID = 0x002B; + +// Definitions for cluster: Time Format Localization +static constexpr chip::ClusterId ZCL_TIME_FORMAT_LOCALIZATION_CLUSTER_ID = 0x002C; + +// Definitions for cluster: Unit Localization +static constexpr chip::ClusterId ZCL_UNIT_LOCALIZATION_CLUSTER_ID = 0x002D; + +// Definitions for cluster: Power Source Configuration +static constexpr chip::ClusterId ZCL_POWER_SOURCE_CONFIGURATION_CLUSTER_ID = 0x002E; + +// Definitions for cluster: Power Source +static constexpr chip::ClusterId ZCL_POWER_SOURCE_CLUSTER_ID = 0x002F; + +// Definitions for cluster: General Commissioning +static constexpr chip::ClusterId ZCL_GENERAL_COMMISSIONING_CLUSTER_ID = 0x0030; + +// Definitions for cluster: Network Commissioning +static constexpr chip::ClusterId ZCL_NETWORK_COMMISSIONING_CLUSTER_ID = 0x0031; + +// Definitions for cluster: Diagnostic Logs +static constexpr chip::ClusterId ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID = 0x0032; + +// Definitions for cluster: General Diagnostics +static constexpr chip::ClusterId ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID = 0x0033; + +// Definitions for cluster: Software Diagnostics +static constexpr chip::ClusterId ZCL_SOFTWARE_DIAGNOSTICS_CLUSTER_ID = 0x0034; + +// Definitions for cluster: Thread Network Diagnostics +static constexpr chip::ClusterId ZCL_THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID = 0x0035; + +// Definitions for cluster: WiFi Network Diagnostics +static constexpr chip::ClusterId ZCL_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID = 0x0036; + +// Definitions for cluster: Ethernet Network Diagnostics +static constexpr chip::ClusterId ZCL_ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_ID = 0x0037; + +// Definitions for cluster: Time Synchronization +static constexpr chip::ClusterId ZCL_TIME_SYNCHRONIZATION_CLUSTER_ID = 0x0038; + +// Definitions for cluster: Bridged Device Basic +static constexpr chip::ClusterId ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID = 0x0039; + +// Definitions for cluster: Switch +static constexpr chip::ClusterId ZCL_SWITCH_CLUSTER_ID = 0x003B; + +// Definitions for cluster: AdministratorCommissioning +static constexpr chip::ClusterId ZCL_ADMINISTRATOR_COMMISSIONING_CLUSTER_ID = 0x003C; + +// Definitions for cluster: Operational Credentials +static constexpr chip::ClusterId ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID = 0x003E; + +// Definitions for cluster: Group Key Management +static constexpr chip::ClusterId ZCL_GROUP_KEY_MANAGEMENT_CLUSTER_ID = 0x003F; + +// Definitions for cluster: Fixed Label +static constexpr chip::ClusterId ZCL_FIXED_LABEL_CLUSTER_ID = 0x0040; + +// Definitions for cluster: User Label +static constexpr chip::ClusterId ZCL_USER_LABEL_CLUSTER_ID = 0x0041; + +// Definitions for cluster: Proxy Configuration +static constexpr chip::ClusterId ZCL_PROXY_CONFIGURATION_CLUSTER_ID = 0x0042; + +// Definitions for cluster: Proxy Discovery +static constexpr chip::ClusterId ZCL_PROXY_DISCOVERY_CLUSTER_ID = 0x0043; + +// Definitions for cluster: Proxy Valid +static constexpr chip::ClusterId ZCL_PROXY_VALID_CLUSTER_ID = 0x0044; + +// Definitions for cluster: Boolean State +static constexpr chip::ClusterId ZCL_BOOLEAN_STATE_CLUSTER_ID = 0x0045; + +// Definitions for cluster: Client Monitoring +static constexpr chip::ClusterId ZCL_CLIENT_MONITORING_CLUSTER_ID = 0x0046; + +// Definitions for cluster: Mode Select +static constexpr chip::ClusterId ZCL_MODE_SELECT_CLUSTER_ID = 0x0050; + +// Definitions for cluster: Door Lock +static constexpr chip::ClusterId ZCL_DOOR_LOCK_CLUSTER_ID = 0x0101; + +// Definitions for cluster: Window Covering +static constexpr chip::ClusterId ZCL_WINDOW_COVERING_CLUSTER_ID = 0x0102; + +// Definitions for cluster: Barrier Control +static constexpr chip::ClusterId ZCL_BARRIER_CONTROL_CLUSTER_ID = 0x0103; + +// Definitions for cluster: Pump Configuration and Control +static constexpr chip::ClusterId ZCL_PUMP_CONFIGURATION_AND_CONTROL_CLUSTER_ID = 0x0200; + +// Definitions for cluster: Thermostat +static constexpr chip::ClusterId ZCL_THERMOSTAT_CLUSTER_ID = 0x0201; + +// Definitions for cluster: Fan Control +static constexpr chip::ClusterId ZCL_FAN_CONTROL_CLUSTER_ID = 0x0202; + +// Definitions for cluster: Thermostat User Interface Configuration +static constexpr chip::ClusterId ZCL_THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER_ID = 0x0204; + +// Definitions for cluster: Color Control +static constexpr chip::ClusterId ZCL_COLOR_CONTROL_CLUSTER_ID = 0x0300; + +// Definitions for cluster: Ballast Configuration +static constexpr chip::ClusterId ZCL_BALLAST_CONFIGURATION_CLUSTER_ID = 0x0301; + +// Definitions for cluster: Illuminance Measurement +static constexpr chip::ClusterId ZCL_ILLUMINANCE_MEASUREMENT_CLUSTER_ID = 0x0400; + +// Definitions for cluster: Temperature Measurement +static constexpr chip::ClusterId ZCL_TEMPERATURE_MEASUREMENT_CLUSTER_ID = 0x0402; + +// Definitions for cluster: Pressure Measurement +static constexpr chip::ClusterId ZCL_PRESSURE_MEASUREMENT_CLUSTER_ID = 0x0403; + +// Definitions for cluster: Flow Measurement +static constexpr chip::ClusterId ZCL_FLOW_MEASUREMENT_CLUSTER_ID = 0x0404; + +// Definitions for cluster: Relative Humidity Measurement +static constexpr chip::ClusterId ZCL_RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_ID = 0x0405; + +// Definitions for cluster: Occupancy Sensing +static constexpr chip::ClusterId ZCL_OCCUPANCY_SENSING_CLUSTER_ID = 0x0406; + +// Definitions for cluster: Wake on LAN +static constexpr chip::ClusterId ZCL_WAKE_ON_LAN_CLUSTER_ID = 0x0503; + +// Definitions for cluster: Channel +static constexpr chip::ClusterId ZCL_CHANNEL_CLUSTER_ID = 0x0504; + +// Definitions for cluster: Target Navigator +static constexpr chip::ClusterId ZCL_TARGET_NAVIGATOR_CLUSTER_ID = 0x0505; + +// Definitions for cluster: Media Playback +static constexpr chip::ClusterId ZCL_MEDIA_PLAYBACK_CLUSTER_ID = 0x0506; + +// Definitions for cluster: Media Input +static constexpr chip::ClusterId ZCL_MEDIA_INPUT_CLUSTER_ID = 0x0507; + +// Definitions for cluster: Low Power +static constexpr chip::ClusterId ZCL_LOW_POWER_CLUSTER_ID = 0x0508; + +// Definitions for cluster: Keypad Input +static constexpr chip::ClusterId ZCL_KEYPAD_INPUT_CLUSTER_ID = 0x0509; + +// Definitions for cluster: Content Launcher +static constexpr chip::ClusterId ZCL_CONTENT_LAUNCHER_CLUSTER_ID = 0x050A; + +// Definitions for cluster: Audio Output +static constexpr chip::ClusterId ZCL_AUDIO_OUTPUT_CLUSTER_ID = 0x050B; + +// Definitions for cluster: Application Launcher +static constexpr chip::ClusterId ZCL_APPLICATION_LAUNCHER_CLUSTER_ID = 0x050C; + +// Definitions for cluster: Application Basic +static constexpr chip::ClusterId ZCL_APPLICATION_BASIC_CLUSTER_ID = 0x050D; + +// Definitions for cluster: Account Login +static constexpr chip::ClusterId ZCL_ACCOUNT_LOGIN_CLUSTER_ID = 0x050E; + +// Definitions for cluster: Electrical Measurement +static constexpr chip::ClusterId ZCL_ELECTRICAL_MEASUREMENT_CLUSTER_ID = 0x0B04; + +// Definitions for cluster: Unit Testing +static constexpr chip::ClusterId ZCL_UNIT_TESTING_CLUSTER_ID = 0xFFF1FC05; + +// Definitions for cluster: Fault Injection +static constexpr chip::ClusterId ZCL_FAULT_INJECTION_CLUSTER_ID = 0xFFF1FC06; 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 37fdb4628962f7..15c3dbe9b3e3eb 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 @@ -10177,6 +10177,172 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } // namespace Events } // namespace BooleanState +namespace ClientMonitoring { +namespace Structs { +namespace MonitoringRegistration { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kClientNodeId)), clientNodeId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kICid)), ICid)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + err = reader.EnterContainer(outer); + ReturnErrorOnFailure(err); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + if (!TLV::IsContextTag(reader.GetTag())) + { + continue; + } + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kClientNodeId): + ReturnErrorOnFailure(DataModel::Decode(reader, clientNodeId)); + break; + case to_underlying(Fields::kICid): + ReturnErrorOnFailure(DataModel::Decode(reader, ICid)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; +} + +} // namespace MonitoringRegistration +} // namespace Structs + +namespace Commands { +namespace RegisterClientMonitoring { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure( + DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kClientRegistrationData)), clientRegistrationData)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + if (!TLV::IsContextTag(reader.GetTag())) + { + continue; + } + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kClientRegistrationData): + ReturnErrorOnFailure(DataModel::Decode(reader, clientRegistrationData)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace RegisterClientMonitoring. +namespace StayAwakeRequest { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + if (!TLV::IsContextTag(reader.GetTag())) + { + continue; + } + switch (TLV::TagNumFromTag(reader.GetTag())) + { + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace StayAwakeRequest. +} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::IdleModeInterval::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, idleModeInterval)); + break; + case Attributes::ActiveModeInterval::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, activeModeInterval)); + break; + case Attributes::ActiveModeThreshold::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, activeModeThreshold)); + break; + case Attributes::RegisteredClients::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, registeredClients)); + break; + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, generatedCommandList)); + break; + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, acceptedCommandList)); + break; + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, attributeList)); + break; + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, featureMap)); + break; + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, clusterRevision)); + break; + default: + break; + } + + return CHIP_NO_ERROR; +} +} // namespace Attributes + +namespace Events { +} // namespace Events + +} // namespace ClientMonitoring namespace ModeSelect { namespace Structs { namespace SemanticTag { @@ -21282,6 +21448,13 @@ bool CommandIsFabricScoped(ClusterId aCluster, CommandId aCommand) return false; } } + case Clusters::ClientMonitoring::Id: { + switch (aCommand) + { + default: + return false; + } + } case Clusters::ModeSelect::Id: { switch (aCommand) { 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 4fadf5d916bf8c..bf1c8e99d78f97 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 @@ -12672,6 +12672,215 @@ struct DecodableType } // namespace StateChange } // namespace Events } // namespace BooleanState +namespace ClientMonitoring { +namespace Structs { +namespace MonitoringRegistration { +enum class Fields +{ + kClientNodeId = 0, + kICid = 1, +}; + +struct Type +{ +public: + chip::NodeId clientNodeId = static_cast(0); + uint64_t ICid = static_cast(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; +}; + +using DecodableType = Type; + +} // namespace MonitoringRegistration +} // namespace Structs + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace RegisterClientMonitoring { +struct Type; +struct DecodableType; +} // namespace RegisterClientMonitoring + +namespace StayAwakeRequest { +struct Type; +struct DecodableType; +} // namespace StayAwakeRequest + +} // namespace Commands + +namespace Commands { +namespace RegisterClientMonitoring { +enum class Fields +{ + kClientRegistrationData = 0, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::RegisterClientMonitoring::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } + + Structs::MonitoringRegistration::Type clientRegistrationData; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::RegisterClientMonitoring::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } + + Structs::MonitoringRegistration::DecodableType clientRegistrationData; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace RegisterClientMonitoring +namespace StayAwakeRequest { +enum class Fields +{ +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::StayAwakeRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::StayAwakeRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace StayAwakeRequest +} // namespace Commands + +namespace Attributes { + +namespace IdleModeInterval { +struct TypeInfo +{ + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::IdleModeInterval::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace IdleModeInterval +namespace ActiveModeInterval { +struct TypeInfo +{ + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ActiveModeInterval::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ActiveModeInterval +namespace ActiveModeThreshold { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ActiveModeThreshold::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ActiveModeThreshold +namespace RegisteredClients { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList< + chip::app::Clusters::ClientMonitoring::Structs::MonitoringRegistration::DecodableType> &; + + static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::RegisteredClients::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace RegisteredClients +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } +}; +} // namespace AcceptedCommandList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::IdleModeInterval::TypeInfo::DecodableType idleModeInterval = static_cast(0); + Attributes::ActiveModeInterval::TypeInfo::DecodableType activeModeInterval = static_cast(0); + Attributes::ActiveModeThreshold::TypeInfo::DecodableType activeModeThreshold = static_cast(0); + Attributes::RegisteredClients::TypeInfo::DecodableType registeredClients; + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace ClientMonitoring namespace ModeSelect { namespace Structs { namespace SemanticTag { diff --git a/zzz_generated/app-common/app-common/zap-generated/command-id.h b/zzz_generated/app-common/app-common/zap-generated/command-id.h index 45c8decb6fdc72..6fe8149a67e861 100644 --- a/zzz_generated/app-common/app-common/zap-generated/command-id.h +++ b/zzz_generated/app-common/app-common/zap-generated/command-id.h @@ -183,6 +183,10 @@ #define ZCL_KEY_SET_READ_ALL_INDICES_COMMAND_ID (0x04) #define ZCL_KEY_SET_READ_ALL_INDICES_RESPONSE_COMMAND_ID (0x05) +// Commands for cluster: Client Monitoring +#define ZCL_REGISTER_CLIENT_MONITORING_COMMAND_ID (0x00) +#define ZCL_STAY_AWAKE_REQUEST_COMMAND_ID (0x01) + // Commands for cluster: Mode Select #define ZCL_CHANGE_TO_MODE_COMMAND_ID (0x00) diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h index c7dce39a648afe..06c0153de1be72 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h @@ -2167,6 +2167,48 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; } // namespace Attributes } // namespace BooleanState +namespace ClientMonitoring { +namespace Attributes { + +namespace IdleModeInterval { +static constexpr AttributeId Id = 0x00000000; +} // namespace IdleModeInterval + +namespace ActiveModeInterval { +static constexpr AttributeId Id = 0x00000001; +} // namespace ActiveModeInterval + +namespace ActiveModeThreshold { +static constexpr AttributeId Id = 0x00000002; +} // namespace ActiveModeThreshold + +namespace RegisteredClients { +static constexpr AttributeId Id = 0x00000003; +} // namespace RegisteredClients + +namespace GeneratedCommandList { +static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; +} // namespace GeneratedCommandList + +namespace AcceptedCommandList { +static constexpr AttributeId Id = Globals::Attributes::AcceptedCommandList::Id; +} // namespace AcceptedCommandList + +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + +namespace FeatureMap { +static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; +} // namespace FeatureMap + +namespace ClusterRevision { +static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace ClientMonitoring + namespace ModeSelect { namespace Attributes { diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h b/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h index a5d2738c08311f..8c38eb458139f1 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h @@ -145,6 +145,9 @@ static constexpr ClusterId Id = 0x00000044; namespace BooleanState { static constexpr ClusterId Id = 0x00000045; } // namespace BooleanState +namespace ClientMonitoring { +static constexpr ClusterId Id = 0x00000046; +} // namespace ClientMonitoring namespace ModeSelect { static constexpr ClusterId Id = 0x00000050; } // namespace ModeSelect diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h index d7430e8e41f21b..3b6ac4b6c2963c 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h @@ -589,6 +589,20 @@ static constexpr CommandId Id = 0x00000005; } // namespace Commands } // namespace GroupKeyManagement +namespace ClientMonitoring { +namespace Commands { + +namespace RegisterClientMonitoring { +static constexpr CommandId Id = 0x00000000; +} // namespace RegisterClientMonitoring + +namespace StayAwakeRequest { +static constexpr CommandId Id = 0x00000001; +} // namespace StayAwakeRequest + +} // namespace Commands +} // namespace ClientMonitoring + namespace ModeSelect { namespace Commands { diff --git a/zzz_generated/app-common/app-common/zap-generated/print-cluster.h b/zzz_generated/app-common/app-common/zap-generated/print-cluster.h index c12c9c4da68c77..03d7697737c78b 100644 --- a/zzz_generated/app-common/app-common/zap-generated/print-cluster.h +++ b/zzz_generated/app-common/app-common/zap-generated/print-cluster.h @@ -278,6 +278,12 @@ #define CHIP_PRINTCLUSTER_BOOLEAN_STATE_CLUSTER #endif +#if defined(ZCL_USING_CLIENT_MONITORING_CLUSTER_SERVER) || defined(ZCL_USING_CLIENT_MONITORING_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_CLIENT_MONITORING_CLUSTER { ZCL_CLIENT_MONITORING_CLUSTER_ID, "Client Monitoring" }, +#else +#define CHIP_PRINTCLUSTER_CLIENT_MONITORING_CLUSTER +#endif + #if defined(ZCL_USING_MODE_SELECT_CLUSTER_SERVER) || defined(ZCL_USING_MODE_SELECT_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_MODE_SELECT_CLUSTER { chip::app::Clusters::ModeSelect::Id, "Mode Select" }, #else @@ -514,6 +520,7 @@ CHIP_PRINTCLUSTER_PROXY_DISCOVERY_CLUSTER \ CHIP_PRINTCLUSTER_PROXY_VALID_CLUSTER \ CHIP_PRINTCLUSTER_BOOLEAN_STATE_CLUSTER \ + CHIP_PRINTCLUSTER_CLIENT_MONITORING_CLUSTER \ CHIP_PRINTCLUSTER_MODE_SELECT_CLUSTER \ CHIP_PRINTCLUSTER_DOOR_LOCK_CLUSTER \ CHIP_PRINTCLUSTER_WINDOW_COVERING_CLUSTER \ diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 852804cdd7daff..08f7e2045935a5 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -73,6 +73,7 @@ | ProxyDiscovery | 0x0043 | | ProxyValid | 0x0044 | | BooleanState | 0x0045 | +| ClientMonitoring | 0x0046 | | ModeSelect | 0x0050 | | DoorLock | 0x0101 | | WindowCovering | 0x0102 | @@ -3661,6 +3662,91 @@ class GroupKeyManagementKeySetReadAllIndices : public ClusterCommand | * StateChange | 0x0000 | \*----------------------------------------------------------------------------*/ +/*----------------------------------------------------------------------------*\ +| Cluster ClientMonitoring | 0x0046 | +|------------------------------------------------------------------------------| +| Commands: | | +| * RegisterClientMonitoring | 0x00 | +| * StayAwakeRequest | 0x01 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * IdleModeInterval | 0x0000 | +| * ActiveModeInterval | 0x0001 | +| * ActiveModeThreshold | 0x0002 | +| * RegisteredClients | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command RegisterClientMonitoring + */ +class ClientMonitoringRegisterClientMonitoring : public ClusterCommand +{ +public: + ClientMonitoringRegisterClientMonitoring(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("register-client-monitoring", credsIssuerConfig), + mComplex_ClientRegistrationData(&mRequest.clientRegistrationData) + { + AddArgument("ClientRegistrationData", &mComplex_ClientRegistrationData); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000046) command (0x00000000) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000046, 0x00000000, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000046) command (0x00000000) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000046, 0x00000000, mRequest); + } + +private: + chip::app::Clusters::ClientMonitoring::Commands::RegisterClientMonitoring::Type mRequest; + TypedComplexArgument + mComplex_ClientRegistrationData; +}; + +/* + * Command StayAwakeRequest + */ +class ClientMonitoringStayAwakeRequest : public ClusterCommand +{ +public: + ClientMonitoringStayAwakeRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("stay-awake-request", credsIssuerConfig) + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000046) command (0x00000001) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000046, 0x00000001, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000046) command (0x00000001) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000046, 0x00000001, mRequest); + } + +private: + chip::app::Clusters::ClientMonitoring::Commands::StayAwakeRequest::Type mRequest; +}; + /*----------------------------------------------------------------------------*\ | Cluster ModeSelect | 0x0050 | |------------------------------------------------------------------------------| @@ -10479,6 +10565,52 @@ void registerClusterBooleanState(Commands & commands, CredentialIssuerCommands * commands.Register(clusterName, clusterCommands); } +void registerClusterClientMonitoring(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +{ + using namespace chip::app::Clusters::ClientMonitoring; + + const char * clusterName = "ClientMonitoring"; + + commands_list clusterCommands = { + // + // Commands + // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + // + // Attributes + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "idle-mode-interval", Attributes::IdleModeInterval::Id, credsIssuerConfig), // + make_unique(Id, "active-mode-interval", Attributes::ActiveModeInterval::Id, credsIssuerConfig), // + make_unique(Id, "active-mode-threshold", Attributes::ActiveModeThreshold::Id, credsIssuerConfig), // + make_unique(Id, "registered-clients", Attributes::RegisteredClients::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "idle-mode-interval", Attributes::IdleModeInterval::Id, credsIssuerConfig), // + make_unique(Id, "active-mode-interval", Attributes::ActiveModeInterval::Id, credsIssuerConfig), // + make_unique(Id, "active-mode-threshold", Attributes::ActiveModeThreshold::Id, credsIssuerConfig), // + make_unique(Id, "registered-clients", Attributes::RegisteredClients::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + // + // Events + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + }; + + commands.Register(clusterName, clusterCommands); +} void registerClusterModeSelect(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { using namespace chip::app::Clusters::ModeSelect; @@ -13398,6 +13530,7 @@ void registerClusters(Commands & commands, CredentialIssuerCommands * credsIssue registerClusterProxyDiscovery(commands, credsIssuerConfig); registerClusterProxyValid(commands, credsIssuerConfig); registerClusterBooleanState(commands, credsIssuerConfig); + registerClusterClientMonitoring(commands, credsIssuerConfig); registerClusterModeSelect(commands, credsIssuerConfig); registerClusterDoorLock(commands, credsIssuerConfig); registerClusterWindowCovering(commands, credsIssuerConfig); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp index 5fec5e0a074e79..72d8b34e674410 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp @@ -997,6 +997,31 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::ModeSelect::Structs::M ComplexArgumentParser::Finalize(request.mode); ComplexArgumentParser::Finalize(request.semanticTags); } +CHIP_ERROR ComplexArgumentParser::Setup(const char * label, + chip::app::Clusters::ClientMonitoring::Structs::MonitoringRegistration::Type & request, + Json::Value & value) +{ + VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); + + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("MonitoringRegistration.clientNodeId", "clientNodeId", + value.isMember("clientNodeId"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("MonitoringRegistration.ICid", "ICid", value.isMember("ICid"))); + + char labelWithMember[kMaxLabelLength]; + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "clientNodeId"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.clientNodeId, value["clientNodeId"])); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "ICid"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.ICid, value["ICid"])); + + return CHIP_NO_ERROR; +} + +void ComplexArgumentParser::Finalize(chip::app::Clusters::ClientMonitoring::Structs::MonitoringRegistration::Type & request) +{ + ComplexArgumentParser::Finalize(request.clientNodeId); + ComplexArgumentParser::Finalize(request.ICid); +} CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::OperationalCredentials::Structs::NOCStruct::Type & request, Json::Value & value) diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h index 7a69b9477b2d65..dacf0f20365f4d 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h @@ -142,6 +142,10 @@ static CHIP_ERROR Setup(const char * label, chip::app::Clusters::ModeSelect::Str Json::Value & value); static void Finalize(chip::app::Clusters::ModeSelect::Structs::ModeOptionStruct::Type & request); +static CHIP_ERROR Setup(const char * label, chip::app::Clusters::ClientMonitoring::Structs::MonitoringRegistration::Type & request, + Json::Value & value); + +static void Finalize(chip::app::Clusters::ClientMonitoring::Structs::MonitoringRegistration::Type & request); static CHIP_ERROR Setup(const char * label, chip::app::Clusters::OperationalCredentials::Structs::NOCStruct::Type & request, Json::Value & value); 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 c9f8748cdbe4da..212af9b63e8d69 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -1021,6 +1021,31 @@ 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 chip::app::Clusters::ClientMonitoring::Structs::MonitoringRegistration::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = LogValue("ClientNodeId", indent + 1, value.clientNodeId); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ClientNodeId'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("ICid", indent + 1, value.ICid); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ICid'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const chip::app::Clusters::OperationalCredentials::Structs::NOCStruct::DecodableType & value) { 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 c9b823373808fc..a0b5f9a78388a2 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h @@ -81,6 +81,8 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Channel::Structs::LineupInfo::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::ModeSelect::Structs::ModeOptionStruct::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::ClientMonitoring::Structs::MonitoringRegistration::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::OperationalCredentials::Structs::NOCStruct::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, 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 6af52880cbfe6a..022b72bc9e32ca 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -75,6 +75,7 @@ | ProxyDiscovery | 0x0043 | | ProxyValid | 0x0044 | | BooleanState | 0x0045 | +| ClientMonitoring | 0x0046 | | ModeSelect | 0x0050 | | DoorLock | 0x0101 | | WindowCovering | 0x0102 | From cae58fc030018a5f427bb9c2e891095fbc4f1f4a Mon Sep 17 00:00:00 2001 From: Mathieu Kardous Date: Wed, 30 Nov 2022 14:57:42 -0500 Subject: [PATCH 3/9] Review Comments --- .../zcl/data-model/chip/client-monitoring-cluster.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/client-monitoring-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/client-monitoring-cluster.xml index 92321b8d016503..98537da6b68007 100644 --- a/src/app/zap-templates/zcl/data-model/chip/client-monitoring-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/client-monitoring-cluster.xml @@ -18,7 +18,7 @@ limitations under the License. - + @@ -33,7 +33,9 @@ limitations under the License. IdleModeInterval ActiveModeInterval ActiveModeThreshold - RegisteredClients + + + RegisteredClients Register a client to the end device From 9752a1c25bd803d6a4a1c3abdf1c113b61a7edeb Mon Sep 17 00:00:00 2001 From: Mathieu Kardous Date: Wed, 30 Nov 2022 14:58:49 -0500 Subject: [PATCH 4/9] generated files --- .../python/chip/clusters/Objects.py | 2 ++ .../CHIP/zap-generated/MTRStructsObjc.h | 1 + .../CHIP/zap-generated/MTRStructsObjc.mm | 7 +++++-- .../app-common/zap-generated/af-structs.h | 1 + .../zap-generated/cluster-objects.cpp | 19 ++++++++++++++++++- .../zap-generated/cluster-objects.h | 18 ++++++++++++++---- .../cluster/ComplexArgumentParser.cpp | 7 +++++++ .../cluster/logging/DataModelLogger.cpp | 8 ++++++++ 8 files changed, 56 insertions(+), 7 deletions(-) diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index e74cd71ccd9422..dfd3ecfb155cd2 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -12993,10 +12993,12 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields = [ ClusterObjectFieldDescriptor(Label="clientNodeId", Tag=0, Type=uint), ClusterObjectFieldDescriptor(Label="ICid", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), ]) clientNodeId: 'uint' = 0 ICid: 'uint' = 0 + fabricIndex: 'uint' = 0 diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index 242524f33faf35..ed74653c0fc8d1 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -651,6 +651,7 @@ MTR_NEWLY_DEPRECATED("Please use MTROTASoftwareUpdateRequestorClusterDownloadErr @interface MTRClientMonitoringClusterMonitoringRegistration : NSObject @property (nonatomic, copy) NSNumber * _Nonnull clientNodeId; @property (nonatomic, copy) NSNumber * _Nonnull iCid; +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; - (instancetype)init; - (id)copyWithZone:(NSZone * _Nullable)zone; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index 74110e9dfc2647..6b1e61478b97d2 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -2363,6 +2363,8 @@ - (instancetype)init _clientNodeId = @(0); _iCid = @(0); + + _fabricIndex = @(0); } return self; } @@ -2373,14 +2375,15 @@ - (id)copyWithZone:(NSZone * _Nullable)zone other.clientNodeId = self.clientNodeId; other.iCid = self.iCid; + other.fabricIndex = self.fabricIndex; return other; } - (NSString *)description { - NSString * descriptionString = - [NSString stringWithFormat:@"<%@: clientNodeId:%@; iCid:%@; >", NSStringFromClass([self class]), _clientNodeId, _iCid]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: clientNodeId:%@; iCid:%@; fabricIndex:%@; >", + NSStringFromClass([self class]), _clientNodeId, _iCid, _fabricIndex]; return descriptionString; } diff --git a/zzz_generated/app-common/app-common/zap-generated/af-structs.h b/zzz_generated/app-common/app-common/zap-generated/af-structs.h index e8a92ece4d4351..504c6d137296ba 100644 --- a/zzz_generated/app-common/app-common/zap-generated/af-structs.h +++ b/zzz_generated/app-common/app-common/zap-generated/af-structs.h @@ -373,6 +373,7 @@ typedef struct _MonitoringRegistration { chip::NodeId ClientNodeId; uint64_t ICid; + chip::FabricIndex FabricIndex; } MonitoringRegistration; // Struct for NOCStruct 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 15c3dbe9b3e3eb..bc5e3b57f3a3b4 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 @@ -10180,12 +10180,26 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace ClientMonitoring { namespace Structs { namespace MonitoringRegistration { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::EncodeForWrite(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + return DoEncode(writer, tag, NullOptional); +} + +CHIP_ERROR Type::EncodeForRead(TLV::TLVWriter & writer, TLV::Tag tag, FabricIndex accessingFabricIndex) const +{ + return DoEncode(writer, tag, MakeOptional(accessingFabricIndex)); +} + +CHIP_ERROR Type::DoEncode(TLV::TLVWriter & writer, TLV::Tag tag, const Optional & accessingFabricIndex) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kClientNodeId)), clientNodeId)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kICid)), ICid)); + if (accessingFabricIndex.HasValue()) + { + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kFabricIndex)), fabricIndex)); + } ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -10211,6 +10225,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kICid): ReturnErrorOnFailure(DataModel::Decode(reader, ICid)); break; + case to_underlying(Fields::kFabricIndex): + ReturnErrorOnFailure(DataModel::Decode(reader, fabricIndex)); + break; default: break; } 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 bf1c8e99d78f97..5dbefa9f9c3e8f 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 @@ -12679,19 +12679,29 @@ enum class Fields { kClientNodeId = 0, kICid = 1, + kFabricIndex = 254, }; struct Type { public: - chip::NodeId clientNodeId = static_cast(0); - uint64_t ICid = static_cast(0); + chip::NodeId clientNodeId = static_cast(0); + uint64_t ICid = static_cast(0); + chip::FabricIndex fabricIndex = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); - static constexpr bool kIsFabricScoped = false; + static constexpr bool kIsFabricScoped = true; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + auto GetFabricIndex() const { return fabricIndex; } + + void SetFabricIndex(chip::FabricIndex fabricIndex_) { fabricIndex = fabricIndex_; } + + CHIP_ERROR EncodeForWrite(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR EncodeForRead(TLV::TLVWriter & writer, TLV::Tag tag, FabricIndex accessingFabricIndex) const; + +private: + CHIP_ERROR DoEncode(TLV::TLVWriter & writer, TLV::Tag tag, const Optional & accessingFabricIndex) const; }; using DecodableType = Type; diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp index 72d8b34e674410..ac4bcac9fc2dd7 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp @@ -1014,6 +1014,12 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "ICid"); ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.ICid, value["ICid"])); + if (value.isMember("fabricIndex")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "fabricIndex"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.fabricIndex, value["fabricIndex"])); + } + return CHIP_NO_ERROR; } @@ -1021,6 +1027,7 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::ClientMonitoring::Stru { ComplexArgumentParser::Finalize(request.clientNodeId); ComplexArgumentParser::Finalize(request.ICid); + ComplexArgumentParser::Finalize(request.fabricIndex); } CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::OperationalCredentials::Structs::NOCStruct::Type & request, 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 212af9b63e8d69..418d7dfd1b565a 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -1042,6 +1042,14 @@ DataModelLogger::LogValue(const char * label, size_t indent, return err; } } + { + CHIP_ERROR err = LogValue("FabricIndex", indent + 1, value.fabricIndex); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'FabricIndex'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; From 0e6628df33a84de1527ba4acaad76ffba683e3c2 Mon Sep 17 00:00:00 2001 From: Mathieu Kardous Date: Wed, 30 Nov 2022 16:55:16 -0500 Subject: [PATCH 5/9] fix xml file --- src/app/chip_data_model.gni | 1 + .../zcl/data-model/chip/client-monitoring-cluster.xml | 7 ++++--- src/app/zap_cluster_list.py | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/app/chip_data_model.gni b/src/app/chip_data_model.gni index ecab5a9d02a465..6e336f94929eb2 100644 --- a/src/app/chip_data_model.gni +++ b/src/app/chip_data_model.gni @@ -101,6 +101,7 @@ template("chip_data_model") { sources += [ "${_app_root}/clusters/barrier-control-server/barrier-control-server.h", "${_app_root}/clusters/basic/basic.h", + "${_app_root}/clusters/client-monitoring-server/client-monitoring-server.h", "${_app_root}/clusters/color-control-server/color-control-server.h", "${_app_root}/clusters/door-lock-server/door-lock-server.h", "${_app_root}/clusters/groups-server/groups-server.h", diff --git a/src/app/zap-templates/zcl/data-model/chip/client-monitoring-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/client-monitoring-cluster.xml index 98537da6b68007..83c58168aad9d7 100644 --- a/src/app/zap-templates/zcl/data-model/chip/client-monitoring-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/client-monitoring-cluster.xml @@ -20,8 +20,8 @@ limitations under the License. - - + + @@ -39,7 +39,8 @@ limitations under the License. Register a client to the end device - + + diff --git a/src/app/zap_cluster_list.py b/src/app/zap_cluster_list.py index 8a6e018c934420..9ef42c9b79b156 100755 --- a/src/app/zap_cluster_list.py +++ b/src/app/zap_cluster_list.py @@ -111,6 +111,7 @@ 'ACTIONS_CLUSTER': [], 'BRIDGED_DEVICE_BASIC_CLUSTER': [], 'CHANNEL_CLUSTER': [], + 'CLIENT_MONITORING_CLUSTER': [], 'COLOR_CONTROL_CLUSTER': [], 'COMMISSIONING_CLUSTER': [], 'CONTENT_LAUNCHER_CLUSTER': [], From 5ec029394b12ceac0fcdf2d1c1683f1f0025f2af Mon Sep 17 00:00:00 2001 From: Mathieu Kardous Date: Wed, 30 Nov 2022 16:55:36 -0500 Subject: [PATCH 6/9] generated files --- src/controller/python/chip/clusters/Objects.py | 10 ++++++---- .../CHIP/zap-generated/MTRCommandPayloadsObjc.h | 4 +++- .../CHIP/zap-generated/MTRCommandPayloadsObjc.mm | 9 ++++++--- .../app-common/zap-generated/cluster-objects.cpp | 11 +++++++---- .../app-common/zap-generated/cluster-objects.h | 13 ++++++++----- .../chip-tool/zap-generated/cluster/Commands.h | 8 +++----- 6 files changed, 33 insertions(+), 22 deletions(-) diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index dfd3ecfb155cd2..e45ae70f50779b 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -12991,8 +12991,8 @@ class MonitoringRegistration(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="clientNodeId", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="ICid", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="clientNodeId", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="ICid", Tag=2, Type=uint), ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), ]) @@ -13014,10 +13014,12 @@ class RegisterClientMonitoring(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="clientRegistrationData", Tag=0, Type=ClientMonitoring.Structs.MonitoringRegistration), + ClusterObjectFieldDescriptor(Label="clientNodeId", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="ICid", Tag=1, Type=uint), ]) - clientRegistrationData: 'ClientMonitoring.Structs.MonitoringRegistration' = field(default_factory=lambda: ClientMonitoring.Structs.MonitoringRegistration()) + clientNodeId: 'uint' = 0 + ICid: 'uint' = 0 @dataclass class StayAwakeRequest(ClusterCommand): diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index 0fce080819128b..243d1779877313 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -2775,7 +2775,9 @@ MTR_NEWLY_DEPRECATED("Please use MTROTASoftwareUpdateRequestorClusterAnnounceOta @end @interface MTRClientMonitoringClusterRegisterClientMonitoringParams : NSObject -@property (nonatomic, copy) MTRClientMonitoringClusterMonitoringRegistration * _Nonnull clientRegistrationData; +@property (nonatomic, copy) NSNumber * _Nonnull clientNodeId; + +@property (nonatomic, copy) NSNumber * _Nonnull iCid; /** * Controls whether the command is a timed command (using Timed Invoke). * diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index 89e27889dd6365..4ec63ae9cf617e 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -3654,7 +3654,9 @@ - (instancetype)init { if (self = [super init]) { - _clientRegistrationData = [MTRClientMonitoringClusterMonitoringRegistration new]; + _clientNodeId = @(0); + + _iCid = @(0); _timedInvokeTimeoutMs = nil; } return self; @@ -3664,7 +3666,8 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRClientMonitoringClusterRegisterClientMonitoringParams alloc] init]; - other.clientRegistrationData = self.clientRegistrationData; + other.clientNodeId = self.clientNodeId; + other.iCid = self.iCid; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; return other; @@ -3673,7 +3676,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { NSString * descriptionString = - [NSString stringWithFormat:@"<%@: clientRegistrationData:%@; >", NSStringFromClass([self class]), _clientRegistrationData]; + [NSString stringWithFormat:@"<%@: clientNodeId:%@; iCid:%@; >", NSStringFromClass([self class]), _clientNodeId, _iCid]; return descriptionString; } 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 bc5e3b57f3a3b4..670ad167217f4f 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 @@ -10248,8 +10248,8 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure( - DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kClientRegistrationData)), clientRegistrationData)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kClientNodeId)), clientNodeId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kICid)), ICid)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -10268,8 +10268,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kClientRegistrationData): - ReturnErrorOnFailure(DataModel::Decode(reader, clientRegistrationData)); + case to_underlying(Fields::kClientNodeId): + ReturnErrorOnFailure(DataModel::Decode(reader, clientNodeId)); + break; + case to_underlying(Fields::kICid): + ReturnErrorOnFailure(DataModel::Decode(reader, ICid)); break; default: break; 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 5dbefa9f9c3e8f..7c4e38dfbb075f 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 @@ -12677,8 +12677,8 @@ namespace Structs { namespace MonitoringRegistration { enum class Fields { - kClientNodeId = 0, - kICid = 1, + kClientNodeId = 1, + kICid = 2, kFabricIndex = 254, }; @@ -12728,7 +12728,8 @@ namespace Commands { namespace RegisterClientMonitoring { enum class Fields { - kClientRegistrationData = 0, + kClientNodeId = 0, + kICid = 1, }; struct Type @@ -12738,7 +12739,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::RegisterClientMonitoring::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } - Structs::MonitoringRegistration::Type clientRegistrationData; + chip::NodeId clientNodeId = static_cast(0); + uint64_t ICid = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -12753,7 +12755,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::RegisterClientMonitoring::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } - Structs::MonitoringRegistration::DecodableType clientRegistrationData; + chip::NodeId clientNodeId = static_cast(0); + uint64_t ICid = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace RegisterClientMonitoring diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 08f7e2045935a5..c863806e24fee4 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -3690,10 +3690,10 @@ class ClientMonitoringRegisterClientMonitoring : public ClusterCommand { public: ClientMonitoringRegisterClientMonitoring(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("register-client-monitoring", credsIssuerConfig), - mComplex_ClientRegistrationData(&mRequest.clientRegistrationData) + ClusterCommand("register-client-monitoring", credsIssuerConfig) { - AddArgument("ClientRegistrationData", &mComplex_ClientRegistrationData); + AddArgument("ClientNodeId", 0, UINT64_MAX, &mRequest.clientNodeId); + AddArgument("ICid", 0, UINT64_MAX, &mRequest.ICid); ClusterCommand::AddArguments(); } @@ -3713,8 +3713,6 @@ class ClientMonitoringRegisterClientMonitoring : public ClusterCommand private: chip::app::Clusters::ClientMonitoring::Commands::RegisterClientMonitoring::Type mRequest; - TypedComplexArgument - mComplex_ClientRegistrationData; }; /* From dac32dc12ab856657f3521ddadc9e30f82f95be2 Mon Sep 17 00:00:00 2001 From: Mathieu Kardous Date: Thu, 1 Dec 2022 09:36:14 -0500 Subject: [PATCH 7/9] fix conflict --- .../app-common/app-common/zap-generated/print-cluster.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zzz_generated/app-common/app-common/zap-generated/print-cluster.h b/zzz_generated/app-common/app-common/zap-generated/print-cluster.h index 03d7697737c78b..b206e63fe30dc2 100644 --- a/zzz_generated/app-common/app-common/zap-generated/print-cluster.h +++ b/zzz_generated/app-common/app-common/zap-generated/print-cluster.h @@ -279,7 +279,7 @@ #endif #if defined(ZCL_USING_CLIENT_MONITORING_CLUSTER_SERVER) || defined(ZCL_USING_CLIENT_MONITORING_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_CLIENT_MONITORING_CLUSTER { ZCL_CLIENT_MONITORING_CLUSTER_ID, "Client Monitoring" }, +#define CHIP_PRINTCLUSTER_CLIENT_MONITORING_CLUSTER { chip::app::Clusters::ClientMonitoring::Id, "Client Monitoring" }, #else #define CHIP_PRINTCLUSTER_CLIENT_MONITORING_CLUSTER #endif From 2024218bffd52b43b2a265806b4910ef458ea917 Mon Sep 17 00:00:00 2001 From: Mathieu Kardous Date: Thu, 1 Dec 2022 10:36:44 -0500 Subject: [PATCH 8/9] Update cluster xml --- .../zcl/data-model/chip/client-monitoring-cluster.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/client-monitoring-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/client-monitoring-cluster.xml index 83c58168aad9d7..9dc128947904c5 100644 --- a/src/app/zap-templates/zcl/data-model/chip/client-monitoring-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/client-monitoring-cluster.xml @@ -19,7 +19,7 @@ limitations under the License. - + @@ -27,7 +27,7 @@ limitations under the License. General Client Monitoring - 0x0046 + 0x1046 CLIENT_MONITORING_CLUSTER Client Monitoring allows for ensuring that listed clients meet the required monitoring conditions on the server. IdleModeInterval @@ -35,7 +35,7 @@ limitations under the License. ActiveModeThreshold - RegisteredClients + ExpectedClients Register a client to the end device From aca1f63740b82a588d3310457b67e3cfef48fce8 Mon Sep 17 00:00:00 2001 From: Mathieu Kardous Date: Thu, 1 Dec 2022 10:39:01 -0500 Subject: [PATCH 9/9] regen --- .../python/chip/clusters/Objects.py | 458 +++++++++--------- .../CHIP/zap-generated/MTRClusterConstants.h | 118 ++--- .../zap-generated/MTRCommandPayloadsObjc.h | 88 ++-- .../zap-generated/MTRCommandPayloadsObjc.mm | 114 ++--- .../CHIP/zap-generated/MTRStructsObjc.h | 18 +- .../CHIP/zap-generated/MTRStructsObjc.mm | 68 +-- .../app-common/zap-generated/attribute-id.h | 20 +- .../zap-generated/attributes/Accessors.cpp | 322 ++++++------ .../zap-generated/attributes/Accessors.h | 62 +-- .../app-common/zap-generated/callback.h | 236 ++++----- .../app-common/zap-generated/cluster-enums.h | 6 +- .../zap-generated/cluster-objects.cpp | 386 +++++++-------- .../zap-generated/cluster-objects.h | 444 ++++++++--------- .../app-common/zap-generated/command-id.h | 8 +- .../app-common/zap-generated/ids/Attributes.h | 84 ++-- .../app-common/zap-generated/ids/Clusters.h | 6 +- .../app-common/zap-generated/ids/Commands.h | 28 +- .../app-common/zap-generated/print-cluster.h | 14 +- .../zap-generated/cluster/Commands.h | 262 +++++----- .../zap-generated/cluster/Commands.h | 2 +- 20 files changed, 1372 insertions(+), 1372 deletions(-) diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index e45ae70f50779b..84904704965102 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -12954,235 +12954,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: stateValue: 'bool' = False -@dataclass -class ClientMonitoring(Cluster): - id: typing.ClassVar[int] = 0x0046 - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields = [ - ClusterObjectFieldDescriptor(Label="idleModeInterval", Tag=0x00000000, Type=uint), - ClusterObjectFieldDescriptor(Label="activeModeInterval", Tag=0x00000001, Type=uint), - ClusterObjectFieldDescriptor(Label="activeModeThreshold", Tag=0x00000002, Type=uint), - ClusterObjectFieldDescriptor(Label="registeredClients", Tag=0x00000003, Type=typing.List[ClientMonitoring.Structs.MonitoringRegistration]), - ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), - ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), - ]) - - idleModeInterval: 'uint' = None - activeModeInterval: 'uint' = None - activeModeThreshold: 'uint' = None - registeredClients: 'typing.List[ClientMonitoring.Structs.MonitoringRegistration]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None - - - class Structs: - @dataclass - class MonitoringRegistration(ClusterObject): - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields = [ - ClusterObjectFieldDescriptor(Label="clientNodeId", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="ICid", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), - ]) - - clientNodeId: 'uint' = 0 - ICid: 'uint' = 0 - fabricIndex: 'uint' = 0 - - - - class Commands: - @dataclass - class RegisterClientMonitoring(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0046 - command_id: typing.ClassVar[int] = 0x0000 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields = [ - ClusterObjectFieldDescriptor(Label="clientNodeId", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="ICid", Tag=1, Type=uint), - ]) - - clientNodeId: 'uint' = 0 - ICid: 'uint' = 0 - - @dataclass - class StayAwakeRequest(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0046 - command_id: typing.ClassVar[int] = 0x0001 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields = [ - ]) - - - - class Attributes: - @dataclass - class IdleModeInterval(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0046 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000000 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) - - value: 'uint' = 0 - - @dataclass - class ActiveModeInterval(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0046 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000001 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) - - value: 'uint' = 0 - - @dataclass - class ActiveModeThreshold(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0046 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000002 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) - - value: 'uint' = 0 - - @dataclass - class RegisteredClients(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0046 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000003 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[ClientMonitoring.Structs.MonitoringRegistration]) - - value: 'typing.List[ClientMonitoring.Structs.MonitoringRegistration]' = field(default_factory=lambda: []) - - @dataclass - class GeneratedCommandList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0046 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFF8 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class AcceptedCommandList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0046 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFF9 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class AttributeList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0046 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFB - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class FeatureMap(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0046 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFC - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) - - value: 'uint' = 0 - - @dataclass - class ClusterRevision(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0046 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFD - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) - - value: 'uint' = 0 - - - @dataclass class ModeSelect(Cluster): id: typing.ClassVar[int] = 0x0050 @@ -27034,6 +26805,235 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: +@dataclass +class ClientMonitoring(Cluster): + id: typing.ClassVar[int] = 0x1046 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields = [ + ClusterObjectFieldDescriptor(Label="idleModeInterval", Tag=0x00000000, Type=uint), + ClusterObjectFieldDescriptor(Label="activeModeInterval", Tag=0x00000001, Type=uint), + ClusterObjectFieldDescriptor(Label="activeModeThreshold", Tag=0x00000002, Type=uint), + ClusterObjectFieldDescriptor(Label="expectedClients", Tag=0x00000003, Type=typing.List[ClientMonitoring.Structs.MonitoringRegistration]), + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + idleModeInterval: 'uint' = None + activeModeInterval: 'uint' = None + activeModeThreshold: 'uint' = None + expectedClients: 'typing.List[ClientMonitoring.Structs.MonitoringRegistration]' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + + + class Structs: + @dataclass + class MonitoringRegistration(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields = [ + ClusterObjectFieldDescriptor(Label="clientNodeId", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="ICid", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), + ]) + + clientNodeId: 'uint' = 0 + ICid: 'uint' = 0 + fabricIndex: 'uint' = 0 + + + + class Commands: + @dataclass + class RegisterClientMonitoring(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x1046 + command_id: typing.ClassVar[int] = 0x0000 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields = [ + ClusterObjectFieldDescriptor(Label="clientNodeId", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="ICid", Tag=1, Type=uint), + ]) + + clientNodeId: 'uint' = 0 + ICid: 'uint' = 0 + + @dataclass + class StayAwakeRequest(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x1046 + command_id: typing.ClassVar[int] = 0x0001 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields = [ + ]) + + + + class Attributes: + @dataclass + class IdleModeInterval(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x1046 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class ActiveModeInterval(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x1046 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000001 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class ActiveModeThreshold(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x1046 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000002 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class ExpectedClients(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x1046 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000003 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[ClientMonitoring.Structs.MonitoringRegistration]) + + value: 'typing.List[ClientMonitoring.Structs.MonitoringRegistration]' = field(default_factory=lambda: []) + + @dataclass + class GeneratedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x1046 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF8 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AcceptedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x1046 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF9 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x1046 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class FeatureMap(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x1046 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFC + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class ClusterRevision(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x1046 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFD + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + + @dataclass class UnitTesting(Cluster): id: typing.ClassVar[int] = 0xFFF1FC05 diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index 433f5ef34c4503..d6b5c27d560ac4 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -66,7 +66,6 @@ typedef NS_ENUM(uint32_t, MTRClusterIDType) { MTRClusterProxyDiscoveryID MTR_NEWLY_DEPRECATED("Please use MTRClusterIDTypeProxyDiscoveryID") = 0x00000043, MTRClusterProxyValidID MTR_NEWLY_DEPRECATED("Please use MTRClusterIDTypeProxyValidID") = 0x00000044, MTRClusterBooleanStateID MTR_NEWLY_DEPRECATED("Please use MTRClusterIDTypeBooleanStateID") = 0x00000045, - MTRClusterClientMonitoringID MTR_NEWLY_DEPRECATED("Please use MTRClusterIDTypeClientMonitoringID") = 0x00000046, MTRClusterModeSelectID MTR_NEWLY_DEPRECATED("Please use MTRClusterIDTypeModeSelectID") = 0x00000050, MTRClusterDoorLockID MTR_NEWLY_DEPRECATED("Please use MTRClusterIDTypeDoorLockID") = 0x00000101, MTRClusterWindowCoveringID MTR_NEWLY_DEPRECATED("Please use MTRClusterIDTypeWindowCoveringID") = 0x00000102, @@ -100,6 +99,7 @@ typedef NS_ENUM(uint32_t, MTRClusterIDType) { MTRClusterApplicationBasicID MTR_NEWLY_DEPRECATED("Please use MTRClusterIDTypeApplicationBasicID") = 0x0000050D, MTRClusterAccountLoginID MTR_NEWLY_DEPRECATED("Please use MTRClusterIDTypeAccountLoginID") = 0x0000050E, MTRClusterElectricalMeasurementID MTR_NEWLY_DEPRECATED("Please use MTRClusterIDTypeElectricalMeasurementID") = 0x00000B04, + MTRClusterClientMonitoringID MTR_NEWLY_DEPRECATED("Please use MTRClusterIDTypeClientMonitoringID") = 0x00001046, MTRClusterTestClusterID MTR_NEWLY_DEPRECATED("Please use MTRClusterIDTypeUnitTestingID") = 0xFFF1FC05, MTRClusterFaultInjectionID MTR_NEWLY_DEPRECATED("Please use MTRClusterIDTypeFaultInjectionID") = 0xFFF1FC06, MTRClusterIDTypeIdentifyID MTR_NEWLY_AVAILABLE = 0x00000003, @@ -142,7 +142,6 @@ typedef NS_ENUM(uint32_t, MTRClusterIDType) { MTRClusterIDTypeProxyDiscoveryID MTR_NEWLY_AVAILABLE = 0x00000043, MTRClusterIDTypeProxyValidID MTR_NEWLY_AVAILABLE = 0x00000044, MTRClusterIDTypeBooleanStateID MTR_NEWLY_AVAILABLE = 0x00000045, - MTRClusterIDTypeClientMonitoringID MTR_NEWLY_AVAILABLE = 0x00000046, MTRClusterIDTypeModeSelectID MTR_NEWLY_AVAILABLE = 0x00000050, MTRClusterIDTypeDoorLockID MTR_NEWLY_AVAILABLE = 0x00000101, MTRClusterIDTypeWindowCoveringID MTR_NEWLY_AVAILABLE = 0x00000102, @@ -172,6 +171,7 @@ typedef NS_ENUM(uint32_t, MTRClusterIDType) { MTRClusterIDTypeApplicationBasicID MTR_NEWLY_AVAILABLE = 0x0000050D, MTRClusterIDTypeAccountLoginID MTR_NEWLY_AVAILABLE = 0x0000050E, MTRClusterIDTypeElectricalMeasurementID MTR_NEWLY_AVAILABLE = 0x00000B04, + MTRClusterIDTypeClientMonitoringID MTR_NEWLY_AVAILABLE = 0x00001046, MTRClusterIDTypeUnitTestingID MTR_NEWLY_AVAILABLE = 0xFFF1FC05, MTRClusterIDTypeFaultInjectionID MTR_NEWLY_AVAILABLE = 0xFFF1FC06, }; @@ -2383,51 +2383,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterBooleanStateAttributeClusterRevisionID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - // Cluster ClientMonitoring deprecated attribute names - MTRClusterClientMonitoringAttributeIdleModeIntervalID MTR_NEWLY_DEPRECATED( - "Please use MTRAttributeIDTypeClusterClientMonitoringAttributeIdleModeIntervalID") - = 0x00000000, - MTRClusterClientMonitoringAttributeActiveModeIntervalID MTR_NEWLY_DEPRECATED( - "Please use MTRAttributeIDTypeClusterClientMonitoringAttributeActiveModeIntervalID") - = 0x00000001, - MTRClusterClientMonitoringAttributeActiveModeThresholdID MTR_NEWLY_DEPRECATED( - "Please use MTRAttributeIDTypeClusterClientMonitoringAttributeActiveModeThresholdID") - = 0x00000002, - MTRClusterClientMonitoringAttributeRegisteredClientsID MTR_NEWLY_DEPRECATED( - "Please use MTRAttributeIDTypeClusterClientMonitoringAttributeRegisteredClientsID") - = 0x00000003, - MTRClusterClientMonitoringAttributeGeneratedCommandListID MTR_NEWLY_DEPRECATED( - "Please use MTRAttributeIDTypeClusterClientMonitoringAttributeGeneratedCommandListID") - = MTRClusterGlobalAttributeGeneratedCommandListID, - MTRClusterClientMonitoringAttributeAcceptedCommandListID MTR_NEWLY_DEPRECATED( - "Please use MTRAttributeIDTypeClusterClientMonitoringAttributeAcceptedCommandListID") - = MTRClusterGlobalAttributeAcceptedCommandListID, - MTRClusterClientMonitoringAttributeAttributeListID MTR_NEWLY_DEPRECATED( - "Please use MTRAttributeIDTypeClusterClientMonitoringAttributeAttributeListID") - = MTRClusterGlobalAttributeAttributeListID, - MTRClusterClientMonitoringAttributeFeatureMapID MTR_NEWLY_DEPRECATED( - "Please use MTRAttributeIDTypeClusterClientMonitoringAttributeFeatureMapID") - = MTRClusterGlobalAttributeFeatureMapID, - MTRClusterClientMonitoringAttributeClusterRevisionID MTR_NEWLY_DEPRECATED( - "Please use MTRAttributeIDTypeClusterClientMonitoringAttributeClusterRevisionID") - = MTRClusterGlobalAttributeClusterRevisionID, - - // Cluster ClientMonitoring attributes - MTRAttributeIDTypeClusterClientMonitoringAttributeIdleModeIntervalID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterClientMonitoringAttributeActiveModeIntervalID MTR_NEWLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterClientMonitoringAttributeActiveModeThresholdID MTR_NEWLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterClientMonitoringAttributeRegisteredClientsID MTR_NEWLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterClientMonitoringAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterClientMonitoringAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterClientMonitoringAttributeAttributeListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterClientMonitoringAttributeFeatureMapID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterClientMonitoringAttributeClusterRevisionID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - // Cluster ModeSelect deprecated attribute names MTRClusterModeSelectAttributeDescriptionID MTR_NEWLY_DEPRECATED( "Please use MTRAttributeIDTypeClusterModeSelectAttributeDescriptionID") @@ -4934,6 +4889,51 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterElectricalMeasurementAttributeClusterRevisionID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + // Cluster ClientMonitoring deprecated attribute names + MTRClusterClientMonitoringAttributeIdleModeIntervalID MTR_NEWLY_DEPRECATED( + "Please use MTRAttributeIDTypeClusterClientMonitoringAttributeIdleModeIntervalID") + = 0x00000000, + MTRClusterClientMonitoringAttributeActiveModeIntervalID MTR_NEWLY_DEPRECATED( + "Please use MTRAttributeIDTypeClusterClientMonitoringAttributeActiveModeIntervalID") + = 0x00000001, + MTRClusterClientMonitoringAttributeActiveModeThresholdID MTR_NEWLY_DEPRECATED( + "Please use MTRAttributeIDTypeClusterClientMonitoringAttributeActiveModeThresholdID") + = 0x00000002, + MTRClusterClientMonitoringAttributeExpectedClientsID MTR_NEWLY_DEPRECATED( + "Please use MTRAttributeIDTypeClusterClientMonitoringAttributeExpectedClientsID") + = 0x00000003, + MTRClusterClientMonitoringAttributeGeneratedCommandListID MTR_NEWLY_DEPRECATED( + "Please use MTRAttributeIDTypeClusterClientMonitoringAttributeGeneratedCommandListID") + = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterClientMonitoringAttributeAcceptedCommandListID MTR_NEWLY_DEPRECATED( + "Please use MTRAttributeIDTypeClusterClientMonitoringAttributeAcceptedCommandListID") + = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterClientMonitoringAttributeAttributeListID MTR_NEWLY_DEPRECATED( + "Please use MTRAttributeIDTypeClusterClientMonitoringAttributeAttributeListID") + = MTRClusterGlobalAttributeAttributeListID, + MTRClusterClientMonitoringAttributeFeatureMapID MTR_NEWLY_DEPRECATED( + "Please use MTRAttributeIDTypeClusterClientMonitoringAttributeFeatureMapID") + = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterClientMonitoringAttributeClusterRevisionID MTR_NEWLY_DEPRECATED( + "Please use MTRAttributeIDTypeClusterClientMonitoringAttributeClusterRevisionID") + = MTRClusterGlobalAttributeClusterRevisionID, + + // Cluster ClientMonitoring attributes + MTRAttributeIDTypeClusterClientMonitoringAttributeIdleModeIntervalID MTR_NEWLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterClientMonitoringAttributeActiveModeIntervalID MTR_NEWLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterClientMonitoringAttributeActiveModeThresholdID MTR_NEWLY_AVAILABLE = 0x00000002, + MTRAttributeIDTypeClusterClientMonitoringAttributeExpectedClientsID MTR_NEWLY_AVAILABLE = 0x00000003, + MTRAttributeIDTypeClusterClientMonitoringAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterClientMonitoringAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterClientMonitoringAttributeAttributeListID MTR_NEWLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterClientMonitoringAttributeFeatureMapID MTR_NEWLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterClientMonitoringAttributeClusterRevisionID MTR_NEWLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + // Cluster TestCluster deprecated attribute names MTRClusterTestClusterAttributeBooleanID MTR_NEWLY_DEPRECATED( "Please use MTRAttributeIDTypeClusterUnitTestingAttributeBooleanID") @@ -5797,18 +5797,6 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterGroupKeyManagementCommandKeySetReadAllIndicesID MTR_NEWLY_AVAILABLE = 0x00000004, MTRCommandIDTypeClusterGroupKeyManagementCommandKeySetReadAllIndicesResponseID MTR_NEWLY_AVAILABLE = 0x00000005, - // Cluster ClientMonitoring deprecated command id names - MTRClusterClientMonitoringCommandRegisterClientMonitoringID MTR_NEWLY_DEPRECATED( - "Please use MTRCommandIDTypeClusterClientMonitoringCommandRegisterClientMonitoringID") - = 0x00000000, - MTRClusterClientMonitoringCommandStayAwakeRequestID MTR_NEWLY_DEPRECATED( - "Please use MTRCommandIDTypeClusterClientMonitoringCommandStayAwakeRequestID") - = 0x00000001, - - // Cluster ClientMonitoring commands - MTRCommandIDTypeClusterClientMonitoringCommandRegisterClientMonitoringID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRCommandIDTypeClusterClientMonitoringCommandStayAwakeRequestID MTR_NEWLY_AVAILABLE = 0x00000001, - // Cluster ModeSelect deprecated command id names MTRClusterModeSelectCommandChangeToModeID MTR_NEWLY_DEPRECATED( "Please use MTRCommandIDTypeClusterModeSelectCommandChangeToModeID") @@ -6258,6 +6246,18 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterElectricalMeasurementCommandGetMeasurementProfileResponseCommandID MTR_NEWLY_AVAILABLE = 0x00000001, MTRCommandIDTypeClusterElectricalMeasurementCommandGetMeasurementProfileCommandID MTR_NEWLY_AVAILABLE = 0x00000001, + // Cluster ClientMonitoring deprecated command id names + MTRClusterClientMonitoringCommandRegisterClientMonitoringID MTR_NEWLY_DEPRECATED( + "Please use MTRCommandIDTypeClusterClientMonitoringCommandRegisterClientMonitoringID") + = 0x00000000, + MTRClusterClientMonitoringCommandStayAwakeRequestID MTR_NEWLY_DEPRECATED( + "Please use MTRCommandIDTypeClusterClientMonitoringCommandStayAwakeRequestID") + = 0x00000001, + + // Cluster ClientMonitoring commands + MTRCommandIDTypeClusterClientMonitoringCommandRegisterClientMonitoringID MTR_NEWLY_AVAILABLE = 0x00000000, + MTRCommandIDTypeClusterClientMonitoringCommandStayAwakeRequestID MTR_NEWLY_AVAILABLE = 0x00000001, + // Cluster TestCluster deprecated command id names MTRClusterTestClusterCommandTestID MTR_NEWLY_DEPRECATED("Please use MTRCommandIDTypeClusterUnitTestingCommandTestID") = 0x00000000, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index 243d1779877313..e13a48473d1196 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -2770,50 +2770,6 @@ MTR_NEWLY_DEPRECATED("Please use MTROTASoftwareUpdateRequestorClusterAnnounceOta @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_NEWLY_DEPRECATED("Timed invoke does not make sense for server to client commands"); -- (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; -@end -@interface MTRClientMonitoringClusterRegisterClientMonitoringParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull clientNodeId; - -@property (nonatomic, copy) NSNumber * _Nonnull iCid; -/** - * Controls whether the command is a timed command (using Timed Invoke). - * - * If nil (the default value), a regular invoke is done for commands that do - * not require a timed invoke and a timed invoke with some default timed request - * timeout is done for commands that require a timed invoke. - * - * If not nil, a timed invoke is done, with the provided value used as the timed - * request timeout. The value should be chosen small enough to provide the - * desired security properties but large enough that it will allow a round-trip - * from the sever to the client (for the status response and actual invoke - * request) within the timeout window. - * - */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - -- (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; -@end -@interface MTRClientMonitoringClusterStayAwakeRequestParams : NSObject -/** - * Controls whether the command is a timed command (using Timed Invoke). - * - * If nil (the default value), a regular invoke is done for commands that do - * not require a timed invoke and a timed invoke with some default timed request - * timeout is done for commands that require a timed invoke. - * - * If not nil, a timed invoke is done, with the provided value used as the timed - * request timeout. The value should be chosen small enough to provide the - * desired security properties but large enough that it will allow a round-trip - * from the sever to the client (for the status response and actual invoke - * request) within the timeout window. - * - */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - - (instancetype)init; - (id)copyWithZone:(NSZone * _Nullable)zone; @end @@ -5320,6 +5276,50 @@ MTR_NEWLY_DEPRECATED("Please use MTROTASoftwareUpdateRequestorClusterAnnounceOta */ @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; +- (instancetype)init; +- (id)copyWithZone:(NSZone * _Nullable)zone; +@end +@interface MTRClientMonitoringClusterRegisterClientMonitoringParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull clientNodeId; + +@property (nonatomic, copy) NSNumber * _Nonnull iCid; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +- (instancetype)init; +- (id)copyWithZone:(NSZone * _Nullable)zone; +@end +@interface MTRClientMonitoringClusterStayAwakeRequestParams : NSObject +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + - (instancetype)init; - (id)copyWithZone:(NSZone * _Nullable)zone; @end diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index 4ec63ae9cf617e..0f925b15110406 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -3648,63 +3648,6 @@ - (NSString *)description return descriptionString; } -@end -@implementation MTRClientMonitoringClusterRegisterClientMonitoringParams -- (instancetype)init -{ - if (self = [super init]) { - - _clientNodeId = @(0); - - _iCid = @(0); - _timedInvokeTimeoutMs = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRClientMonitoringClusterRegisterClientMonitoringParams alloc] init]; - - other.clientNodeId = self.clientNodeId; - other.iCid = self.iCid; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = - [NSString stringWithFormat:@"<%@: clientNodeId:%@; iCid:%@; >", NSStringFromClass([self class]), _clientNodeId, _iCid]; - return descriptionString; -} - -@end -@implementation MTRClientMonitoringClusterStayAwakeRequestParams -- (instancetype)init -{ - if (self = [super init]) { - _timedInvokeTimeoutMs = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRClientMonitoringClusterStayAwakeRequestParams alloc] init]; - - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; - return descriptionString; -} - @end @implementation MTRModeSelectClusterChangeToModeParams - (instancetype)init @@ -7052,6 +6995,63 @@ - (NSString *)description return descriptionString; } +@end +@implementation MTRClientMonitoringClusterRegisterClientMonitoringParams +- (instancetype)init +{ + if (self = [super init]) { + + _clientNodeId = @(0); + + _iCid = @(0); + _timedInvokeTimeoutMs = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRClientMonitoringClusterRegisterClientMonitoringParams alloc] init]; + + other.clientNodeId = self.clientNodeId; + other.iCid = self.iCid; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = + [NSString stringWithFormat:@"<%@: clientNodeId:%@; iCid:%@; >", NSStringFromClass([self class]), _clientNodeId, _iCid]; + return descriptionString; +} + +@end +@implementation MTRClientMonitoringClusterStayAwakeRequestParams +- (instancetype)init +{ + if (self = [super init]) { + _timedInvokeTimeoutMs = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRClientMonitoringClusterStayAwakeRequestParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + return descriptionString; +} + @end @implementation MTRUnitTestingClusterTestParams - (instancetype)init diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index ed74653c0fc8d1..d48d05149e0814 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -648,15 +648,6 @@ MTR_NEWLY_DEPRECATED("Please use MTROTASoftwareUpdateRequestorClusterDownloadErr - (id)copyWithZone:(NSZone * _Nullable)zone; @end -@interface MTRClientMonitoringClusterMonitoringRegistration : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull clientNodeId; -@property (nonatomic, copy) NSNumber * _Nonnull iCid; -@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; - -- (instancetype)init; -- (id)copyWithZone:(NSZone * _Nullable)zone; -@end - @interface MTRModeSelectClusterSemanticTag : NSObject @property (nonatomic, copy) NSNumber * _Nonnull mfgCode; @property (nonatomic, copy) NSNumber * _Nonnull value; @@ -979,6 +970,15 @@ MTR_NEWLY_DEPRECATED("Please use MTROTASoftwareUpdateRequestorClusterDownloadErr - (id)copyWithZone:(NSZone * _Nullable)zone; @end +@interface MTRClientMonitoringClusterMonitoringRegistration : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull clientNodeId; +@property (nonatomic, copy) NSNumber * _Nonnull iCid; +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; + +- (instancetype)init; +- (id)copyWithZone:(NSZone * _Nullable)zone; +@end + MTR_NEWLY_AVAILABLE @interface MTRUnitTestingClusterSimpleStruct : NSObject @property (nonatomic, copy) NSNumber * _Nonnull a; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index 6b1e61478b97d2..07769ead2b09aa 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -2355,40 +2355,6 @@ - (NSString *)description @end -@implementation MTRClientMonitoringClusterMonitoringRegistration -- (instancetype)init -{ - if (self = [super init]) { - - _clientNodeId = @(0); - - _iCid = @(0); - - _fabricIndex = @(0); - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone -{ - auto other = [[MTRClientMonitoringClusterMonitoringRegistration alloc] init]; - - other.clientNodeId = self.clientNodeId; - other.iCid = self.iCid; - other.fabricIndex = self.fabricIndex; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: clientNodeId:%@; iCid:%@; fabricIndex:%@; >", - NSStringFromClass([self class]), _clientNodeId, _iCid, _fabricIndex]; - return descriptionString; -} - -@end - @implementation MTRModeSelectClusterSemanticTag - (instancetype)init { @@ -3615,6 +3581,40 @@ - (NSString *)description @end +@implementation MTRClientMonitoringClusterMonitoringRegistration +- (instancetype)init +{ + if (self = [super init]) { + + _clientNodeId = @(0); + + _iCid = @(0); + + _fabricIndex = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRClientMonitoringClusterMonitoringRegistration alloc] init]; + + other.clientNodeId = self.clientNodeId; + other.iCid = self.iCid; + other.fabricIndex = self.fabricIndex; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: clientNodeId:%@; iCid:%@; fabricIndex:%@; >", + NSStringFromClass([self class]), _clientNodeId, _iCid, _fabricIndex]; + return descriptionString; +} + +@end + @implementation MTRUnitTestingClusterSimpleStruct - (instancetype)init { diff --git a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h index a4657c1b8d55a5..db53fc67718181 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h +++ b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h @@ -538,16 +538,6 @@ // Server attributes #define ZCL_STATE_VALUE_ATTRIBUTE_ID (0x0000) -// Attribute ids for cluster: Client Monitoring - -// Client attributes - -// Server attributes -#define ZCL_IDLE_MODE_INTERVAL_ATTRIBUTE_ID (0x0000) -#define ZCL_ACTIVE_MODE_INTERVAL_ATTRIBUTE_ID (0x0001) -#define ZCL_ACTIVE_MODE_THRESHOLD_ATTRIBUTE_ID (0x0002) -#define ZCL_REGISTERED_CLIENTS_ATTRIBUTE_ID (0x0003) - // Attribute ids for cluster: Mode Select // Client attributes @@ -1143,6 +1133,16 @@ #define ZCL_RMS_VOLTAGE_SAG_PERIOD_PHASE_C_ATTRIBUTE_ID (0x0A16) #define ZCL_RMS_VOLTAGE_SWELL_PERIOD_PHASE_C_ATTRIBUTE_ID (0x0A17) +// Attribute ids for cluster: Client Monitoring + +// Client attributes + +// Server attributes +#define ZCL_IDLE_MODE_INTERVAL_ATTRIBUTE_ID (0x0000) +#define ZCL_ACTIVE_MODE_INTERVAL_ATTRIBUTE_ID (0x0001) +#define ZCL_ACTIVE_MODE_THRESHOLD_ATTRIBUTE_ID (0x0002) +#define ZCL_EXPECTED_CLIENTS_ATTRIBUTE_ID (0x0003) + // Attribute ids for cluster: Unit Testing // Client attributes 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 2617d8d107b032..6b644145702ab1 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 @@ -11197,167 +11197,6 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) } // namespace Attributes } // namespace BooleanState -namespace ClientMonitoring { -namespace Attributes { - -namespace IdleModeInterval { - -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ClientMonitoring::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ClientMonitoring::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); -} - -} // namespace IdleModeInterval - -namespace ActiveModeInterval { - -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ClientMonitoring::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ClientMonitoring::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); -} - -} // namespace ActiveModeInterval - -namespace ActiveModeThreshold { - -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ClientMonitoring::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ClientMonitoring::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace ActiveModeThreshold - -namespace FeatureMap { - -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ClientMonitoring::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ClientMonitoring::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); -} - -} // namespace FeatureMap - -namespace ClusterRevision { - -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ClientMonitoring::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ClientMonitoring::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace ClientMonitoring - namespace ModeSelect { namespace Attributes { @@ -27888,6 +27727,167 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) } // namespace Attributes } // namespace ElectricalMeasurement +namespace ClientMonitoring { +namespace Attributes { + +namespace IdleModeInterval { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ClientMonitoring::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ClientMonitoring::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); +} + +} // namespace IdleModeInterval + +namespace ActiveModeInterval { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ClientMonitoring::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ClientMonitoring::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); +} + +} // namespace ActiveModeInterval + +namespace ActiveModeThreshold { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ClientMonitoring::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ClientMonitoring::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ActiveModeThreshold + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ClientMonitoring::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ClientMonitoring::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ClientMonitoring::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ClientMonitoring::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace ClientMonitoring + namespace UnitTesting { namespace Attributes { 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 190498cd8ce223..9f35b1e9624458 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 @@ -1963,37 +1963,6 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace Attributes } // namespace BooleanState -namespace ClientMonitoring { -namespace Attributes { - -namespace IdleModeInterval { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // int32u -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -} // namespace IdleModeInterval - -namespace ActiveModeInterval { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // int32u -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -} // namespace ActiveModeInterval - -namespace ActiveModeThreshold { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); -} // namespace ActiveModeThreshold - -namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -} // namespace FeatureMap - -namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace ClientMonitoring - namespace ModeSelect { namespace Attributes { @@ -4683,6 +4652,37 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace Attributes } // namespace ElectricalMeasurement +namespace ClientMonitoring { +namespace Attributes { + +namespace IdleModeInterval { +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // int32u +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +} // namespace IdleModeInterval + +namespace ActiveModeInterval { +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // int32u +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +} // namespace ActiveModeInterval + +namespace ActiveModeThreshold { +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +} // namespace ActiveModeThreshold + +namespace FeatureMap { +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace ClientMonitoring + namespace UnitTesting { namespace Attributes { diff --git a/zzz_generated/app-common/app-common/zap-generated/callback.h b/zzz_generated/app-common/app-common/zap-generated/callback.h index 7d5afd14ff48bc..8c82bc550c2a7e 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -354,14 +354,6 @@ void emberAfProxyValidClusterInitCallback(chip::EndpointId endpoint); */ void emberAfBooleanStateClusterInitCallback(chip::EndpointId endpoint); -/** @brief Client Monitoring Cluster Init - * - * Cluster Init - * - * @param endpoint Endpoint that is being initialized - */ -void emberAfClientMonitoringClusterInitCallback(chip::EndpointId endpoint); - /** @brief Mode Select Cluster Init * * Cluster Init @@ -594,6 +586,14 @@ void emberAfAccountLoginClusterInitCallback(chip::EndpointId endpoint); */ void emberAfElectricalMeasurementClusterInitCallback(chip::EndpointId endpoint); +/** @brief Client Monitoring Cluster Init + * + * Cluster Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfClientMonitoringClusterInitCallback(chip::EndpointId endpoint); + /** @brief Unit Testing Cluster Init * * Cluster Init @@ -4462,104 +4462,6 @@ void emberAfBooleanStateClusterServerTickCallback(chip::EndpointId endpoint); */ void emberAfBooleanStateClusterClientTickCallback(chip::EndpointId endpoint); -// -// Client Monitoring Cluster -// - -/** @brief Client Monitoring Cluster Server Init - * - * Server Init - * - * @param endpoint Endpoint that is being initialized - */ -void emberAfClientMonitoringClusterServerInitCallback(chip::EndpointId endpoint); - -/** @brief Client Monitoring Cluster Client Init - * - * Client Init - * - * @param endpoint Endpoint that is being initialized - */ -void emberAfClientMonitoringClusterClientInitCallback(chip::EndpointId endpoint); - -/** @brief Client Monitoring Cluster Server Attribute Changed - * - * Server Attribute Changed - * - * @param attributePath Concrete attribute path that changed - */ -void MatterClientMonitoringClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); - -/** @brief Client Monitoring Cluster Server Message Sent - * - * Server Message Sent - * - * @param destination The destination to which the message was sent - * @param apsFrame The APS frame for the message - * @param msgLen The length of the message - * @param message The message that was sent - * @param status The status of the sent message - */ -void emberAfClientMonitoringClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); - -/** @brief Client Monitoring Cluster Client Message Sent - * - * Client Message Sent - * - * @param destination The destination to which the message was sent - * @param apsFrame The APS frame for the message - * @param msgLen The length of the message - * @param message The message that was sent - * @param status The status of the sent message - */ -void emberAfClientMonitoringClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); - -/** @brief Client Monitoring Cluster Server Pre Attribute Changed - * - * Server Pre Attribute Changed - * - * @param attributePath Concrete attribute path to be changed - * @param attributeType Attribute type - * @param size Attribute size - * @param value Attribute value - */ -chip::Protocols::InteractionModel::Status -MatterClientMonitoringClusterServerPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, - EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); - -/** @brief Client Monitoring Cluster Client Pre Attribute Changed - * - * Client Pre Attribute Changed - * - * @param attributePath Concrete attribute path to be changed - * @param attributeType Attribute type - * @param size Attribute size - * @param value Attribute value - */ -chip::Protocols::InteractionModel::Status -MatterClientMonitoringClusterClientPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, - EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); - -/** @brief Client Monitoring Cluster Server Tick - * - * Server Tick - * - * @param endpoint Endpoint that is being served - */ -void emberAfClientMonitoringClusterServerTickCallback(chip::EndpointId endpoint); - -/** @brief Client Monitoring Cluster Client Tick - * - * Client Tick - * - * @param endpoint Endpoint that is being served - */ -void emberAfClientMonitoringClusterClientTickCallback(chip::EndpointId endpoint); - // // Mode Select Cluster // @@ -7361,6 +7263,104 @@ void emberAfElectricalMeasurementClusterServerTickCallback(chip::EndpointId endp */ void emberAfElectricalMeasurementClusterClientTickCallback(chip::EndpointId endpoint); +// +// Client Monitoring Cluster +// + +/** @brief Client Monitoring Cluster Server Init + * + * Server Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfClientMonitoringClusterServerInitCallback(chip::EndpointId endpoint); + +/** @brief Client Monitoring Cluster Client Init + * + * Client Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfClientMonitoringClusterClientInitCallback(chip::EndpointId endpoint); + +/** @brief Client Monitoring Cluster Server Attribute Changed + * + * Server Attribute Changed + * + * @param attributePath Concrete attribute path that changed + */ +void MatterClientMonitoringClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); + +/** @brief Client Monitoring Cluster Server Message Sent + * + * Server Message Sent + * + * @param destination The destination to which the message was sent + * @param apsFrame The APS frame for the message + * @param msgLen The length of the message + * @param message The message that was sent + * @param status The status of the sent message + */ +void emberAfClientMonitoringClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); + +/** @brief Client Monitoring Cluster Client Message Sent + * + * Client Message Sent + * + * @param destination The destination to which the message was sent + * @param apsFrame The APS frame for the message + * @param msgLen The length of the message + * @param message The message that was sent + * @param status The status of the sent message + */ +void emberAfClientMonitoringClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); + +/** @brief Client Monitoring Cluster Server Pre Attribute Changed + * + * Server Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status +MatterClientMonitoringClusterServerPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, + EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Client Monitoring Cluster Client Pre Attribute Changed + * + * Client Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status +MatterClientMonitoringClusterClientPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, + EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Client Monitoring Cluster Server Tick + * + * Server Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfClientMonitoringClusterServerTickCallback(chip::EndpointId endpoint); + +/** @brief Client Monitoring Cluster Client Tick + * + * Client Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfClientMonitoringClusterClientTickCallback(chip::EndpointId endpoint); + // // Unit Testing Cluster // @@ -8202,18 +8202,6 @@ bool emberAfGroupKeyManagementClusterKeySetReadAllIndicesCallback( bool emberAfGroupKeyManagementClusterKeySetReadAllIndicesResponseCallback( chip::EndpointId endpoint, chip::app::CommandSender * commandObj, /* TYPE WARNING: array array defaults to */ uint8_t * GroupKeySetIDs); -/** - * @brief Client Monitoring Cluster RegisterClientMonitoring Command callback (from client) - */ -bool emberAfClientMonitoringClusterRegisterClientMonitoringCallback( - chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::ClientMonitoring::Commands::RegisterClientMonitoring::DecodableType & commandData); -/** - * @brief Client Monitoring Cluster StayAwakeRequest Command callback (from client) - */ -bool emberAfClientMonitoringClusterStayAwakeRequestCallback( - chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::ClientMonitoring::Commands::StayAwakeRequest::DecodableType & commandData); /** * @brief Mode Select Cluster ChangeToMode Command callback (from client) */ @@ -8813,6 +8801,18 @@ bool emberAfElectricalMeasurementClusterGetMeasurementProfileResponseCommandCall bool emberAfElectricalMeasurementClusterGetMeasurementProfileCommandCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileCommand::DecodableType & commandData); +/** + * @brief Client Monitoring Cluster RegisterClientMonitoring Command callback (from client) + */ +bool emberAfClientMonitoringClusterRegisterClientMonitoringCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::ClientMonitoring::Commands::RegisterClientMonitoring::DecodableType & commandData); +/** + * @brief Client Monitoring Cluster StayAwakeRequest Command callback (from client) + */ +bool emberAfClientMonitoringClusterStayAwakeRequestCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::ClientMonitoring::Commands::StayAwakeRequest::DecodableType & commandData); /** * @brief Unit Testing Cluster Test Command callback (from client) */ 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 58028cb31246d0..12cb3de9b1caaf 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 @@ -1028,9 +1028,6 @@ namespace ProxyValid { namespace BooleanState { } // namespace BooleanState -namespace ClientMonitoring { -} // namespace ClientMonitoring - namespace ModeSelect { // Bitmap for ModeSelectFeature @@ -2276,6 +2273,9 @@ namespace AccountLogin { namespace ElectricalMeasurement { } // namespace ElectricalMeasurement +namespace ClientMonitoring { +} // namespace ClientMonitoring + namespace UnitTesting { // Enum for SimpleEnum 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 670ad167217f4f..51873b26562bcf 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 @@ -10177,192 +10177,6 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } // namespace Events } // namespace BooleanState -namespace ClientMonitoring { -namespace Structs { -namespace MonitoringRegistration { -CHIP_ERROR Type::EncodeForWrite(TLV::TLVWriter & writer, TLV::Tag tag) const -{ - return DoEncode(writer, tag, NullOptional); -} - -CHIP_ERROR Type::EncodeForRead(TLV::TLVWriter & writer, TLV::Tag tag, FabricIndex accessingFabricIndex) const -{ - return DoEncode(writer, tag, MakeOptional(accessingFabricIndex)); -} - -CHIP_ERROR Type::DoEncode(TLV::TLVWriter & writer, TLV::Tag tag, const Optional & accessingFabricIndex) const -{ - TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kClientNodeId)), clientNodeId)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kICid)), ICid)); - if (accessingFabricIndex.HasValue()) - { - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kFabricIndex)), fabricIndex)); - } - ReturnErrorOnFailure(writer.EndContainer(outer)); - return CHIP_NO_ERROR; -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVType outer; - VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); - err = reader.EnterContainer(outer); - ReturnErrorOnFailure(err); - while ((err = reader.Next()) == CHIP_NO_ERROR) - { - if (!TLV::IsContextTag(reader.GetTag())) - { - continue; - } - switch (TLV::TagNumFromTag(reader.GetTag())) - { - case to_underlying(Fields::kClientNodeId): - ReturnErrorOnFailure(DataModel::Decode(reader, clientNodeId)); - break; - case to_underlying(Fields::kICid): - ReturnErrorOnFailure(DataModel::Decode(reader, ICid)); - break; - case to_underlying(Fields::kFabricIndex): - ReturnErrorOnFailure(DataModel::Decode(reader, fabricIndex)); - break; - default: - break; - } - } - - VerifyOrReturnError(err == CHIP_END_OF_TLV, err); - ReturnErrorOnFailure(reader.ExitContainer(outer)); - - return CHIP_NO_ERROR; -} - -} // namespace MonitoringRegistration -} // namespace Structs - -namespace Commands { -namespace RegisterClientMonitoring { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const -{ - TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kClientNodeId)), clientNodeId)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kICid)), ICid)); - ReturnErrorOnFailure(writer.EndContainer(outer)); - return CHIP_NO_ERROR; -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVType outer; - VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); - ReturnErrorOnFailure(reader.EnterContainer(outer)); - while ((err = reader.Next()) == CHIP_NO_ERROR) - { - if (!TLV::IsContextTag(reader.GetTag())) - { - continue; - } - switch (TLV::TagNumFromTag(reader.GetTag())) - { - case to_underlying(Fields::kClientNodeId): - ReturnErrorOnFailure(DataModel::Decode(reader, clientNodeId)); - break; - case to_underlying(Fields::kICid): - ReturnErrorOnFailure(DataModel::Decode(reader, ICid)); - break; - default: - break; - } - } - - VerifyOrReturnError(err == CHIP_END_OF_TLV, err); - ReturnErrorOnFailure(reader.ExitContainer(outer)); - return CHIP_NO_ERROR; -} -} // namespace RegisterClientMonitoring. -namespace StayAwakeRequest { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const -{ - TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); - return CHIP_NO_ERROR; -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVType outer; - VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); - ReturnErrorOnFailure(reader.EnterContainer(outer)); - while ((err = reader.Next()) == CHIP_NO_ERROR) - { - if (!TLV::IsContextTag(reader.GetTag())) - { - continue; - } - switch (TLV::TagNumFromTag(reader.GetTag())) - { - default: - break; - } - } - - VerifyOrReturnError(err == CHIP_END_OF_TLV, err); - ReturnErrorOnFailure(reader.ExitContainer(outer)); - return CHIP_NO_ERROR; -} -} // namespace StayAwakeRequest. -} // namespace Commands - -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) -{ - switch (path.mAttributeId) - { - case Attributes::IdleModeInterval::TypeInfo::GetAttributeId(): - ReturnErrorOnFailure(DataModel::Decode(reader, idleModeInterval)); - break; - case Attributes::ActiveModeInterval::TypeInfo::GetAttributeId(): - ReturnErrorOnFailure(DataModel::Decode(reader, activeModeInterval)); - break; - case Attributes::ActiveModeThreshold::TypeInfo::GetAttributeId(): - ReturnErrorOnFailure(DataModel::Decode(reader, activeModeThreshold)); - break; - case Attributes::RegisteredClients::TypeInfo::GetAttributeId(): - ReturnErrorOnFailure(DataModel::Decode(reader, registeredClients)); - break; - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - ReturnErrorOnFailure(DataModel::Decode(reader, generatedCommandList)); - break; - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - ReturnErrorOnFailure(DataModel::Decode(reader, acceptedCommandList)); - break; - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - ReturnErrorOnFailure(DataModel::Decode(reader, attributeList)); - break; - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - ReturnErrorOnFailure(DataModel::Decode(reader, featureMap)); - break; - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - ReturnErrorOnFailure(DataModel::Decode(reader, clusterRevision)); - break; - default: - break; - } - - return CHIP_NO_ERROR; -} -} // namespace Attributes - -namespace Events { -} // namespace Events - -} // namespace ClientMonitoring namespace ModeSelect { namespace Structs { namespace SemanticTag { @@ -18740,6 +18554,192 @@ namespace Events { } // namespace Events } // namespace ElectricalMeasurement +namespace ClientMonitoring { +namespace Structs { +namespace MonitoringRegistration { +CHIP_ERROR Type::EncodeForWrite(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + return DoEncode(writer, tag, NullOptional); +} + +CHIP_ERROR Type::EncodeForRead(TLV::TLVWriter & writer, TLV::Tag tag, FabricIndex accessingFabricIndex) const +{ + return DoEncode(writer, tag, MakeOptional(accessingFabricIndex)); +} + +CHIP_ERROR Type::DoEncode(TLV::TLVWriter & writer, TLV::Tag tag, const Optional & accessingFabricIndex) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kClientNodeId)), clientNodeId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kICid)), ICid)); + if (accessingFabricIndex.HasValue()) + { + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kFabricIndex)), fabricIndex)); + } + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + err = reader.EnterContainer(outer); + ReturnErrorOnFailure(err); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + if (!TLV::IsContextTag(reader.GetTag())) + { + continue; + } + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kClientNodeId): + ReturnErrorOnFailure(DataModel::Decode(reader, clientNodeId)); + break; + case to_underlying(Fields::kICid): + ReturnErrorOnFailure(DataModel::Decode(reader, ICid)); + break; + case to_underlying(Fields::kFabricIndex): + ReturnErrorOnFailure(DataModel::Decode(reader, fabricIndex)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; +} + +} // namespace MonitoringRegistration +} // namespace Structs + +namespace Commands { +namespace RegisterClientMonitoring { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kClientNodeId)), clientNodeId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kICid)), ICid)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + if (!TLV::IsContextTag(reader.GetTag())) + { + continue; + } + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kClientNodeId): + ReturnErrorOnFailure(DataModel::Decode(reader, clientNodeId)); + break; + case to_underlying(Fields::kICid): + ReturnErrorOnFailure(DataModel::Decode(reader, ICid)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace RegisterClientMonitoring. +namespace StayAwakeRequest { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + if (!TLV::IsContextTag(reader.GetTag())) + { + continue; + } + switch (TLV::TagNumFromTag(reader.GetTag())) + { + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace StayAwakeRequest. +} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::IdleModeInterval::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, idleModeInterval)); + break; + case Attributes::ActiveModeInterval::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, activeModeInterval)); + break; + case Attributes::ActiveModeThreshold::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, activeModeThreshold)); + break; + case Attributes::ExpectedClients::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, expectedClients)); + break; + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, generatedCommandList)); + break; + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, acceptedCommandList)); + break; + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, attributeList)); + break; + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, featureMap)); + break; + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, clusterRevision)); + break; + default: + break; + } + + return CHIP_NO_ERROR; +} +} // namespace Attributes + +namespace Events { +} // namespace Events + +} // namespace ClientMonitoring namespace UnitTesting { namespace Structs { namespace SimpleStruct { @@ -21468,13 +21468,6 @@ bool CommandIsFabricScoped(ClusterId aCluster, CommandId aCommand) return false; } } - case Clusters::ClientMonitoring::Id: { - switch (aCommand) - { - default: - return false; - } - } case Clusters::ModeSelect::Id: { switch (aCommand) { @@ -21594,6 +21587,13 @@ bool CommandIsFabricScoped(ClusterId aCluster, CommandId aCommand) return false; } } + case Clusters::ClientMonitoring::Id: { + switch (aCommand) + { + default: + return false; + } + } case Clusters::UnitTesting::Id: { switch (aCommand) { 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 7c4e38dfbb075f..c08f33b94259ea 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 @@ -12672,228 +12672,6 @@ struct DecodableType } // namespace StateChange } // namespace Events } // namespace BooleanState -namespace ClientMonitoring { -namespace Structs { -namespace MonitoringRegistration { -enum class Fields -{ - kClientNodeId = 1, - kICid = 2, - kFabricIndex = 254, -}; - -struct Type -{ -public: - chip::NodeId clientNodeId = static_cast(0); - uint64_t ICid = static_cast(0); - chip::FabricIndex fabricIndex = static_cast(0); - - CHIP_ERROR Decode(TLV::TLVReader & reader); - - static constexpr bool kIsFabricScoped = true; - - auto GetFabricIndex() const { return fabricIndex; } - - void SetFabricIndex(chip::FabricIndex fabricIndex_) { fabricIndex = fabricIndex_; } - - CHIP_ERROR EncodeForWrite(TLV::TLVWriter & writer, TLV::Tag tag) const; - CHIP_ERROR EncodeForRead(TLV::TLVWriter & writer, TLV::Tag tag, FabricIndex accessingFabricIndex) const; - -private: - CHIP_ERROR DoEncode(TLV::TLVWriter & writer, TLV::Tag tag, const Optional & accessingFabricIndex) const; -}; - -using DecodableType = Type; - -} // namespace MonitoringRegistration -} // namespace Structs - -namespace Commands { -// Forward-declarations so we can reference these later. - -namespace RegisterClientMonitoring { -struct Type; -struct DecodableType; -} // namespace RegisterClientMonitoring - -namespace StayAwakeRequest { -struct Type; -struct DecodableType; -} // namespace StayAwakeRequest - -} // namespace Commands - -namespace Commands { -namespace RegisterClientMonitoring { -enum class Fields -{ - kClientNodeId = 0, - kICid = 1, -}; - -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::RegisterClientMonitoring::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } - - chip::NodeId clientNodeId = static_cast(0); - uint64_t ICid = static_cast(0); - - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return false; } -}; - -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::RegisterClientMonitoring::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } - - chip::NodeId clientNodeId = static_cast(0); - uint64_t ICid = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace RegisterClientMonitoring -namespace StayAwakeRequest { -enum class Fields -{ -}; - -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::StayAwakeRequest::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } - - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return false; } -}; - -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::StayAwakeRequest::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace StayAwakeRequest -} // namespace Commands - -namespace Attributes { - -namespace IdleModeInterval { -struct TypeInfo -{ - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::IdleModeInterval::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace IdleModeInterval -namespace ActiveModeInterval { -struct TypeInfo -{ - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ActiveModeInterval::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ActiveModeInterval -namespace ActiveModeThreshold { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ActiveModeThreshold::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ActiveModeThreshold -namespace RegisteredClients { -struct TypeInfo -{ - using Type = chip::app::DataModel::List; - using DecodableType = - chip::app::DataModel::DecodableList; - using DecodableArgType = const chip::app::DataModel::DecodableList< - chip::app::Clusters::ClientMonitoring::Structs::MonitoringRegistration::DecodableType> &; - - static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RegisteredClients::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RegisteredClients -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } -}; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } -}; -} // namespace AcceptedCommandList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } -}; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } -}; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } -}; -} // namespace ClusterRevision - -struct TypeInfo -{ - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - - Attributes::IdleModeInterval::TypeInfo::DecodableType idleModeInterval = static_cast(0); - Attributes::ActiveModeInterval::TypeInfo::DecodableType activeModeInterval = static_cast(0); - Attributes::ActiveModeThreshold::TypeInfo::DecodableType activeModeThreshold = static_cast(0); - Attributes::RegisteredClients::TypeInfo::DecodableType registeredClients; - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; -}; -} // namespace Attributes -} // namespace ClientMonitoring namespace ModeSelect { namespace Structs { namespace SemanticTag { @@ -25407,6 +25185,228 @@ struct TypeInfo }; } // namespace Attributes } // namespace ElectricalMeasurement +namespace ClientMonitoring { +namespace Structs { +namespace MonitoringRegistration { +enum class Fields +{ + kClientNodeId = 1, + kICid = 2, + kFabricIndex = 254, +}; + +struct Type +{ +public: + chip::NodeId clientNodeId = static_cast(0); + uint64_t ICid = static_cast(0); + chip::FabricIndex fabricIndex = static_cast(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = true; + + auto GetFabricIndex() const { return fabricIndex; } + + void SetFabricIndex(chip::FabricIndex fabricIndex_) { fabricIndex = fabricIndex_; } + + CHIP_ERROR EncodeForWrite(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR EncodeForRead(TLV::TLVWriter & writer, TLV::Tag tag, FabricIndex accessingFabricIndex) const; + +private: + CHIP_ERROR DoEncode(TLV::TLVWriter & writer, TLV::Tag tag, const Optional & accessingFabricIndex) const; +}; + +using DecodableType = Type; + +} // namespace MonitoringRegistration +} // namespace Structs + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace RegisterClientMonitoring { +struct Type; +struct DecodableType; +} // namespace RegisterClientMonitoring + +namespace StayAwakeRequest { +struct Type; +struct DecodableType; +} // namespace StayAwakeRequest + +} // namespace Commands + +namespace Commands { +namespace RegisterClientMonitoring { +enum class Fields +{ + kClientNodeId = 0, + kICid = 1, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::RegisterClientMonitoring::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } + + chip::NodeId clientNodeId = static_cast(0); + uint64_t ICid = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::RegisterClientMonitoring::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } + + chip::NodeId clientNodeId = static_cast(0); + uint64_t ICid = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace RegisterClientMonitoring +namespace StayAwakeRequest { +enum class Fields +{ +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::StayAwakeRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::StayAwakeRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace StayAwakeRequest +} // namespace Commands + +namespace Attributes { + +namespace IdleModeInterval { +struct TypeInfo +{ + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::IdleModeInterval::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace IdleModeInterval +namespace ActiveModeInterval { +struct TypeInfo +{ + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ActiveModeInterval::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ActiveModeInterval +namespace ActiveModeThreshold { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ActiveModeThreshold::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ActiveModeThreshold +namespace ExpectedClients { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList< + chip::app::Clusters::ClientMonitoring::Structs::MonitoringRegistration::DecodableType> &; + + static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ExpectedClients::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ExpectedClients +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } +}; +} // namespace AcceptedCommandList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::ClientMonitoring::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::IdleModeInterval::TypeInfo::DecodableType idleModeInterval = static_cast(0); + Attributes::ActiveModeInterval::TypeInfo::DecodableType activeModeInterval = static_cast(0); + Attributes::ActiveModeThreshold::TypeInfo::DecodableType activeModeThreshold = static_cast(0); + Attributes::ExpectedClients::TypeInfo::DecodableType expectedClients; + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace ClientMonitoring namespace UnitTesting { namespace Structs { namespace SimpleStruct { diff --git a/zzz_generated/app-common/app-common/zap-generated/command-id.h b/zzz_generated/app-common/app-common/zap-generated/command-id.h index 6fe8149a67e861..b443dfc0199f10 100644 --- a/zzz_generated/app-common/app-common/zap-generated/command-id.h +++ b/zzz_generated/app-common/app-common/zap-generated/command-id.h @@ -183,10 +183,6 @@ #define ZCL_KEY_SET_READ_ALL_INDICES_COMMAND_ID (0x04) #define ZCL_KEY_SET_READ_ALL_INDICES_RESPONSE_COMMAND_ID (0x05) -// Commands for cluster: Client Monitoring -#define ZCL_REGISTER_CLIENT_MONITORING_COMMAND_ID (0x00) -#define ZCL_STAY_AWAKE_REQUEST_COMMAND_ID (0x01) - // Commands for cluster: Mode Select #define ZCL_CHANGE_TO_MODE_COMMAND_ID (0x00) @@ -321,6 +317,10 @@ #define ZCL_GET_MEASUREMENT_PROFILE_RESPONSE_COMMAND_COMMAND_ID (0x01) #define ZCL_GET_MEASUREMENT_PROFILE_COMMAND_COMMAND_ID (0x01) +// Commands for cluster: Client Monitoring +#define ZCL_REGISTER_CLIENT_MONITORING_COMMAND_ID (0x00) +#define ZCL_STAY_AWAKE_REQUEST_COMMAND_ID (0x01) + // Commands for cluster: Unit Testing #define ZCL_TEST_COMMAND_ID (0x00) #define ZCL_TEST_SPECIFIC_RESPONSE_COMMAND_ID (0x00) diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h index 06c0153de1be72..78fed4d2e9636f 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h @@ -2167,48 +2167,6 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; } // namespace Attributes } // namespace BooleanState -namespace ClientMonitoring { -namespace Attributes { - -namespace IdleModeInterval { -static constexpr AttributeId Id = 0x00000000; -} // namespace IdleModeInterval - -namespace ActiveModeInterval { -static constexpr AttributeId Id = 0x00000001; -} // namespace ActiveModeInterval - -namespace ActiveModeThreshold { -static constexpr AttributeId Id = 0x00000002; -} // namespace ActiveModeThreshold - -namespace RegisteredClients { -static constexpr AttributeId Id = 0x00000003; -} // namespace RegisteredClients - -namespace GeneratedCommandList { -static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; -} // namespace GeneratedCommandList - -namespace AcceptedCommandList { -static constexpr AttributeId Id = Globals::Attributes::AcceptedCommandList::Id; -} // namespace AcceptedCommandList - -namespace AttributeList { -static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; -} // namespace AttributeList - -namespace FeatureMap { -static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; -} // namespace FeatureMap - -namespace ClusterRevision { -static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace ClientMonitoring - namespace ModeSelect { namespace Attributes { @@ -4647,6 +4605,48 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; } // namespace Attributes } // namespace ElectricalMeasurement +namespace ClientMonitoring { +namespace Attributes { + +namespace IdleModeInterval { +static constexpr AttributeId Id = 0x00000000; +} // namespace IdleModeInterval + +namespace ActiveModeInterval { +static constexpr AttributeId Id = 0x00000001; +} // namespace ActiveModeInterval + +namespace ActiveModeThreshold { +static constexpr AttributeId Id = 0x00000002; +} // namespace ActiveModeThreshold + +namespace ExpectedClients { +static constexpr AttributeId Id = 0x00000003; +} // namespace ExpectedClients + +namespace GeneratedCommandList { +static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; +} // namespace GeneratedCommandList + +namespace AcceptedCommandList { +static constexpr AttributeId Id = Globals::Attributes::AcceptedCommandList::Id; +} // namespace AcceptedCommandList + +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + +namespace FeatureMap { +static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; +} // namespace FeatureMap + +namespace ClusterRevision { +static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace ClientMonitoring + namespace UnitTesting { namespace Attributes { diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h b/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h index 8c38eb458139f1..6d9fe6fbd0cfdd 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h @@ -145,9 +145,6 @@ static constexpr ClusterId Id = 0x00000044; namespace BooleanState { static constexpr ClusterId Id = 0x00000045; } // namespace BooleanState -namespace ClientMonitoring { -static constexpr ClusterId Id = 0x00000046; -} // namespace ClientMonitoring namespace ModeSelect { static constexpr ClusterId Id = 0x00000050; } // namespace ModeSelect @@ -235,6 +232,9 @@ static constexpr ClusterId Id = 0x0000050E; namespace ElectricalMeasurement { static constexpr ClusterId Id = 0x00000B04; } // namespace ElectricalMeasurement +namespace ClientMonitoring { +static constexpr ClusterId Id = 0x00001046; +} // namespace ClientMonitoring namespace UnitTesting { static constexpr ClusterId Id = 0xFFF1FC05; } // namespace UnitTesting diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h index 3b6ac4b6c2963c..1da2e63b9e3996 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h @@ -589,20 +589,6 @@ static constexpr CommandId Id = 0x00000005; } // namespace Commands } // namespace GroupKeyManagement -namespace ClientMonitoring { -namespace Commands { - -namespace RegisterClientMonitoring { -static constexpr CommandId Id = 0x00000000; -} // namespace RegisterClientMonitoring - -namespace StayAwakeRequest { -static constexpr CommandId Id = 0x00000001; -} // namespace StayAwakeRequest - -} // namespace Commands -} // namespace ClientMonitoring - namespace ModeSelect { namespace Commands { @@ -1105,6 +1091,20 @@ static constexpr CommandId Id = 0x00000001; } // namespace Commands } // namespace ElectricalMeasurement +namespace ClientMonitoring { +namespace Commands { + +namespace RegisterClientMonitoring { +static constexpr CommandId Id = 0x00000000; +} // namespace RegisterClientMonitoring + +namespace StayAwakeRequest { +static constexpr CommandId Id = 0x00000001; +} // namespace StayAwakeRequest + +} // namespace Commands +} // namespace ClientMonitoring + namespace UnitTesting { namespace Commands { diff --git a/zzz_generated/app-common/app-common/zap-generated/print-cluster.h b/zzz_generated/app-common/app-common/zap-generated/print-cluster.h index b206e63fe30dc2..9b315e279a7397 100644 --- a/zzz_generated/app-common/app-common/zap-generated/print-cluster.h +++ b/zzz_generated/app-common/app-common/zap-generated/print-cluster.h @@ -278,12 +278,6 @@ #define CHIP_PRINTCLUSTER_BOOLEAN_STATE_CLUSTER #endif -#if defined(ZCL_USING_CLIENT_MONITORING_CLUSTER_SERVER) || defined(ZCL_USING_CLIENT_MONITORING_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_CLIENT_MONITORING_CLUSTER { chip::app::Clusters::ClientMonitoring::Id, "Client Monitoring" }, -#else -#define CHIP_PRINTCLUSTER_CLIENT_MONITORING_CLUSTER -#endif - #if defined(ZCL_USING_MODE_SELECT_CLUSTER_SERVER) || defined(ZCL_USING_MODE_SELECT_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_MODE_SELECT_CLUSTER { chip::app::Clusters::ModeSelect::Id, "Mode Select" }, #else @@ -467,6 +461,12 @@ #define CHIP_PRINTCLUSTER_ELECTRICAL_MEASUREMENT_CLUSTER #endif +#if defined(ZCL_USING_CLIENT_MONITORING_CLUSTER_SERVER) || defined(ZCL_USING_CLIENT_MONITORING_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_CLIENT_MONITORING_CLUSTER { chip::app::Clusters::ClientMonitoring::Id, "Client Monitoring" }, +#else +#define CHIP_PRINTCLUSTER_CLIENT_MONITORING_CLUSTER +#endif + #if defined(ZCL_USING_UNIT_TESTING_CLUSTER_SERVER) || defined(ZCL_USING_UNIT_TESTING_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_UNIT_TESTING_CLUSTER { chip::app::Clusters::UnitTesting::Id, "Unit Testing" }, #else @@ -520,7 +520,6 @@ CHIP_PRINTCLUSTER_PROXY_DISCOVERY_CLUSTER \ CHIP_PRINTCLUSTER_PROXY_VALID_CLUSTER \ CHIP_PRINTCLUSTER_BOOLEAN_STATE_CLUSTER \ - CHIP_PRINTCLUSTER_CLIENT_MONITORING_CLUSTER \ CHIP_PRINTCLUSTER_MODE_SELECT_CLUSTER \ CHIP_PRINTCLUSTER_DOOR_LOCK_CLUSTER \ CHIP_PRINTCLUSTER_WINDOW_COVERING_CLUSTER \ @@ -550,6 +549,7 @@ CHIP_PRINTCLUSTER_APPLICATION_BASIC_CLUSTER \ CHIP_PRINTCLUSTER_ACCOUNT_LOGIN_CLUSTER \ CHIP_PRINTCLUSTER_ELECTRICAL_MEASUREMENT_CLUSTER \ + CHIP_PRINTCLUSTER_CLIENT_MONITORING_CLUSTER \ CHIP_PRINTCLUSTER_UNIT_TESTING_CLUSTER \ CHIP_PRINTCLUSTER_FAULT_INJECTION_CLUSTER diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index c863806e24fee4..aafc35794b3bf4 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -73,7 +73,6 @@ | ProxyDiscovery | 0x0043 | | ProxyValid | 0x0044 | | BooleanState | 0x0045 | -| ClientMonitoring | 0x0046 | | ModeSelect | 0x0050 | | DoorLock | 0x0101 | | WindowCovering | 0x0102 | @@ -103,6 +102,7 @@ | ApplicationBasic | 0x050D | | AccountLogin | 0x050E | | ElectricalMeasurement | 0x0B04 | +| ClientMonitoring | 0x1046 | | UnitTesting | 0xFFF1FC05| | FaultInjection | 0xFFF1FC06| \*----------------------------------------------------------------------------*/ @@ -3662,89 +3662,6 @@ class GroupKeyManagementKeySetReadAllIndices : public ClusterCommand | * StateChange | 0x0000 | \*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*\ -| Cluster ClientMonitoring | 0x0046 | -|------------------------------------------------------------------------------| -| Commands: | | -| * RegisterClientMonitoring | 0x00 | -| * StayAwakeRequest | 0x01 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * IdleModeInterval | 0x0000 | -| * ActiveModeInterval | 0x0001 | -| * ActiveModeThreshold | 0x0002 | -| * RegisteredClients | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command RegisterClientMonitoring - */ -class ClientMonitoringRegisterClientMonitoring : public ClusterCommand -{ -public: - ClientMonitoringRegisterClientMonitoring(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("register-client-monitoring", credsIssuerConfig) - { - AddArgument("ClientNodeId", 0, UINT64_MAX, &mRequest.clientNodeId); - AddArgument("ICid", 0, UINT64_MAX, &mRequest.ICid); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000046) command (0x00000000) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000046, 0x00000000, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000046) command (0x00000000) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000046, 0x00000000, mRequest); - } - -private: - chip::app::Clusters::ClientMonitoring::Commands::RegisterClientMonitoring::Type mRequest; -}; - -/* - * Command StayAwakeRequest - */ -class ClientMonitoringStayAwakeRequest : public ClusterCommand -{ -public: - ClientMonitoringStayAwakeRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("stay-awake-request", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000046) command (0x00000001) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000046, 0x00000001, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000046) command (0x00000001) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000046, 0x00000001, mRequest); - } - -private: - chip::app::Clusters::ClientMonitoring::Commands::StayAwakeRequest::Type mRequest; -}; - /*----------------------------------------------------------------------------*\ | Cluster ModeSelect | 0x0050 | |------------------------------------------------------------------------------| @@ -7380,6 +7297,89 @@ class ElectricalMeasurementGetMeasurementProfileCommand : public ClusterCommand chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileCommand::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster ClientMonitoring | 0x1046 | +|------------------------------------------------------------------------------| +| Commands: | | +| * RegisterClientMonitoring | 0x00 | +| * StayAwakeRequest | 0x01 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * IdleModeInterval | 0x0000 | +| * ActiveModeInterval | 0x0001 | +| * ActiveModeThreshold | 0x0002 | +| * ExpectedClients | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command RegisterClientMonitoring + */ +class ClientMonitoringRegisterClientMonitoring : public ClusterCommand +{ +public: + ClientMonitoringRegisterClientMonitoring(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("register-client-monitoring", credsIssuerConfig) + { + AddArgument("ClientNodeId", 0, UINT64_MAX, &mRequest.clientNodeId); + AddArgument("ICid", 0, UINT64_MAX, &mRequest.ICid); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00001046) command (0x00000000) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00001046, 0x00000000, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00001046) command (0x00000000) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00001046, 0x00000000, mRequest); + } + +private: + chip::app::Clusters::ClientMonitoring::Commands::RegisterClientMonitoring::Type mRequest; +}; + +/* + * Command StayAwakeRequest + */ +class ClientMonitoringStayAwakeRequest : public ClusterCommand +{ +public: + ClientMonitoringStayAwakeRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("stay-awake-request", credsIssuerConfig) + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00001046) command (0x00000001) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00001046, 0x00000001, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00001046) command (0x00000001) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00001046, 0x00000001, mRequest); + } + +private: + chip::app::Clusters::ClientMonitoring::Commands::StayAwakeRequest::Type mRequest; +}; + /*----------------------------------------------------------------------------*\ | Cluster UnitTesting | 0xFFF1FC05| |------------------------------------------------------------------------------| @@ -10563,52 +10563,6 @@ void registerClusterBooleanState(Commands & commands, CredentialIssuerCommands * commands.Register(clusterName, clusterCommands); } -void registerClusterClientMonitoring(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) -{ - using namespace chip::app::Clusters::ClientMonitoring; - - const char * clusterName = "ClientMonitoring"; - - commands_list clusterCommands = { - // - // Commands - // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - // - // Attributes - // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "idle-mode-interval", Attributes::IdleModeInterval::Id, credsIssuerConfig), // - make_unique(Id, "active-mode-interval", Attributes::ActiveModeInterval::Id, credsIssuerConfig), // - make_unique(Id, "active-mode-threshold", Attributes::ActiveModeThreshold::Id, credsIssuerConfig), // - make_unique(Id, "registered-clients", Attributes::RegisteredClients::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "idle-mode-interval", Attributes::IdleModeInterval::Id, credsIssuerConfig), // - make_unique(Id, "active-mode-interval", Attributes::ActiveModeInterval::Id, credsIssuerConfig), // - make_unique(Id, "active-mode-threshold", Attributes::ActiveModeThreshold::Id, credsIssuerConfig), // - make_unique(Id, "registered-clients", Attributes::RegisteredClients::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - // - // Events - // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - }; - - commands.Register(clusterName, clusterCommands); -} void registerClusterModeSelect(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { using namespace chip::app::Clusters::ModeSelect; @@ -13039,6 +12993,52 @@ void registerClusterElectricalMeasurement(Commands & commands, CredentialIssuerC commands.Register(clusterName, clusterCommands); } +void registerClusterClientMonitoring(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +{ + using namespace chip::app::Clusters::ClientMonitoring; + + const char * clusterName = "ClientMonitoring"; + + commands_list clusterCommands = { + // + // Commands + // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + // + // Attributes + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "idle-mode-interval", Attributes::IdleModeInterval::Id, credsIssuerConfig), // + make_unique(Id, "active-mode-interval", Attributes::ActiveModeInterval::Id, credsIssuerConfig), // + make_unique(Id, "active-mode-threshold", Attributes::ActiveModeThreshold::Id, credsIssuerConfig), // + make_unique(Id, "expected-clients", Attributes::ExpectedClients::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "idle-mode-interval", Attributes::IdleModeInterval::Id, credsIssuerConfig), // + make_unique(Id, "active-mode-interval", Attributes::ActiveModeInterval::Id, credsIssuerConfig), // + make_unique(Id, "active-mode-threshold", Attributes::ActiveModeThreshold::Id, credsIssuerConfig), // + make_unique(Id, "expected-clients", Attributes::ExpectedClients::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + // + // Events + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + }; + + commands.Register(clusterName, clusterCommands); +} void registerClusterUnitTesting(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { using namespace chip::app::Clusters::UnitTesting; @@ -13528,7 +13528,6 @@ void registerClusters(Commands & commands, CredentialIssuerCommands * credsIssue registerClusterProxyDiscovery(commands, credsIssuerConfig); registerClusterProxyValid(commands, credsIssuerConfig); registerClusterBooleanState(commands, credsIssuerConfig); - registerClusterClientMonitoring(commands, credsIssuerConfig); registerClusterModeSelect(commands, credsIssuerConfig); registerClusterDoorLock(commands, credsIssuerConfig); registerClusterWindowCovering(commands, credsIssuerConfig); @@ -13558,6 +13557,7 @@ void registerClusters(Commands & commands, CredentialIssuerCommands * credsIssue registerClusterApplicationBasic(commands, credsIssuerConfig); registerClusterAccountLogin(commands, credsIssuerConfig); registerClusterElectricalMeasurement(commands, credsIssuerConfig); + registerClusterClientMonitoring(commands, credsIssuerConfig); registerClusterUnitTesting(commands, credsIssuerConfig); registerClusterFaultInjection(commands, credsIssuerConfig); registerClusterSubscriptions(commands, credsIssuerConfig); 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 022b72bc9e32ca..ff16d0a26e1d58 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -75,7 +75,6 @@ | ProxyDiscovery | 0x0043 | | ProxyValid | 0x0044 | | BooleanState | 0x0045 | -| ClientMonitoring | 0x0046 | | ModeSelect | 0x0050 | | DoorLock | 0x0101 | | WindowCovering | 0x0102 | @@ -105,6 +104,7 @@ | ApplicationBasic | 0x050D | | AccountLogin | 0x050E | | ElectricalMeasurement | 0x0B04 | +| ClientMonitoring | 0x1046 | | UnitTesting | 0xFFF1FC05| | FaultInjection | 0xFFF1FC06| \*----------------------------------------------------------------------------*/