From d64905a91546913e023f3ea2d679c8e92eef2a45 Mon Sep 17 00:00:00 2001 From: Rohit Jadhav Date: Tue, 6 Jun 2023 14:21:54 +0530 Subject: [PATCH] Addressed review comments --- .../data-model/chip/refrigerator-alarm.xml | 7 +- .../data_model/controller-clusters.matter | 9 +-- .../devicecontroller/ClusterIDMapping.java | 24 +------ .../chip/devicecontroller/ChipClusters.java | 14 ---- .../chip/devicecontroller/ChipIdLookup.java | 2 +- .../devicecontroller/ClusterInfoMapping.java | 17 ----- .../python/chip/clusters/CHIPClusters.py | 11 +-- .../python/chip/clusters/Objects.py | 21 +----- .../CHIP/zap-generated/MTRBaseClusters.h | 8 --- .../CHIP/zap-generated/MTRBaseClusters.mm | 37 ---------- .../CHIP/zap-generated/MTRClusterConstants.h | 5 +- .../CHIP/zap-generated/MTRClusters.h | 5 -- .../CHIP/zap-generated/MTRClusters.mm | 68 ------------------- .../zap-generated/MTRCommandPayloadsObjc.h | 30 -------- .../zap-generated/MTRCommandPayloadsObjc.mm | 30 -------- .../app-common/zap-generated/callback.h | 6 -- .../zap-generated/cluster-objects.cpp | 47 +------------ .../zap-generated/cluster-objects.h | 45 ------------ .../app-common/zap-generated/ids/Attributes.h | 2 +- .../app-common/zap-generated/ids/Commands.h | 10 --- .../zap-generated/cluster/Commands.h | 37 +--------- .../zap-generated/cluster/Commands.h | 54 +-------------- 22 files changed, 18 insertions(+), 471 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/refrigerator-alarm.xml b/src/app/zap-templates/zcl/data-model/chip/refrigerator-alarm.xml index 728ba17cbb5580..da478ae2347961 100644 --- a/src/app/zap-templates/zcl/data-model/chip/refrigerator-alarm.xml +++ b/src/app/zap-templates/zcl/data-model/chip/refrigerator-alarm.xml @@ -29,12 +29,7 @@ limitations under the License. true true Mask - State - - - Modify enabled alarms - - + State Notify diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 040ba04c17b9d7..cbd7e6ffd29804 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -3128,20 +3128,13 @@ client cluster RefrigeratorAlarm = 87 { } readonly attribute AlarmMap mask = 0; - readonly attribute AlarmMap state = 1; + readonly attribute AlarmMap state = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - - request struct ModifyEnabledAlarmsRequest { - AlarmMap mask = 0; - } - - /** Modify enabled alarms */ - command ModifyEnabledAlarms(ModifyEnabledAlarmsRequest): DefaultSuccess = 0; } /** This cluster is an alias of the Mode Select cluster, defining additional semantics and diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index aee54b9e26fcc0..3bc558ed5d020d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -7043,7 +7043,7 @@ public long getID() { public enum Attribute { Mask(0L), - State(1L), + State(2L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -7090,8 +7090,7 @@ public static Event value(long id) throws NoSuchFieldError { } } - public enum Command { - ModifyEnabledAlarms(0L),; + public enum Command {; private final long id; Command(long id) { this.id = id; @@ -7109,24 +7108,7 @@ public static Command value(long id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }public enum ModifyEnabledAlarmsCommandField {Mask(0),; - private final int id; - ModifyEnabledAlarmsCommandField(int id) { - this.id = id; - } - - public int getID() { - return id; - } - public static ModifyEnabledAlarmsCommandField value(int id) throws NoSuchFieldError { - for (ModifyEnabledAlarmsCommandField field : ModifyEnabledAlarmsCommandField.values()) { - if (field.getID() == id) { - return field; - } - } - throw new NoSuchFieldError(); - } - }@Override + }@Override public String getAttributeName(long id) throws NoSuchFieldError { return Attribute.value(id).toString(); } diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 455c48789e0dd0..adc5d8f588c5a0 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -15239,20 +15239,6 @@ public RefrigeratorAlarmCluster(long devicePtr, int endpointId) { @Override public native long initWithDevice(long devicePtr, int endpointId); - public void modifyEnabledAlarms(DefaultClusterCallback callback - , Long mask) { - modifyEnabledAlarms(chipClusterPtr, callback, mask, null); - } - - public void modifyEnabledAlarms(DefaultClusterCallback callback - , Long mask - , int timedInvokeTimeoutMs) { - modifyEnabledAlarms(chipClusterPtr, callback, mask, timedInvokeTimeoutMs); - } - private native void modifyEnabledAlarms(long chipClusterPtr, DefaultClusterCallback Callback - , Long mask - , @Nullable Integer timedInvokeTimeoutMs); - public interface GeneratedCommandListAttributeCallback { void onSuccess( List valueList); void onError(Exception ex); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java index 5637d7b339d40b..b5196f7354ddb3 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java @@ -2355,7 +2355,7 @@ public static String attributeIdToName(long clusterId, long attributeId) { if (attributeId == 0L) { return "Mask"; } - if (attributeId == 1L) { + if (attributeId == 2L) { return "State"; } if (attributeId == 65528L) { diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java index 1793a2c41cc5d1..a53ccc327ac976 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java @@ -22174,23 +22174,6 @@ public Map> getCommandMap() { Map temperatureControlClusterInteractionInfoMap = new LinkedHashMap<>(); commandMap.put("temperatureControl", temperatureControlClusterInteractionInfoMap); Map refrigeratorAlarmClusterInteractionInfoMap = new LinkedHashMap<>(); - Map refrigeratorAlarmmodifyEnabledAlarmsCommandParams = new LinkedHashMap(); - CommandParameterInfo refrigeratorAlarmmodifyEnabledAlarmsmaskCommandParameterInfo = new CommandParameterInfo("mask", Long.class, Long.class); - refrigeratorAlarmmodifyEnabledAlarmsCommandParams.put("mask",refrigeratorAlarmmodifyEnabledAlarmsmaskCommandParameterInfo); - - InteractionInfo refrigeratorAlarmmodifyEnabledAlarmsInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.RefrigeratorAlarmCluster) cluster) - .modifyEnabledAlarms((DefaultClusterCallback) callback - , (Long) - commandArguments.get("mask") - - ); - }, - () -> new DelegatedDefaultClusterCallback(), - refrigeratorAlarmmodifyEnabledAlarmsCommandParams - ); - refrigeratorAlarmClusterInteractionInfoMap.put("modifyEnabledAlarms", refrigeratorAlarmmodifyEnabledAlarmsInteractionInfo); commandMap.put("refrigeratorAlarm", refrigeratorAlarmClusterInteractionInfoMap); Map dishwasherModeSelectClusterInteractionInfoMap = new LinkedHashMap<>(); Map dishwasherModeSelectchangeToModeCommandParams = new LinkedHashMap(); diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 58055c12f13ad0..7bc466cdea51f8 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -4817,13 +4817,6 @@ class ChipClusters: "clusterName": "RefrigeratorAlarm", "clusterId": 0x00000057, "commands": { - 0x00000000: { - "commandId": 0x00000000, - "commandName": "ModifyEnabledAlarms", - "args": { - "mask": "int", - }, - }, }, "attributes": { 0x00000000: { @@ -4832,9 +4825,9 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x00000001: { + 0x00000002: { "attributeName": "State", - "attributeId": 0x00000001, + "attributeId": 0x00000002, "type": "int", "reportable": True, }, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 3d08fccde72489..da38d0ca1fdab7 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -16741,7 +16741,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor(Label="mask", Tag=0x00000000, Type=uint), - ClusterObjectFieldDescriptor(Label="state", Tag=0x00000001, Type=uint), + ClusterObjectFieldDescriptor(Label="state", Tag=0x00000002, Type=uint), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -16763,23 +16763,6 @@ class Bitmaps: class AlarmMap(IntFlag): kDoorOpen = 0x1 - class Commands: - @dataclass - class ModifyEnabledAlarms(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0057 - command_id: typing.ClassVar[int] = 0x00000000 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="mask", Tag=0, Type=uint), - ]) - - mask: 'uint' = 0 - class Attributes: @dataclass class Mask(ClusterAttributeDescriptor): @@ -16805,7 +16788,7 @@ def cluster_id(cls) -> int: @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000001 + return 0x00000002 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index ed8377696ff4fb..eea0fa06ef0ed4 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -8818,14 +8818,6 @@ MTR_NEWLY_AVAILABLE endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; -/** - * Command ModifyEnabledAlarms - * - * Modify enabled alarms - */ -- (void)modifyEnabledAlarmsWithParams:(MTRRefrigeratorAlarmClusterModifyEnabledAlarmsParams *)params - completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - - (void)readAttributeMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)subscribeAttributeMaskWithParams:(MTRSubscribeParams *)params diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 99d1570eb356d8..8352327055e458 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -51136,43 +51136,6 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en return self; } -- (void)modifyEnabledAlarmsWithParams:(MTRRefrigeratorAlarmClusterModifyEnabledAlarmsParams *)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - RefrigeratorAlarm::Commands::ModifyEnabledAlarms::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.mask = static_cast>(params.mask.unsignedIntValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - - (void)readAttributeMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index 72a53e53e563bb..ac1d50df6c3b0a 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -3877,7 +3877,7 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { // Cluster RefrigeratorAlarm attributes MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeMaskID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeStateID MTR_NEWLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeStateID MTR_NEWLY_AVAILABLE = 0x00000002, MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE @@ -10319,9 +10319,6 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { // Cluster TemperatureControl commands MTRCommandIDTypeClusterTemperatureControlCommandSetTemperatureID MTR_NEWLY_AVAILABLE = 0x00000000, - // Cluster RefrigeratorAlarm commands - MTRCommandIDTypeClusterRefrigeratorAlarmCommandModifyEnabledAlarmsID MTR_NEWLY_AVAILABLE = 0x00000000, - // Cluster DishwasherModeSelect commands MTRCommandIDTypeClusterDishwasherModeSelectCommandChangeToModeID MTR_NEWLY_AVAILABLE = 0x00000000, MTRCommandIDTypeClusterDishwasherModeSelectCommandChangeToModeWithStatusID MTR_NEWLY_AVAILABLE = 0x00000001, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index 4dff4c3ed350f1..a30bd94362c9ae 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -3101,11 +3101,6 @@ MTR_NEWLY_AVAILABLE endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; -- (void)modifyEnabledAlarmsWithParams:(MTRRefrigeratorAlarmClusterModifyEnabledAlarmsParams *)params - expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - - (NSDictionary *)readAttributeMaskWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeStateWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index 0b041e1dd432a5..3848339e121aa0 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -14356,74 +14356,6 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi return self; } -- (void)modifyEnabledAlarmsWithParams:(MTRRefrigeratorAlarmClusterModifyEnabledAlarmsParams *)params - expectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completion:(MTRStatusCompletion)completion -{ - NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeRefrigeratorAlarmID, - (unsigned int) MTRCommandIDTypeClusterRefrigeratorAlarmCommandModifyEnabledAlarmsID]; - // Make a copy of params before we go async. - params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } - MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; - MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { - MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - RefrigeratorAlarm::Commands::ModifyEnabledAlarms::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.mask = static_cast>(params.mask.unsignedIntValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); - }; - workItem.readyHandler = readyHandler; - MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); - [self.device.asyncCallbackWorkQueue enqueueWorkItem:workItem]; - - if (!expectedValueIntervalMs || ([expectedValueIntervalMs compare:@(0)] == NSOrderedAscending)) { - expectedValues = nil; - } else { - expectedValueIntervalMs = MTRClampedNumber(expectedValueIntervalMs, @(1), @(UINT32_MAX)); - } - if (expectedValues) { - [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; - } -} - - (NSDictionary *)readAttributeMaskWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index afb2c9d3159bac..110a5abc399386 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -4484,36 +4484,6 @@ MTR_NEWLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_NEWLY_AVAILABLE -@interface MTRRefrigeratorAlarmClusterModifyEnabledAlarmsParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull mask MTR_NEWLY_AVAILABLE; -/** - * 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; - -/** - * Controls how much time, in seconds, we will allow for the server to process the command. - * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. - * - * If nil, the framework will try to select an appropriate timeout value itself. - */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; -@end - MTR_NEWLY_AVAILABLE @interface MTRDishwasherModeSelectClusterChangeToModeParams : NSObject diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index 0ab6480c0ad994..e8f4f5a04de3f7 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -7218,36 +7218,6 @@ - (NSString *)description return descriptionString; } -@end -@implementation MTRRefrigeratorAlarmClusterModifyEnabledAlarmsParams -- (instancetype)init -{ - if (self = [super init]) { - - _mask = @(0); - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRRefrigeratorAlarmClusterModifyEnabledAlarmsParams alloc] init]; - - other.mask = self.mask; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: mask:%@; >", NSStringFromClass([self class]), _mask]; - return descriptionString; -} - @end @implementation MTRDishwasherModeSelectClusterChangeToModeParams - (instancetype)init 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 6c05dc709d5660..01c4b64102d471 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -11602,12 +11602,6 @@ bool emberAfRvcCleanModeSelectClusterChangeToModeWithStatusCallback( bool emberAfTemperatureControlClusterSetTemperatureCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::TemperatureControl::Commands::SetTemperature::DecodableType & commandData); -/** - * @brief Refrigerator Alarm Cluster ModifyEnabledAlarms Command callback (from client) - */ -bool emberAfRefrigeratorAlarmClusterModifyEnabledAlarmsCallback( - chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::RefrigeratorAlarm::Commands::ModifyEnabledAlarms::DecodableType & commandData); /** * @brief Dishwasher Mode Select Cluster ChangeToMode Command callback (from client) */ 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 6ee5c553957ed8..cdd8cf6cd0207a 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 @@ -12337,45 +12337,7 @@ namespace Events {} // namespace Events } // namespace TemperatureControl namespace RefrigeratorAlarm { -namespace Commands { -namespace ModifyEnabledAlarms { -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(Fields::kMask), mask)); - 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::kMask): - ReturnErrorOnFailure(DataModel::Decode(reader, mask)); - break; - default: - break; - } - } - - VerifyOrReturnError(err == CHIP_END_OF_TLV, err); - ReturnErrorOnFailure(reader.ExitContainer(outer)); - return CHIP_NO_ERROR; -} -} // namespace ModifyEnabledAlarms. -} // namespace Commands +namespace Commands {} // namespace Commands namespace Attributes { CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) @@ -28097,13 +28059,6 @@ bool CommandIsFabricScoped(ClusterId aCluster, CommandId aCommand) return false; } } - case Clusters::RefrigeratorAlarm::Id: { - switch (aCommand) - { - default: - return false; - } - } case Clusters::DishwasherModeSelect::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 70d314b49e2acb..3fd69006c8673b 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 @@ -15523,51 +15523,6 @@ struct TypeInfo } // namespace TemperatureControl namespace RefrigeratorAlarm { -namespace Commands { -// Forward-declarations so we can reference these later. - -namespace ModifyEnabledAlarms { -struct Type; -struct DecodableType; -} // namespace ModifyEnabledAlarms - -} // namespace Commands - -namespace Commands { -namespace ModifyEnabledAlarms { -enum class Fields : uint8_t -{ - kMask = 0, -}; - -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ModifyEnabledAlarms::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } - - chip::BitMask mask = 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::ModifyEnabledAlarms::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } - - chip::BitMask mask = static_cast>(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace ModifyEnabledAlarms -} // namespace Commands - namespace Attributes { namespace Mask { 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 31e15f274a6f15..11da751d55b1ab 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 @@ -2729,7 +2729,7 @@ static constexpr AttributeId Id = 0x00000000; } // namespace Mask namespace State { -static constexpr AttributeId Id = 0x00000001; +static constexpr AttributeId Id = 0x00000002; } // namespace State namespace GeneratedCommandList { 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 e43dc202e3d42f..54ed91151d52cd 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 @@ -731,16 +731,6 @@ static constexpr CommandId Id = 0x00000000; } // namespace Commands } // namespace TemperatureControl -namespace RefrigeratorAlarm { -namespace Commands { - -namespace ModifyEnabledAlarms { -static constexpr CommandId Id = 0x00000000; -} // namespace ModifyEnabledAlarms - -} // namespace Commands -} // namespace RefrigeratorAlarm - namespace DishwasherModeSelect { namespace Commands { diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index bab41214cc754b..0fa2aa0f11d3ce 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -4513,11 +4513,10 @@ class TemperatureControlSetTemperature : public ClusterCommand | Cluster RefrigeratorAlarm | 0x0057 | |------------------------------------------------------------------------------| | Commands: | | -| * ModifyEnabledAlarms | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | | * Mask | 0x0000 | -| * State | 0x0001 | +| * State | 0x0002 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -4529,37 +4528,6 @@ class TemperatureControlSetTemperature : public ClusterCommand | * Notify | 0x0000 | \*----------------------------------------------------------------------------*/ -/* - * Command ModifyEnabledAlarms - */ -class RefrigeratorAlarmModifyEnabledAlarms : public ClusterCommand -{ -public: - RefrigeratorAlarmModifyEnabledAlarms(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("modify-enabled-alarms", credsIssuerConfig) - { - AddArgument("Mask", 0, UINT32_MAX, &mRequest.mask); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) command (0x00000000) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000057, 0x00000000, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) command (0x00000000) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000057, 0x00000000, mRequest); - } - -private: - chip::app::Clusters::RefrigeratorAlarm::Commands::ModifyEnabledAlarms::Type mRequest; -}; - /*----------------------------------------------------------------------------*\ | Cluster DishwasherModeSelect | 0x0059 | |------------------------------------------------------------------------------| @@ -15079,8 +15047,7 @@ void registerClusterRefrigeratorAlarm(Commands & commands, CredentialIssuerComma // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // // // Attributes // 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 b37a4a5c337b17..c78ba2399d0e26 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -45481,11 +45481,10 @@ class SubscribeAttributeTemperatureControlClusterRevision : public SubscribeAttr | Cluster RefrigeratorAlarm | 0x0057 | |------------------------------------------------------------------------------| | Commands: | | -| * ModifyEnabledAlarms | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | | * Mask | 0x0000 | -| * State | 0x0001 | +| * State | 0x0002 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -45497,52 +45496,6 @@ class SubscribeAttributeTemperatureControlClusterRevision : public SubscribeAttr | * Notify | 0x0000 | \*----------------------------------------------------------------------------*/ -/* - * Command ModifyEnabledAlarms - */ -class RefrigeratorAlarmModifyEnabledAlarms : public ClusterCommand { -public: - RefrigeratorAlarmModifyEnabledAlarms() - : ClusterCommand("modify-enabled-alarms") - { - AddArgument("Mask", 0, UINT32_MAX, &mRequest.mask); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) command (0x00000000) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRRefrigeratorAlarmClusterModifyEnabledAlarmsParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.mask = [NSNumber numberWithUnsignedInt:mRequest.mask.Raw()]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster modifyEnabledAlarmsWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::RefrigeratorAlarm::Commands::ModifyEnabledAlarms::Type mRequest; -}; - /* * Attribute Mask */ @@ -45627,7 +45580,7 @@ class ReadRefrigeratorAlarmState : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device @@ -45655,7 +45608,7 @@ class SubscribeAttributeRefrigeratorAlarmState : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -166866,7 +166819,6 @@ void registerClusterRefrigeratorAlarm(Commands & commands) commands_list clusterCommands = { make_unique(Id), // - make_unique(), // make_unique(Id), // make_unique(), // make_unique(Id), //