From 1933377e2d4d4fcf9e3fb3ad289bba40238be7e1 Mon Sep 17 00:00:00 2001 From: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> Date: Fri, 2 Dec 2022 11:37:15 -0500 Subject: [PATCH] [IC-Device] Initial Structure for client monitoring cluster (#23838) * Initial Structure for client monitoring cluster * generated files * Review Comments * generated files * fix xml file * generated files * fix conflict * Update cluster xml * regen --- src/app/chip_data_model.gni | 1 + .../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 | 52 ++++ .../zcl/zcl-with-test-extensions.json | 1 + src/app/zap-templates/zcl/zcl.json | 1 + src/app/zap_cluster_list.py | 2 + .../python/chip/clusters/Objects.py | 229 +++++++++++++++++ .../CHIP/zap-generated/MTRClusterConstants.h | 59 +++++ .../zap-generated/MTRCommandPayloadsObjc.h | 44 ++++ .../zap-generated/MTRCommandPayloadsObjc.mm | 57 +++++ .../CHIP/zap-generated/MTRStructsObjc.h | 9 + .../CHIP/zap-generated/MTRStructsObjc.mm | 34 +++ .../app-common/zap-generated/af-structs.h | 8 + .../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 | 193 ++++++++++++++ .../zap-generated/cluster-objects.h | 222 ++++++++++++++++ .../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 | 131 ++++++++++ .../cluster/ComplexArgumentParser.cpp | 32 +++ .../cluster/ComplexArgumentParser.h | 4 + .../cluster/logging/DataModelLogger.cpp | 33 +++ .../cluster/logging/DataModelLogger.h | 2 + .../zap-generated/cluster/Commands.h | 1 + 34 files changed, 1823 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 create mode 100644 zzz_generated/app-common/app-common/zap-generated/cluster-id.h 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/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..9dc128947904c5 --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/chip/client-monitoring-cluster.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + General + Client Monitoring + 0x1046 + CLIENT_MONITORING_CLUSTER + Client Monitoring allows for ensuring that listed clients meet the required monitoring conditions on the server. + IdleModeInterval + ActiveModeInterval + ActiveModeThreshold + + + ExpectedClients + + + 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..9ef42c9b79b156 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'], @@ -110,6 +111,7 @@ 'ACTIONS_CLUSTER': [], 'BRIDGED_DEVICE_BASIC_CLUSTER': [], 'CHANNEL_CLUSTER': [], + 'CLIENT_MONITORING_CLUSTER': [], 'COLOR_CONTROL_CLUSTER': [], 'COMMISSIONING_CLUSTER': [], 'CONTENT_LAUNCHER_CLUSTER': [], diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index ebe66dee75d117..84904704965102 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -26805,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 63896e7e95f830..d6b5c27d560ac4 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -99,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, @@ -170,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, }; @@ -4887,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") @@ -6199,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 6ce42082934421..e13a48473d1196 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -5276,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 744bd8ceaa80e1..0f925b15110406 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -6995,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 3fc761310b2e4f..d48d05149e0814 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -970,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 78f31666267b70..07769ead2b09aa 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -3581,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/af-structs.h b/zzz_generated/app-common/app-common/zap-generated/af-structs.h index 3c1d5866c587f0..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 @@ -368,6 +368,14 @@ typedef struct _LineupInfo uint8_t lineupInfoType; } LineupInfo; +// Struct for MonitoringRegistration +typedef struct _MonitoringRegistration +{ + chip::NodeId ClientNodeId; + uint64_t ICid; + chip::FabricIndex FabricIndex; +} 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..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 @@ -1133,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 aba2445a5cba5d..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 @@ -27727,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 e1e6b3dd21d05d..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 @@ -4652,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 6669d106cd3da8..8c82bc550c2a7e 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -586,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 @@ -7255,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 // @@ -8695,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 b71d81dba7eaaf..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 @@ -2273,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-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..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 @@ -18554,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 { @@ -21401,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 4fadf5d916bf8c..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 @@ -25185,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 45c8decb6fdc72..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 @@ -317,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 c7dce39a648afe..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 @@ -4605,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 a5d2738c08311f..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 @@ -232,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 d7430e8e41f21b..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 @@ -1091,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 c12c9c4da68c77..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 @@ -461,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 @@ -543,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 852804cdd7daff..aafc35794b3bf4 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -102,6 +102,7 @@ | ApplicationBasic | 0x050D | | AccountLogin | 0x050E | | ElectricalMeasurement | 0x0B04 | +| ClientMonitoring | 0x1046 | | UnitTesting | 0xFFF1FC05| | FaultInjection | 0xFFF1FC06| \*----------------------------------------------------------------------------*/ @@ -7296,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| |------------------------------------------------------------------------------| @@ -12909,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; @@ -13427,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/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp index 5fec5e0a074e79..ac4bcac9fc2dd7 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp @@ -997,6 +997,38 @@ 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"])); + + if (value.isMember("fabricIndex")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "fabricIndex"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.fabricIndex, value["fabricIndex"])); + } + + return CHIP_NO_ERROR; +} + +void ComplexArgumentParser::Finalize(chip::app::Clusters::ClientMonitoring::Structs::MonitoringRegistration::Type & request) +{ + 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, 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..418d7dfd1b565a 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,39 @@ 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; + } + } + { + 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; +} 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..ff16d0a26e1d58 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -104,6 +104,7 @@ | ApplicationBasic | 0x050D | | AccountLogin | 0x050E | | ElectricalMeasurement | 0x0B04 | +| ClientMonitoring | 0x1046 | | UnitTesting | 0xFFF1FC05| | FaultInjection | 0xFFF1FC06| \*----------------------------------------------------------------------------*/